-
Notifications
You must be signed in to change notification settings - Fork 267
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
Record validator set during EndBlock
for QGB orchestrator
#232
Conversation
// Confirms: k.GetDataCommitmentConfirmsByCommitment( | ||
// sdk.UnwrapSDKContext(ctx), | ||
// request.Commitment, | ||
// ), |
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.
commented this out for now until we figure out an ideal way of querying.
EndBlock
EndBlock
for QGB orchestrator
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.
Some nits
@@ -1,7 +1,26 @@ | |||
syntax = "proto3"; | |||
package qgb; | |||
|
|||
import "gogoproto/gogo.proto"; |
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.
Nit, but can you format the alignment for this file, and add a newline at the end?
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.
Good job 👍 LGTM
message GravityNonces { | ||
// the nonce of the last generated validator set | ||
uint64 latest_valset_nonce = 1; | ||
} |
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.
Can you add a new line here ? that's how it is in Github :D
uint64 nonce = 1; | ||
repeated BridgeValidator members = 2 [(gogoproto.nullable) = false]; | ||
uint64 height = 3; | ||
} |
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.
same, new line
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
) | ||
|
||
// EndBlocker is called at the end of every block |
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.
Will we be sending the data root of every block ? not a commitment over a set of data roots?
@evan-forbes Can we merge this so that I include this stuff for the tests also ? Thanks |
…org#232) * add valset and params * create new val set request if the voting power has changed enough at the end of the block * comment out broken query method we don't strictly need yet * delete some comments
Description
Adds changes needed to record the validator set at the end of the block. We technically don't need this for MVP, as the orchestrator could keep track of changes to the validator set and submit
ValsetConfirm
s on its own. However, we will need this for slashing in the future, and its makes writing the orchestrator significantly easier, so adding it now.