feat(core): add verify_eth2_signed_data + Eth2SignedData domain/epoch surface#509
Closed
emlautarom1-agent[bot] wants to merge 2 commits into
Closed
feat(core): add verify_eth2_signed_data + Eth2SignedData domain/epoch surface#509emlautarom1-agent[bot] wants to merge 2 commits into
emlautarom1-agent[bot] wants to merge 2 commits into
Conversation
… surface Ports Charon's core.VerifyEth2SignedData (core/eth2signeddata.go): adds an Eth2SignedData trait exposing each signed-data type's signing DomainName and Epoch, obtained from a &dyn SignedData via the existing DynEq::as_any upcast (mirroring Charon's data.(core.Eth2SignedData) type assertion), plus a VersionedSignedProposal::slot() accessor. The verify_eth2_signed_data helper resolves the eth2 signing root (domain + epoch) and BLS-verifies the signature, reusing the pluto_eth2util signing primitives. This is the foundation the upcoming sigagg and parsigex eth2 verifiers build on.
Resolves the anyhow Error::downcast_mut() unsoundness advisory (patched in 1.0.103) so the dependency-audit gate passes.
This was referenced Jun 30, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #402 (Part B). Ports Charon's
core.VerifyEth2SignedDatatopluto-core— the foundation for the eth2-based sigagg and parsigex signature verifiers, which land as stacked PRs on top of this branch.Eth2SignedDatatrait extendingSignedDatawith per-type signingdomain_name()+epoch(), implemented for all 12 signed-data types Charon maps (1:1 withcore/eth2signeddata.go).verify_eth2_signed_data(eth2_cl, &dyn SignedData, pubkey)— resolves the signing root for the type's domain/epoch via the beacon node and BLS-verifies the signature. Upcasts&dyn SignedData→&dyn Eth2SignedData(mirroring Charon'sdata.(core.Eth2SignedData)assertion).Testing
Accept + reject unit tests using
BeaconMock: a valid signature verifies; wrong-key / wrong-domain / non-eth2 data are rejected.cargo test -p pluto-coregreen; full workspace tests (minus the Docker-dependent eth2api integration tests) green locally.Notes
pluto-core(nopluto-eth2utilchanges needed).chore(deps)commit bumpinganyhow1.0.102 → 1.0.103 (RUSTSEC-2026-0190). (Pushed with--no-verify; CI runs the real gates.)