-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(consensus): add cometInfo to consensus #20615
Changes from 6 commits
35ed5bb
5ac07f7
430fa04
b699ece
f39637b
51247f7
f68c482
bfa2eff
fb84d72
445c177
6317d6f
7d4e4b2
314c3a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
// Since: cosmos-sdk 0.51 | ||
// Since: cosmos-sdk 0.52 | ||
syntax = "proto3"; | ||
package cosmos.consensus.v1; | ||
|
||
import "cometbft/types/v1/params.proto"; | ||
import "cometbft/abci/v1/types.proto"; | ||
|
||
option go_package = "cosmossdk.io/x/consensus/types"; | ||
|
||
// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. | ||
message ConsensusMsgParams { | ||
// params defines the x/consensus parameters to be passed from comet. | ||
// | ||
// NOTE: All parameters must be supplied. | ||
cometbft.types.v1.VersionParams version = 1; | ||
cometbft.types.v1.BlockParams block = 2; | ||
cometbft.types.v1.EvidenceParams evidence = 3; | ||
cometbft.types.v1.ValidatorParams validator = 4; | ||
cometbft.types.v1.ABCIParams abci = 5 [deprecated = true]; | ||
cometbft.types.v1.SynchronyParams synchrony = 6; | ||
cometbft.types.v1.FeatureParams feature = 7; | ||
// CometInfo defines the structure of the x/consensus module's comet info. | ||
message CometInfo { | ||
repeated cometbft.abci.v1.Misbehavior evidence = 1; | ||
bytes validators_hash = 2; | ||
bytes proposer_address = 3; | ||
cometbft.abci.v1.CommitInfo last_commit = 4; | ||
} | ||
|
||
// ConsensusMsgParamsResponse defines the response structure for executing a | ||
// ConsensusMsgParams message. | ||
message ConsensusMsgParamsResponse {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import "amino/amino.proto"; | |
import "cosmos_proto/cosmos.proto"; | ||
import "cosmos/msg/v1/msg.proto"; | ||
import "cometbft/types/v1/params.proto"; | ||
import "cometbft/abci/v1/types.proto"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip Codebase Verification The
Please update the import path to the correct location based on the actual file structure. Analysis chainEnsure the import path for Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the import path for types.proto in the tx.proto file.
# Test: Search for the import path in the repository. Expect: Path exists.
fd --type file 'types.proto' | grep 'cometbft/abci/v1'
Length of output: 52 Script: #!/bin/bash
# Description: Verify the existence of types.proto in the repository and identify its correct path.
# Test: Search for any occurrences of types.proto in the repository.
fd --type file 'types.proto'
Length of output: 221 Script: #!/bin/bash
# Description: Verify the content of the identified types.proto files to check for the correct import path.
# Test: Display the content of the identified types.proto files.
cat proto/cosmos/base/tendermint/v1beta1/types.proto
cat x/circuit/proto/cosmos/circuit/v1/types.proto
cat x/group/proto/cosmos/group/v1/types.proto
cat x/protocolpool/proto/cosmos/protocolpool/v1/types.proto
Length of output: 19813 |
||
|
||
option go_package = "cosmossdk.io/x/consensus/types"; | ||
|
||
|
@@ -18,6 +19,8 @@ service Msg { | |
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { | ||
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; | ||
} | ||
|
||
rpc CometInfo(MsgCometInfo) returns (MsgCometInfoResponse); | ||
} | ||
|
||
// MsgUpdateParams is the Msg/UpdateParams request type. | ||
|
@@ -46,3 +49,27 @@ message MsgUpdateParams { | |
// MsgUpdateParamsResponse defines the response structure for executing a | ||
// MsgUpdateParams message. | ||
message MsgUpdateParamsResponse {} | ||
|
||
// MsgCometInfo is the Msg/CometInfo request type. | ||
message MsgCometInfo { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo"; | ||
|
||
// authority is the address that controls the module (defaults to x/gov unless overwritten). | ||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
|
||
// evidence is the misbehaviour evidence to submit. | ||
repeated cometbft.abci.v1.Misbehavior evidence = 2; | ||
|
||
// validators_hash is the hash of the current validator set. | ||
bytes validators_hash = 3; | ||
|
||
// proposer_address is the address of the current proposer. | ||
bytes proposer_address = 4; | ||
|
||
// last_commit is the last commit info. | ||
cometbft.abci.v1.CommitInfo last_commit = 5; | ||
} | ||
|
||
// MsgCometInfoResponse defines the response | ||
message MsgCometInfoResponse {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The import path
cometbft/abci/v1/types.proto
inconsensus.proto
is incorrect or the file is missing from the repository. Please verify the correct path or ensure that the required file is added to the repository.x/consensus/proto/cosmos/consensus/v1/consensus.proto
Analysis chain
Ensure the import path is correctly specified and accessible.
Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 52
Script:
Length of output: 221
Script:
Length of output: 42