singular_state_termination_fixtures
Shared fixtures of the termination and mixed fold tests.
A fold scenario names the registry’s seed, the leaves its trie holds
before and the changes folded now, registrations and terminations in any
order. The transaction, the redeemer, the proofs and the continuing state
are derived from it: every token name from the role functions of
singular_state/preimage, every root and proof from the Merkle Patricia
Forestry library through the proof builders of singular_state_proof_fixtures, as the
earlier changes of the batch advanced the trie. A test changes one part of
a valid fold and nothing else.
Types
A key and the leaf the trie binds to it.
Constructors
-
Held { key: ByteArray, leaf: ByteArray }
A fold: the registry’s seed, the leaves its trie holds before, and the changes folded now, in order.
Constructors
-
Mixed { seed: OutputReference, before: List<Held>, steps: List<Step> }
One change of a fold.
Constructors
-
Registering(Registration) -
Terminating(Termination)
One termination as the folder builds it from chain data: the key and the request input that holds the termination approval and the active token.
Constructors
-
Termination { key: ByteArray, request: OutputReference, request_lovelace: Int }
Constants
Two keys whose hashes begin with the nibble f and share the next two, so a trie with one of the keys above and these two has a branch at the last branch number as the neighbour of that key.
Keys to register into the deep tries: their hashes begin with the nibbles 6 and f, so they share the first nibble with the keys above and the second with each other.
Keys whose hashes share leading nibbles, so that the tries built from them
have nodes below the first nibble. deep_tries says which share what; the
rows that use them check the shape of the proofs they get.
Functions
The proof that shows key in the trie that holds held and key: the
siblings on its path, whatever the shape of the trie. It is also the proof
that shows key absent from the trie that holds exactly held.
The same proof from the proof builders of singular_state_proof_fixtures, which describe
a trie with one leaf per first nibble and nothing else.
The root of the trie that holds exactly held, from the digests the proof
builder computes, not from the library.
held with key registered. A key that is held already keeps its place and
takes the active leaf, so a scenario that names a key twice still has a
trie to build: the one a fold that accepted both changes would write.
held with the leaf of key terminal and every other leaf as it was.
A termination of key whose request is the nth of the scenario.
A registration of key whose request is the nth of the scenario.
Tries whose honest proofs are not one step: a leaf neighbour that follows a shared prefix, a neighbour that is a branch with a prefix of its own, three children or more at a node, and a leaf step that other steps follow.
The name of the termination approval token of key in registry, from the
producer.
The request input of termination: the termination approval, the active
token of the key, and an empty datum.
The leaves the trie holds after the changes.
The changes of the fold, each with the proof against the trie as the earlier changes advanced it.
The state output of the registry created from seed whose trie holds held.
The mint of the fold: a token for each registered key and none for a terminated one, the active token of each terminated key burned, and each approval burned.