Skip to content

Commit

Permalink
parent c775ed3
Browse files Browse the repository at this point in the history
author daniel.vladco <[email protected]> 1721829553 +0300
committer daniel.vladco <[email protected]> 1721989837 +0300
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEp/B5JgRVFrv4jeo0NRcmXQtfSkgFAmajes0ACgkQNRcmXQtf
 Skidrg//TebF4dKkt8fiVdgGCHLlVD4mI4JsE0ySEsIE1BQGz0myrRdKqd3psthK
 DtgPsJiMahcnivW8mkAVhG3E6pdZwFXqjArO3v47k/A0hmfSrr+CzF8AG9rU9ACf
 uY8/b1tjNgtMRbQQJLH3Ythjx2+yJaoywcJF9QgYRE+zk4D/WW/Rcr3AVkZhJ7Lk
 fgP4IltydVNYiT0k4xvLEqjjSQDKDT3bT4KFHDLIIkMS7ZF5fbAIQEC+cjCrz0az
 iC7v5HepV158FgmeEijJVvUh8PTWLF+Pifv0sybOgVx/VSMm048aRlbVZN3PVFPP
 zM4TAYJgb9YXHS2UtmSVAvkBLa6xVh7i97HNXzF9+Izxpk/HNoRd3scbgp/8Jk78
 Q7EFdc1VDaGo002U0DIBGaTLBleTQu1ukzPHtclrHlGMI5f4vTnWGUDStw97i5+L
 h0Fs+c+n4Ig7/Wy5+skTOGvaKNfMWGF+fZpg1Jnv9urLdzva6guelnpsf9/dwzI+
 ezh1tzn8L2+jNVTs4/Inv+K9nfqN7L0HPe6c9rheWmystNYKL3Z3h05W/3ulgW1M
 8kk3Y2AxcFugPGPaQ/49MezVn2SehlNJh8Z1RzRQio3I8+GKYj24O+TNrPyN3muc
 B0/5Psw7xbuQzNYmqjbZU9mdibU74kpomThW9D5sg7urNeteAF0=
 =5+iJ
 -----END PGP SIGNATURE-----

feat: add header fields

fix: use hash types where needed

feat: change epoch types to hash slice

Add ticket structs (#18)

fix: use existing ticket struct
  • Loading branch information
danielvladco committed Jul 26, 2024
1 parent 241ec1d commit a032b01
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/block/header.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
package block

import (
"github.com/eigerco/strawberry/internal/crypto"
"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 // Ht
EpochMarker []crypto.Hash // He
WinningTicketsMarker [time.TimeslotsPerEpoch]*Ticket // Hw
JudgementsMarkers []crypto.Hash // Hj
BlockAuthorKey []byte // Hk
VRFSignature []byte // Hv
BlockSealSignature []byte // Hs
}

0 comments on commit a032b01

Please sign in to comment.