Skip to content

Commit fbf4ee9

Browse files
committed
feat(testutil/validatormock): port propose.go (block proposal + builder reg)
Ports `propose_block` and `register` from `charon/testutil/validatormock/propose.go`. Versioned dispatch matches the Go switch on `eth2spec.DataVersion`; blinded path is gated on the proposal's `execution_payload_blinded` flag (the Pluto generated client's analog of Go's `block.Blinded`). Phase0/Altair branches return `Error::UnsupportedVariant` until the Pluto typed surface for them is ready; Bellatrix .. Fulu (full + blinded) are implemented in full. `register` ports the *intended* behaviour of Go's `Register`: it switches on the input registration's `Version` (Go switches on the zero-value-initialized signed registration version, which always falls through to V1 — a Go quirk noted inline). Tests mirror `TestProposeBlock` and `TestProposeBlindedBlock`; variants whose random fixtures don't yet exist in `pluto-testutil::random` are `#[ignore]`d with a TODO pointing at the missing helper.
1 parent 03c48a9 commit fbf4ee9

2 files changed

Lines changed: 922 additions & 0 deletions

File tree

crates/testutil/src/validatormock/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
pub mod capture;
99
pub mod error;
1010
pub mod meta;
11+
pub mod propose;
1112
pub mod sign;
1213
pub mod validators;
1314

1415
pub use capture::{EndpointMatch, SubmissionCapture};
1516
pub use error::{Error, Result, SignError};
1617
pub use meta::{MetaEpoch, MetaSlot, SpecMeta};
18+
pub use propose::{VersionedValidatorRegistration, propose_block, register};
1719
pub use sign::{Sign, SignFunc, Signer};
1820
pub use validators::{ActiveValidators, active_validators};

0 commit comments

Comments
 (0)