pub struct Position {
pub chain_id: Id,
pub height: u64,
pub round: u32,
pub block_id: Id,
pub parent_id: Id,
pub canonical_id: Id,
pub parent_canonical_id: Id,
pub execution_state_root: Id,
pub payload_root: Id,
pub validator_set_root: Id,
}Expand description
The consensus position a vote binds to.
It carries two identities. The canonical execution identity — canonical_id,
parent_canonical_id, execution_state_root, payload_root — is the
primary consensus object and is signed. The transport identity — block_id,
parent_id — is the outer envelope, a cache key for block lookup, and is NOT
signed. Two nodes that executed the same inner block therefore sign identical
bytes however it was wrapped, and their votes interoperate.
Fields§
§chain_id: Id§height: u64§round: u32§block_id: Id§parent_id: Id§canonical_id: Id§parent_canonical_id: Id§execution_state_root: Id§payload_root: Id§validator_set_root: IdImplementations§
Source§impl Position
impl Position
Sourcepub fn signed_identity(&self) -> Id
pub fn signed_identity(&self) -> Id
The identity a finality index must key on: the value the signature
actually commits to. It is canonical_id, or block_id only in the
degrade where no canonical id is set — exactly the byte
canonical_vote_message folds in as the canonical. The transport
block_id is otherwise unsigned, so keying finality on it lets a
verified certificate be relabelled to a block it never attested; keying
on this value cannot be, and two positions that sign to the same bytes
resolve to the same finality entry rather than two.