-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package block | ||
|
||
import "github.com/eigerco/strawberry/internal/crypto" | ||
|
||
// Assurance represents a single validator's attestation of data availability | ||
// for work reports on specific cores. It is part of the Assurances Extrinsic (E_A). | ||
// Each Assurance contains: | ||
// - An anchor to the parent block | ||
// - A bitstring flag indicating availability for each core | ||
// - The index of the attesting validator (0 to 1023) | ||
// - A signature validating the assurance | ||
// Assurances must be ordered by validator index in the extrinsic. | ||
type Assurance struct { | ||
Anchor crypto.Hash // Parent block hash (a ∈ H) | ||
Flag bool // Bitstring of assurances, one bit per core (f ∈ B_C) | ||
ValidatorIndex uint16 // Index of the attesting validator (v ∈ N_V) | ||
Signature [crypto.Ed25519SignatureSize]byte // Ed25519 signature (s ∈ E) | ||
} | ||
|
||
type AssurancesExtrinsic []Assurance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ type Extrinsic struct { | |
ET []*TicketProof | ||
EP *PreimageExtrinsic | ||
ED *DisputeExtrinsic | ||
EA *AssurancesExtrinsic | ||
} |