Documentation ¶
Index ¶
- Variables
- func Challenge(data io.Reader, commitments []common.Hash) (types.Challenge, error)
- type StateMatrix
- func (d *StateMatrix) AbsorbUpTo(in io.Reader, maxLen int) (types.InputData, error)
- func (d *StateMatrix) Hash() (h common.Hash)
- func (d *StateMatrix) PoststateWithProof() (types.Leaf, merkle.Proof)
- func (d *StateMatrix) PrestateMatrix() types.StateSnapshot
- func (d *StateMatrix) PrestateWithProof() (types.Leaf, merkle.Proof)
- func (d *StateMatrix) StateCommitment() common.Hash
- func (d *StateMatrix) StateSnapshot() types.StateSnapshot
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type StateMatrix ¶
type StateMatrix struct {
// contains filtered or unexported fields
}
StateMatrix implements a stateful keccak sponge with the ability to create state commitments after each permutation
func NewStateMatrix ¶
func NewStateMatrix() *StateMatrix
NewStateMatrix creates a new state matrix initialized with the initial, zero keccak block.
func (*StateMatrix) AbsorbUpTo ¶
func (*StateMatrix) Hash ¶
func (d *StateMatrix) Hash() (h common.Hash)
Hash finalizes the keccak permutation and returns the final hash. No further leaves can be absorbed after this is called
func (*StateMatrix) PoststateWithProof ¶
func (d *StateMatrix) PoststateWithProof() (types.Leaf, merkle.Proof)
PoststateWithProof returns the poststate leaf with its merkle proof.
func (*StateMatrix) PrestateMatrix ¶ added in v1.5.1
func (d *StateMatrix) PrestateMatrix() types.StateSnapshot
func (*StateMatrix) PrestateWithProof ¶
func (d *StateMatrix) PrestateWithProof() (types.Leaf, merkle.Proof)
PrestateWithProof returns the prestate leaf with its merkle proof.
func (*StateMatrix) StateCommitment ¶
func (d *StateMatrix) StateCommitment() common.Hash
StateCommitment returns the state commitment for the current state matrix. Additional data may be absorbed after calling this method.
func (*StateMatrix) StateSnapshot ¶
func (d *StateMatrix) StateSnapshot() types.StateSnapshot
Click to show internal directories.
Click to hide internal directories.