Documentation ¶
Index ¶
Constants ¶
const MinRandomnessLen = 64
MinRandomnessLen is the minimum accepted length for the user defined randomness
Variables ¶
This section is empty.
Functions ¶
func Contribute ¶
Contribute takes as input the previous SRS and a random byte slice, and returns the new SRS together with the Proof
func VerifyNewSRSFromPrevSRS ¶ added in v0.0.4
VerifyNewSRSFromPrevSRS checks the correct computation of the new SRS respectively from the previous SRS. These are the checks that the Sequencer would do.
func VerifyState ¶ added in v0.0.4
VerifyState acts similarly to VerifyNewSRSFromPrevSRS, but verifying the given State (which can be obtained from the Sequencer)
Types ¶
type BatchContribution ¶
type BatchContribution struct {
Contributions []Contribution
}
BatchContribution represents the data structure obtained from the Sequencer at the /contribute endpoint
func (*BatchContribution) Contribute ¶
func (pb *BatchContribution) Contribute(randomness []byte) (*BatchContribution, error)
Contribute takes the last BatchContribution and computes a new BatchContribution using the defined randomness
func (BatchContribution) MarshalJSON ¶
func (c BatchContribution) MarshalJSON() ([]byte, error)
MarshalJSON implements the BatchContribution json marshaler, compatible with the official Ethereum KZG Ceremony formats
func (*BatchContribution) UnmarshalJSON ¶
func (c *BatchContribution) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the BatchContribution json unmarshaler, compatible with the official Ethereum KZG Ceremony formats
type Contribution ¶
type SRS ¶
SRS contains the powers of tau in G1 & G2, eg. [τ'⁰]₁, [τ'¹]₁, [τ'²]₁, ..., [τ'ⁿ⁻¹]₁, [τ'⁰]₂, [τ'¹]₂, [τ'²]₂, ..., [τ'ⁿ⁻¹]₂
type State ¶
type State struct { Transcripts []Transcript ParticipantIDs []string // WIP ParticipantECDSASignatures []string }
State represents the data structure obtained from the Sequencer at the /info/current_state endpoint
func (*State) Contribute ¶
Contribute takes the last State and computes a new State using the defined randomness
func (State) MarshalJSON ¶
MarshalJSON implements the State json marshaler, compatible with the official Ethereum KZG Ceremony formats
func (*State) UnmarshalJSON ¶
UnmarshalJSON implements the State json unmarshaler, compatible with the official Ethereum KZG Ceremony formats