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

Update Go-Ethereum #9157

Merged
merged 7 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion contracts/deposit-contract/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func Setup() (*TestAccount, error) {
copy(pubKey, publicKeyBytes)

addr := crypto.PubkeyToAddress(privKey.PublicKey)
txOpts := bind.NewKeyedTransactor(privKey)
txOpts, err := bind.NewKeyedTransactorWithChainID(privKey, big.NewInt(1337))
if err != nil {
return nil, err
}
startingBalance, _ := new(big.Int).SetString("100000000000000000000000000000000000000", 10)
genesis[addr] = core.GenesisAccount{Balance: startingBalance}
backend := backends.NewSimulatedBackend(genesis, 210000000000)
Expand Down
82 changes: 57 additions & 25 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def prysm_deps():
go_repository(
name = "co_honnef_go_tools",
importpath = "honnef.co/go/tools",
sum = "h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=",
version = "v0.0.1-2020.1.4",
sum = "h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=",
version = "v0.1.3",
)
go_repository(
name = "com_github_aead_siphash",
Expand Down Expand Up @@ -240,8 +240,8 @@ def prysm_deps():
go_repository(
name = "com_github_azure_azure_pipeline_go",
importpath = "github.com/Azure/azure-pipeline-go",
sum = "h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo=",
version = "v0.2.1",
sum = "h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY=",
version = "v0.2.2",
)
go_repository(
name = "com_github_azure_azure_storage_blob_go",
Expand All @@ -258,20 +258,20 @@ def prysm_deps():
go_repository(
name = "com_github_azure_go_autorest_autorest_adal",
importpath = "github.com/Azure/go-autorest/autorest/adal",
sum = "h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=",
version = "v0.5.0",
sum = "h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=",
version = "v0.8.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_date",
importpath = "github.com/Azure/go-autorest/autorest/date",
sum = "h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=",
version = "v0.1.0",
sum = "h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=",
version = "v0.2.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_mocks",
importpath = "github.com/Azure/go-autorest/autorest/mocks",
sum = "h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=",
version = "v0.2.0",
sum = "h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=",
version = "v0.3.0",
)
go_repository(
name = "com_github_azure_go_autorest_logger",
Expand Down Expand Up @@ -527,9 +527,16 @@ def prysm_deps():
go_repository(
name = "com_github_consensys_bavard",
importpath = "github.com/consensys/bavard",
sum = "h1:Ulx+x6FcZnw25LXxuohvLeu7B1xGQIGrOy12Z+QCAjU=",
version = "v0.1.8-0.20210105233146-c16790d2aa8b",
sum = "h1:+R8G1+Ftumd0DaveLgMIjrFPcAS4G8MsVXWXiyZL5BY=",
version = "v0.1.8-0.20210406032232-f3452dc9b572",
)
go_repository(
name = "com_github_consensys_gnark_crypto",
importpath = "github.com/consensys/gnark-crypto",
sum = "h1:C43yEtQ6NIf4ftFXD/V55gnGFgPbMQobd//YlnLjUJ8=",
version = "v0.4.1-0.20210426202927-39ac3d4b3f1f",
)

go_repository(
name = "com_github_consensys_goff",
importpath = "github.com/consensys/goff",
Expand Down Expand Up @@ -784,7 +791,7 @@ def prysm_deps():
# Note: The keep directives help gazelle leave this alone.
go_repository(
name = "com_github_ethereum_go_ethereum",
commit = "f4dfc974428879b1ad5294c8463d370923be988a", # keep
commit = "e8523651bf6f6abd5bde56b087954463ee13e4ca", # keep
importpath = "github.com/ethereum/go-ethereum", # keep
# Note: go-ethereum is not bazel-friendly with regards to cgo. We have a
# a fork that has resolved these issues by disabling HID/USB support and
Expand Down Expand Up @@ -1392,8 +1399,8 @@ def prysm_deps():
go_repository(
name = "com_github_holiman_uint256",
importpath = "github.com/holiman/uint256",
sum = "h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw=",
version = "v1.1.1",
sum = "h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM=",
version = "v1.2.0",
)
go_repository(
name = "com_github_hpcloud_tail",
Expand Down Expand Up @@ -2225,8 +2232,8 @@ def prysm_deps():
go_repository(
name = "com_github_mattn_go_ieproxy",
importpath = "github.com/mattn/go-ieproxy",
sum = "h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA=",
version = "v0.0.0-20190610004146-91bb50d98149",
sum = "h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw=",
version = "v0.0.0-20190702010315-6dee0af9227d",
)

go_repository(
Expand Down Expand Up @@ -2448,6 +2455,12 @@ def prysm_deps():
sum = "h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=",
version = "v0.0.0-20140419014527-cca7078d478f",
)
go_repository(
name = "com_github_naoina_go_stringutil",
importpath = "github.com/naoina/go-stringutil",
sum = "h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks=",
version = "v0.1.0",
)

go_repository(
name = "com_github_naoina_toml",
Expand Down Expand Up @@ -2897,8 +2910,8 @@ def prysm_deps():
go_repository(
name = "com_github_shirou_gopsutil",
importpath = "github.com/shirou/gopsutil",
sum = "h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I=",
version = "v2.20.5+incompatible",
sum = "h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=",
version = "v3.21.4-0.20210419000835-c7a38de76ee5+incompatible",
)
go_repository(
name = "com_github_shopify_sarama",
Expand Down Expand Up @@ -2993,8 +3006,8 @@ def prysm_deps():
go_repository(
name = "com_github_spf13_cobra",
importpath = "github.com/spf13/cobra",
sum = "h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=",
version = "v1.1.1",
sum = "h1:O63eWlXlvyw4YdsuatjRIU6emvJ2fqz+PTdMEoxIT2s=",
version = "v1.0.1-0.20201006035406-b97b5ead31f7",
)
go_repository(
name = "com_github_spf13_jwalterweatherman",
Expand Down Expand Up @@ -3113,6 +3126,19 @@ def prysm_deps():
sum = "h1:i7c6Za/IlgBvnGxYpfD7L3TGuaS+v6oGcgq+J9/ecEA=",
version = "v1.3.0",
)
go_repository(
name = "com_github_tklauser_go_sysconf",
importpath = "github.com/tklauser/go-sysconf",
sum = "h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4=",
version = "v0.3.5",
)
go_repository(
name = "com_github_tklauser_numcpus",
importpath = "github.com/tklauser/numcpus",
sum = "h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA=",
version = "v0.2.2",
)

go_repository(
name = "com_github_tmc_grpc_websocket_proxy",
importpath = "github.com/tmc/grpc-websocket-proxy",
Expand Down Expand Up @@ -3168,8 +3194,8 @@ def prysm_deps():
go_repository(
name = "com_github_victoriametrics_fastcache",
importpath = "github.com/VictoriaMetrics/fastcache",
sum = "h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw=",
version = "v1.5.7",
sum = "h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o=",
version = "v1.6.0",
)
go_repository(
name = "com_github_vividcortex_gohistogram",
Expand Down Expand Up @@ -3737,8 +3763,8 @@ def prysm_deps():
go_repository(
name = "org_golang_x_crypto",
importpath = "golang.org/x/crypto",
sum = "h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=",
version = "v0.0.0-20201221181555-eec23a3978ad",
sum = "h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=",
version = "v0.0.0-20210322153248-0c34fe9e7dc2",
)
go_repository(
name = "org_golang_x_exp",
Expand Down Expand Up @@ -3891,3 +3917,9 @@ def prysm_deps():
sum = "h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=",
version = "v1.16.0",
)
go_repository(
name = "tools_gotest",
importpath = "gotest.tools",
sum = "h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=",
version = "v2.2.0+incompatible",
)
3 changes: 2 additions & 1 deletion endtoend/components/eth1.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (node *Eth1Node) Start(ctx context.Context) error {
return fmt.Errorf("unable to advance chain: %w", err)
}

txOpts, err := bind.NewTransactor(bytes.NewReader(jsonBytes), "" /*password*/)
txOpts, err := bind.NewTransactorWithChainID(bytes.NewReader(jsonBytes), "" /*password*/, big.NewInt(1337))
if err != nil {
return err
}
Expand All @@ -132,6 +132,7 @@ func (node *Eth1Node) Start(ctx context.Context) error {
return err
}
txOpts.Nonce = big.NewInt(int64(nonce))
txOpts.Context = context.Background()
contractAddr, tx, _, err := contracts.DeployDepositContract(txOpts, web3, txOpts.From)
if err != nil {
return fmt.Errorf("failed to deploy deposit contract: %w", err)
Expand Down
3 changes: 2 additions & 1 deletion endtoend/components/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,12 @@ func SendAndMineDeposits(keystorePath string, validatorNum, offset int, partial

// sendDeposits uses the passed in web3 and keystore bytes to send the requested deposits.
func sendDeposits(web3 *ethclient.Client, keystoreBytes []byte, num, offset int, partial bool) error {
txOps, err := bind.NewTransactor(bytes.NewReader(keystoreBytes), "" /*password*/)
txOps, err := bind.NewTransactorWithChainID(bytes.NewReader(keystoreBytes), "" /*password*/, big.NewInt(1337))
if err != nil {
return err
}
txOps.GasLimit = depositGasLimit
txOps.Context = context.Background()
nonce, err := web3.PendingNonceAt(context.Background(), txOps.From)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ require (
go.etcd.io/bbolt v1.3.5
go.opencensus.io v0.22.6
go.uber.org/automaxprocs v1.3.0
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/exp v0.0.0-20200513190911-00229845015e
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/tools v0.1.1
Expand All @@ -128,7 +128,7 @@ require (
k8s.io/utils v0.0.0-20200520001619-278ece378a50 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210420143944-f4dfc9744288
replace github.com/ethereum/go-ethereum => github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210707101027-e8523651bf6f

replace github.com/json-iterator/go => github.com/prestonvanloon/go v1.1.7-0.20190722034630-4f2e55fcf87b

Expand Down
Loading