package
0.6.0-alpha.1
Repository: https://github.com/astriaorg/rollkit.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

ConsensusParamsFromProto converts protobuf consensus parameters to consensus parameters.
ConsensusParamsValidateBasic validates the ConsensusParams to ensure all values are within their allowed limits, and returns an error if they are not.
GetCommit returns a commit with a signature from the given private key over the given header.
GetFirstSignedHeader creates a 1st signed header for a chain, given a valset and signing key.
GetGenesisWithPrivkey returns a genesis doc with a single validator and a signing key.
GetNodeKey creates libp2p private key from Tendermints NodeKey.
GetRandomBlock returns a block with random data.
GetRandomBlockWithKey returns a block with random data and a signing key.
GetRandomBytes returns a byte slice of random bytes of length n.
GetRandomHeader returns a header with random fields and current time.
GetRandomNextBlock returns a block with random data and height of +1 from the provided block.
GetRandomNextHeader returns a header with random data and height of +1 from the provided Header.
GetRandomNextSignedHeader returns a signed header with random data and height of +1 from the provided signed header.
GetRandomSignedHeader returns a signed header with random data.
GetRandomSignedHeaderWith returns a signed header with specified height and data hash, and random data for other fields.
GetRandomTx returns a tx with random data.
GetRandomValidatorSet returns a validator set with a single validator.
GetRandomValidatorSetWithPrivKey returns a validator set with a single validator.
GetValidatorSet returns a validator set with a single validator with the given key.
GetValidatorSetFromGenesis returns a ValidatorSet from a GenesisDoc, for usage with the centralized sequencer scheme.
NewFromGenesisDoc reads blockchain State from genesis.
NewThreadManager creates a new ThreadManager.
PostableBytesToShares converts a slice of bytes that can be posted to the blockchain to a slice of shares.
PrivKeyToSigningKey converts a privKey to a signing key.
SharesToPostableBytes converts a slice of shares to a slice of bytes that can be posted to the blockchain.
SharesToTxsWithISRs converts a slice of shares to a slice of TxWithISRs.
TxsWithISRsToShares converts a slice of TxWithISRs to a slice of shares.

# Constants

TestChainID is a constant used for testing purposes.

# Variables

EmptyEvidenceHash is the hash of an empty EvidenceData.
ErrAggregatorSetHashMismatch is returned when the aggregator set hash in the signed header doesn't match the hash of the validator set.
ErrInvalidValidatorSetLengthMismatch is returned when the validator set length is not exactly one.
ErrLastCommitHashMismatch is returned when the last commit hash doesn't match.
ErrLastHeaderHashMismatch is returned when the last header hash doesn't match.
ErrNonAdjacentHeaders is returned when the headers are not adjacent.
ErrNoProposerAddress is returned when the proposer address is not set.
ErrNoSignatures is returned when there are no signatures.
ErrProposerAddressMismatch is returned when the proposer address in the signed header does not match the proposer address in the validator set.
ErrProposerNotInValSet is returned when the proposer address in the validator set is not in the validator set.
ErrProposerVerificationFailed is returned when the proposer verification fails.
ErrSignatureEmpty is returned when signature is empty.
ErrSignatureVerificationFailed is returned when the signature verification fails.
InitStateVersion sets the Consensus.Block and Software versions, but leaves the Consensus.App version blank.

# Structs

BaseHeader contains the most basic data of a header.
Block defines the structure of Rollkit block.
Commit contains evidence of block creation.
Data defines Rollkit block data.
EvidenceData defines how evidence is stored in block.
Header defines the structure of Rollkit block header.
IntermediateStateRoots describes the state between transactions.
SignedHeader combines Header and its Commit.
State contains information about current state of the blockchain.
ThreadManager is a simple wrapper around sync.WaitGroup to make it easier to manage threads.
TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
Version captures the consensus rules for processing a block in the blockchain, including all blockchain data structures and the rules of the application's state transition machine.

# Type aliases

Hash is a 32-byte array which is used to represent a hash result.
Signature represents signature of block creator.
Tx represents transaction.
Txs represents a slice of transactions.