diff --git a/beacon-chain/core/blocks/withdrawals.go b/beacon-chain/core/blocks/withdrawals.go index 02a565dcb..2a938476d 100644 --- a/beacon-chain/core/blocks/withdrawals.go +++ b/beacon-chain/core/blocks/withdrawals.go @@ -201,7 +201,7 @@ func BLSChangesSignatureBatch( // It validates the signature with the Capella fork version if the passed state // is from a previous fork. func VerifyBLSChangeSignature( - st state.BeaconState, + st state.ReadOnlyBeaconState, change *ethpbv2.SignedBLSToExecutionChange, ) error { c := params.BeaconConfig() diff --git a/beacon-chain/rpc/eth/beacon/pool.go b/beacon-chain/rpc/eth/beacon/pool.go index b1be681b0..c223fcbad 100644 --- a/beacon-chain/rpc/eth/beacon/pool.go +++ b/beacon-chain/rpc/eth/beacon/pool.go @@ -315,7 +315,7 @@ func (bs *Server) SubmitVoluntaryExit(ctx context.Context, req *ethpbv1.SignedVo func (bs *Server) SubmitSignedBLSToExecutionChanges(ctx context.Context, req *ethpbv2.SubmitBLSToExecutionChangesRequest) (*emptypb.Empty, error) { ctx, span := trace.StartSpan(ctx, "beacon.SubmitSignedBLSToExecutionChanges") defer span.End() - st, err := bs.ChainInfoFetcher.HeadState(ctx) + st, err := bs.ChainInfoFetcher.HeadStateReadOnly(ctx) if err != nil { return nil, status.Errorf(codes.Internal, "Could not get head state: %v", err) } @@ -372,7 +372,7 @@ func (bs *Server) broadcastBLSBatch(ctx context.Context, ptr *[]*ethpbalpha.Sign if len(changes) < broadcastBLSChangesRateLimit { limit = len(changes) } - st, err := bs.ChainInfoFetcher.HeadState(ctx) + st, err := bs.ChainInfoFetcher.HeadStateReadOnly(ctx) if err != nil { log.WithError(err).Error("could not get head state") return diff --git a/beacon-chain/sync/broadcast_bls_changes.go b/beacon-chain/sync/broadcast_bls_changes.go index f74595a7d..e2cade9b0 100644 --- a/beacon-chain/sync/broadcast_bls_changes.go +++ b/beacon-chain/sync/broadcast_bls_changes.go @@ -49,7 +49,7 @@ func (s *Service) broadcastBLSBatch(ctx context.Context, ptr *[]*ethpb.SignedBLS if len(changes) < broadcastBLSChangesRateLimit { limit = len(changes) } - st, err := s.cfg.chain.HeadState(ctx) + st, err := s.cfg.chain.HeadStateReadOnly(ctx) if err != nil { log.WithError(err).Error("could not get head state") return