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

finality: sudo message for BeginBlock #8

Merged
merged 13 commits into from
Jun 10, 2024
Merged

Conversation

SebastianElvis
Copy link
Collaborator

@SebastianElvis SebastianElvis commented Jun 4, 2024

Closes #2

This PR provides sudo message BeginBlock for Babylon contracts. The sudo message will be sent to BTC staking contract upon each BeginBlock.

To test, run make test-e2e. Note that the wasm files are generated on https://github.com/babylonchain/babylon-contract/pull/123

@SebastianElvis SebastianElvis marked this pull request as ready for review June 7, 2024 02:05
Copy link

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

tests/testdata/version.txt Outdated Show resolved Hide resolved
Comment on lines +23 to +24
// UpdateParams updates the params.
func (ms msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Shouldn't this belong to a different / independent PR?

Or this is needed to get the contracts addresses?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is necessary as eventually one might need to trigger gov prop to call this message in order to set up the Babylon contract addresses. It's not a big change -- most things about this message handler are copied from Babylon e.g., https://github.com/babylonchain/babylon/blob/2a7c91d6f1649912f14667d3a3ee6a2c1792c3d9/x/btccheckpoint/keeper/msg_server.go#L97-L114

x/babylon/contract/out_message.go Outdated Show resolved Hide resolved
@SebastianElvis
Copy link
Collaborator Author

CI failed due to config reasons. Will fix in separate PRs

@SebastianElvis SebastianElvis merged commit 22717cd into main Jun 10, 2024
1 of 4 checks passed
@SebastianElvis SebastianElvis deleted the beginblock-sudomsg branch June 10, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BeginBlock for babylon-contract
2 participants