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

[Upgrade] Go-Ethereum release v1.9.12 #1122

Merged
merged 27 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
529b81d
params: begin v1.9.12 release cycle
karalabe Feb 18, 2020
4be8840
core/vm: use dedicated SLOAD gas constant for EIP-2200 (#20646)
GregTheGreek Feb 18, 2020
6df973d
go.mod: upgrade goja to latest (#20700)
gballet Feb 20, 2020
2e1ecc0
les, miner, accounts/abi/bind: fix load-sensitive unit tests (#20698)
rjl493456442 Feb 20, 2020
6ffee2a
docs: correct clef typo (#20705)
Feb 21, 2020
c6be24c
eth/fetcher: remove randomness from test data
karalabe Feb 24, 2020
bf1cdd7
Merge pull request #20712 from karalabe/txfetcher-fix-test-randomness
karalabe Feb 24, 2020
2a5ed1a
eth/downloader: fix possible data race by inconsistent field protecti…
BurtonQin Feb 25, 2020
fadf84a
internal/ethapi: default to zero address for calls (#20702)
holiman Feb 25, 2020
4fabd9c
les: separate peer into clientPeer and serverPeer (#19991)
rjl493456442 Feb 26, 2020
cec1f29
mobile: add CallOpts.SetFrom (#20721)
fjl Feb 27, 2020
f1a7997
crypto/bn256: fix import line (#20723)
adamschmideg Feb 27, 2020
1e1b186
p2p/discv5: fix test on go 1.14 (#20724)
fjl Feb 27, 2020
01d9253
rpc: correct typo and reword comment for consistency (#20728)
renaynay Feb 28, 2020
556888c
core/vm: fix method doc (#20730)
0xalizk Mar 2, 2020
0bdb21f
tests: update tests/testdata@develop, include EIP2384 config (#20746)
meowsbits Mar 10, 2020
b1efff6
rpc: improve cancel test (#20752)
fjl Mar 12, 2020
92f3405
eth, les: fix time sensitive unit tests (#20741)
rjl493456442 Mar 12, 2020
270fbfb
eth: fix transaction announce/broadcast goroutine leak
karalabe Mar 13, 2020
68b4b74
Merge pull request #20762 from karalabe/fix-txprop-leak
karalabe Mar 14, 2020
466b009
go.mod: update golang.org/x/crypto to fix a Go 1.14 race rejection
karalabe Mar 6, 2020
241b283
Merge pull request #20747 from karalabe/update-crypto-deps
karalabe Mar 14, 2020
97243f3
geth retesteth: increase retesteth default http timeouts (#20767)
winsvega Mar 16, 2020
b6f1c8d
params: release Geth v1.9.12
karalabe Mar 16, 2020
c63e3e1
Merge branch 'geth-1.9.12' into upgrade/quorum-geth-1.9.12
ricardolyn Jan 15, 2021
39b4817
doc: add documentation for the modified setupTxPool() on tx_pool_test
ricardolyn Jan 15, 2021
a7ff5b4
Merge branch 'master' into upgrade/quorum-geth-1.9.12
ricardolyn Feb 3, 2021
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
4 changes: 2 additions & 2 deletions accounts/abi/bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ var bindTests = []struct {
if n != 3 {
t.Fatalf("Invalid bar0 event")
}
case <-time.NewTimer(100 * time.Millisecond).C:
case <-time.NewTimer(3 * time.Second).C:
t.Fatalf("Wait bar0 event timeout")
}

Expand All @@ -1395,7 +1395,7 @@ var bindTests = []struct {
if n != 1 {
t.Fatalf("Invalid bar event")
}
case <-time.NewTimer(100 * time.Millisecond).C:
case <-time.NewTimer(3 * time.Second).C:
t.Fatalf("Wait bar event timeout")
}
close(stopCh)
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Initializing Clef

First thing's first, Clef needs to store some data itself. Since that data might be sensitive (passwords, signing rules, accounts), Clef's entire storage is encrypted. To support encrypting data, the first step is to initialize Clef with a random master seed, itself too encrypted with your chosen password:
First things first, Clef needs to store some data itself. Since that data might be sensitive (passwords, signing rules, accounts), Clef's entire storage is encrypted. To support encrypting data, the first step is to initialize Clef with a random master seed, itself too encrypted with your chosen password:

```text
$ clef init
Expand Down
7 changes: 6 additions & 1 deletion cmd/geth/retesteth.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,13 @@ func retesteth(ctx *cli.Context) error {
cors := splitAndTrim(ctx.GlobalString(utils.RPCCORSDomainFlag.Name))

// start http server
var RetestethHTTPTimeouts = rpc.HTTPTimeouts{
ReadTimeout: 120 * time.Second,
WriteTimeout: 120 * time.Second,
IdleTimeout: 120 * time.Second,
}
httpEndpoint := fmt.Sprintf("%s:%d", ctx.GlobalString(utils.RPCListenAddrFlag.Name), ctx.Int(rpcPortFlag.Name))
listener, _, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, rpc.DefaultHTTPTimeouts, nil, &security.DisabledAuthenticationManager{})
listener, _, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, RetestethHTTPTimeouts, nil, &security.DisabledAuthenticationManager{})
if err != nil {
utils.Fatalf("Could not start RPC api: %v", err)
}
Expand Down
9 changes: 5 additions & 4 deletions core/tx_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ func pricedDataTransaction(nonce uint64, gaslimit uint64, gasprice *big.Int, key
return tx
}

func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.TestChainConfig)
}

// Quorum - created setupTxPoolWithConfig(...) from original setupTxPool() to allow passing a ChainConfig as argument
func setupTxPoolWithConfig(config *params.ChainConfig) (*TxPool, *ecdsa.PrivateKey) {
statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()))
blockchain := &testBlockChain{statedb, statedb, 10000000, new(event.Feed)}
Expand All @@ -101,6 +98,10 @@ func setupTxPoolWithConfig(config *params.ChainConfig) (*TxPool, *ecdsa.PrivateK
return pool, key
}

func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.TestChainConfig)
}

func setupQuorumTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.QuorumTestChainConfig)
}
Expand Down
3 changes: 2 additions & 1 deletion core/vm/eips.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func EnableEIP(eipNum int, jt *JumpTable) error {
// - Define SELFBALANCE, with cost GasFastStep (5)
func enable1884(jt *JumpTable) {
// Gas cost changes
jt[SLOAD].constantGas = params.SloadGasEIP1884
jt[BALANCE].constantGas = params.BalanceGasEIP1884
jt[EXTCODEHASH].constantGas = params.ExtcodeHashGasEIP1884
jt[SLOAD].constantGas = params.SloadGasEIP1884

// New opcode
jt[SELFBALANCE] = operation{
Expand Down Expand Up @@ -88,5 +88,6 @@ func opChainID(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memo

// enable2200 applies EIP-2200 (Rebalance net-metered SSTORE)
func enable2200(jt *JumpTable) {
jt[SLOAD].constantGas = params.SloadGasEIP2200
jt[SSTORE].dynamicGas = gasSStoreEIP2200
}
2 changes: 1 addition & 1 deletion core/vm/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
GasExtStep uint64 = 20
)

// calcGas returns the actual gas cost of the call.
// callGas returns the actual gas cost of the call.
//
// The cost of gas was changed during the homestead price change HF.
// As part of EIP 150 (TangerineWhistle), the returned gas is gas - base * 63 / 64.
Expand Down
2 changes: 1 addition & 1 deletion crypto/bn256/bn256_slow.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
package bn256

import "github.com/ethereum/go-ethereum/crypto/bn256/google"
import bn256 "github.com/ethereum/go-ethereum/crypto/bn256/google"

// G1 is an abstract cyclic group. The zero value is suitable for use as the
// output of an operation, but cannot be used as an input.
Expand Down
9 changes: 6 additions & 3 deletions eth/downloader/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,26 +564,29 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common

// CancelHeaders aborts a fetch request, returning all pending skeleton indexes to the queue.
func (q *queue) CancelHeaders(request *fetchRequest) {
q.lock.Lock()
defer q.lock.Unlock()
q.cancel(request, q.headerTaskQueue, q.headerPendPool)
}

// CancelBodies aborts a body fetch request, returning all pending headers to the
// task queue.
func (q *queue) CancelBodies(request *fetchRequest) {
q.lock.Lock()
defer q.lock.Unlock()
q.cancel(request, q.blockTaskQueue, q.blockPendPool)
}

// CancelReceipts aborts a body fetch request, returning all pending headers to
// the task queue.
func (q *queue) CancelReceipts(request *fetchRequest) {
q.lock.Lock()
defer q.lock.Unlock()
q.cancel(request, q.receiptTaskQueue, q.receiptPendPool)
}

// Cancel aborts a fetch request, returning all pending hashes to the task queue.
func (q *queue) cancel(request *fetchRequest, taskQueue *prque.Prque, pendPool map[string]*fetchRequest) {
q.lock.Lock()
defer q.lock.Unlock()

if request.From > 0 {
taskQueue.Push(request.From, -int64(request.From))
}
Expand Down
8 changes: 4 additions & 4 deletions eth/fetcher/tx_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
var (
// testTxs is a set of transactions to use during testing that have meaninful hashes.
testTxs = []*types.Transaction{
types.NewTransaction(rand.Uint64(), common.Address{byte(rand.Intn(256))}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(rand.Uint64(), common.Address{byte(rand.Intn(256))}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(rand.Uint64(), common.Address{byte(rand.Intn(256))}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(rand.Uint64(), common.Address{byte(rand.Intn(256))}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(5577006791947779410, common.Address{0x0f}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(15352856648520921629, common.Address{0xbb}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(3916589616287113937, common.Address{0x86}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(9828766684487745566, common.Address{0xac}, new(big.Int), 0, new(big.Int), nil),
}
// testTxsHashes is the hashes of the test transactions above
testTxsHashes = []common.Hash{testTxs[0].Hash(), testTxs[1].Hash(), testTxs[2].Hash(), testTxs[3].Hash()}
Expand Down
2 changes: 1 addition & 1 deletion eth/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpo
}
}
// Wait until the test timeout passes to ensure proper cleanup
time.Sleep(syncChallengeTimeout + 100*time.Millisecond)
time.Sleep(syncChallengeTimeout + 300*time.Millisecond)

// Verify that the remote peer is maintained or dropped
if drop {
Expand Down
12 changes: 6 additions & 6 deletions eth/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ func (p *peer) broadcastBlocks() {
// node internals and at the same time rate limits queued data.
func (p *peer) broadcastTransactions() {
var (
queue []common.Hash // Queue of hashes to broadcast as full transactions
done chan struct{} // Non-nil if background broadcaster is running
fail = make(chan error) // Channel used to receive network error
queue []common.Hash // Queue of hashes to broadcast as full transactions
done chan struct{} // Non-nil if background broadcaster is running
fail = make(chan error, 1) // Channel used to receive network error
)
for {
// If there's no in-flight broadcast running, check if a new one is needed
Expand Down Expand Up @@ -218,9 +218,9 @@ func (p *peer) broadcastTransactions() {
// node internals and at the same time rate limits queued data.
func (p *peer) announceTransactions() {
var (
queue []common.Hash // Queue of hashes to announce as transaction stubs
done chan struct{} // Non-nil if background announcer is running
fail = make(chan error) // Channel used to receive network error
queue []common.Hash // Queue of hashes to announce as transaction stubs
done chan struct{} // Non-nil if background announcer is running
fail = make(chan error, 1) // Channel used to receive network error
)
for {
// If there's no in-flight announce running, check if a new one is needed
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
github.com/dlclark/regexp2 v1.2.0 // indirect
github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf
github.com/dop251/goja v0.0.0-20200106141417-aaec0e7bde29
github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87
github.com/eapache/channels v1.1.0
github.com/eapache/queue v1.1.0 // indirect
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c
Expand Down Expand Up @@ -77,10 +77,10 @@ require (
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.uber.org/zap v1.15.0 // indirect
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20191008105621-543471e840be
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527
golang.org/x/text v0.3.2
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
google.golang.org/grpc v1.29.1
Expand All @@ -89,7 +89,6 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772
gopkg.in/oleiade/lane.v1 v1.0.0
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/urfave/cli.v1 v1.20.0
gotest.tools v2.2.0+incompatible // indirect
)
Loading