Skip to content

Commit

Permalink
feat: change epoch types to hash slice
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvladco committed Jul 26, 2024
1 parent b06f3a8 commit a949e71
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions internal/block/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@ import (
"github.com/eigerco/strawberry/internal/time"
)

// Header as defined in the section 5 in the paper
type Header struct {
ParentHash crypto.Hash // Hp
PriorStateRoot crypto.Hash // Hr
ExtrinsicHash crypto.Hash // Hx
TimeSlotIndex time.Timeslot // Th
Epoch *Epoch // He
WinningTickets [time.TimeslotsPerEpoch]*Ticket // Hw
JudgementsMarkers []crypto.Hash // Hj
BlockAuthorKey []byte // Hk
VRFSignature []byte // Hv
BlockSeal []byte // Hs
}

type Epoch struct {
Key crypto.Hash
Entropy int64
ParentHash crypto.Hash // Hp
PriorStateRoot crypto.Hash // Hr
ExtrinsicHash crypto.Hash // Hx
TimeSlotIndex time.Timeslot // Ht
EpochMarker []crypto.Hash // He
WinningTicketsMarker [time.TimeslotsPerEpoch]*Ticket // Hw
JudgementsMarkers []crypto.Hash // Hj
BlockAuthorKey []byte // Hk
VRFSignature []byte // Hv
BlockSealSignature []byte // Hs
}

type Ticket struct {

Check failure on line 22 in internal/block/header.go

View workflow job for this annotation

GitHub Actions / Lint

other declaration of Ticket (typecheck)
Expand Down

0 comments on commit a949e71

Please sign in to comment.