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(transition): Skip state transition on nil block #1362

Merged
merged 46 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6509691
bet
itsdevbear Jun 6, 2024
7c5224a
bet
itsdevbear Jun 6, 2024
0225446
bet
itsdevbear Jun 6, 2024
978a78a
Merge branch 'abort-on-found' into skip-slot
itsdevbear Jun 6, 2024
5ce37fe
Revert "bet"
itsdevbear Jun 6, 2024
2219afe
bet
itsdevbear Jun 6, 2024
e8b8c98
x
itsdevbear Jun 6, 2024
64c2cfa
bet
itsdevbear Jun 6, 2024
ab46121
bet
itsdevbear Jun 6, 2024
c6cba25
Merge branch 'main' into skip-slot
itsdevbear Jun 6, 2024
2a5764e
bet
ocnc Jun 6, 2024
56f1e79
its a bet
itsdevbear Jun 6, 2024
b406c65
Merge branch 'skip-slot' of ssh://github.com/berachain/beacon-kit int…
itsdevbear Jun 6, 2024
e7d1223
bet
itsdevbear Jun 6, 2024
94919a3
bet
itsdevbear Jun 6, 2024
dff2cab
bet
ocnc Jun 6, 2024
15a73c8
bet
itsdevbear Jun 6, 2024
cec1a22
betbet
ocnc Jun 6, 2024
651495a
bet
itsdevbear Jun 6, 2024
a6d5eae
Merge branch 'skip-slot' of ssh://github.com/berachain/beacon-kit int…
itsdevbear Jun 6, 2024
69bac3e
bet
itsdevbear Jun 6, 2024
8d0096f
bet
itsdevbear Jun 6, 2024
239e9e8
bet
itsdevbear Jun 6, 2024
1fac16e
bet
itsdevbear Jun 6, 2024
838269d
bet
itsdevbear Jun 6, 2024
2e3a5a8
bet
itsdevbear Jun 6, 2024
ab232b3
bet
itsdevbear Jun 6, 2024
c781a6f
remove diagram
itsdevbear Jun 6, 2024
69c83d8
bet
itsdevbear Jun 6, 2024
654ca2d
bet
itsdevbear Jun 6, 2024
18b5d5a
bet
itsdevbear Jun 6, 2024
d4ca525
bet
itsdevbear Jun 6, 2024
bd4dc4b
bet
itsdevbear Jun 6, 2024
46425fc
bet
itsdevbear Jun 6, 2024
a7f0802
bet
itsdevbear Jun 6, 2024
19ff1b8
its-a-bet
itsdevbear Jun 6, 2024
9800fad
crank the fucksup
itsdevbear Jun 6, 2024
fe7663f
Merge branch 'main' into skip-slot
itsdevbear Jun 6, 2024
39be382
chainid
itsdevbear Jun 6, 2024
73086a2
remove pubkeys
itsdevbear Jun 6, 2024
d1ed99e
Merge branch 'main' into skip-slot
itsdevbear Jun 6, 2024
46484f9
minor changes
itsdevbear Jun 6, 2024
a20f4ca
update default cfg
itsdevbear Jun 6, 2024
30daa13
remove chaos
itsdevbear Jun 6, 2024
0164a3c
bump geth
itsdevbear Jun 6, 2024
1367ebe
Merge branch 'main' into skip-slot
itsdevbear Jun 6, 2024
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
2 changes: 1 addition & 1 deletion beacond/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ require (
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum/c-kzg-4844 v1.0.2 // indirect
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e // indirect
github.com/ethereum/go-ethereum v1.14.5 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions beacond/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
Expand Down
2 changes: 1 addition & 1 deletion build/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bazelbuild/buildtools v0.0.0-20240422193413-1429e15ae755
github.com/bufbuild/buf v1.32.1
github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e
github.com/ethereum/go-ethereum v1.14.5
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
github.com/golangci/golangci-lint v1.59.0
Expand Down
4 changes: 2 additions & 2 deletions build/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q=
Expand Down
30 changes: 30 additions & 0 deletions go.work.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kurtosis/beaconkit-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ network_configuration:
type: "validator"
nodes:
- el_type: besu
kzg_impl: ethereum/c-kzg-4844
kzg_impl: crate-crypto/go-kzg-4844
replicas: 1
- el_type: nethermind
kzg_impl: crate-crypto/go-kzg-4844
Expand Down
7 changes: 3 additions & 4 deletions mod/beacon/blockchain/execution_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func (s *Service[
) {
if s.lb.Enabled() /* TODO: check for syncing once comet pr merged*/ {
stCopy := st.Copy()
if _, err := s.sp.ProcessSlot(
stCopy,
if _, err := s.sp.ProcessSlots(
stCopy, blk.GetSlot()+1,
); err != nil {
return
}
Expand Down Expand Up @@ -130,8 +130,7 @@ func (s *Service[
s.logger.
Error(
"failed to send forkchoice update with attributes",
"error",
err,
"error", err,
)
}

Expand Down
22 changes: 10 additions & 12 deletions mod/beacon/blockchain/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,20 @@ type StateProcessor[
// state
// from the eth1 deposits.
InitializePreminedBeaconStateFromEth1(
st BeaconStateT,
deposits []DepositT,
executionPayloadHeader *types.ExecutionPayloadHeader,
genesisVersion primitives.Version,
BeaconStateT,
[]DepositT,
*types.ExecutionPayloadHeader,
primitives.Version,
) ([]*transition.ValidatorUpdate, error)
// ProcessSlot processes the state transition for a single slot.
//
// TODO: This eventually needs to be deprecated.
ProcessSlot(
st BeaconStateT,
// ProcessSlots processes the state transition for a range of slots.
ProcessSlots(
BeaconStateT, math.Slot,
) ([]*transition.ValidatorUpdate, error)
// Transition processes the state transition for a given block.
Transition(
ctx ContextT,
st BeaconStateT,
blk BeaconBlockT,
ContextT,
BeaconStateT,
BeaconBlockT,
) ([]*transition.ValidatorUpdate, error)
}

Expand Down
2 changes: 1 addition & 1 deletion mod/beacon/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.2 // indirect
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e // indirect
github.com/ethereum/go-ethereum v1.14.5 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1 // indirect
github.com/getsentry/sentry-go v0.28.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions mod/beacon/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1 h1:UoDO5Z+y7ttaMmewhs7G6ftAdQ4UnPus/g23KmtbQBk=
Expand Down
2 changes: 1 addition & 1 deletion mod/beacon/validator/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (s *Service[

// Prepare the state such that it is ready to build a block for
// the request slot
if err := s.prepareStateForBuilding(st, requestedSlot); err != nil {
if _, err := s.stateProcessor.ProcessSlots(st, requestedSlot); err != nil {
return blk, sidecars, err
}

Expand Down
4 changes: 2 additions & 2 deletions mod/beacon/validator/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ func (s *Service[
}

// We process the slot to update any RANDAO values.
if _, err = s.stateProcessor.ProcessSlot(
st,
if _, err = s.stateProcessor.ProcessSlots(
st, slot,
); err != nil {
return err
}
Expand Down
45 changes: 39 additions & 6 deletions mod/beacon/validator/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,44 @@ package validator

import (
"context"
"sync"

"github.com/berachain/beacon-kit/mod/errors"
"github.com/berachain/beacon-kit/mod/primitives"
)

// ReceiveBlockAndBlobs receives a block and blobs from the
// network and processes them.
func (s *Service[
BeaconBlockT, BeaconBlockBodyT, BeaconStateT,
BlobSidecarsT, DepositStoreT, ForkDataT,
]) ReceiveBlockAndBlobs(
ctx context.Context,
blk BeaconBlockT,
blobs BlobSidecarsT,
) error {
var (
blockErr, blobsErr error
wg sync.WaitGroup
)
//nolint:mnd // 2 go-routines.
wg.Add(2)

go func() {
defer wg.Done()
blockErr = s.VerifyIncomingBlock(ctx, blk)
}()

go func() {
defer wg.Done()
blobsErr = s.VerifyIncomingBlobs(ctx, blk, blobs)
}()

wg.Wait()

return errors.JoinFatal(blockErr, blobsErr)
}

// VerifyIncomingBlock verifies the state root of an incoming block
// and logs the process.
func (s *Service[
Expand All @@ -46,11 +80,10 @@ func (s *Service[

// If the block is nil or a nil pointer, exit early.
if blk.IsNil() {
s.logger.Error(
s.logger.Warn(
"aborting block verification - beacon block not found in proposal 🚫 ",
)

return ErrNilBlk
return errors.WrapNonFatal(ErrNilBlk)
}

s.logger.Info(
Expand Down Expand Up @@ -115,14 +148,14 @@ func (s *Service[
sidecars BlobSidecarsT,
) error {
if blk.IsNil() {
s.logger.Error(
s.logger.Warn(
"aborting blob verification - beacon block not found in proposal 🚫 ",
)
return ErrNilBlk
return errors.WrapNonFatal(ErrNilBlk)
}

// If there are no blobs to verify, return early.
if sidecars.Len() == 0 {
if sidecars.IsNil() || sidecars.Len() == 0 {
s.logger.Info(
"no blob sidecars to verify, skipping verifier 🧢 ",
"slot",
Expand Down
57 changes: 0 additions & 57 deletions mod/beacon/validator/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,66 +27,9 @@ import (
engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors"
"github.com/berachain/beacon-kit/mod/errors"
"github.com/berachain/beacon-kit/mod/primitives"
"github.com/berachain/beacon-kit/mod/primitives/pkg/math"
"github.com/berachain/beacon-kit/mod/primitives/pkg/transition"
)

// prepareStateForBuilding ensures that the state is at the requested slot
// before building a block.
func (s *Service[
BeaconBlockT, BeaconBlockBodyT, BeaconStateT,
BlobSidecarsT, DepositStoreT, ForkDataT,
]) prepareStateForBuilding(
st BeaconStateT,
requestedSlot math.Slot,
) error {
// Get the current state slot.
stateSlot, err := st.GetSlot()
if err != nil {
return err
}

slotDifference := requestedSlot - stateSlot
switch {
case slotDifference == 1:
// If our BeaconState is not up to date, we need to process
// a slot to get it up to date.
if _, err = s.stateProcessor.ProcessSlot(st); err != nil {
return err
}

// Request the slot again, it should've been incremented by 1.
stateSlot, err = st.GetSlot()
if err != nil {
return err
}

// If after doing so, we aren't exactly at the requested slot,
// we should return an error.
if requestedSlot != stateSlot {
return errors.Newf(
"requested slot could not be processed, requested: %d, state: %d",
requestedSlot,
stateSlot,
)
}
case slotDifference > 1:
return errors.Newf(
"requested slot is too far ahead, requested: %d, state: %d",
requestedSlot,
stateSlot,
)
case slotDifference < 1:
return errors.Newf(
"requested slot is in the past, requested: %d, state: %d",
requestedSlot,
stateSlot,
)
}

return nil
}

// computeStateRoot computes the state root of an outgoing block.
func (s *Service[
BeaconBlockT, BeaconBlockBodyT, BeaconStateT,
Expand Down
6 changes: 4 additions & 2 deletions mod/beacon/validator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ type BlobProcessor[
type BlobSidecars interface {
// BlobSidecars must be ssz.Marshallable.
ssz.Marshallable
// IsNil checks if the blob sidecars is nil.
IsNil() bool
// Len returns the length of the blob sidecars.
Len() int
}
Expand Down Expand Up @@ -222,8 +224,8 @@ type StateProcessor[
ContextT any,
] interface {
// ProcessSlot processes the slot.
ProcessSlot(
st BeaconStateT,
ProcessSlots(
st BeaconStateT, slot math.Slot,
) ([]*transition.ValidatorUpdate, error)

// Transition performs the core state transition.
Expand Down
2 changes: 1 addition & 1 deletion mod/consensus-types/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-00010101000000-000000000000
github.com/berachain/beacon-kit/mod/errors v0.0.0-00010101000000-000000000000
github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240429161625-c105cec3420c
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e
github.com/ethereum/go-ethereum v1.14.5
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions mod/consensus-types/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1 h1:UoDO5Z+y7ttaMmewhs7G6ftAdQ4UnPus/g23KmtbQBk=
Expand Down
4 changes: 3 additions & 1 deletion mod/consensus-types/pkg/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (w *BeaconBlock) NewFromSSZ(

// IsNil checks if the beacon block is nil.
func (w *BeaconBlock) IsNil() bool {
return w.RawBeaconBlock == nil || w.RawBeaconBlock.IsNil()
return w == nil ||
w.RawBeaconBlock == nil ||
w.RawBeaconBlock.IsNil()
}

// BeaconBlockDeneb represents a block in the beacon chain during
Expand Down
2 changes: 1 addition & 1 deletion mod/da/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e // indirect
github.com/ethereum/go-ethereum v1.14.5 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/getsentry/sentry-go v0.28.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions mod/da/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1 h1:UoDO5Z+y7ttaMmewhs7G6ftAdQ4UnPus/g23KmtbQBk=
Expand Down
2 changes: 1 addition & 1 deletion mod/da/pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (s *Store[BeaconBlockT]) Persist(
sidecars *types.BlobSidecars,
) error {
// Exit early if there are no sidecars to store.
if sidecars.Len() == 0 {
if sidecars.IsNil() || sidecars.Len() == 0 {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion mod/engine-primitives/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ replace (
require (
github.com/berachain/beacon-kit/mod/errors v0.0.0-00010101000000-000000000000
github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240429161625-c105cec3420c
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e
github.com/ethereum/go-ethereum v1.14.5
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1
github.com/stretchr/testify v1.9.0
)
Expand Down
4 changes: 2 additions & 2 deletions mod/engine-primitives/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/ethereum/c-kzg-4844 v1.0.2 h1:8tV84BCEiPeOkiVgW9mpYBeBUir2bkCNVqxPwwVeO+s=
github.com/ethereum/c-kzg-4844 v1.0.2/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e h1:T+/Xbpy15H52n7g7C2lZb1eR/93L5CGFjn0faXZdZp4=
github.com/ethereum/go-ethereum v1.14.4-0.20240530142416-2262bf34158e/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ferranbt/fastssz v0.1.4-0.20240422063434-a4db75388da1 h1:UoDO5Z+y7ttaMmewhs7G6ftAdQ4UnPus/g23KmtbQBk=
Expand Down
Loading
Loading