Skip to main content

Crate molpha_verifier

Crate molpha_verifier 

Source
Expand description

Molpha DataUpdate aggregate-Schnorr verification.

A framework-agnostic library (no Anchor / Pinocchio dependency): the downstream program owns the registry account types and reads them, then passes plain data in. Verify a Molpha DataUpdate either from already-resolved signer pubkeys (verify_data_update) or from parsed registry entries plus a RegistryView (verify_data_update_resolved).

§Usage

use molpha_verifier::{verify_data_update, DataUpdate};

// `ordered_signers` are the signing nodes' (x, y) pubkeys in ascending signers_bitmap bit order.
verify_data_update(&payload, node_count, redundancy_buffer, &ordered_signers)?;

Re-exports§

pub use error::DataUpdateError;
pub use payload::DataUpdate;
pub use verify::reconstruct_coalition_key;
pub use verify::reconstruct_coalition_key_compressed;
pub use verify::verify_aggregate_over_hash;
pub use verify::verify_data_update;
pub use verify::verify_data_update_compressed;
pub use verify::SignerXy;
pub use bitmap::bitmap_is_subset_u256;
pub use bitmap::bitmap_load;
pub use bitmap::derive_group_bitmap;
pub use bitmap::effective_selection_size;
pub use bitmap::for_each_set_bit_u256;
pub use coalition::CoalitionAccumulator;
pub use message::compute_message_hash;
pub use message::MESSAGE_PREFIX;
pub use scalar::eth_address_from_uncompressed_pubkey;
pub use scalar::evm_schnorr_ecdsa_inputs;
pub use scalar::secp256k1_scalar_is_valid_nonzero;
pub use selection::derive_selection_bitmap;
pub use selection::SELECTION_SEED_PREFIX;
pub use onchain::*;
pub use state::*;

Modules§

bitmap
EVM-compatible uint256 bitmap operations and deterministic selection-group derivation.
coalition
Incremental coalition-key accumulation (Σ signer pubkeys) over secp256k1.
error
Error type for DataUpdate verification.
message
EVM-compatible DataUpdate message hash.
onchain
Signer resolution and high-level verification over already-parsed registry data.
payload
Plain DataUpdate payload struct.
scalar
secp256k1 scalar arithmetic and the EVM Schnorr→ECDSA recovery trick.
selection
Deterministic selection-bitmap derivation for a (feed_id, registry_version, timestamp) round.
state
Plain, framework-agnostic inputs to signer resolution.
verify
High-level DataUpdate verification over caller-supplied signer pubkeys.