Skip to content

Commit

Permalink
feat(ssz): Move sidecars onto karalabe (#1778)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear authored Jul 25, 2024
1 parent 201979a commit c651574
Show file tree
Hide file tree
Showing 26 changed files with 423 additions and 1,367 deletions.
1 change: 1 addition & 0 deletions beacond/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ replace (
cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240623110059-dec2d5583e39
cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20240623110059-dec2d5583e39
github.com/cosmos/cosmos-sdk => github.com/berachain/cosmos-sdk v0.46.0-beta2.0.20240624014538-75ba469b1881
github.com/karalabe/ssz => github.com/itsdevbear/ssz v0.0.0-20240725155830-5bd985129878
)

require (
Expand Down
2 changes: 1 addition & 1 deletion mod/beacon/block_store/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

// BeaconBlock is a generic interface for a beacon block.
type BeaconBlock interface {
constraints.SSZMarshallable
constraints.SSZMarshaler
// GetSlot returns the slot of the block.
GetSlot() math.U64
}
Expand Down
6 changes: 3 additions & 3 deletions mod/beacon/blockchain/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type BeaconBlock[
BeaconBlockBodyT BeaconBlockBody[ExecutionPayloadT],
ExecutionPayloadT any,
] interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
constraints.Nillable
// GetSlot returns the slot of the beacon block.
GetSlot() math.Slot
Expand All @@ -62,7 +62,7 @@ type BeaconBlock[

// BeaconBlockBody represents the interface for the beacon block body.
type BeaconBlockBody[ExecutionPayloadT any] interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
constraints.Nillable
// GetExecutionPayload returns the execution payload of the beacon block
// body.
Expand All @@ -71,7 +71,7 @@ type BeaconBlockBody[ExecutionPayloadT any] interface {

// BeaconBlockHeader represents the interface for the beacon block header.
type BeaconBlockHeader interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
// SetStateRoot sets the state root of the beacon block header.
SetStateRoot(common.Root)
}
Expand Down
6 changes: 3 additions & 3 deletions mod/consensus-types/pkg/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type WriteOnlyBeaconBlockBody interface {
// ReadOnlyBeaconBlockBody is the interface for
// a read-only beacon block body.
type ReadOnlyBeaconBlockBody interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
IsNil() bool

// Execution returns the execution data of the block.
Expand All @@ -66,7 +66,7 @@ type ReadOnlyBeaconBlockBody interface {

// RawBeaconBlock is the interface for a beacon block.
type RawBeaconBlock[BeaconBlockBodyT RawBeaconBlockBody] interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
SetStateRoot(common.Root)
GetStateRoot() common.Root
IsNil() bool
Expand All @@ -80,7 +80,7 @@ type RawBeaconBlock[BeaconBlockBodyT RawBeaconBlockBody] interface {

// executionPayloadBody is the interface for the execution data of a block.
type executionPayloadBody interface {
constraints.SSZMarshallable
constraints.SSZMarshallableRootable
constraints.JSONMarshallable
IsNil() bool
Version() uint32
Expand Down
103 changes: 0 additions & 103 deletions mod/consensus-types/pkg/types/mocks/execution_payload_body.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 0 additions & 103 deletions mod/consensus-types/pkg/types/mocks/inner_execution_payload.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c651574

Please sign in to comment.