Skip to content

Commit

Permalink
Merge pull request #211 from pk910/pk910/dynssz-hashroot-electra
Browse files Browse the repository at this point in the history
add `dynssz-max` tags
  • Loading branch information
mcdee authored Feb 19, 2025
2 parents 3985c39 + 270f1b6 commit b41ce95
Show file tree
Hide file tree
Showing 20 changed files with 110 additions and 101 deletions.
2 changes: 2 additions & 0 deletions http/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ func (s *Service) Events(ctx context.Context, topics []string, handler consensus
}

// handleEvent parses an event and passes it on to the handler.
//
//nolint:gocyclo
func (*Service) handleEvent(ctx context.Context, msg *sse.Event, handler consensusclient.EventHandlerFunc) {
log := zerolog.Ctx(ctx)

Expand Down
10 changes: 5 additions & 5 deletions spec/altair/beaconblockbody.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ type BeaconBlockBody struct {
RANDAOReveal phase0.BLSSignature `ssz-size:"96"`
ETH1Data *phase0.ETH1Data
Graffiti [32]byte `ssz-size:"32"`
ProposerSlashings []*phase0.ProposerSlashing `ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `ssz-max:"2"`
Attestations []*phase0.Attestation `ssz-max:"128"`
Deposits []*phase0.Deposit `ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `ssz-max:"16"`
ProposerSlashings []*phase0.ProposerSlashing `dynssz-max:"MAX_PROPOSER_SLASHINGS" ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `dynssz-max:"MAX_ATTESTER_SLASHINGS" ssz-max:"2"`
Attestations []*phase0.Attestation `dynssz-max:"MAX_ATTESTATIONS" ssz-max:"128"`
Deposits []*phase0.Deposit `dynssz-max:"MAX_DEPOSITS" ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `dynssz-max:"MAX_VOLUNTARY_EXITS" ssz-max:"16"`
SyncAggregate *SyncAggregate
}

Expand Down
14 changes: 7 additions & 7 deletions spec/altair/beaconstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ type BeaconState struct {
LatestBlockHeader *phase0.BeaconBlockHeader
BlockRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
StateRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
HistoricalRoots []phase0.Root `ssz-max:"16777216" ssz-size:"?,32"`
HistoricalRoots []phase0.Root `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216" ssz-size:"?,32"`
ETH1Data *phase0.ETH1Data
ETH1DataVotes []*phase0.ETH1Data `ssz-max:"2048"`
ETH1DataVotes []*phase0.ETH1Data `dynssz-max:"EPOCHS_PER_ETH1_VOTING_PERIOD*SLOTS_PER_EPOCH" ssz-max:"2048"`
ETH1DepositIndex uint64
Validators []*phase0.Validator `ssz-max:"1099511627776"`
Balances []phase0.Gwei `ssz-max:"1099511627776"`
Validators []*phase0.Validator `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
Balances []phase0.Gwei `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
RANDAOMixes []phase0.Root `dynssz-size:"EPOCHS_PER_HISTORICAL_VECTOR,32" ssz-size:"65536,32"`
Slashings []phase0.Gwei `dynssz-size:"EPOCHS_PER_SLASHINGS_VECTOR" ssz-size:"8192"`
PreviousEpochParticipation []ParticipationFlags `ssz-max:"1099511627776"`
CurrentEpochParticipation []ParticipationFlags `ssz-max:"1099511627776"`
PreviousEpochParticipation []ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentEpochParticipation []ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
JustificationBits bitfield.Bitvector4 `ssz-size:"1"`
PreviousJustifiedCheckpoint *phase0.Checkpoint
CurrentJustifiedCheckpoint *phase0.Checkpoint
FinalizedCheckpoint *phase0.Checkpoint
InactivityScores []uint64 `ssz-max:"1099511627776"`
InactivityScores []uint64 `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentSyncCommittee *SyncCommittee
NextSyncCommittee *SyncCommittee
}
Expand Down
10 changes: 5 additions & 5 deletions spec/bellatrix/beaconblockbody.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type BeaconBlockBody struct {
RANDAOReveal phase0.BLSSignature `ssz-size:"96"`
ETH1Data *phase0.ETH1Data
Graffiti [32]byte `ssz-size:"32"`
ProposerSlashings []*phase0.ProposerSlashing `ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `ssz-max:"2"`
Attestations []*phase0.Attestation `ssz-max:"128"`
Deposits []*phase0.Deposit `ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `ssz-max:"16"`
ProposerSlashings []*phase0.ProposerSlashing `dynssz-max:"MAX_PROPOSER_SLASHINGS" ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `dynssz-max:"MAX_ATTESTER_SLASHINGS" ssz-max:"2"`
Attestations []*phase0.Attestation `dynssz-max:"MAX_ATTESTATIONS" ssz-max:"128"`
Deposits []*phase0.Deposit `dynssz-max:"MAX_DEPOSITS" ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `dynssz-max:"MAX_VOLUNTARY_EXITS" ssz-max:"16"`
SyncAggregate *altair.SyncAggregate
ExecutionPayload *ExecutionPayload
}
Expand Down
14 changes: 7 additions & 7 deletions spec/bellatrix/beaconstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ type BeaconState struct {
LatestBlockHeader *phase0.BeaconBlockHeader
BlockRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
StateRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
HistoricalRoots []phase0.Root `ssz-max:"16777216" ssz-size:"?,32"`
HistoricalRoots []phase0.Root `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216" ssz-size:"?,32"`
ETH1Data *phase0.ETH1Data
ETH1DataVotes []*phase0.ETH1Data `ssz-max:"2048"`
ETH1DataVotes []*phase0.ETH1Data `dynssz-max:"EPOCHS_PER_ETH1_VOTING_PERIOD*SLOTS_PER_EPOCH" ssz-max:"2048"`
ETH1DepositIndex uint64
Validators []*phase0.Validator `ssz-max:"1099511627776"`
Balances []phase0.Gwei `ssz-max:"1099511627776"`
Validators []*phase0.Validator `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
Balances []phase0.Gwei `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
RANDAOMixes []phase0.Root `dynssz-size:"EPOCHS_PER_HISTORICAL_VECTOR,32" ssz-size:"65536,32"`
Slashings []phase0.Gwei `dynssz-size:"EPOCHS_PER_SLASHINGS_VECTOR" ssz-size:"8192"`
PreviousEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
PreviousEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
JustificationBits bitfield.Bitvector4 `ssz-size:"1"`
PreviousJustifiedCheckpoint *phase0.Checkpoint
CurrentJustifiedCheckpoint *phase0.Checkpoint
FinalizedCheckpoint *phase0.Checkpoint
InactivityScores []uint64 `ssz-max:"1099511627776"`
InactivityScores []uint64 `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentSyncCommittee *altair.SyncCommittee
NextSyncCommittee *altair.SyncCommittee
LatestExecutionPayloadHeader *ExecutionPayloadHeader
Expand Down
4 changes: 2 additions & 2 deletions spec/bellatrix/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ type ExecutionPayload struct {
GasLimit uint64
GasUsed uint64
Timestamp uint64
ExtraData []byte `ssz-max:"32"`
ExtraData []byte `dynssz-max:"MAX_EXTRA_DATA_BYTES" ssz-max:"32"`
BaseFeePerGas [32]byte `ssz-size:"32"`
BlockHash phase0.Hash32 `ssz-size:"32"`
Transactions []Transaction `ssz-max:"1048576,1073741824"`
Transactions []Transaction `dynssz-max:"MAX_TRANSACTIONS_PER_PAYLOAD,MAX_BYTES_PER_TRANSACTION" ssz-max:"1048576,1073741824"`
}

// executionPayloadJSON is the spec representation of the struct.
Expand Down
12 changes: 6 additions & 6 deletions spec/capella/beaconblockbody.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ type BeaconBlockBody struct {
RANDAOReveal phase0.BLSSignature `ssz-size:"96"`
ETH1Data *phase0.ETH1Data
Graffiti [32]byte `ssz-size:"32"`
ProposerSlashings []*phase0.ProposerSlashing `ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `ssz-max:"2"`
Attestations []*phase0.Attestation `ssz-max:"128"`
Deposits []*phase0.Deposit `ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `ssz-max:"16"`
ProposerSlashings []*phase0.ProposerSlashing `dynssz-max:"MAX_PROPOSER_SLASHINGS" ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `dynssz-max:"MAX_ATTESTER_SLASHINGS" ssz-max:"2"`
Attestations []*phase0.Attestation `dynssz-max:"MAX_ATTESTATIONS" ssz-max:"128"`
Deposits []*phase0.Deposit `dynssz-max:"MAX_DEPOSITS" ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `dynssz-max:"MAX_VOLUNTARY_EXITS" ssz-max:"16"`
SyncAggregate *altair.SyncAggregate
ExecutionPayload *ExecutionPayload
BLSToExecutionChanges []*SignedBLSToExecutionChange `ssz-max:"16"`
BLSToExecutionChanges []*SignedBLSToExecutionChange `dynssz-max:"MAX_BLS_TO_EXECUTION_CHANGES" ssz-max:"16"`
}

// beaconBlockBodyJSON is the spec representation of the struct.
Expand Down
16 changes: 8 additions & 8 deletions spec/capella/beaconstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ type BeaconState struct {
LatestBlockHeader *phase0.BeaconBlockHeader
BlockRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
StateRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
HistoricalRoots []phase0.Root `ssz-max:"16777216" ssz-size:"?,32"`
HistoricalRoots []phase0.Root `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216" ssz-size:"?,32"`
ETH1Data *phase0.ETH1Data
ETH1DataVotes []*phase0.ETH1Data `ssz-max:"2048"`
ETH1DataVotes []*phase0.ETH1Data `dynssz-max:"EPOCHS_PER_ETH1_VOTING_PERIOD*SLOTS_PER_EPOCH" ssz-max:"2048"`
ETH1DepositIndex uint64
Validators []*phase0.Validator `ssz-max:"1099511627776"`
Balances []phase0.Gwei `ssz-max:"1099511627776"`
Validators []*phase0.Validator `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
Balances []phase0.Gwei `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
RANDAOMixes []phase0.Root `dynssz-size:"EPOCHS_PER_HISTORICAL_VECTOR,32" ssz-size:"65536,32"`
Slashings []phase0.Gwei `dynssz-size:"EPOCHS_PER_SLASHINGS_VECTOR" ssz-size:"8192"`
PreviousEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
PreviousEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
JustificationBits bitfield.Bitvector4 `ssz-size:"1"`
PreviousJustifiedCheckpoint *phase0.Checkpoint
CurrentJustifiedCheckpoint *phase0.Checkpoint
FinalizedCheckpoint *phase0.Checkpoint
InactivityScores []uint64 `ssz-max:"1099511627776"`
InactivityScores []uint64 `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentSyncCommittee *altair.SyncCommittee
NextSyncCommittee *altair.SyncCommittee
LatestExecutionPayloadHeader *ExecutionPayloadHeader
NextWithdrawalIndex WithdrawalIndex
NextWithdrawalValidatorIndex phase0.ValidatorIndex
HistoricalSummaries []*HistoricalSummary `ssz-max:"16777216"`
HistoricalSummaries []*HistoricalSummary `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216"`
}

// String returns a string version of the structure.
Expand Down
8 changes: 5 additions & 3 deletions spec/capella/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (
)

// ExecutionPayload represents an execution layer payload.
//
//nolint:revive
type ExecutionPayload struct {
ParentHash phase0.Hash32 `ssz-size:"32"`
FeeRecipient bellatrix.ExecutionAddress `ssz-size:"20"`
Expand All @@ -40,11 +42,11 @@ type ExecutionPayload struct {
GasLimit uint64
GasUsed uint64
Timestamp uint64
ExtraData []byte `ssz-max:"32"`
ExtraData []byte `dynssz-max:"MAX_EXTRA_DATA_BYTES" ssz-max:"32"`
BaseFeePerGas [32]byte `ssz-size:"32"`
BlockHash phase0.Hash32 `ssz-size:"32"`
Transactions []bellatrix.Transaction `ssz-max:"1048576,1073741824" ssz-size:"?,?"`
Withdrawals []*Withdrawal `ssz-max:"16"`
Transactions []bellatrix.Transaction `dynssz-max:"MAX_TRANSACTIONS_PER_PAYLOAD,MAX_BYTES_PER_TRANSACTION" ssz-max:"1048576,1073741824" ssz-size:"?,?"`
Withdrawals []*Withdrawal `dynssz-max:"MAX_WITHDRAWALS_PER_PAYLOAD" ssz-max:"16"`
}

// executionPayloadJSON is the spec representation of the struct.
Expand Down
16 changes: 9 additions & 7 deletions spec/deneb/beaconblockbody.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ import (
)

// BeaconBlockBody represents the body of a beacon block.
//
//nolint:revive
type BeaconBlockBody struct {
RANDAOReveal phase0.BLSSignature `ssz-size:"96"`
ETH1Data *phase0.ETH1Data
Graffiti [32]byte `ssz-size:"32"`
ProposerSlashings []*phase0.ProposerSlashing `ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `ssz-max:"2"`
Attestations []*phase0.Attestation `ssz-max:"128"`
Deposits []*phase0.Deposit `ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `ssz-max:"16"`
ProposerSlashings []*phase0.ProposerSlashing `dynssz-max:"MAX_PROPOSER_SLASHINGS" ssz-max:"16"`
AttesterSlashings []*phase0.AttesterSlashing `dynssz-max:"MAX_ATTESTER_SLASHINGS" ssz-max:"2"`
Attestations []*phase0.Attestation `dynssz-max:"MAX_ATTESTATIONS" ssz-max:"128"`
Deposits []*phase0.Deposit `dynssz-max:"MAX_DEPOSITS" ssz-max:"16"`
VoluntaryExits []*phase0.SignedVoluntaryExit `dynssz-max:"MAX_VOLUNTARY_EXITS" ssz-max:"16"`
SyncAggregate *altair.SyncAggregate
ExecutionPayload *ExecutionPayload
BLSToExecutionChanges []*capella.SignedBLSToExecutionChange `ssz-max:"16"`
BlobKZGCommitments []KZGCommitment `ssz-max:"4096" ssz-size:"?,48"`
BLSToExecutionChanges []*capella.SignedBLSToExecutionChange `dynssz-max:"MAX_BLS_TO_EXECUTION_CHANGES" ssz-max:"16"`
BlobKZGCommitments []KZGCommitment `dynssz-max:"MAX_BLOB_COMMITMENTS_PER_BLOCK" ssz-max:"4096" ssz-size:"?,48"`
}

// String returns a string version of the structure.
Expand Down
16 changes: 8 additions & 8 deletions spec/deneb/beaconstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ type BeaconState struct {
LatestBlockHeader *phase0.BeaconBlockHeader
BlockRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
StateRoots []phase0.Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
HistoricalRoots []phase0.Root `ssz-max:"16777216" ssz-size:"?,32"`
HistoricalRoots []phase0.Root `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216" ssz-size:"?,32"`
ETH1Data *phase0.ETH1Data
ETH1DataVotes []*phase0.ETH1Data `ssz-max:"2048"`
ETH1DataVotes []*phase0.ETH1Data `dynssz-max:"EPOCHS_PER_ETH1_VOTING_PERIOD*SLOTS_PER_EPOCH" ssz-max:"2048"`
ETH1DepositIndex uint64
Validators []*phase0.Validator `ssz-max:"1099511627776"`
Balances []phase0.Gwei `ssz-max:"1099511627776"`
Validators []*phase0.Validator `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
Balances []phase0.Gwei `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
RANDAOMixes []phase0.Root `dynssz-size:"EPOCHS_PER_HISTORICAL_VECTOR,32" ssz-size:"65536,32"`
Slashings []phase0.Gwei `dynssz-size:"EPOCHS_PER_SLASHINGS_VECTOR" ssz-size:"8192"`
PreviousEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `ssz-max:"1099511627776"`
PreviousEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentEpochParticipation []altair.ParticipationFlags `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
JustificationBits bitfield.Bitvector4 `ssz-size:"1"`
PreviousJustifiedCheckpoint *phase0.Checkpoint
CurrentJustifiedCheckpoint *phase0.Checkpoint
FinalizedCheckpoint *phase0.Checkpoint
InactivityScores []uint64 `ssz-max:"1099511627776"`
InactivityScores []uint64 `dynssz-max:"VALIDATOR_REGISTRY_LIMIT" ssz-max:"1099511627776"`
CurrentSyncCommittee *altair.SyncCommittee
NextSyncCommittee *altair.SyncCommittee
LatestExecutionPayloadHeader *ExecutionPayloadHeader
NextWithdrawalIndex capella.WithdrawalIndex
NextWithdrawalValidatorIndex phase0.ValidatorIndex
HistoricalSummaries []*capella.HistoricalSummary `ssz-max:"16777216"`
HistoricalSummaries []*capella.HistoricalSummary `dynssz-max:"HISTORICAL_ROOTS_LIMIT" ssz-max:"16777216"`
}

// String returns a string version of the structure.
Expand Down
8 changes: 5 additions & 3 deletions spec/deneb/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
)

// ExecutionPayload represents an execution layer payload.
//
//nolint:revive
type ExecutionPayload struct {
ParentHash phase0.Hash32 `ssz-size:"32"`
FeeRecipient bellatrix.ExecutionAddress `ssz-size:"20"`
Expand All @@ -35,11 +37,11 @@ type ExecutionPayload struct {
GasLimit uint64
GasUsed uint64
Timestamp uint64
ExtraData []byte `ssz-max:"32"`
ExtraData []byte `dynssz-max:"MAX_EXTRA_DATA_BYTES" ssz-max:"32"`
BaseFeePerGas *uint256.Int `ssz-size:"32"`
BlockHash phase0.Hash32 `ssz-size:"32"`
Transactions []bellatrix.Transaction `ssz-max:"1048576,1073741824" ssz-size:"?,?"`
Withdrawals []*capella.Withdrawal `ssz-max:"16"`
Transactions []bellatrix.Transaction `dynssz-max:"MAX_TRANSACTIONS_PER_PAYLOAD,MAX_BYTES_PER_TRANSACTION" ssz-max:"1048576,1073741824" ssz-size:"?,?"`
Withdrawals []*capella.Withdrawal `dynssz-max:"MAX_WITHDRAWALS_PER_PAYLOAD" ssz-max:"16"`
BlobGasUsed uint64
ExcessBlobGas uint64
}
Expand Down
9 changes: 3 additions & 6 deletions spec/electra/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ import (
)

// Attestation is the Ethereum 2 attestation structure.
//
//nolint:tagalign
type Attestation struct {
AggregationBits bitfield.Bitlist `ssz-max:"131072" dynssz-max:"MAX_VALIDATORS_PER_COMMITTEE*MAX_COMMITTEES_PER_SLOT"`
AggregationBits bitfield.Bitlist `dynssz-max:"MAX_VALIDATORS_PER_COMMITTEE*MAX_COMMITTEES_PER_SLOT" ssz-max:"131072"`
Data *phase0.AttestationData
Signature phase0.BLSSignature `ssz-size:"96"`
// bitfield.Bitvector64 is an 8 byte array so dynamic sizing doesn't make sense.
CommitteeBits bitfield.Bitvector64 `ssz-size:"8"`
Signature phase0.BLSSignature `ssz-size:"96"`
CommitteeBits bitfield.Bitvector64 `dynssz-size:"MAX_COMMITTEES_PER_SLOT/8" ssz-size:"8"`
}

// attestationJSON is a raw representation of the struct.
Expand Down
Loading

0 comments on commit b41ce95

Please sign in to comment.