MerkleProofStatus enum
Where a stored MerkleProof stands against the local header chain (audit beads libspiffy-mny, libspiffy-azl).
Only verified and pendingHeader proofs are current
(MerkleProof.isCurrent): at most one per transaction, returned by
getMerkleProof, put in BEEFs and backing a confirmation. orphaned and
rejected rows are kept for the record (proofs are never deleted).
Transitions: a proof is stored verified when its root matches the active header at its height, pendingHeader when no header is known there, rejected when the header there contradicts it. A pendingHeader proof becomes verified or rejected when its header arrives (SPVActor). A verified proof becomes orphaned when its block leaves the active chain. A later proof of the transaction that verifies (the same one against a new active header, or another one) becomes current whatever the earlier rows say: SPVActor stores an orphaned or rejected proof verified again when a reorganization makes active a header at its height that it verifies against (beads hg0, 10r).
Values
- verified → const MerkleProofStatus
-
Its root matches the header at its height on the active chain.
- pendingHeader → const MerkleProofStatus
-
Not yet matched against a header: no header was known at its height when it was stored. SPVActor checks it when headers arrive; it then becomes verified or rejected (and the confirmation is taken back). Until then it is the transaction's current proof:
getMerkleProofreturns it and outgoing BEEFs carry it (the receiver verifies it against its own headers; SPV lets a wallet sign and hand on a transaction before its own headers have caught up). - orphaned → const MerkleProofStatus
-
It was verified in a block that has left the active chain (a reorganization). Kept for the record; never a transaction's current proof and never put in a BEEF.
- rejected → const MerkleProofStatus
-
The active header at its height contradicts it: the root it computes is not that header's merkle root, or it cannot be walked to a root at all. It was never verified on our chain (a forged proof, or one for a block we do not have), so it has no block hash. Kept for the record; never a transaction's current proof, never put in a BEEF, never backing a confirmation, and it never displaces a current proof. If the header at its height changes to one it verifies against, it becomes verified.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
MerkleProofStatus> - A constant List of the values in this enum, in order of their declaration.