Documentation
¶
Overview ¶
Package roundid provides Go bindings to the Rust FFI function that derives vote_round_id from session fields via Poseidon hash.
The round ID is a canonical Pallas Fp element (32 bytes LE), computed as Poseidon(<8 Fp elements>) from the 6 session setup fields. This ensures the round ID is always a valid field element for use in ZKP circuits.
It requires the Rust static library to be built first:
cargo build --release --manifest-path sdk/circuits/Cargo.toml
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveRoundID ¶
func DeriveRoundID( snapshotHeight uint64, snapshotBlockhash []byte, proposalsHash []byte, voteEndTime uint64, nullifierImtRoot []byte, ncRoot []byte, ) ([32]byte, error)
DeriveRoundID computes vote_round_id from the 6 session setup fields via Poseidon hash (matching the Rust derive_round_id_poseidon function).
Returns a 32-byte canonical Pallas Fp element.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.