@@ -34,15 +34,15 @@ public struct Header: Sendable, Equatable {
3434 ProtocolConfig . EpochLength
3535 > ?
3636
37- // Ho: The offenders markers must contain exactly the sequence of keys of all new offenders.
38- public var offendersMarkers : [ Ed25519PublicKey ]
39-
4037 // Hi: block author index
4138 public var authorIndex : ValidatorIndex
4239
4340 // Hv: the entropy-yielding vrf signature
4441 public var vrfSignature : BandersnatchSignature
4542
43+ // Ho: The offenders markers must contain exactly the sequence of keys of all new offenders.
44+ public var offendersMarkers : [ Ed25519PublicKey ]
45+
4646 public init (
4747 parentHash: Data32 ,
4848 priorStateRoot: Data32 ,
@@ -53,9 +53,9 @@ public struct Header: Sendable, Equatable {
5353 Ticket ,
5454 ProtocolConfig . EpochLength
5555 > ? ,
56- offendersMarkers: [ Ed25519PublicKey ] ,
5756 authorIndex: ValidatorIndex ,
58- vrfSignature: BandersnatchSignature
57+ vrfSignature: BandersnatchSignature ,
58+ offendersMarkers: [ Ed25519PublicKey ]
5959 ) {
6060 self . parentHash = parentHash
6161 self . priorStateRoot = priorStateRoot
@@ -107,9 +107,9 @@ extension Header: Codable {
107107 ConfigFixedSizeArray < Ticket , ProtocolConfig . EpochLength > . self,
108108 forKey: . winningTickets
109109 ) ,
110- offendersMarkers: container. decode ( [ Ed25519PublicKey ] . self, forKey: . offendersMarkers) ,
111110 authorIndex: container. decode ( ValidatorIndex . self, forKey: . authorIndex) ,
112- vrfSignature: container. decode ( BandersnatchSignature . self, forKey: . vrfSignature)
111+ vrfSignature: container. decode ( BandersnatchSignature . self, forKey: . vrfSignature) ,
112+ offendersMarkers: container. decode ( [ Ed25519PublicKey ] . self, forKey: . offendersMarkers) ,
113113 ) ,
114114 seal: container. decode ( BandersnatchSignature . self, forKey: . seal)
115115 )
@@ -123,9 +123,9 @@ extension Header: Codable {
123123 try container. encode ( unsigned. timeslot, forKey: . timeslot)
124124 try container. encodeIfPresent ( unsigned. epoch, forKey: . epoch)
125125 try container. encodeIfPresent ( unsigned. winningTickets, forKey: . winningTickets)
126- try container. encode ( unsigned. offendersMarkers, forKey: . offendersMarkers)
127126 try container. encode ( unsigned. authorIndex, forKey: . authorIndex)
128127 try container. encode ( unsigned. vrfSignature, forKey: . vrfSignature)
128+ try container. encode ( unsigned. offendersMarkers, forKey: . offendersMarkers)
129129 try container. encode ( seal, forKey: . seal)
130130 }
131131}
@@ -157,9 +157,9 @@ extension Header.Unsigned: Dummy {
157157 timeslot: 0 ,
158158 epoch: EpochMarker . dummy ( config: config) ,
159159 winningTickets: nil ,
160- offendersMarkers: [ ] ,
161160 authorIndex: 0 ,
162- vrfSignature: BandersnatchSignature ( )
161+ vrfSignature: BandersnatchSignature ( ) ,
162+ offendersMarkers: [ ]
163163 )
164164 }
165165}
0 commit comments