BoundedAuthorityProtocol. V1. ExpectedChain
(Bounded Authority Protocol v1.0.0)
Copy Markdown
View Source
Mandatory caller-derived boundaries for one nonempty consumption-chain range.
Supply these from your own records, never from the rows being checked: a consistent chain cannot by itself show that no row was removed.
Fields
chain_id- the chain identity: non-empty StringOrURI of at mostidentifier_bytes(512) UTF-8 bytes.first_sequence- the expected sequence number of the first row.last_sequence- the expected sequence number of the last row.row_count- the expected number of rows.previous_hash- the raw 32-byte hash of the row beforefirst_sequence(32 zero bytes when it is1).last_hash- the raw 32-byte hash of the row atlast_sequence(the head).bounds- aBoundedAuthorityProtocol.V1.Boundsstruct or a map of tightening overrides;%{}means the profile maxima (seeBoundedAuthorityProtocol.V1.Bounds.coerce/1).
Summary
Types
Caller boundaries for the façade's check_chain/2 (for example BoundedAuthorityProtocol.V1.check_chain/2).
Types
@type t() :: %BoundedAuthorityProtocol.V1.ExpectedChain{ bounds: BoundedAuthorityProtocol.V1.Bounds.t() | map(), chain_id: binary(), first_sequence: pos_integer(), last_hash: binary(), last_sequence: pos_integer(), previous_hash: binary(), row_count: pos_integer() }
Caller boundaries for the façade's check_chain/2 (for example BoundedAuthorityProtocol.V1.check_chain/2).