roundid

package
v0.5.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL