mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
614d4e40fe
* Update cometbft, cosmos, ethermint, and ibc-go * Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft * Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db * Replace gogo/protobuf with cosmos/gogoproto & simapp replacement * Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims * Remove no longer used simulations * Replace ibchost with ibcexported See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants * Add new consensus params keeper * Add consensus keeper to blockers * Fix keeper and module issues in app.go * Add IsSendEnabledCoins and update SetParams interface changes * Fix protobuf build for cosmos 47 (#1800) * fix cp errors by using -f; fix lint by only linting our proto dir; and use proofs.proto directly from ics23 for ibc-go v7 * run proto-all; commit updated third party deps and swagger changes * regenerate proto files * use correct gocosmos build plugin for buf * re-gen all protobuf files to update paths for new gocosmos plugin * update protoc and buf to latest versions * fix staking keeper issues in app.go * update tally handler for gov changes * chain id fix and flag fixes * update deps for cometbft 47.7 upgrade * remove all module legacy queriers * update stakingKeeper to pointer * Replace ModuleCdc from govv1beta1 to govcodec * remove simulations * abci.LastCommitInfo → abci.CommitInfo * Remove unused code in keys.go * simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi * Fix chain id issues in tests * Fix remaining unit test issues * Update changelog for upgrade * Fix e2e tests using updated kvtool * Update protonet to v47 compatible genesis * Bump cometbft-db to v0.9.1-kava.1 * Update kvtool * Remove extra changelog * Fix merged rocksdb issues * go mod cleanup * Bump cometbft-db to v9 and go to 1.21 * Bump rocksdb version to v8.10.0 * Update kvtool to latest version * Update gin to v1.9.0 * Use ibctm.ModuleName in app_test * Fallback to genesis chain id instead of client toml * Remove all simulations * Fix cdp migrations issue with v47 * Update dependencies to correct tags --------- Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
156 lines
6.5 KiB
Protocol Buffer
156 lines
6.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package cosmos.distribution.v1beta1;
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
|
option (gogoproto.equal_all) = true;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "cosmos/distribution/v1beta1/distribution.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "amino/amino.proto";
|
|
|
|
// DelegatorWithdrawInfo is the address for where distributions rewards are
|
|
// withdrawn to by default this struct is only used at genesis to feed in
|
|
// default withdraw addresses.
|
|
message DelegatorWithdrawInfo {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// delegator_address is the address of the delegator.
|
|
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// withdraw_address is the address to withdraw the delegation rewards to.
|
|
string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
}
|
|
|
|
// ValidatorOutstandingRewardsRecord is used for import/export via genesis json.
|
|
message ValidatorOutstandingRewardsRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// outstanding_rewards represents the outstanding rewards of a validator.
|
|
repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
|
(gogoproto.nullable) = false,
|
|
(amino.dont_omitempty) = true
|
|
];
|
|
}
|
|
|
|
// ValidatorAccumulatedCommissionRecord is used for import / export via genesis
|
|
// json.
|
|
message ValidatorAccumulatedCommissionRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// accumulated is the accumulated commission of a validator.
|
|
ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// ValidatorHistoricalRewardsRecord is used for import / export via genesis
|
|
// json.
|
|
message ValidatorHistoricalRewardsRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// period defines the period the historical rewards apply to.
|
|
uint64 period = 2;
|
|
|
|
// rewards defines the historical rewards of a validator.
|
|
ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// ValidatorCurrentRewardsRecord is used for import / export via genesis json.
|
|
message ValidatorCurrentRewardsRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// rewards defines the current rewards of a validator.
|
|
ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// DelegatorStartingInfoRecord used for import / export via genesis json.
|
|
message DelegatorStartingInfoRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// delegator_address is the address of the delegator.
|
|
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// starting_info defines the starting info of a delegator.
|
|
DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// ValidatorSlashEventRecord is used for import / export via genesis json.
|
|
message ValidatorSlashEventRecord {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// validator_address is the address of the validator.
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
// height defines the block height at which the slash event occurred.
|
|
uint64 height = 2;
|
|
// period is the period of the slash event.
|
|
uint64 period = 3;
|
|
// validator_slash_event describes the slash event.
|
|
ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// GenesisState defines the distribution module's genesis state.
|
|
message GenesisState {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// params defines all the parameters of the module.
|
|
Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the fee pool at genesis.
|
|
FeePool fee_pool = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the delegator withdraw infos at genesis.
|
|
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the previous proposer at genesis.
|
|
string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// fee_pool defines the outstanding rewards of all validators at genesis.
|
|
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the accumulated commissions of all validators at genesis.
|
|
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the historical rewards of all validators at genesis.
|
|
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the current rewards of all validators at genesis.
|
|
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the delegator starting infos at genesis.
|
|
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// fee_pool defines the validator slash events at genesis.
|
|
repeated ValidatorSlashEventRecord validator_slash_events = 10
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|