pub trait PublicKeyLookup {
// Required method
fn pubkey_of(&self, index: u32) -> Option<&PublicKey>;
}Expand description
Validator-index → BLS public-key lookup.
Traces to SPEC §15.2, catalogue row DSL-138.
§Consumers
IndexedAttestation::verify_signature(DSL-006) materializes the pubkey set for the aggregate BLS verify by looking up everyattesting_indices[i].verify_proposer_slashing/verify_invalid_block(DSL-013 / DSL-018) fetch the single proposer pubkey per offense.
§Return semantics
pubkey_of(idx) returns None when idx does not correspond to a
registered validator — the caller is responsible for translating
that to a domain-appropriate error. For BLS verify, a missing
pubkey collapses to aggregate-verify failure (DSL-006), which
matches the security model: we do not want to distinguish “unknown
validator” from “bad signature” at this layer because both are
equally invalid evidence.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T: ValidatorView + ?Sized> PublicKeyLookup for T
Blanket: any ValidatorView is a PublicKeyLookup. DSL-138.
Delegates pubkey_of(idx) to self.get(idx).map(|e| e.public_key()). Keeps the BLS-aggregate verify path in
DSL-006 + DSL-013 from having to pass two trait-object
pointers when one suffices.