Skip to content

Commit

Permalink
feat(api): add order_migrations argument in runtime.Module config (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Dec 8, 2022
1 parent 755c99a commit a4d885f
Show file tree
Hide file tree
Showing 16 changed files with 307 additions and 158 deletions.
192 changes: 165 additions & 27 deletions api/cosmos/app/runtime/v1alpha1/module.pulsar.go

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions api/cosmos/consensus/v1/query.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/cosmos/consensus/v1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions proto/cosmos/app/runtime/v1alpha1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ message Module {
// override_store_keys is an optional list of overrides for the module store keys
// to be used in keeper construction.
repeated StoreKeyConfig override_store_keys = 6;

// order_migrations defines the order in which module migrations are performed.
// If this is left empty, it uses the default migration order.
// https://pkg.go.dev/github.com/cosmos/[email protected]/types/module#DefaultMigrationsOrder
repeated string order_migrations = 7;
}

// StoreKeyConfig may be supplied to override the default module store key, which
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/base/store/snapshots/v1beta1/snapshot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message Snapshot {

// Metadata contains SDK-specific snapshot metadata.
message Metadata {
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
}

// SnapshotItem is an item contained in a rootmulti.Store snapshot.
Expand Down
22 changes: 11 additions & 11 deletions proto/cosmos/base/store/v1beta1/listening.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ message StoreKVPair {
// BlockMetadata contains all the abci event data of a block
// the file streamer dump them into files together with the state changes.
message BlockMetadata {
// DeliverTx encapulate deliver tx request and response.
message DeliverTx {
tendermint.abci.RequestDeliverTx request = 1;
tendermint.abci.ResponseDeliverTx response = 2;
}
tendermint.abci.RequestBeginBlock request_begin_block = 1;
tendermint.abci.ResponseBeginBlock response_begin_block = 2;
repeated DeliverTx deliver_txs = 3;
tendermint.abci.RequestEndBlock request_end_block = 4;
tendermint.abci.ResponseEndBlock response_end_block = 5;
tendermint.abci.ResponseCommit response_commit = 6;
// DeliverTx encapulate deliver tx request and response.
message DeliverTx {
tendermint.abci.RequestDeliverTx request = 1;
tendermint.abci.ResponseDeliverTx response = 2;
}
tendermint.abci.RequestBeginBlock request_begin_block = 1;
tendermint.abci.ResponseBeginBlock response_begin_block = 2;
repeated DeliverTx deliver_txs = 3;
tendermint.abci.RequestEndBlock request_end_block = 4;
tendermint.abci.ResponseEndBlock response_end_block = 5;
tendermint.abci.ResponseCommit response_commit = 6;
}
8 changes: 4 additions & 4 deletions proto/cosmos/evidence/v1beta1/evidence.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ message Equivocation {
option (gogoproto.equal) = false;

// height is the equivocation height.
int64 height = 1;
int64 height = 1;

// time is the equivocation time.
google.protobuf.Timestamp time = 2
google.protobuf.Timestamp time = 2
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];

// power is the equivocation validator power.
int64 power = 3;
int64 power = 3;

// consensus_address is the equivocation validator consensus address.
string consensus_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
Expand Down
6 changes: 3 additions & 3 deletions proto/cosmos/evidence/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ message MsgSubmitEvidence {
option (gogoproto.goproto_getters) = false;

// submitter is the signer account address of evidence.
string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// evidence defines the evidence of misbehavior.
google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"];
google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"];
}

// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type.
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/gov/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ message Module {
go_import: "github.com/cosmos/cosmos-sdk/x/gov"
};

// max_metadata_len defines the maximum proposal metadata length.
// max_metadata_len defines the maximum proposal metadata length.
// Defaults to 255 if not explicitly set.
uint64 max_metadata_len = 1;

Expand Down
46 changes: 23 additions & 23 deletions proto/cosmos/gov/v1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,52 +32,52 @@ message WeightedVoteOption {
VoteOption option = 1;

// weight is the vote weight associated with the vote option.
string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"];
string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"];
}

// Deposit defines an amount deposited by an account address to an active
// proposal.
message Deposit {
// proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1;
uint64 proposal_id = 1;

// depositor defines the deposit addresses from the proposals.
string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// amount to be deposited by depositor.
repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// Proposal defines the core field members of a governance proposal.
message Proposal {
// id defines the unique id of the proposal.
uint64 id = 1;
uint64 id = 1;

// messages are the arbitrary messages to be executed if the proposal passes.
repeated google.protobuf.Any messages = 2;

// status defines the proposal status.
ProposalStatus status = 3;
ProposalStatus status = 3;

// final_tally_result is the final tally result of the proposal. When
// querying a proposal via gRPC, this field is not populated until the
// proposal's voting period has ended.
TallyResult final_tally_result = 4;
TallyResult final_tally_result = 4;

// submit_time is the time of proposal submission.
google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true];

// deposit_end_time is the end time for deposition.
google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true];

// total_deposit is the total deposit on the proposal.
repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// voting_start_time is the starting time to vote on a proposal.
google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true];

// voting_end_time is the end time of voting on a proposal.
google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true];

// metadata is any arbitrary metadata attached to the proposal.
string metadata = 10;
Expand Down Expand Up @@ -107,11 +107,11 @@ enum ProposalStatus {
// TallyResult defines a standard tally for a governance proposal.
message TallyResult {
// yes_count is the number of yes votes on a proposal.
string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"];
string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"];
// abstain_count is the number of abstain votes on a proposal.
string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"];
string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"];
// no_count is the number of no votes on a proposal.
string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"];
string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"];
// no_with_veto_count is the number of no with veto votes on a proposal.
string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"];
}
Expand All @@ -123,8 +123,8 @@ message Vote {
uint64 proposal_id = 1;

// voter is the voter address of the proposal.
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

reserved 3;

// options is the weighted vote options.
Expand Down
42 changes: 21 additions & 21 deletions proto/cosmos/gov/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ message MsgSubmitProposal {
option (amino.name) = "cosmos-sdk/v1/MsgSubmitProposal";

// messages are the arbitrary messages to be executed if proposal passes.
repeated google.protobuf.Any messages = 1;
repeated google.protobuf.Any messages = 1;

// initial_deposit is the deposit value that must be paid at proposal submission.
repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// proposer is the account address of the proposer.
string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// metadata is any arbitrary metadata attached to the proposal.
string metadata = 4;
}
Expand Down Expand Up @@ -85,16 +85,16 @@ message MsgVote {
option (amino.name) = "cosmos-sdk/v1/MsgVote";

// proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];

// voter is the voter address for the proposal.
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// option defines the vote option.
VoteOption option = 3;
VoteOption option = 3;

// metadata is any arbitrary metadata attached to the Vote.
string metadata = 4;
string metadata = 4;
}

// MsgVoteResponse defines the Msg/Vote response type.
Expand All @@ -106,16 +106,16 @@ message MsgVoteWeighted {
option (amino.name) = "cosmos-sdk/v1/MsgVoteWeighted";

// proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];

// voter is the voter address for the proposal.
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// options defines the weighted vote options.
repeated WeightedVoteOption options = 3;
repeated WeightedVoteOption options = 3;

// metadata is any arbitrary metadata attached to the VoteWeighted.
string metadata = 4;
string metadata = 4;
}

// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
Expand All @@ -127,11 +127,11 @@ message MsgDeposit {
option (amino.name) = "cosmos-sdk/v1/MsgDeposit";

// proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true];

// depositor defines the deposit addresses from the proposals.
string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// amount to be deposited by depositor.
repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
Expand Down
Loading

0 comments on commit a4d885f

Please sign in to comment.