Skip to content
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

Merged
merged 4 commits into from
Mar 8, 2022

Conversation

evan-forbes
Copy link
Member

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 ValsetConfirms 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.

@evan-forbes evan-forbes requested a review from rach-id March 7, 2022 05:11
@evan-forbes evan-forbes self-assigned this Mar 7, 2022
Comment on lines +49 to +52
// Confirms: k.GetDataCommitmentConfirmsByCommitment(
// sdk.UnwrapSDKContext(ctx),
// request.Commitment,
// ),
Copy link
Member Author

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.

@evan-forbes evan-forbes changed the title Record validator set during EndBlock Record validator set during EndBlock for QGB orchestrator Mar 7, 2022
Copy link
Member

@adlerjohn adlerjohn left a 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";
Copy link
Member

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?

Copy link
Member

@rach-id rach-id left a 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;
}
Copy link
Member

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;
}
Copy link
Member

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
Copy link
Member

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?

@rach-id
Copy link
Member

rach-id commented Mar 8, 2022

@evan-forbes Can we merge this so that I include this stuff for the tests also ? Thanks

@evan-forbes evan-forbes merged commit 0171fff into qgb-integration Mar 8, 2022
@rach-id rach-id deleted the evan/add-valset branch April 14, 2022 09:17
rach-id pushed a commit to rach-id/celestia-app that referenced this pull request May 9, 2022
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants