Skip to content

Add proof bundles - #1204

Open
0xfornax wants to merge 1 commit into
masterfrom
gloas-proofs-v2
Open

Add proof bundles#1204
0xfornax wants to merge 1 commit into
masterfrom
gloas-proofs-v2

Conversation

@0xfornax

@0xfornax 0xfornax commented Sep 1, 2026

Copy link
Copy Markdown
Member

Moves megapool beacon proofs onto versioned, ABI-encoded proof bundles so Smart Node matches BeaconStateVerifier on v1.4.1-dev / Gloas.

Stake, notify-exit, not-exit, dissolve-with-proof, and notify final balance now take (proofVersion, proofData) instead of separate proof structs. Call sites encode ValidatorProofBundleV1 (or final-balance v1/v2) before submitting. Final-balance v2 also packs next-withdrawal-index and validator-balance proofs.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Coverage Report

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merging this branch changes the coverage (1 decrease, 2 increase)

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/bindings/megapool 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool/api/megapool 0.08% (+0.00%) 👍
github.com/rocket-pool/smartnode/rocketpool/node 0.52% (+0.00%) 👍
github.com/rocket-pool/smartnode/rocketpool/watchtower 0.75% (-0.00%) 👎
github.com/rocket-pool/smartnode/shared/services 0.25% (+0.00%) 👍
github.com/rocket-pool/smartnode/shared/services/beacon 9.00% (-0.52%) 👎
github.com/rocket-pool/smartnode/shared/services/beacon/client 0.41% (-0.00%) 👎
github.com/rocket-pool/smartnode/shared/types/eth2/fork/electra 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/fulu 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/gloas 2.00% (+0.02%) 👍
github.com/rocket-pool/smartnode/shared/types/eth2/generic 1.85% (+0.00%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/bindings/megapool/megapool-manager.go 0.00% (ø) 2989 0 2989
github.com/rocket-pool/smartnode/bindings/megapool/proof-bundle.go 0.00% (ø) 152 (+152) 0 152 (+152)
github.com/rocket-pool/smartnode/rocketpool/api/megapool/dissolve-with-proof.go 0.00% (ø) 3331 (+154) 0 3331 (+154)
github.com/rocket-pool/smartnode/rocketpool/api/megapool/notify-final-balance.go 0.00% (ø) 3171 (-1966) 0 3171 (-1966)
github.com/rocket-pool/smartnode/rocketpool/api/megapool/notify-validator-exit.go 0.00% (ø) 4041 (+150) 0 4041 (+150)
github.com/rocket-pool/smartnode/rocketpool/api/megapool/stake.go 0.00% (ø) 3381 (+154) 0 3381 (+154)
github.com/rocket-pool/smartnode/rocketpool/node/defend-challenge-exit.go 0.00% (ø) 3115 (+74) 0 3115 (+74)
github.com/rocket-pool/smartnode/rocketpool/node/notify-final-balance.go 0.00% (ø) 3299 (-562) 0 3299 (-562)
github.com/rocket-pool/smartnode/rocketpool/node/notify-validator-exit.go 0.00% (ø) 3775 (+74) 0 3775 (+74)
github.com/rocket-pool/smartnode/rocketpool/node/stake-megapool-validator.go 0.00% (ø) 3514 (+75) 0 3514 (+75)
github.com/rocket-pool/smartnode/rocketpool/watchtower/dissolve-invalid-credentials.go 0.00% (ø) 2639 (+100) 0 2639 (+100)
github.com/rocket-pool/smartnode/shared/services/beacon/client/std-http-client.go 0.00% (ø) 15224 (+76) 0 15224 (+76)
github.com/rocket-pool/smartnode/shared/services/beacon/client/types.go 2.63% (ø) 456 12 444
github.com/rocket-pool/smartnode/shared/services/beacon/config.go 9.27% (-0.75%) 1424 (+66) 132 (-4) 1292 (+70) 👎
github.com/rocket-pool/smartnode/shared/services/megapools.go 0.59% (+0.00%) 20942 (-90) 124 20818 (-90) 👍
github.com/rocket-pool/smartnode/shared/types/eth2/fork/electra/state_electra.go 0.00% (ø) 4328 (+367) 0 4328 (+367)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/fulu/state_fulu.go 0.00% (ø) 4567 (+367) 0 4567 (+367)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/gloas/state_gloas.go 5.18% (+0.11%) 5651 (+783) 293 (+46) 5358 (+737) 👍
github.com/rocket-pool/smartnode/shared/types/eth2/generic/state.go 0.00% (ø) 0 0 0
github.com/rocket-pool/smartnode/shared/types/eth2/generic/types.go 12.00% (+12.00%) 25 (+25) 3 (+3) 22 (+22) 🎉

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/rocket-pool/smartnode/bindings/megapool/proof-bundle_test.go
  • github.com/rocket-pool/smartnode/shared/types/eth2/fork/gloas/gloas_proofs_test.go
  • github.com/rocket-pool/smartnode/shared/types/eth2/generic/gindex_test.go

Comment on lines +17 to +34
type ValidatorProofBundleV1 struct {
ValidatorProof ValidatorProof
SlotProof SlotProof
}

type FinalBalanceProofBundleV1 struct {
WithdrawalProof WithdrawalProof
ValidatorProof ValidatorProof
SlotProof SlotProof
}

type FinalBalanceProofBundleV2 struct {
WithdrawalProof WithdrawalProof
ValidatorProof ValidatorProof
SlotProof SlotProof
PreviousNextWithdrawalIndexProof NextWithdrawalIndexProof
ValidatorBalanceProof ValidatorBalanceProof
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these types have json tags? They seem like useful artifacts to be able to serialize on the network or to disk.

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.

2 participants