diff --git a/x/emissions/Makefile b/x/emissions/Makefile index ee1e0fd2e..700c7ed7d 100644 --- a/x/emissions/Makefile +++ b/x/emissions/Makefile @@ -1,5 +1,5 @@ #!/usr/bin/make -f -.DEFAULT_GOAL := build +.DEFAULT_GOAL := proto-all DOCKER := $(shell which docker) diff --git a/x/emissions/api/v2/genesis.pulsar.go b/x/emissions/api/v2/genesis.pulsar.go index b7b2ad14a..68781cde2 100644 --- a/x/emissions/api/v2/genesis.pulsar.go +++ b/x/emissions/api/v2/genesis.pulsar.go @@ -22009,12 +22009,15 @@ type GenesisState struct { // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // / TOPIC - // the next topic id to be used, equal to the number of topics that have been created + // the next topic id to be used, equal to the number of topics that have been + // created NextTopicId uint64 `protobuf:"varint,3,opt,name=nextTopicId,proto3" json:"nextTopicId,omitempty"` - // every topic that has been created indexed by their topicId starting from 1 (0 is reserved for the root network) + // every topic that has been created indexed by their topicId starting from 1 + // (0 is reserved for the root network) Topics []*TopicIdAndTopic `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics,omitempty"` ActiveTopics []uint64 `protobuf:"varint,5,rep,packed,name=activeTopics,proto3" json:"activeTopics,omitempty"` - // every topic that has been churned and ready to be rewarded i.e. reputer losses have been committed + // every topic that has been churned and ready to be rewarded i.e. reputer + // losses have been committed RewardableTopics []uint64 `protobuf:"varint,6,rep,packed,name=rewardableTopics,proto3" json:"rewardableTopics,omitempty"` // for a topic, what is every worker node that has registered to it? TopicWorkers []*TopicAndActorId `protobuf:"bytes,7,rep,name=topicWorkers,proto3" json:"topicWorkers,omitempty"` @@ -22051,26 +22054,34 @@ type GenesisState struct { TopicStake []*TopicIdAndInt `protobuf:"bytes,22,rep,name=topicStake,proto3" json:"topicStake,omitempty"` // stake reputer placed in topic + delegate stake placed in them, // signalling their total authority on the topic - // (topic Id, reputer) -> stake from reputer on self + stakeFromDelegatorsUponReputer + // (topic Id, reputer) -> stake from reputer on self + + // stakeFromDelegatorsUponReputer StakeReputerAuthority []*TopicIdActorIdInt `protobuf:"bytes,23,rep,name=stakeReputerAuthority,proto3" json:"stakeReputerAuthority,omitempty"` - // map of (topic id, delegator) -> total amount of stake in that topic placed by that delegator + // map of (topic id, delegator) -> total amount of stake in that topic placed + // by that delegator StakeSumFromDelegator []*TopicIdActorIdInt `protobuf:"bytes,24,rep,name=stakeSumFromDelegator,proto3" json:"stakeSumFromDelegator,omitempty"` - // map of (topic id, delegator, reputer) -> amount of stake that has been placed by that delegator on that target + // map of (topic id, delegator, reputer) -> amount of stake that has been + // placed by that delegator on that target DelegatedStakes []*TopicIdDelegatorReputerDelegatorInfo `protobuf:"bytes,25,rep,name=delegatedStakes,proto3" json:"delegatedStakes,omitempty"` - // map of (topic id, reputer) -> total amount of stake that has been placed on that reputer by delegators + // map of (topic id, reputer) -> total amount of stake that has been placed on + // that reputer by delegators StakeFromDelegatorsUponReputer []*TopicIdActorIdInt `protobuf:"bytes,26,rep,name=stakeFromDelegatorsUponReputer,proto3" json:"stakeFromDelegatorsUponReputer,omitempty"` // map of (topicId, reputer) -> share of delegate reward DelegateRewardPerShare []*TopicIdActorIdDec `protobuf:"bytes,27,rep,name=delegateRewardPerShare,proto3" json:"delegateRewardPerShare,omitempty"` // stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, reputer) -> removal information for that reputer + // map of (blockHeight, topic, reputer) -> removal information for that + // reputer StakeRemovalsByBlock []*BlockHeightTopicIdReputerStakeRemovalInfo `protobuf:"bytes,28,rep,name=stakeRemovalsByBlock,proto3" json:"stakeRemovalsByBlock,omitempty"` - // key set of (reputer, topic, blockHeight) to existence of a removal in the forwards map + // key set of (reputer, topic, blockHeight) to existence of a removal in the + // forwards map StakeRemovalsByActor []*ActorIdTopicIdBlockHeight `protobuf:"bytes,29,rep,name=stakeRemovalsByActor,proto3" json:"stakeRemovalsByActor,omitempty"` - // delegate stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, delegator, reputer staked upon) -> (list of reputers delegated upon and info) to have - // stake removed at that block + // delegate stake removals are double indexed to avoid O(n) lookups when + // removing stake map of (blockHeight, topic, delegator, reputer staked upon) + // -> (list of reputers delegated upon and info) to have stake removed at that + // block DelegateStakeRemovalsByBlock []*BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo `protobuf:"bytes,30,rep,name=delegateStakeRemovalsByBlock,proto3" json:"delegateStakeRemovalsByBlock,omitempty"` - // key set of (delegator, reputer, topicId, blockHeight) to existence of a removal in the forwards map + // key set of (delegator, reputer, topicId, blockHeight) to existence of a + // removal in the forwards map DelegateStakeRemovalsByActor []*DelegatorReputerTopicIdBlockHeight `protobuf:"bytes,31,rep,name=delegateStakeRemovalsByActor,proto3" json:"delegateStakeRemovalsByActor,omitempty"` // / MISC GLOBAL STATE // map of (topic, worker) -> inference @@ -22089,11 +22100,14 @@ type GenesisState struct { AllInferences []*TopicIdBlockHeightInferences `protobuf:"bytes,38,rep,name=allInferences,proto3" json:"allInferences,omitempty"` // map of (topic, block_height) -> Forecast AllForecasts []*TopicIdBlockHeightForecasts `protobuf:"bytes,39,rep,name=allForecasts,proto3" json:"allForecasts,omitempty"` - // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active at that time) + // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active + // at that time) AllLossBundles []*TopicIdBlockHeightReputerValueBundles `protobuf:"bytes,40,rep,name=allLossBundles,proto3" json:"allLossBundles,omitempty"` - // map of (topic, block_height) -> ValueBundle (1 network wide bundle per timestep) + // map of (topic, block_height) -> ValueBundle (1 network wide bundle per + // timestep) NetworkLossBundles []*TopicIdBlockHeightValueBundles `protobuf:"bytes,41,rep,name=networkLossBundles,proto3" json:"networkLossBundles,omitempty"` - // Percentage of all rewards, paid out to staked reputers, during the previous reward cadence. Used by mint module + // Percentage of all rewards, paid out to staked reputers, during the previous + // reward cadence. Used by mint module PreviousPercentageRewardToStakedReputers string `protobuf:"bytes,42,opt,name=previousPercentageRewardToStakedReputers,proto3" json:"previousPercentageRewardToStakedReputers,omitempty"` // / NONCES // map of (topic) -> unfulfilled nonces @@ -22101,14 +22115,18 @@ type GenesisState struct { // map of (topic) -> unfulfilled nonces UnfulfilledReputerNonces []*TopicIdAndReputerRequestNonces `protobuf:"bytes,44,rep,name=unfulfilledReputerNonces,proto3" json:"unfulfilledReputerNonces,omitempty"` // / REGRETS - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other inferers + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other inferers LatestInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,45,rep,name=latestInfererNetworkRegrets,proto3" json:"latestInfererNetworkRegrets,omitempty"` - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other forecasters + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other forecasters LatestForecasterNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,46,rep,name=latestForecasterNetworkRegrets,proto3" json:"latestForecasterNetworkRegrets,omitempty"` - // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster loss from comparing one-in loss with - // all network inferer (3rd index) regrets L_ij made under the regime of the one-in forecaster (2nd index) + // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster + // loss from comparing one-in loss with all network inferer (3rd index) + // regrets L_ij made under the regime of the one-in forecaster (2nd index) LatestOneInForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,47,rep,name=latestOneInForecasterNetworkRegrets,proto3" json:"latestOneInForecasterNetworkRegrets,omitempty"` - // the forecaster (2nd index) regrets made under the regime of the same forecaster as a one-in forecaster + // the forecaster (2nd index) regrets made under the regime of the same + // forecaster as a one-in forecaster LatestNaiveInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,48,rep,name=latestNaiveInfererNetworkRegrets,proto3" json:"latestNaiveInfererNetworkRegrets,omitempty"` LatestOneOutInfererInfererNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,49,rep,name=latestOneOutInfererInfererNetworkRegrets,proto3" json:"latestOneOutInfererInfererNetworkRegrets,omitempty"` LatestOneOutInfererForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,50,rep,name=latestOneOutInfererForecasterNetworkRegrets,proto3" json:"latestOneOutInfererForecasterNetworkRegrets,omitempty"` diff --git a/x/emissions/api/v2/params.pulsar.go b/x/emissions/api/v2/params.pulsar.go index 653b87106..a2d495cf8 100644 --- a/x/emissions/api/v2/params.pulsar.go +++ b/x/emissions/api/v2/params.pulsar.go @@ -2966,8 +2966,9 @@ type Params struct { // close proximities MinEffectiveTopicRevenue string `protobuf:"bytes,41,opt,name=min_effective_topic_revenue,json=minEffectiveTopicRevenue,proto3" json:"min_effective_topic_revenue,omitempty"` // we no stop dripping from the topic's effective revenue when the topic's // effective revenue is below this - HalfMaxProcessStakeRemovalsEndBlock uint64 `protobuf:"varint,42,opt,name=half_max_process_stake_removals_end_block,json=halfMaxProcessStakeRemovalsEndBlock,proto3" json:"half_max_process_stake_removals_end_block,omitempty"` // max amount of stake removals to process in an ABCI end block. Applied twice once for stakeRemovals and - // once for DelegateStakeRemovals, so actual max is this number times two + HalfMaxProcessStakeRemovalsEndBlock uint64 `protobuf:"varint,42,opt,name=half_max_process_stake_removals_end_block,json=halfMaxProcessStakeRemovalsEndBlock,proto3" json:"half_max_process_stake_removals_end_block,omitempty"` // max amount of stake removals to process in an ABCI end block. + // Applied twice once for stakeRemovals and once for + // DelegateStakeRemovals, so actual max is this number times two EpsilonSafeDiv string `protobuf:"bytes,43,opt,name=epsilon_safe_div,json=epsilonSafeDiv,proto3" json:"epsilon_safe_div,omitempty"` // / a small tolerance quantity used to cap division by zero DataSendingFee string `protobuf:"bytes,44,opt,name=data_sending_fee,json=dataSendingFee,proto3" json:"data_sending_fee,omitempty"` // payload sending fee for reputer or worker diff --git a/x/emissions/api/v3/genesis.pulsar.go b/x/emissions/api/v3/genesis.pulsar.go index f5c8079ba..b2db73362 100644 --- a/x/emissions/api/v3/genesis.pulsar.go +++ b/x/emissions/api/v3/genesis.pulsar.go @@ -22009,12 +22009,15 @@ type GenesisState struct { // params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // / TOPIC - // the next topic id to be used, equal to the number of topics that have been created + // the next topic id to be used, equal to the number of topics that have been + // created NextTopicId uint64 `protobuf:"varint,3,opt,name=nextTopicId,proto3" json:"nextTopicId,omitempty"` - // every topic that has been created indexed by their topicId starting from 1 (0 is reserved for the root network) + // every topic that has been created indexed by their topicId starting from 1 + // (0 is reserved for the root network) Topics []*TopicIdAndTopic `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics,omitempty"` ActiveTopics []uint64 `protobuf:"varint,5,rep,packed,name=activeTopics,proto3" json:"activeTopics,omitempty"` - // every topic that has been churned and ready to be rewarded i.e. reputer losses have been committed + // every topic that has been churned and ready to be rewarded i.e. reputer + // losses have been committed RewardableTopics []uint64 `protobuf:"varint,6,rep,packed,name=rewardableTopics,proto3" json:"rewardableTopics,omitempty"` // for a topic, what is every worker node that has registered to it? TopicWorkers []*TopicAndActorId `protobuf:"bytes,7,rep,name=topicWorkers,proto3" json:"topicWorkers,omitempty"` @@ -22051,26 +22054,34 @@ type GenesisState struct { TopicStake []*TopicIdAndInt `protobuf:"bytes,22,rep,name=topicStake,proto3" json:"topicStake,omitempty"` // stake reputer placed in topic + delegate stake placed in them, // signalling their total authority on the topic - // (topic Id, reputer) -> stake from reputer on self + stakeFromDelegatorsUponReputer + // (topic Id, reputer) -> stake from reputer on self + + // stakeFromDelegatorsUponReputer StakeReputerAuthority []*TopicIdActorIdInt `protobuf:"bytes,23,rep,name=stakeReputerAuthority,proto3" json:"stakeReputerAuthority,omitempty"` - // map of (topic id, delegator) -> total amount of stake in that topic placed by that delegator + // map of (topic id, delegator) -> total amount of stake in that topic placed + // by that delegator StakeSumFromDelegator []*TopicIdActorIdInt `protobuf:"bytes,24,rep,name=stakeSumFromDelegator,proto3" json:"stakeSumFromDelegator,omitempty"` - // map of (topic id, delegator, reputer) -> amount of stake that has been placed by that delegator on that target + // map of (topic id, delegator, reputer) -> amount of stake that has been + // placed by that delegator on that target DelegatedStakes []*TopicIdDelegatorReputerDelegatorInfo `protobuf:"bytes,25,rep,name=delegatedStakes,proto3" json:"delegatedStakes,omitempty"` - // map of (topic id, reputer) -> total amount of stake that has been placed on that reputer by delegators + // map of (topic id, reputer) -> total amount of stake that has been placed on + // that reputer by delegators StakeFromDelegatorsUponReputer []*TopicIdActorIdInt `protobuf:"bytes,26,rep,name=stakeFromDelegatorsUponReputer,proto3" json:"stakeFromDelegatorsUponReputer,omitempty"` // map of (topicId, reputer) -> share of delegate reward DelegateRewardPerShare []*TopicIdActorIdDec `protobuf:"bytes,27,rep,name=delegateRewardPerShare,proto3" json:"delegateRewardPerShare,omitempty"` // stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, reputer) -> removal information for that reputer + // map of (blockHeight, topic, reputer) -> removal information for that + // reputer StakeRemovalsByBlock []*BlockHeightTopicIdReputerStakeRemovalInfo `protobuf:"bytes,28,rep,name=stakeRemovalsByBlock,proto3" json:"stakeRemovalsByBlock,omitempty"` - // key set of (reputer, topic, blockHeight) to existence of a removal in the forwards map + // key set of (reputer, topic, blockHeight) to existence of a removal in the + // forwards map StakeRemovalsByActor []*ActorIdTopicIdBlockHeight `protobuf:"bytes,29,rep,name=stakeRemovalsByActor,proto3" json:"stakeRemovalsByActor,omitempty"` - // delegate stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, delegator, reputer staked upon) -> (list of reputers delegated upon and info) to have - // stake removed at that block + // delegate stake removals are double indexed to avoid O(n) lookups when + // removing stake map of (blockHeight, topic, delegator, reputer staked upon) + // -> (list of reputers delegated upon and info) to have stake removed at that + // block DelegateStakeRemovalsByBlock []*BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo `protobuf:"bytes,30,rep,name=delegateStakeRemovalsByBlock,proto3" json:"delegateStakeRemovalsByBlock,omitempty"` - // key set of (delegator, reputer, topicId, blockHeight) to existence of a removal in the forwards map + // key set of (delegator, reputer, topicId, blockHeight) to existence of a + // removal in the forwards map DelegateStakeRemovalsByActor []*DelegatorReputerTopicIdBlockHeight `protobuf:"bytes,31,rep,name=delegateStakeRemovalsByActor,proto3" json:"delegateStakeRemovalsByActor,omitempty"` // / MISC GLOBAL STATE // map of (topic, worker) -> inference @@ -22089,11 +22100,14 @@ type GenesisState struct { AllInferences []*TopicIdBlockHeightInferences `protobuf:"bytes,38,rep,name=allInferences,proto3" json:"allInferences,omitempty"` // map of (topic, block_height) -> Forecast AllForecasts []*TopicIdBlockHeightForecasts `protobuf:"bytes,39,rep,name=allForecasts,proto3" json:"allForecasts,omitempty"` - // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active at that time) + // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active + // at that time) AllLossBundles []*TopicIdBlockHeightReputerValueBundles `protobuf:"bytes,40,rep,name=allLossBundles,proto3" json:"allLossBundles,omitempty"` - // map of (topic, block_height) -> ValueBundle (1 network wide bundle per timestep) + // map of (topic, block_height) -> ValueBundle (1 network wide bundle per + // timestep) NetworkLossBundles []*TopicIdBlockHeightValueBundles `protobuf:"bytes,41,rep,name=networkLossBundles,proto3" json:"networkLossBundles,omitempty"` - // Percentage of all rewards, paid out to staked reputers, during the previous reward cadence. Used by mint module + // Percentage of all rewards, paid out to staked reputers, during the previous + // reward cadence. Used by mint module PreviousPercentageRewardToStakedReputers string `protobuf:"bytes,42,opt,name=previousPercentageRewardToStakedReputers,proto3" json:"previousPercentageRewardToStakedReputers,omitempty"` // / NONCES // map of (topic) -> unfulfilled nonces @@ -22101,14 +22115,18 @@ type GenesisState struct { // map of (topic) -> unfulfilled nonces UnfulfilledReputerNonces []*TopicIdAndReputerRequestNonces `protobuf:"bytes,44,rep,name=unfulfilledReputerNonces,proto3" json:"unfulfilledReputerNonces,omitempty"` // / REGRETS - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other inferers + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other inferers LatestInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,45,rep,name=latestInfererNetworkRegrets,proto3" json:"latestInfererNetworkRegrets,omitempty"` - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other forecasters + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other forecasters LatestForecasterNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,46,rep,name=latestForecasterNetworkRegrets,proto3" json:"latestForecasterNetworkRegrets,omitempty"` - // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster loss from comparing one-in loss with - // all network inferer (3rd index) regrets L_ij made under the regime of the one-in forecaster (2nd index) + // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster + // loss from comparing one-in loss with all network inferer (3rd index) + // regrets L_ij made under the regime of the one-in forecaster (2nd index) LatestOneInForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,47,rep,name=latestOneInForecasterNetworkRegrets,proto3" json:"latestOneInForecasterNetworkRegrets,omitempty"` - // the forecaster (2nd index) regrets made under the regime of the same forecaster as a one-in forecaster + // the forecaster (2nd index) regrets made under the regime of the same + // forecaster as a one-in forecaster LatestNaiveInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,48,rep,name=latestNaiveInfererNetworkRegrets,proto3" json:"latestNaiveInfererNetworkRegrets,omitempty"` LatestOneOutInfererInfererNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,49,rep,name=latestOneOutInfererInfererNetworkRegrets,proto3" json:"latestOneOutInfererInfererNetworkRegrets,omitempty"` LatestOneOutInfererForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,50,rep,name=latestOneOutInfererForecasterNetworkRegrets,proto3" json:"latestOneOutInfererForecasterNetworkRegrets,omitempty"` diff --git a/x/emissions/api/v3/params.pulsar.go b/x/emissions/api/v3/params.pulsar.go index 53f03f660..cb46ec7d7 100644 --- a/x/emissions/api/v3/params.pulsar.go +++ b/x/emissions/api/v3/params.pulsar.go @@ -2948,8 +2948,9 @@ type Params struct { TopicFeeRevenueDecayRate string `protobuf:"bytes,39,opt,name=topic_fee_revenue_decay_rate,json=topicFeeRevenueDecayRate,proto3" json:"topic_fee_revenue_decay_rate,omitempty"` // decay rate for topic fee revenue EpsilonReputer string `protobuf:"bytes,40,opt,name=epsilon_reputer,json=epsilonReputer,proto3" json:"epsilon_reputer,omitempty"` // a small tolerance quantity used to cap reputer scores at infinitesimally // close proximities - HalfMaxProcessStakeRemovalsEndBlock uint64 `protobuf:"varint,42,opt,name=half_max_process_stake_removals_end_block,json=halfMaxProcessStakeRemovalsEndBlock,proto3" json:"half_max_process_stake_removals_end_block,omitempty"` // max amount of stake removals to process in an ABCI end block. Applied twice once for stakeRemovals and - // once for DelegateStakeRemovals, so actual max is this number times two + HalfMaxProcessStakeRemovalsEndBlock uint64 `protobuf:"varint,42,opt,name=half_max_process_stake_removals_end_block,json=halfMaxProcessStakeRemovalsEndBlock,proto3" json:"half_max_process_stake_removals_end_block,omitempty"` // max amount of stake removals to process in an ABCI end block. + // Applied twice once for stakeRemovals and once for + // DelegateStakeRemovals, so actual max is this number times two EpsilonSafeDiv string `protobuf:"bytes,43,opt,name=epsilon_safe_div,json=epsilonSafeDiv,proto3" json:"epsilon_safe_div,omitempty"` // / a small tolerance quantity used to cap division by zero DataSendingFee string `protobuf:"bytes,44,opt,name=data_sending_fee,json=dataSendingFee,proto3" json:"data_sending_fee,omitempty"` diff --git a/x/emissions/proto/emissions/module/v1/module.proto b/x/emissions/proto/emissions/module/v1/module.proto index 0ef441d3c..50c10eca4 100644 --- a/x/emissions/proto/emissions/module/v1/module.proto +++ b/x/emissions/proto/emissions/module/v1/module.proto @@ -8,7 +8,7 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/allora-network/allora-chain/x/emissions" + go_import : "github.com/allora-network/allora-chain/x/emissions" }; string fee_collector_name = 1; diff --git a/x/emissions/proto/emissions/v1/nonce.proto b/x/emissions/proto/emissions/v1/nonce.proto index 51a6ecbd9..4767b10d4 100644 --- a/x/emissions/proto/emissions/v1/nonce.proto +++ b/x/emissions/proto/emissions/v1/nonce.proto @@ -7,12 +7,10 @@ import "gogoproto/gogo.proto"; message Nonce { option (gogoproto.equal) = true; - int64 block_height = 1; // block height of the request + int64 block_height = 1; // block height of the request } -message Nonces { - repeated Nonce nonces = 1; -} +message Nonces { repeated Nonce nonces = 1; } message ReputerRequestNonce { option (gogoproto.equal) = true; @@ -21,6 +19,4 @@ message ReputerRequestNonce { Nonce reputer_nonce = 1; } -message ReputerRequestNonces { - repeated ReputerRequestNonce nonces = 1; -} +message ReputerRequestNonces { repeated ReputerRequestNonce nonces = 1; } diff --git a/x/emissions/proto/emissions/v1/reputer.proto b/x/emissions/proto/emissions/v1/reputer.proto index 6f18c1b98..f41f94678 100644 --- a/x/emissions/proto/emissions/v1/reputer.proto +++ b/x/emissions/proto/emissions/v1/reputer.proto @@ -9,17 +9,21 @@ import "emissions/v1/nonce.proto"; message WorkerAttributedValue { option (gogoproto.equal) = true; - string worker = 1; // worker who created the value - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string worker = 1; // worker who created the value + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message WithheldWorkerAttributedValue { option (gogoproto.equal) = true; string worker = 1; - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } // These losses and inferences are calculated per reputer or by the network @@ -33,15 +37,19 @@ message ValueBundle { string reputer = 3; bytes extra_data = 4; // R_im || log10 L_im || I_i - string combined_value = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string combined_value = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // R_ijm || log10 L_ijm || I_ij repeated WorkerAttributedValue inferer_values = 6; // R_ikm || log10 L_ikm || I_ik repeated WorkerAttributedValue forecaster_values = 7; // R^-_im || log10 L^-_im || I^-_i - string naive_value = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string naive_value = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // R^-_ilm || log10 L^-_ilm || I^-_il where l = any j // Note: forecast-implied inferences are recomputed for each left-out // inference diff --git a/x/emissions/proto/emissions/v1/topic.proto b/x/emissions/proto/emissions/v1/topic.proto index 92ec29617..84746c834 100644 --- a/x/emissions/proto/emissions/v1/topic.proto +++ b/x/emissions/proto/emissions/v1/topic.proto @@ -20,21 +20,23 @@ message Topic { int64 epoch_length = 9; int64 ground_truth_lag = 10; string default_arg = 11; - string p_norm = 12 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string alpha_regret = 13 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_norm = 12 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string alpha_regret = 13 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool allow_negative = 14; } -message TopicList { - repeated Topic topics = 1; -} +message TopicList { repeated Topic topics = 1; } message TimestampedActorNonce { option (gogoproto.equal) = true; - int64 block_height = 1; // height at which value calculated or received + int64 block_height = 1; // height at which value calculated or received string actor = 2; Nonce nonce = 3; } \ No newline at end of file diff --git a/x/emissions/proto/emissions/v2/events.proto b/x/emissions/proto/emissions/v2/events.proto index e2457606f..0a012faef 100644 --- a/x/emissions/proto/emissions/v2/events.proto +++ b/x/emissions/proto/emissions/v2/events.proto @@ -31,8 +31,10 @@ message EventScoresSet { uint64 topic_id = 2; int64 block_height = 3; repeated string addresses = 4; - repeated string scores = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string scores = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message EventRewardsSettled { @@ -40,8 +42,10 @@ message EventRewardsSettled { uint64 topic_id = 2; int64 block_height = 3; repeated string addresses = 4; - repeated string rewards = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string rewards = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message EventNetworkLossSet { diff --git a/x/emissions/proto/emissions/v2/genesis.proto b/x/emissions/proto/emissions/v2/genesis.proto index 148cc4b53..38c0b128e 100644 --- a/x/emissions/proto/emissions/v2/genesis.proto +++ b/x/emissions/proto/emissions/v2/genesis.proto @@ -19,15 +19,18 @@ option go_package = "github.com/allora-network/allora-chain/x/emissions/types"; // GenesisState is the state that must be provided at genesis. message GenesisState { // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; /// TOPIC - // the next topic id to be used, equal to the number of topics that have been created + // the next topic id to be used, equal to the number of topics that have been + // created uint64 nextTopicId = 3; - // every topic that has been created indexed by their topicId starting from 1 (0 is reserved for the root network) + // every topic that has been created indexed by their topicId starting from 1 + // (0 is reserved for the root network) repeated TopicIdAndTopic topics = 4; repeated uint64 activeTopics = 5; - // every topic that has been churned and ready to be rewarded i.e. reputer losses have been committed + // every topic that has been churned and ready to be rewarded i.e. reputer + // losses have been committed repeated uint64 rewardableTopics = 6; // for a topic, what is every worker node that has registered to it? repeated TopicAndActorId topicWorkers = 7; @@ -73,26 +76,35 @@ message GenesisState { repeated TopicIdAndInt topicStake = 22; // stake reputer placed in topic + delegate stake placed in them, // signalling their total authority on the topic - // (topic Id, reputer) -> stake from reputer on self + stakeFromDelegatorsUponReputer + // (topic Id, reputer) -> stake from reputer on self + + // stakeFromDelegatorsUponReputer repeated TopicIdActorIdInt stakeReputerAuthority = 23; - // map of (topic id, delegator) -> total amount of stake in that topic placed by that delegator + // map of (topic id, delegator) -> total amount of stake in that topic placed + // by that delegator repeated TopicIdActorIdInt stakeSumFromDelegator = 24; - // map of (topic id, delegator, reputer) -> amount of stake that has been placed by that delegator on that target + // map of (topic id, delegator, reputer) -> amount of stake that has been + // placed by that delegator on that target repeated TopicIdDelegatorReputerDelegatorInfo delegatedStakes = 25; - // map of (topic id, reputer) -> total amount of stake that has been placed on that reputer by delegators + // map of (topic id, reputer) -> total amount of stake that has been placed on + // that reputer by delegators repeated TopicIdActorIdInt stakeFromDelegatorsUponReputer = 26; // map of (topicId, reputer) -> share of delegate reward repeated TopicIdActorIdDec delegateRewardPerShare = 27; // stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, reputer) -> removal information for that reputer + // map of (blockHeight, topic, reputer) -> removal information for that + // reputer repeated BlockHeightTopicIdReputerStakeRemovalInfo stakeRemovalsByBlock = 28; - // key set of (reputer, topic, blockHeight) to existence of a removal in the forwards map + // key set of (reputer, topic, blockHeight) to existence of a removal in the + // forwards map repeated ActorIdTopicIdBlockHeight stakeRemovalsByActor = 29; - // delegate stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, delegator, reputer staked upon) -> (list of reputers delegated upon and info) to have - // stake removed at that block - repeated BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo delegateStakeRemovalsByBlock = 30; - // key set of (delegator, reputer, topicId, blockHeight) to existence of a removal in the forwards map + // delegate stake removals are double indexed to avoid O(n) lookups when + // removing stake map of (blockHeight, topic, delegator, reputer staked upon) + // -> (list of reputers delegated upon and info) to have stake removed at that + // block + repeated BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo + delegateStakeRemovalsByBlock = 30; + // key set of (delegator, reputer, topicId, blockHeight) to existence of a + // removal in the forwards map repeated DelegatorReputerTopicIdBlockHeight delegateStakeRemovalsByActor = 31; /// MISC GLOBAL STATE @@ -112,13 +124,18 @@ message GenesisState { repeated TopicIdBlockHeightInferences allInferences = 38; // map of (topic, block_height) -> Forecast repeated TopicIdBlockHeightForecasts allForecasts = 39; - // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active at that time) + // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active + // at that time) repeated TopicIdBlockHeightReputerValueBundles allLossBundles = 40; - // map of (topic, block_height) -> ValueBundle (1 network wide bundle per timestep) + // map of (topic, block_height) -> ValueBundle (1 network wide bundle per + // timestep) repeated TopicIdBlockHeightValueBundles networkLossBundles = 41; - // Percentage of all rewards, paid out to staked reputers, during the previous reward cadence. Used by mint module - string previousPercentageRewardToStakedReputers = 42 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + // Percentage of all rewards, paid out to staked reputers, during the previous + // reward cadence. Used by mint module + string previousPercentageRewardToStakedReputers = 42 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; /// NONCES // map of (topic) -> unfulfilled nonces @@ -127,19 +144,28 @@ message GenesisState { repeated TopicIdAndReputerRequestNonces unfulfilledReputerNonces = 44; /// REGRETS - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other inferers + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other inferers repeated TopicIdActorIdTimeStampedValue latestInfererNetworkRegrets = 45; - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other forecasters + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other forecasters repeated TopicIdActorIdTimeStampedValue latestForecasterNetworkRegrets = 46; - // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster loss from comparing one-in loss with - // all network inferer (3rd index) regrets L_ij made under the regime of the one-in forecaster (2nd index) - repeated TopicIdActorIdActorIdTimeStampedValue latestOneInForecasterNetworkRegrets = 47; - // the forecaster (2nd index) regrets made under the regime of the same forecaster as a one-in forecaster + // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster + // loss from comparing one-in loss with all network inferer (3rd index) + // regrets L_ij made under the regime of the one-in forecaster (2nd index) + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneInForecasterNetworkRegrets = 47; + // the forecaster (2nd index) regrets made under the regime of the same + // forecaster as a one-in forecaster repeated TopicIdActorIdTimeStampedValue latestNaiveInfererNetworkRegrets = 48; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutInfererInfererNetworkRegrets = 49; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutInfererForecasterNetworkRegrets = 50; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutForecasterInfererNetworkRegrets = 51; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutForecasterForecasterNetworkRegrets = 52; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutInfererInfererNetworkRegrets = 49; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutInfererForecasterNetworkRegrets = 50; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutForecasterInfererNetworkRegrets = 51; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutForecasterForecasterNetworkRegrets = 52; /// WHITELISTS repeated string core_team_addresses = 2; @@ -185,8 +211,10 @@ message TopicIdActorIdListeningCoefficient { message TopicIdActorIdDec { uint64 TopicId = 1; string ActorId = 2; - string Dec = 3 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string Dec = 3 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message TopicIdAndInt { @@ -264,8 +292,10 @@ message LibP2pKeyAndOffchainNode { message TopicIdAndDec { uint64 TopicId = 1; - string Dec = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string Dec = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message TopicIdBlockHeightInferences { diff --git a/x/emissions/proto/emissions/v2/inference.proto b/x/emissions/proto/emissions/v2/inference.proto index 5ef30148e..b6180a7a0 100644 --- a/x/emissions/proto/emissions/v2/inference.proto +++ b/x/emissions/proto/emissions/v2/inference.proto @@ -9,7 +9,9 @@ import "emissions/v2/nonce.proto"; message RegretInformedWeight { option (gogoproto.equal) = true; - string worker = 1; // worker who created the value - string weight = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string worker = 1; // worker who created the value + string weight = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v2/nonce.proto b/x/emissions/proto/emissions/v2/nonce.proto index 9342ed766..33eb7419e 100644 --- a/x/emissions/proto/emissions/v2/nonce.proto +++ b/x/emissions/proto/emissions/v2/nonce.proto @@ -7,12 +7,10 @@ import "gogoproto/gogo.proto"; message Nonce { option (gogoproto.equal) = true; - int64 block_height = 1; // block height of the request + int64 block_height = 1; // block height of the request } -message Nonces { - repeated Nonce nonces = 1; -} +message Nonces { repeated Nonce nonces = 1; } message ReputerRequestNonce { option (gogoproto.equal) = true; @@ -21,6 +19,4 @@ message ReputerRequestNonce { Nonce reputer_nonce = 1; } -message ReputerRequestNonces { - repeated ReputerRequestNonce nonces = 1; -} +message ReputerRequestNonces { repeated ReputerRequestNonce nonces = 1; } diff --git a/x/emissions/proto/emissions/v2/params.proto b/x/emissions/proto/emissions/v2/params.proto index 60fa56b59..594ed8317 100644 --- a/x/emissions/proto/emissions/v2/params.proto +++ b/x/emissions/proto/emissions/v2/params.proto @@ -9,130 +9,157 @@ import "gogoproto/gogo.proto"; // Params defines the parameters of the module. message Params { - string version = 1; // version of the protocol should be in lockstep with - // github release tag version - int64 max_serialized_msg_length = 2; // max length of input data for msg and query server calls + string version = 1; // version of the protocol should be in lockstep with + // github release tag version + int64 max_serialized_msg_length = + 2; // max length of input data for msg and query server calls string min_topic_weight = 3 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // total unmet demand for a topic < this => don't run inference - // solicatation or weight-adjustment - uint64 max_topics_per_block = 4; // max number of topics to run cadence for per block + ]; // total unmet demand for a topic < this => don't run inference + // solicatation or weight-adjustment + uint64 max_topics_per_block = + 4; // max number of topics to run cadence for per block string required_minimum_stake = 5 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // minimum amount of tokens to send to stake as a reputer or worker - int64 remove_stake_delay_window = 6; // how long to wait (blocks) before allowed to remove stake - int64 min_epoch_length = 7; // fastest allowable topic epoch and cadence of a - // repeating inference request + ]; // minimum amount of tokens to send to stake as a reputer or worker + int64 remove_stake_delay_window = + 6; // how long to wait (blocks) before allowed to remove stake + int64 min_epoch_length = 7; // fastest allowable topic epoch and cadence of a + // repeating inference request string beta_entropy = 8 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // controls resilience of reward payouts against copycat workers + ]; // controls resilience of reward payouts against copycat workers string learning_rate = 9 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // speed of gradient descent + ]; // speed of gradient descent string max_gradient_threshold = 10 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // gradient descent stops when gradient falls below this + ]; // gradient descent stops when gradient falls below this string min_stake_fraction = 11 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // minimum fraction of stake to listen to when setting consensus listening - // coefficients - uint64 max_unfulfilled_worker_requests = 13; // max num worker request nonces to keep track of per topic - uint64 max_unfulfilled_reputer_requests = 14; // max num reputer request nonces to keep track of per topic + ]; // minimum fraction of stake to listen to when setting consensus listening + // coefficients + uint64 max_unfulfilled_worker_requests = + 13; // max num worker request nonces to keep track of per topic + uint64 max_unfulfilled_reputer_requests = + 14; // max num reputer request nonces to keep track of per topic string topic_reward_stake_importance = 15 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // The exponent μ represents the importance of stake in the reward of a - // topic and has a fiducial value of 0.5 + ]; // The exponent μ represents the importance of stake in the reward of a + // topic and has a fiducial value of 0.5 string topic_reward_fee_revenue_importance = 16 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // The exponent ν represents the importance of fee revenue in the reward of - // a topic and has a fiducial value of 0.5 + ]; // The exponent ν represents the importance of fee revenue in the reward of + // a topic and has a fiducial value of 0.5 string topic_reward_alpha = 17 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // global exponential moving average parameter. Fiducial value of 0.9375 on - // a monthly timescale, 0.5 for weekly updates + ]; // global exponential moving average parameter. Fiducial value of 0.9375 on + // a monthly timescale, 0.5 for weekly updates string task_reward_alpha = 18 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // global exponential moving average parameter. Fiducial value of 0.1 used - // to calculate ~U_ij, ~V_ik, ~W_im + ]; // global exponential moving average parameter. Fiducial value of 0.1 used + // to calculate ~U_ij, ~V_ik, ~W_im string validators_vs_allora_percent_reward = 19 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // percent of total supply rewarded to cosmos network validators, rest goes - // to allora reputers workers etc - uint64 max_samples_to_scale_scores = 20; // number of scores to use for standard deviation calculation - uint64 max_top_inferers_to_reward = 21; // max number of top inferers by score to reward - uint64 max_top_forecasters_to_reward = 22; // max number of top forecasters by score to reward - uint64 max_top_reputers_to_reward = 23; // max number of top reputers by score to reward + ]; // percent of total supply rewarded to cosmos network validators, rest goes + // to allora reputers workers etc + uint64 max_samples_to_scale_scores = + 20; // number of scores to use for standard deviation calculation + uint64 max_top_inferers_to_reward = + 21; // max number of top inferers by score to reward + uint64 max_top_forecasters_to_reward = + 22; // max number of top forecasters by score to reward + uint64 max_top_reputers_to_reward = + 23; // max number of top reputers by score to reward string create_topic_fee = 24 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // topic registration fee - uint64 gradient_descent_max_iters = 25; // max number of gradient descent iterations - int64 max_retries_to_fulfil_nonces_worker = 26; // max number of retries to unfulfilled nonces (worker) - int64 max_retries_to_fulfil_nonces_reputer = 27; // max number of retries to unfulfilled nonces (reputer) + ]; // topic registration fee + uint64 gradient_descent_max_iters = + 25; // max number of gradient descent iterations + int64 max_retries_to_fulfil_nonces_worker = + 26; // max number of retries to unfulfilled nonces (worker) + int64 max_retries_to_fulfil_nonces_reputer = + 27; // max number of retries to unfulfilled nonces (reputer) string registration_fee = 28 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // registration fee for reputer or worker - uint64 default_page_limit = 29; // default limit for pagination - uint64 max_page_limit = 30; // max limit for pagination + ]; // registration fee for reputer or worker + uint64 default_page_limit = 29; // default limit for pagination + uint64 max_page_limit = 30; // max limit for pagination // min number of epochs to keep network losses, reputer losses, inferences, // forecasts int64 min_epoch_length_record_limit = 31; // block emission rate in number of blocks expected per month uint64 blocks_per_month = 32; - string p_reward_inference = 33 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string p_reward_forecast = 34 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string p_reward_reputer = 35 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_reward_inference = 36 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_reward_forecast = 37 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_norm = 38 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_reward_inference = 33 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string p_reward_forecast = 34 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string p_reward_reputer = 35 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_reward_inference = 36 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_reward_forecast = 37 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_norm = 38 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; string topic_fee_revenue_decay_rate = 39 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // decay rate for topic fee revenue + ]; // decay rate for topic fee revenue string epsilon_reputer = 40 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // a small tolerance quantity used to cap reputer scores at infinitesimally - // close proximities + ]; // a small tolerance quantity used to cap reputer scores at infinitesimally + // close proximities string min_effective_topic_revenue = 41 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // we no stop dripping from the topic's effective revenue when the topic's - // effective revenue is below this + ]; // we no stop dripping from the topic's effective revenue when the topic's + // effective revenue is below this uint64 half_max_process_stake_removals_end_block = - 42; // max amount of stake removals to process in an ABCI end block. Applied twice once for stakeRemovals and - // once for DelegateStakeRemovals, so actual max is this number times two - string epsilon_safe_div = 43 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + 42; // max amount of stake removals to process in an ABCI end block. + // Applied twice once for stakeRemovals and once for + // DelegateStakeRemovals, so actual max is this number times two + string epsilon_safe_div = 43 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; /// a small tolerance quantity used to cap division by zero string data_sending_fee = 44 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // payload sending fee for reputer or worker + ]; // payload sending fee for reputer or worker } diff --git a/x/emissions/proto/emissions/v2/query.proto b/x/emissions/proto/emissions/v2/query.proto index 557ab9a46..dfbc51bde 100644 --- a/x/emissions/proto/emissions/v2/query.proto +++ b/x/emissions/proto/emissions/v2/query.proto @@ -27,7 +27,8 @@ service Query { option (google.api.http).get = "/emissions/v2/params"; } - rpc GetNextTopicId(QueryNextTopicIdRequest) returns (QueryNextTopicIdResponse) { + rpc GetNextTopicId(QueryNextTopicIdRequest) + returns (QueryNextTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/next_topic_id"; } @@ -37,7 +38,8 @@ service Query { option (google.api.http).get = "/emissions/v2/topics/{topic_id}"; } - rpc GetActiveTopics(QueryActiveTopicsRequest) returns (QueryActiveTopicsResponse) { + rpc GetActiveTopics(QueryActiveTopicsRequest) + returns (QueryActiveTopicsResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/active_topics"; } @@ -49,25 +51,31 @@ service Query { "workers/{worker_address}/latest_inference"; } - rpc GetInferencesAtBlock(QueryInferencesAtBlockRequest) returns (QueryInferencesAtBlockResponse) { + rpc GetInferencesAtBlock(QueryInferencesAtBlockRequest) + returns (QueryInferencesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/inferences/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/inferences/{topic_id}/{block_height}"; } - rpc GetLatestTopicInferences(QueryLatestTopicInferencesRequest) returns (QueryLatestTopicInferencesResponse) { + rpc GetLatestTopicInferences(QueryLatestTopicInferencesRequest) + returns (QueryLatestTopicInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/latest_inferences/{topic_id}"; } - rpc GetForecastsAtBlock(QueryForecastsAtBlockRequest) returns (QueryForecastsAtBlockResponse) { + rpc GetForecastsAtBlock(QueryForecastsAtBlockRequest) + returns (QueryForecastsAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/forecasts/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/forecasts/{topic_id}/{block_height}"; } rpc GetNetworkLossBundleAtBlock(QueryNetworkLossBundleAtBlockRequest) returns (QueryNetworkLossBundleAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/network_loss/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/network_loss/{topic_id}/{block_height}"; } rpc GetTotalStake(QueryTotalStakeRequest) returns (QueryTotalStakeResponse) { @@ -75,9 +83,11 @@ service Query { option (google.api.http).get = "/emissions/v2/total_stake"; } - rpc GetReputerStakeInTopic(QueryReputerStakeInTopicRequest) returns (QueryReputerStakeInTopicResponse) { + rpc GetReputerStakeInTopic(QueryReputerStakeInTopicRequest) + returns (QueryReputerStakeInTopicResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputer_stake/{address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/reputer_stake/{address}/{topic_id}"; } rpc GetMultiReputerStakeInTopic(QueryMultiReputerStakeInTopicRequest) @@ -86,29 +96,36 @@ service Query { option (google.api.http).get = "/emissions/v2/reputers_stakes/{topic_id}"; } - rpc GetStakeFromReputerInTopicInSelf(QueryStakeFromReputerInTopicInSelfRequest) + rpc GetStakeFromReputerInTopicInSelf( + QueryStakeFromReputerInTopicInSelfRequest) returns (QueryStakeFromReputerInTopicInSelfResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputer_stake_self/{reputer_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/reputer_stake_self/{reputer_address}/{topic_id}"; } - rpc GetDelegateStakeInTopicInReputer(QueryDelegateStakeInTopicInReputerRequest) + rpc GetDelegateStakeInTopicInReputer( + QueryDelegateStakeInTopicInReputerRequest) returns (QueryDelegateStakeInTopicInReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputer_delegate_stake/{reputer_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/reputer_delegate_stake/{reputer_address}/{topic_id}"; } - rpc GetStakeFromDelegatorInTopicInReputer(QueryStakeFromDelegatorInTopicInReputerRequest) + rpc GetStakeFromDelegatorInTopicInReputer( + QueryStakeFromDelegatorInTopicInReputerRequest) returns (QueryStakeFromDelegatorInTopicInReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake/{delegator_address}/{reputer_address}/" - "{topic_id}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake/{delegator_address}/{reputer_address}/" + "{topic_id}"; } rpc GetStakeFromDelegatorInTopic(QueryStakeFromDelegatorInTopicRequest) returns (QueryStakeFromDelegatorInTopicResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake/{delegator_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake/{delegator_address}/{topic_id}"; } rpc GetTopicStake(QueryTopicStakeRequest) returns (QueryTopicStakeResponse) { @@ -119,32 +136,40 @@ service Query { rpc GetStakeRemovalsUpUntilBlock(QueryStakeRemovalsUpUntilBlockRequest) returns (QueryStakeRemovalsUpUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/stake_removals/{block_height}"; + option (google.api.http).get = + "/emissions/v2/stake_removals/{block_height}"; } - rpc GetDelegateStakeRemovalsUpUntilBlock(QueryDelegateStakeRemovalsUpUntilBlockRequest) + rpc GetDelegateStakeRemovalsUpUntilBlock( + QueryDelegateStakeRemovalsUpUntilBlockRequest) returns (QueryDelegateStakeRemovalsUpUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake_removals/{block_height}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake_removals/{block_height}"; } - rpc GetStakeRemovalInfo(QueryStakeRemovalInfoRequest) returns (QueryStakeRemovalInfoResponse) { + rpc GetStakeRemovalInfo(QueryStakeRemovalInfoRequest) + returns (QueryStakeRemovalInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/stake_removal/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/stake_removal/{topic_id}/{reputer}"; } rpc GetDelegateStakeRemovalInfo(QueryDelegateStakeRemovalInfoRequest) returns (QueryDelegateStakeRemovalInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake_removal/{topic_id}/{delegator}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake_removal/{topic_id}/{delegator}/{reputer}"; } - rpc GetWorkerNodeInfo(QueryWorkerNodeInfoRequest) returns (QueryWorkerNodeInfoResponse) { + rpc GetWorkerNodeInfo(QueryWorkerNodeInfoRequest) + returns (QueryWorkerNodeInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/worker/{address}"; } - rpc GetReputerNodeInfo(QueryReputerNodeInfoRequest) returns (QueryReputerNodeInfoResponse) { + rpc GetReputerNodeInfo(QueryReputerNodeInfoRequest) + returns (QueryReputerNodeInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/reputer/{address}"; } @@ -152,103 +177,129 @@ service Query { rpc IsWorkerRegisteredInTopicId(QueryIsWorkerRegisteredInTopicIdRequest) returns (QueryIsWorkerRegisteredInTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/worker_registered/{topic_id}/{address}"; + option (google.api.http).get = + "/emissions/v2/worker_registered/{topic_id}/{address}"; } rpc IsReputerRegisteredInTopicId(QueryIsReputerRegisteredInTopicIdRequest) returns (QueryIsReputerRegisteredInTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputer_registered/{topic_id}/{address}"; + option (google.api.http).get = + "/emissions/v2/reputer_registered/{topic_id}/{address}"; } rpc GetNetworkInferencesAtBlock(QueryNetworkInferencesAtBlockRequest) returns (QueryNetworkInferencesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/network_inferences/{topic_id}/last_inference/" - "{block_height_last_inference}/last_reward/{block_height_last_reward}"; + option (google.api.http).get = + "/emissions/v2/network_inferences/{topic_id}/last_inference/" + "{block_height_last_inference}/last_reward/{block_height_last_reward}"; } - rpc GetLatestNetworkInference(QueryLatestNetworkInferencesRequest) returns (QueryLatestNetworkInferencesResponse) { + rpc GetLatestNetworkInference(QueryLatestNetworkInferencesRequest) + returns (QueryLatestNetworkInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/network_inferences/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/network_inferences/{topic_id}"; } rpc GetLatestAvailableNetworkInference(QueryLatestNetworkInferencesRequest) returns (QueryLatestNetworkInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/network_inferences/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/network_inferences/{topic_id}"; } - rpc IsWorkerNonceUnfulfilled(QueryIsWorkerNonceUnfulfilledRequest) returns (QueryIsWorkerNonceUnfulfilledResponse) { + rpc IsWorkerNonceUnfulfilled(QueryIsWorkerNonceUnfulfilledRequest) + returns (QueryIsWorkerNonceUnfulfilledResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/is_worker_nonce_unfulfilled/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/is_worker_nonce_unfulfilled/{topic_id}/{block_height}"; } rpc IsReputerNonceUnfulfilled(QueryIsReputerNonceUnfulfilledRequest) returns (QueryIsReputerNonceUnfulfilledResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/is_reputer_nonce_unfulfilled/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/is_reputer_nonce_unfulfilled/{topic_id}/{block_height}"; } - rpc GetUnfulfilledWorkerNonces(QueryUnfulfilledWorkerNoncesRequest) returns (QueryUnfulfilledWorkerNoncesResponse) { + rpc GetUnfulfilledWorkerNonces(QueryUnfulfilledWorkerNoncesRequest) + returns (QueryUnfulfilledWorkerNoncesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/unfulfilled_worker_nonces/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/unfulfilled_worker_nonces/{topic_id}"; } rpc GetUnfulfilledReputerNonces(QueryUnfulfilledReputerNoncesRequest) returns (QueryUnfulfilledReputerNoncesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/unfulfilled_reputer_nonces/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/unfulfilled_reputer_nonces/{topic_id}"; } - rpc GetInfererNetworkRegret(QueryInfererNetworkRegretRequest) returns (QueryInfererNetworkRegretResponse) { + rpc GetInfererNetworkRegret(QueryInfererNetworkRegretRequest) + returns (QueryInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/inferer_network_regret/{topic_id}/{actor_id}"; + option (google.api.http).get = + "/emissions/v2/inferer_network_regret/{topic_id}/{actor_id}"; } - rpc GetForecasterNetworkRegret(QueryForecasterNetworkRegretRequest) returns (QueryForecasterNetworkRegretResponse) { + rpc GetForecasterNetworkRegret(QueryForecasterNetworkRegretRequest) + returns (QueryForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/forecaster_network_regret/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v2/forecaster_network_regret/{topic_id}/{worker}"; } rpc GetOneInForecasterNetworkRegret(QueryOneInForecasterNetworkRegretRequest) returns (QueryOneInForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/one_in_forecaster_network_regret/{topic_id}/" - "{forecaster}/{inferer}"; + option (google.api.http).get = + "/emissions/v2/one_in_forecaster_network_regret/{topic_id}/" + "{forecaster}/{inferer}"; } - rpc IsWhitelistAdmin(QueryIsWhitelistAdminRequest) returns (QueryIsWhitelistAdminResponse) { + rpc IsWhitelistAdmin(QueryIsWhitelistAdminRequest) + returns (QueryIsWhitelistAdminResponse) { option (google.api.http).get = "/emissions/v2/whitelist_admin/{address}"; } - rpc GetTopicLastWorkerCommitInfo(QueryTopicLastCommitRequest) returns (QueryTopicLastCommitResponse) { + rpc GetTopicLastWorkerCommitInfo(QueryTopicLastCommitRequest) + returns (QueryTopicLastCommitResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/topic_last_commit/{topic_id}"; } - rpc GetTopicLastReputerCommitInfo(QueryTopicLastCommitRequest) returns (QueryTopicLastCommitResponse) { + rpc GetTopicLastReputerCommitInfo(QueryTopicLastCommitRequest) + returns (QueryTopicLastCommitResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/topic_last_commit/{topic_id}"; } - rpc GetTopicRewardNonce(QueryTopicRewardNonceRequest) returns (QueryTopicRewardNonceResponse) { + rpc GetTopicRewardNonce(QueryTopicRewardNonceRequest) + returns (QueryTopicRewardNonceResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/topic_reward_nonce/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/topic_reward_nonce/{topic_id}"; } rpc GetReputerLossBundlesAtBlock(QueryReputerLossBundlesAtBlockRequest) returns (QueryReputerLossBundlesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputer_loss_bundles/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/reputer_loss_bundles/{topic_id}/{block_height}"; } - rpc GetStakeReputerAuthority(QueryStakeReputerAuthorityRequest) returns (QueryStakeReputerAuthorityResponse) { + rpc GetStakeReputerAuthority(QueryStakeReputerAuthorityRequest) + returns (QueryStakeReputerAuthorityResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/stake_reputer_authority/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/stake_reputer_authority/{topic_id}/{reputer}"; } - rpc GetDelegateStakePlacement(QueryDelegateStakePlacementRequest) returns (QueryDelegateStakePlacementResponse) { + rpc GetDelegateStakePlacement(QueryDelegateStakePlacementRequest) + returns (QueryDelegateStakePlacementResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/delegate_stake_placement/" "{topic_id}/{delegator}/{target}"; @@ -257,29 +308,38 @@ service Query { rpc GetDelegateStakeUponReputer(QueryDelegateStakeUponReputerRequest) returns (QueryDelegateStakeUponReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake_upon_reputer/{topic_id}/{target}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake_upon_reputer/{topic_id}/{target}"; } - rpc GetDelegateRewardPerShare(QueryDelegateRewardPerShareRequest) returns (QueryDelegateRewardPerShareResponse) { + rpc GetDelegateRewardPerShare(QueryDelegateRewardPerShareRequest) + returns (QueryDelegateRewardPerShareResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_reward_per_share/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/delegate_reward_per_share/{topic_id}/{reputer}"; } - rpc GetStakeRemovalForReputerAndTopicId(QueryStakeRemovalForReputerAndTopicIdRequest) + rpc GetStakeRemovalForReputerAndTopicId( + QueryStakeRemovalForReputerAndTopicIdRequest) returns (QueryStakeRemovalForReputerAndTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/stake_removal/{reputer}/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/stake_removal/{reputer}/{topic_id}"; } - rpc GetDelegateStakeRemoval(QueryDelegateStakeRemovalRequest) returns (QueryDelegateStakeRemovalResponse) { + rpc GetDelegateStakeRemoval(QueryDelegateStakeRemovalRequest) + returns (QueryDelegateStakeRemovalResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/delegate_stake_removal/{block_height}/{topic_id}/" - "{delegator}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/delegate_stake_removal/{block_height}/{topic_id}/" + "{delegator}/{reputer}"; } - rpc GetPreviousTopicWeight(QueryPreviousTopicWeightRequest) returns (QueryPreviousTopicWeightResponse) { + rpc GetPreviousTopicWeight(QueryPreviousTopicWeightRequest) + returns (QueryPreviousTopicWeightResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/previous_topic_weight/{topic_id}"; + option (google.api.http).get = + "/emissions/v2/previous_topic_weight/{topic_id}"; } rpc TopicExists(QueryTopicExistsRequest) returns (QueryTopicExistsResponse) { @@ -287,97 +347,123 @@ service Query { option (google.api.http).get = "/emissions/v2/topic_exists/{topic_id}"; } - rpc IsTopicActive(QueryIsTopicActiveRequest) returns (QueryIsTopicActiveResponse) { + rpc IsTopicActive(QueryIsTopicActiveRequest) + returns (QueryIsTopicActiveResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/is_topic_active/{topic_id}"; } - rpc GetTopicFeeRevenue(QueryTopicFeeRevenueRequest) returns (QueryTopicFeeRevenueResponse) { + rpc GetTopicFeeRevenue(QueryTopicFeeRevenueRequest) + returns (QueryTopicFeeRevenueResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/topic_fee_revenue/{topic_id}"; } - rpc GetRewardableTopics(QueryRewardableTopicsRequest) returns (QueryRewardableTopicsResponse) { + rpc GetRewardableTopics(QueryRewardableTopicsRequest) + returns (QueryRewardableTopicsResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/rewardable_topics"; } - rpc GetLatestInfererScore(QueryLatestInfererScoreRequest) returns (QueryLatestInfererScoreResponse) { + rpc GetLatestInfererScore(QueryLatestInfererScoreRequest) + returns (QueryLatestInfererScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/latest_inferer_score/{topic_id}/{inferer}"; + option (google.api.http).get = + "/emissions/v2/latest_inferer_score/{topic_id}/{inferer}"; } - rpc GetLatestForecasterScore(QueryLatestForecasterScoreRequest) returns (QueryLatestForecasterScoreResponse) { + rpc GetLatestForecasterScore(QueryLatestForecasterScoreRequest) + returns (QueryLatestForecasterScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/latest_forecaster_score/{topic_id}/{forecaster}"; + option (google.api.http).get = + "/emissions/v2/latest_forecaster_score/{topic_id}/{forecaster}"; } - rpc GetLatestReputerScore(QueryLatestReputerScoreRequest) returns (QueryLatestReputerScoreResponse) { + rpc GetLatestReputerScore(QueryLatestReputerScoreRequest) + returns (QueryLatestReputerScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/latest_reputer_score/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/latest_reputer_score/{topic_id}/{reputer}"; } rpc GetInferenceScoresUntilBlock(QueryInferenceScoresUntilBlockRequest) returns (QueryInferenceScoresUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/inference_scores_until_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/inference_scores_until_block/{topic_id}/{block_height}"; } rpc GetWorkerInferenceScoresAtBlock(QueryWorkerInferenceScoresAtBlockRequest) returns (QueryWorkerInferenceScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/worker_inference_scores_at_block/{topic_id}/" - "{block_height}"; + option (google.api.http).get = + "/emissions/v2/worker_inference_scores_at_block/{topic_id}/" + "{block_height}"; } rpc GetForecastScoresUntilBlock(QueryForecastScoresUntilBlockRequest) returns (QueryForecastScoresUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/forecast_scores_until_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/forecast_scores_until_block/{topic_id}/{block_height}"; } rpc GetWorkerForecastScoresAtBlock(QueryWorkerForecastScoresAtBlockRequest) returns (QueryWorkerForecastScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/worker_forecast_scores_at_block/{topic_id}/" - "{block_height}"; + option (google.api.http).get = + "/emissions/v2/worker_forecast_scores_at_block/{topic_id}/" + "{block_height}"; } - rpc GetReputersScoresAtBlock(QueryReputersScoresAtBlockRequest) returns (QueryReputersScoresAtBlockResponse) { + rpc GetReputersScoresAtBlock(QueryReputersScoresAtBlockRequest) + returns (QueryReputersScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/reputers_scores_at_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v2/reputers_scores_at_block/{topic_id}/{block_height}"; } - rpc GetListeningCoefficient(QueryListeningCoefficientRequest) returns (QueryListeningCoefficientResponse) { + rpc GetListeningCoefficient(QueryListeningCoefficientRequest) + returns (QueryListeningCoefficientResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/listening_coefficient/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/listening_coefficient/{topic_id}/{reputer}"; } - rpc GetPreviousReputerRewardFraction(QueryPreviousReputerRewardFractionRequest) + rpc GetPreviousReputerRewardFraction( + QueryPreviousReputerRewardFractionRequest) returns (QueryPreviousReputerRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/previous_reputer_reward_fraction/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v2/previous_reputer_reward_fraction/{topic_id}/{reputer}"; } - rpc GetPreviousInferenceRewardFraction(QueryPreviousInferenceRewardFractionRequest) + rpc GetPreviousInferenceRewardFraction( + QueryPreviousInferenceRewardFractionRequest) returns (QueryPreviousInferenceRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/previous_inference_reward_fraction/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v2/previous_inference_reward_fraction/{topic_id}/{worker}"; } - rpc GetPreviousForecastRewardFraction(QueryPreviousForecastRewardFractionRequest) + rpc GetPreviousForecastRewardFraction( + QueryPreviousForecastRewardFractionRequest) returns (QueryPreviousForecastRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/previous_forecast_reward_fraction/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v2/previous_forecast_reward_fraction/{topic_id}/{worker}"; } - rpc GetPreviousPercentageRewardToStakedReputers(QueryPreviousPercentageRewardToStakedReputersRequest) + rpc GetPreviousPercentageRewardToStakedReputers( + QueryPreviousPercentageRewardToStakedReputersRequest) returns (QueryPreviousPercentageRewardToStakedReputersResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/previous_percentage_reward_to_staked_reputers"; + option (google.api.http).get = + "/emissions/v2/previous_percentage_reward_to_staked_reputers"; } - rpc GetTotalRewardToDistribute(QueryTotalRewardToDistributeRequest) returns (QueryTotalRewardToDistributeResponse) { + rpc GetTotalRewardToDistribute(QueryTotalRewardToDistributeRequest) + returns (QueryTotalRewardToDistributeResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v2/total_reward_to_distribute"; } @@ -385,31 +471,40 @@ service Query { rpc GetNaiveInfererNetworkRegret(QueryNaiveInfererNetworkRegretRequest) returns (QueryNaiveInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/native_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v2/native_inferer_network_regret"; } - rpc GetOneOutInfererInfererNetworkRegret(QueryOneOutInfererInfererNetworkRegretRequest) + rpc GetOneOutInfererInfererNetworkRegret( + QueryOneOutInfererInfererNetworkRegretRequest) returns (QueryOneOutInfererInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/one_out_inferer_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v2/one_out_inferer_inferer_network_regret"; } - rpc GetOneOutInfererForecasterNetworkRegret(QueryOneOutInfererForecasterNetworkRegretRequest) + rpc GetOneOutInfererForecasterNetworkRegret( + QueryOneOutInfererForecasterNetworkRegretRequest) returns (QueryOneOutInfererForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/one_out_inferer_forecaster_network_regret"; + option (google.api.http).get = + "/emissions/v2/one_out_inferer_forecaster_network_regret"; } - rpc GetOneOutForecasterInfererNetworkRegret(QueryOneOutForecasterInfererNetworkRegretRequest) + rpc GetOneOutForecasterInfererNetworkRegret( + QueryOneOutForecasterInfererNetworkRegretRequest) returns (QueryOneOutForecasterInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/one_out_forecaster_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v2/one_out_forecaster_inferer_network_regret"; } - rpc GetOneOutForecasterForecasterNetworkRegret(QueryOneOutForecasterForecasterNetworkRegretRequest) + rpc GetOneOutForecasterForecasterNetworkRegret( + QueryOneOutForecasterForecasterNetworkRegretRequest) returns (QueryOneOutForecasterForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v2/one_out_forecaster_forecaster_network_regret"; + option (google.api.http).get = + "/emissions/v2/one_out_forecaster_forecaster_network_regret"; } } @@ -418,9 +513,7 @@ message QueryNaiveInfererNetworkRegretRequest { string inferer = 2; } -message QueryNaiveInfererNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryNaiveInfererNetworkRegretResponse { TimestampedValue regret = 1; } message QueryOneOutInfererInfererNetworkRegretRequest { uint64 topic_id = 1; @@ -468,7 +561,8 @@ message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // Total Stake returns the total amount of stake in the system @@ -573,9 +667,7 @@ message QueryStakeFromDelegatorInTopicResponse { ]; } -message QueryTopicStakeRequest { - uint64 topic_id = 1; -} +message QueryTopicStakeRequest { uint64 topic_id = 1; } message QueryTopicStakeResponse { option (gogoproto.equal) = true; @@ -592,19 +684,13 @@ message QueryNetworkLossBundleAtBlockRequest { int64 block_height = 2; } -message QueryNetworkLossBundleAtBlockResponse { - ValueBundle loss_bundle = 1; -} +message QueryNetworkLossBundleAtBlockResponse { ValueBundle loss_bundle = 1; } message QueryNextTopicIdRequest {} -message QueryNextTopicIdResponse { - uint64 next_topic_id = 1; -} +message QueryNextTopicIdResponse { uint64 next_topic_id = 1; } -message QueryTopicRequest { - uint64 topic_id = 1; -} +message QueryTopicRequest { uint64 topic_id = 1; } message QueryTopicResponse { Topic topic = 1; @@ -631,13 +717,9 @@ message QueryInferencesAtBlockRequest { // // NOTE: The amount field is a Uint which implements the custom method // signatures required by gogoproto. -message QueryInferencesAtBlockResponse { - Inferences inferences = 1; -} +message QueryInferencesAtBlockResponse { Inferences inferences = 1; } -message QueryLatestTopicInferencesRequest { - uint64 topic_id = 1; -} +message QueryLatestTopicInferencesRequest { uint64 topic_id = 1; } message QueryLatestTopicInferencesResponse { Inferences inferences = 1; @@ -654,18 +736,14 @@ message QueryForecastsAtBlockRequest { // // NOTE: The amount field is a Uint which implements the custom method // signatures required by gogoproto. -message QueryForecastsAtBlockResponse { - Forecasts forecasts = 1; -} +message QueryForecastsAtBlockResponse { Forecasts forecasts = 1; } message QueryWorkerLatestInferenceRequest { uint64 topic_id = 1; string worker_address = 2; } -message QueryWorkerLatestInferenceResponse { - Inference latest_inference = 1; -} +message QueryWorkerLatestInferenceResponse { Inference latest_inference = 1; } message QueryWorkerNodeInfoRequest { reserved 1; @@ -674,9 +752,7 @@ message QueryWorkerNodeInfoRequest { string address = 2; } -message QueryWorkerNodeInfoResponse { - OffchainNode node_info = 1; -} +message QueryWorkerNodeInfoResponse { OffchainNode node_info = 1; } message QueryReputerNodeInfoRequest { reserved 1; @@ -685,9 +761,7 @@ message QueryReputerNodeInfoRequest { string address = 2; } -message QueryReputerNodeInfoResponse { - OffchainNode node_info = 1; -} +message QueryReputerNodeInfoResponse { OffchainNode node_info = 1; } message QueryNetworkInferencesAtBlockRequest { uint64 topic_id = 1; @@ -695,9 +769,7 @@ message QueryNetworkInferencesAtBlockRequest { int64 block_height_last_reward = 3; } -message QueryLatestNetworkInferencesRequest { - uint64 topic_id = 1; -} +message QueryLatestNetworkInferencesRequest { uint64 topic_id = 1; } message QueryIsWorkerNonceUnfulfilledRequest { uint64 topic_id = 1; @@ -708,39 +780,29 @@ message QueryIsWorkerNonceUnfulfilledResponse { bool is_worker_nonce_unfulfilled = 1; } -message QueryUnfulfilledReputerNoncesRequest { - uint64 topic_id = 1; -} +message QueryUnfulfilledReputerNoncesRequest { uint64 topic_id = 1; } message QueryUnfulfilledReputerNoncesResponse { ReputerRequestNonces nonces = 1; } -message QueryUnfulfilledWorkerNoncesRequest { - uint64 topic_id = 1; -} +message QueryUnfulfilledWorkerNoncesRequest { uint64 topic_id = 1; } -message QueryUnfulfilledWorkerNoncesResponse { - Nonces nonces = 1; -} +message QueryUnfulfilledWorkerNoncesResponse { Nonces nonces = 1; } message QueryInfererNetworkRegretRequest { uint64 topic_id = 1; string actor_id = 2; } -message QueryInfererNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryInfererNetworkRegretResponse { TimestampedValue regret = 1; } message QueryForecasterNetworkRegretRequest { uint64 topic_id = 1; string worker = 2; } -message QueryForecasterNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryForecasterNetworkRegretResponse { TimestampedValue regret = 1; } message QueryOneInForecasterNetworkRegretRequest { uint64 topic_id = 1; @@ -772,10 +834,14 @@ message QueryLatestNetworkInferencesResponse { repeated WorkerAttributedValue forecastImpliedInferences = 4; int64 inference_block_height = 5; int64 loss_block_height = 6; - repeated string confidence_interval_raw_percentiles = 7 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string confidence_interval_values = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string confidence_interval_raw_percentiles = 7 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string confidence_interval_values = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryIsWorkerRegisteredInTopicIdRequest { @@ -783,30 +849,20 @@ message QueryIsWorkerRegisteredInTopicIdRequest { string address = 2; } -message QueryIsWorkerRegisteredInTopicIdResponse { - bool is_registered = 1; -} +message QueryIsWorkerRegisteredInTopicIdResponse { bool is_registered = 1; } message QueryIsReputerRegisteredInTopicIdRequest { uint64 topic_id = 1; string address = 2; } -message QueryIsReputerRegisteredInTopicIdResponse { - bool is_registered = 1; -} +message QueryIsReputerRegisteredInTopicIdResponse { bool is_registered = 1; } -message QueryIsWhitelistAdminRequest { - string address = 1; -} +message QueryIsWhitelistAdminRequest { string address = 1; } -message QueryIsWhitelistAdminResponse { - bool is_admin = 1; -} +message QueryIsWhitelistAdminResponse { bool is_admin = 1; } -message QueryStakeRemovalsUpUntilBlockRequest { - int64 block_height = 1; -} +message QueryStakeRemovalsUpUntilBlockRequest { int64 block_height = 1; } message QueryStakeRemovalsUpUntilBlockResponse { repeated StakeRemovalInfo removals = 1; @@ -825,9 +881,7 @@ message QueryStakeRemovalInfoRequest { string reputer = 2; } -message QueryStakeRemovalInfoResponse { - StakeRemovalInfo removal = 1; -} +message QueryStakeRemovalInfoResponse { StakeRemovalInfo removal = 1; } message QueryDelegateStakeRemovalInfoRequest { uint64 topic_id = 1; @@ -839,21 +893,13 @@ message QueryDelegateStakeRemovalInfoResponse { DelegateStakeRemovalInfo removal = 1; } -message QueryTopicLastCommitRequest { - uint64 topic_id = 1; -} +message QueryTopicLastCommitRequest { uint64 topic_id = 1; } -message QueryTopicLastCommitResponse { - TimestampedActorNonce last_commit = 1; -} +message QueryTopicLastCommitResponse { TimestampedActorNonce last_commit = 1; } -message QueryTopicRewardNonceRequest { - uint64 topic_id = 1; -} +message QueryTopicRewardNonceRequest { uint64 topic_id = 1; } -message QueryTopicRewardNonceResponse { - int64 nonce = 1; -} +message QueryTopicRewardNonceResponse { int64 nonce = 1; } message QueryReputerLossBundlesAtBlockRequest { uint64 topic_id = 1; @@ -908,8 +954,10 @@ message QueryDelegateRewardPerShareRequest { } message QueryDelegateRewardPerShareResponse { - string reward_per_share = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_per_share = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryStakeRemovalForReputerAndTopicIdRequest { @@ -932,35 +980,25 @@ message QueryDelegateStakeRemovalResponse { DelegateStakeRemovalInfo stake_removal_info = 1; } -message QueryPreviousTopicWeightRequest { - uint64 topic_id = 1; -} +message QueryPreviousTopicWeightRequest { uint64 topic_id = 1; } message QueryPreviousTopicWeightResponse { - string weight = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string weight = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } -message QueryTopicExistsRequest { - uint64 topic_id = 1; -} +message QueryTopicExistsRequest { uint64 topic_id = 1; } -message QueryTopicExistsResponse { - bool exists = 1; -} +message QueryTopicExistsResponse { bool exists = 1; } -message QueryIsTopicActiveRequest { - uint64 topic_id = 1; -} +message QueryIsTopicActiveRequest { uint64 topic_id = 1; } -message QueryIsTopicActiveResponse { - bool is_active = 1; -} +message QueryIsTopicActiveResponse { bool is_active = 1; } -message QueryTopicFeeRevenueRequest { - uint64 topic_id = 1; -} +message QueryTopicFeeRevenueRequest { uint64 topic_id = 1; } message QueryTopicFeeRevenueResponse { string fee_revenue = 1 [ @@ -982,72 +1020,56 @@ message QueryLatestInfererScoreRequest { string inferer = 2; } -message QueryLatestInfererScoreResponse { - Score score = 1; -} +message QueryLatestInfererScoreResponse { Score score = 1; } message QueryLatestForecasterScoreRequest { uint64 topic_id = 1; string forecaster = 2; } -message QueryLatestForecasterScoreResponse { - Score score = 1; -} +message QueryLatestForecasterScoreResponse { Score score = 1; } message QueryLatestReputerScoreRequest { uint64 topic_id = 1; string reputer = 2; } -message QueryLatestReputerScoreResponse { - Score score = 1; -} +message QueryLatestReputerScoreResponse { Score score = 1; } message QueryInferenceScoresUntilBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryInferenceScoresUntilBlockResponse { - repeated Score scores = 1; -} +message QueryInferenceScoresUntilBlockResponse { repeated Score scores = 1; } message QueryWorkerInferenceScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryWorkerInferenceScoresAtBlockResponse { - Scores scores = 1; -} +message QueryWorkerInferenceScoresAtBlockResponse { Scores scores = 1; } message QueryForecastScoresUntilBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryForecastScoresUntilBlockResponse { - repeated Score scores = 1; -} +message QueryForecastScoresUntilBlockResponse { repeated Score scores = 1; } message QueryWorkerForecastScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryWorkerForecastScoresAtBlockResponse { - Scores scores = 1; -} +message QueryWorkerForecastScoresAtBlockResponse { Scores scores = 1; } message QueryReputersScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryReputersScoresAtBlockResponse { - Scores scores = 1; -} +message QueryReputersScoresAtBlockResponse { Scores scores = 1; } message QueryListeningCoefficientRequest { uint64 topic_id = 1; @@ -1064,8 +1086,10 @@ message QueryPreviousReputerRewardFractionRequest { } message QueryPreviousReputerRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } @@ -1075,8 +1099,10 @@ message QueryPreviousInferenceRewardFractionRequest { } message QueryPreviousInferenceRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } @@ -1086,20 +1112,26 @@ message QueryPreviousForecastRewardFractionRequest { } message QueryPreviousForecastRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } message QueryPreviousPercentageRewardToStakedReputersRequest {} message QueryPreviousPercentageRewardToStakedReputersResponse { - string percentage_reward = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string percentage_reward = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryTotalRewardToDistributeRequest {} message QueryTotalRewardToDistributeResponse { - string total_reward = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string total_reward = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v2/reputer.proto b/x/emissions/proto/emissions/v2/reputer.proto index e91393d5c..1c8986771 100644 --- a/x/emissions/proto/emissions/v2/reputer.proto +++ b/x/emissions/proto/emissions/v2/reputer.proto @@ -9,17 +9,21 @@ import "emissions/v2/nonce.proto"; message WorkerAttributedValue { option (gogoproto.equal) = true; - string worker = 1; // worker who created the value - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string worker = 1; // worker who created the value + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message WithheldWorkerAttributedValue { option (gogoproto.equal) = true; string worker = 1; - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message OneOutInfererForecasterValues { @@ -39,15 +43,19 @@ message ValueBundle { string reputer = 3; bytes extra_data = 4; // R_im || log10 L_im || I_i - string combined_value = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string combined_value = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // R_ijm || log10 L_ijm || I_ij repeated WorkerAttributedValue inferer_values = 6; // R_ikm || log10 L_ikm || I_ik repeated WorkerAttributedValue forecaster_values = 7; // R^-_im || log10 L^-_im || I^-_i - string naive_value = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string naive_value = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // Note: forecast-implied inferences are recomputed for each left-out // inference repeated WithheldWorkerAttributedValue one_out_inferer_values = 9; diff --git a/x/emissions/proto/emissions/v2/score.proto b/x/emissions/proto/emissions/v2/score.proto index 7d6996ffa..6bff14562 100644 --- a/x/emissions/proto/emissions/v2/score.proto +++ b/x/emissions/proto/emissions/v2/score.proto @@ -11,10 +11,10 @@ message Score { uint64 topic_id = 1; int64 block_height = 2; string address = 3; - string score = 4 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string score = 4 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } -message Scores { - repeated Score scores = 1; -} +message Scores { repeated Score scores = 1; } diff --git a/x/emissions/proto/emissions/v2/stake.proto b/x/emissions/proto/emissions/v2/stake.proto index 35e9c219e..5cf33cfdd 100644 --- a/x/emissions/proto/emissions/v2/stake.proto +++ b/x/emissions/proto/emissions/v2/stake.proto @@ -80,8 +80,12 @@ message DelegateStakeRemovalInfo { } message DelegatorInfo { - string amount = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string reward_debt = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string amount = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string reward_debt = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } \ No newline at end of file diff --git a/x/emissions/proto/emissions/v2/topic.proto b/x/emissions/proto/emissions/v2/topic.proto index 86e8a1111..98f543611 100644 --- a/x/emissions/proto/emissions/v2/topic.proto +++ b/x/emissions/proto/emissions/v2/topic.proto @@ -19,21 +19,27 @@ message Topic { int64 epoch_last_ended = 8; int64 epoch_length = 9; int64 ground_truth_lag = 10; - string p_norm = 12 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string alpha_regret = 13 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_norm = 12 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string alpha_regret = 13 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool allow_negative = 14; - string epsilon = 15 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string initial_regret = 16 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string epsilon = 15 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string initial_regret = 16 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; int64 worker_submission_window = 17; } -message TopicList { - repeated Topic topics = 1; -} +message TopicList { repeated Topic topics = 1; } message TimestampedActorNonce { reserved 2; @@ -41,7 +47,7 @@ message TimestampedActorNonce { option (gogoproto.equal) = true; - int64 block_height = 1; // height at which value calculated or received + int64 block_height = 1; // height at which value calculated or received Nonce nonce = 3; } diff --git a/x/emissions/proto/emissions/v2/tx.proto b/x/emissions/proto/emissions/v2/tx.proto index d04acacc6..234addeb5 100644 --- a/x/emissions/proto/emissions/v2/tx.proto +++ b/x/emissions/proto/emissions/v2/tx.proto @@ -22,31 +22,40 @@ service Msg { rpc Register(MsgRegister) returns (MsgRegisterResponse); - rpc RemoveRegistration(MsgRemoveRegistration) returns (MsgRemoveRegistrationResponse); + rpc RemoveRegistration(MsgRemoveRegistration) + returns (MsgRemoveRegistrationResponse); rpc AddStake(MsgAddStake) returns (MsgAddStakeResponse); rpc RemoveStake(MsgRemoveStake) returns (MsgRemoveStakeResponse); - rpc CancelRemoveStake(MsgCancelRemoveStake) returns (MsgCancelRemoveStakeResponse); + rpc CancelRemoveStake(MsgCancelRemoveStake) + returns (MsgCancelRemoveStakeResponse); rpc DelegateStake(MsgDelegateStake) returns (MsgDelegateStakeResponse); - rpc RewardDelegateStake(MsgRewardDelegateStake) returns (MsgRewardDelegateStakeResponse); + rpc RewardDelegateStake(MsgRewardDelegateStake) + returns (MsgRewardDelegateStakeResponse); - rpc RemoveDelegateStake(MsgRemoveDelegateStake) returns (MsgRemoveDelegateStakeResponse); + rpc RemoveDelegateStake(MsgRemoveDelegateStake) + returns (MsgRemoveDelegateStakeResponse); - rpc CancelRemoveDelegateStake(MsgCancelRemoveDelegateStake) returns (MsgCancelRemoveDelegateStakeResponse); + rpc CancelRemoveDelegateStake(MsgCancelRemoveDelegateStake) + returns (MsgCancelRemoveDelegateStakeResponse); rpc FundTopic(MsgFundTopic) returns (MsgFundTopicResponse); - rpc AddToWhitelistAdmin(MsgAddToWhitelistAdmin) returns (MsgAddToWhitelistAdminResponse); + rpc AddToWhitelistAdmin(MsgAddToWhitelistAdmin) + returns (MsgAddToWhitelistAdminResponse); - rpc RemoveFromWhitelistAdmin(MsgRemoveFromWhitelistAdmin) returns (MsgRemoveFromWhitelistAdminResponse); + rpc RemoveFromWhitelistAdmin(MsgRemoveFromWhitelistAdmin) + returns (MsgRemoveFromWhitelistAdminResponse); - rpc InsertWorkerPayload(MsgInsertWorkerPayload) returns (MsgInsertWorkerPayloadResponse); + rpc InsertWorkerPayload(MsgInsertWorkerPayload) + returns (MsgInsertWorkerPayloadResponse); - rpc InsertReputerPayload(MsgInsertReputerPayload) returns (MsgInsertReputerPayloadResponse); + rpc InsertReputerPayload(MsgInsertReputerPayload) + returns (MsgInsertReputerPayloadResponse); } /// PARAMS @@ -60,8 +69,10 @@ service Msg { message OptionalParams { repeated string version = 1; repeated int64 max_serialized_msg_length = 2; - repeated string min_topic_weight = 3 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string min_topic_weight = 3 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_topics_per_block = 4; repeated string required_minimum_stake = 5 [ (cosmos_proto.scalar) = "cosmos.Int", @@ -71,26 +82,44 @@ message OptionalParams { ]; repeated int64 remove_stake_delay_window = 6; repeated int64 min_epoch_length = 7; - repeated string beta_entropy = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string learning_rate = 9 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string max_gradient_threshold = 10 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string min_stake_fraction = 11 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string beta_entropy = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string learning_rate = 9 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string max_gradient_threshold = 10 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string min_stake_fraction = 11 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_unfulfilled_worker_requests = 13; repeated uint64 max_unfulfilled_reputer_requests = 14; - repeated string topic_reward_stake_importance = 15 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_reward_fee_revenue_importance = 16 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_reward_alpha = 17 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string task_reward_alpha = 18 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string validators_vs_allora_percent_reward = 19 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string topic_reward_stake_importance = 15 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_reward_fee_revenue_importance = 16 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_reward_alpha = 17 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string task_reward_alpha = 18 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string validators_vs_allora_percent_reward = 19 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_samples_to_scale_scores = 20; repeated uint64 max_top_inferers_to_reward = 21; repeated uint64 max_top_forecasters_to_reward = 22; @@ -114,24 +143,42 @@ message OptionalParams { repeated uint64 max_page_limit = 30; repeated int64 min_epoch_length_record_limit = 31; repeated uint64 blocks_per_month = 32; - repeated string p_reward_inference = 33 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string p_reward_forecast = 34 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string p_reward_reputer = 35 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_reward_inference = 36 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_reward_forecast = 37 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_norm = 38 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_fee_revenue_decay_rate = 39 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string epsilon_reputer = 40 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string min_effective_topic_revenue = 41 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string p_reward_inference = 33 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string p_reward_forecast = 34 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string p_reward_reputer = 35 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_reward_inference = 36 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_reward_forecast = 37 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_norm = 38 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_fee_revenue_decay_rate = 39 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string epsilon_reputer = 40 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string min_effective_topic_revenue = 41 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 half_max_process_stake_removals_end_block = 42; repeated string data_sending_fee = 43 [ (cosmos_proto.scalar) = "cosmos.Int", @@ -139,8 +186,10 @@ message OptionalParams { (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - repeated string epsilon_safe_div = 44 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string epsilon_safe_div = 44 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message MsgUpdateParams { @@ -165,19 +214,23 @@ message MsgCreateNewTopic { string loss_method = 4; int64 epoch_length = 7; int64 ground_truth_lag = 8; - string p_norm = 10 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string alpha_regret = 11 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_norm = 10 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string alpha_regret = 11 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool allow_negative = 12; - string epsilon = 13 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string epsilon = 13 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; int64 worker_submission_window = 14; } -message MsgCreateNewTopicResponse { - uint64 topic_id = 1; -} +message MsgCreateNewTopicResponse { uint64 topic_id = 1; } /// Worker and Reputer Interface @@ -321,7 +374,7 @@ message MsgFundTopic { (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // how many funds to send from alice with this Inference Request + ]; // how many funds to send from alice with this Inference Request } message MsgFundTopicResponse {} diff --git a/x/emissions/proto/emissions/v2/types.proto b/x/emissions/proto/emissions/v2/types.proto index 301a7787e..844839676 100644 --- a/x/emissions/proto/emissions/v2/types.proto +++ b/x/emissions/proto/emissions/v2/types.proto @@ -12,11 +12,11 @@ message SimpleCursorPaginationRequest { uint64 limit = 2; } -message SimpleCursorPaginationResponse { - bytes next_key = 1; -} +message SimpleCursorPaginationResponse { bytes next_key = 1; } message ListeningCoefficient { - string coefficient = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string coefficient = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v2/worker.proto b/x/emissions/proto/emissions/v2/worker.proto index efac30779..cdddb4069 100644 --- a/x/emissions/proto/emissions/v2/worker.proto +++ b/x/emissions/proto/emissions/v2/worker.proto @@ -9,9 +9,11 @@ import "emissions/v2/nonce.proto"; message TimestampedValue { option (gogoproto.equal) = true; - int64 block_height = 1; // height at which value calculated or received - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + int64 block_height = 1; // height at which value calculated or received + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message Inference { @@ -20,22 +22,24 @@ message Inference { uint64 topic_id = 1; int64 block_height = 2; string inferer = 3; - string value = 4 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 4 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bytes extra_data = 5; string proof = 6; } -message Inferences { - repeated Inference inferences = 1; -} +message Inferences { repeated Inference inferences = 1; } message ForecastElement { option (gogoproto.equal) = true; string inferer = 1; - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message Forecast { @@ -47,9 +51,7 @@ message Forecast { bytes extra_data = 5; } -message Forecasts { - repeated Forecast forecasts = 1; -} +message Forecasts { repeated Forecast forecasts = 1; } message InferenceForecastBundle { option (gogoproto.equal) = true; @@ -67,6 +69,7 @@ message WorkerDataBundle { string pubkey = 6; } -message WorkerDataBundles { // This will be in the incoming message, sent by leader +message +WorkerDataBundles { // This will be in the incoming message, sent by leader repeated WorkerDataBundle worker_data_bundles = 1; } diff --git a/x/emissions/proto/emissions/v3/events.proto b/x/emissions/proto/emissions/v3/events.proto index 1431444e6..cbe870086 100644 --- a/x/emissions/proto/emissions/v3/events.proto +++ b/x/emissions/proto/emissions/v3/events.proto @@ -31,8 +31,10 @@ message EventScoresSet { uint64 topic_id = 2; int64 block_height = 3; repeated string addresses = 4; - repeated string scores = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string scores = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message EventRewardsSettled { @@ -40,8 +42,10 @@ message EventRewardsSettled { uint64 topic_id = 2; int64 block_height = 3; repeated string addresses = 4; - repeated string rewards = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string rewards = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message EventNetworkLossSet { diff --git a/x/emissions/proto/emissions/v3/genesis.proto b/x/emissions/proto/emissions/v3/genesis.proto index 7b5154b73..d618b035c 100644 --- a/x/emissions/proto/emissions/v3/genesis.proto +++ b/x/emissions/proto/emissions/v3/genesis.proto @@ -19,15 +19,18 @@ option go_package = "github.com/allora-network/allora-chain/x/emissions/types"; // GenesisState is the state that must be provided at genesis. message GenesisState { // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; /// TOPIC - // the next topic id to be used, equal to the number of topics that have been created + // the next topic id to be used, equal to the number of topics that have been + // created uint64 nextTopicId = 3; - // every topic that has been created indexed by their topicId starting from 1 (0 is reserved for the root network) + // every topic that has been created indexed by their topicId starting from 1 + // (0 is reserved for the root network) repeated TopicIdAndTopic topics = 4; repeated uint64 activeTopics = 5; - // every topic that has been churned and ready to be rewarded i.e. reputer losses have been committed + // every topic that has been churned and ready to be rewarded i.e. reputer + // losses have been committed repeated uint64 rewardableTopics = 6; // for a topic, what is every worker node that has registered to it? repeated TopicAndActorId topicWorkers = 7; @@ -73,26 +76,35 @@ message GenesisState { repeated TopicIdAndInt topicStake = 22; // stake reputer placed in topic + delegate stake placed in them, // signalling their total authority on the topic - // (topic Id, reputer) -> stake from reputer on self + stakeFromDelegatorsUponReputer + // (topic Id, reputer) -> stake from reputer on self + + // stakeFromDelegatorsUponReputer repeated TopicIdActorIdInt stakeReputerAuthority = 23; - // map of (topic id, delegator) -> total amount of stake in that topic placed by that delegator + // map of (topic id, delegator) -> total amount of stake in that topic placed + // by that delegator repeated TopicIdActorIdInt stakeSumFromDelegator = 24; - // map of (topic id, delegator, reputer) -> amount of stake that has been placed by that delegator on that target + // map of (topic id, delegator, reputer) -> amount of stake that has been + // placed by that delegator on that target repeated TopicIdDelegatorReputerDelegatorInfo delegatedStakes = 25; - // map of (topic id, reputer) -> total amount of stake that has been placed on that reputer by delegators + // map of (topic id, reputer) -> total amount of stake that has been placed on + // that reputer by delegators repeated TopicIdActorIdInt stakeFromDelegatorsUponReputer = 26; // map of (topicId, reputer) -> share of delegate reward repeated TopicIdActorIdDec delegateRewardPerShare = 27; // stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, reputer) -> removal information for that reputer + // map of (blockHeight, topic, reputer) -> removal information for that + // reputer repeated BlockHeightTopicIdReputerStakeRemovalInfo stakeRemovalsByBlock = 28; - // key set of (reputer, topic, blockHeight) to existence of a removal in the forwards map + // key set of (reputer, topic, blockHeight) to existence of a removal in the + // forwards map repeated ActorIdTopicIdBlockHeight stakeRemovalsByActor = 29; - // delegate stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, delegator, reputer staked upon) -> (list of reputers delegated upon and info) to have - // stake removed at that block - repeated BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo delegateStakeRemovalsByBlock = 30; - // key set of (delegator, reputer, topicId, blockHeight) to existence of a removal in the forwards map + // delegate stake removals are double indexed to avoid O(n) lookups when + // removing stake map of (blockHeight, topic, delegator, reputer staked upon) + // -> (list of reputers delegated upon and info) to have stake removed at that + // block + repeated BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo + delegateStakeRemovalsByBlock = 30; + // key set of (delegator, reputer, topicId, blockHeight) to existence of a + // removal in the forwards map repeated DelegatorReputerTopicIdBlockHeight delegateStakeRemovalsByActor = 31; /// MISC GLOBAL STATE @@ -112,13 +124,18 @@ message GenesisState { repeated TopicIdBlockHeightInferences allInferences = 38; // map of (topic, block_height) -> Forecast repeated TopicIdBlockHeightForecasts allForecasts = 39; - // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active at that time) + // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active + // at that time) repeated TopicIdBlockHeightReputerValueBundles allLossBundles = 40; - // map of (topic, block_height) -> ValueBundle (1 network wide bundle per timestep) + // map of (topic, block_height) -> ValueBundle (1 network wide bundle per + // timestep) repeated TopicIdBlockHeightValueBundles networkLossBundles = 41; - // Percentage of all rewards, paid out to staked reputers, during the previous reward cadence. Used by mint module - string previousPercentageRewardToStakedReputers = 42 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + // Percentage of all rewards, paid out to staked reputers, during the previous + // reward cadence. Used by mint module + string previousPercentageRewardToStakedReputers = 42 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; /// NONCES // map of (topic) -> unfulfilled nonces @@ -127,19 +144,28 @@ message GenesisState { repeated TopicIdAndReputerRequestNonces unfulfilledReputerNonces = 44; /// REGRETS - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other inferers + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other inferers repeated TopicIdActorIdTimeStampedValue latestInfererNetworkRegrets = 45; - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other forecasters + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other forecasters repeated TopicIdActorIdTimeStampedValue latestForecasterNetworkRegrets = 46; - // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster loss from comparing one-in loss with - // all network inferer (3rd index) regrets L_ij made under the regime of the one-in forecaster (2nd index) - repeated TopicIdActorIdActorIdTimeStampedValue latestOneInForecasterNetworkRegrets = 47; - // the forecaster (2nd index) regrets made under the regime of the same forecaster as a one-in forecaster + // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster + // loss from comparing one-in loss with all network inferer (3rd index) + // regrets L_ij made under the regime of the one-in forecaster (2nd index) + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneInForecasterNetworkRegrets = 47; + // the forecaster (2nd index) regrets made under the regime of the same + // forecaster as a one-in forecaster repeated TopicIdActorIdTimeStampedValue latestNaiveInfererNetworkRegrets = 48; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutInfererInfererNetworkRegrets = 49; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutInfererForecasterNetworkRegrets = 50; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutForecasterInfererNetworkRegrets = 51; - repeated TopicIdActorIdActorIdTimeStampedValue latestOneOutForecasterForecasterNetworkRegrets = 52; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutInfererInfererNetworkRegrets = 49; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutInfererForecasterNetworkRegrets = 50; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutForecasterInfererNetworkRegrets = 51; + repeated TopicIdActorIdActorIdTimeStampedValue + latestOneOutForecasterForecasterNetworkRegrets = 52; /// WHITELISTS repeated string core_team_addresses = 2; @@ -185,8 +211,10 @@ message TopicIdActorIdListeningCoefficient { message TopicIdActorIdDec { uint64 TopicId = 1; string ActorId = 2; - string Dec = 3 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string Dec = 3 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message TopicIdAndInt { @@ -264,8 +292,10 @@ message LibP2pKeyAndOffchainNode { message TopicIdAndDec { uint64 TopicId = 1; - string Dec = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string Dec = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message TopicIdBlockHeightInferences { diff --git a/x/emissions/proto/emissions/v3/inference.proto b/x/emissions/proto/emissions/v3/inference.proto index a127e07cd..d02bc29f3 100644 --- a/x/emissions/proto/emissions/v3/inference.proto +++ b/x/emissions/proto/emissions/v3/inference.proto @@ -8,7 +8,9 @@ import "gogoproto/gogo.proto"; message RegretInformedWeight { option (gogoproto.equal) = true; - string worker = 1; // worker who created the value - string weight = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string worker = 1; // worker who created the value + string weight = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v3/nonce.proto b/x/emissions/proto/emissions/v3/nonce.proto index a70edf480..7478fd294 100644 --- a/x/emissions/proto/emissions/v3/nonce.proto +++ b/x/emissions/proto/emissions/v3/nonce.proto @@ -7,12 +7,10 @@ import "gogoproto/gogo.proto"; message Nonce { option (gogoproto.equal) = true; - int64 block_height = 1; // block height of the request + int64 block_height = 1; // block height of the request } -message Nonces { - repeated Nonce nonces = 1; -} +message Nonces { repeated Nonce nonces = 1; } message ReputerRequestNonce { option (gogoproto.equal) = true; @@ -21,6 +19,4 @@ message ReputerRequestNonce { Nonce reputer_nonce = 1; } -message ReputerRequestNonces { - repeated ReputerRequestNonce nonces = 1; -} +message ReputerRequestNonces { repeated ReputerRequestNonce nonces = 1; } diff --git a/x/emissions/proto/emissions/v3/params.proto b/x/emissions/proto/emissions/v3/params.proto index d1f1aae5a..408d5dc19 100644 --- a/x/emissions/proto/emissions/v3/params.proto +++ b/x/emissions/proto/emissions/v3/params.proto @@ -12,120 +12,147 @@ message Params { reserved 41; reserved "min_effective_topic_revenue"; - string version = 1; // version of the protocol should be in lockstep with - // github release tag version - int64 max_serialized_msg_length = 2; // max length of input data for msg and query server calls + string version = 1; // version of the protocol should be in lockstep with + // github release tag version + int64 max_serialized_msg_length = + 2; // max length of input data for msg and query server calls string min_topic_weight = 3 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // total unmet demand for a topic < this => don't run inference - // solicatation or weight-adjustment - uint64 max_topics_per_block = 4; // max number of topics to run cadence for per block + ]; // total unmet demand for a topic < this => don't run inference + // solicatation or weight-adjustment + uint64 max_topics_per_block = + 4; // max number of topics to run cadence for per block string required_minimum_stake = 5 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // minimum amount of tokens to send to stake as a reputer or worker - int64 remove_stake_delay_window = 6; // how long to wait (blocks) before allowed to remove stake - int64 min_epoch_length = 7; // fastest allowable topic epoch and cadence of a - // repeating inference request + ]; // minimum amount of tokens to send to stake as a reputer or worker + int64 remove_stake_delay_window = + 6; // how long to wait (blocks) before allowed to remove stake + int64 min_epoch_length = 7; // fastest allowable topic epoch and cadence of a + // repeating inference request string beta_entropy = 8 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // controls resilience of reward payouts against copycat workers + ]; // controls resilience of reward payouts against copycat workers string learning_rate = 9 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // speed of gradient descent + ]; // speed of gradient descent string max_gradient_threshold = 10 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // gradient descent stops when gradient falls below this + ]; // gradient descent stops when gradient falls below this string min_stake_fraction = 11 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // minimum fraction of stake to listen to when setting consensus listening - // coefficients - uint64 max_unfulfilled_worker_requests = 13; // max num worker request nonces to keep track of per topic - uint64 max_unfulfilled_reputer_requests = 14; // max num reputer request nonces to keep track of per topic + ]; // minimum fraction of stake to listen to when setting consensus listening + // coefficients + uint64 max_unfulfilled_worker_requests = + 13; // max num worker request nonces to keep track of per topic + uint64 max_unfulfilled_reputer_requests = + 14; // max num reputer request nonces to keep track of per topic string topic_reward_stake_importance = 15 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // The exponent μ represents the importance of stake in the reward of a - // topic and has a fiducial value of 0.5 + ]; // The exponent μ represents the importance of stake in the reward of a + // topic and has a fiducial value of 0.5 string topic_reward_fee_revenue_importance = 16 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // The exponent ν represents the importance of fee revenue in the reward of - // a topic and has a fiducial value of 0.5 + ]; // The exponent ν represents the importance of fee revenue in the reward of + // a topic and has a fiducial value of 0.5 string topic_reward_alpha = 17 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // global exponential moving average parameter. Fiducial value of 0.9375 on - // a monthly timescale, 0.5 for weekly updates + ]; // global exponential moving average parameter. Fiducial value of 0.9375 on + // a monthly timescale, 0.5 for weekly updates string task_reward_alpha = 18 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // global exponential moving average parameter. Fiducial value of 0.1 used - // to calculate ~U_ij, ~V_ik, ~W_im + ]; // global exponential moving average parameter. Fiducial value of 0.1 used + // to calculate ~U_ij, ~V_ik, ~W_im string validators_vs_allora_percent_reward = 19 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // percent of total supply rewarded to cosmos network validators, rest goes - // to allora reputers workers etc - uint64 max_samples_to_scale_scores = 20; // number of scores to use for standard deviation calculation - uint64 max_top_inferers_to_reward = 21; // max number of top inferers by score to reward - uint64 max_top_forecasters_to_reward = 22; // max number of top forecasters by score to reward - uint64 max_top_reputers_to_reward = 23; // max number of top reputers by score to reward + ]; // percent of total supply rewarded to cosmos network validators, rest goes + // to allora reputers workers etc + uint64 max_samples_to_scale_scores = + 20; // number of scores to use for standard deviation calculation + uint64 max_top_inferers_to_reward = + 21; // max number of top inferers by score to reward + uint64 max_top_forecasters_to_reward = + 22; // max number of top forecasters by score to reward + uint64 max_top_reputers_to_reward = + 23; // max number of top reputers by score to reward string create_topic_fee = 24 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // topic registration fee - uint64 gradient_descent_max_iters = 25; // max number of gradient descent iterations - int64 max_retries_to_fulfil_nonces_worker = 26; // max number of retries to unfulfilled nonces (worker) - int64 max_retries_to_fulfil_nonces_reputer = 27; // max number of retries to unfulfilled nonces (reputer) + ]; // topic registration fee + uint64 gradient_descent_max_iters = + 25; // max number of gradient descent iterations + int64 max_retries_to_fulfil_nonces_worker = + 26; // max number of retries to unfulfilled nonces (worker) + int64 max_retries_to_fulfil_nonces_reputer = + 27; // max number of retries to unfulfilled nonces (reputer) string registration_fee = 28 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // registration fee for reputer or worker - uint64 default_page_limit = 29; // default limit for pagination - uint64 max_page_limit = 30; // max limit for pagination + ]; // registration fee for reputer or worker + uint64 default_page_limit = 29; // default limit for pagination + uint64 max_page_limit = 30; // max limit for pagination // min number of epochs to keep network losses, reputer losses, inferences, // forecasts int64 min_epoch_length_record_limit = 31; // block emission rate in number of blocks expected per month uint64 blocks_per_month = 32; - string p_reward_inference = 33 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string p_reward_forecast = 34 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string p_reward_reputer = 35 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_reward_inference = 36 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_reward_forecast = 37 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string c_norm = 38 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_reward_inference = 33 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string p_reward_forecast = 34 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string p_reward_reputer = 35 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_reward_inference = 36 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_reward_forecast = 37 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string c_norm = 38 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; string topic_fee_revenue_decay_rate = 39 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // decay rate for topic fee revenue + ]; // decay rate for topic fee revenue string epsilon_reputer = 40 [ (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false - ]; // a small tolerance quantity used to cap reputer scores at infinitesimally - // close proximities + ]; // a small tolerance quantity used to cap reputer scores at infinitesimally + // close proximities uint64 half_max_process_stake_removals_end_block = - 42; // max amount of stake removals to process in an ABCI end block. Applied twice once for stakeRemovals and - // once for DelegateStakeRemovals, so actual max is this number times two - string epsilon_safe_div = 43 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + 42; // max amount of stake removals to process in an ABCI end block. + // Applied twice once for stakeRemovals and once for + // DelegateStakeRemovals, so actual max is this number times two + string epsilon_safe_div = 43 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; /// a small tolerance quantity used to cap division by zero string data_sending_fee = 44 [ (cosmos_proto.scalar) = "cosmos.Int", @@ -134,5 +161,6 @@ message Params { (amino.dont_omitempty) = true ]; // payload sending fee for reputer or worker - uint64 max_elements_per_forecast = 45; // max number of top forecasters by score to reward + uint64 max_elements_per_forecast = + 45; // max number of top forecasters by score to reward } diff --git a/x/emissions/proto/emissions/v3/query.proto b/x/emissions/proto/emissions/v3/query.proto index 52b45e02f..9678b47c6 100644 --- a/x/emissions/proto/emissions/v3/query.proto +++ b/x/emissions/proto/emissions/v3/query.proto @@ -26,7 +26,8 @@ service Query { option (google.api.http).get = "/emissions/v3/params"; } - rpc GetNextTopicId(QueryNextTopicIdRequest) returns (QueryNextTopicIdResponse) { + rpc GetNextTopicId(QueryNextTopicIdRequest) + returns (QueryNextTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/next_topic_id"; } @@ -36,7 +37,8 @@ service Query { option (google.api.http).get = "/emissions/v3/topics/{topic_id}"; } - rpc GetActiveTopics(QueryActiveTopicsRequest) returns (QueryActiveTopicsResponse) { + rpc GetActiveTopics(QueryActiveTopicsRequest) + returns (QueryActiveTopicsResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/active_topics"; } @@ -48,25 +50,31 @@ service Query { "workers/{worker_address}/latest_inference"; } - rpc GetInferencesAtBlock(QueryInferencesAtBlockRequest) returns (QueryInferencesAtBlockResponse) { + rpc GetInferencesAtBlock(QueryInferencesAtBlockRequest) + returns (QueryInferencesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/inferences/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/inferences/{topic_id}/{block_height}"; } - rpc GetLatestTopicInferences(QueryLatestTopicInferencesRequest) returns (QueryLatestTopicInferencesResponse) { + rpc GetLatestTopicInferences(QueryLatestTopicInferencesRequest) + returns (QueryLatestTopicInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/latest_inferences/{topic_id}"; } - rpc GetForecastsAtBlock(QueryForecastsAtBlockRequest) returns (QueryForecastsAtBlockResponse) { + rpc GetForecastsAtBlock(QueryForecastsAtBlockRequest) + returns (QueryForecastsAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/forecasts/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/forecasts/{topic_id}/{block_height}"; } rpc GetNetworkLossBundleAtBlock(QueryNetworkLossBundleAtBlockRequest) returns (QueryNetworkLossBundleAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/network_loss/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/network_loss/{topic_id}/{block_height}"; } rpc GetTotalStake(QueryTotalStakeRequest) returns (QueryTotalStakeResponse) { @@ -74,9 +82,11 @@ service Query { option (google.api.http).get = "/emissions/v3/total_stake"; } - rpc GetReputerStakeInTopic(QueryReputerStakeInTopicRequest) returns (QueryReputerStakeInTopicResponse) { + rpc GetReputerStakeInTopic(QueryReputerStakeInTopicRequest) + returns (QueryReputerStakeInTopicResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputer_stake/{address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/reputer_stake/{address}/{topic_id}"; } rpc GetMultiReputerStakeInTopic(QueryMultiReputerStakeInTopicRequest) @@ -85,29 +95,36 @@ service Query { option (google.api.http).get = "/emissions/v3/reputers_stakes/{topic_id}"; } - rpc GetStakeFromReputerInTopicInSelf(QueryStakeFromReputerInTopicInSelfRequest) + rpc GetStakeFromReputerInTopicInSelf( + QueryStakeFromReputerInTopicInSelfRequest) returns (QueryStakeFromReputerInTopicInSelfResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputer_stake_self/{reputer_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/reputer_stake_self/{reputer_address}/{topic_id}"; } - rpc GetDelegateStakeInTopicInReputer(QueryDelegateStakeInTopicInReputerRequest) + rpc GetDelegateStakeInTopicInReputer( + QueryDelegateStakeInTopicInReputerRequest) returns (QueryDelegateStakeInTopicInReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputer_delegate_stake/{reputer_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/reputer_delegate_stake/{reputer_address}/{topic_id}"; } - rpc GetStakeFromDelegatorInTopicInReputer(QueryStakeFromDelegatorInTopicInReputerRequest) + rpc GetStakeFromDelegatorInTopicInReputer( + QueryStakeFromDelegatorInTopicInReputerRequest) returns (QueryStakeFromDelegatorInTopicInReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake/{delegator_address}/{reputer_address}/" - "{topic_id}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake/{delegator_address}/{reputer_address}/" + "{topic_id}"; } rpc GetStakeFromDelegatorInTopic(QueryStakeFromDelegatorInTopicRequest) returns (QueryStakeFromDelegatorInTopicResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake/{delegator_address}/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake/{delegator_address}/{topic_id}"; } rpc GetTopicStake(QueryTopicStakeRequest) returns (QueryTopicStakeResponse) { @@ -118,32 +135,40 @@ service Query { rpc GetStakeRemovalsUpUntilBlock(QueryStakeRemovalsUpUntilBlockRequest) returns (QueryStakeRemovalsUpUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/stake_removals/{block_height}"; + option (google.api.http).get = + "/emissions/v3/stake_removals/{block_height}"; } - rpc GetDelegateStakeRemovalsUpUntilBlock(QueryDelegateStakeRemovalsUpUntilBlockRequest) + rpc GetDelegateStakeRemovalsUpUntilBlock( + QueryDelegateStakeRemovalsUpUntilBlockRequest) returns (QueryDelegateStakeRemovalsUpUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake_removals/{block_height}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake_removals/{block_height}"; } - rpc GetStakeRemovalInfo(QueryStakeRemovalInfoRequest) returns (QueryStakeRemovalInfoResponse) { + rpc GetStakeRemovalInfo(QueryStakeRemovalInfoRequest) + returns (QueryStakeRemovalInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/stake_removal/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/stake_removal/{topic_id}/{reputer}"; } rpc GetDelegateStakeRemovalInfo(QueryDelegateStakeRemovalInfoRequest) returns (QueryDelegateStakeRemovalInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake_removal/{topic_id}/{delegator}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake_removal/{topic_id}/{delegator}/{reputer}"; } - rpc GetWorkerNodeInfo(QueryWorkerNodeInfoRequest) returns (QueryWorkerNodeInfoResponse) { + rpc GetWorkerNodeInfo(QueryWorkerNodeInfoRequest) + returns (QueryWorkerNodeInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/worker/{address}"; } - rpc GetReputerNodeInfo(QueryReputerNodeInfoRequest) returns (QueryReputerNodeInfoResponse) { + rpc GetReputerNodeInfo(QueryReputerNodeInfoRequest) + returns (QueryReputerNodeInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/reputer/{address}"; } @@ -151,103 +176,130 @@ service Query { rpc IsWorkerRegisteredInTopicId(QueryIsWorkerRegisteredInTopicIdRequest) returns (QueryIsWorkerRegisteredInTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/worker_registered/{topic_id}/{address}"; + option (google.api.http).get = + "/emissions/v3/worker_registered/{topic_id}/{address}"; } rpc IsReputerRegisteredInTopicId(QueryIsReputerRegisteredInTopicIdRequest) returns (QueryIsReputerRegisteredInTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputer_registered/{topic_id}/{address}"; + option (google.api.http).get = + "/emissions/v3/reputer_registered/{topic_id}/{address}"; } rpc GetNetworkInferencesAtBlock(QueryNetworkInferencesAtBlockRequest) returns (QueryNetworkInferencesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/network_inferences/{topic_id}/last_inference/" - "{block_height_last_inference}"; + option (google.api.http).get = + "/emissions/v3/network_inferences/{topic_id}/last_inference/" + "{block_height_last_inference}"; } - rpc GetLatestNetworkInference(QueryLatestNetworkInferencesRequest) returns (QueryLatestNetworkInferencesResponse) { + rpc GetLatestNetworkInference(QueryLatestNetworkInferencesRequest) + returns (QueryLatestNetworkInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/network_inferences/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/network_inferences/{topic_id}"; } - rpc GetLatestAvailableNetworkInference(QueryLatestAvailableNetworkInferencesRequest) + rpc GetLatestAvailableNetworkInference( + QueryLatestAvailableNetworkInferencesRequest) returns (QueryLatestAvailableNetworkInferencesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/network_inferences/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/network_inferences/{topic_id}"; } - rpc IsWorkerNonceUnfulfilled(QueryIsWorkerNonceUnfulfilledRequest) returns (QueryIsWorkerNonceUnfulfilledResponse) { + rpc IsWorkerNonceUnfulfilled(QueryIsWorkerNonceUnfulfilledRequest) + returns (QueryIsWorkerNonceUnfulfilledResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/is_worker_nonce_unfulfilled/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/is_worker_nonce_unfulfilled/{topic_id}/{block_height}"; } rpc IsReputerNonceUnfulfilled(QueryIsReputerNonceUnfulfilledRequest) returns (QueryIsReputerNonceUnfulfilledResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/is_reputer_nonce_unfulfilled/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/is_reputer_nonce_unfulfilled/{topic_id}/{block_height}"; } - rpc GetUnfulfilledWorkerNonces(QueryUnfulfilledWorkerNoncesRequest) returns (QueryUnfulfilledWorkerNoncesResponse) { + rpc GetUnfulfilledWorkerNonces(QueryUnfulfilledWorkerNoncesRequest) + returns (QueryUnfulfilledWorkerNoncesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/unfulfilled_worker_nonces/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/unfulfilled_worker_nonces/{topic_id}"; } rpc GetUnfulfilledReputerNonces(QueryUnfulfilledReputerNoncesRequest) returns (QueryUnfulfilledReputerNoncesResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/unfulfilled_reputer_nonces/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/unfulfilled_reputer_nonces/{topic_id}"; } - rpc GetInfererNetworkRegret(QueryInfererNetworkRegretRequest) returns (QueryInfererNetworkRegretResponse) { + rpc GetInfererNetworkRegret(QueryInfererNetworkRegretRequest) + returns (QueryInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/inferer_network_regret/{topic_id}/{actor_id}"; + option (google.api.http).get = + "/emissions/v3/inferer_network_regret/{topic_id}/{actor_id}"; } - rpc GetForecasterNetworkRegret(QueryForecasterNetworkRegretRequest) returns (QueryForecasterNetworkRegretResponse) { + rpc GetForecasterNetworkRegret(QueryForecasterNetworkRegretRequest) + returns (QueryForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/forecaster_network_regret/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v3/forecaster_network_regret/{topic_id}/{worker}"; } rpc GetOneInForecasterNetworkRegret(QueryOneInForecasterNetworkRegretRequest) returns (QueryOneInForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/one_in_forecaster_network_regret/{topic_id}/" - "{forecaster}/{inferer}"; + option (google.api.http).get = + "/emissions/v3/one_in_forecaster_network_regret/{topic_id}/" + "{forecaster}/{inferer}"; } - rpc IsWhitelistAdmin(QueryIsWhitelistAdminRequest) returns (QueryIsWhitelistAdminResponse) { + rpc IsWhitelistAdmin(QueryIsWhitelistAdminRequest) + returns (QueryIsWhitelistAdminResponse) { option (google.api.http).get = "/emissions/v3/whitelist_admin/{address}"; } - rpc GetTopicLastWorkerCommitInfo(QueryTopicLastWorkerCommitInfoRequest) returns (QueryTopicLastWorkerCommitInfoResponse) { + rpc GetTopicLastWorkerCommitInfo(QueryTopicLastWorkerCommitInfoRequest) + returns (QueryTopicLastWorkerCommitInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/topic_last_commit/{topic_id}"; } - rpc GetTopicLastReputerCommitInfo(QueryTopicLastReputerCommitInfoRequest) returns (QueryTopicLastReputerCommitInfoResponse) { + rpc GetTopicLastReputerCommitInfo(QueryTopicLastReputerCommitInfoRequest) + returns (QueryTopicLastReputerCommitInfoResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/topic_last_commit/{topic_id}"; } - rpc GetTopicRewardNonce(QueryTopicRewardNonceRequest) returns (QueryTopicRewardNonceResponse) { + rpc GetTopicRewardNonce(QueryTopicRewardNonceRequest) + returns (QueryTopicRewardNonceResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/topic_reward_nonce/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/topic_reward_nonce/{topic_id}"; } rpc GetReputerLossBundlesAtBlock(QueryReputerLossBundlesAtBlockRequest) returns (QueryReputerLossBundlesAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputer_loss_bundles/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/reputer_loss_bundles/{topic_id}/{block_height}"; } - rpc GetStakeReputerAuthority(QueryStakeReputerAuthorityRequest) returns (QueryStakeReputerAuthorityResponse) { + rpc GetStakeReputerAuthority(QueryStakeReputerAuthorityRequest) + returns (QueryStakeReputerAuthorityResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/stake_reputer_authority/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/stake_reputer_authority/{topic_id}/{reputer}"; } - rpc GetDelegateStakePlacement(QueryDelegateStakePlacementRequest) returns (QueryDelegateStakePlacementResponse) { + rpc GetDelegateStakePlacement(QueryDelegateStakePlacementRequest) + returns (QueryDelegateStakePlacementResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/delegate_stake_placement/" "{topic_id}/{delegator}/{target}"; @@ -256,29 +308,38 @@ service Query { rpc GetDelegateStakeUponReputer(QueryDelegateStakeUponReputerRequest) returns (QueryDelegateStakeUponReputerResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake_upon_reputer/{topic_id}/{target}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake_upon_reputer/{topic_id}/{target}"; } - rpc GetDelegateRewardPerShare(QueryDelegateRewardPerShareRequest) returns (QueryDelegateRewardPerShareResponse) { + rpc GetDelegateRewardPerShare(QueryDelegateRewardPerShareRequest) + returns (QueryDelegateRewardPerShareResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_reward_per_share/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/delegate_reward_per_share/{topic_id}/{reputer}"; } - rpc GetStakeRemovalForReputerAndTopicId(QueryStakeRemovalForReputerAndTopicIdRequest) + rpc GetStakeRemovalForReputerAndTopicId( + QueryStakeRemovalForReputerAndTopicIdRequest) returns (QueryStakeRemovalForReputerAndTopicIdResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/stake_removal/{reputer}/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/stake_removal/{reputer}/{topic_id}"; } - rpc GetDelegateStakeRemoval(QueryDelegateStakeRemovalRequest) returns (QueryDelegateStakeRemovalResponse) { + rpc GetDelegateStakeRemoval(QueryDelegateStakeRemovalRequest) + returns (QueryDelegateStakeRemovalResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/delegate_stake_removal/{block_height}/{topic_id}/" - "{delegator}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/delegate_stake_removal/{block_height}/{topic_id}/" + "{delegator}/{reputer}"; } - rpc GetPreviousTopicWeight(QueryPreviousTopicWeightRequest) returns (QueryPreviousTopicWeightResponse) { + rpc GetPreviousTopicWeight(QueryPreviousTopicWeightRequest) + returns (QueryPreviousTopicWeightResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/previous_topic_weight/{topic_id}"; + option (google.api.http).get = + "/emissions/v3/previous_topic_weight/{topic_id}"; } rpc TopicExists(QueryTopicExistsRequest) returns (QueryTopicExistsResponse) { @@ -286,97 +347,123 @@ service Query { option (google.api.http).get = "/emissions/v3/topic_exists/{topic_id}"; } - rpc IsTopicActive(QueryIsTopicActiveRequest) returns (QueryIsTopicActiveResponse) { + rpc IsTopicActive(QueryIsTopicActiveRequest) + returns (QueryIsTopicActiveResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/is_topic_active/{topic_id}"; } - rpc GetTopicFeeRevenue(QueryTopicFeeRevenueRequest) returns (QueryTopicFeeRevenueResponse) { + rpc GetTopicFeeRevenue(QueryTopicFeeRevenueRequest) + returns (QueryTopicFeeRevenueResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/topic_fee_revenue/{topic_id}"; } - rpc GetRewardableTopics(QueryRewardableTopicsRequest) returns (QueryRewardableTopicsResponse) { + rpc GetRewardableTopics(QueryRewardableTopicsRequest) + returns (QueryRewardableTopicsResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/rewardable_topics"; } - rpc GetLatestInfererScore(QueryLatestInfererScoreRequest) returns (QueryLatestInfererScoreResponse) { + rpc GetLatestInfererScore(QueryLatestInfererScoreRequest) + returns (QueryLatestInfererScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/latest_inferer_score/{topic_id}/{inferer}"; + option (google.api.http).get = + "/emissions/v3/latest_inferer_score/{topic_id}/{inferer}"; } - rpc GetLatestForecasterScore(QueryLatestForecasterScoreRequest) returns (QueryLatestForecasterScoreResponse) { + rpc GetLatestForecasterScore(QueryLatestForecasterScoreRequest) + returns (QueryLatestForecasterScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/latest_forecaster_score/{topic_id}/{forecaster}"; + option (google.api.http).get = + "/emissions/v3/latest_forecaster_score/{topic_id}/{forecaster}"; } - rpc GetLatestReputerScore(QueryLatestReputerScoreRequest) returns (QueryLatestReputerScoreResponse) { + rpc GetLatestReputerScore(QueryLatestReputerScoreRequest) + returns (QueryLatestReputerScoreResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/latest_reputer_score/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/latest_reputer_score/{topic_id}/{reputer}"; } rpc GetInferenceScoresUntilBlock(QueryInferenceScoresUntilBlockRequest) returns (QueryInferenceScoresUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/inference_scores_until_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/inference_scores_until_block/{topic_id}/{block_height}"; } rpc GetWorkerInferenceScoresAtBlock(QueryWorkerInferenceScoresAtBlockRequest) returns (QueryWorkerInferenceScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/worker_inference_scores_at_block/{topic_id}/" - "{block_height}"; + option (google.api.http).get = + "/emissions/v3/worker_inference_scores_at_block/{topic_id}/" + "{block_height}"; } rpc GetForecastScoresUntilBlock(QueryForecastScoresUntilBlockRequest) returns (QueryForecastScoresUntilBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/forecast_scores_until_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/forecast_scores_until_block/{topic_id}/{block_height}"; } rpc GetWorkerForecastScoresAtBlock(QueryWorkerForecastScoresAtBlockRequest) returns (QueryWorkerForecastScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/worker_forecast_scores_at_block/{topic_id}/" - "{block_height}"; + option (google.api.http).get = + "/emissions/v3/worker_forecast_scores_at_block/{topic_id}/" + "{block_height}"; } - rpc GetReputersScoresAtBlock(QueryReputersScoresAtBlockRequest) returns (QueryReputersScoresAtBlockResponse) { + rpc GetReputersScoresAtBlock(QueryReputersScoresAtBlockRequest) + returns (QueryReputersScoresAtBlockResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/reputers_scores_at_block/{topic_id}/{block_height}"; + option (google.api.http).get = + "/emissions/v3/reputers_scores_at_block/{topic_id}/{block_height}"; } - rpc GetListeningCoefficient(QueryListeningCoefficientRequest) returns (QueryListeningCoefficientResponse) { + rpc GetListeningCoefficient(QueryListeningCoefficientRequest) + returns (QueryListeningCoefficientResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/listening_coefficient/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/listening_coefficient/{topic_id}/{reputer}"; } - rpc GetPreviousReputerRewardFraction(QueryPreviousReputerRewardFractionRequest) + rpc GetPreviousReputerRewardFraction( + QueryPreviousReputerRewardFractionRequest) returns (QueryPreviousReputerRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/previous_reputer_reward_fraction/{topic_id}/{reputer}"; + option (google.api.http).get = + "/emissions/v3/previous_reputer_reward_fraction/{topic_id}/{reputer}"; } - rpc GetPreviousInferenceRewardFraction(QueryPreviousInferenceRewardFractionRequest) + rpc GetPreviousInferenceRewardFraction( + QueryPreviousInferenceRewardFractionRequest) returns (QueryPreviousInferenceRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/previous_inference_reward_fraction/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v3/previous_inference_reward_fraction/{topic_id}/{worker}"; } - rpc GetPreviousForecastRewardFraction(QueryPreviousForecastRewardFractionRequest) + rpc GetPreviousForecastRewardFraction( + QueryPreviousForecastRewardFractionRequest) returns (QueryPreviousForecastRewardFractionResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/previous_forecast_reward_fraction/{topic_id}/{worker}"; + option (google.api.http).get = + "/emissions/v3/previous_forecast_reward_fraction/{topic_id}/{worker}"; } - rpc GetPreviousPercentageRewardToStakedReputers(QueryPreviousPercentageRewardToStakedReputersRequest) + rpc GetPreviousPercentageRewardToStakedReputers( + QueryPreviousPercentageRewardToStakedReputersRequest) returns (QueryPreviousPercentageRewardToStakedReputersResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/previous_percentage_reward_to_staked_reputers"; + option (google.api.http).get = + "/emissions/v3/previous_percentage_reward_to_staked_reputers"; } - rpc GetTotalRewardToDistribute(QueryTotalRewardToDistributeRequest) returns (QueryTotalRewardToDistributeResponse) { + rpc GetTotalRewardToDistribute(QueryTotalRewardToDistributeRequest) + returns (QueryTotalRewardToDistributeResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/emissions/v3/total_reward_to_distribute"; } @@ -384,31 +471,40 @@ service Query { rpc GetNaiveInfererNetworkRegret(QueryNaiveInfererNetworkRegretRequest) returns (QueryNaiveInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/native_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v3/native_inferer_network_regret"; } - rpc GetOneOutInfererInfererNetworkRegret(QueryOneOutInfererInfererNetworkRegretRequest) + rpc GetOneOutInfererInfererNetworkRegret( + QueryOneOutInfererInfererNetworkRegretRequest) returns (QueryOneOutInfererInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/one_out_inferer_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v3/one_out_inferer_inferer_network_regret"; } - rpc GetOneOutInfererForecasterNetworkRegret(QueryOneOutInfererForecasterNetworkRegretRequest) + rpc GetOneOutInfererForecasterNetworkRegret( + QueryOneOutInfererForecasterNetworkRegretRequest) returns (QueryOneOutInfererForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/one_out_inferer_forecaster_network_regret"; + option (google.api.http).get = + "/emissions/v3/one_out_inferer_forecaster_network_regret"; } - rpc GetOneOutForecasterInfererNetworkRegret(QueryOneOutForecasterInfererNetworkRegretRequest) + rpc GetOneOutForecasterInfererNetworkRegret( + QueryOneOutForecasterInfererNetworkRegretRequest) returns (QueryOneOutForecasterInfererNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/one_out_forecaster_inferer_network_regret"; + option (google.api.http).get = + "/emissions/v3/one_out_forecaster_inferer_network_regret"; } - rpc GetOneOutForecasterForecasterNetworkRegret(QueryOneOutForecasterForecasterNetworkRegretRequest) + rpc GetOneOutForecasterForecasterNetworkRegret( + QueryOneOutForecasterForecasterNetworkRegretRequest) returns (QueryOneOutForecasterForecasterNetworkRegretResponse) { option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/emissions/v3/one_out_forecaster_forecaster_network_regret"; + option (google.api.http).get = + "/emissions/v3/one_out_forecaster_forecaster_network_regret"; } } @@ -417,9 +513,7 @@ message QueryNaiveInfererNetworkRegretRequest { string inferer = 2; } -message QueryNaiveInfererNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryNaiveInfererNetworkRegretResponse { TimestampedValue regret = 1; } message QueryOneOutInfererInfererNetworkRegretRequest { uint64 topic_id = 1; @@ -467,7 +561,8 @@ message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // Total Stake returns the total amount of stake in the system @@ -572,9 +667,7 @@ message QueryStakeFromDelegatorInTopicResponse { ]; } -message QueryTopicStakeRequest { - uint64 topic_id = 1; -} +message QueryTopicStakeRequest { uint64 topic_id = 1; } message QueryTopicStakeResponse { option (gogoproto.equal) = true; @@ -591,19 +684,13 @@ message QueryNetworkLossBundleAtBlockRequest { int64 block_height = 2; } -message QueryNetworkLossBundleAtBlockResponse { - ValueBundle loss_bundle = 1; -} +message QueryNetworkLossBundleAtBlockResponse { ValueBundle loss_bundle = 1; } message QueryNextTopicIdRequest {} -message QueryNextTopicIdResponse { - uint64 next_topic_id = 1; -} +message QueryNextTopicIdResponse { uint64 next_topic_id = 1; } -message QueryTopicRequest { - uint64 topic_id = 1; -} +message QueryTopicRequest { uint64 topic_id = 1; } message QueryTopicResponse { Topic topic = 1; @@ -630,13 +717,9 @@ message QueryInferencesAtBlockRequest { // // NOTE: The amount field is a Uint which implements the custom method // signatures required by gogoproto. -message QueryInferencesAtBlockResponse { - Inferences inferences = 1; -} +message QueryInferencesAtBlockResponse { Inferences inferences = 1; } -message QueryLatestTopicInferencesRequest { - uint64 topic_id = 1; -} +message QueryLatestTopicInferencesRequest { uint64 topic_id = 1; } message QueryLatestTopicInferencesResponse { Inferences inferences = 1; @@ -653,18 +736,14 @@ message QueryForecastsAtBlockRequest { // // NOTE: The amount field is a Uint which implements the custom method // signatures required by gogoproto. -message QueryForecastsAtBlockResponse { - Forecasts forecasts = 1; -} +message QueryForecastsAtBlockResponse { Forecasts forecasts = 1; } message QueryWorkerLatestInferenceRequest { uint64 topic_id = 1; string worker_address = 2; } -message QueryWorkerLatestInferenceResponse { - Inference latest_inference = 1; -} +message QueryWorkerLatestInferenceResponse { Inference latest_inference = 1; } message QueryWorkerNodeInfoRequest { reserved 1; @@ -673,9 +752,7 @@ message QueryWorkerNodeInfoRequest { string address = 2; } -message QueryWorkerNodeInfoResponse { - OffchainNode node_info = 1; -} +message QueryWorkerNodeInfoResponse { OffchainNode node_info = 1; } message QueryReputerNodeInfoRequest { reserved 1; @@ -684,9 +761,7 @@ message QueryReputerNodeInfoRequest { string address = 2; } -message QueryReputerNodeInfoResponse { - OffchainNode node_info = 1; -} +message QueryReputerNodeInfoResponse { OffchainNode node_info = 1; } message QueryNetworkInferencesAtBlockRequest { reserved 3; @@ -696,13 +771,9 @@ message QueryNetworkInferencesAtBlockRequest { int64 block_height_last_inference = 2; } -message QueryLatestNetworkInferencesRequest { - uint64 topic_id = 1; -} +message QueryLatestNetworkInferencesRequest { uint64 topic_id = 1; } -message QueryLatestAvailableNetworkInferencesRequest { - uint64 topic_id = 1; -} +message QueryLatestAvailableNetworkInferencesRequest { uint64 topic_id = 1; } message QueryIsWorkerNonceUnfulfilledRequest { uint64 topic_id = 1; @@ -713,39 +784,29 @@ message QueryIsWorkerNonceUnfulfilledResponse { bool is_worker_nonce_unfulfilled = 1; } -message QueryUnfulfilledReputerNoncesRequest { - uint64 topic_id = 1; -} +message QueryUnfulfilledReputerNoncesRequest { uint64 topic_id = 1; } message QueryUnfulfilledReputerNoncesResponse { ReputerRequestNonces nonces = 1; } -message QueryUnfulfilledWorkerNoncesRequest { - uint64 topic_id = 1; -} +message QueryUnfulfilledWorkerNoncesRequest { uint64 topic_id = 1; } -message QueryUnfulfilledWorkerNoncesResponse { - Nonces nonces = 1; -} +message QueryUnfulfilledWorkerNoncesResponse { Nonces nonces = 1; } message QueryInfererNetworkRegretRequest { uint64 topic_id = 1; string actor_id = 2; } -message QueryInfererNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryInfererNetworkRegretResponse { TimestampedValue regret = 1; } message QueryForecasterNetworkRegretRequest { uint64 topic_id = 1; string worker = 2; } -message QueryForecasterNetworkRegretResponse { - TimestampedValue regret = 1; -} +message QueryForecasterNetworkRegretResponse { TimestampedValue regret = 1; } message QueryOneInForecasterNetworkRegretRequest { uint64 topic_id = 1; @@ -777,10 +838,14 @@ message QueryLatestNetworkInferencesResponse { repeated WorkerAttributedValue forecastImpliedInferences = 4; int64 inference_block_height = 5; int64 loss_block_height = 6; - repeated string confidence_interval_raw_percentiles = 7 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string confidence_interval_values = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string confidence_interval_raw_percentiles = 7 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string confidence_interval_values = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryLatestAvailableNetworkInferencesResponse { @@ -790,10 +855,14 @@ message QueryLatestAvailableNetworkInferencesResponse { repeated WorkerAttributedValue forecastImpliedInferences = 4; int64 inference_block_height = 5; int64 loss_block_height = 6; - repeated string confidence_interval_raw_percentiles = 7 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string confidence_interval_values = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string confidence_interval_raw_percentiles = 7 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string confidence_interval_values = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryIsWorkerRegisteredInTopicIdRequest { @@ -801,30 +870,20 @@ message QueryIsWorkerRegisteredInTopicIdRequest { string address = 2; } -message QueryIsWorkerRegisteredInTopicIdResponse { - bool is_registered = 1; -} +message QueryIsWorkerRegisteredInTopicIdResponse { bool is_registered = 1; } message QueryIsReputerRegisteredInTopicIdRequest { uint64 topic_id = 1; string address = 2; } -message QueryIsReputerRegisteredInTopicIdResponse { - bool is_registered = 1; -} +message QueryIsReputerRegisteredInTopicIdResponse { bool is_registered = 1; } -message QueryIsWhitelistAdminRequest { - string address = 1; -} +message QueryIsWhitelistAdminRequest { string address = 1; } -message QueryIsWhitelistAdminResponse { - bool is_admin = 1; -} +message QueryIsWhitelistAdminResponse { bool is_admin = 1; } -message QueryStakeRemovalsUpUntilBlockRequest { - int64 block_height = 1; -} +message QueryStakeRemovalsUpUntilBlockRequest { int64 block_height = 1; } message QueryStakeRemovalsUpUntilBlockResponse { repeated StakeRemovalInfo removals = 1; @@ -843,9 +902,7 @@ message QueryStakeRemovalInfoRequest { string reputer = 2; } -message QueryStakeRemovalInfoResponse { - StakeRemovalInfo removal = 1; -} +message QueryStakeRemovalInfoResponse { StakeRemovalInfo removal = 1; } message QueryDelegateStakeRemovalInfoRequest { uint64 topic_id = 1; @@ -857,29 +914,21 @@ message QueryDelegateStakeRemovalInfoResponse { DelegateStakeRemovalInfo removal = 1; } -message QueryTopicLastWorkerCommitInfoRequest { - uint64 topic_id = 1; -} +message QueryTopicLastWorkerCommitInfoRequest { uint64 topic_id = 1; } message QueryTopicLastWorkerCommitInfoResponse { TimestampedActorNonce last_commit = 1; } -message QueryTopicLastReputerCommitInfoRequest { - uint64 topic_id = 1; -} +message QueryTopicLastReputerCommitInfoRequest { uint64 topic_id = 1; } message QueryTopicLastReputerCommitInfoResponse { TimestampedActorNonce last_commit = 1; } -message QueryTopicRewardNonceRequest { - uint64 topic_id = 1; -} +message QueryTopicRewardNonceRequest { uint64 topic_id = 1; } -message QueryTopicRewardNonceResponse { - int64 nonce = 1; -} +message QueryTopicRewardNonceResponse { int64 nonce = 1; } message QueryReputerLossBundlesAtBlockRequest { uint64 topic_id = 1; @@ -934,8 +983,10 @@ message QueryDelegateRewardPerShareRequest { } message QueryDelegateRewardPerShareResponse { - string reward_per_share = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_per_share = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryStakeRemovalForReputerAndTopicIdRequest { @@ -958,35 +1009,25 @@ message QueryDelegateStakeRemovalResponse { DelegateStakeRemovalInfo stake_removal_info = 1; } -message QueryPreviousTopicWeightRequest { - uint64 topic_id = 1; -} +message QueryPreviousTopicWeightRequest { uint64 topic_id = 1; } message QueryPreviousTopicWeightResponse { - string weight = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string weight = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } -message QueryTopicExistsRequest { - uint64 topic_id = 1; -} +message QueryTopicExistsRequest { uint64 topic_id = 1; } -message QueryTopicExistsResponse { - bool exists = 1; -} +message QueryTopicExistsResponse { bool exists = 1; } -message QueryIsTopicActiveRequest { - uint64 topic_id = 1; -} +message QueryIsTopicActiveRequest { uint64 topic_id = 1; } -message QueryIsTopicActiveResponse { - bool is_active = 1; -} +message QueryIsTopicActiveResponse { bool is_active = 1; } -message QueryTopicFeeRevenueRequest { - uint64 topic_id = 1; -} +message QueryTopicFeeRevenueRequest { uint64 topic_id = 1; } message QueryTopicFeeRevenueResponse { string fee_revenue = 1 [ @@ -1008,72 +1049,56 @@ message QueryLatestInfererScoreRequest { string inferer = 2; } -message QueryLatestInfererScoreResponse { - Score score = 1; -} +message QueryLatestInfererScoreResponse { Score score = 1; } message QueryLatestForecasterScoreRequest { uint64 topic_id = 1; string forecaster = 2; } -message QueryLatestForecasterScoreResponse { - Score score = 1; -} +message QueryLatestForecasterScoreResponse { Score score = 1; } message QueryLatestReputerScoreRequest { uint64 topic_id = 1; string reputer = 2; } -message QueryLatestReputerScoreResponse { - Score score = 1; -} +message QueryLatestReputerScoreResponse { Score score = 1; } message QueryInferenceScoresUntilBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryInferenceScoresUntilBlockResponse { - repeated Score scores = 1; -} +message QueryInferenceScoresUntilBlockResponse { repeated Score scores = 1; } message QueryWorkerInferenceScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryWorkerInferenceScoresAtBlockResponse { - Scores scores = 1; -} +message QueryWorkerInferenceScoresAtBlockResponse { Scores scores = 1; } message QueryForecastScoresUntilBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryForecastScoresUntilBlockResponse { - repeated Score scores = 1; -} +message QueryForecastScoresUntilBlockResponse { repeated Score scores = 1; } message QueryWorkerForecastScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryWorkerForecastScoresAtBlockResponse { - Scores scores = 1; -} +message QueryWorkerForecastScoresAtBlockResponse { Scores scores = 1; } message QueryReputersScoresAtBlockRequest { uint64 topic_id = 1; int64 block_height = 2; } -message QueryReputersScoresAtBlockResponse { - Scores scores = 1; -} +message QueryReputersScoresAtBlockResponse { Scores scores = 1; } message QueryListeningCoefficientRequest { uint64 topic_id = 1; @@ -1090,8 +1115,10 @@ message QueryPreviousReputerRewardFractionRequest { } message QueryPreviousReputerRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } @@ -1101,8 +1128,10 @@ message QueryPreviousInferenceRewardFractionRequest { } message QueryPreviousInferenceRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } @@ -1112,20 +1141,26 @@ message QueryPreviousForecastRewardFractionRequest { } message QueryPreviousForecastRewardFractionResponse { - string reward_fraction = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string reward_fraction = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool not_found = 2; } message QueryPreviousPercentageRewardToStakedReputersRequest {} message QueryPreviousPercentageRewardToStakedReputersResponse { - string percentage_reward = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string percentage_reward = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message QueryTotalRewardToDistributeRequest {} message QueryTotalRewardToDistributeResponse { - string total_reward = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string total_reward = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v3/reputer.proto b/x/emissions/proto/emissions/v3/reputer.proto index 8a4397311..2c75904ff 100644 --- a/x/emissions/proto/emissions/v3/reputer.proto +++ b/x/emissions/proto/emissions/v3/reputer.proto @@ -9,17 +9,21 @@ import "emissions/v3/nonce.proto"; message WorkerAttributedValue { option (gogoproto.equal) = true; - string worker = 1; // worker who created the value - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string worker = 1; // worker who created the value + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message WithheldWorkerAttributedValue { option (gogoproto.equal) = true; string worker = 1; - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message OneOutInfererForecasterValues { @@ -39,15 +43,19 @@ message ValueBundle { string reputer = 3; bytes extra_data = 4; // R_im || log10 L_im || I_i - string combined_value = 5 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string combined_value = 5 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // R_ijm || log10 L_ijm || I_ij repeated WorkerAttributedValue inferer_values = 6; // R_ikm || log10 L_ikm || I_ik repeated WorkerAttributedValue forecaster_values = 7; // R^-_im || log10 L^-_im || I^-_i - string naive_value = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string naive_value = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; // Note: forecast-implied inferences are recomputed for each left-out // inference repeated WithheldWorkerAttributedValue one_out_inferer_values = 9; diff --git a/x/emissions/proto/emissions/v3/score.proto b/x/emissions/proto/emissions/v3/score.proto index 7545d6164..d519fee33 100644 --- a/x/emissions/proto/emissions/v3/score.proto +++ b/x/emissions/proto/emissions/v3/score.proto @@ -9,10 +9,10 @@ message Score { uint64 topic_id = 1; int64 block_height = 2; string address = 3; - string score = 4 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string score = 4 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } -message Scores { - repeated Score scores = 1; -} +message Scores { repeated Score scores = 1; } diff --git a/x/emissions/proto/emissions/v3/stake.proto b/x/emissions/proto/emissions/v3/stake.proto index c0d52dc58..ca19bb3c1 100644 --- a/x/emissions/proto/emissions/v3/stake.proto +++ b/x/emissions/proto/emissions/v3/stake.proto @@ -80,8 +80,12 @@ message DelegateStakeRemovalInfo { } message DelegatorInfo { - string amount = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string reward_debt = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string amount = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string reward_debt = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } \ No newline at end of file diff --git a/x/emissions/proto/emissions/v3/topic.proto b/x/emissions/proto/emissions/v3/topic.proto index e5ec035f6..ae3970b45 100644 --- a/x/emissions/proto/emissions/v3/topic.proto +++ b/x/emissions/proto/emissions/v3/topic.proto @@ -17,21 +17,27 @@ message Topic { int64 epoch_last_ended = 8; int64 epoch_length = 9; int64 ground_truth_lag = 10; - string p_norm = 12 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string alpha_regret = 13 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_norm = 12 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string alpha_regret = 13 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool allow_negative = 14; - string epsilon = 15 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string initial_regret = 16 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string epsilon = 15 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string initial_regret = 16 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; int64 worker_submission_window = 17; } -message TopicList { - repeated Topic topics = 1; -} +message TopicList { repeated Topic topics = 1; } message TimestampedActorNonce { reserved 2; @@ -39,7 +45,7 @@ message TimestampedActorNonce { option (gogoproto.equal) = true; - int64 block_height = 1; // height at which value calculated or received + int64 block_height = 1; // height at which value calculated or received Nonce nonce = 3; } diff --git a/x/emissions/proto/emissions/v3/tx.proto b/x/emissions/proto/emissions/v3/tx.proto index a38409a6e..a3bda486b 100644 --- a/x/emissions/proto/emissions/v3/tx.proto +++ b/x/emissions/proto/emissions/v3/tx.proto @@ -20,31 +20,40 @@ service Msg { rpc Register(MsgRegister) returns (MsgRegisterResponse); - rpc RemoveRegistration(MsgRemoveRegistration) returns (MsgRemoveRegistrationResponse); + rpc RemoveRegistration(MsgRemoveRegistration) + returns (MsgRemoveRegistrationResponse); rpc AddStake(MsgAddStake) returns (MsgAddStakeResponse); rpc RemoveStake(MsgRemoveStake) returns (MsgRemoveStakeResponse); - rpc CancelRemoveStake(MsgCancelRemoveStake) returns (MsgCancelRemoveStakeResponse); + rpc CancelRemoveStake(MsgCancelRemoveStake) + returns (MsgCancelRemoveStakeResponse); rpc DelegateStake(MsgDelegateStake) returns (MsgDelegateStakeResponse); - rpc RewardDelegateStake(MsgRewardDelegateStake) returns (MsgRewardDelegateStakeResponse); + rpc RewardDelegateStake(MsgRewardDelegateStake) + returns (MsgRewardDelegateStakeResponse); - rpc RemoveDelegateStake(MsgRemoveDelegateStake) returns (MsgRemoveDelegateStakeResponse); + rpc RemoveDelegateStake(MsgRemoveDelegateStake) + returns (MsgRemoveDelegateStakeResponse); - rpc CancelRemoveDelegateStake(MsgCancelRemoveDelegateStake) returns (MsgCancelRemoveDelegateStakeResponse); + rpc CancelRemoveDelegateStake(MsgCancelRemoveDelegateStake) + returns (MsgCancelRemoveDelegateStakeResponse); rpc FundTopic(MsgFundTopic) returns (MsgFundTopicResponse); - rpc AddToWhitelistAdmin(MsgAddToWhitelistAdmin) returns (MsgAddToWhitelistAdminResponse); + rpc AddToWhitelistAdmin(MsgAddToWhitelistAdmin) + returns (MsgAddToWhitelistAdminResponse); - rpc RemoveFromWhitelistAdmin(MsgRemoveFromWhitelistAdmin) returns (MsgRemoveFromWhitelistAdminResponse); + rpc RemoveFromWhitelistAdmin(MsgRemoveFromWhitelistAdmin) + returns (MsgRemoveFromWhitelistAdminResponse); - rpc InsertWorkerPayload(MsgInsertWorkerPayload) returns (MsgInsertWorkerPayloadResponse); + rpc InsertWorkerPayload(MsgInsertWorkerPayload) + returns (MsgInsertWorkerPayloadResponse); - rpc InsertReputerPayload(MsgInsertReputerPayload) returns (MsgInsertReputerPayloadResponse); + rpc InsertReputerPayload(MsgInsertReputerPayload) + returns (MsgInsertReputerPayloadResponse); } /// PARAMS @@ -61,8 +70,10 @@ message OptionalParams { repeated string version = 1; repeated int64 max_serialized_msg_length = 2; - repeated string min_topic_weight = 3 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string min_topic_weight = 3 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_topics_per_block = 4; repeated string required_minimum_stake = 5 [ (cosmos_proto.scalar) = "cosmos.Int", @@ -72,26 +83,44 @@ message OptionalParams { ]; repeated int64 remove_stake_delay_window = 6; repeated int64 min_epoch_length = 7; - repeated string beta_entropy = 8 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string learning_rate = 9 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string max_gradient_threshold = 10 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string min_stake_fraction = 11 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string beta_entropy = 8 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string learning_rate = 9 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string max_gradient_threshold = 10 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string min_stake_fraction = 11 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_unfulfilled_worker_requests = 13; repeated uint64 max_unfulfilled_reputer_requests = 14; - repeated string topic_reward_stake_importance = 15 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_reward_fee_revenue_importance = 16 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_reward_alpha = 17 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string task_reward_alpha = 18 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string validators_vs_allora_percent_reward = 19 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string topic_reward_stake_importance = 15 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_reward_fee_revenue_importance = 16 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_reward_alpha = 17 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string task_reward_alpha = 18 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string validators_vs_allora_percent_reward = 19 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_samples_to_scale_scores = 20; repeated uint64 max_top_inferers_to_reward = 21; repeated uint64 max_top_forecasters_to_reward = 22; @@ -115,22 +144,38 @@ message OptionalParams { repeated uint64 max_page_limit = 30; repeated int64 min_epoch_length_record_limit = 31; repeated uint64 blocks_per_month = 32; - repeated string p_reward_inference = 33 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string p_reward_forecast = 34 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string p_reward_reputer = 35 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_reward_inference = 36 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_reward_forecast = 37 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string c_norm = 38 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string topic_fee_revenue_decay_rate = 39 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - repeated string epsilon_reputer = 40 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string p_reward_inference = 33 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string p_reward_forecast = 34 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string p_reward_reputer = 35 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_reward_inference = 36 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_reward_forecast = 37 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string c_norm = 38 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string topic_fee_revenue_decay_rate = 39 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + repeated string epsilon_reputer = 40 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 half_max_process_stake_removals_end_block = 42; repeated string data_sending_fee = 43 [ (cosmos_proto.scalar) = "cosmos.Int", @@ -138,8 +183,10 @@ message OptionalParams { (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - repeated string epsilon_safe_div = 44 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + repeated string epsilon_safe_div = 44 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; repeated uint64 max_elements_per_forecast = 45; } @@ -165,19 +212,23 @@ message MsgCreateNewTopic { string loss_method = 4; int64 epoch_length = 7; int64 ground_truth_lag = 8; - string p_norm = 10 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; - string alpha_regret = 11 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string p_norm = 10 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; + string alpha_regret = 11 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bool allow_negative = 12; - string epsilon = 13 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string epsilon = 13 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; int64 worker_submission_window = 14; } -message MsgCreateNewTopicResponse { - uint64 topic_id = 1; -} +message MsgCreateNewTopicResponse { uint64 topic_id = 1; } /// Worker and Reputer Interface @@ -321,7 +372,7 @@ message MsgFundTopic { (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true - ]; // how many funds to send from alice with this Inference Request + ]; // how many funds to send from alice with this Inference Request } message MsgFundTopicResponse {} diff --git a/x/emissions/proto/emissions/v3/types.proto b/x/emissions/proto/emissions/v3/types.proto index d0b06a0be..715202591 100644 --- a/x/emissions/proto/emissions/v3/types.proto +++ b/x/emissions/proto/emissions/v3/types.proto @@ -10,11 +10,11 @@ message SimpleCursorPaginationRequest { uint64 limit = 2; } -message SimpleCursorPaginationResponse { - bytes next_key = 1; -} +message SimpleCursorPaginationResponse { bytes next_key = 1; } message ListeningCoefficient { - string coefficient = 1 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string coefficient = 1 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/x/emissions/proto/emissions/v3/worker.proto b/x/emissions/proto/emissions/v3/worker.proto index d705c858a..7d7909f4d 100644 --- a/x/emissions/proto/emissions/v3/worker.proto +++ b/x/emissions/proto/emissions/v3/worker.proto @@ -9,9 +9,11 @@ import "emissions/v3/nonce.proto"; message TimestampedValue { option (gogoproto.equal) = true; - int64 block_height = 1; // height at which value calculated or received - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + int64 block_height = 1; // height at which value calculated or received + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message Inference { @@ -20,22 +22,24 @@ message Inference { uint64 topic_id = 1; int64 block_height = 2; string inferer = 3; - string value = 4 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 4 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; bytes extra_data = 5; string proof = 6; } -message Inferences { - repeated Inference inferences = 1; -} +message Inferences { repeated Inference inferences = 1; } message ForecastElement { option (gogoproto.equal) = true; string inferer = 1; - string value = 2 - [(gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", (gogoproto.nullable) = false]; + string value = 2 [ + (gogoproto.customtype) = "github.com/allora-network/allora-chain/math.Dec", + (gogoproto.nullable) = false + ]; } message Forecast { @@ -47,9 +51,7 @@ message Forecast { bytes extra_data = 5; } -message Forecasts { - repeated Forecast forecasts = 1; -} +message Forecasts { repeated Forecast forecasts = 1; } message InferenceForecastBundle { option (gogoproto.equal) = true; @@ -67,6 +69,4 @@ message WorkerDataBundle { string pubkey = 6; } -message WorkerDataBundles { - repeated WorkerDataBundle worker_data_bundles = 1; -} +message WorkerDataBundles { repeated WorkerDataBundle worker_data_bundles = 1; } diff --git a/x/emissions/types/genesis.pb.go b/x/emissions/types/genesis.pb.go index 09c787b67..77e65b957 100644 --- a/x/emissions/types/genesis.pb.go +++ b/x/emissions/types/genesis.pb.go @@ -32,12 +32,15 @@ type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` /// TOPIC - // the next topic id to be used, equal to the number of topics that have been created + // the next topic id to be used, equal to the number of topics that have been + // created NextTopicId uint64 `protobuf:"varint,3,opt,name=nextTopicId,proto3" json:"nextTopicId,omitempty"` - // every topic that has been created indexed by their topicId starting from 1 (0 is reserved for the root network) + // every topic that has been created indexed by their topicId starting from 1 + // (0 is reserved for the root network) Topics []*TopicIdAndTopic `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics,omitempty"` ActiveTopics []uint64 `protobuf:"varint,5,rep,packed,name=activeTopics,proto3" json:"activeTopics,omitempty"` - // every topic that has been churned and ready to be rewarded i.e. reputer losses have been committed + // every topic that has been churned and ready to be rewarded i.e. reputer + // losses have been committed RewardableTopics []uint64 `protobuf:"varint,6,rep,packed,name=rewardableTopics,proto3" json:"rewardableTopics,omitempty"` // for a topic, what is every worker node that has registered to it? TopicWorkers []*TopicAndActorId `protobuf:"bytes,7,rep,name=topicWorkers,proto3" json:"topicWorkers,omitempty"` @@ -74,26 +77,34 @@ type GenesisState struct { TopicStake []*TopicIdAndInt `protobuf:"bytes,22,rep,name=topicStake,proto3" json:"topicStake,omitempty"` // stake reputer placed in topic + delegate stake placed in them, // signalling their total authority on the topic - // (topic Id, reputer) -> stake from reputer on self + stakeFromDelegatorsUponReputer + // (topic Id, reputer) -> stake from reputer on self + + // stakeFromDelegatorsUponReputer StakeReputerAuthority []*TopicIdActorIdInt `protobuf:"bytes,23,rep,name=stakeReputerAuthority,proto3" json:"stakeReputerAuthority,omitempty"` - // map of (topic id, delegator) -> total amount of stake in that topic placed by that delegator + // map of (topic id, delegator) -> total amount of stake in that topic placed + // by that delegator StakeSumFromDelegator []*TopicIdActorIdInt `protobuf:"bytes,24,rep,name=stakeSumFromDelegator,proto3" json:"stakeSumFromDelegator,omitempty"` - // map of (topic id, delegator, reputer) -> amount of stake that has been placed by that delegator on that target + // map of (topic id, delegator, reputer) -> amount of stake that has been + // placed by that delegator on that target DelegatedStakes []*TopicIdDelegatorReputerDelegatorInfo `protobuf:"bytes,25,rep,name=delegatedStakes,proto3" json:"delegatedStakes,omitempty"` - // map of (topic id, reputer) -> total amount of stake that has been placed on that reputer by delegators + // map of (topic id, reputer) -> total amount of stake that has been placed on + // that reputer by delegators StakeFromDelegatorsUponReputer []*TopicIdActorIdInt `protobuf:"bytes,26,rep,name=stakeFromDelegatorsUponReputer,proto3" json:"stakeFromDelegatorsUponReputer,omitempty"` // map of (topicId, reputer) -> share of delegate reward DelegateRewardPerShare []*TopicIdActorIdDec `protobuf:"bytes,27,rep,name=delegateRewardPerShare,proto3" json:"delegateRewardPerShare,omitempty"` // stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, reputer) -> removal information for that reputer + // map of (blockHeight, topic, reputer) -> removal information for that + // reputer StakeRemovalsByBlock []*BlockHeightTopicIdReputerStakeRemovalInfo `protobuf:"bytes,28,rep,name=stakeRemovalsByBlock,proto3" json:"stakeRemovalsByBlock,omitempty"` - // key set of (reputer, topic, blockHeight) to existence of a removal in the forwards map + // key set of (reputer, topic, blockHeight) to existence of a removal in the + // forwards map StakeRemovalsByActor []*ActorIdTopicIdBlockHeight `protobuf:"bytes,29,rep,name=stakeRemovalsByActor,proto3" json:"stakeRemovalsByActor,omitempty"` - // delegate stake removals are double indexed to avoid O(n) lookups when removing stake - // map of (blockHeight, topic, delegator, reputer staked upon) -> (list of reputers delegated upon and info) to have - // stake removed at that block + // delegate stake removals are double indexed to avoid O(n) lookups when + // removing stake map of (blockHeight, topic, delegator, reputer staked upon) + // -> (list of reputers delegated upon and info) to have stake removed at that + // block DelegateStakeRemovalsByBlock []*BlockHeightTopicIdDelegatorReputerDelegateStakeRemovalInfo `protobuf:"bytes,30,rep,name=delegateStakeRemovalsByBlock,proto3" json:"delegateStakeRemovalsByBlock,omitempty"` - // key set of (delegator, reputer, topicId, blockHeight) to existence of a removal in the forwards map + // key set of (delegator, reputer, topicId, blockHeight) to existence of a + // removal in the forwards map DelegateStakeRemovalsByActor []*DelegatorReputerTopicIdBlockHeight `protobuf:"bytes,31,rep,name=delegateStakeRemovalsByActor,proto3" json:"delegateStakeRemovalsByActor,omitempty"` /// MISC GLOBAL STATE // map of (topic, worker) -> inference @@ -112,11 +123,14 @@ type GenesisState struct { AllInferences []*TopicIdBlockHeightInferences `protobuf:"bytes,38,rep,name=allInferences,proto3" json:"allInferences,omitempty"` // map of (topic, block_height) -> Forecast AllForecasts []*TopicIdBlockHeightForecasts `protobuf:"bytes,39,rep,name=allForecasts,proto3" json:"allForecasts,omitempty"` - // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active at that time) + // map of (topic, block_height) -> ReputerValueBundles (1 per reputer active + // at that time) AllLossBundles []*TopicIdBlockHeightReputerValueBundles `protobuf:"bytes,40,rep,name=allLossBundles,proto3" json:"allLossBundles,omitempty"` - // map of (topic, block_height) -> ValueBundle (1 network wide bundle per timestep) + // map of (topic, block_height) -> ValueBundle (1 network wide bundle per + // timestep) NetworkLossBundles []*TopicIdBlockHeightValueBundles `protobuf:"bytes,41,rep,name=networkLossBundles,proto3" json:"networkLossBundles,omitempty"` - // Percentage of all rewards, paid out to staked reputers, during the previous reward cadence. Used by mint module + // Percentage of all rewards, paid out to staked reputers, during the previous + // reward cadence. Used by mint module PreviousPercentageRewardToStakedReputers github_com_allora_network_allora_chain_math.Dec `protobuf:"bytes,42,opt,name=previousPercentageRewardToStakedReputers,proto3,customtype=github.com/allora-network/allora-chain/math.Dec" json:"previousPercentageRewardToStakedReputers"` /// NONCES // map of (topic) -> unfulfilled nonces @@ -124,14 +138,18 @@ type GenesisState struct { // map of (topic) -> unfulfilled nonces UnfulfilledReputerNonces []*TopicIdAndReputerRequestNonces `protobuf:"bytes,44,rep,name=unfulfilledReputerNonces,proto3" json:"unfulfilledReputerNonces,omitempty"` /// REGRETS - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other inferers + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other inferers LatestInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,45,rep,name=latestInfererNetworkRegrets,proto3" json:"latestInfererNetworkRegrets,omitempty"` - // map of (topic, worker) -> regret of worker from comparing loss of worker relative to loss of other forecasters + // map of (topic, worker) -> regret of worker from comparing loss of worker + // relative to loss of other forecasters LatestForecasterNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,46,rep,name=latestForecasterNetworkRegrets,proto3" json:"latestForecasterNetworkRegrets,omitempty"` - // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster loss from comparing one-in loss with - // all network inferer (3rd index) regrets L_ij made under the regime of the one-in forecaster (2nd index) + // map of (topic, forecaster, inferer) -> R^+_{ij_kk} regret of forecaster + // loss from comparing one-in loss with all network inferer (3rd index) + // regrets L_ij made under the regime of the one-in forecaster (2nd index) LatestOneInForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,47,rep,name=latestOneInForecasterNetworkRegrets,proto3" json:"latestOneInForecasterNetworkRegrets,omitempty"` - // the forecaster (2nd index) regrets made under the regime of the same forecaster as a one-in forecaster + // the forecaster (2nd index) regrets made under the regime of the same + // forecaster as a one-in forecaster LatestNaiveInfererNetworkRegrets []*TopicIdActorIdTimeStampedValue `protobuf:"bytes,48,rep,name=latestNaiveInfererNetworkRegrets,proto3" json:"latestNaiveInfererNetworkRegrets,omitempty"` LatestOneOutInfererInfererNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,49,rep,name=latestOneOutInfererInfererNetworkRegrets,proto3" json:"latestOneOutInfererInfererNetworkRegrets,omitempty"` LatestOneOutInfererForecasterNetworkRegrets []*TopicIdActorIdActorIdTimeStampedValue `protobuf:"bytes,50,rep,name=latestOneOutInfererForecasterNetworkRegrets,proto3" json:"latestOneOutInfererForecasterNetworkRegrets,omitempty"` diff --git a/x/emissions/types/params.pb.go b/x/emissions/types/params.pb.go index c2acb466e..9a685677b 100644 --- a/x/emissions/types/params.pb.go +++ b/x/emissions/types/params.pb.go @@ -82,7 +82,8 @@ type Params struct { EpsilonReputer github_com_allora_network_allora_chain_math.Dec `protobuf:"bytes,40,opt,name=epsilon_reputer,json=epsilonReputer,proto3,customtype=github.com/allora-network/allora-chain/math.Dec" json:"epsilon_reputer"` // close proximities HalfMaxProcessStakeRemovalsEndBlock uint64 `protobuf:"varint,42,opt,name=half_max_process_stake_removals_end_block,json=halfMaxProcessStakeRemovalsEndBlock,proto3" json:"half_max_process_stake_removals_end_block,omitempty"` - // once for DelegateStakeRemovals, so actual max is this number times two + // Applied twice once for stakeRemovals and once for + // DelegateStakeRemovals, so actual max is this number times two EpsilonSafeDiv github_com_allora_network_allora_chain_math.Dec `protobuf:"bytes,43,opt,name=epsilon_safe_div,json=epsilonSafeDiv,proto3,customtype=github.com/allora-network/allora-chain/math.Dec" json:"epsilon_safe_div"` /// a small tolerance quantity used to cap division by zero DataSendingFee cosmossdk_io_math.Int `protobuf:"bytes,44,opt,name=data_sending_fee,json=dataSendingFee,proto3,customtype=cosmossdk.io/math.Int" json:"data_sending_fee"` diff --git a/x/mint/Makefile b/x/mint/Makefile index ee1e0fd2e..700c7ed7d 100644 --- a/x/mint/Makefile +++ b/x/mint/Makefile @@ -1,5 +1,5 @@ #!/usr/bin/make -f -.DEFAULT_GOAL := build +.DEFAULT_GOAL := proto-all DOCKER := $(shell which docker)