Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ssz): Implement basic generalized index stuff #837

Merged
merged 34 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bet
  • Loading branch information
itsdevbear committed Apr 21, 2024
commit 930b932dcaba5a653a90e860add6b991e3c8d029
13 changes: 13 additions & 0 deletions mod/core/types/body.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ func (b *BeaconBlockBodyDeneb) GetRandaoReveal() primitives.BLSSignature {
return b.RandaoReveal
}

// GetEth1Data returns the Eth1Data of the Body.
func (b *BeaconBlockBodyDeneb) GetEth1Data() *primitives.Eth1Data {
return b.Eth1Data
}

// GetExecutionPayload returns the ExecutionPayload of the Body.
//
//nolint:lll
Expand Down Expand Up @@ -137,6 +142,14 @@ func (b *BeaconBlockBodyDeneb) SetBlobKzgCommitments(
b.BlobKzgCommitments = commitments
}

// SetBlobKzgCommitments sets the BlobKzgCommitments of the
// BeaconBlockBodyDeneb.
func (b *BeaconBlockBodyDeneb) SetEth1Data(
eth1Data *primitives.Eth1Data,
) {
b.Eth1Data = eth1Data
}

// GetTopLevelRoots returns the top-level roots of the BeaconBlockBodyDeneb.
func (b *BeaconBlockBodyDeneb) GetTopLevelRoots() ([][32]byte, error) {
layer := make([][32]byte, BodyLengthDeneb)
Expand Down
2 changes: 2 additions & 0 deletions mod/core/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type BeaconBlockBody interface {
// WriteOnlyBeaconBlockBody is the interface for a write-only beacon block body.
type WriteOnlyBeaconBlockBody interface {
SetDeposits([]*primitives.Deposit)
SetEth1Data(*primitives.Eth1Data)
SetExecutionData(engineprimitives.ExecutionPayload) error
SetBlobKzgCommitments(kzg.Commitments)
}
Expand All @@ -81,6 +82,7 @@ type ReadOnlyBeaconBlockBody interface {

// Execution returns the execution data of the block.
GetDeposits() []*primitives.Deposit
GetEth1Data() *primitives.Eth1Data
GetGraffiti() primitives.Bytes32
GetRandaoReveal() primitives.BLSSignature
GetExecutionPayload() engineprimitives.ExecutionPayload
Expand Down
Loading