Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
v4.0.0 rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Mar 30, 2023
1 parent d91cdff commit 48fb92e
Show file tree
Hide file tree
Showing 14 changed files with 204 additions and 63 deletions.
3 changes: 2 additions & 1 deletion beacon-chain/blockchain/execution_engine.go
Expand Up @@ -18,6 +18,7 @@ import (
payloadattribute "github.com/prysmaticlabs/prysm/v4/consensus-types/payload-attribute"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/encoding/bytesutil"
"github.com/prysmaticlabs/prysm/v4/proto/builder"
enginev1 "github.com/prysmaticlabs/prysm/v4/proto/engine/v1"
"github.com/prysmaticlabs/prysm/v4/runtime/version"
"github.com/prysmaticlabs/prysm/v4/time/slots"
Expand Down Expand Up @@ -296,8 +297,8 @@ func (s *Service) notifyBuildBlock(ctx context.Context, st state.BeaconState, sl
}
attr := &builder.BuilderPayloadAttributesV2{
Timestamp: uint64(t.Unix()),
Slot: slot,
PrevRandao: prevRando,
Slot: slot,
BlockHash: block.BlockHash(),
Withdrawals: withdrawals,
}
Expand Down
1 change: 1 addition & 0 deletions beacon-chain/execution/engine_client.go
Expand Up @@ -23,6 +23,7 @@ import (
payloadattribute "github.com/prysmaticlabs/prysm/v4/consensus-types/payload-attribute"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/encoding/bytesutil"
"github.com/prysmaticlabs/prysm/v4/proto/builder"
pb "github.com/prysmaticlabs/prysm/v4/proto/engine/v1"
"github.com/prysmaticlabs/prysm/v4/runtime/version"
"github.com/prysmaticlabs/prysm/v4/time/slots"
Expand Down
1 change: 1 addition & 0 deletions beacon-chain/execution/testing/mock_engine_client.go
Expand Up @@ -14,6 +14,7 @@ import (
payloadattribute "github.com/prysmaticlabs/prysm/v4/consensus-types/payload-attribute"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/encoding/bytesutil"
"github.com/prysmaticlabs/prysm/v4/proto/builder"
pb "github.com/prysmaticlabs/prysm/v4/proto/engine/v1"
"github.com/prysmaticlabs/prysm/v4/time/slots"
)
Expand Down
3 changes: 2 additions & 1 deletion beacon-chain/rpc/eth/beacon/state.go
Expand Up @@ -13,6 +13,7 @@ import (
ethpb "github.com/prysmaticlabs/prysm/v4/proto/eth/v1"
eth2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2"
eth "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1"
"github.com/prysmaticlabs/prysm/v4/runtime/version"
"github.com/prysmaticlabs/prysm/v4/time/slots"
"go.opencensus.io/trace"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -222,7 +223,7 @@ func (bs *Server) GetWithdrawals(ctx context.Context, req *eth2.WithdrawalsReque
return nil, status.Errorf(codes.Internal, "Could not get withdrawals at state: %v", err)
}

isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.OptimisticModeFetcher)
isOptimistic, err := helpers.IsOptimistic(ctx, req.StateId, bs.OptimisticModeFetcher, bs.StateFetcher, bs.ChainInfoFetcher, bs.BeaconDB)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions proto/builder/BUILD.bazel
Expand Up @@ -47,7 +47,7 @@ go_proto_library(
compilers = [
"@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc",
],
importpath = "github.com/prysmaticlabs/prysm/v3/proto/builder",
importpath = "github.com/prysmaticlabs/prysm/v4/proto/builder",
proto = ":proto",
visibility = ["//visibility:public"],
deps = [
Expand All @@ -71,7 +71,7 @@ go_library(
embed = [
":go_proto",
],
importpath = "github.com/prysmaticlabs/prysm/v3/proto/builder",
importpath = "github.com/prysmaticlabs/prysm/v4/proto/builder",
visibility = ["//visibility:public"],
deps = [
"//config/fieldparams:go_default_library",
Expand Down
24 changes: 12 additions & 12 deletions proto/builder/builder.pb.go

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

6 changes: 3 additions & 3 deletions proto/builder/builder.proto
Expand Up @@ -19,7 +19,7 @@ import "proto/eth/ext/options.proto";
import "proto/engine/v1/execution_engine.proto";

option csharp_namespace = "Ethereum.Builder";
option go_package = "github.com/prysmaticlabs/prysm/v3/proto/builder;builder";
option go_package = "github.com/prysmaticlabs/prysm/v4/proto/builder;builder";
option java_multiple_files = true;
option java_outer_classname = "BuilderProto";
option java_package = "org.ethereum.builder";
Expand All @@ -28,14 +28,14 @@ option php_namespace = "Ethereum\\Builder";
message BuilderPayloadAttributes {
uint64 timestamp = 1;
bytes prev_randao = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"];
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Slot"];
bytes block_hash = 4 [(ethereum.eth.ext.ssz_size) = "32"];
}

message BuilderPayloadAttributesV2 {
uint64 timestamp = 1;
bytes prev_randao = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"];
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Slot"];
bytes block_hash = 4 [(ethereum.eth.ext.ssz_size) = "32"];
repeated ethereum.engine.v1.Withdrawal withdrawals = 5 [(ethereum.eth.ext.ssz_max) = "withdrawal.size"]; // New in Capella.
}
8 changes: 4 additions & 4 deletions proto/builder/generated.ssz.go

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

4 changes: 2 additions & 2 deletions proto/builder/json_marshal_unmarshal.go
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
v1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1"
types "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
v1 "github.com/prysmaticlabs/prysm/v4/proto/engine/v1"
)

type builderPayloadAttributesJSON struct {
Expand Down
14 changes: 7 additions & 7 deletions proto/builder/json_marshal_unmarshal_test.go
Expand Up @@ -4,13 +4,13 @@ import (
"encoding/json"
"testing"

fieldparams "github.com/prysmaticlabs/prysm/v3/config/fieldparams"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
builder "github.com/prysmaticlabs/prysm/v3/proto/builder"
v1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1"
"github.com/prysmaticlabs/prysm/v3/testing/require"
fieldparams "github.com/prysmaticlabs/prysm/v4/config/fieldparams"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
types "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/encoding/bytesutil"
builder "github.com/prysmaticlabs/prysm/v4/proto/builder"
v1 "github.com/prysmaticlabs/prysm/v4/proto/engine/v1"
"github.com/prysmaticlabs/prysm/v4/testing/require"
)

func TestJsonMarshalUnmarshal(t *testing.T) {
Expand Down

0 comments on commit 48fb92e

Please sign in to comment.