-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstructs.go
616 lines (540 loc) · 29.8 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
package consensus
type Root [32]byte
type Signature [96]byte
type AggregateAndProof struct {
Index uint64 `json:"aggregator_index"`
Aggregate *Attestation `json:"aggregate"`
SelectionProof [96]byte `json:"selection_proof" ssz-size:"96"`
}
type Checkpoint struct {
Epoch uint64 `json:"epoch"`
Root Root `json:"root" ssz-size:"32"`
}
type AttestationData struct {
Slot uint64 `json:"slot"`
Index uint64 `json:"index"`
BeaconBlockHash [32]byte `json:"beacon_block_root" ssz-size:"32"`
Source *Checkpoint `json:"source"`
Target *Checkpoint `json:"target"`
}
type Attestation struct {
AggregationBits []byte `json:"aggregation_bits" ssz:"bitlist" ssz-max:"2048"`
Data *AttestationData `json:"data"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type DepositData struct {
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials [32]byte `json:"withdrawal_credentials" ssz-size:"32"`
Amount uint64 `json:"amount"`
Signature Signature `json:"signature" ssz-size:"96"`
Root [32]byte `ssz:"-"`
}
type Deposit struct {
Proof [33][32]byte `ssz-size:"33,32"`
Data *DepositData
}
type DepositMessage struct {
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials [32]byte `json:"withdrawal_credentials" ssz-size:"32"`
Amount uint64 `json:"amount"`
}
type IndexedAttestation struct {
AttestationIndices []uint64 `json:"attesting_indices" ssz-max:"2048"`
Data *AttestationData `json:"data"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type PendingAttestation struct {
AggregationBits []byte `json:"aggregation_bits" ssz:"bitlist" ssz-max:"2048"`
Data *AttestationData `json:"data"`
InclusionDelay uint64 `json:"inclusion_delay"`
ProposerIndex uint64 `json:"proposer_index"`
}
type Fork struct {
PreviousVersion [4]byte `json:"previous_version" ssz-size:"4"`
CurrentVersion [4]byte `json:"current_version" ssz-size:"4"`
Epoch uint64 `json:"epoch"`
}
type Validator struct {
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials [32]byte `json:"withdrawal_credentials" ssz-size:"32"`
EffectiveBalance uint64 `json:"effective_balance"`
Slashed bool `json:"slashed"`
ActivationEligibilityEpoch uint64 `json:"activation_eligibility_epoch"`
ActivationEpoch uint64 `json:"activation_epoch"`
ExitEpoch uint64 `json:"exit_epoch"`
WithdrawableEpoch uint64 `json:"withdrawable_epoch"`
}
type VoluntaryExit struct {
Epoch uint64 `json:"epoch"`
ValidatorIndex uint64 `json:"validator_index"`
}
type SignedVoluntaryExit struct {
Exit *VoluntaryExit `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type HistoricalBatch struct {
BlockRoots [8192][32]byte `json:"block_roots" ssz-size:"8192,32"`
StateRoots [8192][32]byte `json:"state_roots" ssz-size:"8192,32"`
}
type Eth1Data struct {
DepositRoot Root `json:"deposit_root" ssz-size:"32"`
DepositCount uint64 `json:"deposit_count"`
BlockHash [32]byte `json:"block_hash" ssz-size:"32"`
}
type SigningRoot struct {
ObjectRoot Root `json:"object_root" ssz-size:"32"`
Domain []byte `json:"domain" ssz-size:"8"`
}
type ProposerSlashing struct {
Header1 *SignedBeaconBlockHeader `json:"signed_header_1"`
Header2 *SignedBeaconBlockHeader `json:"signed_header_2"`
}
type AttesterSlashing struct {
Attestation1 *IndexedAttestation `json:"attestation_1"`
Attestation2 *IndexedAttestation `json:"attestation_2"`
}
type Transfer struct {
Sender uint64 `json:"sender"`
Recipient uint64 `json:"recipient"`
Amount uint64 `json:"amount"`
Fee uint64 `json:"fee"`
Slot uint64 `json:"slot"`
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconStatePhase0 struct {
GenesisTime uint64 `json:"genesis_time"`
GenesisValidatorsRoot [32]byte `json:"genesis_validators_root" ssz-size:"32"`
Slot uint64 `json:"slot"`
Fork *Fork `json:"fork"`
LatestBlockHeader *BeaconBlockHeader `json:"latest_block_header"`
BlockRoots [8192][32]byte `json:"block_roots" ssz-size:"8192,32"`
StateRoots [8192][32]byte `json:"state_roots" ssz-size:"8192,32"`
HistoricalRoots [][32]byte `json:"historical_roots" ssz-max:"16777216" ssz-size:"?,32"`
Eth1Data *Eth1Data `json:"eth1_data"`
Eth1DataVotes []*Eth1Data `json:"eth1_data_votes" ssz-max:"2048"`
Eth1DepositIndex uint64 `json:"eth1_deposit_index"`
Validators []*Validator `json:"validators" ssz-max:"1099511627776"`
Balances []uint64 `json:"balances" ssz-max:"1099511627776"`
RandaoMixes [65536][32]byte `json:"randao_mixes" ssz-size:"65536,32"`
Slashings []uint64 `json:"slashings" ssz-size:"8192"`
PreviousEpochAttestations []*PendingAttestation `json:"previous_epoch_attestations" ssz-max:"4096"`
CurrentEpochAttestations []*PendingAttestation `json:"current_epoch_attestations" ssz-max:"4096"`
JustificationBits [1]byte `json:"justification_bits" ssz-size:"1"`
PreviousJustifiedCheckpoint *Checkpoint `json:"previous_justified_checkpoint"`
CurrentJustifiedCheckpoint *Checkpoint `json:"current_justified_checkpoint"`
FinalizedCheckpoint *Checkpoint `json:"finalized_checkpoint"`
}
type SignedBeaconBlockPhase0 struct {
Block *BeaconBlockPhase0 `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconBlockPhase0 struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
Body *BeaconBlockBodyPhase0 `json:"body"`
}
type BeaconBlockBodyPhase0 struct {
RandaoReveal Signature `json:"randao_reveal" ssz-size:"96"`
Eth1Data *Eth1Data `json:"eth1_data"`
Graffiti [32]byte `json:"graffiti" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `json:"attester_slashings" ssz-max:"2"`
Attestations []*Attestation `json:"attestations" ssz-max:"128"`
Deposits []*Deposit `json:"deposits" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
}
type SignedBeaconBlockHeader struct {
Header *BeaconBlockHeader `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconBlockHeader struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
BodyRoot Root `json:"body_root" ssz-size:"32"`
}
type ForkData struct {
CurrentVersion [4]byte `json:"current_version" ssz-size:"4"`
GenesisValidatorsRoot Root `json:"genesis_validators_root" ssz-size:"32"`
}
type SigningData struct {
ObjectRoot Root `json:"object_root" ssz-size:"32"`
Domain [32]byte `json:"domain" ssz-size:"32"`
}
// Altair fork
type LightClientHeader struct {
Header *BeaconBlockHeader `json:"beacon"`
}
type LightClientBootstrap struct {
Header *LightClientHeader `json:"header"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
CurrentSyncCommitteeBranch [][32]byte `json:"current_sync_committee_branch" ssz-size:"5,32"`
}
type LightClientFinalityUpdate struct {
AttestedHeader *LightClientHeader `json:"attested_header"`
FinalizedHeader *LightClientHeader `json:"finalized_header"`
FinalityBranch [][32]byte `json:"finality_branch" ssz-size:"6,32"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}
type LightClientOptimisticUpdate struct {
AttestedHeader *LightClientHeader `json:"attested_header"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}
type LightClientUpdate struct {
AttestedHeader *LightClientHeader `json:"attested_header"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee"`
NextSyncCommitteeBranch [][32]byte `json:"next_sync_committee_branch" ssz-size:"5,32"`
FinalizedHeader *LightClientHeader `json:"finalized_header"`
FinalityBranch [][32]byte `json:"finality_branch" ssz-size:"6,32"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}
type BeaconStateAltair struct {
GenesisTime uint64 `json:"genesis_time"`
GenesisValidatorsRoot [32]byte `json:"genesis_validators_root" ssz-size:"32"`
Slot uint64 `json:"slot"`
Fork *Fork `json:"fork"`
LatestBlockHeader *BeaconBlockHeader `json:"latest_block_header"`
BlockRoots [8192][32]byte `json:"block_roots" ssz-size:"8192,32"`
StateRoots [8192][32]byte `json:"state_roots" ssz-size:"8192,32"`
HistoricalRoots [][32]byte `json:"historical_roots" ssz-max:"16777216" ssz-size:"?,32"`
Eth1Data *Eth1Data `json:"eth1_data"`
Eth1DataVotes []*Eth1Data `json:"eth1_data_votes" ssz-max:"2048"`
Eth1DepositIndex uint64 `json:"eth1_deposit_index"`
Validators []*Validator `json:"validators" ssz-max:"1099511627776"`
Balances []uint64 `json:"balances" ssz-max:"1099511627776"`
RandaoMixes [65536][32]byte `json:"randao_mixes" ssz-size:"65536,32"`
Slashings []uint64 `json:"slashings" ssz-size:"8192"`
PreviousEpochParticipation []byte `json:"previous_epoch_participation" ssz-max:"1099511627776"`
CurrentEpochParticipation []byte `json:"current_epoch_participation" ssz-max:"1099511627776"`
JustificationBits [1]byte `json:"justification_bits" ssz-size:"1"`
PreviousJustifiedCheckpoint *Checkpoint `json:"previous_justified_checkpoint"`
CurrentJustifiedCheckpoint *Checkpoint `json:"current_justified_checkpoint"`
FinalizedCheckpoint *Checkpoint `json:"finalized_checkpoint"`
InactivityScores []uint64 `json:"inactivity_scores" ssz-max:"1099511627776"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee"`
}
type SignedBeaconBlockAltair struct {
Block *BeaconBlockAltair `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconBlockAltair struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
Body *BeaconBlockBodyAltair `json:"body"`
}
type BeaconBlockBodyAltair struct {
RandaoReveal Signature `json:"randao_reveal" ssz-size:"96"`
Eth1Data *Eth1Data `json:"eth1_data"`
Graffiti [32]byte `json:"graffiti" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `json:"attester_slashings" ssz-max:"2"`
Attestations []*Attestation `json:"attestations" ssz-max:"128"`
Deposits []*Deposit `json:"deposits" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
}
type SyncAggregate struct {
SyncCommiteeBits [64]byte `json:"sync_committee_bits" ssz-size:"64"`
SyncCommiteeSignature Signature `json:"sync_committee_signature" ssz-size:"96"`
}
type SyncCommittee struct {
PubKeys [512][48]byte `json:"pubkeys" ssz-size:"512,48"`
AggregatePubKey [48]byte `json:"aggregate_pubkey" ssz-size:"48"`
}
// bellatrix
type BeaconStateBellatrix struct {
GenesisTime uint64 `json:"genesis_time"`
GenesisValidatorsRoot [32]byte `json:"genesis_validators_root" ssz-size:"32"`
Slot uint64 `json:"slot"`
Fork *Fork `json:"fork"`
LatestBlockHeader *BeaconBlockHeader `json:"latest_block_header"`
BlockRoots [8192][32]byte `json:"block_roots" ssz-size:"8192,32"`
StateRoots [8192][32]byte `json:"state_roots" ssz-size:"8192,32"`
HistoricalRoots [][]byte `json:"historical_roots" ssz-max:"16777216" ssz-size:"?,32"`
Eth1Data *Eth1Data `json:"eth1_data"`
Eth1DataVotes []*Eth1Data `json:"eth1_data_votes" ssz-max:"2048"`
Eth1DepositIndex uint64 `json:"eth1_deposit_index"`
Validators []*Validator `json:"validators" ssz-max:"1099511627776"`
Balances []uint64 `json:"balances" ssz-max:"1099511627776"`
RandaoMixes [65536][32]byte `json:"randao_mixes" ssz-size:"65536,32"`
Slashings []uint64 `json:"slashings" ssz-size:"8192"`
PreviousEpochParticipation []byte `json:"previous_epoch_participation" ssz-max:"1099511627776"`
CurrentEpochParticipation []byte `json:"current_epoch_participation" ssz-max:"1099511627776"`
JustificationBits [1]byte `json:"justification_bits" ssz-size:"1"`
PreviousJustifiedCheckpoint *Checkpoint `json:"previous_justified_checkpoint"`
CurrentJustifiedCheckpoint *Checkpoint `json:"current_justified_checkpoint"`
FinalizedCheckpoint *Checkpoint `json:"finalized_checkpoint"`
InactivityScores []uint64 `json:"inactivity_scores" ssz-max:"1099511627776"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee"`
LatestExecutionPayloadHeader *ExecutionPayloadHeader `json:"latest_execution_payload_header"`
}
type SignedBeaconBlockBellatrix struct {
Block *BeaconBlockBellatrix `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconBlockBellatrix struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
Body *BeaconBlockBodyBellatrix `json:"body"`
}
type BeaconBlockBodyBellatrix struct {
RandaoReveal Signature `json:"randao_reveal" ssz-size:"96"`
Eth1Data *Eth1Data `json:"eth1_data"`
Graffiti [32]byte `json:"graffiti" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `json:"attester_slashings" ssz-max:"2"`
Attestations []*Attestation `json:"attestations" ssz-max:"128"`
Deposits []*Deposit `json:"deposits" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
ExecutionPayload *ExecutionPayload `json:"execution_payload"`
}
type SignedBlindedBeaconBlock struct {
Block *BlindedBeaconBlock `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BlindedBeaconBlock struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
Body *BlindedBeaconBlockBody `json:"body"`
}
type BlindedBeaconBlockBody struct {
RandaoReveal Signature `json:"randao_reveal" ssz-size:"96"`
Eth1Data *Eth1Data `json:"eth1_data"`
Graffiti [32]byte `json:"graffiti" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `json:"attester_slashings" ssz-max:"2"`
Attestations []*Attestation `json:"attestations" ssz-max:"128"`
Deposits []*Deposit `json:"deposits" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
ExecutionPayloadHeader *ExecutionPayloadHeader `json:"execution_payload_header"`
}
type ExecutionPayload struct {
ParentHash [32]byte `ssz-size:"32" json:"parent_hash"`
FeeRecipient [20]byte `ssz-size:"20" json:"fee_recipient"`
StateRoot [32]byte `ssz-size:"32" json:"state_root"`
ReceiptsRoot [32]byte `ssz-size:"32" json:"receipts_root"`
LogsBloom [256]byte `ssz-size:"256" json:"logs_bloom"`
PrevRandao [32]byte `ssz-size:"32" json:"prev_randao"`
BlockNumber uint64 `json:"block_number"`
GasLimit uint64 `json:"gas_limit"`
GasUsed uint64 `json:"gas_used"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `ssz-max:"32" json:"extra_data"`
BaseFeePerGas Uint256 `ssz-size:"32" json:"base_fee_per_gas"`
BlockHash [32]byte `ssz-size:"32" json:"block_hash"`
Transactions [][]byte `ssz-max:"1048576,1073741824" ssz-size:"?,?" json:"transactions"`
}
type Uint256 [32]byte
type ExecutionPayloadHeader struct {
ParentHash [32]byte `json:"parent_hash" ssz-size:"32"`
FeeRecipient [20]byte `json:"fee_recipient" ssz-size:"20"`
StateRoot [32]byte `json:"state_root" ssz-size:"32"`
ReceiptsRoot [32]byte `json:"receipts_root" ssz-size:"32"`
LogsBloom [256]byte `json:"logs_bloom" ssz-size:"256"`
PrevRandao [32]byte `json:"prev_randao" ssz-size:"32"`
BlockNumber uint64 `json:"block_number"`
GasLimit uint64 `json:"gas_limit"`
GasUsed uint64 `json:"gas_used"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `json:"extra_data" ssz-max:"32"`
BaseFeePerGas Uint256 `json:"base_fee_per_gas" ssz-size:"32"`
BlockHash [32]byte `json:"block_hash" ssz-size:"32"`
TransactionsRoot [32]byte `json:"transactions_root" ssz-size:"32"`
}
type SyncAggregatorSelectionData struct {
Slot uint64 `json:"slot"`
SubCommitteeIndex uint64 `json:"subcommittee_index"`
}
// SyncCommitteeContribution is the Ethereum 2 sync committee contribution structure.
type SyncCommitteeContribution struct {
Slot uint64 `json:"slot"`
BeaconBlockRoot Root `json:"beacon_block_root" ssz-size:"32"`
SubcommitteeIndex uint64 `json:"subcommittee_index"`
AggregationBits []byte `json:"aggregation_bits" ssz-size:"16"` // bitvector
Signature Signature `json:"signature" ssz-size:"96"`
}
type ContributionAndProof struct {
AggregatorIndex uint64 `json:"aggregator_index"`
Contribution *SyncCommitteeContribution `json:"contribution"`
SelectionProof Signature `json:"selection_proof" ssz-size:"96"`
}
type SignedContributionAndProof struct {
Message *ContributionAndProof `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type SyncCommitteeMessage struct {
Slot uint64 `json:"slot"`
BlockRoot Root `json:"beacon_block_root" ssz-size:"32"`
ValidatorIndex uint64 `json:"validator_index"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type SignedAggregateAndProof struct {
Message *AggregateAndProof `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type Eth1Block struct {
Timestamp uint64 `json:"timestamp"`
DepositRoot Root `json:"deposit_root" ssz-size:"32"`
DepositCount uint64 `json:"deposit_count"`
}
type PowBlock struct {
BlockHash [32]byte `json:"block_hash" ssz-size:"32"`
ParentHash [32]byte `json:"parent_hash" ssz-size:"32"`
TotalDifficulty [32]byte `json:"total_difficulty" ssz-size:"32"`
}
// Capella types
type ExecutionPayloadCapella struct {
ParentHash [32]byte `ssz-size:"32" json:"parent_hash"`
FeeRecipient [20]byte `ssz-size:"20" json:"fee_recipient"`
StateRoot [32]byte `ssz-size:"32" json:"state_root"`
ReceiptsRoot [32]byte `ssz-size:"32" json:"receipts_root"`
LogsBloom [256]byte `ssz-size:"256" json:"logs_bloom"`
PrevRandao [32]byte `ssz-size:"32" json:"prev_randao"`
BlockNumber uint64 `json:"block_number"`
GasLimit uint64 `json:"gas_limit"`
GasUsed uint64 `json:"gas_used"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `ssz-max:"32" json:"extra_data"`
BaseFeePerGas Uint256 `ssz-size:"32" json:"base_fee_per_gas"`
BlockHash [32]byte `ssz-size:"32" json:"block_hash"`
Transactions [][]byte `ssz-max:"1048576,1073741824" ssz-size:"?,?" json:"transactions"`
Withdrawals []*Withdrawal `json:"withdrawals" ssz-max:"16"`
}
type ExecutionPayloadHeaderCapella struct {
ParentHash [32]byte `json:"parent_hash" ssz-size:"32"`
FeeRecipient [20]byte `json:"fee_recipient" ssz-size:"20"`
StateRoot [32]byte `json:"state_root" ssz-size:"32"`
ReceiptsRoot [32]byte `json:"receipts_root" ssz-size:"32"`
LogsBloom [256]byte `json:"logs_bloom" ssz-size:"256"`
PrevRandao [32]byte `json:"prev_randao" ssz-size:"32"`
BlockNumber uint64 `json:"block_number"`
GasLimit uint64 `json:"gas_limit"`
GasUsed uint64 `json:"gas_used"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `json:"extra_data" ssz-max:"32"`
BaseFeePerGas Uint256 `json:"base_fee_per_gas" ssz-size:"32"`
BlockHash [32]byte `json:"block_hash" ssz-size:"32"`
TransactionsRoot [32]byte `json:"transactions_root" ssz-size:"32"`
WithdrawalRoot [32]byte `json:"withdrawals_root" ssz-size:"32"`
}
type BLSToExecutionChange struct {
ValidatorIndex uint64 `json:"validator_index"`
FromBLSPubKey [48]byte `json:"from_bls_pubkey" ssz-size:"48"`
ToExecutionAddress [20]byte `json:"to_execution_address" ssz-size:"20"`
}
type HistoricalSummary struct {
BlockSummaryRoot Root `json:"block_summary_root" ssz-size:"32"`
StateSummaryRoot Root `json:"state_summary_root" ssz-size:"32"`
}
type SignedBLSToExecutionChange struct {
Message *BLSToExecutionChange `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type Withdrawal struct {
Index uint64 `json:"index"`
ValidatorIndex uint64 `json:"validator_index"`
Address [20]byte `json:"address" ssz-size:"20"`
Amount uint64 `json:"amount"`
}
type BeaconStateCapella struct {
GenesisTime uint64 `json:"genesis_time"`
GenesisValidatorsRoot [32]byte `json:"genesis_validators_root" ssz-size:"32"`
Slot uint64 `json:"slot"`
Fork *Fork `json:"fork"`
LatestBlockHeader *BeaconBlockHeader `json:"latest_block_header"`
BlockRoots [8192][32]byte `json:"block_roots" ssz-size:"8192,32"`
StateRoots [8192][32]byte `json:"state_roots" ssz-size:"8192,32"`
HistoricalRoots [][]byte `json:"historical_roots" ssz-max:"16777216" ssz-size:"?,32"`
Eth1Data *Eth1Data `json:"eth1_data"`
Eth1DataVotes []*Eth1Data `json:"eth1_data_votes" ssz-max:"2048"`
Eth1DepositIndex uint64 `json:"eth1_deposit_index"`
Validators []*Validator `json:"validators" ssz-max:"1099511627776"`
Balances []uint64 `json:"balances" ssz-max:"1099511627776"`
RandaoMixes [65536][32]byte `json:"randao_mixes" ssz-size:"65536,32"`
Slashings []uint64 `json:"slashings" ssz-size:"8192"`
PreviousEpochParticipation []byte `json:"previous_epoch_participation" ssz-max:"1099511627776"`
CurrentEpochParticipation []byte `json:"current_epoch_participation" ssz-max:"1099511627776"`
JustificationBits [1]byte `json:"justification_bits" ssz-size:"1"`
PreviousJustifiedCheckpoint *Checkpoint `json:"previous_justified_checkpoint"`
CurrentJustifiedCheckpoint *Checkpoint `json:"current_justified_checkpoint"`
FinalizedCheckpoint *Checkpoint `json:"finalized_checkpoint"`
InactivityScores []uint64 `json:"inactivity_scores" ssz-max:"1099511627776"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee"`
LatestExecutionPayloadHeader *ExecutionPayloadHeaderCapella `json:"latest_execution_payload_header"`
NextWithdrawalIndex uint64 `json:"next_withdrawal_index"`
NextWithdrawalValidatorIndex uint64 `json:"next_withdrawal_validator_index"`
HistoricalSummaries []*HistoricalSummary `json:"historical_summaries" ssz-max:"16777216"`
}
type SignedBeaconBlockCapella struct {
Block *BeaconBlockCapella `json:"message"`
Signature Signature `json:"signature" ssz-size:"96"`
}
type BeaconBlockCapella struct {
Slot uint64 `json:"slot"`
ProposerIndex uint64 `json:"proposer_index"`
ParentRoot Root `json:"parent_root" ssz-size:"32"`
StateRoot Root `json:"state_root" ssz-size:"32"`
Body *BeaconBlockBodyCapella `json:"body"`
}
type BeaconBlockBodyCapella struct {
RandaoReveal Signature `json:"randao_reveal" ssz-size:"96"`
Eth1Data *Eth1Data `json:"eth1_data"`
Graffiti [32]byte `json:"graffiti" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `json:"attester_slashings" ssz-max:"2"`
Attestations []*Attestation `json:"attestations" ssz-max:"128"`
Deposits []*Deposit `json:"deposits" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
ExecutionPayload *ExecutionPayloadCapella `json:"execution_payload"`
BlsToExecutionChanges []*SignedBLSToExecutionChange `json:"bls_to_execution_changes" ssz-max:"16"`
}
type LightClientHeaderCapella struct {
Header *BeaconBlockHeader `json:"beacon"`
Execution *ExecutionPayloadHeaderCapella `json:"execution"`
ExecutionBranch [4][32]byte `json:"execution_branch" ssz-size:"4,32"`
}
type LightClientBootstrapCapella struct {
Header *LightClientHeaderCapella `json:"header"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
CurrentSyncCommitteeBranch [][32]byte `json:"current_sync_committee_branch" ssz-size:"5,32"`
}
type LightClientFinalityUpdateCapella struct {
AttestedHeader *LightClientHeaderCapella `json:"attested_header"`
FinalizedHeader *LightClientHeaderCapella `json:"finalized_header"`
FinalityBranch [][32]byte `json:"finality_branch" ssz-size:"6,32"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}
type LightClientOptimisticUpdateCapella struct {
AttestedHeader *LightClientHeaderCapella `json:"attested_header"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}
type LightClientUpdateCapella struct {
AttestedHeader *LightClientHeaderCapella `json:"attested_header"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee"`
NextSyncCommitteeBranch [][32]byte `json:"next_sync_committee_branch" ssz-size:"5,32"`
FinalizedHeader *LightClientHeaderCapella `json:"finalized_header"`
FinalityBranch [][32]byte `json:"finality_branch" ssz-size:"6,32"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
SignatureSlot uint64 `json:"signature_slot"`
}