Skip to content

Sign security parameter offset in ProtocolMessage for Blocks and Transactions #3098

@jpraynaud

Description

@jpraynaud

Why

We want to sign with Mithril the offset from the tip of the chain used to create the snapshot. This will allow the clients to rely on a verified information when assessing if the blocks/transactions verified are immutable enough to be trusted given their security requirements.

What

Add the offset from the tip of the chain in the Protocol Message signed for the Blocks and Transactions.

How

  • Create a new BlockNumberOffset representing the offset from a block number:
    • Create the new type (not alias, follow the implementation done for KesPeriod and KesEvolutions)
    • Implement arithmetic operations between BlockNumber and BlockNumberOffset
    • Implement Deref and From traits
    • Update the block number offsets to the BlockNumberOffset type when they are using BlockNumber
  • Update the Signed entity type CardanoBlocksTransactions to include a BlockNumberOffset
  • Update the generic type used by the signable builder from U=BlockNumber' to U=(BlockNumber,BlockNumberOffset)
  • Add a new variant for the ProtocolMessagePartKey: CardanoBlocksTransactionsBlockNumberOffset
  • Sign the BlockNumberOffset in the compute_protocol_message of the signable builder implementation
  • Update the client library
  • Run a backward compatibility test with previous distribution 2603.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions