diff --git a/.golangci.yml b/.golangci.yml index cb79bdc2f..1d0c8cb1e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,6 +12,7 @@ linters: - errcheck - errname - copyloopvar + - exhaustruct - forcetypeassert - goconst - gofmt @@ -103,4 +104,4 @@ issues: - ".*\\.pb\\.go" - ".*\\.pb\\.gw\\.go" - ".*\\.pulsar\\.go" - - ".*_mocks\\.go" \ No newline at end of file + - ".*_mocks\\.go" diff --git a/app/app.go b/app/app.go index f501cbdc6..a9911bd9f 100644 --- a/app/app.go +++ b/app/app.go @@ -178,7 +178,7 @@ func NewAlloraApp( baseAppOptions ...func(*baseapp.BaseApp), ) (*AlloraApp, error) { var ( - app = &AlloraApp{} + app = &AlloraApp{} //nolint:exhaustruct appBuilder *runtime.AppBuilder ) diff --git a/app/export.go b/app/export.go index 01dd814b2..e73e60c5b 100644 --- a/app/export.go +++ b/app/export.go @@ -20,7 +20,7 @@ func (app *AlloraApp) ExportAppStateAndValidators( modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) //nolint:exhaustruct // We export at last height + 1, because that's the height at which // CometBFT will start InitChain. diff --git a/app/ibc.go b/app/ibc.go index 7bd189af4..ccb53360c 100644 --- a/app/ibc.go +++ b/app/ibc.go @@ -54,7 +54,7 @@ func (app *AlloraApp) registerIBCModules() { // register the key tables for legacy param subspaces keyTable := ibcclienttypes.ParamKeyTable() - keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) + keyTable.RegisterParamSet(&ibcconnectiontypes.Params{MaxExpectedTimePerBlock: 25000000000}) app.ParamsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable) app.ParamsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable()) app.ParamsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable()) @@ -177,7 +177,7 @@ func (app *AlloraApp) registerIBCModules() { ibcfee.NewAppModule(app.IBCFeeKeeper), icamodule.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), capability.NewAppModule(app.appCodec, *app.CapabilityKeeper, false), - ibctm.AppModule{}, + ibctm.AppModule{AppModuleBasic: ibctm.AppModuleBasic{}}, ); err != nil { panic(err) } @@ -188,12 +188,12 @@ func (app *AlloraApp) registerIBCModules() { // This needs to be removed after IBC supports App Wiring. func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule { modules := map[string]appmodule.AppModule{ - ibcexported.ModuleName: ibc.AppModule{}, - ibctransfertypes.ModuleName: ibctransfer.AppModule{}, - ibcfeetypes.ModuleName: ibcfee.AppModule{}, - icatypes.ModuleName: icamodule.AppModule{}, - capabilitytypes.ModuleName: capability.AppModule{}, - ibctm.ModuleName: ibctm.AppModule{}, + ibcexported.ModuleName: ibc.AppModule{AppModuleBasic: ibc.AppModuleBasic{}}, + ibctransfertypes.ModuleName: ibctransfer.AppModule{AppModuleBasic: ibctransfer.AppModuleBasic{}}, + ibcfeetypes.ModuleName: ibcfee.AppModule{AppModuleBasic: ibcfee.AppModuleBasic{}}, + icatypes.ModuleName: icamodule.AppModule{AppModuleBasic: icamodule.AppModuleBasic{}}, + capabilitytypes.ModuleName: capability.AppModule{AppModuleBasic: capability.AppModuleBasic{}}, + ibctm.ModuleName: ibctm.AppModule{AppModuleBasic: ibctm.AppModuleBasic{}}, } sortedModuleKeys := alloraMath.GetSortedKeys(modules) diff --git a/cmd/allorad/cmd/commands.go b/cmd/allorad/cmd/commands.go index 04afbfde4..e8afbc8d7 100644 --- a/cmd/allorad/cmd/commands.go +++ b/cmd/allorad/cmd/commands.go @@ -49,7 +49,7 @@ func initRootCmd(rootCmd *cobra.Command, txConfig client.TxConfig, basicManager } func queryCommand() *cobra.Command { - cmd := &cobra.Command{ + cmd := &cobra.Command{ // nolint: exhaustruct // dependency code don't want to change the way it works Use: "query", Aliases: []string{"q"}, Short: "Querying subcommands", @@ -71,7 +71,7 @@ func queryCommand() *cobra.Command { } func txCommand() *cobra.Command { - cmd := &cobra.Command{ + cmd := &cobra.Command{ // nolint: exhaustruct // dependency code don't want to change the way it works Use: "tx", Short: "Transactions subcommands", DisableFlagParsing: false, diff --git a/cmd/allorad/cmd/root.go b/cmd/allorad/cmd/root.go index fba8a310b..5265108ae 100644 --- a/cmd/allorad/cmd/root.go +++ b/cmd/allorad/cmd/root.go @@ -58,7 +58,7 @@ func NewRootCmd() *cobra.Command { panic(err) } - rootCmd := &cobra.Command{ + rootCmd := &cobra.Command{ // nolint: exhaustruct // dependency code don't want to change the way it works Use: "allorad", Short: "allorad - the Allora chain", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { @@ -136,15 +136,15 @@ func ProvideClientContext( txConfig client.TxConfig, legacyAmino *codec.LegacyAmino, ) client.Context { - clientCtx := client.Context{}. - WithCodec(appCodec). - WithInterfaceRegistry(interfaceRegistry). - WithTxConfig(txConfig). - WithLegacyAmino(legacyAmino). - WithInput(os.Stdin). - WithAccountRetriever(types.AccountRetriever{}). - WithHomeDir(app.DefaultNodeHome). - WithViper("ALLORA") // env variable prefix + clientCtx := client.Context{}. // nolint: exhaustruct // dependency code don't want to change the way it works + WithCodec(appCodec). + WithInterfaceRegistry(interfaceRegistry). + WithTxConfig(txConfig). + WithLegacyAmino(legacyAmino). + WithInput(os.Stdin). + WithAccountRetriever(types.AccountRetriever{}). + WithHomeDir(app.DefaultNodeHome). + WithViper("ALLORA") // env variable prefix // Read the config again to overwrite the default values with the values from the config file clientCtx, _ = config.ReadFromClientConfig(clientCtx) diff --git a/linter/maprange.go b/linter/maprange.go index ba4cf9e5a..c1ce1a73f 100644 --- a/linter/maprange.go +++ b/linter/maprange.go @@ -1,6 +1,7 @@ package main import ( + "flag" "go/ast" "go/types" @@ -12,9 +13,15 @@ var AnalyzerPlugin = map[string]*analysis.Analyzer{ } var Analyzer = &analysis.Analyzer{ - Name: "maprange", - Doc: "check for range loops over maps", - Run: run, + Name: "maprange", + Doc: "check for range loops over maps", + Run: run, + URL: "", + Flags: flag.FlagSet{Usage: nil}, + RunDespiteErrors: false, + Requires: nil, + ResultType: nil, + FactTypes: nil, } func New(conf any) ([]*analysis.Analyzer, error) { diff --git a/math/dec.go b/math/dec.go index f5581421b..955b8e47e 100644 --- a/math/dec.go +++ b/math/dec.go @@ -67,11 +67,20 @@ var dec128Context = apd.Context{ MaxExponent: apd.MaxExponent, MinExponent: apd.MinExponent, Traps: apd.DefaultTraps, + Rounding: apd.RoundDown, } // create a new Dec that represents NaN func NewNaN() Dec { - return Dec{apd.Decimal{}, true} + return Dec{ + apd.Decimal{ + Form: apd.Finite, + Negative: false, + Exponent: 0, + Coeff: *apd.NewBigInt(0), + }, + true, + } } // NewDecFromString returns a new Dec from a given string. It returns an error if the string @@ -754,7 +763,7 @@ func (x Dec) NumDecimalPlaces() uint32 { // Reduce returns a copy of x with all trailing zeros removed and the number // of trailing zeros removed. func (x Dec) Reduce() (Dec, int) { - y := Dec{} + y := ZeroDec() _, n := y.dec.Reduce(&x.dec) return y, n } diff --git a/test/common/client.go b/test/common/client.go index 58c304ab7..f28681cc0 100644 --- a/test/common/client.go +++ b/test/common/client.go @@ -58,25 +58,21 @@ func NewClient( seed int64, ) Client { t.Helper() - client := Client{} ctx := context.Background() - client.RpcConnectionType = rpcConnectionType - client.Clients = make([]cosmosclient.Client, len(nodeRpcAddresses)) - client.QueryAuths = make([]authtypes.QueryClient, len(nodeRpcAddresses)) - client.QueryBanks = make([]banktypes.QueryClient, len(nodeRpcAddresses)) - client.QueryDistributions = make([]distributiontypes.QueryClient, len(nodeRpcAddresses)) - client.QueryEmissionses = make([]emissionstypes.QueryServiceClient, len(nodeRpcAddresses)) - client.QueryMints = make([]minttypes.QueryClient, len(nodeRpcAddresses)) - client.QueryGovs = make([]govtypesv1.QueryClient, len(nodeRpcAddresses)) - client.QueryUpgrades = make([]upgradetypes.QueryClient, len(nodeRpcAddresses)) - client.RpcCounterMutex = &sync.Mutex{} - client.accountRegistryMutex = &sync.Mutex{} - client.RpcCounterSeed = 0 + + clients := make([]cosmosclient.Client, len(nodeRpcAddresses)) + queryAuths := make([]authtypes.QueryClient, len(nodeRpcAddresses)) + queryBanks := make([]banktypes.QueryClient, len(nodeRpcAddresses)) + queryDistributions := make([]distributiontypes.QueryClient, len(nodeRpcAddresses)) + queryEmissionses := make([]emissionstypes.QueryServiceClient, len(nodeRpcAddresses)) + queryMints := make([]minttypes.QueryClient, len(nodeRpcAddresses)) + queryGovs := make([]govtypesv1.QueryClient, len(nodeRpcAddresses)) + queryUpgrades := make([]upgradetypes.QueryClient, len(nodeRpcAddresses)) + + rpcCounterSeed := int64(0) if rpcConnectionType == RandomBasedOnDeterministicSeed { - client.RpcCounterSeed = seed + rpcCounterSeed = seed } - client.Rand = rand.New(rand.NewSource(seed)) //nolint:gosec // G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) - for i, rpcAddress := range nodeRpcAddresses { cosmosClient, err := cosmosclient.New( ctx, @@ -89,27 +85,42 @@ func NewClient( require.NoError(t, err) ccCtx := cosmosClient.Context() - client.Clients[i] = cosmosClient - client.QueryAuths[i] = authtypes.NewQueryClient(ccCtx) - client.QueryBanks[i] = banktypes.NewQueryClient(ccCtx) - client.QueryDistributions[i] = distributiontypes.NewQueryClient(ccCtx) - client.QueryEmissionses[i] = emissionstypes.NewQueryServiceClient(ccCtx) - client.QueryMints[i] = minttypes.NewQueryClient(ccCtx) - client.QueryGovs[i] = govtypesv1.NewQueryClient(ccCtx) - client.QueryUpgrades[i] = upgradetypes.NewQueryClient(ccCtx) + clients[i] = cosmosClient + queryAuths[i] = authtypes.NewQueryClient(ccCtx) + queryBanks[i] = banktypes.NewQueryClient(ccCtx) + queryDistributions[i] = distributiontypes.NewQueryClient(ccCtx) + queryEmissionses[i] = emissionstypes.NewQueryServiceClient(ccCtx) + queryMints[i] = minttypes.NewQueryClient(ccCtx) + queryGovs[i] = govtypesv1.NewQueryClient(ccCtx) + queryUpgrades[i] = upgradetypes.NewQueryClient(ccCtx) // this is terrible, no isConnected as part of this code path require.NotEqual(t, "", ccCtx.ChainID) } - var err error - client.accountRegistry, err = cosmosaccount.New( + accountRegistry, err := cosmosaccount.New( cosmosaccount.WithKeyringServiceName(sdktypes.KeyringServiceName()), cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), cosmosaccount.WithHome(alloraHomeDir), ) require.NoError(t, err) - return client + + return Client{ + RpcConnectionType: rpcConnectionType, + Clients: clients, + QueryAuths: queryAuths, + QueryBanks: queryBanks, + QueryDistributions: queryDistributions, + QueryEmissionses: queryEmissionses, + QueryMints: queryMints, + QueryGovs: queryGovs, + QueryUpgrades: queryUpgrades, + RpcCounterMutex: &sync.Mutex{}, + RpcCounterSeed: rpcCounterSeed, + accountRegistry: accountRegistry, + accountRegistryMutex: &sync.Mutex{}, + Rand: rand.New(rand.NewSource(seed)), //nolint:gosec // G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) + } } func (c *Client) getNextClientNumber() int64 { diff --git a/test/common/node_config.go b/test/common/node_config.go index e70f2abbd..57528a99f 100644 --- a/test/common/node_config.go +++ b/test/common/node_config.go @@ -49,11 +49,7 @@ func NewTestConfig( seed int, ) TestConfig { t.Helper() - nodeConfig := TestConfig{} var err error - nodeConfig.T = t - nodeConfig.AlloraHomeDir = alloraHomeDir - nodeConfig.Seed = seed if rpcConnectionType == SingleRpc { require.Len(t, nodeRpcAddresses, 1, "must have exactly one rpc address") } else { // RoundRobin or RandomBasedOnDeterministicSeed @@ -66,47 +62,65 @@ func NewTestConfig( alloraHomeDir, int64(seed), ) - nodeConfig.Client = client //// restore from mnemonic - nodeConfig.FaucetAcc, err = client.Clients[0].AccountRegistry.GetByName("faucet") + faucetAcc, err := client.Clients[0].AccountRegistry.GetByName("faucet") require.NoError(t, err) - nodeConfig.UpshotAcc, err = client.Clients[0].AccountRegistry.GetByName("upshot") + upshotAcc, err := client.Clients[0].AccountRegistry.GetByName("upshot") require.NoError(t, err) - nodeConfig.AliceAcc, err = client.Clients[0].AccountRegistry.GetByName("faucet") + aliceAcc, err := client.Clients[0].AccountRegistry.GetByName("faucet") require.NoError(t, err) - nodeConfig.BobAcc, err = client.Clients[0].AccountRegistry.GetByName("upshot") + bobAcc, err := client.Clients[0].AccountRegistry.GetByName("upshot") require.NoError(t, err) - nodeConfig.Validator0Acc, err = client.Clients[0].AccountRegistry.GetByName("validator0") + validator0Acc, err := client.Clients[0].AccountRegistry.GetByName("validator0") require.NoError(t, err) - nodeConfig.Validator1Acc, err = client.Clients[0].AccountRegistry.GetByName("validator1") + validator1Acc, err := client.Clients[0].AccountRegistry.GetByName("validator1") require.NoError(t, err) - nodeConfig.Validator2Acc, err = client.Clients[0].AccountRegistry.GetByName("validator2") + validator2Acc, err := client.Clients[0].AccountRegistry.GetByName("validator2") require.NoError(t, err) - nodeConfig.FaucetAddr, err = nodeConfig.FaucetAcc.Address(params.HumanCoinUnit) + faucetAddr, err := faucetAcc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.UpshotAddr, err = nodeConfig.UpshotAcc.Address(params.HumanCoinUnit) + upshotAddr, err := upshotAcc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.AliceAddr, err = nodeConfig.AliceAcc.Address(params.HumanCoinUnit) + aliceAddr, err := aliceAcc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.BobAddr, err = nodeConfig.BobAcc.Address(params.HumanCoinUnit) + bobAddr, err := bobAcc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.Validator0Addr, err = nodeConfig.Validator0Acc.Address(params.HumanCoinUnit) + validator0Addr, err := validator0Acc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.Validator1Addr, err = nodeConfig.Validator1Acc.Address(params.HumanCoinUnit) + validator1Addr, err := validator1Acc.Address(params.HumanCoinUnit) require.NoError(t, err) - nodeConfig.Validator2Addr, err = nodeConfig.Validator2Acc.Address(params.HumanCoinUnit) + validator2Addr, err := validator2Acc.Address(params.HumanCoinUnit) require.NoError(t, err) encCfg := moduletestutil.MakeTestEncodingConfig( - mint.AppModuleBasic{}, - emissions.AppModule{}, - auth.AppModule{}, - bank.AppModule{}, - distribution.AppModule{}, - gov.AppModule{}, - upgrade.AppModule{}, + mint.AppModuleBasic{}, //nolint:exhaustruct + emissions.AppModule{}, //nolint:exhaustruct + auth.AppModule{}, //nolint:exhaustruct + bank.AppModule{}, //nolint:exhaustruct + distribution.AppModule{}, //nolint:exhaustruct + gov.AppModule{}, //nolint:exhaustruct + upgrade.AppModule{}, //nolint:exhaustruct ) - nodeConfig.Cdc = codec.NewProtoCodec(encCfg.InterfaceRegistry) - return nodeConfig + return TestConfig{ + T: t, + AlloraHomeDir: alloraHomeDir, + Seed: seed, + Client: client, + Cdc: codec.NewProtoCodec(encCfg.InterfaceRegistry), + FaucetAcc: faucetAcc, + FaucetAddr: faucetAddr, + UpshotAcc: upshotAcc, + UpshotAddr: upshotAddr, + AliceAcc: aliceAcc, + AliceAddr: aliceAddr, + BobAcc: bobAcc, + BobAddr: bobAddr, + Validator0Acc: validator0Acc, + Validator0Addr: validator0Addr, + Validator1Acc: validator1Acc, + Validator1Addr: validator1Addr, + Validator2Acc: validator2Acc, + Validator2Addr: validator2Addr, + } } diff --git a/test/integration/create_topic_test.go b/test/integration/create_topic_test.go index a988d9957..abe28d2aa 100644 --- a/test/integration/create_topic_test.go +++ b/test/integration/create_topic_test.go @@ -39,7 +39,7 @@ func CreateTopic(m testCommon.TestConfig) (topicId uint64) { require.NoError(m.T, err) _, err = m.Client.WaitForTx(ctx, txResp.TxHash) require.NoError(m.T, err) - createTopicResponse := &emissionstypes.CreateNewTopicResponse{} + createTopicResponse := &emissionstypes.CreateNewTopicResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(createTopicResponse) require.NoError(m.T, err) topicId = createTopicResponse.TopicId diff --git a/test/integration/registration_test.go b/test/integration/registration_test.go index 13635a8d8..35645ffaa 100644 --- a/test/integration/registration_test.go +++ b/test/integration/registration_test.go @@ -21,7 +21,7 @@ func RegisterAliceAsReputerTopic1(m testCommon.TestConfig) { require.NoError(m.T, err) _, err = m.Client.WaitForTx(ctx, txResp.TxHash) require.NoError(m.T, err) - registerAliceResponse := &emissionstypes.RegisterResponse{} + registerAliceResponse := &emissionstypes.RegisterResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerAliceResponse) require.NoError(m.T, err) require.True(m.T, registerAliceResponse.Success) @@ -63,7 +63,7 @@ func RegisterBobAsWorkerTopic1(m testCommon.TestConfig) { require.NoError(m.T, err) _, err = m.Client.WaitForTx(ctx, txResp.TxHash) require.NoError(m.T, err) - registerBobResponse := &emissionstypes.RegisterResponse{} + registerBobResponse := &emissionstypes.RegisterResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerBobResponse) require.NoError(m.T, err) require.True(m.T, registerBobResponse.Success) diff --git a/test/integration/update_params_test.go b/test/integration/update_params_test.go index 5e8aed164..092deccb2 100644 --- a/test/integration/update_params_test.go +++ b/test/integration/update_params_test.go @@ -44,6 +44,45 @@ func UpdateParamsChecks(m testCommon.TestConfig) { // These are set for subsequent tests MaxTopReputersToReward: []uint64{24}, MinEpochLength: []int64{1}, + // don't update the following fields + Version: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxElementsPerForecast: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, }, } txResp, err := m.Client.BroadcastTx(ctx, m.AliceAcc, updateParamRequest) @@ -57,6 +96,47 @@ func UpdateParamsChecks(m testCommon.TestConfig) { Sender: m.BobAddr, Params: &emissionstypes.OptionalParams{ EpsilonReputer: input, + // don't update the following fields + Version: nil, + MaxTopReputersToReward: nil, + MinEpochLength: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxElementsPerForecast: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, }, } _, err = m.Client.BroadcastTx(ctx, m.BobAcc, updateParamRequest) @@ -74,6 +154,47 @@ func UpdateParamsChecks(m testCommon.TestConfig) { Sender: m.AliceAddr, Params: &emissionstypes.OptionalParams{ EpsilonReputer: input, + // don't update the following fields + Version: nil, + MaxTopReputersToReward: nil, + MinEpochLength: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxElementsPerForecast: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, }, } txResp, err = m.Client.BroadcastTx(ctx, m.AliceAcc, updateParamRequest) diff --git a/test/integration/upgrade_test.go b/test/integration/upgrade_test.go index 4ab7ed280..ef3d7b892 100644 --- a/test/integration/upgrade_test.go +++ b/test/integration/upgrade_test.go @@ -18,7 +18,9 @@ import ( // get the amount of coins required to deposit for a proposal func getDepositRequired(m testCommon.TestConfig) sdktypes.Coin { ctx := context.Background() - queryGovParamsResponse, err := m.Client.QueryGov().Params(ctx, &govtypesv1.QueryParamsRequest{}) + queryGovParamsResponse, err := m.Client.QueryGov().Params(ctx, &govtypesv1.QueryParamsRequest{ + ParamsType: "", + }) require.NoError(m.T, err) return queryGovParamsResponse.Params.ExpeditedMinDeposit[0] } @@ -39,6 +41,7 @@ func voteOnProposal(m testCommon.TestConfig, proposalId uint64) { ProposalId: proposalId, Voter: validator.addr, Option: govtypesv1.OptionYes, + Metadata: "", } txResp, err := m.Client.BroadcastTx(ctx, validator.acc, msgVote) require.NoError(m.T, err) @@ -64,9 +67,11 @@ func proposeUpgrade(m testCommon.TestConfig) (proposalId uint64, proposalHeight msgSoftwareUpgrade := &upgradetypes.MsgSoftwareUpgrade{ Authority: authtypes.NewModuleAddress("gov").String(), Plan: upgradetypes.Plan{ - Name: name, - Height: proposalHeight, - Info: "{}", + Name: name, + Height: proposalHeight, + Info: "{}", + Time: time.Time{}, + UpgradedClientState: nil, }, } msgSubmitProposal := &govtypesv1.MsgSubmitProposal{ @@ -80,6 +85,7 @@ func proposeUpgrade(m testCommon.TestConfig) (proposalId uint64, proposalHeight InitialDeposit: sdktypes.NewCoins( getDepositRequired(m), ), + Messages: nil, } err = msgSubmitProposal.SetMsgs([]sdktypes.Msg{msgSoftwareUpgrade}) require.NoError(m.T, err) @@ -87,7 +93,7 @@ func proposeUpgrade(m testCommon.TestConfig) (proposalId uint64, proposalHeight require.NoError(m.T, err) _, err = m.Client.WaitForTx(ctx, txResp.TxHash) require.NoError(m.T, err) - submitProposalMsgResponse := &govtypesv1.MsgSubmitProposalResponse{} + submitProposalMsgResponse := &govtypesv1.MsgSubmitProposalResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(submitProposalMsgResponse) require.NoError(m.T, err) require.NotNil(m.T, submitProposalMsgResponse.ProposalId) diff --git a/test/integration/worker_inference_and_forecast_test.go b/test/integration/worker_inference_and_forecast_test.go index 6a6327fad..af46a9fb1 100644 --- a/test/integration/worker_inference_and_forecast_test.go +++ b/test/integration/worker_inference_and_forecast_test.go @@ -47,6 +47,8 @@ func InsertSingleWorkerPayload(m testCommon.TestConfig, topic *types.Topic, bloc BlockHeight: blockHeight, Inferer: InfererAddress1, Value: alloraMath.NewDecFromInt64(100), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -58,8 +60,11 @@ func InsertSingleWorkerPayload(m testCommon.TestConfig, topic *types.Topic, bloc Value: alloraMath.NewDecFromInt64(100), }, }, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: nil, + Pubkey: "", }, } // Sign @@ -130,8 +135,12 @@ func InsertReputerBundle(m testCommon.TestConfig, topic *types.Topic, BlockHeigh } reputerValueBundle := &types.ValueBundle{ - TopicId: topicId, - Reputer: reputerAddr, + TopicId: topicId, + Reputer: reputerAddr, + ReputerRequestNonce: &types.ReputerRequestNonce{ + ReputerNonce: reputerNonce, + }, + ExtraData: nil, CombinedValue: alloraMath.NewDecFromInt64(100), InfererValues: []*types.WorkerAttributedValue{ { @@ -168,9 +177,7 @@ func InsertReputerBundle(m testCommon.TestConfig, topic *types.Topic, BlockHeigh Value: alloraMath.NewDecFromInt64(100), }, }, - ReputerRequestNonce: &types.ReputerRequestNonce{ - ReputerNonce: reputerNonce, - }, + OneOutInfererForecasterValues: nil, } // Sign diff --git a/test/invariant/actors_setup_test.go b/test/invariant/actors_setup_test.go index e2582f781..8803a5401 100644 --- a/test/invariant/actors_setup_test.go +++ b/test/invariant/actors_setup_test.go @@ -23,12 +23,12 @@ func createNewActor(m *testcommon.TestConfig, numActors int) Actor { actorAccount, err := m.Client.AccountRegistryGetByName(actorName) if err != nil { m.T.Log("Error getting actor account: ", actorName, " - ", err) - return Actor{} + return UnusedActor } actorAddress, err := actorAccount.Address(params.HumanCoinUnit) if err != nil { m.T.Log("Error creating actor address: ", actorName, " - ", err) - return Actor{} + return UnusedActor } return Actor{ name: actorName, @@ -37,13 +37,13 @@ func createNewActor(m *testcommon.TestConfig, numActors int) Actor { } } else { m.T.Log("Error creating actor address: ", actorName, " - ", err) - return Actor{} + return UnusedActor } } actorAddress, err := actorAccount.Address(params.HumanCoinUnit) if err != nil { m.T.Log("Error creating actor address: ", actorName, " - ", err) - return Actor{} + return UnusedActor } return Actor{ name: actorName, diff --git a/test/invariant/inferences_test.go b/test/invariant/inferences_test.go index 2697e79b1..b85b765fe 100644 --- a/test/invariant/inferences_test.go +++ b/test/invariant/inferences_test.go @@ -156,14 +156,19 @@ func createWorkerDataBundle( BlockHeight: blockHeight, Inferer: infererAddress, Value: infererValue, + ExtraData: nil, + Proof: "", }, Forecast: &emissionstypes.Forecast{ TopicId: topicId, BlockHeight: blockHeight, Forecaster: infererAddress, ForecastElements: forecastElements, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: nil, + Pubkey: "", } // Sign @@ -258,6 +263,7 @@ func createReputerValueBundle( return emissionstypes.ValueBundle{ TopicId: topicId, Reputer: reputer.addr, + ExtraData: nil, CombinedValue: alloraMath.NewDecFromInt64(100), InfererValues: generateWorkerAttributedValueLosses(m, workers, 3000, 3500), ForecasterValues: generateWorkerAttributedValueLosses(m, workers, 50, 50), @@ -268,6 +274,7 @@ func createReputerValueBundle( ReputerRequestNonce: &emissionstypes.ReputerRequestNonce{ ReputerNonce: reputerNonce, }, + OneOutInfererForecasterValues: nil, } } diff --git a/test/invariant/invariant_test.go b/test/invariant/invariant_test.go index 714ed5899..15aaac38e 100644 --- a/test/invariant/invariant_test.go +++ b/test/invariant/invariant_test.go @@ -120,9 +120,24 @@ func simulateSetUp( m.T.Fatal(err) } data := SimulationData{ - epochLength: int64(epochLength), - actors: actorsList, - counts: StateTransitionCounts{}, + epochLength: int64(epochLength), + actors: actorsList, + counts: StateTransitionCounts{ + createTopic: 0, + fundTopic: 0, + registerWorker: 0, + registerReputer: 0, + unregisterWorker: 0, + unregisterReputer: 0, + stakeAsReputer: 0, + delegateStake: 0, + unstakeAsReputer: 0, + undelegateStake: 0, + cancelStakeRemoval: 0, + cancelDelegateStakeRemoval: 0, + collectDelegatorRewards: 0, + doInferenceAndReputation: 0, + }, registeredWorkers: testcommon.NewRandomKeyMap[Registration, struct{}](m.Client.Rand), registeredReputers: testcommon.NewRandomKeyMap[Registration, struct{}](m.Client.Rand), reputerStakes: testcommon.NewRandomKeyMap[Registration, cosmossdk_io_math.Int]( @@ -172,26 +187,26 @@ func simulateManual( amount := cosmossdk_io_math.NewInt(1e10) // create topic - createTopic(m, faucet, Actor{}, nil, 0, data, 0) + createTopic(m, faucet, UnusedActor, nil, 0, data, 0) // register reputer - registerReputer(m, reputer, Actor{}, nil, 1, data, 1) + registerReputer(m, reputer, UnusedActor, nil, 1, data, 1) // delegate from delegator on reputer delegateStake(m, delegator, reputer, &amount, 1, data, 2) // fund the topic from delegator - fundTopic(m, delegator, Actor{}, &amount, 1, data, 5) + fundTopic(m, delegator, UnusedActor, &amount, 1, data, 5) // register worker - registerWorker(m, worker, Actor{}, nil, 1, data, 6) + registerWorker(m, worker, UnusedActor, nil, 1, data, 6) // now nobody has stake, is the topic active? // make sure an ABCI endblock has passed collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 7) - doInferenceAndReputation(m, Actor{}, Actor{}, nil, 1, data, 8) + doInferenceAndReputation(m, UnusedActor, UnusedActor, nil, 1, data, 8) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 9) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 10) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 11) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 12) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 13) collectDelegatorRewards(m, delegator, reputer, nil, 1, data, 14) - doInferenceAndReputation(m, Actor{}, Actor{}, nil, 1, data, 15) + doInferenceAndReputation(m, UnusedActor, UnusedActor, nil, 1, data, 15) amount2 := amount.QuoRaw(2) undelegateStake(m, delegator, reputer, &amount2, 1, data, 16) m.T.Log("Done.") @@ -239,19 +254,19 @@ func pickAutoSetupTopicId(i int) uint64 { // all with some stake, then fund the two topics // and run inferences on both. func simulateAutomaticInitialState(m *testcommon.TestConfig, faucet Actor, data *SimulationData) { - createTopic(m, faucet, Actor{}, nil, 0, data, 0) - createTopic(m, faucet, Actor{}, nil, 0, data, 1) + createTopic(m, faucet, UnusedActor, nil, 0, data, 0) + createTopic(m, faucet, UnusedActor, nil, 0, data, 1) startReputers, startWorkers, startDelegators := pickAutoSetupActors(m, data) for i, reputer := range startReputers { topicId := pickAutoSetupTopicId(i) - registerReputer(m, reputer, Actor{}, nil, topicId, data, i*2+2) + registerReputer(m, reputer, UnusedActor, nil, topicId, data, i*2+2) bal, err := pickRandomBalanceLessThanHalf(m, reputer) requireNoError(m.T, true, err) - stakeAsReputer(m, reputer, Actor{}, &bal, topicId, data, (i*2+1)+2) + stakeAsReputer(m, reputer, UnusedActor, &bal, topicId, data, (i*2+1)+2) } for i, worker := range startWorkers { topicId := pickAutoSetupTopicId(i) - registerWorker(m, worker, Actor{}, nil, topicId, data, 10+i) + registerWorker(m, worker, UnusedActor, nil, topicId, data, 10+i) } for i, delegator := range startDelegators { topicId := pickAutoSetupTopicId(i) @@ -261,12 +276,12 @@ func simulateAutomaticInitialState(m *testcommon.TestConfig, faucet Actor, data } fundAmount, err := pickRandomBalanceLessThanHalf(m, faucet) requireNoError(m.T, true, err) - fundTopic(m, faucet, Actor{}, &fundAmount, 1, data, 16) + fundTopic(m, faucet, UnusedActor, &fundAmount, 1, data, 16) fundAmount, err = pickRandomBalanceLessThanHalf(m, faucet) requireNoError(m.T, true, err) - fundTopic(m, faucet, Actor{}, &fundAmount, 2, data, 17) - doInferenceAndReputation(m, Actor{}, Actor{}, nil, 1, data, 18) - doInferenceAndReputation(m, Actor{}, Actor{}, nil, 2, data, 19) + fundTopic(m, faucet, UnusedActor, &fundAmount, 2, data, 17) + doInferenceAndReputation(m, UnusedActor, UnusedActor, nil, 1, data, 18) + doInferenceAndReputation(m, UnusedActor, UnusedActor, nil, 2, data, 19) } // this is the body of the "normal" simulation mode diff --git a/test/invariant/invariants.patch b/test/invariant/invariants.patch index b5bbb933e..dac742377 100644 --- a/test/invariant/invariants.patch +++ b/test/invariant/invariants.patch @@ -1,5 +1,5 @@ diff --git a/x/emissions/module/abci.go b/x/emissions/module/abci.go -index d775365..69b81e1 100644 +index 65270d4a..2e68ab82 100644 --- a/x/emissions/module/abci.go +++ b/x/emissions/module/abci.go @@ -6,6 +6,7 @@ import ( @@ -22,10 +22,10 @@ index d775365..69b81e1 100644 sdkCtx.Logger().Debug( fmt.Sprintf("\n ---------------- Emissions EndBlock %d ------------------- \n", diff --git a/x/emissions/module/module.go b/x/emissions/module/module.go -index 35906b64..16d5dee4 100644 +index bbe013e2..1e63e08c 100644 --- a/x/emissions/module/module.go +++ b/x/emissions/module/module.go -@@ -19,6 +19,15 @@ import ( +@@ -21,6 +21,15 @@ import ( gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" ) @@ -39,5 +39,5 @@ index 35906b64..16d5dee4 100644 +} + var ( - _ module.AppModuleBasic = AppModule{} - _ module.HasGenesis = AppModule{} + _ module.AppModuleBasic = AppModule{} // nolint: exhaustruct + _ module.HasGenesis = AppModule{} // nolint: exhaustruct diff --git a/test/invariant/registration_test.go b/test/invariant/registration_test.go index e7e0bd77e..45277aba1 100644 --- a/test/invariant/registration_test.go +++ b/test/invariant/registration_test.go @@ -49,7 +49,7 @@ func registerWorker( requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) - registerWorkerResponse := &emissionstypes.RegisterResponse{} + registerWorkerResponse := &emissionstypes.RegisterResponse{} // nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerWorkerResponse) requireNoError(m.T, data.failOnErr, err) if data.failOnErr { @@ -95,7 +95,7 @@ func unregisterWorker( requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) - removeRegistrationResponse := &emissionstypes.RemoveRegistrationResponse{} + removeRegistrationResponse := &emissionstypes.RemoveRegistrationResponse{} // nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(removeRegistrationResponse) requireNoError(m.T, data.failOnErr, err) if data.failOnErr { @@ -142,7 +142,7 @@ func registerReputer( requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) - registerWorkerResponse := &emissionstypes.RegisterResponse{} + registerWorkerResponse := &emissionstypes.RegisterResponse{} // nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerWorkerResponse) requireNoError(m.T, data.failOnErr, err) if data.failOnErr { @@ -188,7 +188,7 @@ func unregisterReputer( requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) - removeRegistrationResponseMsg := &emissionstypes.RemoveRegistrationResponse{} + removeRegistrationResponseMsg := &emissionstypes.RemoveRegistrationResponse{} // nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(removeRegistrationResponseMsg) requireNoError(m.T, data.failOnErr, err) if data.failOnErr { diff --git a/test/invariant/simulation_data_test.go b/test/invariant/simulation_data_test.go index bd7f453d2..620e79d75 100644 --- a/test/invariant/simulation_data_test.go +++ b/test/invariant/simulation_data_test.go @@ -8,6 +8,7 @@ import ( cosmossdk_io_math "cosmossdk.io/math" testcommon "github.com/allora-network/allora-chain/test/common" + "github.com/ignite/cli/v28/ignite/pkg/cosmosaccount" ) // SimulationData stores the active set of states we think we're in @@ -381,7 +382,11 @@ func (s *SimulationData) getActorFromAddr(addr string) (Actor, bool) { return actor, true } } - return Actor{}, false + return Actor{ + name: "", + addr: "", + acc: cosmosaccount.Account{Name: "", Record: nil}, + }, false } // randomly flip the fail on err case to decide whether to be aggressive and fuzzy or diff --git a/test/invariant/stake_test.go b/test/invariant/stake_test.go index 5b14ce354..0986f5e6a 100644 --- a/test/invariant/stake_test.go +++ b/test/invariant/stake_test.go @@ -173,7 +173,13 @@ func findFirstValidStakeRemovalFromChain(m *testcommon.TestConfig) (emissionstyp } return *resp.Removals[0], true, nil } - return emissionstypes.StakeRemovalInfo{}, false, nil + return emissionstypes.StakeRemovalInfo{ + BlockRemovalStarted: 0, + TopicId: 0, + BlockRemovalCompleted: 0, + Reputer: "", + Amount: cosmossdk_io_math.Int{}, + }, false, nil // no stake removal was found } func cancelStakeRemoval( @@ -387,7 +393,14 @@ func findFirstValidDelegateStakeRemovalFromChain(m *testcommon.TestConfig) (emis } return *resp.Removals[0], true, nil } - return emissionstypes.DelegateStakeRemovalInfo{}, false, nil + return emissionstypes.DelegateStakeRemovalInfo{ + BlockRemovalStarted: 0, + TopicId: 0, + BlockRemovalCompleted: 0, + Reputer: "", + Delegator: "", + Amount: cosmossdk_io_math.Int{}, + }, false, nil // no delegate stake removal was found } func cancelDelegateStakeRemoval( diff --git a/test/invariant/topics_test.go b/test/invariant/topics_test.go index 6d5f5fae0..9c2c00e39 100644 --- a/test/invariant/topics_test.go +++ b/test/invariant/topics_test.go @@ -52,7 +52,7 @@ func createTopic( requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) - createTopicResponse := &emissionstypes.CreateNewTopicResponse{} + createTopicResponse := &emissionstypes.CreateNewTopicResponse{} // nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(createTopicResponse) requireNoError(m.T, data.failOnErr, err) wasErr = orErr(wasErr, err) diff --git a/test/invariant/transitions_test.go b/test/invariant/transitions_test.go index 62a105d78..e90b81973 100644 --- a/test/invariant/transitions_test.go +++ b/test/invariant/transitions_test.go @@ -8,6 +8,8 @@ import ( testcommon "github.com/allora-network/allora-chain/test/common" ) +var UnusedActor Actor = Actor{} // nolint:exhaustruct + // Every function responsible for doing a state transition // should adhere to this function signature type StateTransitionFunc func( @@ -214,27 +216,27 @@ func pickActorAndTopicIdForStateTransition( case "unregisterWorker": worker, topicId, err := data.pickRandomRegisteredWorker() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } - return true, worker, Actor{}, nil, topicId + return true, worker, UnusedActor, nil, topicId case "unregisterReputer": reputer, topicId, err := data.pickRandomRegisteredReputer() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } - return true, reputer, Actor{}, nil, topicId + return true, reputer, UnusedActor, nil, topicId case "stakeAsReputer": reputer, topicId, err := data.pickRandomRegisteredReputer() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } amount, err := pickRandomBalanceLessThanHalf(m, reputer) // if err amount=zero which is a valid transition requireNoError(m.T, data.failOnErr, err) - return true, reputer, Actor{}, &amount, topicId + return true, reputer, UnusedActor, &amount, topicId case "delegateStake": reputer, topicId, err := data.pickRandomRegisteredReputer() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } delegator := pickRandomActorExcept(m, data, []Actor{reputer}) amount, err := pickRandomBalanceLessThanHalf(m, delegator) @@ -243,52 +245,52 @@ func pickActorAndTopicIdForStateTransition( case "unstakeAsReputer": reputer, topicId, err := data.pickRandomStakedReputer() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } amount := data.pickPercentOfStakeByReputer(m.Client.Rand, topicId, reputer) - return true, reputer, Actor{}, &amount, topicId + return true, reputer, UnusedActor, &amount, topicId case "undelegateStake": delegator, reputer, topicId, err := data.pickRandomStakedDelegator() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } amount := data.pickPercentOfStakeByDelegator(m.Client.Rand, topicId, delegator, reputer) return true, delegator, reputer, &amount, topicId case "collectDelegatorRewards": delegator, reputer, topicId, err := data.pickRandomStakedDelegator() if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } return true, delegator, reputer, nil, topicId case "cancelStakeRemoval": stakeRemoval, found, err := findFirstValidStakeRemovalFromChain(m) if err != nil || !found { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } reputer, found := data.getActorFromAddr(stakeRemoval.Reputer) if !found { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } - return true, reputer, Actor{}, &stakeRemoval.Amount, stakeRemoval.TopicId + return true, reputer, UnusedActor, &stakeRemoval.Amount, stakeRemoval.TopicId case "cancelDelegateStakeRemoval": stakeRemoval, found, err := findFirstValidDelegateStakeRemovalFromChain(m) if err != nil || !found { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } delegator, found := data.getActorFromAddr(stakeRemoval.Delegator) if !found { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } reputer, found := data.getActorFromAddr(stakeRemoval.Reputer) if !found { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } return true, delegator, reputer, &stakeRemoval.Amount, stakeRemoval.TopicId case "doInferenceAndReputation": ctx := context.Background() blockHeightNow, err := m.Client.BlockHeight(ctx) if err != nil { - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 } topics := findActiveTopicsAtThisBlock(m, data, blockHeightNow) if len(topics) > 0 { @@ -306,7 +308,7 @@ func pickActorAndTopicIdForStateTransition( return true, worker, reputer, nil, topicId } } - return false, Actor{}, Actor{}, nil, 0 + return false, UnusedActor, UnusedActor, nil, 0 default: return pickFullRandomValues(m, data) } diff --git a/test/stress/create_topic_test.go b/test/stress/create_topic_test.go index b79de8a1f..23472806f 100644 --- a/test/stress/create_topic_test.go +++ b/test/stress/create_topic_test.go @@ -40,7 +40,7 @@ func createTopic( _, err = m.Client.WaitForTx(ctx, txResp.TxHash) require.NoError(m.T, err) - createTopicResponse := &emissionstypes.CreateNewTopicResponse{} + createTopicResponse := &emissionstypes.CreateNewTopicResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(createTopicResponse) require.NoError(m.T, err) diff --git a/test/stress/getters_helpers_test.go b/test/stress/getters_helpers_test.go index a683e99af..1600cea7d 100644 --- a/test/stress/getters_helpers_test.go +++ b/test/stress/getters_helpers_test.go @@ -87,8 +87,15 @@ func getAccountBalance( address string, ) (*sdktypes.Coin, error) { req := &banktypes.QueryAllBalancesRequest{ - Address: address, - Pagination: &query.PageRequest{Limit: 1}, + Address: address, + Pagination: &query.PageRequest{ + Limit: 1, + Key: nil, + Offset: 0, + CountTotal: false, + Reverse: false, + }, + ResolveDenom: false, } res, err := queryClient.AllBalances(ctx, req) diff --git a/test/stress/registration_test.go b/test/stress/registration_test.go index 17b70016e..685db4544 100644 --- a/test/stress/registration_test.go +++ b/test/stress/registration_test.go @@ -29,7 +29,7 @@ func RegisterReputerForTopic( if err != nil { return err } - registerAliceResponse := &emissionstypes.RegisterResponse{} + registerAliceResponse := &emissionstypes.RegisterResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerAliceResponse) if err != nil { return err @@ -59,7 +59,7 @@ func RegisterWorkerForTopic( if err != nil { return err } - registerBobResponse := &emissionstypes.RegisterResponse{} + registerBobResponse := &emissionstypes.RegisterResponse{} //nolint:exhaustruct // the fields are populated by decode err = txResp.Decode(registerBobResponse) if err != nil { return err diff --git a/test/stress/reputers_test.go b/test/stress/reputers_test.go index ea6f16320..a3a6a0b83 100644 --- a/test/stress/reputers_test.go +++ b/test/stress/reputers_test.go @@ -197,17 +197,20 @@ func generateValueBundle( reputerNonce *emissionstypes.Nonce, ) emissionstypes.ValueBundle { return emissionstypes.ValueBundle{ - TopicId: topicId, - CombinedValue: alloraMath.NewDecFromInt64(100), - InfererValues: generateWorkerAttributedValueLosses(workerAddresses, 3000, 3500), - ForecasterValues: generateWorkerAttributedValueLosses(workerAddresses, 50, 50), - NaiveValue: alloraMath.NewDecFromInt64(100), - OneOutInfererValues: generateWithheldWorkerAttributedValueLosses(workerAddresses, 50, 50), - OneOutForecasterValues: generateWithheldWorkerAttributedValueLosses(workerAddresses, 50, 50), - OneInForecasterValues: generateWorkerAttributedValueLosses(workerAddresses, 50, 50), + TopicId: topicId, ReputerRequestNonce: &emissionstypes.ReputerRequestNonce{ ReputerNonce: reputerNonce, }, + Reputer: "", + ExtraData: nil, + CombinedValue: alloraMath.NewDecFromInt64(100), + InfererValues: generateWorkerAttributedValueLosses(workerAddresses, 3000, 3500), + ForecasterValues: generateWorkerAttributedValueLosses(workerAddresses, 50, 50), + NaiveValue: alloraMath.NewDecFromInt64(100), + OneOutInfererValues: generateWithheldWorkerAttributedValueLosses(workerAddresses, 50, 50), + OneOutForecasterValues: generateWithheldWorkerAttributedValueLosses(workerAddresses, 50, 50), + OneInForecasterValues: generateWorkerAttributedValueLosses(workerAddresses, 50, 50), + OneOutInfererForecasterValues: nil, } } diff --git a/test/stress/workers_test.go b/test/stress/workers_test.go index aea179572..d1726e1a5 100644 --- a/test/stress/workers_test.go +++ b/test/stress/workers_test.go @@ -183,21 +183,28 @@ func generateSingleWorkerBundle( // Create a InsertReputerPayloadRequest message workerDataBundle := &emissionstypes.WorkerDataBundle{ - Worker: infererAddress, + Worker: infererAddress, + Nonce: &emissionstypes.Nonce{BlockHeight: blockHeight}, + TopicId: topicId, InferenceForecastsBundle: &emissionstypes.InferenceForecastBundle{ Inference: &emissionstypes.Inference{ TopicId: topicId, BlockHeight: blockHeight, Inferer: infererAddress, Value: infererValue, + ExtraData: nil, + Proof: "", }, Forecast: &emissionstypes.Forecast{ TopicId: topicId, BlockHeight: blockHeight, Forecaster: infererAddress, ForecastElements: forecastElements, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: []byte{}, + Pubkey: "", } // Sign diff --git a/x/emissions/api/emissions/v3/genesis.pulsar.go b/x/emissions/api/emissions/v3/genesis.pulsar.go index 420c5691c..3d7b8a0f7 100644 --- a/x/emissions/api/emissions/v3/genesis.pulsar.go +++ b/x/emissions/api/emissions/v3/genesis.pulsar.go @@ -824,7 +824,7 @@ func (x *_GenesisState_19_list) IsValid() bool { var _ protoreflect.List = (*_GenesisState_20_list)(nil) type _GenesisState_20_list struct { - list *[]*TopicIdActorIdDec + list *[]*TopicIdAndDec } func (x *_GenesisState_20_list) Len() int { @@ -840,18 +840,18 @@ func (x *_GenesisState_20_list) Get(i int) protoreflect.Value { func (x *_GenesisState_20_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TopicIdActorIdDec) + concreteValue := valueUnwrapped.Interface().(*TopicIdAndDec) (*x.list)[i] = concreteValue } func (x *_GenesisState_20_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TopicIdActorIdDec) + concreteValue := valueUnwrapped.Interface().(*TopicIdAndDec) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_20_list) AppendMutable() protoreflect.Value { - v := new(TopicIdActorIdDec) + v := new(TopicIdAndDec) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -864,7 +864,7 @@ func (x *_GenesisState_20_list) Truncate(n int) { } func (x *_GenesisState_20_list) NewElement() protoreflect.Value { - v := new(TopicIdActorIdDec) + v := new(TopicIdAndDec) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -4566,7 +4566,7 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p return protoreflect.ValueOfList(value) case "emissions.v3.GenesisState.previousForecasterScoreRatio": if x.PreviousForecasterScoreRatio == nil { - x.PreviousForecasterScoreRatio = []*TopicIdActorIdDec{} + x.PreviousForecasterScoreRatio = []*TopicIdAndDec{} } value := &_GenesisState_20_list{list: &x.PreviousForecasterScoreRatio} return protoreflect.ValueOfList(value) @@ -4889,7 +4889,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) list := []*TopicIdActorIdDec{} return protoreflect.ValueOfList(&_GenesisState_19_list{list: &list}) case "emissions.v3.GenesisState.previousForecasterScoreRatio": - list := []*TopicIdActorIdDec{} + list := []*TopicIdAndDec{} return protoreflect.ValueOfList(&_GenesisState_20_list{list: &list}) case "emissions.v3.GenesisState.totalStake": return protoreflect.ValueOfString("") @@ -7304,7 +7304,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.PreviousForecasterScoreRatio = append(x.PreviousForecasterScoreRatio, &TopicIdActorIdDec{}) + x.PreviousForecasterScoreRatio = append(x.PreviousForecasterScoreRatio, &TopicIdAndDec{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PreviousForecasterScoreRatio[len(x.PreviousForecasterScoreRatio)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } @@ -24722,8 +24722,8 @@ type GenesisState struct { PreviousInferenceRewardFraction []*TopicIdActorIdDec `protobuf:"bytes,18,rep,name=previousInferenceRewardFraction,proto3" json:"previousInferenceRewardFraction,omitempty"` // map of (topic, worker) -> previous reward for forecast (used for EMA) PreviousForecastRewardFraction []*TopicIdActorIdDec `protobuf:"bytes,19,rep,name=previousForecastRewardFraction,proto3" json:"previousForecastRewardFraction,omitempty"` - // map of (topic, forecaster) -> ratio of forecaster score - PreviousForecasterScoreRatio []*TopicIdActorIdDec `protobuf:"bytes,20,rep,name=previousForecasterScoreRatio,proto3" json:"previousForecasterScoreRatio,omitempty"` + // map of (topic) -> ratio of forecaster score + PreviousForecasterScoreRatio []*TopicIdAndDec `protobuf:"bytes,20,rep,name=previousForecasterScoreRatio,proto3" json:"previousForecasterScoreRatio,omitempty"` // total sum stake of all stakers on the network TotalStake string `protobuf:"bytes,21,opt,name=totalStake,proto3" json:"totalStake,omitempty"` // for every topic, how much total stake does that topic have accumulated? @@ -24972,7 +24972,7 @@ func (x *GenesisState) GetPreviousForecastRewardFraction() []*TopicIdActorIdDec return nil } -func (x *GenesisState) GetPreviousForecasterScoreRatio() []*TopicIdActorIdDec { +func (x *GenesisState) GetPreviousForecasterScoreRatio() []*TopicIdAndDec { if x != nil { return x.PreviousForecasterScoreRatio } @@ -26786,7 +26786,7 @@ var file_emissions_v3_genesis_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x2e, 0x0a, 0x0c, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x2e, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, @@ -26874,571 +26874,571 @@ var file_emissions_v3_genesis_proto_rawDesc = []byte{ 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x44, 0x65, 0x63, 0x52, 0x1e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x14, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, + 0x63, 0x52, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x46, 0x6f, 0x72, 0x65, 0x63, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, + 0x50, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, + 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x18, + 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x49, + 0x6e, 0x74, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x55, + 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x15, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, + 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, - 0x49, 0x64, 0x44, 0x65, 0x63, 0x52, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x46, - 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x61, - 0x74, 0x69, 0x6f, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x55, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, - 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x17, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, - 0x6e, 0x74, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x15, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x53, 0x75, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, - 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x53, 0x75, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x5c, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x12, 0x67, - 0x0a, 0x1e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x55, 0x70, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, - 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x1e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x46, 0x72, - 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x55, 0x70, 0x6f, 0x6e, - 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, - 0x65, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x44, 0x65, 0x63, 0x52, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, - 0x12, 0x6b, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, - 0x73, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, - 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x5b, 0x0a, - 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, - 0x41, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, - 0x49, 0x64, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x52, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x61, 0x6c, 0x73, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x8c, 0x01, 0x0a, 0x1c, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x1e, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x1c, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, - 0x6c, 0x73, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x74, 0x0a, 0x1c, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, - 0x6c, 0x73, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x1c, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x45, 0x0a, 0x0a, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x20, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x49, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x6d, 0x46, + 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x5c, 0x0a, 0x0f, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x18, + 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x1e, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x55, 0x70, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x1a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x49, 0x6e, 0x74, 0x52, 0x1e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x55, 0x70, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x75, + 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x18, 0x1b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x65, 0x63, 0x61, - 0x73, 0x74, 0x73, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6d, 0x69, 0x73, + 0x64, 0x44, 0x65, 0x63, 0x52, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x6b, 0x0a, 0x14, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x52, 0x65, 0x70, 0x75, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, + 0x6c, 0x73, 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x5b, 0x0a, 0x14, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x52, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, + 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x8c, 0x01, 0x0a, 0x1c, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, + 0x42, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, + 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x1c, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x74, 0x0a, 0x1c, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, + 0x41, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x1c, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x61, 0x6c, 0x73, 0x42, 0x79, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x69, + 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x18, + 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x52, 0x09, 0x66, 0x6f, 0x72, + 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x73, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, + 0x41, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x75, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, + 0x4b, 0x65, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x08, 0x72, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0f, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x46, 0x65, 0x65, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x18, + 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x49, + 0x6e, 0x74, 0x52, 0x0f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x46, 0x65, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x6e, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x52, 0x13, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x18, 0x26, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x52, - 0x09, 0x66, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x77, 0x6f, - 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x62, 0x50, 0x32, - 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x08, - 0x72, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, - 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x72, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x46, 0x65, 0x65, 0x52, 0x65, 0x76, 0x65, - 0x6e, 0x75, 0x65, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x63, + 0x61, 0x73, 0x74, 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x46, 0x6f, 0x72, 0x65, + 0x63, 0x61, 0x73, 0x74, 0x73, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, + 0x73, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x4c, 0x6f, 0x73, 0x73, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x70, + 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x4c, 0x6f, 0x73, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x12, 0x5c, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x73, 0x73, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x29, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x12, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x73, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x93, + 0x01, 0x0a, 0x28, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x28, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x70, 0x75, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x6e, 0x57, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x18, 0x37, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x75, 0x6e, 0x66, 0x75, + 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x46, 0x65, 0x65, - 0x52, 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, - 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x25, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, - 0x63, 0x52, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x26, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, - 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x46, - 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x46, 0x6f, - 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x4c, 0x6f, - 0x73, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x4c, 0x6f, 0x73, 0x73, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, - 0x6f, 0x73, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x29, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x12, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x73, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x28, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, - 0x6f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x2a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, - 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x28, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, - 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x6e, - 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x18, 0x37, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6e, - 0x64, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x6e, 0x57, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x12, 0x58, 0x0a, 0x17, - 0x75, 0x6e, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x65, - 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x17, 0x75, - 0x6e, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x18, 0x75, 0x6e, 0x66, 0x75, 0x6c, 0x66, - 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x73, 0x18, 0x2c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, - 0x6e, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x18, 0x75, 0x6e, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, - 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x49, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x44, 0x72, 0x69, 0x70, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x38, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0d, 0x6c, 0x61, - 0x73, 0x74, 0x44, 0x72, 0x69, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x6e, 0x0a, 0x1b, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1b, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x74, 0x0a, 0x1e, 0x6c, + 0x41, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x17, 0x75, 0x6e, 0x66, 0x75, 0x6c, + 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x68, 0x0a, 0x18, 0x75, 0x6e, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x2c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x73, 0x52, 0x18, 0x75, 0x6e, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, + 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0d, + 0x6c, 0x61, 0x73, 0x74, 0x44, 0x72, 0x69, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x38, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x44, 0x72, + 0x69, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x6e, 0x0a, 0x1b, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, + 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1b, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x74, 0x0a, 0x1e, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2e, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x1e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, - 0x73, 0x12, 0x85, 0x01, 0x0a, 0x23, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x49, - 0x6e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2f, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x23, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x49, - 0x6e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x78, 0x0a, 0x20, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x4e, 0x61, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x30, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x69, 0x76, 0x65, 0x49, 0x6e, - 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, - 0x65, 0x74, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x28, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, - 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, 0x72, - 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, - 0x18, 0x31, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, - 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x28, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, - 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x46, 0x6f, 0x72, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x85, 0x01, + 0x0a, 0x23, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, - 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, + 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x2f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, - 0x66, 0x65, 0x72, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x95, 0x01, - 0x0a, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x46, 0x6f, - 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x33, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, - 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, - 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x2e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x34, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, + 0x52, 0x23, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, + 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, + 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x78, 0x0a, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4e, + 0x61, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x20, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, + 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, + 0x8f, 0x01, 0x0a, 0x28, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, + 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x31, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, + 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x28, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, + 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, + 0x73, 0x12, 0x95, 0x01, 0x0a, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, + 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, + 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, + 0x72, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x2b, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x18, 0x33, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x33, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, + 0x75, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, + 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x2e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, + 0x75, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x65, + 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, + 0x72, 0x65, 0x74, 0x73, 0x18, 0x34, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x2e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, 0x74, 0x46, 0x6f, 0x72, + 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, 0x65, 0x74, 0x73, 0x12, + 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, + 0x72, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, + 0x60, 0x0a, 0x15, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x35, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x2e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x75, - 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x65, 0x63, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x67, 0x72, - 0x65, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x61, 0x6d, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x11, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x15, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x35, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x15, - 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x62, 0x0a, 0x16, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, - 0x73, 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, - 0x36, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x52, 0x16, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x70, 0x75, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x6f, 0x0a, 0x20, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x54, 0x6f, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, - 0x43, 0x68, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x39, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x20, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x54, - 0x6f, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x75, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x73, 0x18, 0x3a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x13, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, - 0x72, 0x0a, 0x1e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x4c, 0x6f, 0x77, 0x65, 0x73, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x3b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, - 0x61, 0x69, 0x72, 0x52, 0x1e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x4c, 0x6f, 0x77, 0x65, - 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x6f, 0x0a, 0x24, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x65, - 0x72, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x18, 0x3f, 0x20, 0x03, 0x28, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, + 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x12, 0x62, 0x0a, 0x16, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x36, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x16, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x6f, 0x0a, 0x20, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x6f, + 0x4e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x39, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x52, 0x20, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x6f, 0x4e, 0x65, 0x78, + 0x74, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x3a, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x72, 0x0a, 0x1e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x4c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x3b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x52, + 0x1e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x4c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x6f, 0x0a, 0x24, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x18, 0x3f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x52, 0x24, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, + 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, + 0x12, 0x75, 0x0a, 0x27, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x18, 0x40, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x52, 0x24, + 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x52, 0x27, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, - 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, - 0x65, 0x45, 0x6d, 0x61, 0x12, 0x75, 0x0a, 0x27, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, - 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x18, - 0x40, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x12, 0x6f, 0x0a, 0x24, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x18, + 0x41, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, - 0x65, 0x63, 0x52, 0x27, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x12, 0x6f, 0x0a, 0x24, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, - 0x74, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, - 0x45, 0x6d, 0x61, 0x18, 0x41, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x52, 0x24, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, - 0x75, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x4a, 0x04, 0x08, 0x0d, - 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x52, 0x1b, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x73, 0x42, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x1e, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x73, 0x42, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x1c, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, - 0x42, 0x79, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x22, 0x56, 0x0a, 0x0f, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x22, 0x45, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x41, 0x6e, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x15, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x56, 0x0a, - 0x16, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6e, 0x64, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x08, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x18, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x6f, 0x72, - 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, - 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, - 0x6f, 0x72, 0x65, 0x73, 0x52, 0x06, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x13, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x53, 0x63, - 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x05, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x22, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x56, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, - 0x63, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x52, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, - 0x63, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, - 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x44, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, - 0x49, 0x0a, 0x03, 0x44, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x03, 0x44, 0x65, 0x63, 0x22, 0x6d, 0x0a, 0x0d, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, - 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x49, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x12, + 0x65, 0x63, 0x52, 0x24, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x4a, 0x04, + 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x52, 0x1b, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x42, + 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x1e, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, + 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x42, + 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x42, 0x79, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x22, 0x56, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x41, 0x6e, 0x64, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x45, 0x0a, + 0x0f, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x41, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x15, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, + 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x56, 0x0a, 0x16, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x08, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x73, 0x22, 0x84, 0x01, 0x0a, 0x18, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, + 0x52, 0x06, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x13, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x03, 0x49, 0x6e, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x24, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, - 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, - 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x29, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x52, 0x65, 0x70, 0x75, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, + 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xb0, + 0x01, 0x0a, 0x22, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, + 0x63, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x56, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, + 0x74, 0x22, 0x92, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x44, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x03, 0x44, + 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, + 0x6f, 0x72, 0x61, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, + 0x72, 0x61, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x03, 0x44, 0x65, 0x63, 0x22, 0x6d, 0x0a, 0x0d, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x12, 0x42, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, + 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x03, 0x49, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, + 0x42, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, + 0x49, 0x6e, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x24, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x41, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x29, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x52, + 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, + 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x71, 0x0a, 0x19, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x3a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x10, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x71, 0x0a, 0x19, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x3a, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x62, 0x0a, 0x18, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x98, 0x01, 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, - 0x75, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x17, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x49, 0x6e, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x22, 0x80, 0x01, 0x0a, 0x16, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, - 0x12, 0x32, 0x0a, 0x08, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x52, 0x08, 0x46, 0x6f, 0x72, 0x65, - 0x63, 0x61, 0x73, 0x74, 0x22, 0x78, 0x0a, 0x18, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, - 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x3e, - 0x0a, 0x0c, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x0c, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x74, - 0x0a, 0x0d, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x12, - 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x03, 0x44, 0x65, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, - 0x61, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, - 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x03, 0x44, 0x65, 0x63, 0x22, 0x94, 0x01, 0x0a, 0x1c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, - 0x0a, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x1b, + 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x62, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x98, 0x01, 0x0a, 0x22, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, + 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x17, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, + 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x09, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x80, 0x01, + 0x0a, 0x16, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x08, + 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x6f, + 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x52, 0x08, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, + 0x22, 0x78, 0x0a, 0x18, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6e, 0x64, + 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x4c, 0x69, 0x62, 0x50, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x0c, 0x4f, 0x66, + 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x4f, 0x66, + 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x74, 0x0a, 0x0d, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x65, 0x63, - 0x61, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, - 0x73, 0x74, 0x73, 0x52, 0x09, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x22, 0xb8, - 0x01, 0x0a, 0x25, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x03, 0x44, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x03, 0x44, 0x65, 0x63, + 0x22, 0x94, 0x01, 0x0a, 0x1c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, + 0x0a, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0a, 0x49, 0x6e, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x1b, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x46, 0x6f, + 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x52, + 0x09, 0x46, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x25, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x53, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x70, + 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x52, 0x13, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x1e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x52, 0x13, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x1e, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, - 0x41, 0x6e, 0x64, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x06, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, - 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x56, - 0x0a, 0x14, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x70, 0x75, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, + 0x2c, 0x0a, 0x06, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x06, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x92, 0x01, + 0x0a, 0x1e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x14, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1e, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x4a, 0x0a, - 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x25, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x31, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x49, 0x64, 0x32, 0x12, 0x4a, 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x93, 0x01, 0x0a, 0x1c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x59, 0x0a, 0x15, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x56, 0x0a, 0x14, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x14, 0x52, 0x65, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x10, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x25, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x31, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x64, + 0x32, 0x12, 0x4a, 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x52, 0x15, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x12, 0x20, - 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x32, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x08, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x50, 0x61, 0x69, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x49, 0x64, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0b, 0x54, - 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0xc2, 0x01, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x42, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, - 0x72, 0x61, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, - 0x61, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x76, 0x33, - 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x0c, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x18, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x3a, 0x56, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, + 0x0a, 0x1c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x12, 0x59, 0x0a, 0x15, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x6f, + 0x6e, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x08, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, 0x52, 0x08, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x73, + 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, + 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0xc2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x65, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x45, + 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, + 0x33, 0xca, 0x02, 0x0c, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x56, 0x33, + 0xe2, 0x02, 0x18, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x56, 0x33, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x45, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -27524,7 +27524,7 @@ var file_emissions_v3_genesis_proto_depIdxs = []int32{ 8, // 12: emissions.v3.GenesisState.previousReputerRewardFraction:type_name -> emissions.v3.TopicIdActorIdDec 8, // 13: emissions.v3.GenesisState.previousInferenceRewardFraction:type_name -> emissions.v3.TopicIdActorIdDec 8, // 14: emissions.v3.GenesisState.previousForecastRewardFraction:type_name -> emissions.v3.TopicIdActorIdDec - 8, // 15: emissions.v3.GenesisState.previousForecasterScoreRatio:type_name -> emissions.v3.TopicIdActorIdDec + 19, // 15: emissions.v3.GenesisState.previousForecasterScoreRatio:type_name -> emissions.v3.TopicIdAndDec 9, // 16: emissions.v3.GenesisState.topicStake:type_name -> emissions.v3.TopicIdAndInt 10, // 17: emissions.v3.GenesisState.stakeReputerAuthority:type_name -> emissions.v3.TopicIdActorIdInt 10, // 18: emissions.v3.GenesisState.stakeSumFromDelegator:type_name -> emissions.v3.TopicIdActorIdInt diff --git a/x/emissions/keeper/actor_utils/losses_test.go b/x/emissions/keeper/actor_utils/losses_test.go index 56ec7407b..a1dd44ed2 100644 --- a/x/emissions/keeper/actor_utils/losses_test.go +++ b/x/emissions/keeper/actor_utils/losses_test.go @@ -55,7 +55,7 @@ func (a *ActorUtilsTestSuite) SetupTest() { key := storetypes.NewKVStoreKey("emissions") storeService := runtime.NewKVStoreService(key) testCtx := testutil.DefaultContextWithDB(a.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) addressCodec := address.NewBech32Codec(params.Bech32PrefixAccAddr) @@ -230,6 +230,12 @@ func (a *ActorUtilsTestSuite) TestFilterUnacceptedWorkersFromReputerValueBundle( // Prepare a sample ReputerValueBundle valueBundle := &emissionstypes.ValueBundle{ TopicId: 1, + ReputerRequestNonce: &emissionstypes.ReputerRequestNonce{ + ReputerNonce: &workerNonce, + }, + Reputer: a.addrsStr[40], + ExtraData: nil, + CombinedValue: alloraMath.NewDecFromInt64(1000), InfererValues: []*emissionstypes.WorkerAttributedValue{ {Worker: inferer1, Value: alloraMath.NewDecFromInt64(100)}, {Worker: inferer2, Value: alloraMath.NewDecFromInt64(100)}, @@ -239,6 +245,7 @@ func (a *ActorUtilsTestSuite) TestFilterUnacceptedWorkersFromReputerValueBundle( {Worker: forecaster1, Value: alloraMath.NewDecFromInt64(300)}, {Worker: forecaster3, Value: alloraMath.NewDecFromInt64(400)}, // Should be filtered out }, + NaiveValue: alloraMath.NewDecFromInt64(1000), OneOutInfererValues: []*emissionstypes.WithheldWorkerAttributedValue{ {Worker: inferer1, Value: alloraMath.NewDecFromInt64(500)}, {Worker: inferer5, Value: alloraMath.NewDecFromInt64(600)}, // Should be filtered out diff --git a/x/emissions/keeper/ema_scores_test.go b/x/emissions/keeper/ema_scores_test.go index 3db9d283e..51096e5f5 100644 --- a/x/emissions/keeper/ema_scores_test.go +++ b/x/emissions/keeper/ema_scores_test.go @@ -10,11 +10,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveInfererScoreEmaIfNewUpdate() { keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - WorkerSubmissionWindow: 10, - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Id: uint64(1), + WorkerSubmissionWindow: 10, + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + EpochLength: 10, + GroundTruthLag: 10, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - worker := "allo15lvs3m3urm4kts4tp2um5u3aeuz3whqrhz47r5" + worker := s.addrsStr[1] block := types.BlockHeight(100) // Test case 1: New update @@ -50,11 +64,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveForecasterScoreEmaIfNewUpdate() { keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - WorkerSubmissionWindow: 10, - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Id: uint64(1), + WorkerSubmissionWindow: 10, + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + EpochLength: 10, + GroundTruthLag: 10, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - worker := "allo15lvs3m3urm4kts4tp2um5u3aeuz3whqrhz47r5" + worker := s.addrsStr[1] block := types.BlockHeight(100) // Test case 1: New update @@ -90,11 +118,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveReputerScoreEmaIfNewUpdate() { keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - EpochLength: 20, - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Id: uint64(1), + EpochLength: 20, + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + GroundTruthLag: 20, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + WorkerSubmissionWindow: 20, + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - reputer := "allo12vgd3fhvghc94e6kmnv02yw2jar3a5zu3jgfh2" + reputer := s.addrsStr[2] block := types.BlockHeight(100) // Test case 1: New update @@ -130,10 +172,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveInfererScoreEmaWithLastSavedTopicQuanti keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Id: uint64(1), + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + EpochLength: 100, + GroundTruthLag: 100, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + WorkerSubmissionWindow: 100, + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - worker := "allo15lvs3m3urm4kts4tp2um5u3aeuz3whqrhz47r5" + worker := s.addrsStr[1] block := types.BlockHeight(100) // Set up a previous topic quantile score @@ -156,10 +213,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveForecasterScoreEmaWithLastSavedTopicQua keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Id: uint64(1), + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + EpochLength: 100, + GroundTruthLag: 100, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + WorkerSubmissionWindow: 100, + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - worker := "allo15lvs3m3urm4kts4tp2um5u3aeuz3whqrhz47r5" + worker := s.addrsStr[1] block := types.BlockHeight(100) // Set up a previous topic quantile score @@ -182,10 +254,25 @@ func (s *KeeperTestSuite) TestCalcAndSaveReputerScoreEmaWithLastSavedTopicQuanti keeper := s.emissionsKeeper topic := types.Topic{ - Id: uint64(1), - MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Id: uint64(1), + MeritSortitionAlpha: alloraMath.MustNewDecFromString("0.2"), + Creator: s.addrsStr[0], + Metadata: "", + LossMethod: "", + EpochLastEnded: 0, + EpochLength: 100, + GroundTruthLag: 100, + PNorm: alloraMath.NewDecFromInt64(3), + AlphaRegret: alloraMath.ZeroDec(), + AllowNegative: false, + Epsilon: alloraMath.ZeroDec(), + InitialRegret: alloraMath.ZeroDec(), + WorkerSubmissionWindow: 100, + ActiveInfererQuantile: alloraMath.ZeroDec(), + ActiveForecasterQuantile: alloraMath.ZeroDec(), + ActiveReputerQuantile: alloraMath.ZeroDec(), } - reputer := "allo12vgd3fhvghc94e6kmnv02yw2jar3a5zu3jgfh2" + reputer := s.addrsStr[2] block := types.BlockHeight(100) // Set up a previous topic quantile score diff --git a/x/emissions/keeper/genesis.go b/x/emissions/keeper/genesis.go index 5c66629d9..fe77a6fa4 100644 --- a/x/emissions/keeper/genesis.go +++ b/x/emissions/keeper/genesis.go @@ -538,8 +538,7 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) erro //openWorkerWindows []*BlockHeightAndListOfTopicIds if len(data.OpenWorkerWindows) != 0 { for _, blockHeightAndListOfTopicIds := range data.OpenWorkerWindows { - topicIds := types.TopicIds{} - topicIds.TopicIds = blockHeightAndListOfTopicIds.TopicIds + topicIds := types.TopicIds{TopicIds: blockHeightAndListOfTopicIds.TopicIds} for _, topicId := range topicIds.TopicIds { if err := types.ValidateTopicId(topicId); err != nil { return errors.Wrap(err, "error validating topic id") @@ -1289,6 +1288,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) blockHeightTopicIdReputerStakeRemovalInfo := types.BlockHeightTopicIdReputerStakeRemovalInfo{ BlockHeight: keyValue.Key.K1(), TopicId: keyValue.Key.K2(), + Reputer: value.Reputer, StakeRemovalInfo: &value, } stakeRemovalsByBlock = append(stakeRemovalsByBlock, &blockHeightTopicIdReputerStakeRemovalInfo) @@ -1328,6 +1328,8 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) blockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo := types.BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo{ BlockHeight: keyValue.Key.K1(), TopicId: keyValue.Key.K2(), + Reputer: value.Reputer, + Delegator: value.Delegator, DelegateStakeRemovalInfo: &value, } delegateStakeRemovalsByBlock = append(delegateStakeRemovalsByBlock, &blockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo) @@ -1775,6 +1777,22 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) latestOneInForecasterNetworkRegrets = append(latestOneInForecasterNetworkRegrets, &topicIdActorIdActorIdTimeStampedValue) } + previousForecasterScoreRatio := make([]*types.TopicIdAndDec, 0) + previousForecasterScoreRatioIter, err := k.previousForecasterScoreRatio.Iterate(ctx, nil) + if err != nil { + return nil, errors.Wrap(err, "failed to iterate previous forecaster score ratio") + } + for ; previousForecasterScoreRatioIter.Valid(); previousForecasterScoreRatioIter.Next() { + keyValue, err := previousForecasterScoreRatioIter.KeyValue() + if err != nil { + return nil, errors.Wrap(err, "failed to get key value: previousForecasterScoreRatioIter") + } + previousForecasterScoreRatio = append(previousForecasterScoreRatio, &types.TopicIdAndDec{ + TopicId: keyValue.Key, + Dec: keyValue.Value, + }) + } + coreTeamAddresses := make([]string, 0) coreTeamAddressesIter, err := k.whitelistAdmins.Iterate(ctx, nil) if err != nil { @@ -1923,6 +1941,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) LatestInfererNetworkRegrets: latestInfererNetworkRegrets, LatestForecasterNetworkRegrets: latestForecasterNetworkRegrets, LatestOneInForecasterNetworkRegrets: latestOneInForecasterNetworkRegrets, + PreviousForecasterScoreRatio: previousForecasterScoreRatio, CoreTeamAddresses: coreTeamAddresses, TopicLastWorkerCommit: topicLastWorkerCommit, TopicLastReputerCommit: topicLastReputerCommit, diff --git a/x/emissions/keeper/inference_synthesis/forecast_implied.go b/x/emissions/keeper/inference_synthesis/forecast_implied.go index 64e670fda..aaccc5575 100644 --- a/x/emissions/keeper/inference_synthesis/forecast_implied.go +++ b/x/emissions/keeper/inference_synthesis/forecast_implied.go @@ -64,17 +64,21 @@ func CalcForecastImpliedInferences(args CalcForecastImpliedInferencesArgs) ( weightSum := alloraMath.ZeroDec() // denominator in calculation of forecast-implied inferences weightInferenceDotProduct := alloraMath.ZeroDec() // numerator in calculation of forecast-implied inferences + blockHeight := int64(0) + // Calculate the forecast-implied inferences I_ik if args.AllInferersAreNew { // If all inferers are new, calculate the median of the inferences // This means that forecasters won't be able to influence the network inference when all inferers are new // However, this seeds losses for forecasters for future rounds - inferenceValues := make([]alloraMath.Dec, 0, len(sortedInferersInForecast)) for _, inferer := range sortedInferersInForecast { inference, ok := args.InfererToInference[inferer] if ok { inferenceValues = append(inferenceValues, inference.Value) + if blockHeight == 0 { + blockHeight = inference.BlockHeight + } } } @@ -84,8 +88,12 @@ func CalcForecastImpliedInferences(args CalcForecastImpliedInferencesArgs) ( } forecastImpliedInference := emissionstypes.Inference{ - Inferer: forecaster, - Value: medianValue, + TopicId: args.TopicId, + BlockHeight: blockHeight, + Inferer: forecaster, + Value: medianValue, + ExtraData: nil, + Proof: "", } forecasterToForecastImpliedInference[forecaster] = &forecastImpliedInference } else { @@ -147,7 +155,10 @@ func CalcForecastImpliedInferences(args CalcForecastImpliedInferencesArgs) ( // this is w_ijk in the paper weightIJK := infererWeightsForThisForecaster[infererInForecast] - _, ok := args.InfererToInference[infererInForecast] + inference, ok := args.InfererToInference[infererInForecast] + if ok && blockHeight == 0 { + blockHeight = inference.BlockHeight + } if ok && !(weightIJK.Equal(alloraMath.ZeroDec())) { thisDotProduct, err := weightIJK.Mul(args.InfererToInference[infererInForecast].Value) if err != nil { @@ -173,8 +184,12 @@ func CalcForecastImpliedInferences(args CalcForecastImpliedInferencesArgs) ( return nil, nil, nil, errorsmod.Wrapf(err, "error calculating forecast value") } forecastImpliedInference := emissionstypes.Inference{ - Inferer: forecaster, - Value: forecastValue, + TopicId: args.TopicId, + BlockHeight: blockHeight, + Inferer: forecaster, + Value: forecastValue, + ExtraData: nil, + Proof: "", } forecasterToForecastImpliedInference[forecaster] = &forecastImpliedInference } diff --git a/x/emissions/keeper/inference_synthesis/network_inference_builder.go b/x/emissions/keeper/inference_synthesis/network_inference_builder.go index af1c3137b..53bd9e2c9 100644 --- a/x/emissions/keeper/inference_synthesis/network_inference_builder.go +++ b/x/emissions/keeper/inference_synthesis/network_inference_builder.go @@ -854,14 +854,21 @@ func CalcNetworkInferences( } // Build value bundle to return all the calculated inferences + // ATTN: PROTO-2464 return &emissions.ValueBundle{ - TopicId: args.TopicId, - CombinedValue: combinedInference, - InfererValues: inferences, - ForecasterValues: forecastImpliedInferences, - NaiveValue: naiveInference, - OneOutInfererValues: oneOutInfererInferences, - OneOutForecasterValues: oneOutForecasterInferences, - OneInForecasterValues: oneInForecasterInferences, + TopicId: args.TopicId, + ReputerRequestNonce: &emissions.ReputerRequestNonce{ + ReputerNonce: &emissions.Nonce{BlockHeight: args.Ctx.BlockHeight()}, + }, + Reputer: "allo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqas6usy", + ExtraData: nil, + CombinedValue: combinedInference, + InfererValues: inferences, + ForecasterValues: forecastImpliedInferences, + NaiveValue: naiveInference, + OneOutInfererValues: oneOutInfererInferences, + OneOutForecasterValues: oneOutForecasterInferences, + OneInForecasterValues: oneInForecasterInferences, + OneOutInfererForecasterValues: nil, }, weights, err } diff --git a/x/emissions/keeper/inference_synthesis/network_inference_builder_test.go b/x/emissions/keeper/inference_synthesis/network_inference_builder_test.go index 5340937e0..b7dd8680c 100644 --- a/x/emissions/keeper/inference_synthesis/network_inference_builder_test.go +++ b/x/emissions/keeper/inference_synthesis/network_inference_builder_test.go @@ -58,7 +58,13 @@ func (s *InferenceSynthesisTestSuite) SetupTest() { key := storetypes.NewKVStoreKey("emissions") storeService := runtime.NewKVStoreService(key) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{ + Height: 1, + Hash: []byte("1"), + AppHash: []byte("1"), + ChainID: "localnet", + Time: time.Now(), + }) encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) addressCodec := address.NewBech32Codec(params.Bech32PrefixAccAddr) @@ -482,8 +488,12 @@ func (s *InferenceSynthesisTestSuite) getEpochValueBundleByEpoch(epochNumber int for infererIndex := 0; infererIndex < 5; infererIndex++ { inferences.Inferences = append(inferences.Inferences, &emissionstypes.Inference{ - Inferer: s.addrsStr[infererIndex], - Value: epochGet("inference_" + strconv.Itoa(infererIndex)), + Inferer: s.addrsStr[infererIndex], + Value: epochGet("inference_" + strconv.Itoa(infererIndex)), + ExtraData: nil, + Proof: "", + BlockHeight: blockHeight, + TopicId: topicId, }) } @@ -502,6 +512,9 @@ func (s *InferenceSynthesisTestSuite) getEpochValueBundleByEpoch(epochNumber int forecasts.Forecasts = append(forecasts.Forecasts, &emissionstypes.Forecast{ Forecaster: s.addrsStr[forecasterIndex+8], ForecastElements: forecastElements, + TopicId: topicId, + BlockHeight: blockHeight, + ExtraData: nil, }) } @@ -970,25 +983,25 @@ func (s *InferenceSynthesisTestSuite) TestCalcNetworkInferencesTwoWorkerTwoForec } // Set inferer network regrets - err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.2")}) + err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.2"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetInfererNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.3")}) + err = k.SetInfererNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.3"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set forecaster network regrets - err = k.SetForecasterNetworkRegret(ctx, topicId, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.4")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.4"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetForecasterNetworkRegret(ctx, topicId, worker4, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.5")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, worker4, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.5"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set one-in forecaster network regrets - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker3, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.2")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker3, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.2"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker3, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.3")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker3, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.3"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker4, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.6")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker4, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.6"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker4, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.4")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker4, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.4"), BlockHeight: blockHeight}) s.Require().NoError(err) networkCombinedLoss := alloraMath.MustNewDecFromString("0.2") @@ -1098,41 +1111,41 @@ func (s *InferenceSynthesisTestSuite) TestCalcNetworkInferencesThreeWorkerThreeF } // Set inferer network regrets - err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001")}) + err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetInfererNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.002")}) + err = k.SetInfererNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.002"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetInfererNetworkRegret(ctx, topicId, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.003")}) + err = k.SetInfererNetworkRegret(ctx, topicId, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.003"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set forecaster network regrets - err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.006")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, forecaster3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.006"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set one-in forecaster network regrets - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.007")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.007"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.008")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.008"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.009")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster1, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.009"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.002")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.002"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.003")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster2, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.003"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.006")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, forecaster3, worker3, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.006"), BlockHeight: blockHeight}) s.Require().NoError(err) networkCombinedLoss := alloraMath.MustNewDecFromString("10000") @@ -1217,22 +1230,23 @@ func (s *InferenceSynthesisTestSuite) TestCalc0neInInferencesTwoForecastersOldTw }, } + blockHeight := int64(300) // Set inferer network regrets - Just for worker1 - err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001")}) + err := k.SetInfererNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set forecaster network regrets - err = k.SetForecasterNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.004"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetForecasterNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005")}) + err = k.SetForecasterNetworkRegret(ctx, topicId, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.005"), BlockHeight: blockHeight}) s.Require().NoError(err) // Set one-in forecaster network regrets - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker1, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker1, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker2, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker2, worker2, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.001"), BlockHeight: blockHeight}) s.Require().NoError(err) - err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker2, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.008")}) + err = k.SetOneInForecasterNetworkRegret(ctx, topicId, worker2, worker1, emissionstypes.TimestampedValue{Value: alloraMath.MustNewDecFromString("0.008"), BlockHeight: blockHeight}) s.Require().NoError(err) networkCombinedLoss := alloraMath.MustNewDecFromString("10000") @@ -1240,7 +1254,6 @@ func (s *InferenceSynthesisTestSuite) TestCalc0neInInferencesTwoForecastersOldTw epsilonSafeDiv := alloraMath.MustNewDecFromString("0.0000001") pNorm := alloraMath.MustNewDecFromString("2") cNorm := alloraMath.MustNewDecFromString("0.75") - blockHeight := int64(300) inferers, inferenceByWorker, infererRegrets, allInferersAreNew, forecasters, forecastByWorker, diff --git a/x/emissions/keeper/inference_synthesis/network_inferences.go b/x/emissions/keeper/inference_synthesis/network_inferences.go index 3d7ac23b9..7c7b4908b 100644 --- a/x/emissions/keeper/inference_synthesis/network_inferences.go +++ b/x/emissions/keeper/inference_synthesis/network_inferences.go @@ -45,10 +45,22 @@ func GetNetworkInferences( } } + // ATTN: PROTO-2464 networkInferences = &emissions.ValueBundle{ - TopicId: topicId, - InfererValues: make([]*emissions.WorkerAttributedValue, 0), - ForecasterValues: make([]*emissions.WorkerAttributedValue, 0), + TopicId: topicId, + ReputerRequestNonce: &emissions.ReputerRequestNonce{ + ReputerNonce: &emissions.Nonce{BlockHeight: ctx.BlockHeight()}, + }, + Reputer: "allo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqas6usy", + ExtraData: nil, + CombinedValue: alloraMath.ZeroDec(), + InfererValues: make([]*emissions.WorkerAttributedValue, 0), + ForecasterValues: make([]*emissions.WorkerAttributedValue, 0), + NaiveValue: alloraMath.ZeroDec(), + OneOutInfererValues: make([]*emissions.WithheldWorkerAttributedValue, 0), + OneOutForecasterValues: make([]*emissions.WithheldWorkerAttributedValue, 0), + OneInForecasterValues: make([]*emissions.WorkerAttributedValue, 0), + OneOutInfererForecasterValues: make([]*emissions.OneOutInfererForecasterValues, 0), } forecasterToForecastImpliedInference = make(map[string]*emissions.Inference, 0) @@ -158,7 +170,14 @@ func GetNetworkInferences( singleInference := inferences.Inferences[0] networkInferences = &emissions.ValueBundle{ - TopicId: topicId, + TopicId: topicId, + Reputer: "allo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqas6usy", + ReputerRequestNonce: &emissions.ReputerRequestNonce{ + ReputerNonce: &emissions.Nonce{ + BlockHeight: ctx.BlockHeight(), + }, + }, + ExtraData: nil, CombinedValue: singleInference.Value, InfererValues: []*emissions.WorkerAttributedValue{ { @@ -166,11 +185,12 @@ func GetNetworkInferences( Value: singleInference.Value, }, }, - ForecasterValues: []*emissions.WorkerAttributedValue{}, - NaiveValue: singleInference.Value, - OneOutInfererValues: []*emissions.WithheldWorkerAttributedValue{}, - OneOutForecasterValues: []*emissions.WithheldWorkerAttributedValue{}, - OneInForecasterValues: []*emissions.WorkerAttributedValue{}, + ForecasterValues: []*emissions.WorkerAttributedValue{}, + NaiveValue: singleInference.Value, + OneOutInfererValues: []*emissions.WithheldWorkerAttributedValue{}, + OneOutForecasterValues: []*emissions.WithheldWorkerAttributedValue{}, + OneInForecasterValues: []*emissions.WorkerAttributedValue{}, + OneOutInfererForecasterValues: []*emissions.OneOutInfererForecasterValues{}, } } diff --git a/x/emissions/keeper/inference_synthesis/network_losses.go b/x/emissions/keeper/inference_synthesis/network_losses.go index 58f3362de..7aca0b702 100644 --- a/x/emissions/keeper/inference_synthesis/network_losses.go +++ b/x/emissions/keeper/inference_synthesis/network_losses.go @@ -252,9 +252,10 @@ func CalcNetworkLosses( TopicId: topicId, ReputerRequestNonce: &emissions.ReputerRequestNonce{ReputerNonce: &emissions.Nonce{BlockHeight: blockHeight}}, // we re-use the value bundle for the network loss bundle - // this is bad practice and we should refactor: PROTO-2369 + // this is bad practice and we should refactor: PROTO-2369, PROTO-2464 // for now set the Reputer address to a "zero" address Reputer: "allo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqas6usy", + ExtraData: nil, CombinedValue: combinedValue, InfererValues: infererLosses, ForecasterValues: forecasterLosses, diff --git a/x/emissions/keeper/inference_synthesis/network_losses_test.go b/x/emissions/keeper/inference_synthesis/network_losses_test.go index 409fd6109..98efdfbbf 100644 --- a/x/emissions/keeper/inference_synthesis/network_losses_test.go +++ b/x/emissions/keeper/inference_synthesis/network_losses_test.go @@ -137,6 +137,12 @@ func (s *InferenceSynthesisTestSuite) getTestCasesOneWorker() []struct { }, epsilon: alloraMath.MustNewDecFromString("1e-4"), expectedOutput: emissions.ValueBundle{ + TopicId: uint64(1), + Reputer: s.addrsStr[1], + ReputerRequestNonce: &emissions.ReputerRequestNonce{ + ReputerNonce: &emissions.Nonce{BlockHeight: 100}, + }, + ExtraData: nil, CombinedValue: alloraMath.MustNewDecFromString("0.1587401051968199"), NaiveValue: alloraMath.MustNewDecFromString("0.1587401051968199"), InfererValues: []*emissions.WorkerAttributedValue{ @@ -169,6 +175,7 @@ func (s *InferenceSynthesisTestSuite) getTestCasesOneWorker() []struct { Value: alloraMath.MustNewDecFromString("0.1587401051968199"), }, }, + OneOutInfererForecasterValues: nil, }, expectedError: nil, }, @@ -247,7 +254,8 @@ func (s *InferenceSynthesisTestSuite) getTestCasesTwoWorkers() []struct { signature1 := s.signValueBundle(&valueBundle1, s.privKeys[1]) valueBundle2 := emissions.ValueBundle{ - TopicId: uint64(1), + ExtraData: nil, + TopicId: uint64(1), ReputerRequestNonce: &emissions.ReputerRequestNonce{ ReputerNonce: &emissions.Nonce{BlockHeight: 100}, }, @@ -337,6 +345,12 @@ func (s *InferenceSynthesisTestSuite) getTestCasesTwoWorkers() []struct { }, epsilon: alloraMath.MustNewDecFromString("1e-4"), expectedOutput: emissions.ValueBundle{ + TopicId: uint64(1), + Reputer: s.addrsStr[1], + ReputerRequestNonce: &emissions.ReputerRequestNonce{ + ReputerNonce: &emissions.Nonce{BlockHeight: 100}, + }, + ExtraData: nil, CombinedValue: alloraMath.MustNewDecFromString("0.166666666"), NaiveValue: alloraMath.MustNewDecFromString("0.166666666"), InfererValues: []*emissions.WorkerAttributedValue{ @@ -389,6 +403,7 @@ func (s *InferenceSynthesisTestSuite) getTestCasesTwoWorkers() []struct { Value: alloraMath.MustNewDecFromString("0.166666666"), }, }, + OneOutInfererForecasterValues: nil, }, expectedError: nil, }, diff --git a/x/emissions/keeper/inference_synthesis/network_regrets_test.go b/x/emissions/keeper/inference_synthesis/network_regrets_test.go index 77a89024c..30e516833 100644 --- a/x/emissions/keeper/inference_synthesis/network_regrets_test.go +++ b/x/emissions/keeper/inference_synthesis/network_regrets_test.go @@ -13,6 +13,12 @@ import ( func (s *InferenceSynthesisTestSuite) TestConvertValueBundleToNetworkLossesByWorker() { require := s.Require() valueBundle := emissionstypes.ValueBundle{ + TopicId: uint64(1), + Reputer: s.addrsStr[1], + ReputerRequestNonce: &emissionstypes.ReputerRequestNonce{ + ReputerNonce: &emissionstypes.Nonce{BlockHeight: 100}, + }, + ExtraData: nil, CombinedValue: alloraMath.MustNewDecFromString("0.1"), NaiveValue: alloraMath.MustNewDecFromString("0.1"), InfererValues: []*emissionstypes.WorkerAttributedValue{ @@ -35,6 +41,7 @@ func (s *InferenceSynthesisTestSuite) TestConvertValueBundleToNetworkLossesByWor {Worker: s.addrsStr[1], Value: alloraMath.MustNewDecFromString("0.1")}, {Worker: s.addrsStr[2], Value: alloraMath.MustNewDecFromString("0.2")}, }, + OneOutInfererForecasterValues: nil, } result := inferencesynthesis.ConvertValueBundleToNetworkLossesByWorker(valueBundle) @@ -252,6 +259,12 @@ func (s *InferenceSynthesisTestSuite) TestGetCalcSetNetworkRegretsThreeWorkers() epsilon := alloraMath.MustNewDecFromString("0.0001") valueBundle := emissionstypes.ValueBundle{ + TopicId: uint64(1), + Reputer: s.addrsStr[1], + ReputerRequestNonce: &emissionstypes.ReputerRequestNonce{ + ReputerNonce: &emissionstypes.Nonce{BlockHeight: 100}, + }, + ExtraData: nil, CombinedValue: alloraMath.MustNewDecFromString("500"), NaiveValue: alloraMath.MustNewDecFromString("123"), InfererValues: []*emissionstypes.WorkerAttributedValue{ @@ -269,6 +282,9 @@ func (s *InferenceSynthesisTestSuite) TestGetCalcSetNetworkRegretsThreeWorkers() {Worker: worker2, Value: alloraMath.MustNewDecFromString("200")}, {Worker: worker3, Value: alloraMath.MustNewDecFromString("200")}, }, + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneOutInfererForecasterValues: nil, } blockHeight := int64(42) nonce := emissionstypes.Nonce{BlockHeight: blockHeight} diff --git a/x/emissions/keeper/keeper.go b/x/emissions/keeper/keeper.go index 1cacfe77d..e63979555 100644 --- a/x/emissions/keeper/keeper.go +++ b/x/emissions/keeper/keeper.go @@ -215,6 +215,7 @@ func NewKeeper( ) Keeper { sb := collections.NewSchemaBuilder(storeService) k := Keeper{ + schema: collections.Schema{}, cdc: cdc, storeService: storeService, addressCodec: addressCodec, @@ -310,7 +311,7 @@ func (k *Keeper) GetBinaryCodec() codec.BinaryCodec { func (k *Keeper) GetWorkerWindowTopicIds(ctx sdk.Context, height BlockHeight) types.TopicIds { topicIds, err := k.openWorkerWindows.Get(ctx, height) if err != nil { - return types.TopicIds{} + return types.TopicIds{TopicIds: []TopicId{}} } return topicIds } @@ -411,7 +412,7 @@ func (k *Keeper) FulfillReputerNonce(ctx context.Context, topicId TopicId, nonce } // True if nonce is unfulfilled, false otherwise. -func (k *Keeper) IsWorkerNonceUnfulfilled(ctx context.Context, topicId TopicId, nonce *types.Nonce) (bool, error) { +func (k *Keeper) IsWorkerNonceUnfulfilled(ctx context.Context, topicId TopicId, nonce *types.Nonce) (isUnfulfilled bool, err error) { // Get the latest unfulfilled nonces unfulfilledNonces, err := k.GetUnfulfilledWorkerNonces(ctx, topicId) if err != nil { @@ -432,7 +433,7 @@ func (k *Keeper) IsWorkerNonceUnfulfilled(ctx context.Context, topicId TopicId, } // True if nonce is unfulfilled, false otherwise. -func (k *Keeper) IsReputerNonceUnfulfilled(ctx context.Context, topicId TopicId, nonce *types.Nonce) (bool, error) { +func (k *Keeper) IsReputerNonceUnfulfilled(ctx context.Context, topicId TopicId, nonce *types.Nonce) (isUnfulfilled bool, err error) { // Get the latest unfulfilled nonces unfulfilledNonces, err := k.GetUnfulfilledReputerNonces(ctx, topicId) if err != nil { @@ -546,9 +547,9 @@ func (k *Keeper) GetUnfulfilledWorkerNonces(ctx context.Context, topicId TopicId nonces, err := k.unfulfilledWorkerNonces.Get(ctx, topicId) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return types.Nonces{}, nil + return types.Nonces{Nonces: []*types.Nonce{}}, nil } - return types.Nonces{}, errorsmod.Wrap(err, "error getting unfulfilled worker nonces") + return types.Nonces{Nonces: []*types.Nonce{}}, errorsmod.Wrap(err, "error getting unfulfilled worker nonces") } return nonces, nil } @@ -557,9 +558,9 @@ func (k *Keeper) GetUnfulfilledReputerNonces(ctx context.Context, topicId TopicI nonces, err := k.unfulfilledReputerNonces.Get(ctx, topicId) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return types.ReputerRequestNonces{}, nil + return types.ReputerRequestNonces{Nonces: []*types.ReputerRequestNonce{}}, nil } - return types.ReputerRequestNonces{}, errorsmod.Wrap(err, "error getting unfulfilled reputer nonces") + return types.ReputerRequestNonces{Nonces: []*types.ReputerRequestNonce{}}, errorsmod.Wrap(err, "error getting unfulfilled reputer nonces") } return nonces, nil } @@ -590,21 +591,29 @@ func (k *Keeper) SetInfererNetworkRegret(ctx context.Context, topicId TopicId, w // Returns the regret of a inferer from comparing loss of inferer relative to loss of other inferers // Returns (0, true) if no regret is found -func (k *Keeper) GetInfererNetworkRegret(ctx context.Context, topicId TopicId, worker ActorId) (types.TimestampedValue, bool, error) { +func (k *Keeper) GetInfererNetworkRegret( + ctx context.Context, topicId TopicId, worker ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join(topicId, worker) - regret, err := k.latestInfererNetworkRegrets.Get(ctx, key) + regret, err = k.latestInfererNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) if err != nil { - return types.TimestampedValue{}, false, errorsmod.Wrap(err, "error getting topic") + return types.TimestampedValue{ + BlockHeight: 0, + Value: alloraMath.ZeroDec(), + }, false, errorsmod.Wrap(err, "error getting topic") } return types.TimestampedValue{ BlockHeight: 0, Value: topic.InitialRegret, }, true, nil } - return types.TimestampedValue{}, false, errorsmod.Wrap(err, "error getting inferer network regret") + return types.TimestampedValue{ + BlockHeight: 0, + Value: alloraMath.ZeroDec(), + }, false, errorsmod.Wrap(err, "error getting inferer network regret") } return regret, false, nil } @@ -630,9 +639,11 @@ func (k *Keeper) SetForecasterNetworkRegret( // Returns the regret of a forecaster from comparing loss of forecaster relative to loss of other forecasters // Returns (0, true) if no regret is found -func (k *Keeper) GetForecasterNetworkRegret(ctx context.Context, topicId TopicId, worker ActorId) (types.TimestampedValue, bool, error) { +func (k *Keeper) GetForecasterNetworkRegret( + ctx context.Context, topicId TopicId, worker ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join(topicId, worker) - regret, err := k.latestForecasterNetworkRegrets.Get(ctx, key) + regret, err = k.latestForecasterNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -674,9 +685,11 @@ func (k *Keeper) SetOneInForecasterNetworkRegret( // Returns the regret of a forecaster from comparing loss of forecaster relative to loss of other forecasters // Returns (0, true) if no regret is found -func (k *Keeper) GetOneInForecasterNetworkRegret(ctx context.Context, topicId TopicId, oneInForecaster ActorId, inferer ActorId) (types.TimestampedValue, bool, error) { +func (k *Keeper) GetOneInForecasterNetworkRegret( + ctx context.Context, topicId TopicId, oneInForecaster ActorId, inferer ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join3(topicId, oneInForecaster, inferer) - regret, err := k.latestOneInForecasterNetworkRegrets.Get(ctx, key) + regret, err = k.latestOneInForecasterNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -712,9 +725,10 @@ func (k *Keeper) SetNaiveInfererNetworkRegret( return k.latestNaiveInfererNetworkRegrets.Set(ctx, key, regret) } -func (k *Keeper) GetNaiveInfererNetworkRegret(ctx context.Context, topicId TopicId, inferer ActorId) (types.TimestampedValue, bool, error) { +func (k *Keeper) GetNaiveInfererNetworkRegret(ctx context.Context, topicId TopicId, inferer ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join(topicId, inferer) - regret, err := k.latestNaiveInfererNetworkRegrets.Get(ctx, key) + regret, err = k.latestNaiveInfererNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -754,9 +768,13 @@ func (k *Keeper) SetOneOutInfererInfererNetworkRegret( return k.latestOneOutInfererInfererNetworkRegrets.Set(ctx, key, regret) } -func (k *Keeper) GetOneOutInfererInfererNetworkRegret(ctx context.Context, topicId TopicId, oneOutInferer ActorId, inferer ActorId) (types.TimestampedValue, bool, error) { +// return the one out inferer regret, how much the one out inferer affects the network loss +// if no prior is found, return the initial regret of the topic +func (k *Keeper) GetOneOutInfererInfererNetworkRegret( + ctx context.Context, topicId TopicId, oneOutInferer ActorId, inferer ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join3(topicId, oneOutInferer, inferer) - regret, err := k.latestOneOutInfererInfererNetworkRegrets.Get(ctx, key) + regret, err = k.latestOneOutInfererInfererNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -796,9 +814,13 @@ func (k *Keeper) SetOneOutInfererForecasterNetworkRegret( return k.latestOneOutInfererForecasterNetworkRegrets.Set(ctx, key, regret) } -func (k *Keeper) GetOneOutInfererForecasterNetworkRegret(ctx context.Context, topicId TopicId, oneOutInferer ActorId, forecaster ActorId) (types.TimestampedValue, bool, error) { +// return the one out inferer forecaster regret, how much that inferer affects the forecast loss +// if no prior is found, return the initial regret of the topic +func (k *Keeper) GetOneOutInfererForecasterNetworkRegret( + ctx context.Context, topicId TopicId, oneOutInferer ActorId, forecaster ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join3(topicId, oneOutInferer, forecaster) - regret, err := k.latestOneOutInfererForecasterNetworkRegrets.Get(ctx, key) + regret, err = k.latestOneOutInfererForecasterNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -838,9 +860,13 @@ func (k *Keeper) SetOneOutForecasterInfererNetworkRegret( return k.latestOneOutForecasterInfererNetworkRegrets.Set(ctx, key, regret) } -func (k *Keeper) GetOneOutForecasterInfererNetworkRegret(ctx context.Context, topicId TopicId, oneOutForecaster ActorId, inferer ActorId) (types.TimestampedValue, bool, error) { +// return the one out forecaster inferer regret, how much that forecaster affects the inferer network loss +// if no prior is found, return the initial regret of the topic +func (k *Keeper) GetOneOutForecasterInfererNetworkRegret( + ctx context.Context, topicId TopicId, oneOutForecaster ActorId, inferer ActorId) ( + regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join3(topicId, oneOutForecaster, inferer) - regret, err := k.latestOneOutForecasterInfererNetworkRegrets.Get(ctx, key) + regret, err = k.latestOneOutForecasterInfererNetworkRegrets.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { topic, err := k.GetTopic(ctx, topicId) @@ -885,7 +911,7 @@ func (k *Keeper) GetOneOutForecasterForecasterNetworkRegret( topicId TopicId, oneOutForecaster ActorId, forecaster ActorId, -) (regret types.TimestampedValue, isNotPresent bool, err error) { +) (regret types.TimestampedValue, noPrior bool, err error) { key := collections.Join3(topicId, oneOutForecaster, forecaster) regret, err = k.latestOneOutForecasterForecasterNetworkRegrets.Get(ctx, key) if err != nil { @@ -931,7 +957,7 @@ func (k *Keeper) GetInferencesAtBlock(ctx context.Context, topicId TopicId, bloc inferences, err := k.allInferences.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return &types.Inferences{}, nil + return &types.Inferences{Inferences: []*types.Inference{}}, nil } return nil, errorsmod.Wrap(err, "error getting inferences at block") } @@ -966,7 +992,7 @@ func (k *Keeper) GetForecastsAtBlock(ctx context.Context, topicId TopicId, block forecasts, err := k.allForecasts.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return &types.Forecasts{}, nil + return &types.Forecasts{Forecasts: []*types.Forecast{}}, nil } return nil, errorsmod.Wrap(err, "error getting forecasts at block") } @@ -1333,7 +1359,7 @@ func (k *Keeper) GetReputerLossBundlesAtBlock(ctx context.Context, topicId Topic reputerLossBundles, err := k.allLossBundles.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return &types.ReputerValueBundles{}, nil + return &types.ReputerValueBundles{ReputerValueBundles: []*types.ReputerValueBundle{}}, nil } return nil, errorsmod.Wrap(err, "error getting reputer loss bundles at block") } @@ -1366,7 +1392,24 @@ func (k *Keeper) GetNetworkLossBundleAtBlock(ctx context.Context, topicId TopicI lossBundle, err := k.networkLossBundles.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return &types.ValueBundle{}, nil + return &types.ValueBundle{ + TopicId: topicId, + ReputerRequestNonce: &types.ReputerRequestNonce{ + ReputerNonce: &types.Nonce{ + BlockHeight: 0, + }, + }, + Reputer: "", + ExtraData: nil, + CombinedValue: alloraMath.ZeroDec(), + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.ZeroDec(), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, + }, nil } return nil, errorsmod.Wrap(err, "error getting network loss bundle at block") } @@ -2085,7 +2128,13 @@ func (k *Keeper) GetStakeRemovalForReputerAndTopicId( } keysLen := len(keys) if keysLen == 0 { - return types.StakeRemovalInfo{}, false, nil + return types.StakeRemovalInfo{ + BlockRemovalStarted: 0, + TopicId: 0, + Reputer: "", + Amount: cosmosMath.ZeroInt(), + BlockRemovalCompleted: 0, + }, false, nil } if keysLen < 0 { return types.StakeRemovalInfo{}, false, errorsmod.Wrapf(types.ErrInvariantFailure, "Why is golang len function returning negative values?") @@ -2160,8 +2209,8 @@ func (k *Keeper) GetDelegateStakeRemovalsUpUntilBlock( ctx context.Context, blockHeight BlockHeight, limit uint64, -) ([]types.DelegateStakeRemovalInfo, bool, error) { - ret := make([]types.DelegateStakeRemovalInfo, 0) +) (ret []types.DelegateStakeRemovalInfo, limitHit bool, err error) { + ret = make([]types.DelegateStakeRemovalInfo, 0) // make a range that has everything less than the block height, inclusive startKey := QuadrupleSinglePrefix[BlockHeight, TopicId, ActorId, ActorId](0) @@ -2208,7 +2257,14 @@ func (k *Keeper) GetDelegateStakeRemovalForDelegatorReputerAndTopicId( } keysLen := len(keys) if keysLen == 0 { - return types.DelegateStakeRemovalInfo{}, false, nil + return types.DelegateStakeRemovalInfo{ + BlockRemovalStarted: 0, + TopicId: 0, + Delegator: "", + Reputer: "", + Amount: cosmosMath.ZeroInt(), + BlockRemovalCompleted: 0, + }, false, nil } if keysLen < 0 { return types.DelegateStakeRemovalInfo{}, false, errorsmod.Wrapf(types.ErrInvariantFailure, "Why is golang len function returning negative values?") @@ -2308,8 +2364,8 @@ func (k *Keeper) GetWorkerInfo(ctx sdk.Context, workerKey ActorId) (types.Offcha // Get the previous weight during rewards calculation for a topic // Returns ((0,0), true) if there was no prior topic weight set, else ((x,y), false) where x,y!=0 -func (k *Keeper) GetPreviousTopicWeight(ctx context.Context, topicId TopicId) (alloraMath.Dec, bool, error) { - topicWeight, err := k.previousTopicWeight.Get(ctx, topicId) +func (k *Keeper) GetPreviousTopicWeight(ctx context.Context, topicId TopicId) (topicWeight alloraMath.Dec, noPrior bool, err error) { + topicWeight, err = k.previousTopicWeight.Get(ctx, topicId) if err != nil { if errors.Is(err, collections.ErrNotFound) { return alloraMath.ZeroDec(), true, nil @@ -2706,7 +2762,12 @@ func (k *Keeper) GetReputerScoreEma(ctx context.Context, topicId TopicId, repute Score: alloraMath.ZeroDec(), }, nil } - return types.Score{}, errorsmod.Wrap(err, "error getting reputer score ema") + return types.Score{ + BlockHeight: 0, + Address: reputer, + TopicId: topicId, + Score: alloraMath.ZeroDec(), + }, errorsmod.Wrap(err, "error getting reputer score ema") } return score, nil } @@ -2790,7 +2851,9 @@ func (k *Keeper) GetWorkerInferenceScoresAtBlock(ctx context.Context, topicId To scores, err := k.infererScoresByBlock.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return types.Scores{}, nil + return types.Scores{ + Scores: []*types.Score{}, + }, nil } return types.Scores{}, errorsmod.Wrap(err, "error getting worker inference scores at block") } @@ -2876,7 +2939,7 @@ func (k *Keeper) GetWorkerForecastScoresAtBlock(ctx context.Context, topicId Top scores, err := k.forecasterScoresByBlock.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return types.Scores{}, nil + return types.Scores{Scores: []*types.Score{}}, nil } return types.Scores{}, errorsmod.Wrap(err, "error getting worker forecast scores at block") } @@ -2920,7 +2983,7 @@ func (k *Keeper) GetReputersScoresAtBlock(ctx context.Context, topicId TopicId, scores, err := k.reputerScoresByBlock.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return types.Scores{}, nil + return types.Scores{Scores: []*types.Score{}}, nil } return types.Scores{}, errorsmod.Wrap(err, "error getting reputers scores at block") } @@ -3027,16 +3090,18 @@ func (k *Keeper) GetPreviousTopicQuantileReputerScoreEma(ctx context.Context, to // Gets the previous W_{i-1,m} // Returns previous reward fraction, and true if it has yet to be set for the first time (else false) -func (k *Keeper) GetPreviousReputerRewardFraction(ctx context.Context, topicId TopicId, reputer ActorId) (alloraMath.Dec, bool, error) { +func (k *Keeper) GetPreviousReputerRewardFraction( + ctx context.Context, topicId TopicId, reputer ActorId) ( + previousReputerRewardFraction alloraMath.Dec, noPrior bool, err error) { key := collections.Join(topicId, reputer) - reward, err := k.previousReputerRewardFraction.Get(ctx, key) + previousReputerRewardFraction, err = k.previousReputerRewardFraction.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { return alloraMath.ZeroDec(), true, nil } return alloraMath.Dec{}, false, errorsmod.Wrap(err, "error getting previous reputer reward fraction") } - return reward, false, nil + return previousReputerRewardFraction, false, nil } // Sets the previous W_{i-1,m} @@ -3056,16 +3121,17 @@ func (k *Keeper) SetPreviousReputerRewardFraction(ctx context.Context, topicId T // Gets the previous U_{i-1,m} // Returns previous reward fraction, and true if it has yet to be set for the first time (else false) -func (k *Keeper) GetPreviousInferenceRewardFraction(ctx context.Context, topicId TopicId, worker ActorId) (alloraMath.Dec, bool, error) { +func (k *Keeper) GetPreviousInferenceRewardFraction(ctx context.Context, topicId TopicId, worker ActorId) ( + previousInferenceRewardFraction alloraMath.Dec, noPrior bool, err error) { key := collections.Join(topicId, worker) - reward, err := k.previousInferenceRewardFraction.Get(ctx, key) + previousInferenceRewardFraction, err = k.previousInferenceRewardFraction.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { return alloraMath.ZeroDec(), true, nil } return alloraMath.Dec{}, false, errorsmod.Wrap(err, "error getting previous inference reward fraction") } - return reward, false, nil + return previousInferenceRewardFraction, false, nil } // Sets the previous U_{i-1,m} @@ -3085,16 +3151,17 @@ func (k *Keeper) SetPreviousInferenceRewardFraction(ctx context.Context, topicId // Gets the previous V_{i-1,m} // Returns previous reward fraction, and true if it has yet to be set for the first time (else false) -func (k *Keeper) GetPreviousForecastRewardFraction(ctx context.Context, topicId TopicId, worker ActorId) (alloraMath.Dec, bool, error) { +func (k *Keeper) GetPreviousForecastRewardFraction(ctx context.Context, topicId TopicId, worker ActorId) ( + previousForecastRewardFraction alloraMath.Dec, noPrior bool, err error) { key := collections.Join(topicId, worker) - reward, err := k.previousForecastRewardFraction.Get(ctx, key) + previousForecastRewardFraction, err = k.previousForecastRewardFraction.Get(ctx, key) if err != nil { if errors.Is(err, collections.ErrNotFound) { return alloraMath.ZeroDec(), true, nil } return alloraMath.Dec{}, false, errorsmod.Wrap(err, "error getting previous forecast reward fraction") } - return reward, false, nil + return previousForecastRewardFraction, false, nil } // Sets the previous V_{i-1,m} diff --git a/x/emissions/keeper/keeper_test.go b/x/emissions/keeper/keeper_test.go index 73a99234d..3a604b6bc 100644 --- a/x/emissions/keeper/keeper_test.go +++ b/x/emissions/keeper/keeper_test.go @@ -67,7 +67,7 @@ func (s *KeeperTestSuite) SetupTest() { storeService := runtime.NewKVStoreService(key) s.storeService = storeService testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) s.codec = encCfg.Codec addressCodec := address.NewBech32Codec(params.Bech32PrefixAccAddr) @@ -194,6 +194,7 @@ func (s *KeeperTestSuite) CreateOneTopic(epochLen int64) uint64 { EpochLength: epochLen, GroundTruthLag: epochLen, WorkerSubmissionWindow: epochLen, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), @@ -1312,7 +1313,7 @@ func (s *KeeperTestSuite) TestGetReputerLossBundlesAtBlock() { // Test getting data before any insert, should return error or nil result, err := s.emissionsKeeper.GetReputerLossBundlesAtBlock(ctx, topicId, block) require.NoError(err) - require.Nil(result.ReputerValueBundles, "Result should be nil for non-existent data") + require.Empty(result.ReputerValueBundles, "Result should be empty for non-existent data") } func (s *KeeperTestSuite) TestInsertNetworkLossBundleAtBlock() { @@ -1347,6 +1348,7 @@ func (s *KeeperTestSuite) TestInsertNetworkLossBundleAtBlock() { require.Equal(&lossBundle, result, "Retrieved data should match inserted data") } +// this unit test needs to be completely rewritten, PROTO-2575 func (s *KeeperTestSuite) TestGetNetworkLossBundleAtBlock() { ctx := s.ctx require := s.Require() @@ -1355,8 +1357,9 @@ func (s *KeeperTestSuite) TestGetNetworkLossBundleAtBlock() { // Attempt to retrieve before insertion result, err := s.emissionsKeeper.GetNetworkLossBundleAtBlock(ctx, topicId, block) - require.NoError(err, "Should return error for non-existent data") - require.Equal(uint64(0), result.TopicId, "Result should be nil for non-existent data") + require.NoError(err, "Should not return error for empty loss bundle") + require.NotNil(result) + require.Equal(topicId, result.TopicId, "Result should be not be nil for non-existent data") } func (s *KeeperTestSuite) TestGetLatestNetworkLossBundle() { @@ -3231,10 +3234,18 @@ func (s *KeeperTestSuite) TestPruneRecordsAfterRewards() { ReputerNonce: &types.Nonce{BlockHeight: block}, } networkLosses := types.ValueBundle{ - Reputer: s.addrsStr[4], - CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: s.addrsStr[4], + CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } err = s.emissionsKeeper.InsertNetworkLossBundleAtBlock(s.ctx, topicId, block, networkLosses) s.Require().NoError(err, "InsertNetworkLossBundleAtBlock should not return an error") @@ -3244,8 +3255,9 @@ func (s *KeeperTestSuite) TestPruneRecordsAfterRewards() { s.Require().NoError(err, "Getting inferences should not fail") _, err = s.emissionsKeeper.GetForecastsAtBlock(s.ctx, topicId, block) s.Require().NoError(err, "Getting forecasts should not fail") - _, err = s.emissionsKeeper.GetReputerLossBundlesAtBlock(s.ctx, topicId, block) + lossBundles, err := s.emissionsKeeper.GetReputerLossBundlesAtBlock(s.ctx, topicId, block) s.Require().NoError(err, "Getting reputer loss bundles should not fail") + s.Require().NotNil(lossBundles) _, err = s.emissionsKeeper.GetNetworkLossBundleAtBlock(s.ctx, topicId, block) s.Require().NoError(err, "Getting network loss bundle should not fail") @@ -3265,8 +3277,15 @@ func (s *KeeperTestSuite) TestPruneRecordsAfterRewards() { s.Require().Empty(lossbundles.ReputerValueBundles, "Must be pruned") networkBundles, err := s.emissionsKeeper.GetNetworkLossBundleAtBlock(s.ctx, topicId, block) s.Require().NoError(err, "Getting network loss bundle should not fail but be empty") - s.Require().Equal(uint64(0), networkBundles.TopicId, "Must be pruned as evidenced by nil topic id") - s.Require().Equal("0", networkBundles.CombinedValue.String(), "Must be pruned as evidenced by nil combined value") + s.Require().Equal(topicId, networkBundles.TopicId, "topic id returned") + s.Require().Empty(networkBundles.InfererValues, "inferer values is empty") + s.Require().Empty(networkBundles.ForecasterValues, "forecaster values is empty") + s.Require().Empty(networkBundles.OneOutInfererValues, "one out inferer values is empty") + s.Require().Empty(networkBundles.OneOutForecasterValues, "one out forecaster values is empty") + s.Require().Empty(networkBundles.OneInForecasterValues, "one in forecaster values is empty") + s.Require().Empty(networkBundles.OneOutInfererForecasterValues, "one out inferer forecaster values is empty") + s.Require().Equal("0", networkBundles.CombinedValue.String(), "Must be pruned as evidenced by empty combined value") + s.Require().Equal("0", networkBundles.NaiveValue.String(), "Must be pruned as evidenced by empty naive value") } func (s *KeeperTestSuite) TestPruneWorkerNoncesLogicNoNonces() { @@ -3512,7 +3531,7 @@ func (s *KeeperTestSuite) TestDeleteUnfulfilledWorkerNonces() { // Check that the nonces were removed nonces, err := s.emissionsKeeper.GetUnfulfilledWorkerNonces(s.ctx, topicId) s.Require().NoError(err) - s.Require().Nil(nonces.Nonces) + s.Require().Empty(nonces.Nonces) } func (s *KeeperTestSuite) TestDeleteUnfulfilledreputerNonces() { @@ -3531,7 +3550,7 @@ func (s *KeeperTestSuite) TestDeleteUnfulfilledreputerNonces() { // Check that the nonces were removed nonces, err := s.emissionsKeeper.GetUnfulfilledReputerNonces(s.ctx, topicId) s.Require().NoError(err) - s.Require().Nil(nonces.Nonces) + s.Require().Empty(nonces.Nonces) } func (s *KeeperTestSuite) TestGetFirstStakeRemovalForReputerAndTopicId() { @@ -3681,7 +3700,12 @@ func (s *KeeperTestSuite) TestAppendInference() { blockHeightInferences = blockHeightInferences + topic.EpochLength newInference := types.Inference{ - TopicId: topicId, BlockHeight: blockHeightInferences, Inferer: worker4, Value: alloraMath.MustNewDecFromString("0.52"), + TopicId: topicId, + BlockHeight: blockHeightInferences, + Inferer: worker4, + Value: alloraMath.MustNewDecFromString("0.52"), + ExtraData: nil, + Proof: "", } err = k.AppendInference(ctx, topic, nonce.BlockHeight, &newInference) s.Require().NoError(err) @@ -3697,7 +3721,12 @@ func (s *KeeperTestSuite) TestAppendInference() { s.Require().NoError(err) blockHeightInferences = blockHeightInferences + topic.EpochLength newInference2 := types.Inference{ - TopicId: topicId, BlockHeight: blockHeightInferences, Inferer: worker5, Value: alloraMath.MustNewDecFromString("0.52"), + TopicId: topicId, + BlockHeight: blockHeightInferences, + Inferer: worker5, + Value: alloraMath.MustNewDecFromString("0.52"), + ExtraData: nil, + Proof: "", } worker5OgScore, err := k.GetInfererScoreEma(ctx, topicId, worker5) s.Require().NoError(err) @@ -3742,7 +3771,12 @@ func (s *KeeperTestSuite) TestAppendInference() { // Ensure passive set participant can't update their score within the same epoch blockHeightInferences = blockHeightInferences + 1 // within the same epoch => no update newInference2 = types.Inference{ - TopicId: topicId, BlockHeight: blockHeightInferences, Inferer: worker2, Value: alloraMath.MustNewDecFromString("0.52"), + TopicId: topicId, + BlockHeight: blockHeightInferences, + Inferer: worker2, + Value: alloraMath.MustNewDecFromString("0.52"), + ExtraData: nil, + Proof: "", } err = k.AppendInference(ctx, topic, nonce.BlockHeight, &newInference2) s.Require().Error(err, types.ErrCantUpdateEmaMoreThanOncePerWindow.Error()) @@ -3899,6 +3933,7 @@ func (s *KeeperTestSuite) TestAppendForecast() { Value: alloraMath.MustNewDecFromString("0.52"), }, }, + ExtraData: nil, } topic, err := k.GetTopic(ctx, topicId) s.Require().NoError(err) @@ -3926,6 +3961,7 @@ func (s *KeeperTestSuite) TestAppendForecast() { Value: alloraMath.MustNewDecFromString("0.52"), }, }, + ExtraData: nil, } err = k.AppendForecast(ctx, topic, nonce.BlockHeight, &newInference2) s.Require().NoError(err) @@ -3968,10 +4004,18 @@ func (s *KeeperTestSuite) TestAppendReputerLoss() { s.Require().NoError(err) valueBundleReputer1 := types.ValueBundle{ - Reputer: reputer1, - CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer1, + CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } signature := s.signValueBundle(&valueBundleReputer1, s.privKeys[0]) reputerValueBundle1 := types.ReputerValueBundle{ @@ -3980,10 +4024,18 @@ func (s *KeeperTestSuite) TestAppendReputerLoss() { Pubkey: s.pubKeyHexStr[0], } valueBundleReputer2 := types.ValueBundle{ - Reputer: reputer2, - CombinedValue: alloraMath.MustNewDecFromString(".00000962701954026944"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer2, + CombinedValue: alloraMath.MustNewDecFromString(".00000962701954026944"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } signature = s.signValueBundle(&valueBundleReputer2, s.privKeys[1]) reputerValueBundle2 := types.ReputerValueBundle{ @@ -3992,10 +4044,18 @@ func (s *KeeperTestSuite) TestAppendReputerLoss() { Pubkey: s.pubKeyHexStr[1], } valueBundleReputer3 := types.ValueBundle{ - Reputer: reputer3, - CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer3, + CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } signature = s.signValueBundle(&valueBundleReputer3, s.privKeys[2]) reputerValueBundle3 := types.ReputerValueBundle{ @@ -4015,10 +4075,18 @@ func (s *KeeperTestSuite) TestAppendReputerLoss() { s.Require().NoError(err) valueBundleReputer4 := types.ValueBundle{ - Reputer: reputer4, - CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer4, + CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } signature = s.signValueBundle(&valueBundleReputer4, s.privKeys[3]) reputerValueBundle4 := types.ReputerValueBundle{ @@ -4040,10 +4108,18 @@ func (s *KeeperTestSuite) TestAppendReputerLoss() { s.Require().Equal(len(newAllReputerLosses.ReputerValueBundles), len(allReputerLosses.ReputerValueBundles)+1) valueBundleReputer5 := types.ValueBundle{ - Reputer: reputer5, - CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer5, + CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, } signature = s.signValueBundle(&valueBundleReputer5, s.privKeys[4]) reputerValueBundle5 := types.ReputerValueBundle{ diff --git a/x/emissions/keeper/msgserver/msg_server.go b/x/emissions/keeper/msgserver/msg_server.go index f35f9e1b8..25d67d271 100644 --- a/x/emissions/keeper/msgserver/msg_server.go +++ b/x/emissions/keeper/msgserver/msg_server.go @@ -12,7 +12,7 @@ type msgServer struct { k keeper.Keeper } -var _ types.MsgServiceServer = msgServer{} +var _ types.MsgServiceServer = msgServer{k: keeper.Keeper{}} // NewMsgServerImpl returns an implementation of the module MsgServer interface. func NewMsgServerImpl(keeper keeper.Keeper) types.MsgServiceServer { diff --git a/x/emissions/keeper/msgserver/msg_server_params_test.go b/x/emissions/keeper/msgserver/msg_server_params_test.go index 58b29427a..950a36b3c 100644 --- a/x/emissions/keeper/msgserver/msg_server_params_test.go +++ b/x/emissions/keeper/msgserver/msg_server_params_test.go @@ -20,40 +20,47 @@ func (s *MsgServerTestSuite) TestUpdateAllParams() { require.NoError(err) newParams := &types.OptionalParams{ - Version: []string{"1234"}, - MinTopicWeight: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - RequiredMinimumStake: []cosmosMath.Int{cosmosMath.NewInt(1234)}, - RemoveStakeDelayWindow: []int64{1234}, - MinEpochLength: []int64{1234}, - BetaEntropy: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - LearningRate: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - GradientDescentMaxIters: []uint64{1234}, - MaxGradientThreshold: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - MinStakeFraction: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - EpsilonReputer: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - MaxUnfulfilledWorkerRequests: []uint64{1234}, - MaxUnfulfilledReputerRequests: []uint64{1234}, - TopicRewardStakeImportance: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - TopicRewardFeeRevenueImportance: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - TopicRewardAlpha: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - TaskRewardAlpha: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - ValidatorsVsAlloraPercentReward: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, - MaxSamplesToScaleScores: []uint64{1234}, - MaxTopInferersToReward: []uint64{1234}, - MaxTopForecastersToReward: []uint64{1234}, - MaxTopReputersToReward: []uint64{1234}, - CreateTopicFee: []cosmosMath.Int{cosmosMath.NewInt(1234)}, - RegistrationFee: []cosmosMath.Int{cosmosMath.NewInt(1234)}, - DefaultPageLimit: []uint64{1234}, - MaxPageLimit: []uint64{1234}, - MinEpochLengthRecordLimit: []int64{1234}, - MaxSerializedMsgLength: []int64{1234}, - PRewardInference: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - PRewardForecast: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - PRewardReputer: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - CRewardInference: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - CRewardForecast: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, - CNorm: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + Version: []string{"1234"}, + MinTopicWeight: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + RequiredMinimumStake: []cosmosMath.Int{cosmosMath.NewInt(1234)}, + RemoveStakeDelayWindow: []int64{1234}, + MinEpochLength: []int64{1234}, + BetaEntropy: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + LearningRate: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + GradientDescentMaxIters: []uint64{1234}, + MaxGradientThreshold: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + MinStakeFraction: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + EpsilonReputer: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + MaxUnfulfilledWorkerRequests: []uint64{1234}, + MaxUnfulfilledReputerRequests: []uint64{1234}, + TopicRewardStakeImportance: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + TopicRewardFeeRevenueImportance: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + TopicRewardAlpha: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + TaskRewardAlpha: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + ValidatorsVsAlloraPercentReward: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + MaxSamplesToScaleScores: []uint64{1234}, + MaxTopInferersToReward: []uint64{1234}, + MaxTopForecastersToReward: []uint64{1234}, + MaxTopReputersToReward: []uint64{1234}, + CreateTopicFee: []cosmosMath.Int{cosmosMath.NewInt(1234)}, + RegistrationFee: []cosmosMath.Int{cosmosMath.NewInt(1234)}, + DefaultPageLimit: []uint64{1234}, + MaxPageLimit: []uint64{1234}, + MinEpochLengthRecordLimit: []int64{1234}, + MaxSerializedMsgLength: []int64{1234}, + PRewardInference: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + PRewardForecast: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + PRewardReputer: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + CRewardInference: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + CRewardForecast: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + CNorm: []alloraMath.Dec{alloraMath.NewDecFromInt64(1234)}, + BlocksPerMonth: []uint64{1234}, + HalfMaxProcessStakeRemovalsEndBlock: []uint64{1234}, + DataSendingFee: []cosmosMath.Int{cosmosMath.NewInt(1234)}, + EpsilonSafeDiv: []alloraMath.Dec{alloraMath.MustNewDecFromString(".1234")}, + MaxElementsPerForecast: []uint64{1234}, + MaxActiveTopicsPerBlock: []uint64{1234}, + MaxStringLength: []uint64{1234}, } updateMsg := &types.UpdateParamsRequest{ @@ -115,6 +122,47 @@ func (s *MsgServerTestSuite) TestUpdateParamsNonWhitelistedUser() { // Define new parameters to update newParams := &types.OptionalParams{ Version: []string{"2.0"}, // example of changing the version + // don't update the following params + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + MinEpochLength: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + MaxTopReputersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + EpsilonReputer: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxElementsPerForecast: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, } // Creating the UpdateParamsRequest message with a non-whitelisted user diff --git a/x/emissions/keeper/msgserver/msg_server_registrations_test.go b/x/emissions/keeper/msgserver/msg_server_registrations_test.go index ceb2321b5..799a04596 100644 --- a/x/emissions/keeper/msgserver/msg_server_registrations_test.go +++ b/x/emissions/keeper/msgserver/msg_server_registrations_test.go @@ -312,6 +312,7 @@ func (s *MsgServerTestSuite) TestBlocklistedAddressUnableToRegister() { EpochLength: epochLength, GroundTruthLag: epochLength, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), diff --git a/x/emissions/keeper/msgserver/msg_server_reputer_payload_test.go b/x/emissions/keeper/msgserver/msg_server_reputer_payload_test.go index ac0e4ed4b..2adb6cb47 100644 --- a/x/emissions/keeper/msgserver/msg_server_reputer_payload_test.go +++ b/x/emissions/keeper/msgserver/msg_server_reputer_payload_test.go @@ -83,9 +83,11 @@ func (s *MsgServerTestSuite) setUpMsgReputerPayload( } reputerValueBundle = types.ValueBundle{ - TopicId: topicId, - Reputer: reputerAddr.String(), - CombinedValue: alloraMath.NewDecFromInt64(100), + TopicId: topicId, + ReputerRequestNonce: &types.ReputerRequestNonce{ReputerNonce: &workerNonce}, + Reputer: reputerAddr.String(), + ExtraData: nil, + CombinedValue: alloraMath.NewDecFromInt64(100), InfererValues: []*types.WorkerAttributedValue{ { Worker: workerAddr.String(), @@ -112,9 +114,7 @@ func (s *MsgServerTestSuite) setUpMsgReputerPayload( Value: alloraMath.NewDecFromInt64(100), }, }, - ReputerRequestNonce: &types.ReputerRequestNonce{ - ReputerNonce: &workerNonce, - }, + OneOutInfererForecasterValues: nil, } return reputerValueBundle, expectedInferences, expectedForecasts, topicId diff --git a/x/emissions/keeper/msgserver/msg_server_stake_test.go b/x/emissions/keeper/msgserver/msg_server_stake_test.go index 02d4ce678..5ac877d93 100644 --- a/x/emissions/keeper/msgserver/msg_server_stake_test.go +++ b/x/emissions/keeper/msgserver/msg_server_stake_test.go @@ -35,6 +35,7 @@ func (s *MsgServerTestSuite) commonStakingSetup( EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), @@ -78,9 +79,10 @@ func (s *MsgServerTestSuite) commonStakingSetup( // Register Worker workerRegMsg := &types.RegisterRequest{ - Sender: worker, - Owner: worker, - TopicId: topicId, + Sender: worker, + Owner: worker, + TopicId: topicId, + IsReputer: false, } _, err = msgServer.Register(ctx, workerRegMsg) require.NoError(err, "Registering worker should not return an error") @@ -1400,11 +1402,21 @@ func (s *MsgServerTestSuite) TestRewardDelegateStake() { reputerValueBundle := &types.ReputerValueBundle{ ValueBundle: &types.ValueBundle{ - TopicId: topicId, - Reputer: reputer, - CombinedValue: alloraMath.MustNewDecFromString("1500.0"), - NaiveValue: alloraMath.MustNewDecFromString("1500.0"), + TopicId: topicId, + ReputerRequestNonce: &types.ReputerRequestNonce{ReputerNonce: &types.Nonce{BlockHeight: block}}, + Reputer: reputer, + ExtraData: nil, + CombinedValue: alloraMath.MustNewDecFromString("1500.0"), + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("1500.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, }, + Signature: []byte{}, + Pubkey: "", } reputerValueBundles.ReputerValueBundles = append(reputerValueBundles.ReputerValueBundles, reputerValueBundle) _ = s.emissionsKeeper.InsertReputerLossBundlesAtBlock(s.ctx, topicId, block, reputerValueBundles) @@ -1456,11 +1468,21 @@ func (s *MsgServerTestSuite) TestRewardDelegateStake() { newReputerValueBundle := &types.ReputerValueBundle{ ValueBundle: &types.ValueBundle{ - TopicId: topicId, - Reputer: reputer, - CombinedValue: alloraMath.MustNewDecFromString("1500.0"), - NaiveValue: alloraMath.MustNewDecFromString("1500.0"), + TopicId: topicId, + ReputerRequestNonce: &types.ReputerRequestNonce{ReputerNonce: &types.Nonce{BlockHeight: newBlock}}, + Reputer: reputer, + ExtraData: nil, + CombinedValue: alloraMath.MustNewDecFromString("1500.0"), + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("1500.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, }, + Signature: []byte{}, + Pubkey: "", } newReputerValueBundles.ReputerValueBundles = append(newReputerValueBundles.ReputerValueBundles, newReputerValueBundle) _ = s.emissionsKeeper.InsertReputerLossBundlesAtBlock(s.ctx, topicId, newBlock, newReputerValueBundles) @@ -2023,9 +2045,10 @@ func (s *MsgServerTestSuite) TestCancelRemoveDelegateStake() { // Call CancelRemoveDelegateStake msg := &types.CancelRemoveDelegateStakeRequest{ - Sender: delegator, - Reputer: reputer, - TopicId: topicId, + Sender: delegator, + Reputer: reputer, + TopicId: topicId, + Delegator: delegator, } _, err = s.msgServer.CancelRemoveDelegateStake(ctx, msg) require.NoError(err) @@ -2052,9 +2075,10 @@ func (s *MsgServerTestSuite) TestCancelRemoveDelegateStakeNotExist() { // Call CancelRemoveDelegateStake msg := &types.CancelRemoveDelegateStakeRequest{ - Sender: delegator, - Reputer: reputer, - TopicId: topicId, + Sender: delegator, + Reputer: reputer, + TopicId: topicId, + Delegator: delegator, } _, err := s.msgServer.CancelRemoveDelegateStake(ctx, msg) require.Error(err) diff --git a/x/emissions/keeper/msgserver/msg_server_test.go b/x/emissions/keeper/msgserver/msg_server_test.go index b8fee1edf..451f9c51d 100644 --- a/x/emissions/keeper/msgserver/msg_server_test.go +++ b/x/emissions/keeper/msgserver/msg_server_test.go @@ -77,7 +77,7 @@ func (s *MsgServerTestSuite) SetupTest() { storeService := runtime.NewKVStoreService(key) s.storeService = storeService testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct // dependency code encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) s.codec = encCfg.Codec addressCodec := address.NewBech32Codec(params.Bech32PrefixAccAddr) @@ -211,6 +211,8 @@ func (s *MsgServerTestSuite) CreateCustomEpochTopic(epochLen int64) types.Topic Metadata: newTopicMsg.Metadata, LossMethod: newTopicMsg.LossMethod, EpochLength: newTopicMsg.EpochLength, + EpochLastEnded: 0, + InitialRegret: alloraMath.ZeroDec(), GroundTruthLag: newTopicMsg.GroundTruthLag, WorkerSubmissionWindow: newTopicMsg.WorkerSubmissionWindow, AlphaRegret: newTopicMsg.AlphaRegret, @@ -239,6 +241,7 @@ func (s *MsgServerTestSuite) TestCreateSeveralTopics() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), diff --git a/x/emissions/keeper/msgserver/msg_server_topics_test.go b/x/emissions/keeper/msgserver/msg_server_topics_test.go index 5d3856f38..629d4f471 100644 --- a/x/emissions/keeper/msgserver/msg_server_topics_test.go +++ b/x/emissions/keeper/msgserver/msg_server_topics_test.go @@ -24,6 +24,7 @@ func (s *MsgServerTestSuite) TestMsgCreateNewTopic() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), @@ -67,6 +68,7 @@ func (s *MsgServerTestSuite) TestMsgCreateNewTopicWithEpsilonZeroFails() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0"), @@ -114,6 +116,7 @@ func (s *MsgServerTestSuite) TestMsgCreateNewTopicTooLongMetadataFails() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), @@ -145,6 +148,7 @@ func (s *MsgServerTestSuite) TestMsgCreateNewTopicTooLongLossMethodFails() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), diff --git a/x/emissions/keeper/msgserver/msg_server_worker_payload_test.go b/x/emissions/keeper/msgserver/msg_server_worker_payload_test.go index d00792861..55c86cfb8 100644 --- a/x/emissions/keeper/msgserver/msg_server_worker_payload_test.go +++ b/x/emissions/keeper/msgserver/msg_server_worker_payload_test.go @@ -72,6 +72,8 @@ func (s *MsgServerTestSuite) setUpMsgInsertWorkerPayloadWithBlockHeight( BlockHeight: nonce.BlockHeight, Inferer: worker, Value: alloraMath.NewDecFromInt64(100), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topic.Id, @@ -95,8 +97,11 @@ func (s *MsgServerTestSuite) setUpMsgInsertWorkerPayloadWithBlockHeight( Value: alloraMath.NewDecFromInt64(103), }, }, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: []byte{}, + Pubkey: "", }, } @@ -282,6 +287,47 @@ func (s *MsgServerTestSuite) TestMsgInsertWorkerPayloadWithFewTopElementsPerFore newParams := &types.OptionalParams{ MaxElementsPerForecast: []uint64{3}, + // not updated + Version: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + MinEpochLength: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + MaxTopReputersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + EpsilonReputer: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, } updateMsg := &types.UpdateParamsRequest{ @@ -499,21 +545,28 @@ func (s *MsgServerTestSuite) TestInsertingHugeBundleWorkerPayloadFails() { workerMsg := &types.InsertWorkerPayloadRequest{ Sender: worker, WorkerDataBundle: &types.WorkerDataBundle{ - Worker: InfererAddr, + TopicId: topicId, + Worker: InfererAddr, + Nonce: &nonce, InferenceForecastsBundle: &types.InferenceForecastBundle{ Inference: &types.Inference{ TopicId: topicId, BlockHeight: nonce.BlockHeight, Inferer: InfererAddr, Value: alloraMath.NewDecFromInt64(100), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: 0, BlockHeight: nonce.BlockHeight, Forecaster: ForecasterAddr, ForecastElements: forecastElements, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: []byte(""), + Pubkey: "", }, } @@ -577,6 +630,8 @@ func (s *MsgServerTestSuite) TestMsgInsertWorkerPayloadVerifyFailed() { BlockHeight: nonce.BlockHeight, Inferer: Inferer, Value: alloraMath.NewDecFromInt64(100), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -592,8 +647,11 @@ func (s *MsgServerTestSuite) TestMsgInsertWorkerPayloadVerifyFailed() { Value: alloraMath.NewDecFromInt64(100), }, }, + ExtraData: nil, }, }, + InferencesForecastsBundleSignature: []byte(""), + Pubkey: "", }, } @@ -613,6 +671,47 @@ func (s *MsgServerTestSuite) TestMsgInsertWorkerPayloadWithLowScoreForecastsAreR newParams := &types.OptionalParams{ MaxElementsPerForecast: []uint64{3}, + // not updated + Version: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + MinEpochLength: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopInferersToReward: nil, + MaxTopForecastersToReward: nil, + MaxTopReputersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + RegistrationFee: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + EpsilonReputer: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxActiveTopicsPerBlock: nil, + MaxStringLength: nil, } updateMsg := &types.UpdateParamsRequest{ diff --git a/x/emissions/keeper/quadruple.go b/x/emissions/keeper/quadruple.go index 1eebd95f2..4ca067e1a 100644 --- a/x/emissions/keeper/quadruple.go +++ b/x/emissions/keeper/quadruple.go @@ -59,17 +59,17 @@ func (t Quadruple[K1, K2, K3, K4]) K4() (x K4) { // QuadrupleSinglePrefix creates a new Quadruple instance composed only of the first part of the key. func QuadrupleSinglePrefix[K1, K2, K3, K4 any](k1 K1) Quadruple[K1, K2, K3, K4] { - return Quadruple[K1, K2, K3, K4]{k1: &k1} + return Quadruple[K1, K2, K3, K4]{k1: &k1} //nolint:exhaustruct } // QuadrupleDoublePrefix creates a new Quadruple instance composed only of the first two parts of the key. func QuadrupleDoublePrefix[K1, K2, K3, K4 any](k1 K1, k2 K2) Quadruple[K1, K2, K3, K4] { - return Quadruple[K1, K2, K3, K4]{k1: &k1, k2: &k2} + return Quadruple[K1, K2, K3, K4]{k1: &k1, k2: &k2} //nolint:exhaustruct } // QuadrupleTriplePrefix creates a new Quadruple instance composed only of the first three parts of the key. func QuadrupleTriplePrefix[K1, K2, K3, K4 any](k1 K1, k2 K2, k3 K3) Quadruple[K1, K2, K3, K4] { - return Quadruple[K1, K2, K3, K4]{k1: &k1, k2: &k2, k3: &k3} + return Quadruple[K1, K2, K3, K4]{k1: &k1, k2: &k2, k3: &k3} //nolint:exhaustruct } // QuadrupleKeyCodec instantiates a new KeyCodec instance that can encode the Quadruple, given diff --git a/x/emissions/keeper/queryserver/query_server.go b/x/emissions/keeper/queryserver/query_server.go index a61c0a3cf..bdc840799 100644 --- a/x/emissions/keeper/queryserver/query_server.go +++ b/x/emissions/keeper/queryserver/query_server.go @@ -5,7 +5,7 @@ import ( "github.com/allora-network/allora-chain/x/emissions/types" ) -var _ types.QueryServiceServer = queryServer{} +var _ types.QueryServiceServer = queryServer{k: keeper.Keeper{}} // NewQueryServerImpl returns an implementation of the module QueryServer. func NewQueryServerImpl(k keeper.Keeper) types.QueryServiceServer { diff --git a/x/emissions/keeper/queryserver/query_server_inferences_test.go b/x/emissions/keeper/queryserver/query_server_inferences_test.go index b0cb171e2..4017c0bf7 100644 --- a/x/emissions/keeper/queryserver/query_server_inferences_test.go +++ b/x/emissions/keeper/queryserver/query_server_inferences_test.go @@ -86,6 +86,8 @@ func (s *QueryServerTestSuite) TestGetWorkerLatestInferenceByTopicId() { BlockHeight: blockHeight, Inferer: workerAddress, Value: alloraMath.MustNewDecFromString("123.456"), + ExtraData: nil, + Proof: "", } inferences := types.Inferences{ Inferences: []*types.Inference{&inference}, @@ -925,6 +927,7 @@ func (s *QueryServerTestSuite) TestTestGetLatestAvailableNetworkInferenceWithMis ForecasterValues: nil, OneOutInfererValues: nil, OneOutForecasterValues: nil, + OneInForecasterValues: nil, OneOutInfererForecasterValues: nil, } err = keeper.InsertNetworkLossBundleAtBlock(s.ctx, topicId, lossBlockHeight, lossBundle) diff --git a/x/emissions/keeper/queryserver/query_server_losses_test.go b/x/emissions/keeper/queryserver/query_server_losses_test.go index 43134412f..35a69216d 100644 --- a/x/emissions/keeper/queryserver/query_server_losses_test.go +++ b/x/emissions/keeper/queryserver/query_server_losses_test.go @@ -25,6 +25,8 @@ func (s *QueryServerTestSuite) TestGetNetworkLossBundleAtBlock() { }, ExtraData: []byte("sample_extra_data"), InfererValues: nil, + CombinedValue: alloraMath.ZeroDec(), + NaiveValue: alloraMath.ZeroDec(), ForecasterValues: nil, OneOutInfererValues: nil, OneOutForecasterValues: nil, @@ -140,18 +142,18 @@ func (s *QueryServerTestSuite) TestGetReputerLossBundlesAtBlock() { } response, err := s.queryServer.GetReputerLossBundlesAtBlock(ctx, req) require.NoError(err) - require.Nil(response.LossBundles.ReputerValueBundles) + require.Empty(response.LossBundles.ReputerValueBundles) // Test inserting data err = s.emissionsKeeper.InsertReputerLossBundlesAtBlock(ctx, topicId, block, reputerLossBundles) require.NoError(err, "InsertReputerLossBundlesAtBlock should not return an error") response, err = s.queryServer.GetReputerLossBundlesAtBlock(ctx, req) - require.NotNil(response) + require.NotEmpty(response) require.NoError(err) result := response.LossBundles - require.NotNil(result) + require.NotEmpty(result) require.Equal(&reputerLossBundles, result, "Retrieved data should match inserted data") } diff --git a/x/emissions/keeper/queryserver/query_server_stake.go b/x/emissions/keeper/queryserver/query_server_stake.go index 17f1ca6bb..b988010b5 100644 --- a/x/emissions/keeper/queryserver/query_server_stake.go +++ b/x/emissions/keeper/queryserver/query_server_stake.go @@ -376,7 +376,7 @@ func (qs queryServer) GetStakeRemovalForReputerAndTopicId( return nil, err } if !found { - return &types.GetStakeRemovalForReputerAndTopicIdResponse{}, nil + return &types.GetStakeRemovalForReputerAndTopicIdResponse{StakeRemovalInfo: nil}, nil } return &types.GetStakeRemovalForReputerAndTopicIdResponse{StakeRemovalInfo: &stakeRemovalInfo}, nil diff --git a/x/emissions/keeper/queryserver/query_server_test.go b/x/emissions/keeper/queryserver/query_server_test.go index 095908826..11c175c34 100644 --- a/x/emissions/keeper/queryserver/query_server_test.go +++ b/x/emissions/keeper/queryserver/query_server_test.go @@ -70,7 +70,7 @@ func (s *QueryServerTestSuite) SetupTest() { key := storetypes.NewKVStoreKey("emissions") storeService := runtime.NewKVStoreService(key) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) addressCodec := address.NewBech32Codec(params.Bech32PrefixAccAddr) @@ -187,6 +187,7 @@ func (s *QueryServerTestSuite) CreateOneTopic() uint64 { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), @@ -220,6 +221,7 @@ func (s *QueryServerTestSuite) TestCreateSeveralTopics() { EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, + AllowNegative: false, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), Epsilon: alloraMath.MustNewDecFromString("0.01"), diff --git a/x/emissions/keeper/queryserver/query_server_topics.go b/x/emissions/keeper/queryserver/query_server_topics.go index d1e15ed43..cd04d891d 100644 --- a/x/emissions/keeper/queryserver/query_server_topics.go +++ b/x/emissions/keeper/queryserver/query_server_topics.go @@ -162,7 +162,7 @@ func (qs queryServer) GetActiveTopicsAtBlock( topics = append(topics, &topic) } - return &types.GetActiveTopicsAtBlockResponse{Topics: topics}, nil + return &types.GetActiveTopicsAtBlockResponse{Topics: topics, Pagination: nil}, nil } func (qs queryServer) GetNextChurningBlockByTopicId( diff --git a/x/emissions/keeper/score_utils_test.go b/x/emissions/keeper/score_utils_test.go index 2a0b02499..a2b77aac8 100644 --- a/x/emissions/keeper/score_utils_test.go +++ b/x/emissions/keeper/score_utils_test.go @@ -132,26 +132,50 @@ func (s *KeeperTestSuite) TestGetLowScoreFromAllLossBundles() { ReputerValueBundles: []*types.ReputerValueBundle{ { ValueBundle: &types.ValueBundle{ - Reputer: reputer1, - CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer1, + CombinedValue: alloraMath.MustNewDecFromString(".0000117005278862668"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, }, }, { ValueBundle: &types.ValueBundle{ - Reputer: reputer2, - CombinedValue: alloraMath.MustNewDecFromString(".00000962701954026944"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer2, + CombinedValue: alloraMath.MustNewDecFromString(".00000962701954026944"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, }, }, { ValueBundle: &types.ValueBundle{ - Reputer: reputer3, - CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), - ReputerRequestNonce: reputerRequestNonce, - TopicId: topicId, + Reputer: reputer3, + CombinedValue: alloraMath.MustNewDecFromString(".0000256948644008351"), + ReputerRequestNonce: reputerRequestNonce, + TopicId: topicId, + ExtraData: nil, + InfererValues: nil, + ForecasterValues: nil, + NaiveValue: alloraMath.MustNewDecFromString("0.0"), + OneOutInfererValues: nil, + OneOutForecasterValues: nil, + OneInForecasterValues: nil, + OneOutInfererForecasterValues: nil, }, }, }, diff --git a/x/emissions/keeper/topic_activation.go b/x/emissions/keeper/topic_activation.go index 7a0de186c..fd7e645ed 100644 --- a/x/emissions/keeper/topic_activation.go +++ b/x/emissions/keeper/topic_activation.go @@ -41,15 +41,21 @@ func (k *Keeper) GetActiveTopicIdsAtBlock(ctx context.Context, block BlockHeight } // Boolean is true if the block is not found (true if no prior value), else false -func (k *Keeper) GetLowestActiveTopicWeightAtBlock(ctx context.Context, block BlockHeight) (types.TopicIdWeightPair, bool, error) { - weight, err := k.blockToLowestActiveTopicWeight.Get(ctx, block) +func (k *Keeper) GetLowestActiveTopicWeightAtBlock( + ctx context.Context, + block BlockHeight, +) (topicIdAndWeight types.TopicIdWeightPair, noPrior bool, err error) { + topicIdAndWeight, err = k.blockToLowestActiveTopicWeight.Get(ctx, block) if err != nil { if errors.IsOf(err, collections.ErrNotFound) { - return types.TopicIdWeightPair{}, true, nil + return types.TopicIdWeightPair{ + TopicId: 0, + Weight: alloraMath.NewDecFromInt64(0), + }, true, nil } return types.TopicIdWeightPair{}, false, err } - return weight, false, nil + return topicIdAndWeight, false, nil } // Removes data for a block if it exists in the maps: diff --git a/x/emissions/migrations/v2/migrate.go b/x/emissions/migrations/v2/migrate.go index ff458ea2d..a92d085ba 100644 --- a/x/emissions/migrations/v2/migrate.go +++ b/x/emissions/migrations/v2/migrate.go @@ -83,7 +83,7 @@ func MigrateTopics(store storetypes.KVStore, cdc codec.BinaryCodec) error { newWorkerSubmissionWindow = max(1, oldMsg.EpochLength/2) } - newMsg := types.Topic{ + newMsg := types.Topic{ //nolint: exhaustruct // not sure if safe to fix, also this upgrade has already happened. Id: oldMsg.Id, Creator: oldMsg.Creator, Metadata: oldMsg.Metadata, @@ -165,6 +165,11 @@ func MigrateNetworkLossBundles(store storetypes.KVStore, cdc codec.BinaryCodec) return err } + newInfererValues := make([]*types.WorkerAttributedValue, 0) + newForecastValues := make([]*types.WorkerAttributedValue, 0) + newOneOutInfererValues := make([]*types.WithheldWorkerAttributedValue, 0) + newOneOutForecasterValues := make([]*types.WithheldWorkerAttributedValue, 0) + newOneInForecastValues := make([]*types.WorkerAttributedValue, 0) newMsg := types.ValueBundle{ TopicId: oldMsg.TopicId, ReputerRequestNonce: &types.ReputerRequestNonce{ @@ -175,15 +180,15 @@ func MigrateNetworkLossBundles(store storetypes.KVStore, cdc codec.BinaryCodec) Reputer: oldMsg.Reputer, ExtraData: oldMsg.ExtraData, CombinedValue: oldMsg.CombinedValue, + InfererValues: newInfererValues, + ForecasterValues: newForecastValues, NaiveValue: oldMsg.NaiveValue, OneOutInfererForecasterValues: []*types.OneOutInfererForecasterValues{}, + OneOutInfererValues: newOneOutInfererValues, + OneOutForecasterValues: newOneOutForecasterValues, + OneInForecasterValues: newOneInForecastValues, } - newInfererValues := make([]*types.WorkerAttributedValue, 0) - newForecastValues := make([]*types.WorkerAttributedValue, 0) - newOneOutInfererValues := make([]*types.WithheldWorkerAttributedValue, 0) - newOneOutForecasterValues := make([]*types.WithheldWorkerAttributedValue, 0) - newOneInForecastValues := make([]*types.WorkerAttributedValue, 0) for _, inference := range oldMsg.InfererValues { newInfererValues = append(newInfererValues, &types.WorkerAttributedValue{ Worker: inference.Worker, diff --git a/x/emissions/migrations/v2/migrate_test.go b/x/emissions/migrations/v2/migrate_test.go index cef4d0a71..7203738ab 100644 --- a/x/emissions/migrations/v2/migrate_test.go +++ b/x/emissions/migrations/v2/migrate_test.go @@ -50,7 +50,7 @@ func (s *EmissionsV2MigrationsTestSuite) SetupTest() { storeService := runtime.NewKVStoreService(key) s.storeService = storeService testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct s.ctx = ctx encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) s.codec = encCfg.Codec @@ -254,6 +254,7 @@ func (s *EmissionsV2MigrationsTestSuite) TestMigrateValueBundle() { ReputerRequestNonce: &oldtypes.ReputerRequestNonce{ ReputerNonce: reputerNonce, }, + Reputer: "testReputer", ExtraData: []byte("testExtraData"), CombinedValue: alloraMath.OneDec(), InfererValues: []*oldtypes.WorkerAttributedValue{ @@ -335,6 +336,7 @@ func (s *EmissionsV2MigrationsTestSuite) TestMigrateAllLossBundles() { ReputerRequestNonce: &oldtypes.ReputerRequestNonce{ ReputerNonce: reputerNonce, }, + Reputer: "testReputer", ExtraData: []byte("testExtraData"), CombinedValue: alloraMath.OneDec(), InfererValues: []*oldtypes.WorkerAttributedValue{ diff --git a/x/emissions/migrations/v3/migrate.go b/x/emissions/migrations/v3/migrate.go index 6ecb747eb..35c4c5f5e 100644 --- a/x/emissions/migrations/v3/migrate.go +++ b/x/emissions/migrations/v3/migrate.go @@ -52,7 +52,7 @@ func MigrateStore(ctx sdk.Context, emissionsKeeper keeper.Keeper) error { } func MigrateParams(store storetypes.KVStore, cdc codec.BinaryCodec) error { - oldParams := oldtypes.Params{} + oldParams := oldtypes.Params{} //nolint: exhaustruct // populated in unmarshal below oldParamsBytes := store.Get(types.ParamsKey) if oldParamsBytes == nil { return errorsmod.Wrapf(types.ErrNotFound, "old parameters not found") @@ -74,7 +74,7 @@ func MigrateParams(store storetypes.KVStore, cdc codec.BinaryCodec) error { // MaxRetriesToFulfilNoncesWorker // MaxRetriesToFulfilNoncesReputer // MaxTopicsPerBlock - newParams := types.Params{ + newParams := types.Params{ //nolint: exhaustruct // not sure if safe to fix, also this upgrade has already happened. Version: oldParams.Version, MaxSerializedMsgLength: oldParams.MaxSerializedMsgLength, MinTopicWeight: oldParams.MinTopicWeight, diff --git a/x/emissions/migrations/v4/migrate.go b/x/emissions/migrations/v4/migrate.go index 7d06437a8..bf5b96668 100644 --- a/x/emissions/migrations/v4/migrate.go +++ b/x/emissions/migrations/v4/migrate.go @@ -58,7 +58,7 @@ func MigrateStore(ctx sdk.Context, emissionsKeeper keeper.Keeper) error { // migrate params for this new version // the only change is the addition of MaxStringLength func MigrateParams(store storetypes.KVStore, cdc codec.BinaryCodec) error { - oldParams := oldV3Types.Params{} + oldParams := oldV3Types.Params{} //nolint: exhaustruct // populated in unmarshal below oldParamsBytes := store.Get(emissionstypes.ParamsKey) if oldParamsBytes == nil { return errorsmod.Wrapf(emissionstypes.ErrNotFound, "old parameters not found") diff --git a/x/emissions/migrations/v4/migrate_test.go b/x/emissions/migrations/v4/migrate_test.go index 34db2db69..0b4944990 100644 --- a/x/emissions/migrations/v4/migrate_test.go +++ b/x/emissions/migrations/v4/migrate_test.go @@ -609,6 +609,7 @@ func getBundle() emissionstypes.ValueBundle { Value: alloraMath.NewDecFromInt64(10), }, }, + OneInForecasterValues: nil, OneOutInfererForecasterValues: []*emissionstypes.OneOutInfererForecasterValues{ { Forecaster: "oneOutInfererForecaster", diff --git a/x/emissions/module/autocli.go b/x/emissions/module/autocli.go index 3733eb591..bfadbd391 100644 --- a/x/emissions/module/autocli.go +++ b/x/emissions/module/autocli.go @@ -659,6 +659,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, }, + SubCommands: nil, + EnhanceCustomCommand: false, + Short: "Emissions module query commands", }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: statev4.MsgService_ServiceDesc.ServiceName, @@ -832,6 +835,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, }, + SubCommands: nil, + EnhanceCustomCommand: false, + Short: "Emissions module transaction commands", }, } } diff --git a/x/emissions/module/depinject.go b/x/emissions/module/depinject.go index ca3c4bbd2..96adbf78a 100644 --- a/x/emissions/module/depinject.go +++ b/x/emissions/module/depinject.go @@ -13,7 +13,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) -var _ appmodule.AppModule = AppModule{} +var _ appmodule.AppModule = AppModule{} // nolint: exhaustruct // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (am AppModule) IsOnePerModuleType() {} @@ -23,7 +23,9 @@ func (am AppModule) IsAppModule() {} func init() { appmodule.Register( - &modulev1.Module{}, + &modulev1.Module{ + FeeCollectorName: authtypes.FeeCollectorName, + }, appmodule.Provide(ProvideModule), ) } @@ -63,5 +65,5 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { ) m := NewAppModule(in.Cdc, k) - return ModuleOutputs{Module: m, Keeper: k} + return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} } diff --git a/x/emissions/module/module.go b/x/emissions/module/module.go index 34ae4ea69..bbe013e20 100644 --- a/x/emissions/module/module.go +++ b/x/emissions/module/module.go @@ -22,10 +22,10 @@ import ( ) var ( - _ module.AppModuleBasic = AppModule{} - _ module.HasGenesis = AppModule{} - _ appmodule.AppModule = AppModule{} - _ appmodule.HasEndBlocker = AppModule{} + _ module.AppModuleBasic = AppModule{} // nolint: exhaustruct + _ module.HasGenesis = AppModule{} // nolint: exhaustruct + _ appmodule.AppModule = AppModule{} // nolint: exhaustruct + _ appmodule.HasEndBlocker = AppModule{} // nolint: exhaustruct ) // ConsensusVersion defines the current module consensus version. diff --git a/x/emissions/module/rewards/reputer_rewards_test.go b/x/emissions/module/rewards/reputer_rewards_test.go index d96dfa1e6..d82f3a116 100644 --- a/x/emissions/module/rewards/reputer_rewards_test.go +++ b/x/emissions/module/rewards/reputer_rewards_test.go @@ -657,6 +657,7 @@ func CreateTopic(ctx context.Context, msgServer types.MsgServiceServer, creator LossMethod: "mse", EpochLength: 10800, GroundTruthLag: 10800, + AllowNegative: false, WorkerSubmissionWindow: 10, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), diff --git a/x/emissions/module/rewards/rewards_internal_test.go b/x/emissions/module/rewards/rewards_internal_test.go index d3219e1d4..98b902210 100644 --- a/x/emissions/module/rewards/rewards_internal_test.go +++ b/x/emissions/module/rewards/rewards_internal_test.go @@ -5,18 +5,25 @@ import ( "testing" alloraMath "github.com/allora-network/allora-chain/math" - "github.com/allora-network/allora-chain/test/testutil" + alloratestutil "github.com/allora-network/allora-chain/test/testutil" "github.com/allora-network/allora-chain/x/emissions/module/rewards" emissionstypes "github.com/allora-network/allora-chain/x/emissions/types" + "github.com/cometbft/cometbft/crypto/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) type RewardsMathTestSuite struct { suite.Suite + privKeys []secp256k1.PrivKey + addrs []sdk.AccAddress + addrsStr []string + pubKeyHexStr []string } func (s *RewardsMathTestSuite) SetupTest() { + s.privKeys, s.pubKeyHexStr, s.addrs, s.addrsStr = alloratestutil.GenerateTestAccounts(8) } func TestRewardsMathTestSuite(t *testing.T) { @@ -132,9 +139,11 @@ func (s *RewardsMathTestSuite) TestInferenceRewardsSimple() { // U_i = ((1 - 0.5) * 2 * 2 * 2 ) / (2 + 2 + 4) // U_i = 0.5 * 8 / 8 // U_i = 0.5 + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } previousForecasterScoreRatio := alloraMath.ZeroDec() alpha := alloraMath.OneDec() @@ -175,9 +184,11 @@ func (s *RewardsMathTestSuite) TestInferenceRewardsSimple() { func (s *RewardsMathTestSuite) TestInferenceRewardsZero() { totalReward := alloraMath.ZeroDec() + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } previousForecasterScoreRatio := alloraMath.ZeroDec() alpha := alloraMath.OneDec() @@ -210,9 +221,11 @@ func (s *RewardsMathTestSuite) TestForecastRewardsSimple() { // V_i = (0.5 * 2 * 2 * 2 ) / (2 + 2 + 4) // V_i = 0.5 * 8 / 8 // V_i = 0.5 + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } previousForecasterScoreRatio := alloraMath.ZeroDec() alpha := alloraMath.OneDec() @@ -258,9 +271,11 @@ func (s *RewardsMathTestSuite) TestU_iOverV_i() { // χ = 0.5 for values of T_i >= 1 // U_i / V_i = ((1 - 0.5) * 2 ) / (0.5 * 2) // U_i / V_i = 1 + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } previousForecasterScoreRatio := alloraMath.ZeroDec() alpha := alloraMath.OneDec() @@ -314,9 +329,11 @@ func (s *RewardsMathTestSuite) TestU_iOverV_i() { func (s *RewardsMathTestSuite) TestForecastRewardsZero() { totalReward := alloraMath.ZeroDec() + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } previousForecasterScoreRatio := alloraMath.ZeroDec() alpha := alloraMath.OneDec() @@ -371,9 +388,9 @@ func (s *RewardsMathTestSuite) TestReputerRewardZero() { } func (s *RewardsMathTestSuite) TestReputerRewardFromCsv() { - epochGet := testutil.GetSimulatedValuesGetterForEpochs() + epochGet := alloratestutil.GetSimulatedValuesGetterForEpochs() epoch3Get := epochGet[300] - totalReward, err := testutil.GetTotalRewardForTopicInEpoch(epoch3Get) + totalReward, err := alloratestutil.GetTotalRewardForTopicInEpoch(epoch3Get) s.Require().NoError(err) result, err := rewards.GetRewardForReputerTaskInTopic( epoch3Get("inferers_entropy"), @@ -382,9 +399,9 @@ func (s *RewardsMathTestSuite) TestReputerRewardFromCsv() { &totalReward, ) s.Require().NoError(err) - expectedTotalReputerReward, err := testutil.GetTotalReputerRewardForTopicInEpoch(epoch3Get) + expectedTotalReputerReward, err := alloratestutil.GetTotalReputerRewardForTopicInEpoch(epoch3Get) s.Require().NoError(err) - testutil.InEpsilon5(s.T(), result, expectedTotalReputerReward.String()) + alloratestutil.InEpsilon5(s.T(), result, expectedTotalReputerReward.String()) } func (s *RewardsMathTestSuite) TestForecastingPerformanceScoreSimple() { @@ -407,9 +424,11 @@ func (s *RewardsMathTestSuite) TestForecastingUtilitySimple() { previousForecasterScoreRatio := alloraMath.ZeroDec() // Test case where score < 0 negativeScore := alloraMath.MustNewDecFromString("-0.1") + topicId := uint64(1) + blockHeight := int64(300) infererScores := []emissionstypes.Score{ - {Score: alloraMath.MustNewDecFromString("0.5")}, - {Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[0], Score: alloraMath.MustNewDecFromString("0.5")}, + {TopicId: topicId, BlockHeight: blockHeight, Address: s.addrsStr[1], Score: alloraMath.MustNewDecFromString("0.5")}, } ret, _, err := rewards.ForecastingUtility(negativeScore, infererScores, previousForecasterScoreRatio, alpha) s.Require().NoError(err) diff --git a/x/emissions/module/rewards/rewards_test.go b/x/emissions/module/rewards/rewards_test.go index 5e5c108ae..37cfe8bfa 100644 --- a/x/emissions/module/rewards/rewards_test.go +++ b/x/emissions/module/rewards/rewards_test.go @@ -65,7 +65,7 @@ func (s *RewardsTestSuite) SetupTest() { key := storetypes.NewKVStoreKey("emissions") storeService := runtime.NewKVStoreService(key) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) // nolint: exhaustruct encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, module.AppModule{}) maccPerms := map[string][]string{ @@ -241,6 +241,7 @@ func (s *RewardsTestSuite) TestStandardRewardEmission() { Metadata: "test", LossMethod: "mse", EpochLength: 10800, + AllowNegative: false, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, AlphaRegret: alloraMath.NewDecFromInt64(1), @@ -362,6 +363,7 @@ func (s *RewardsTestSuite) TestStandardRewardEmissionShouldRewardTopicsWithFulfi newTopicMsg := &types.CreateNewTopicRequest{ Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", + AllowNegative: false, LossMethod: "mse", EpochLength: 10800, GroundTruthLag: 10800, @@ -495,6 +497,7 @@ func (s *RewardsTestSuite) TestStandardRewardEmissionShouldRewardTopicsWithFulfi Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, @@ -632,6 +635,7 @@ func (s *RewardsTestSuite) setUpTopicWithEpochLength( Metadata: "test", LossMethod: "mse", EpochLength: epochLength, + AllowNegative: false, GroundTruthLag: epochLength, WorkerSubmissionWindow: min(10, epochLength-2), AlphaRegret: alphaRegret, @@ -1229,6 +1233,7 @@ func (s *RewardsTestSuite) TestGenerateTasksRewardsShouldIncreaseRewardShareIfMo Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, @@ -1378,6 +1383,7 @@ func (s *RewardsTestSuite) TestGenerateTasksRewardsShouldIncreaseRewardShareIfMo Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, @@ -1522,6 +1528,7 @@ func (s *RewardsTestSuite) TestRewardsIncreasesBalance() { Metadata: "test", LossMethod: "mse", EpochLength: epochLength, + AllowNegative: false, GroundTruthLag: epochLength, WorkerSubmissionWindow: 10, AlphaRegret: alloraMath.MustNewDecFromString("0.1"), @@ -1693,6 +1700,7 @@ func (s *RewardsTestSuite) TestRewardsHandleStandardDeviationOfZero() { Metadata: "test", LossMethod: "mse", EpochLength: epochLength, + AllowNegative: false, GroundTruthLag: epochLength, WorkerSubmissionWindow: 10, AlphaRegret: alloraMath.NewDecFromInt64(1), @@ -1917,6 +1925,7 @@ func (s *RewardsTestSuite) TestStandardRewardEmissionWithOneInfererAndOneReputer LossMethod: "mse", EpochLength: epochLength, GroundTruthLag: epochLength, + AllowNegative: false, WorkerSubmissionWindow: 10, AlphaRegret: alloraMath.NewDecFromInt64(1), PNorm: alloraMath.NewDecFromInt64(3), @@ -1992,7 +2001,10 @@ func (s *RewardsTestSuite) TestStandardRewardEmissionWithOneInfererAndOneReputer BlockHeight: blockHeight, Inferer: s.addrsStr[worker], Value: alloraMath.MustNewDecFromString("0.01127"), + ExtraData: []byte("extra data"), + Proof: "", }, + Forecast: nil, } worker1Sig, err := signInferenceForecastBundle(worker1InferenceForecastBundle, s.privKeys[worker]) s.Require().NoError(err) @@ -2018,14 +2030,16 @@ func (s *RewardsTestSuite) TestStandardRewardEmissionWithOneInfererAndOneReputer BlockHeight: blockHeight, }, }, - Reputer: s.addrsStr[reputer], - CombinedValue: alloraMath.MustNewDecFromString("0.01127"), - NaiveValue: alloraMath.MustNewDecFromString("0.0116"), - InfererValues: []*types.WorkerAttributedValue{{Worker: s.addrsStr[worker], Value: alloraMath.MustNewDecFromString("0.0112")}}, - ForecasterValues: []*types.WorkerAttributedValue{}, - OneOutInfererValues: []*types.WithheldWorkerAttributedValue{}, - OneOutForecasterValues: []*types.WithheldWorkerAttributedValue{}, - OneInForecasterValues: []*types.WorkerAttributedValue{}, + ExtraData: nil, + Reputer: s.addrsStr[reputer], + CombinedValue: alloraMath.MustNewDecFromString("0.01127"), + NaiveValue: alloraMath.MustNewDecFromString("0.0116"), + InfererValues: []*types.WorkerAttributedValue{{Worker: s.addrsStr[worker], Value: alloraMath.MustNewDecFromString("0.0112")}}, + ForecasterValues: []*types.WorkerAttributedValue{}, + OneOutInfererValues: []*types.WithheldWorkerAttributedValue{}, + OneOutForecasterValues: []*types.WithheldWorkerAttributedValue{}, + OneInForecasterValues: []*types.WorkerAttributedValue{}, + OneOutInfererForecasterValues: nil, } sig, err := signValueBundle(valueBundle, s.privKeys[reputer]) s.Require().NoError(err) @@ -2073,6 +2087,44 @@ func (s *RewardsTestSuite) SetParamsForTest() { MinEpochLength: []int64{1}, RegistrationFee: []cosmosMath.Int{cosmosMath.NewInt(6)}, MaxActiveTopicsPerBlock: []uint64{2}, + // the following fields are not set + Version: nil, + MaxSerializedMsgLength: nil, + MinTopicWeight: nil, + RequiredMinimumStake: nil, + RemoveStakeDelayWindow: nil, + BetaEntropy: nil, + LearningRate: nil, + MaxGradientThreshold: nil, + MinStakeFraction: nil, + MaxUnfulfilledWorkerRequests: nil, + MaxUnfulfilledReputerRequests: nil, + TopicRewardStakeImportance: nil, + TopicRewardFeeRevenueImportance: nil, + TopicRewardAlpha: nil, + TaskRewardAlpha: nil, + ValidatorsVsAlloraPercentReward: nil, + MaxSamplesToScaleScores: nil, + MaxTopForecastersToReward: nil, + MaxTopReputersToReward: nil, + CreateTopicFee: nil, + GradientDescentMaxIters: nil, + DefaultPageLimit: nil, + MaxPageLimit: nil, + MinEpochLengthRecordLimit: nil, + BlocksPerMonth: nil, + PRewardInference: nil, + PRewardForecast: nil, + PRewardReputer: nil, + CRewardInference: nil, + CRewardForecast: nil, + CNorm: nil, + EpsilonReputer: nil, + HalfMaxProcessStakeRemovalsEndBlock: nil, + DataSendingFee: nil, + EpsilonSafeDiv: nil, + MaxElementsPerForecast: nil, + MaxStringLength: nil, } updateMsg := &types.UpdateParamsRequest{ @@ -2109,6 +2161,7 @@ func (s *RewardsTestSuite) TestOnlyFewTopActorsGetReward() { Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: epochLength, GroundTruthLag: epochLength, WorkerSubmissionWindow: 10, @@ -2220,6 +2273,7 @@ func (s *RewardsTestSuite) TestOnlyFewTopActorsGetReward() { networkLossBundles, err := s.emissionsKeeper.GetNetworkLossBundleAtBlock(s.ctx, topicId, block) s.Require().NoError(err) + s.Require().NotNil(networkLossBundles) infererScores, err := rewards.GenerateInferenceScores( s.ctx, @@ -2261,6 +2315,7 @@ func (s *RewardsTestSuite) TestTotalInferersRewardFractionGrowsWithMoreInferers( Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, @@ -2433,6 +2488,7 @@ func (s *RewardsTestSuite) TestTotalInferersRewardFractionGrowsWithMoreInferers( Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, @@ -2590,6 +2646,7 @@ func (s *RewardsTestSuite) TestTotalInferersRewardFractionGrowsWithMoreInferers( Creator: s.addrsStr[reputerIndexes[0]], Metadata: "test", LossMethod: "mse", + AllowNegative: false, EpochLength: 10800, GroundTruthLag: 10800, WorkerSubmissionWindow: 10, diff --git a/x/emissions/module/rewards/scores_test.go b/x/emissions/module/rewards/scores_test.go index fa1ff20e0..d90a948ca 100644 --- a/x/emissions/module/rewards/scores_test.go +++ b/x/emissions/module/rewards/scores_test.go @@ -631,6 +631,14 @@ func (s *RewardsTestSuite) TestEnsureWorkerPresenceConsistency() { { Pubkey: "allo12vgd3fhvghc94e6kmnv02yw2jar3a5zu3jgfh2", ValueBundle: &types.ValueBundle{ + TopicId: 1, + ExtraData: nil, + ReputerRequestNonce: &types.ReputerRequestNonce{ + ReputerNonce: &types.Nonce{BlockHeight: 100}, + }, + Reputer: "allo12vgd3fhvghc94e6kmnv02yw2jar3a5zu3jgfh2", + CombinedValue: alloraMath.NewDecFromInt64(100), + NaiveValue: alloraMath.NewDecFromInt64(100), InfererValues: []*types.WorkerAttributedValue{ {Worker: s.addrsStr[1], Value: alloraMath.NewDecFromInt64(100)}, {Worker: s.addrsStr[2], Value: alloraMath.NewDecFromInt64(200)}, @@ -661,9 +669,18 @@ func (s *RewardsTestSuite) TestEnsureWorkerPresenceConsistency() { { Pubkey: "reputer2", ValueBundle: &types.ValueBundle{ + TopicId: 1, + ExtraData: nil, + ReputerRequestNonce: &types.ReputerRequestNonce{ + ReputerNonce: &types.Nonce{BlockHeight: 100}, + }, + Reputer: "reputer2", + CombinedValue: alloraMath.NewDecFromInt64(100), + NaiveValue: alloraMath.NewDecFromInt64(100), InfererValues: []*types.WorkerAttributedValue{ {Worker: "worker5", Value: alloraMath.NewDecFromInt64(100)}, }, + ForecasterValues: nil, OneOutInfererValues: []*types.WithheldWorkerAttributedValue{ {Worker: s.addrsStr[1], Value: alloraMath.NewDecFromInt64(100)}, {Worker: s.addrsStr[2], Value: alloraMath.NewDecFromInt64(200)}, @@ -970,14 +987,16 @@ func generateLossBundles(s *RewardsTestSuite, blockHeight int64, topicId uint64, BlockHeight: blockHeight, }, }, - Reputer: s.addrsStr[reputerIndex], - CombinedValue: reputersLosses[i], - NaiveValue: reputersNaiveLosses[i], - InfererValues: make([]*types.WorkerAttributedValue, len(workers)), - ForecasterValues: make([]*types.WorkerAttributedValue, len(workers)), - OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, len(workers)), - OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, len(workers)), - OneInForecasterValues: make([]*types.WorkerAttributedValue, len(workers)), + Reputer: s.addrsStr[reputerIndex], + ExtraData: nil, + CombinedValue: reputersLosses[i], + NaiveValue: reputersNaiveLosses[i], + InfererValues: make([]*types.WorkerAttributedValue, len(workers)), + ForecasterValues: make([]*types.WorkerAttributedValue, len(workers)), + OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, len(workers)), + OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, len(workers)), + OneInForecasterValues: make([]*types.WorkerAttributedValue, len(workers)), + OneOutInfererForecasterValues: nil, } for j, worker := range workers { @@ -1028,14 +1047,16 @@ func generateHugeLossBundles( BlockHeight: blockHeight, }, }, - Reputer: s.addrsStr[reputerIndex], - CombinedValue: reputersLosses[i], - NaiveValue: reputersNaiveLosses[i], - InfererValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), - ForecasterValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), - OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, len(workerIndexes)), - OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, len(workerIndexes)), - OneInForecasterValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), + ExtraData: nil, + Reputer: s.addrsStr[reputerIndex], + CombinedValue: reputersLosses[i], + NaiveValue: reputersNaiveLosses[i], + InfererValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), + ForecasterValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), + OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, len(workerIndexes)), + OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, len(workerIndexes)), + OneInForecasterValues: make([]*types.WorkerAttributedValue, len(workerIndexes)), + OneOutInfererForecasterValues: nil, } for j, workerIndex := range workerIndexes { @@ -1074,6 +1095,8 @@ func generateHugeWorkerDataBundles( BlockHeight: blockHeight, Inferer: s.addrsStr[workerIndex], Value: alloraMath.MustNewDecFromString(strconv.FormatInt(int64(rand.Intn(1000)+1), 10)), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1089,6 +1112,7 @@ func generateHugeWorkerDataBundles( Value: alloraMath.MustNewDecFromString(strconv.FormatInt(int64(rand.Intn(1000)+1), 10)), }, }, + ExtraData: nil, }, } workerSig, err := signInferenceForecastBundle(workerInferenceForecastBundle, s.privKeys[workerIndex]) @@ -1154,6 +1178,8 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u BlockHeight: blockHeight, Inferer: s.addrsStr[worker1], Value: alloraMath.MustNewDecFromString("0.01127"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1169,6 +1195,7 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u Value: alloraMath.MustNewDecFromString("0.01127"), }, }, + ExtraData: nil, }, } worker1Sig, err := signInferenceForecastBundle(worker1InferenceForecastBundle, s.privKeys[worker1]) @@ -1189,6 +1216,8 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u BlockHeight: blockHeight, Inferer: s.addrsStr[worker2], Value: alloraMath.MustNewDecFromString("0.01791"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1204,6 +1233,7 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u Value: alloraMath.MustNewDecFromString("0.01791"), }, }, + ExtraData: nil, }, } worker2Sig, err := signInferenceForecastBundle(worker2InferenceForecastBundle, s.privKeys[worker2]) @@ -1224,6 +1254,8 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u BlockHeight: blockHeight, Inferer: s.addrsStr[worker3], Value: alloraMath.MustNewDecFromString("0.01404"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1239,6 +1271,7 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u Value: alloraMath.MustNewDecFromString("0.01404"), }, }, + ExtraData: nil, }, } worker3Sig, err := signInferenceForecastBundle(worker3InferenceForecastBundle, s.privKeys[worker3]) @@ -1259,6 +1292,8 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u BlockHeight: blockHeight, Inferer: s.addrsStr[worker4], Value: alloraMath.MustNewDecFromString("0.02318"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1274,6 +1309,7 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u Value: alloraMath.MustNewDecFromString("0.02318"), }, }, + ExtraData: nil, }, } worker4Sig, err := signInferenceForecastBundle(worker4InferenceForecastBundle, s.privKeys[worker4]) @@ -1294,6 +1330,8 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u BlockHeight: blockHeight, Inferer: s.addrsStr[worker5], Value: alloraMath.MustNewDecFromString("0.01251"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1309,6 +1347,7 @@ func generateWorkerDataBundles(s *RewardsTestSuite, blockHeight int64, topicId u Value: alloraMath.MustNewDecFromString("0.01251"), }, }, + ExtraData: nil, }, } worker5Sig, err := signInferenceForecastBundle(worker5InferenceForecastBundle, s.privKeys[worker5]) @@ -1337,6 +1376,8 @@ func generateMoreInferencesDataBundles(s *RewardsTestSuite, blockHeight int64, t BlockHeight: blockHeight, Inferer: s.addrsStr[worker1], Value: alloraMath.MustNewDecFromString("0.01251"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1352,6 +1393,7 @@ func generateMoreInferencesDataBundles(s *RewardsTestSuite, blockHeight int64, t Value: alloraMath.MustNewDecFromString("0.01251"), }, }, + ExtraData: nil, }, } worker1Sig, err := signInferenceForecastBundle(worker1InferenceForecastBundle, s.privKeys[worker1]) @@ -1372,6 +1414,8 @@ func generateMoreInferencesDataBundles(s *RewardsTestSuite, blockHeight int64, t BlockHeight: blockHeight, Inferer: s.addrsStr[worker2], Value: alloraMath.MustNewDecFromString("0.01251"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1387,6 +1431,7 @@ func generateMoreInferencesDataBundles(s *RewardsTestSuite, blockHeight int64, t Value: alloraMath.MustNewDecFromString("0.01251"), }, }, + ExtraData: nil, }, } worker2Sig, err := signInferenceForecastBundle(worker2InferenceForecastBundle, s.privKeys[worker2]) @@ -1415,6 +1460,8 @@ func generateMoreForecastersDataBundles(s *RewardsTestSuite, blockHeight int64, BlockHeight: blockHeight, Inferer: s.addrsStr[worker1], Value: alloraMath.MustNewDecFromString("0.01251"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1430,6 +1477,7 @@ func generateMoreForecastersDataBundles(s *RewardsTestSuite, blockHeight int64, Value: alloraMath.MustNewDecFromString("0.01251"), }, }, + ExtraData: nil, }, } worker1Sig, err := signInferenceForecastBundle(worker1InferenceForecastBundle, s.privKeys[worker1]) @@ -1450,6 +1498,8 @@ func generateMoreForecastersDataBundles(s *RewardsTestSuite, blockHeight int64, BlockHeight: blockHeight, Inferer: s.addrsStr[worker2], Value: alloraMath.MustNewDecFromString("0.01251"), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1465,6 +1515,7 @@ func generateMoreForecastersDataBundles(s *RewardsTestSuite, blockHeight int64, Value: alloraMath.MustNewDecFromString("0.01251"), }, }, + ExtraData: nil, }, } worker2Sig, err := signInferenceForecastBundle(worker2InferenceForecastBundle, s.privKeys[worker2]) @@ -1523,6 +1574,8 @@ func generateSimpleWorkerDataBundles( BlockHeight: blockHeight, Inferer: s.addrsStr[workerValue.Index], Value: alloraMath.MustNewDecFromString(workerValue.Value), + ExtraData: nil, + Proof: "", }, Forecast: &types.Forecast{ TopicId: topicId, @@ -1538,6 +1591,7 @@ func generateSimpleWorkerDataBundles( Value: alloraMath.MustNewDecFromString(workerValue.Value), }, }, + ExtraData: nil, }, } workerSig, err := signInferenceForecastBundle(newWorkerInferenceForecastBundle, s.privKeys[workerValue.Index]) @@ -1582,14 +1636,16 @@ func generateSimpleLossBundles( BlockHeight: nonce, }, }, - Reputer: s.addrsStr[reputer.Index], - CombinedValue: alloraMath.MustNewDecFromString(reputer.Value), - NaiveValue: alloraMath.MustNewDecFromString(reputer.Value), - InfererValues: make([]*types.WorkerAttributedValue, countValues), - ForecasterValues: make([]*types.WorkerAttributedValue, countValues), - OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, countValues), - OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, countValues), - OneInForecasterValues: make([]*types.WorkerAttributedValue, countValues), + Reputer: s.addrsStr[reputer.Index], + ExtraData: nil, + CombinedValue: alloraMath.MustNewDecFromString(reputer.Value), + NaiveValue: alloraMath.MustNewDecFromString(reputer.Value), + InfererValues: make([]*types.WorkerAttributedValue, countValues), + ForecasterValues: make([]*types.WorkerAttributedValue, countValues), + OneOutInfererValues: make([]*types.WithheldWorkerAttributedValue, countValues), + OneOutForecasterValues: make([]*types.WithheldWorkerAttributedValue, countValues), + OneInForecasterValues: make([]*types.WorkerAttributedValue, countValues), + OneOutInfererForecasterValues: nil, } for j, worker := range workerValues { diff --git a/x/emissions/module/rewards/topic_rewards_test.go b/x/emissions/module/rewards/topic_rewards_test.go index 77809a5c3..8c5f7acaa 100644 --- a/x/emissions/module/rewards/topic_rewards_test.go +++ b/x/emissions/module/rewards/topic_rewards_test.go @@ -16,8 +16,10 @@ func mockTopic(s *RewardsTestSuite) types.Topic { Metadata: "test", LossMethod: "mse", EpochLength: 10800, + EpochLastEnded: 0, GroundTruthLag: 10800, PNorm: alloraMath.NewDecFromInt64(3), + InitialRegret: alloraMath.ZeroDec(), AlphaRegret: alloraMath.NewDecFromInt64(1), AllowNegative: false, Epsilon: alloraMath.MustNewDecFromString("0.01"), diff --git a/x/emissions/module/rewards/worker_rewards_test.go b/x/emissions/module/rewards/worker_rewards_test.go index 8abb08159..cd58e4b71 100644 --- a/x/emissions/module/rewards/worker_rewards_test.go +++ b/x/emissions/module/rewards/worker_rewards_test.go @@ -24,6 +24,7 @@ func createNewTopic(s *RewardsTestSuite) uint64 { ActiveInfererQuantile: alloraMath.MustNewDecFromString("0.2"), ActiveForecasterQuantile: alloraMath.MustNewDecFromString("0.2"), ActiveReputerQuantile: alloraMath.MustNewDecFromString("0.2"), + AllowNegative: false, } res, err := s.msgServer.CreateNewTopic(s.ctx, newTopicMsg) s.Require().NoError(err) @@ -489,11 +490,11 @@ func (s *RewardsTestSuite) TestInferenceRewardsFromCsv() { totalReward, err := testutil.GetTotalRewardForTopicInEpoch(epoch3Get) s.Require().NoError(err) infererScores := []types.Score{ - {Score: epoch3Get("inferer_score_0")}, - {Score: epoch3Get("inferer_score_1")}, - {Score: epoch3Get("inferer_score_2")}, - {Score: epoch3Get("inferer_score_3")}, - {Score: epoch3Get("inferer_score_4")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[0], Score: epoch3Get("inferer_score_0")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[1], Score: epoch3Get("inferer_score_1")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[2], Score: epoch3Get("inferer_score_2")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[3], Score: epoch3Get("inferer_score_3")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[4], Score: epoch3Get("inferer_score_4")}, } chi, gamma, _, _, err := rewards.GetChiAndGamma( epoch3Get("network_naive_loss"), @@ -527,11 +528,11 @@ func (s *RewardsTestSuite) TestForecastRewardsFromCsv() { totalReward, err := testutil.GetTotalRewardForTopicInEpoch(epoch3Get) s.Require().NoError(err) infererScores := []types.Score{ - {Score: epoch3Get("inferer_score_0")}, - {Score: epoch3Get("inferer_score_1")}, - {Score: epoch3Get("inferer_score_2")}, - {Score: epoch3Get("inferer_score_3")}, - {Score: epoch3Get("inferer_score_4")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[0], Score: epoch3Get("inferer_score_0")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[1], Score: epoch3Get("inferer_score_1")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[2], Score: epoch3Get("inferer_score_2")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[3], Score: epoch3Get("inferer_score_3")}, + {TopicId: 1, BlockHeight: 300, Address: s.addrsStr[4], Score: epoch3Get("inferer_score_4")}, } chi, gamma, _, _, err := rewards.GetChiAndGamma( epoch3Get("network_naive_loss"), diff --git a/x/emissions/proto/emissions/v3/genesis.proto b/x/emissions/proto/emissions/v3/genesis.proto index 8331d4f44..5e0a54257 100644 --- a/x/emissions/proto/emissions/v3/genesis.proto +++ b/x/emissions/proto/emissions/v3/genesis.proto @@ -63,8 +63,8 @@ message GenesisState { repeated TopicIdActorIdDec previousInferenceRewardFraction = 18; // map of (topic, worker) -> previous reward for forecast (used for EMA) repeated TopicIdActorIdDec previousForecastRewardFraction = 19; - // map of (topic, forecaster) -> ratio of forecaster score - repeated TopicIdActorIdDec previousForecasterScoreRatio = 20; + // map of (topic) -> ratio of forecaster score + repeated TopicIdAndDec previousForecasterScoreRatio = 20; /// STAKING diff --git a/x/emissions/types/events_test.go b/x/emissions/types/events_test.go index 40bfeedb3..121027150 100644 --- a/x/emissions/types/events_test.go +++ b/x/emissions/types/events_test.go @@ -206,11 +206,13 @@ func TestEmitNewInfererRewardsSettledEventWithRewards(t *testing.T) { TopicId: uint64(1), Address: "address1", Reward: alloraMath.NewDecFromInt64(100), + Type: types.WorkerInferenceRewardType, }, { TopicId: uint64(1), Address: "address2", Reward: alloraMath.NewDecFromInt64(200), + Type: types.WorkerInferenceRewardType, }, } @@ -263,11 +265,13 @@ func TestEmitNewForecasterRewardsSettledEventWithRewards(t *testing.T) { TopicId: uint64(1), Address: "address1", Reward: alloraMath.NewDecFromInt64(100), + Type: types.WorkerForecastRewardType, }, { TopicId: uint64(1), Address: "address2", Reward: alloraMath.NewDecFromInt64(200), + Type: types.WorkerForecastRewardType, }, } @@ -320,11 +324,13 @@ func TestEmitNewReputerAndDelegatorRewardsSettledEventWithRewards(t *testing.T) TopicId: uint64(1), Address: "address1", Reward: alloraMath.NewDecFromInt64(100), + Type: types.ReputerAndDelegatorRewardType, }, { TopicId: uint64(1), Address: "address2", Reward: alloraMath.NewDecFromInt64(200), + Type: types.ReputerAndDelegatorRewardType, }, } @@ -375,13 +381,18 @@ func TestEmitNewNetworkLossSetEvent(t *testing.T) { topicId := uint64(1) blockHeight := int64(10) loss := types.ValueBundle{ - CombinedValue: alloraMath.MustNewDecFromString("10"), - NaiveValue: alloraMath.MustNewDecFromString("20"), - InfererValues: []*types.WorkerAttributedValue{{Worker: "TestInferer", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer1", Value: alloraMath.MustNewDecFromString("0.0112")}}, - ForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster1", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneOutInfererValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestInferer2", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer3", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneOutForecasterValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestForecaster3", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster4", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneInForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster5", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster6", Value: alloraMath.MustNewDecFromString("0.0112")}}, + TopicId: topicId, + ReputerRequestNonce: &types.ReputerRequestNonce{ReputerNonce: &types.Nonce{BlockHeight: blockHeight}}, + Reputer: "", + ExtraData: nil, + CombinedValue: alloraMath.MustNewDecFromString("10"), + NaiveValue: alloraMath.MustNewDecFromString("20"), + InfererValues: []*types.WorkerAttributedValue{{Worker: "TestInferer", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer1", Value: alloraMath.MustNewDecFromString("0.0112")}}, + ForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster1", Value: alloraMath.MustNewDecFromString("0.0112")}}, + OneOutInfererValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestInferer2", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer3", Value: alloraMath.MustNewDecFromString("0.0112")}}, + OneOutForecasterValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestForecaster3", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster4", Value: alloraMath.MustNewDecFromString("0.0112")}}, + OneInForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster5", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster6", Value: alloraMath.MustNewDecFromString("0.0112")}}, + OneOutInfererForecasterValues: nil, } types.EmitNewNetworkLossSetEvent(ctx, topicId, blockHeight, loss) @@ -411,17 +422,10 @@ func TestEmitNewNetworkLossSetEvent(t *testing.T) { func TestEmitNewForecastTaskSetEvent(t *testing.T) { ctx := sdk.Context{}.WithEventManager(sdk.NewEventManager()) topicId := uint64(1) - loss := types.ValueBundle{ - CombinedValue: alloraMath.MustNewDecFromString("10"), - NaiveValue: alloraMath.MustNewDecFromString("20"), - InfererValues: []*types.WorkerAttributedValue{{Worker: "TestInferer", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer1", Value: alloraMath.MustNewDecFromString("0.0112")}}, - ForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster1", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneOutInfererValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestInferer2", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestInferer3", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneOutForecasterValues: []*types.WithheldWorkerAttributedValue{{Worker: "TestForecaster3", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster4", Value: alloraMath.MustNewDecFromString("0.0112")}}, - OneInForecasterValues: []*types.WorkerAttributedValue{{Worker: "TestForecaster5", Value: alloraMath.MustNewDecFromString("0.0112")}, {Worker: "TestForecaster6", Value: alloraMath.MustNewDecFromString("0.0112")}}, - } + CombinedValue := alloraMath.MustNewDecFromString("10") + NaiveValue := alloraMath.MustNewDecFromString("20") - score, err := loss.NaiveValue.Sub(loss.CombinedValue) + score, err := NaiveValue.Sub(CombinedValue) require.NoError(t, err) types.EmitNewForecastTaskUtilityScoreSetEvent(ctx, topicId, score) diff --git a/x/emissions/types/genesis.go b/x/emissions/types/genesis.go index 5db299c1b..f09c60d84 100644 --- a/x/emissions/types/genesis.go +++ b/x/emissions/types/genesis.go @@ -1,10 +1,75 @@ package types +import ( + cosmosMath "cosmossdk.io/math" + alloraMath "github.com/allora-network/allora-chain/math" +) + // NewGenesisState creates a new genesis state with default values. func NewGenesisState() *GenesisState { return &GenesisState{ - Params: DefaultParams(), - CoreTeamAddresses: DefaultCoreTeamAddresses(), + Params: DefaultParams(), + NextTopicId: 0, + Topics: []*TopicIdAndTopic{}, + ActiveTopics: []uint64{}, + RewardableTopics: []uint64{}, + TopicWorkers: []*TopicAndActorId{}, + TopicReputers: []*TopicAndActorId{}, + TopicRewardNonce: []*TopicIdAndBlockHeight{}, + InfererScoresByBlock: []*TopicIdBlockHeightScores{}, + ForecasterScoresByBlock: []*TopicIdBlockHeightScores{}, + ReputerScoresByBlock: []*TopicIdBlockHeightScores{}, + InfererScoreEmas: []*TopicIdActorIdScore{}, + ForecasterScoreEmas: []*TopicIdActorIdScore{}, + ReputerScoreEmas: []*TopicIdActorIdScore{}, + ReputerListeningCoefficient: []*TopicIdActorIdListeningCoefficient{}, + PreviousReputerRewardFraction: []*TopicIdActorIdDec{}, + PreviousInferenceRewardFraction: []*TopicIdActorIdDec{}, + PreviousForecastRewardFraction: []*TopicIdActorIdDec{}, + PreviousForecasterScoreRatio: []*TopicIdAndDec{}, + TotalStake: cosmosMath.ZeroInt(), + TopicStake: []*TopicIdAndInt{}, + StakeReputerAuthority: []*TopicIdActorIdInt{}, + StakeSumFromDelegator: []*TopicIdActorIdInt{}, + DelegatedStakes: []*TopicIdDelegatorReputerDelegatorInfo{}, + StakeFromDelegatorsUponReputer: []*TopicIdActorIdInt{}, + DelegateRewardPerShare: []*TopicIdActorIdDec{}, + StakeRemovalsByBlock: []*BlockHeightTopicIdReputerStakeRemovalInfo{}, + StakeRemovalsByActor: []*ActorIdTopicIdBlockHeight{}, + DelegateStakeRemovalsByBlock: []*BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo{}, + DelegateStakeRemovalsByActor: []*DelegatorReputerTopicIdBlockHeight{}, + Inferences: []*TopicIdActorIdInference{}, + Forecasts: []*TopicIdActorIdForecast{}, + Workers: []*LibP2PKeyAndOffchainNode{}, + Reputers: []*LibP2PKeyAndOffchainNode{}, + TopicFeeRevenue: []*TopicIdAndInt{}, + PreviousTopicWeight: []*TopicIdAndDec{}, + AllInferences: []*TopicIdBlockHeightInferences{}, + AllForecasts: []*TopicIdBlockHeightForecasts{}, + AllLossBundles: []*TopicIdBlockHeightReputerValueBundles{}, + NetworkLossBundles: []*TopicIdBlockHeightValueBundles{}, + PreviousPercentageRewardToStakedReputers: alloraMath.ZeroDec(), + UnfulfilledWorkerNonces: []*TopicIdAndNonces{}, + UnfulfilledReputerNonces: []*TopicIdAndReputerRequestNonces{}, + LatestInfererNetworkRegrets: []*TopicIdActorIdTimeStampedValue{}, + LatestForecasterNetworkRegrets: []*TopicIdActorIdTimeStampedValue{}, + LatestOneInForecasterNetworkRegrets: []*TopicIdActorIdActorIdTimeStampedValue{}, + LatestNaiveInfererNetworkRegrets: []*TopicIdActorIdTimeStampedValue{}, + LatestOneOutInfererInfererNetworkRegrets: []*TopicIdActorIdActorIdTimeStampedValue{}, + LatestOneOutInfererForecasterNetworkRegrets: []*TopicIdActorIdActorIdTimeStampedValue{}, + LatestOneOutForecasterInfererNetworkRegrets: []*TopicIdActorIdActorIdTimeStampedValue{}, + LatestOneOutForecasterForecasterNetworkRegrets: []*TopicIdActorIdActorIdTimeStampedValue{}, + CoreTeamAddresses: DefaultCoreTeamAddresses(), + TopicLastWorkerCommit: []*TopicIdTimestampedActorNonce{}, + TopicLastReputerCommit: []*TopicIdTimestampedActorNonce{}, + OpenWorkerWindows: []*BlockHeightAndTopicIds{}, + LastDripBlock: []*TopicIdAndBlockHeight{}, + TopicToNextPossibleChurningBlock: []*TopicIdAndBlockHeight{}, + BlockToActiveTopics: []*BlockHeightTopicIds{}, + BlockToLowestActiveTopicWeight: []*BlockHeightTopicIdWeightPair{}, + PreviousTopicQuantileInfererScoreEma: []*TopicIdAndDec{}, + PreviousTopicQuantileForecasterScoreEma: []*TopicIdAndDec{}, + PreviousTopicQuantileReputerScoreEma: []*TopicIdAndDec{}, } } diff --git a/x/emissions/types/genesis.pb.go b/x/emissions/types/genesis.pb.go index b2a186f81..3f8d8107c 100644 --- a/x/emissions/types/genesis.pb.go +++ b/x/emissions/types/genesis.pb.go @@ -69,8 +69,8 @@ type GenesisState struct { PreviousInferenceRewardFraction []*TopicIdActorIdDec `protobuf:"bytes,18,rep,name=previousInferenceRewardFraction,proto3" json:"previousInferenceRewardFraction,omitempty"` // map of (topic, worker) -> previous reward for forecast (used for EMA) PreviousForecastRewardFraction []*TopicIdActorIdDec `protobuf:"bytes,19,rep,name=previousForecastRewardFraction,proto3" json:"previousForecastRewardFraction,omitempty"` - // map of (topic, forecaster) -> ratio of forecaster score - PreviousForecasterScoreRatio []*TopicIdActorIdDec `protobuf:"bytes,20,rep,name=previousForecasterScoreRatio,proto3" json:"previousForecasterScoreRatio,omitempty"` + // map of (topic) -> ratio of forecaster score + PreviousForecasterScoreRatio []*TopicIdAndDec `protobuf:"bytes,20,rep,name=previousForecasterScoreRatio,proto3" json:"previousForecasterScoreRatio,omitempty"` // total sum stake of all stakers on the network TotalStake cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=totalStake,proto3,customtype=cosmossdk.io/math.Int" json:"totalStake"` // for every topic, how much total stake does that topic have accumulated? @@ -332,7 +332,7 @@ func (m *GenesisState) GetPreviousForecastRewardFraction() []*TopicIdActorIdDec return nil } -func (m *GenesisState) GetPreviousForecasterScoreRatio() []*TopicIdActorIdDec { +func (m *GenesisState) GetPreviousForecasterScoreRatio() []*TopicIdAndDec { if m != nil { return m.PreviousForecasterScoreRatio } @@ -2401,154 +2401,154 @@ var fileDescriptor_ddb55d068ee88122 = []byte{ 0x25, 0x3b, 0x36, 0xe5, 0xc8, 0x75, 0xed, 0xc6, 0x6d, 0x1a, 0xca, 0xb6, 0x1a, 0xba, 0xfe, 0x50, 0x97, 0x8a, 0xdd, 0x3a, 0x01, 0x9c, 0x15, 0x39, 0xa2, 0x16, 0x5a, 0xee, 0x30, 0x3b, 0x4b, 0xd9, 0xbe, 0x15, 0x68, 0x7a, 0x6a, 0x81, 0x06, 0x4d, 0x0a, 0xb4, 0xe8, 0xa5, 0xc7, 0x1e, 0x73, 0xe8, - 0xa1, 0x40, 0xcf, 0x05, 0x02, 0x14, 0x05, 0x82, 0x9e, 0x8a, 0x1e, 0x82, 0xc2, 0x3e, 0xf4, 0xdf, - 0x28, 0x76, 0x76, 0x76, 0xb9, 0x1f, 0xb3, 0xcb, 0x15, 0x95, 0x8b, 0xc1, 0xdd, 0x79, 0xef, 0xf7, - 0x7e, 0x6f, 0xde, 0xec, 0x9b, 0x99, 0x9f, 0x05, 0x8b, 0xa4, 0x6b, 0x30, 0x66, 0x50, 0x8b, 0xad, - 0xee, 0x5f, 0x5b, 0xed, 0x10, 0x8b, 0x30, 0x83, 0xd5, 0x7a, 0x36, 0x75, 0x28, 0x9a, 0x0e, 0xc6, - 0x6a, 0xfb, 0xd7, 0x16, 0x4f, 0xe8, 0x5d, 0xc3, 0xa2, 0xab, 0xfc, 0x5f, 0xcf, 0x60, 0xf1, 0x64, - 0x8b, 0xb2, 0x2e, 0x65, 0xcf, 0xf8, 0xd3, 0xaa, 0xf7, 0x20, 0x86, 0x16, 0x22, 0xb8, 0x16, 0x6d, - 0x13, 0x31, 0x80, 0x63, 0x03, 0x56, 0xcb, 0x1f, 0x39, 0x19, 0x19, 0xe9, 0xe9, 0xb6, 0xde, 0xf5, - 0xd1, 0xa2, 0x2c, 0x6d, 0xd2, 0xeb, 0x3b, 0xc4, 0x96, 0x02, 0xb2, 0x16, 0xb5, 0xe5, 0xa1, 0x98, - 0xa3, 0xef, 0xc9, 0x47, 0x1c, 0xda, 0x33, 0x5a, 0xf2, 0x91, 0x97, 0x3d, 0xc2, 0xa4, 0xf4, 0x9e, - 0x53, 0x7b, 0x2f, 0xa0, 0x30, 0xdb, 0xa1, 0x1d, 0xea, 0x4d, 0x82, 0xfb, 0xcb, 0x7b, 0xab, 0xfe, - 0xa3, 0x06, 0xd3, 0x3f, 0xf2, 0x26, 0xb4, 0xe9, 0xe8, 0x0e, 0x41, 0x6b, 0x30, 0xee, 0x65, 0x85, - 0x95, 0xaa, 0xb2, 0x32, 0xb5, 0x36, 0x5b, 0x0b, 0x4f, 0x70, 0x6d, 0x93, 0x8f, 0xad, 0x17, 0xbf, - 0xfa, 0xe6, 0xf4, 0x11, 0x4d, 0x58, 0xa2, 0x2a, 0x4c, 0x59, 0xe4, 0x85, 0xb3, 0xe5, 0x52, 0x6c, - 0xb4, 0x71, 0xa1, 0xaa, 0xac, 0x14, 0xb5, 0xf0, 0x2b, 0x74, 0x1d, 0xc6, 0x79, 0x02, 0x0c, 0x17, - 0xab, 0x85, 0x95, 0xa9, 0xb5, 0x53, 0x51, 0x54, 0x61, 0x56, 0xb7, 0xda, 0xfc, 0x97, 0x26, 0x8c, - 0x91, 0x0a, 0xd3, 0x7a, 0xcb, 0x31, 0xf6, 0xc9, 0x96, 0xe7, 0xfc, 0x46, 0xb5, 0xb0, 0x52, 0xd4, - 0x22, 0xef, 0xd0, 0x25, 0x28, 0xd9, 0xe4, 0xb9, 0x6e, 0xb7, 0xf5, 0x6d, 0xd3, 0xb7, 0x1b, 0xe7, - 0x76, 0x89, 0xf7, 0xa8, 0x0e, 0xd3, 0x1c, 0xf9, 0x09, 0x9f, 0x18, 0x86, 0x8f, 0xa6, 0x92, 0xa9, - 0x5b, 0xed, 0x7a, 0xcb, 0xa1, 0x76, 0xa3, 0xad, 0x45, 0x5c, 0xd0, 0x6d, 0x98, 0xe1, 0xcf, 0x9a, - 0x57, 0x5f, 0x86, 0x27, 0xf2, 0x60, 0x44, 0x7d, 0xd0, 0x23, 0x28, 0x89, 0x17, 0x2e, 0xc1, 0x87, - 0xee, 0xfa, 0xc2, 0x93, 0x1c, 0xe7, 0x4c, 0xda, 0xc4, 0xac, 0x9b, 0xb4, 0xb5, 0xf7, 0x3e, 0x31, - 0x3a, 0xbb, 0x8e, 0x96, 0x70, 0x46, 0x4f, 0x61, 0xd6, 0xb0, 0x76, 0x88, 0x4d, 0xec, 0xa6, 0xbb, - 0xb6, 0xd8, 0xfa, 0x4b, 0x6e, 0x8f, 0x81, 0x83, 0x9e, 0x97, 0x82, 0x86, 0x10, 0x3d, 0x27, 0x4d, - 0x8a, 0x81, 0x3e, 0x86, 0x85, 0x1d, 0x6a, 0x93, 0x96, 0xce, 0x9c, 0x38, 0xfc, 0xd4, 0x81, 0xe0, - 0xd3, 0x60, 0x5c, 0xf6, 0xe2, 0x73, 0x89, 0xc2, 0x4f, 0x1f, 0x8c, 0xbd, 0x0c, 0x03, 0x3d, 0x80, - 0x52, 0x38, 0xab, 0xbb, 0x5d, 0x9d, 0xe1, 0xef, 0x73, 0xdc, 0x37, 0xe5, 0x53, 0xed, 0x55, 0x8c, - 0x1b, 0x6b, 0x09, 0x57, 0xd4, 0x84, 0x72, 0x2c, 0x0b, 0x8e, 0xf8, 0x83, 0xbc, 0x88, 0x32, 0x6f, - 0x97, 0x63, 0x98, 0x3b, 0x47, 0x7c, 0x37, 0x37, 0xc7, 0xb8, 0x2b, 0xb2, 0x61, 0x49, 0xbc, 0xbb, - 0x6f, 0x30, 0x87, 0x58, 0x86, 0xd5, 0xb9, 0x4d, 0xc9, 0xce, 0x8e, 0xd1, 0x32, 0x88, 0xe5, 0xe0, - 0x12, 0x47, 0xbe, 0x9a, 0x85, 0x2c, 0xf3, 0xd3, 0xb2, 0x40, 0x11, 0x81, 0x53, 0x3d, 0x9b, 0xec, - 0x1b, 0xb4, 0xcf, 0xc4, 0x2a, 0xf7, 0x96, 0xe7, 0x86, 0xed, 0x7e, 0xac, 0xd4, 0xc2, 0x27, 0x78, - 0xd4, 0xd3, 0x59, 0x51, 0xef, 0x90, 0x96, 0x96, 0x8d, 0x82, 0x0c, 0x38, 0xed, 0x1b, 0x34, 0x78, - 0x69, 0xac, 0x16, 0x89, 0x05, 0x42, 0xf9, 0x02, 0x0d, 0xc3, 0x41, 0x1d, 0xa8, 0xf8, 0x26, 0x1b, - 0xa2, 0x66, 0xb1, 0x48, 0xe5, 0x7c, 0x91, 0x86, 0xc0, 0xa0, 0x16, 0x2c, 0xc7, 0x2d, 0x44, 0x35, - 0x35, 0xdd, 0x31, 0x28, 0x9e, 0xcd, 0x17, 0x26, 0x13, 0x04, 0x6d, 0x02, 0x38, 0xd4, 0xd1, 0xcd, - 0xa6, 0xbb, 0xc1, 0xe0, 0xb9, 0xaa, 0xb2, 0x32, 0xb9, 0x7e, 0xd5, 0x6d, 0xe2, 0xff, 0xf9, 0xe6, - 0xf4, 0x9c, 0xb7, 0x29, 0xb2, 0xf6, 0x5e, 0xcd, 0xa0, 0xab, 0x5d, 0xdd, 0xd9, 0xad, 0x35, 0x2c, - 0xe7, 0x5f, 0x7f, 0xb9, 0x02, 0x62, 0xb7, 0x6c, 0x58, 0xce, 0x9f, 0xff, 0xf7, 0xe5, 0x25, 0x45, - 0x0b, 0x61, 0xa0, 0x5b, 0x2e, 0x62, 0xcf, 0x68, 0x79, 0x88, 0xf3, 0x9c, 0xe4, 0x52, 0x5a, 0xf7, - 0x6a, 0x58, 0x8e, 0x16, 0x32, 0x47, 0x1f, 0xc0, 0x1c, 0xdf, 0xea, 0x44, 0x95, 0xeb, 0x7d, 0x67, - 0x97, 0xda, 0x86, 0xf3, 0x12, 0x2f, 0x0c, 0x4f, 0xd6, 0xc5, 0x92, 0x7b, 0x07, 0xb0, 0xcd, 0x7e, - 0x77, 0xc3, 0xa6, 0xdd, 0x3b, 0xc4, 0x24, 0x1d, 0xdd, 0xa1, 0x36, 0xc6, 0x07, 0x81, 0x8d, 0x7b, - 0xa3, 0x8f, 0xe0, 0x78, 0xdb, 0x7b, 0x20, 0x6d, 0xce, 0x9f, 0xe1, 0x93, 0x1c, 0x70, 0x4d, 0x0a, - 0x18, 0x38, 0x0a, 0x7e, 0xc1, 0x73, 0xc3, 0xda, 0xa1, 0x5a, 0x1c, 0xca, 0x5d, 0x68, 0x3c, 0x6c, - 0x24, 0x26, 0xfb, 0xa0, 0x47, 0x2d, 0xe1, 0x8f, 0x17, 0xf3, 0xb1, 0x1f, 0x02, 0x83, 0x9e, 0xc0, - 0xbc, 0x1f, 0xdb, 0x5b, 0x82, 0x9b, 0xc4, 0x6e, 0xee, 0xea, 0x36, 0xc1, 0x4b, 0xf9, 0x96, 0x58, - 0x8a, 0x3b, 0xda, 0x83, 0x59, 0x51, 0x8f, 0x2e, 0xdd, 0xd7, 0xcd, 0xa0, 0x7f, 0x2f, 0x73, 0xd8, - 0x1b, 0x51, 0xd8, 0x50, 0xe3, 0x16, 0x11, 0x04, 0xbf, 0x66, 0x08, 0x82, 0xcf, 0x94, 0x14, 0x14, - 0x7d, 0x98, 0x08, 0xc6, 0x19, 0xe2, 0x53, 0x3c, 0xd8, 0x85, 0x68, 0x30, 0x41, 0x3e, 0xb9, 0x67, - 0x68, 0x52, 0x10, 0xf4, 0x6b, 0x05, 0x96, 0xfd, 0x24, 0x9b, 0xb2, 0x94, 0x2a, 0x3c, 0xca, 0xfb, - 0xc3, 0x52, 0x4a, 0x59, 0x02, 0x24, 0x91, 0x63, 0x66, 0x34, 0xe4, 0xa4, 0xb2, 0xf1, 0x72, 0x3e, - 0x2d, 0x6b, 0xe5, 0xf1, 0xd8, 0x92, 0xe4, 0x33, 0x51, 0xd1, 0x5d, 0x00, 0xc3, 0x6f, 0x8a, 0x0c, - 0x57, 0x79, 0x8c, 0x73, 0xd9, 0x8b, 0xcf, 0x6f, 0xa1, 0x21, 0x47, 0xb4, 0x0e, 0x93, 0xfe, 0x66, - 0xc7, 0xf0, 0x9b, 0x1c, 0xe5, 0x6c, 0x16, 0x4a, 0xd0, 0x1e, 0x07, 0x6e, 0xe8, 0x3d, 0x38, 0xfa, - 0x5c, 0x9c, 0xd5, 0x54, 0xd9, 0x61, 0xe0, 0xbe, 0xb1, 0xbd, 0xb9, 0xd6, 0xfb, 0x31, 0x79, 0x59, - 0xb7, 0xda, 0x8f, 0x76, 0x76, 0x5a, 0xbb, 0xba, 0x61, 0x3d, 0xa4, 0x6d, 0xa2, 0xf9, 0x6e, 0x68, - 0x1d, 0x26, 0x6c, 0xff, 0xa8, 0x76, 0xe6, 0x40, 0x10, 0x81, 0x1f, 0xba, 0x0b, 0xc7, 0x79, 0xef, - 0xda, 0x20, 0x44, 0x23, 0xfb, 0xc4, 0xea, 0x13, 0x7c, 0x76, 0x78, 0xbf, 0x8b, 0xfb, 0xa0, 0x07, - 0x50, 0xf6, 0x7b, 0x34, 0xb7, 0x7c, 0xc2, 0x8b, 0x81, 0xcf, 0x65, 0x43, 0xb9, 0x1f, 0x9e, 0xcc, - 0x0f, 0x6d, 0xc2, 0x8c, 0x6e, 0x9a, 0x8d, 0x41, 0xa5, 0xce, 0x73, 0xa0, 0x4b, 0xc3, 0x8e, 0x4b, - 0x03, 0x0f, 0x2d, 0x0a, 0x80, 0x1e, 0xc0, 0xb4, 0x6e, 0x9a, 0x1b, 0x41, 0xd1, 0x2e, 0x70, 0xc0, - 0x8b, 0xc3, 0x00, 0x03, 0x07, 0x2d, 0xe2, 0x8e, 0x3e, 0x84, 0x63, 0xba, 0x69, 0xde, 0xa7, 0x8c, - 0xad, 0xf7, 0xad, 0xb6, 0x49, 0x18, 0x5e, 0xe1, 0x80, 0xd7, 0x86, 0x01, 0x8a, 0x85, 0xfb, 0x58, - 0x37, 0xfb, 0x44, 0xb8, 0x6a, 0x31, 0x28, 0xf4, 0x11, 0x20, 0x8b, 0x38, 0x6e, 0x95, 0xc3, 0x01, - 0x2e, 0xf2, 0x00, 0x97, 0x87, 0x05, 0x88, 0x20, 0x4b, 0x70, 0xd0, 0xe7, 0x0a, 0xac, 0xf8, 0x73, - 0xbe, 0x49, 0xec, 0x16, 0xb1, 0x1c, 0xbd, 0x23, 0xda, 0xde, 0x16, 0xe5, 0x5f, 0x4d, 0x3b, 0xb8, - 0x01, 0x5c, 0xe2, 0xbb, 0xe9, 0x0d, 0xb1, 0x9b, 0xae, 0x76, 0x0c, 0x67, 0xb7, 0xbf, 0x5d, 0x6b, - 0xd1, 0xee, 0xaa, 0x6e, 0x9a, 0xd4, 0xd6, 0xaf, 0x88, 0x00, 0xfe, 0x23, 0x5f, 0x62, 0xde, 0x3e, - 0xeb, 0x16, 0x37, 0x77, 0x20, 0xa4, 0xc1, 0x09, 0xda, 0x23, 0x96, 0x77, 0x15, 0x79, 0x62, 0x58, - 0x6d, 0xfa, 0x9c, 0xe1, 0x1b, 0xb2, 0x2f, 0x2b, 0x94, 0xab, 0x7f, 0xa9, 0x6a, 0xb4, 0x99, 0x96, - 0x74, 0x47, 0x3f, 0x85, 0x85, 0xbe, 0xb5, 0xd3, 0x37, 0x77, 0x0c, 0xd3, 0x24, 0x6d, 0x6f, 0x8c, - 0xdf, 0x29, 0x18, 0x7e, 0x8b, 0x23, 0x57, 0xd2, 0x16, 0xa6, 0x67, 0xa5, 0xa5, 0xb9, 0xa3, 0x5d, - 0xc0, 0xa1, 0x21, 0x91, 0x84, 0x80, 0xbe, 0x9c, 0x51, 0xa7, 0xba, 0xd5, 0x0e, 0x0e, 0x7f, 0x9f, - 0xf4, 0x09, 0x73, 0x44, 0xa0, 0x54, 0x34, 0xd4, 0x80, 0x19, 0x53, 0x67, 0xce, 0x1d, 0xdb, 0xe8, - 0x79, 0x5d, 0xfa, 0x66, 0xfe, 0xbb, 0x54, 0xd4, 0x13, 0x59, 0xb0, 0x64, 0xea, 0x0e, 0x61, 0xe2, - 0x2b, 0xb1, 0x1f, 0x7a, 0xa5, 0xd3, 0x48, 0xc7, 0x26, 0x0e, 0xc3, 0x57, 0xb2, 0x78, 0x8b, 0xbd, - 0xc6, 0xe8, 0xba, 0x6d, 0xb5, 0xdb, 0x23, 0x6d, 0xbe, 0xcc, 0xb4, 0x2c, 0x40, 0xe4, 0x40, 0xc5, - 0x1b, 0x1e, 0x9c, 0xda, 0x62, 0x21, 0x6b, 0x23, 0x84, 0x1c, 0x82, 0x89, 0x7e, 0xa9, 0xc0, 0x19, - 0xcf, 0xe4, 0x91, 0x45, 0x1a, 0x56, 0x6a, 0xec, 0xd5, 0x8c, 0xef, 0x55, 0xc4, 0x4e, 0xa3, 0x90, - 0x07, 0x1f, 0xbd, 0x80, 0xaa, 0x67, 0xf6, 0x50, 0x37, 0xf6, 0x89, 0x7c, 0xca, 0xaf, 0x8e, 0x90, - 0xff, 0x50, 0x54, 0xf4, 0x1b, 0x05, 0x56, 0x02, 0x86, 0x8f, 0xfa, 0x7e, 0x75, 0xe4, 0x14, 0xde, - 0x1e, 0x7d, 0x1a, 0x72, 0x07, 0x41, 0xbf, 0x53, 0xe0, 0x2d, 0x89, 0x71, 0x6a, 0x6d, 0xd6, 0x46, - 0x27, 0x75, 0x90, 0x38, 0x09, 0x5e, 0x03, 0x43, 0xf9, 0x64, 0x5d, 0xfb, 0x96, 0x78, 0x0d, 0x89, - 0x83, 0xfe, 0xa8, 0x40, 0x4d, 0x6e, 0x9f, 0x3a, 0x65, 0xdf, 0x19, 0x9d, 0xda, 0x01, 0x43, 0xa1, - 0x1a, 0x94, 0xdd, 0xcb, 0xd7, 0x33, 0x87, 0xe8, 0xdd, 0x67, 0x7a, 0xbb, 0x6d, 0x13, 0xc6, 0x08, - 0xc3, 0x63, 0xd5, 0xc2, 0xca, 0xa4, 0x76, 0xc2, 0x1d, 0xda, 0x22, 0x7a, 0xb7, 0xee, 0x0f, 0xa0, - 0x8f, 0x61, 0x8e, 0x1f, 0x17, 0xee, 0xeb, 0xcc, 0xf1, 0xba, 0xe8, 0x6d, 0xda, 0xed, 0x1a, 0x0e, - 0xbe, 0x9e, 0xb1, 0xa9, 0xbb, 0x2c, 0x99, 0xc7, 0x92, 0xf3, 0xe6, 0xed, 0x50, 0x93, 0x03, 0xa1, - 0x6d, 0x98, 0x0f, 0x06, 0x44, 0xfb, 0x14, 0x21, 0xbe, 0x7b, 0xe0, 0x10, 0x29, 0x48, 0x88, 0x42, - 0x95, 0x8f, 0x6c, 0xd1, 0x87, 0xe4, 0x85, 0xb3, 0x49, 0x19, 0x33, 0xb6, 0x4d, 0x72, 0x7b, 0xb7, - 0x6f, 0x5b, 0x86, 0xd5, 0xf1, 0x7a, 0xf3, 0xf7, 0xf2, 0xf7, 0xe6, 0xa1, 0x60, 0xa8, 0x09, 0xe5, - 0x6d, 0xf7, 0xc7, 0x16, 0xad, 0x87, 0x75, 0xc2, 0x77, 0x64, 0xe2, 0x49, 0xf2, 0x94, 0xce, 0x34, - 0x99, 0x37, 0xb2, 0xa1, 0x22, 0x5e, 0xdf, 0xa7, 0xcf, 0x09, 0x73, 0x42, 0x83, 0xe2, 0xc8, 0x76, - 0x4b, 0x36, 0x63, 0x49, 0x7c, 0xcf, 0x7a, 0x53, 0x37, 0x6c, 0x6d, 0x08, 0x22, 0xa2, 0x70, 0x36, - 0x72, 0xc6, 0xfb, 0x49, 0x5f, 0xb7, 0x1c, 0xc3, 0xf4, 0xbb, 0x97, 0x2f, 0xee, 0xe0, 0x1f, 0x0e, - 0x3f, 0x2c, 0xe6, 0x02, 0x42, 0x7d, 0xb8, 0x20, 0xb5, 0xdb, 0x48, 0xe8, 0x53, 0xf8, 0xbd, 0xe1, - 0x31, 0xf3, 0x62, 0xa5, 0xe6, 0xa9, 0x45, 0x45, 0x2c, 0x5c, 0x1f, 0x35, 0xcf, 0x18, 0xd0, 0xbd, - 0xe2, 0xc4, 0x4c, 0xe9, 0xd8, 0xbd, 0xe2, 0xc4, 0xb1, 0xd2, 0xf1, 0x7b, 0xc5, 0x89, 0xe3, 0xa5, - 0x52, 0x6c, 0x3f, 0xf6, 0xd5, 0x42, 0xef, 0x5b, 0x49, 0xee, 0x9c, 0xb1, 0xf1, 0x65, 0x6f, 0x5c, - 0x8b, 0x4a, 0x8d, 0xe2, 0x51, 0x7d, 0x0c, 0xc7, 0x63, 0x52, 0x36, 0xc2, 0x70, 0xd4, 0xd7, 0xc5, - 0x15, 0xae, 0x8b, 0xfb, 0x8f, 0xe8, 0x22, 0xbc, 0xc1, 0x7f, 0xe2, 0x31, 0x2e, 0xb4, 0x97, 0x25, - 0xb9, 0x6a, 0x9e, 0x85, 0x7a, 0x57, 0xe0, 0x0e, 0x14, 0xe5, 0x0c, 0x5c, 0x0c, 0x47, 0x85, 0x11, - 0x47, 0x9e, 0xd4, 0xfc, 0x47, 0xb5, 0x09, 0x73, 0xd2, 0x0f, 0x2d, 0x03, 0xac, 0x0a, 0x53, 0x21, - 0x43, 0x0e, 0x58, 0xd0, 0xc2, 0xaf, 0xd4, 0xc7, 0x30, 0x2f, 0x3f, 0x6d, 0xc6, 0x7d, 0x95, 0x84, - 0x2f, 0x5a, 0x84, 0x09, 0xdf, 0x9a, 0xb7, 0xc6, 0xa2, 0x16, 0x3c, 0xab, 0x9f, 0x2a, 0x80, 0xd3, - 0xb4, 0xde, 0xc3, 0x10, 0x46, 0x97, 0x61, 0xdc, 0x43, 0xe1, 0xff, 0x51, 0x91, 0xf8, 0x1f, 0x0e, - 0xa1, 0x26, 0x0b, 0x1b, 0xd5, 0x81, 0xb2, 0x44, 0x75, 0x1d, 0x65, 0xfa, 0xdd, 0x82, 0x73, 0x67, - 0x11, 0xb7, 0x2c, 0x89, 0xab, 0x79, 0x16, 0xea, 0x97, 0x0a, 0xa8, 0xc3, 0x25, 0xd9, 0x91, 0x58, - 0x3c, 0x86, 0x59, 0xa9, 0x2c, 0xec, 0x91, 0x52, 0xe3, 0x97, 0x63, 0x89, 0x10, 0x2c, 0xf5, 0x57, - 0x7f, 0xab, 0xc0, 0x89, 0x84, 0x64, 0x34, 0x12, 0xc3, 0x06, 0x14, 0xee, 0x90, 0x16, 0x27, 0x74, - 0x88, 0x6b, 0x95, 0x8b, 0xa1, 0x76, 0x61, 0x26, 0x72, 0x29, 0xcf, 0xe0, 0xb3, 0x0e, 0x85, 0x86, - 0xe5, 0x2d, 0x98, 0x51, 0xa4, 0x51, 0xd7, 0x59, 0xfd, 0x55, 0x62, 0x0e, 0x1a, 0x23, 0x56, 0x49, - 0xb0, 0x29, 0x1c, 0x86, 0xcd, 0xdf, 0x14, 0x38, 0x9b, 0x47, 0x92, 0xcc, 0x20, 0xb8, 0x0c, 0x93, - 0x03, 0x11, 0xd5, 0xa3, 0x38, 0x78, 0xe1, 0xfa, 0xf9, 0x12, 0x65, 0xc1, 0xa3, 0xef, 0x4b, 0x8d, - 0x75, 0x98, 0x89, 0x84, 0xc0, 0x45, 0xbe, 0xba, 0x96, 0x52, 0x94, 0x2a, 0x2e, 0x85, 0x45, 0x3d, - 0xd4, 0x7f, 0x2a, 0x70, 0x31, 0xb7, 0x56, 0x98, 0xa3, 0xd7, 0x84, 0x92, 0x1c, 0x4b, 0x54, 0x21, - 0x25, 0x8d, 0x7b, 0x50, 0x8a, 0x47, 0x12, 0x99, 0xc4, 0x6e, 0xc5, 0x09, 0x5d, 0x2f, 0xe1, 0xa7, - 0x7e, 0x02, 0x27, 0x53, 0xd5, 0xc8, 0xf0, 0x42, 0x50, 0xa2, 0x0b, 0x21, 0x9d, 0x76, 0x2c, 0xe5, - 0x42, 0xb2, 0x35, 0x7f, 0x31, 0x06, 0xef, 0x8c, 0xae, 0x4d, 0x1e, 0x6a, 0x4e, 0x23, 0x0b, 0xa7, - 0x90, 0xb1, 0x70, 0x8a, 0xd1, 0x19, 0xdf, 0x06, 0x9c, 0xc6, 0x07, 0xbf, 0xc1, 0x67, 0xfe, 0xbc, - 0x74, 0x0d, 0x25, 0x95, 0xd5, 0x54, 0x1c, 0xf5, 0xf7, 0x0a, 0xa8, 0xc3, 0x45, 0xd2, 0x68, 0x0a, - 0x4a, 0x46, 0x0a, 0x63, 0xd1, 0x14, 0x42, 0x93, 0x52, 0xc8, 0xac, 0x58, 0x31, 0x59, 0xb1, 0x4f, - 0x15, 0x58, 0x48, 0xd1, 0x56, 0x47, 0x6a, 0x23, 0xd7, 0x61, 0x32, 0x00, 0x10, 0x1d, 0x7e, 0x21, - 0x3a, 0x7f, 0x03, 0xed, 0x76, 0x60, 0xa9, 0xfe, 0x5c, 0x81, 0x79, 0xb9, 0x38, 0x3b, 0x12, 0x8b, - 0x35, 0x98, 0xf0, 0xfd, 0x05, 0x89, 0xf9, 0x28, 0x89, 0x40, 0xfa, 0x0d, 0xec, 0xd4, 0x17, 0x80, - 0xd3, 0x94, 0x59, 0xb7, 0x32, 0xc1, 0x98, 0x5f, 0x99, 0xe0, 0x05, 0x7a, 0x17, 0xa6, 0xc3, 0xd6, - 0xe2, 0x78, 0xb5, 0x18, 0x8d, 0x18, 0x51, 0x7a, 0x23, 0xf6, 0xaa, 0x13, 0xde, 0x33, 0xb2, 0xf7, - 0x30, 0xb1, 0x53, 0x8d, 0x7d, 0x0b, 0x3b, 0xd5, 0x17, 0x0a, 0x2c, 0x67, 0x69, 0xb5, 0x87, 0x3a, - 0xf2, 0xdc, 0x04, 0x08, 0xe9, 0xc4, 0x5e, 0x09, 0x70, 0xca, 0x3a, 0x60, 0x5a, 0xc8, 0x56, 0xfd, - 0x4c, 0x81, 0xa5, 0x0c, 0xc5, 0xf7, 0x50, 0xac, 0xae, 0xc3, 0xe4, 0x40, 0x6b, 0x96, 0x2e, 0xce, - 0x81, 0xb2, 0x3c, 0xb0, 0x54, 0xff, 0xaa, 0xc0, 0xb9, 0x5c, 0x9a, 0xf1, 0xa1, 0xc8, 0x35, 0xa1, - 0x2c, 0x81, 0x14, 0x34, 0x63, 0x37, 0x4b, 0x99, 0x5e, 0x2d, 0xf3, 0x56, 0xff, 0xa0, 0x40, 0x25, - 0x5b, 0x8d, 0x3e, 0x14, 0xe7, 0x5b, 0x30, 0x15, 0xc2, 0x12, 0x5c, 0x4f, 0x46, 0xb9, 0x86, 0x0c, - 0xb4, 0xb0, 0xb5, 0xfa, 0x14, 0x4a, 0x71, 0x6d, 0x37, 0x83, 0xcc, 0x65, 0x18, 0x17, 0x52, 0xee, - 0x98, 0xec, 0x10, 0x2d, 0x24, 0x5b, 0x61, 0xe3, 0x9e, 0x0d, 0x2b, 0xd9, 0xea, 0x6e, 0x46, 0xa8, - 0xc7, 0x30, 0x2b, 0xf3, 0x10, 0x81, 0x55, 0x69, 0x29, 0xa2, 0xca, 0xb1, 0xd4, 0x5f, 0xfd, 0x53, - 0x88, 0x94, 0x5c, 0xf5, 0x19, 0xa9, 0xd9, 0xdd, 0x83, 0x52, 0x48, 0x34, 0xe1, 0x38, 0xa2, 0x12, - 0x71, 0x25, 0x3d, 0x66, 0xa5, 0x25, 0xfc, 0xd4, 0xbf, 0x0f, 0x96, 0x7a, 0xb6, 0x3e, 0x95, 0xc1, - 0x74, 0x11, 0x26, 0x84, 0xd3, 0xdb, 0x82, 0x6a, 0xf0, 0x1c, 0x1a, 0x5b, 0x13, 0x9b, 0x74, 0xf0, - 0x2c, 0xcd, 0xa3, 0x38, 0x62, 0x1e, 0x9f, 0x0f, 0x9a, 0x9b, 0x54, 0x50, 0xca, 0xa0, 0xff, 0x33, - 0x98, 0x93, 0xba, 0x88, 0xf2, 0x9f, 0x49, 0xe5, 0x12, 0x56, 0xc4, 0xa4, 0xaf, 0xd5, 0x3d, 0x28, - 0x4b, 0x34, 0xa1, 0x1c, 0xc7, 0x9e, 0xb5, 0xc8, 0xb5, 0x55, 0xb2, 0x9f, 0x05, 0xfa, 0xd2, 0xe0, - 0x3a, 0xfb, 0x0b, 0x05, 0x96, 0xb3, 0x14, 0xa2, 0x1c, 0x61, 0xeb, 0x30, 0x15, 0x16, 0xa1, 0xbc, - 0xc8, 0xf2, 0xff, 0xb4, 0x0f, 0x29, 0x4f, 0x61, 0x9f, 0x75, 0xed, 0xab, 0x57, 0x15, 0xe5, 0xeb, - 0x57, 0x15, 0xe5, 0xbf, 0xaf, 0x2a, 0xca, 0x67, 0xaf, 0x2b, 0x47, 0xbe, 0x7e, 0x5d, 0x39, 0xf2, - 0xef, 0xd7, 0x95, 0x23, 0x4f, 0x6f, 0xe6, 0xdc, 0xb5, 0x5e, 0xac, 0x0e, 0xfe, 0xc4, 0x90, 0xff, - 0xe5, 0xe1, 0xf6, 0x38, 0xff, 0x4b, 0xc2, 0x6b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x52, 0x69, - 0x59, 0x13, 0xa6, 0x29, 0x00, 0x00, + 0xa1, 0x40, 0xcf, 0x45, 0x73, 0x29, 0x10, 0xf4, 0x54, 0xf4, 0x10, 0x14, 0xf6, 0xa1, 0xff, 0x46, + 0xb1, 0xb3, 0xb3, 0xcb, 0xfd, 0x98, 0x5d, 0xae, 0xa8, 0x5c, 0x0c, 0xee, 0xce, 0x7b, 0xbf, 0xf7, + 0x7b, 0xf3, 0x66, 0xdf, 0xcc, 0xfc, 0x2c, 0x58, 0x24, 0x5d, 0x83, 0x31, 0x83, 0x5a, 0x6c, 0x75, + 0xff, 0xda, 0x6a, 0x87, 0x58, 0x84, 0x19, 0xac, 0xd6, 0xb3, 0xa9, 0x43, 0xd1, 0x74, 0x30, 0x56, + 0xdb, 0xbf, 0xb6, 0x78, 0x42, 0xef, 0x1a, 0x16, 0x5d, 0xe5, 0xff, 0x7a, 0x06, 0x8b, 0x27, 0x5b, + 0x94, 0x75, 0x29, 0x7b, 0xc6, 0x9f, 0x56, 0xbd, 0x07, 0x31, 0xb4, 0x10, 0xc1, 0xb5, 0x68, 0x9b, + 0x88, 0x01, 0x1c, 0x1b, 0xb0, 0x5a, 0xfe, 0xc8, 0xc9, 0xc8, 0x48, 0x4f, 0xb7, 0xf5, 0xae, 0x8f, + 0x16, 0x65, 0x69, 0x93, 0x5e, 0xdf, 0x21, 0xb6, 0x14, 0x90, 0xb5, 0xa8, 0x2d, 0x0f, 0xc5, 0x1c, + 0x7d, 0x4f, 0x3e, 0xe2, 0xd0, 0x9e, 0xd1, 0x92, 0x8f, 0xbc, 0xec, 0x11, 0x26, 0xa5, 0xf7, 0x9c, + 0xda, 0x7b, 0x01, 0x85, 0xd9, 0x0e, 0xed, 0x50, 0x6f, 0x12, 0xdc, 0x5f, 0xde, 0x5b, 0xf5, 0x1f, + 0x35, 0x98, 0xfe, 0x91, 0x37, 0xa1, 0x4d, 0x47, 0x77, 0x08, 0x5a, 0x83, 0x71, 0x2f, 0x2b, 0xac, + 0x54, 0x95, 0x95, 0xa9, 0xb5, 0xd9, 0x5a, 0x78, 0x82, 0x6b, 0x9b, 0x7c, 0x6c, 0xbd, 0xf8, 0xd5, + 0x37, 0xa7, 0x8f, 0x68, 0xc2, 0x12, 0x55, 0x61, 0xca, 0x22, 0x2f, 0x9c, 0x2d, 0x97, 0x62, 0xa3, + 0x8d, 0x0b, 0x55, 0x65, 0xa5, 0xa8, 0x85, 0x5f, 0xa1, 0xeb, 0x30, 0xce, 0x13, 0x60, 0xb8, 0x58, + 0x2d, 0xac, 0x4c, 0xad, 0x9d, 0x8a, 0xa2, 0x0a, 0xb3, 0xba, 0xd5, 0xe6, 0xbf, 0x34, 0x61, 0x8c, + 0x54, 0x98, 0xd6, 0x5b, 0x8e, 0xb1, 0x4f, 0xb6, 0x3c, 0xe7, 0x37, 0xaa, 0x85, 0x95, 0xa2, 0x16, + 0x79, 0x87, 0x2e, 0x41, 0xc9, 0x26, 0xcf, 0x75, 0xbb, 0xad, 0x6f, 0x9b, 0xbe, 0xdd, 0x38, 0xb7, + 0x4b, 0xbc, 0x47, 0x75, 0x98, 0xe6, 0xc8, 0x4f, 0xf8, 0xc4, 0x30, 0x7c, 0x34, 0x95, 0x4c, 0xdd, + 0x6a, 0xd7, 0x5b, 0x0e, 0xb5, 0x1b, 0x6d, 0x2d, 0xe2, 0x82, 0x6e, 0xc3, 0x0c, 0x7f, 0xd6, 0xbc, + 0xfa, 0x32, 0x3c, 0x91, 0x07, 0x23, 0xea, 0x83, 0x1e, 0x41, 0x49, 0xbc, 0x70, 0x09, 0x3e, 0x74, + 0xd7, 0x17, 0x9e, 0xe4, 0x38, 0x67, 0xd2, 0x26, 0x66, 0xdd, 0xa4, 0xad, 0xbd, 0xf7, 0x89, 0xd1, + 0xd9, 0x75, 0xb4, 0x84, 0x33, 0x7a, 0x0a, 0xb3, 0x86, 0xb5, 0x43, 0x6c, 0x62, 0x37, 0xdd, 0xb5, + 0xc5, 0xd6, 0x5f, 0x72, 0x7b, 0x0c, 0x1c, 0xf4, 0xbc, 0x14, 0x34, 0x84, 0xe8, 0x39, 0x69, 0x52, + 0x0c, 0xf4, 0x31, 0x2c, 0xec, 0x50, 0x9b, 0xb4, 0x74, 0xe6, 0xc4, 0xe1, 0xa7, 0x0e, 0x04, 0x9f, + 0x06, 0xe3, 0xb2, 0x17, 0x9f, 0x4b, 0x14, 0x7e, 0xfa, 0x60, 0xec, 0x65, 0x18, 0xe8, 0x01, 0x94, + 0xc2, 0x59, 0xdd, 0xed, 0xea, 0x0c, 0x7f, 0x9f, 0xe3, 0xbe, 0x29, 0x9f, 0x6a, 0xaf, 0x62, 0xdc, + 0x58, 0x4b, 0xb8, 0xa2, 0x26, 0x94, 0x63, 0x59, 0x70, 0xc4, 0x1f, 0xe4, 0x45, 0x94, 0x79, 0xbb, + 0x1c, 0xc3, 0xdc, 0x39, 0xe2, 0xbb, 0xb9, 0x39, 0xc6, 0x5d, 0x91, 0x0d, 0x4b, 0xe2, 0xdd, 0x7d, + 0x83, 0x39, 0xc4, 0x32, 0xac, 0xce, 0x6d, 0x4a, 0x76, 0x76, 0x8c, 0x96, 0x41, 0x2c, 0x07, 0x97, + 0x38, 0xf2, 0xd5, 0x2c, 0x64, 0x99, 0x9f, 0x96, 0x05, 0x8a, 0x08, 0x9c, 0xea, 0xd9, 0x64, 0xdf, + 0xa0, 0x7d, 0x26, 0x56, 0xb9, 0xb7, 0x3c, 0x37, 0x6c, 0xf7, 0x63, 0xa5, 0x16, 0x3e, 0xc1, 0xa3, + 0x9e, 0xce, 0x8a, 0x7a, 0x87, 0xb4, 0xb4, 0x6c, 0x14, 0x64, 0xc0, 0x69, 0xdf, 0xa0, 0xc1, 0x4b, + 0x63, 0xb5, 0x48, 0x2c, 0x10, 0xca, 0x17, 0x68, 0x18, 0x0e, 0xea, 0x40, 0xc5, 0x37, 0xd9, 0x10, + 0x35, 0x8b, 0x45, 0x2a, 0xe7, 0x8b, 0x34, 0x04, 0x06, 0x3d, 0x83, 0xe5, 0xb8, 0x85, 0xa8, 0xa6, + 0xa6, 0x3b, 0x06, 0xc5, 0xb3, 0x3c, 0xcc, 0x52, 0x5a, 0x63, 0x70, 0x43, 0x64, 0x02, 0xa0, 0x4d, + 0x00, 0x87, 0x3a, 0xba, 0xd9, 0x74, 0x37, 0x17, 0x3c, 0x57, 0x55, 0x56, 0x26, 0xd7, 0xaf, 0xba, + 0x0d, 0xfc, 0x3f, 0xdf, 0x9c, 0x9e, 0xf3, 0x36, 0x44, 0xd6, 0xde, 0xab, 0x19, 0x74, 0xb5, 0xab, + 0x3b, 0xbb, 0xb5, 0x86, 0xe5, 0xfc, 0xeb, 0x2f, 0x57, 0x40, 0xec, 0x94, 0x0d, 0xcb, 0xf9, 0xf3, + 0xff, 0xbe, 0xbc, 0xa4, 0x68, 0x21, 0x0c, 0x74, 0xcb, 0x45, 0xec, 0x19, 0x2d, 0x0f, 0x71, 0x3e, + 0x9b, 0x60, 0xc3, 0x72, 0xb4, 0x90, 0x39, 0xfa, 0x00, 0xe6, 0xf8, 0x36, 0x27, 0x2a, 0x5c, 0xef, + 0x3b, 0xbb, 0xd4, 0x36, 0x9c, 0x97, 0x78, 0x61, 0xf8, 0x7c, 0xba, 0x58, 0x72, 0xef, 0x00, 0xb6, + 0xd9, 0xef, 0x6e, 0xd8, 0xb4, 0x7b, 0x87, 0x98, 0xa4, 0xa3, 0x3b, 0xd4, 0xc6, 0xf8, 0x20, 0xb0, + 0x71, 0x6f, 0xf4, 0x11, 0x1c, 0x6f, 0x7b, 0x0f, 0xa4, 0xcd, 0xf9, 0x33, 0x7c, 0x92, 0x03, 0xae, + 0x49, 0x01, 0x03, 0x47, 0xc1, 0x2f, 0x78, 0x6e, 0x58, 0x3b, 0x54, 0x8b, 0x43, 0xb9, 0x8b, 0x8c, + 0x87, 0x8d, 0xc4, 0x64, 0x1f, 0xf4, 0xa8, 0x25, 0xfc, 0xf1, 0x62, 0x3e, 0xf6, 0x43, 0x60, 0xd0, + 0x13, 0x98, 0xf7, 0x63, 0x7b, 0xcb, 0x6f, 0x93, 0xd8, 0xcd, 0x5d, 0xdd, 0x26, 0x78, 0x29, 0xdf, + 0x2a, 0x4e, 0x71, 0x47, 0x7b, 0x30, 0x2b, 0xea, 0xd1, 0xa5, 0xfb, 0xba, 0x19, 0xf4, 0xee, 0x65, + 0x0e, 0x7b, 0x23, 0x0a, 0x1b, 0x6a, 0xda, 0x22, 0x82, 0xe0, 0xd7, 0x0c, 0x41, 0xf0, 0x99, 0x92, + 0x82, 0xa2, 0x0f, 0x13, 0xc1, 0x38, 0x43, 0x7c, 0x8a, 0x07, 0xbb, 0x10, 0x0d, 0x26, 0xc8, 0x27, + 0xf7, 0x0b, 0x4d, 0x0a, 0x82, 0x7e, 0xad, 0xc0, 0xb2, 0x9f, 0x64, 0x53, 0x96, 0x52, 0x85, 0x47, + 0x79, 0x7f, 0x58, 0x4a, 0x29, 0x4b, 0x80, 0x24, 0x72, 0xcc, 0x8c, 0x86, 0x9c, 0x54, 0x36, 0x5e, + 0xce, 0xa7, 0x65, 0x6d, 0x3c, 0x1e, 0x5b, 0x92, 0x7c, 0x26, 0x2a, 0xba, 0x0b, 0x60, 0xf8, 0x0d, + 0x91, 0xe1, 0x2a, 0x8f, 0x71, 0x2e, 0x7b, 0xf1, 0xf9, 0xed, 0x33, 0xe4, 0x88, 0xd6, 0x61, 0xd2, + 0xdf, 0xe8, 0x18, 0x7e, 0x93, 0xa3, 0x9c, 0xcd, 0x42, 0x09, 0x5a, 0xe3, 0xc0, 0x0d, 0xbd, 0x07, + 0x47, 0x9f, 0x8b, 0x73, 0x9a, 0x2a, 0x3b, 0x08, 0xdc, 0x37, 0xb6, 0x37, 0xd7, 0x7a, 0x3f, 0x26, + 0x2f, 0xeb, 0x56, 0xfb, 0xd1, 0xce, 0x4e, 0x6b, 0x57, 0x37, 0xac, 0x87, 0xb4, 0x4d, 0x34, 0xdf, + 0x0d, 0xad, 0xc3, 0x84, 0xed, 0x1f, 0xd3, 0xce, 0x1c, 0x08, 0x22, 0xf0, 0x43, 0x77, 0xe1, 0x38, + 0xef, 0x5d, 0x1b, 0x84, 0x68, 0x64, 0x9f, 0x58, 0x7d, 0x82, 0xcf, 0x0e, 0xef, 0x77, 0x71, 0x1f, + 0xf4, 0x00, 0xca, 0x7e, 0x8f, 0xe6, 0x96, 0x4f, 0x78, 0x31, 0xf0, 0xb9, 0xe1, 0xbd, 0x5d, 0xe6, + 0x87, 0x36, 0x61, 0x46, 0x37, 0xcd, 0xc6, 0xa0, 0x52, 0xe7, 0x39, 0xd0, 0xa5, 0x61, 0x47, 0xa5, + 0x81, 0x87, 0x16, 0x05, 0x40, 0x0f, 0x60, 0x5a, 0x37, 0xcd, 0x8d, 0xa0, 0x68, 0x17, 0x38, 0xe0, + 0xc5, 0x61, 0x80, 0x81, 0x83, 0x16, 0x71, 0x47, 0x1f, 0xc2, 0x31, 0xdd, 0x34, 0xef, 0x53, 0xc6, + 0xd6, 0xfb, 0x56, 0xdb, 0x24, 0x0c, 0xaf, 0x70, 0xc0, 0x6b, 0xc3, 0x00, 0xc5, 0xc2, 0x7d, 0xac, + 0x9b, 0x7d, 0x22, 0x5c, 0xb5, 0x18, 0x14, 0xfa, 0x08, 0x90, 0x45, 0x1c, 0xb7, 0xca, 0xe1, 0x00, + 0x17, 0x79, 0x80, 0xcb, 0xc3, 0x02, 0x44, 0x90, 0x25, 0x38, 0xe8, 0x73, 0x05, 0x56, 0xfc, 0x39, + 0xdf, 0x24, 0x76, 0x8b, 0x58, 0x8e, 0xde, 0x11, 0x6d, 0x6f, 0x8b, 0xf2, 0xaf, 0xa6, 0x1d, 0x9c, + 0xfe, 0x2f, 0xf1, 0xdd, 0xf4, 0x86, 0xd8, 0x4d, 0x57, 0x3b, 0x86, 0xb3, 0xdb, 0xdf, 0xae, 0xb5, + 0x68, 0x77, 0x55, 0x37, 0x4d, 0x6a, 0xeb, 0x57, 0x44, 0x00, 0xff, 0x91, 0x2f, 0x31, 0x6f, 0x9f, + 0x75, 0x8b, 0x9b, 0x3b, 0x10, 0xd2, 0xe0, 0x04, 0xed, 0x11, 0xcb, 0xbb, 0x86, 0x3c, 0x31, 0xac, + 0x36, 0x7d, 0xce, 0xf0, 0x0d, 0xd9, 0x97, 0x15, 0xca, 0xd5, 0xbf, 0x50, 0x35, 0xda, 0x4c, 0x4b, + 0xba, 0xa3, 0x9f, 0xc2, 0x42, 0xdf, 0xda, 0xe9, 0x9b, 0x3b, 0x86, 0x69, 0x92, 0xb6, 0x37, 0xc6, + 0xef, 0x13, 0x0c, 0xbf, 0xc5, 0x91, 0x2b, 0x69, 0x0b, 0xd3, 0xb3, 0xd2, 0xd2, 0xdc, 0xd1, 0x2e, + 0xe0, 0xd0, 0x90, 0x48, 0x42, 0x40, 0x5f, 0xce, 0xa8, 0x53, 0xdd, 0x6a, 0x07, 0x07, 0xbf, 0x4f, + 0xfa, 0x84, 0x39, 0x22, 0x50, 0x2a, 0x1a, 0x6a, 0xc0, 0x8c, 0xa9, 0x33, 0xe7, 0x8e, 0x6d, 0xf4, + 0xbc, 0x2e, 0x7d, 0x33, 0xff, 0x3d, 0x2a, 0xea, 0x89, 0x2c, 0x58, 0x32, 0x75, 0x87, 0x30, 0xf1, + 0x95, 0xd8, 0x0f, 0xbd, 0xd2, 0x69, 0xa4, 0x63, 0x13, 0x87, 0xe1, 0x2b, 0x59, 0xbc, 0xc5, 0x5e, + 0x63, 0x74, 0xdd, 0xb6, 0xda, 0xed, 0x91, 0x36, 0x5f, 0x66, 0x5a, 0x16, 0x20, 0x72, 0xa0, 0xe2, + 0x0d, 0x0f, 0x4e, 0x6d, 0xb1, 0x90, 0xb5, 0x11, 0x42, 0x0e, 0xc1, 0x44, 0xbf, 0x54, 0xe0, 0x8c, + 0x67, 0xf2, 0xc8, 0x22, 0x0d, 0x2b, 0x35, 0xf6, 0x6a, 0xc6, 0xf7, 0x2a, 0x62, 0xa7, 0x51, 0xc8, + 0x83, 0x8f, 0x5e, 0x40, 0xd5, 0x33, 0x7b, 0xa8, 0x1b, 0xfb, 0x44, 0x3e, 0xe5, 0x57, 0x47, 0xc8, + 0x7f, 0x28, 0x2a, 0xfa, 0x8d, 0x02, 0x2b, 0x01, 0xc3, 0x47, 0x7d, 0xbf, 0x3a, 0x72, 0x0a, 0x6f, + 0x8f, 0x3e, 0x0d, 0xb9, 0x83, 0xa0, 0xdf, 0x29, 0xf0, 0x96, 0xc4, 0x38, 0xb5, 0x36, 0x6b, 0xa3, + 0x93, 0x3a, 0x48, 0x9c, 0x04, 0xaf, 0x81, 0xa1, 0x7c, 0xb2, 0xae, 0x7d, 0x4b, 0xbc, 0x86, 0xc4, + 0x41, 0x7f, 0x54, 0xa0, 0x26, 0xb7, 0x4f, 0x9d, 0xb2, 0xef, 0x8c, 0x4e, 0xed, 0x80, 0xa1, 0x50, + 0x0d, 0xca, 0xee, 0xe5, 0xeb, 0x99, 0x43, 0xf4, 0xee, 0x33, 0xbd, 0xdd, 0xb6, 0x09, 0x63, 0x84, + 0xe1, 0xb1, 0x6a, 0x61, 0x65, 0x52, 0x3b, 0xe1, 0x0e, 0x6d, 0x11, 0xbd, 0x5b, 0xf7, 0x07, 0xd0, + 0xc7, 0x30, 0xc7, 0x8f, 0x0b, 0xf7, 0x75, 0xe6, 0x78, 0x5d, 0xf4, 0x36, 0xed, 0x76, 0x0d, 0x07, + 0x5f, 0xcf, 0xd8, 0xd4, 0x5d, 0x96, 0xcc, 0x63, 0xc9, 0x79, 0xf3, 0x76, 0xa8, 0xc9, 0x81, 0xd0, + 0x36, 0xcc, 0x07, 0x03, 0xa2, 0x7d, 0x8a, 0x10, 0xdf, 0x3d, 0x70, 0x88, 0x14, 0x24, 0x44, 0xa1, + 0xca, 0x47, 0xb6, 0xe8, 0x43, 0xf2, 0xc2, 0xd9, 0xa4, 0x8c, 0x19, 0xdb, 0x26, 0xb9, 0xbd, 0xdb, + 0xb7, 0x2d, 0xc3, 0xea, 0x78, 0xbd, 0xf9, 0x7b, 0xf9, 0x7b, 0xf3, 0x50, 0x30, 0xd4, 0x84, 0xf2, + 0xb6, 0xfb, 0x63, 0x8b, 0xd6, 0xc3, 0x1a, 0xe1, 0x3b, 0x32, 0xe1, 0x24, 0x79, 0x4a, 0x67, 0x9a, + 0xcc, 0x1b, 0xd9, 0x50, 0x11, 0xaf, 0xef, 0xd3, 0xe7, 0x84, 0x39, 0xa1, 0x41, 0x71, 0x64, 0xbb, + 0x25, 0x9b, 0xb1, 0x24, 0xbe, 0x67, 0xbd, 0xa9, 0x1b, 0xb6, 0x36, 0x04, 0x11, 0x51, 0x38, 0x1b, + 0x39, 0xe3, 0xfd, 0xa4, 0xaf, 0x5b, 0x8e, 0x61, 0xfa, 0xdd, 0xcb, 0x17, 0x76, 0xf0, 0x0f, 0x87, + 0x1f, 0x16, 0x73, 0x01, 0xa1, 0x3e, 0x5c, 0x90, 0xda, 0x6d, 0x24, 0xb4, 0x29, 0xfc, 0xde, 0xf0, + 0x98, 0x79, 0xb1, 0x52, 0xf3, 0xd4, 0xa2, 0x02, 0x16, 0xae, 0x8f, 0x9a, 0x67, 0x0c, 0xe8, 0x5e, + 0x71, 0x62, 0xa6, 0x74, 0xec, 0x5e, 0x71, 0xe2, 0x58, 0xe9, 0xf8, 0xbd, 0xe2, 0xc4, 0xf1, 0x52, + 0x29, 0xb6, 0x1f, 0xfb, 0x4a, 0xa1, 0xf7, 0xad, 0x24, 0x77, 0xce, 0xd8, 0xf8, 0xb2, 0x37, 0xae, + 0x45, 0x65, 0x46, 0xf1, 0xa8, 0x3e, 0x86, 0xe3, 0x31, 0x19, 0x1b, 0x61, 0x38, 0xea, 0x6b, 0xe2, + 0x0a, 0xd7, 0xc4, 0xfd, 0x47, 0x74, 0x11, 0xde, 0xe0, 0x3f, 0xf1, 0x18, 0x17, 0xd9, 0xcb, 0x92, + 0x5c, 0x35, 0xcf, 0x42, 0xbd, 0x2b, 0x70, 0x07, 0x6a, 0x72, 0x06, 0x2e, 0x86, 0xa3, 0xc2, 0x88, + 0x23, 0x4f, 0x6a, 0xfe, 0xa3, 0xda, 0x84, 0x39, 0xe9, 0x87, 0x96, 0x01, 0x56, 0x85, 0xa9, 0x90, + 0x21, 0x07, 0x2c, 0x68, 0xe1, 0x57, 0xea, 0x63, 0x98, 0x97, 0x9f, 0x36, 0xe3, 0xbe, 0x4a, 0xc2, + 0x17, 0x2d, 0xc2, 0x84, 0x6f, 0xcd, 0x5b, 0x63, 0x51, 0x0b, 0x9e, 0xd5, 0x4f, 0x15, 0xc0, 0x69, + 0x3a, 0xef, 0x61, 0x08, 0xa3, 0xcb, 0x30, 0xee, 0xa1, 0xf0, 0xff, 0xa4, 0x48, 0xfc, 0xef, 0x86, + 0x50, 0x92, 0x85, 0x8d, 0xea, 0x40, 0x59, 0xa2, 0xb8, 0x8e, 0x32, 0xfd, 0x6e, 0xc1, 0xb9, 0xb3, + 0x88, 0x5b, 0x96, 0xc4, 0xd5, 0x3c, 0x0b, 0xf5, 0x4b, 0x05, 0xd4, 0xe1, 0x72, 0xec, 0x48, 0x2c, + 0x1e, 0xc3, 0xac, 0x54, 0x12, 0xf6, 0x48, 0xa9, 0xf1, 0xcb, 0xb1, 0x44, 0x04, 0x96, 0xfa, 0xab, + 0xbf, 0x55, 0xe0, 0x44, 0x42, 0x32, 0x1a, 0x89, 0x61, 0x03, 0x0a, 0x77, 0x48, 0x8b, 0x13, 0x3a, + 0xc4, 0xb5, 0xca, 0xc5, 0x50, 0xbb, 0x30, 0x13, 0xb9, 0x94, 0x67, 0xf0, 0x59, 0x87, 0x42, 0xc3, + 0xf2, 0x16, 0xcc, 0x28, 0xd2, 0xa8, 0xeb, 0xac, 0xfe, 0x2a, 0x31, 0x07, 0x8d, 0x11, 0xab, 0x24, + 0xd8, 0x14, 0x0e, 0xc3, 0xe6, 0x6f, 0x0a, 0x9c, 0xcd, 0x23, 0x49, 0x66, 0x10, 0x5c, 0x86, 0xc9, + 0x81, 0x88, 0xea, 0x51, 0x1c, 0xbc, 0x70, 0xfd, 0x7c, 0x89, 0xb2, 0xe0, 0xd1, 0xf7, 0xa5, 0xc6, + 0x3a, 0xcc, 0x44, 0x42, 0xe0, 0x22, 0x5f, 0x5d, 0x4b, 0x29, 0x4a, 0x15, 0x97, 0xc2, 0xa2, 0x1e, + 0xea, 0x3f, 0x15, 0xb8, 0x98, 0x5b, 0x2b, 0xcc, 0xd1, 0x6b, 0x42, 0x49, 0x8e, 0x25, 0xaa, 0x90, + 0x92, 0xc6, 0x3d, 0x28, 0xc5, 0x23, 0x89, 0x4c, 0x62, 0xb7, 0xe2, 0x84, 0xae, 0x97, 0xf0, 0x53, + 0x3f, 0x81, 0x93, 0xa9, 0x6a, 0x64, 0x78, 0x21, 0x28, 0xd1, 0x85, 0x90, 0x4e, 0x3b, 0x96, 0x72, + 0x21, 0xd9, 0x9a, 0xbf, 0x18, 0x83, 0x77, 0x46, 0xd7, 0x26, 0x0f, 0x35, 0xa7, 0x91, 0x85, 0x53, + 0xc8, 0x58, 0x38, 0xc5, 0xe8, 0x8c, 0x6f, 0x03, 0x4e, 0xe3, 0x83, 0xdf, 0xe0, 0x33, 0x7f, 0x5e, + 0xba, 0x86, 0x92, 0xca, 0x6a, 0x2a, 0x8e, 0xfa, 0x7b, 0x05, 0xd4, 0xe1, 0x22, 0x69, 0x34, 0x05, + 0x25, 0x23, 0x85, 0xb1, 0x68, 0x0a, 0xa1, 0x49, 0x29, 0x64, 0x56, 0xac, 0x98, 0xac, 0xd8, 0xa7, + 0x0a, 0x2c, 0xa4, 0x68, 0xab, 0x23, 0xb5, 0x91, 0xeb, 0x30, 0x19, 0x00, 0x88, 0x0e, 0xbf, 0x10, + 0x9d, 0xbf, 0x81, 0x76, 0x3b, 0xb0, 0x54, 0x7f, 0xae, 0xc0, 0xbc, 0x5c, 0x9c, 0x1d, 0x89, 0xc5, + 0x1a, 0x4c, 0xf8, 0xfe, 0x82, 0xc4, 0x7c, 0x94, 0x44, 0x20, 0xfd, 0x06, 0x76, 0xea, 0x0b, 0xc0, + 0x69, 0xca, 0xac, 0x5b, 0x99, 0x60, 0xcc, 0xaf, 0x4c, 0xf0, 0x02, 0xbd, 0x0b, 0xd3, 0x61, 0x6b, + 0x71, 0xbc, 0x5a, 0x8c, 0x46, 0x8c, 0x28, 0xbd, 0x11, 0x7b, 0xd5, 0x09, 0xef, 0x19, 0xd9, 0x7b, + 0x98, 0xd8, 0xa9, 0xc6, 0xbe, 0x85, 0x9d, 0xea, 0x0b, 0x05, 0x96, 0xb3, 0xb4, 0xda, 0x43, 0x1d, + 0x79, 0x6e, 0x02, 0x84, 0x74, 0x62, 0xaf, 0x04, 0x38, 0x65, 0x1d, 0x30, 0x2d, 0x64, 0xab, 0x7e, + 0xa6, 0xc0, 0x52, 0x86, 0xe2, 0x7b, 0x28, 0x56, 0xd7, 0x61, 0x72, 0xa0, 0x35, 0x4b, 0x17, 0xe7, + 0x40, 0x59, 0x1e, 0x58, 0xaa, 0x7f, 0x55, 0xe0, 0x5c, 0x2e, 0xcd, 0xf8, 0x50, 0xe4, 0x9a, 0x50, + 0x96, 0x40, 0x0a, 0x9a, 0xb1, 0x9b, 0xa5, 0x4c, 0xaf, 0x96, 0x79, 0xab, 0x7f, 0x50, 0xa0, 0x92, + 0xad, 0x46, 0x1f, 0x8a, 0xf3, 0x2d, 0x98, 0x0a, 0x61, 0x09, 0xae, 0x27, 0xa3, 0x5c, 0x43, 0x06, + 0x5a, 0xd8, 0x5a, 0x7d, 0x0a, 0xa5, 0xb8, 0xb6, 0x9b, 0x41, 0xe6, 0x32, 0x8c, 0x0b, 0x29, 0x77, + 0x4c, 0x76, 0x88, 0x16, 0x92, 0xad, 0xb0, 0x71, 0xcf, 0x86, 0x95, 0x6c, 0x75, 0x37, 0x23, 0xd4, + 0x63, 0x98, 0x95, 0x79, 0x88, 0xc0, 0xaa, 0xb4, 0x14, 0x51, 0xe5, 0x58, 0xea, 0xaf, 0xfe, 0x29, + 0x44, 0x4a, 0xae, 0xfa, 0x8c, 0xd4, 0xec, 0xee, 0x41, 0x29, 0x24, 0x9a, 0x70, 0x1c, 0x51, 0x89, + 0xb8, 0x92, 0x1e, 0xb3, 0xd2, 0x12, 0x7e, 0xea, 0xdf, 0x07, 0x4b, 0x3d, 0x5b, 0x9f, 0xca, 0x60, + 0xba, 0x08, 0x13, 0xc2, 0xe9, 0x6d, 0x41, 0x35, 0x78, 0x0e, 0x8d, 0xad, 0x89, 0x4d, 0x3a, 0x78, + 0x96, 0xe6, 0x51, 0x1c, 0x31, 0x8f, 0xcf, 0x07, 0xcd, 0x4d, 0x2a, 0x28, 0x65, 0xd0, 0xff, 0x19, + 0xcc, 0x49, 0x5d, 0x44, 0xf9, 0xcf, 0xa4, 0x72, 0x09, 0x2b, 0x62, 0xd2, 0xd7, 0xea, 0x1e, 0x94, + 0x25, 0x9a, 0x50, 0x8e, 0x63, 0xcf, 0x5a, 0xe4, 0xda, 0x2a, 0xd9, 0xcf, 0x02, 0x7d, 0x69, 0x70, + 0x9d, 0xfd, 0x85, 0x02, 0xcb, 0x59, 0x0a, 0x51, 0x8e, 0xb0, 0x75, 0x98, 0x0a, 0x8b, 0x50, 0x5e, + 0x64, 0xf9, 0x7f, 0xda, 0x87, 0x94, 0xa7, 0xb0, 0xcf, 0xba, 0xf6, 0xd5, 0xab, 0x8a, 0xf2, 0xf5, + 0xab, 0x8a, 0xf2, 0xdf, 0x57, 0x15, 0xe5, 0xb3, 0xd7, 0x95, 0x23, 0x5f, 0xbf, 0xae, 0x1c, 0xf9, + 0xf7, 0xeb, 0xca, 0x91, 0xa7, 0x37, 0x73, 0xee, 0x5a, 0x2f, 0x56, 0x07, 0x7f, 0x5e, 0xc8, 0xff, + 0xea, 0x70, 0x7b, 0x9c, 0xff, 0x15, 0xe1, 0xb5, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x62, 0xad, + 0xb9, 0xe5, 0xa2, 0x29, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -6467,7 +6467,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviousForecasterScoreRatio = append(m.PreviousForecasterScoreRatio, &TopicIdActorIdDec{}) + m.PreviousForecasterScoreRatio = append(m.PreviousForecasterScoreRatio, &TopicIdAndDec{}) if err := m.PreviousForecasterScoreRatio[len(m.PreviousForecasterScoreRatio)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 3dc88b984..f64f98350 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -52,6 +52,7 @@ func NewKeeper( sb := collections.NewSchemaBuilder(storeService) k := Keeper{ + Schema: collections.Schema{}, cdc: cdc, storeService: storeService, stakingKeeper: sk, diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go index 9387f1d74..b84027f33 100644 --- a/x/mint/keeper/msg_server.go +++ b/x/mint/keeper/msg_server.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var _ types.MsgServiceServer = msgServiceServer{} +var _ types.MsgServiceServer = msgServiceServer{} //nolint: exhaustruct // msgServiceServer is a wrapper of Keeper. type msgServiceServer struct { diff --git a/x/mint/keeper/msg_server_test.go b/x/mint/keeper/msg_server_test.go index 645bc2d5a..68fb09b90 100644 --- a/x/mint/keeper/msg_server_test.go +++ b/x/mint/keeper/msg_server_test.go @@ -40,8 +40,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidSigner() { params := types.DefaultParams() request := &types.UpdateParamsRequest{ - Sender: nonAdminAddr, - Params: params, + Sender: nonAdminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, nonAdminAddr).Return(false, nil) @@ -58,8 +60,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsNonAddressSigner() { notAnAddress := "not an address lol" request := &types.UpdateParamsRequest{ - Sender: notAnAddress, - Params: defaultParams, + Sender: notAnAddress, + Params: defaultParams, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, notAnAddress).Return(false, fmt.Errorf("error key encode:")) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -71,8 +75,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsMintDenom() { params := types.DefaultParams() params.MintDenom = "" request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -84,8 +90,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsMaxSupply() { params := types.DefaultParams() params.MaxSupply = sdkmath.NewIntFromUint64(0) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -97,8 +105,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsFEmission() { params := types.DefaultParams() params.FEmission = sdkmath.LegacyNewDec(205) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -110,8 +120,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsOneMonthSmoothingDegr params := types.DefaultParams() params.OneMonthSmoothingDegree = sdkmath.LegacyNewDec(15) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -123,8 +135,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsEcosystemTreasuryPerc params := types.DefaultParams() params.EcosystemTreasuryPercentOfTotalSupply = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -136,8 +150,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsFoundationTreasuryPer params := types.DefaultParams() params.FoundationTreasuryPercentOfTotalSupply = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -149,8 +165,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsParticipantsPercentOf params := types.DefaultParams() params.ParticipantsPercentOfTotalSupply = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -162,8 +180,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsInvestorsPercentOfTot params := types.DefaultParams() params.ParticipantsPercentOfTotalSupply = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -174,8 +194,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsTeamPercentOfTotalSup params := types.DefaultParams() params.TeamPercentOfTotalSupply = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + BlocksPerMonth: 525590, + RecalculateTargetEmission: false, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) @@ -186,8 +208,10 @@ func (s *MintKeeperTestSuite) TestUpdateParamsInvalidParamsMaximumMonthlyPercent params := types.DefaultParams() params.MaximumMonthlyPercentageYield = sdkmath.LegacyNewDec(101) request := &types.UpdateParamsRequest{ - Sender: s.adminAddr, - Params: params, + Sender: s.adminAddr, + Params: params, + RecalculateTargetEmission: false, + BlocksPerMonth: 1337, } s.emissionsKeeper.EXPECT().IsWhitelistAdmin(s.ctx, s.adminAddr).Return(true, nil) resp, err := s.msgServer.UpdateParams(s.ctx, request) diff --git a/x/mint/keeper/query_server.go b/x/mint/keeper/query_server.go index 775b16ae2..ed6006a03 100644 --- a/x/mint/keeper/query_server.go +++ b/x/mint/keeper/query_server.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var _ types.QueryServer = queryServer{} +var _ types.QueryServer = queryServer{} //nolint: exhaustruct func NewQueryServerImpl(k Keeper) types.QueryServer { return queryServer{k} diff --git a/x/mint/module/autocli.go b/x/mint/module/autocli.go index 94972493d..354276423 100644 --- a/x/mint/module/autocli.go +++ b/x/mint/module/autocli.go @@ -27,6 +27,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Get a bunch of debugging info about the inflation rate", }, }, + SubCommands: nil, + EnhanceCustomCommand: false, + Short: "Querying commands for the mint module", }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: mintv2.MsgService_ServiceDesc.ServiceName, @@ -49,6 +52,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, }, + SubCommands: nil, + EnhanceCustomCommand: false, + Short: "Transaction commands for the mint module", }, } } diff --git a/x/mint/module/module.go b/x/mint/module/module.go index 17c7f6468..abe492972 100644 --- a/x/mint/module/module.go +++ b/x/mint/module/module.go @@ -24,12 +24,12 @@ import ( const ConsensusVersion = 2 var ( - _ module.AppModuleBasic = AppModule{} - _ module.HasGenesis = AppModule{} - _ module.HasServices = AppModule{} + _ module.AppModuleBasic = AppModule{} //nolint:exhaustruct + _ module.HasGenesis = AppModule{} //nolint:exhaustruct + _ module.HasServices = AppModule{} //nolint:exhaustruct - _ appmodule.AppModule = AppModule{} - _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.AppModule = AppModule{} //nolint:exhaustruct + _ appmodule.HasBeginBlocker = AppModule{} //nolint:exhaustruct ) // AppModuleBasic defines the basic application module used by the mint module. @@ -143,7 +143,7 @@ func (am AppModule) BeginBlock(ctx context.Context) error { // func init() { - appmodule.Register(&modulev1.Module{}, + appmodule.Register(&modulev1.Module{FeeCollectorName: authtypes.FeeCollectorName}, appmodule.Provide(ProvideModule), ) } @@ -188,5 +188,5 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { // when no inflation calculation function is provided it will use the default types.DefaultInflationCalculationFn m := NewAppModule(in.Cdc, k, in.AccountKeeper) - return ModuleOutputs{MintKeeper: k, Module: m} + return ModuleOutputs{MintKeeper: k, Module: m, Out: depinject.Out{}} } diff --git a/x/mint/module/module_test.go b/x/mint/module/module_test.go index f856e0a71..42896c825 100644 --- a/x/mint/module/module_test.go +++ b/x/mint/module/module_test.go @@ -74,7 +74,13 @@ func (s *MintModuleTestSuite) SetupTest() { storeService := runtime.NewKVStoreService(key) encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, staking.AppModuleBasic{}, bank.AppModuleBasic{}, mint.AppModuleBasic{}) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + ctx := testCtx.Ctx.WithHeaderInfo(header.Info{ + Height: 1, + Hash: []byte("test"), + ChainID: "localnet", + AppHash: []byte("test"), + Time: time.Now(), + }) maccPerms := map[string][]string{ "fee_collector": nil, diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go index 867ce03a6..cec4c7730 100644 --- a/x/mint/types/codec.go +++ b/x/mint/types/codec.go @@ -10,15 +10,15 @@ import ( // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(Params{}, "allora-chain/x/mint/Params", nil) - legacy.RegisterAminoMsg(cdc, &UpdateParamsRequest{}, "allora-chain/x/mint/UpdateParamsRequest") + cdc.RegisterConcrete(Params{}, "allora-chain/x/mint/Params", nil) //nolint: exhaustruct + legacy.RegisterAminoMsg(cdc, &UpdateParamsRequest{}, "allora-chain/x/mint/UpdateParamsRequest") //nolint: exhaustruct } // RegisterInterfaces registers the interfaces types with the interface registry. func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &UpdateParamsRequest{}, + &UpdateParamsRequest{}, //nolint: exhaustruct ) msgservice.RegisterMsgServiceDesc(registry, &_MsgService_serviceDesc)