Skip to main content

Module fixtures

Module fixtures 

Source
Expand description

Blocks signed by test quorums, and the answers a node would give for them, for tests of this crate and of the crates that verify block proofs through it.

A test quorum’s key is derived from its hash, so these are synthetic blocks, never network trust anchors: a verifier accepts them only from a provider that answers a test quorum’s key, as TestQuorum does. The sign hash is built here by hand, from Tenderdash’s definition of it, so the verifier is checked against that definition and not against itself.

Structs§

TestQuorum
A provider that knows the test quorum QUORUM_HASH and records the Core heights reported to it as verified.

Constants§

CHAIN_ID
The chain of the test blocks.
CORE_HEIGHT
The Core height the test blocks are chain locked at.
QUORUM_HASH
The quorum that signs a block unless a test names another.
QUORUM_TYPE
The LLMQ type of the test quorums.

Functions§

block_answer
block_answer_by the test quorum QUORUM_HASH.
block_answer_by
block_answer_of the block at height under the latest protocol version.
block_answer_of
The block an honest node returns from getBlocks when asked to prove the block of header, which holds transactions, signed by the test quorum quorum_hash. Start from header_of to give the block another protocol version or Core height.
block_id_of
The block id Tenderdash derives from header.
header_of
The header of a block at height that holds transactions, executed under the latest protocol version.
owner_answer
owner_answer_of the block at height under the latest protocol version.
owner_answer_of
What an honest node answers getOwnerTransactionsInBlock with when asked to prove the transactions at indexes of the block of header, which holds transactions. The answer lists them in the order of indexes, each with the paths of its own position.
quorum_public_key
The public key of the test quorum quorum_hash.
sign
Sign proof as it stands, as the test quorum it names.
signed_proof
The proof of the block of header, signed by the test quorum QUORUM_HASH.
signed_proof_by
The proof of the block of header, signed by the test quorum quorum_hash.

Type Aliases§

TestTransaction
A transaction of a test block: its bytes, and the code, data and gas of its result.