Skip to main content

verify_data_update

Function verify_data_update 

Source
pub fn verify_data_update(
    payload: &DataUpdate,
    raw_value: &[u8],
    node_count: u32,
    redundancy_buffer: u8,
    ordered_signers: &[SignerXy],
) -> Result<(), DataUpdateError>
Expand description

Verify a full DataUpdate payload against caller-supplied signer pubkeys.

§Caller contract

  • raw_value is the raw feed value carried alongside the payload; it is hashed into the EVM-compatible message (keccak256(raw_value) + length). A wrong raw value fails signature verification.
  • node_count is the registry node count for payload.registry_version.
  • ordered_signers holds one (x, y) per set bit of payload.signers_bitmap, in ascending bit-index order — the same order EVM Validator.verify combines pubkeys. The caller is responsible for resolving the authentic pubkeys; this function trusts the supplied set.

Re-derives the selection bitmap internally and enforces signers ⊆ selection. Checks run in the same order as the on-chain monolith: scalar validity → signer threshold → selection subset → signer-count match → coalition reconstruction → message hash → Schnorr recovery.