Skip to content

Commit

Permalink
feat: support VDS requested assignment 3 from MMRIVER 02 (#35)
Browse files Browse the repository at this point in the history
* fix: replciation issue local log and seal corruption

When replicating the remote log file and the remote seal to local disc
the files must be opened in O_TRUNC mode.

The single corner case where this happens required file system based
tests and we only have those in veracity.

Follow on work required if we want those tests to exist in this repo.

AB#10163

* feat: support VDS requested assignment 3 from MMRIVER 02

The presigned receipts will use VDS=3 once the merklesealer takes this
change.

Impact

Receipt verifiers will need accept VDS 3.

Receipt verifiers can confirm the VDS to expect by examining any
replica's latest seal.

Receipt verifiers can safely accept both VDS 2 or VS3 if they know out
of band the receipt came from a forestrie log.

Receipt creators *may* need to accomodate the VDS change, depending on
the depth of validation and sanity checking they perform on pre-signed
receipts before attaching proofs.

This change does not affect:
* replication via veracity.
* checkpoint verification.

---------

Co-authored-by: Robin Bryce <[email protected]>
  • Loading branch information
robinbryce and Robin Bryce authored Nov 28, 2024
1 parent 860180c commit 4930aed
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions massifs/rootsigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@ type MMRStateVersion int

const (
MMRStateVersion0 MMRStateVersion = iota // Implicit initial release version
MMRStateVersion1 // Version 1
MMRStateVersion1 // Version 1 is DRAFT_00 vds =2
// Version2 was introduced to indicate support for MMRIVER 02.
// In this draft we co-ordinated a requested assignment for the vds and in
// doing so ended up with 3 rather than 2.
// Note that this change _does not_ impact verification of the checkpoints.
// It only impacts the presigned receipts attached in the unprotected headers.
MMRStateVersion2 // Version 1 is DRAFT_02 vds =3 (otherwise compatible with v1)
// Note: new versions must be monotonicaly assigned.

)

const (
MMRStateVersionCurrent = MMRStateVersion1
MMRStateVersionCurrent = MMRStateVersion2
VDSCoseReceiptsTag = 395
VDSCoseReceiptProofsTag = 396
VDSMMRiver = 2
VDSMMRiver_DRAFT00 = 2
VDSMMRiver = 3
VDSInclusionProof = -1
InclusionProofIndex = 1
InclusionProofProof = 2
Expand Down

0 comments on commit 4930aed

Please sign in to comment.