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.16 #1132

Merged
merged 132 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
46698d7
params: begin v1.9.15 release cycle
karalabe May 13, 2020
677724a
cmd: fix log contexts (#21077)
SatpalSandhu61 May 13, 2020
f3f1e59
accounts/abi: simplify reflection logic (#21058)
MariusVanDerWijden May 13, 2020
3666da8
console: fix unlockAccount argument count check (#21081)
fjl May 14, 2020
e0987f6
cmd/clef, signer/core: password input fixes (#20960)
holiman May 19, 2020
d5b7d1c
accounts: add blockByNumberNoLock() to avoid double-lock (#20983)
BurtonQin May 19, 2020
0a99efa
whisper: use canonical import name of package go-ethereum (#21099)
ucwong May 20, 2020
65ce550
trie: extend range proofs with non-existence (#21000)
rjl493456442 May 20, 2020
b4a2681
les, les/lespay: implement new server pool (#20758)
zsfelfoldi May 22, 2020
48e3b95
miner: replace use of 'self' as receiver name (#21113)
ucwong May 25, 2020
4f2784b
all: fix typos in comments (#21118)
tbm May 25, 2020
25a661e
consensus/clique: remove redundant pair of parentheses (#21104)
yutianwu May 25, 2020
e868add
core/vm: improve jumpdest lookup (#21123)
holiman May 25, 2020
befecc9
consensus/ethash: fix flaky test by reading seal results (#21085)
meowsbits May 25, 2020
dbf6b8a
cmd/utils: fix default DNS discovery configuration (#21124)
fjl May 25, 2020
2f66a8d
metrics/prometheus: define TYPE once, add tests (#21068)
riptl May 26, 2020
7ddb402
ethdb/leveldb: use timer instead of time.After (#21066)
ucwong May 26, 2020
81e9cae
ethstats: avoid blocking chan when received invalid stats request (#2…
duanhao0814 May 26, 2020
070a5e1
trie: fix for range proof (#21107)
rjl493456442 May 26, 2020
4873a9d
build: upgrade to golangci lint v1.27.0 (#21127)
fjl May 26, 2020
9219e0f
eth: interrupt chain insertion on shutdown (#21114)
fjl May 26, 2020
b2c59e2
consensus/clique: make internal error private (#21132)
six-days May 27, 2020
389da6a
trie: enforce monotonic range in prover and return end marker (#21130)
rjl493456442 May 27, 2020
a5eee8d
eth/downloader: more context in errors (#21067)
holiman May 29, 2020
a35382d
metrics: replace gosigar with gopsutil (#21041)
renaynay Jun 2, 2020
cd57d5c
core/vm: EIP-2315, JUMPSUB for the EVM (#20619)
gcolvin Jun 2, 2020
723bd8c
p2p/discover: move discv4 encoding to new 'v4wire' package (#21147)
fjl Jun 2, 2020
d98c42c
rpc: send websocket ping when connection is idle (#21142)
fjl Jun 2, 2020
5f6f5e3
console: handle undefined + null in console funcs (#21160)
gballet Jun 2, 2020
3f649d4
core: collect NewTxsEvent items without holding reorg lock (#21145)
cheng762 Jun 2, 2020
4fc6785
core/vm, crypto/bls12381, params: add bls12-381 elliptic curve precom…
kilic Jun 3, 2020
890757f
cmd, core, params: inital support for yolo-v1 testnet (#21154)
holiman Jun 3, 2020
f52ff0f
cmd/geth: fix the fork orders for DAO tests
karalabe Jun 3, 2020
8b83125
Merge pull request #21162 from karalabe/daofork-order-check-fix
karalabe Jun 3, 2020
8523ad4
core: filter out txs with invalid signatures as soon as possible
duanhao0814 Jun 3, 2020
469b873
acounts/keystore, cmd/faucet: fix faucet double import, fix twitter url
karalabe Jun 4, 2020
201e345
Merge pull request #21172 from karalabe/faucet-twitter-mobile
karalabe Jun 4, 2020
b1b75f0
accounts/keystore, cmd/faucet: return old account to allow unlock
karalabe Jun 4, 2020
cefa2ab
Merge pull request #21173 from karalabe/faucet-delete-oldaccs
karalabe Jun 4, 2020
4b2ff14
go.mod: upgrade go-duktape to hide unused function warning (#21168)
ucwong Jun 4, 2020
9d93535
node: missing comma on toml tags (#21187)
mcortesi Jun 8, 2020
55f30db
core/vm, crypt/bls12381: fixed comments in bls (#21182)
MariusVanDerWijden Jun 8, 2020
88125d8
core: fix typo in comments (#21181)
evertonfraga Jun 8, 2020
0b3f3be
internal/ethapi: return revert reason for eth_call (#21083)
MariusVanDerWijden Jun 8, 2020
a5c827a
params: update CHTs for 1.9.15 release
karalabe Jun 8, 2020
6512334
Merge pull request #21188 from karalabe/cht-1.9.15
karalabe Jun 8, 2020
0f77f34
params: go-ethereum v1.9.15 stable
fjl Jun 8, 2020
da06519
params: begin v1.9.16 release cycle
fjl Jun 8, 2020
45b7535
cmd/ethkey: support --passwordfile in generate command (#21183)
libby Jun 8, 2020
39abd92
ethstats: use timer instead of time.sleep (#20924)
ucwong Jun 8, 2020
cf66745
core/vm: use uint256 in EVM implementation (#20787)
chfast Jun 8, 2020
80e887d
core/state: avoid escape analysis fault when accessing cached state
karalabe Jun 8, 2020
a0797e3
Merge pull request #21192 from karalabe/fix-escape-analysis
karalabe Jun 8, 2020
d5c267f
accounts/keystore: fix typo in error message (#21200)
p4u Jun 9, 2020
89043cb
accounts/abi: make GetType public again (#21157)
natsukagami Jun 9, 2020
e9ba536
eth/downloader: fix spuriously failing tests (#21149)
holiman Jun 9, 2020
4a19c0e
core, eth, internal: include read storage entries in structlog output…
rjl493456442 Jun 10, 2020
e30c0af
build, internal/ethapi, crypto/bls12381: fix typos (#21210)
howjmay Jun 10, 2020
c85fdb7
go.mod: update uint256 to 1.1.0 (#21206)
holiman Jun 11, 2020
9371b2f
internal/web3ext: add missing params to debug.accountRange (#21208)
hackmod Jun 11, 2020
a981b60
eth/downloader: don't use defer for unlock before return (#21227)
six-days Jun 15, 2020
eb9d7d1
Merge pull request #21170 from duanhao0814/fix-dup-ecrecover
karalabe Jun 16, 2020
bcf19bc
core/rawdb: swap tailId and itemOffset for deleted items in freezer (…
zhangsoledad Jun 17, 2020
56a319b
cmd, eth, internal, les: add txfee cap (#21212)
rjl493456442 Jun 17, 2020
e029cc6
go.mod: update snappy dependency (#21237)
ucwong Jun 18, 2020
5435e0d
whisper : use timer.Ticker instead of sleep (#21240)
ucwong Jun 18, 2020
3ebfeb0
core/rawdb: fix high memory usage in freezer (#21243)
AusIV Jun 19, 2020
9a188c9
common/fdlimit: build on DragonflyBSD (#21241)
gballet Jun 19, 2020
dce533c
whisper: fix time.sleep by time.ticker in whisper_test (#21251)
ucwong Jun 23, 2020
42ccb2f
p2p: measure packet throughput too, not just bandwidth
karalabe Jun 24, 2020
c42d139
Merge pull request #21256 from karalabe/p2p-packet-metrics
karalabe Jun 24, 2020
da180ba
cmd/devp2p: add commands for node key management (#21202)
fjl Jun 24, 2020
23f1a0b
crypto/secp256k1: enable 128-bit int code and endomorphism optimizati…
fjl Jun 24, 2020
93142e5
eth: don't block if transaction broadcast loop fails (#21255)
rjl493456442 Jun 24, 2020
b482423
trie: reduce allocs in insertPreimage (#21261)
MariusVanDerWijden Jun 24, 2020
0c82928
core/vm: fix incorrect computation of BLS discount (#21253)
MariusVanDerWijden Jun 24, 2020
413358a
cmd/geth: make import cmd exit with 1 if import errors occurred (#21244)
meowsbits Jun 24, 2020
02cea23
eth: returned revert reason in traceTx (#21195)
MariusVanDerWijden Jun 26, 2020
c13df14
utils: fix ineffectual miner config flags (#21271)
meowsbits Jun 30, 2020
dd91c7c
cmd: abstract `getPassPhrase` functions into one (#21219)
binacs Jun 30, 2020
e376d2f
cmd/evm: add state transition tool for testing (#20958)
holiman Jun 30, 2020
ddeea1e
core: types: less allocations when hashing and tx handling (#21265)
MariusVanDerWijden Jun 30, 2020
b86b1e6
go.mod: bump gopsutil version (#21275)
gballet Jun 30, 2020
1e635bd
go.mod: updated crypto deps causing build failure (#21276)
renaynay Jun 30, 2020
d671dbd
eth/downloader: fixes data race between synchronize and other methods…
MariusVanDerWijden Jun 30, 2020
ec51cbb
cmd/geth: LES priority client test (#20719)
adamschmideg Jul 1, 2020
8dfd66f
rlp: avoid list header allocation in encoder (#21274)
MariusVanDerWijden Jul 1, 2020
af5c97a
core, txpool: less allocations when handling transactions (#21232)
MariusVanDerWijden Jul 1, 2020
12867d1
rpc, internal/ethapi: default rpc gascap at 25M + better error messag…
holiman Jul 1, 2020
7451fc6
internal/ethapi: default gas to maxgascap, not max int64 (#21284)
holiman Jul 2, 2020
04c4e50
ethapi: don't crash when keystore-specific methods are called but ext…
holiman Jul 2, 2020
07a95ce
les/checkpointoracle: don't lookup checkpoint more than once per minu…
holiman Jul 2, 2020
61270e5
eth/gasprice: lighter gas price oracle for light client (#20409)
rjl493456442 Jul 3, 2020
490b380
cmd/geth: allow configuring metrics HTTP server on separate endpoint …
meowsbits Jul 3, 2020
fa01117
build/ci: handle split up listing (#21293)
holiman Jul 4, 2020
6315b6f
rlp: reduce allocations for big.Int and byte array encoding (#21291)
fjl Jul 6, 2020
6d8e51a
cmd, node: dump empty value config (#21296)
rjl493456442 Jul 6, 2020
e5871b9
cmd/clef: Update README with external v6.0.0 & internal v7.0.1 APIs (…
chris-j-h Jul 7, 2020
6a48ae3
cmd/devp2p: add discv4 test suite (#21163)
adamschmideg Jul 7, 2020
c16967c
cmd/clef: Fix broken link in README and other minor fixes (#21303)
chris-j-h Jul 7, 2020
5b1cfde
eth: increase timeout in TestBroadcastBlock (#21299)
holiman Jul 8, 2020
7a556ab
go.mod: upgrade to github.com/golang/snappy with arm64 asm (#21304)
ucwong Jul 8, 2020
967d8de
eth/downloader: fix peer idleness tracking when restarting state sync…
holiman Jul 8, 2020
bcb3087
Revert "core, txpool: less allocations when handling transactions (#2…
fjl Jul 9, 2020
6ccce09
common/math: use math/bits intrinsics for Safe* (#21316)
fjl Jul 9, 2020
beabf95
cmd/geth, cmd/puppeth: replace deprecated rpc and ws flags in tests a…
renaynay Jul 9, 2020
feb40e3
accounts/external: remove dependency on internal/ethapi (#21319)
rjl493456442 Jul 10, 2020
ea3b00a
params: go-ethereum v1.9.16 stable
fjl Jul 10, 2020
2857363
Merge branch 'upgrade/go-ethereum/v1.9.14-2021211111542' into upgrade…
ricardolyn Feb 12, 2021
9d63bb7
fix: arguments to sprintf
ricardolyn Feb 12, 2021
27b70a3
fix: Fix genesis test for privacy flags: error Fatal: Failed to write…
ricardolyn Feb 12, 2021
f454b74
tidy: go.mod
ricardolyn Feb 12, 2021
934d4f0
lint: fix lint issues
ricardolyn Feb 12, 2021
900595b
Merge branch 'upgrade/go-ethereum/v1.9.14-2021211111542' into upgrade…
ricardolyn Feb 15, 2021
c0f5299
Merge branch 'upgrade/go-ethereum/v1.9.15-2021212113514' into upgrade…
ricardolyn Feb 15, 2021
816d34d
fix: conflict error by missing GetCode(addr)
ricardolyn Feb 15, 2021
44dfdd0
fix: new api to get SyncMode by using `getMode()` on the downloader
ricardolyn Feb 15, 2021
7285676
fix: missing privateState on NewEVM. however, TODO left to review again
ricardolyn Feb 15, 2021
d558aee
fix: missing arguments in tests
ricardolyn Feb 15, 2021
6721057
lint: fix issues
ricardolyn Feb 15, 2021
550c952
Merge branch 'master' into upgrade/go-ethereum/v1.9.15-2021212113514
ricardolyn Feb 15, 2021
a34102c
fix: fixed genesis.json for test
ricardolyn Feb 15, 2021
662c1b8
Merge branch 'master' into upgrade/go-ethereum/v1.9.15-2021212113514
ricardolyn Feb 17, 2021
c595ca3
Merge branch 'master' into upgrade/go-ethereum/v1.9.15-2021212113514
ricardolyn Feb 17, 2021
4bb324c
Merge branch 'upgrade/go-ethereum/v1.9.15-2021212113514' into upgrade…
ricardolyn Feb 17, 2021
51f6236
test: skip les test as is not supported in Quorum
ricardolyn Feb 17, 2021
670379c
fix: wrong order when checking the privacy block in the genesis file …
ricardolyn Feb 17, 2021
40487d5
Merge branch 'fix/genesis-privacy-check' into upgrade/go-ethereum/v1.…
ricardolyn Feb 18, 2021
b69394a
fix: use right err when logging
ricardolyn Feb 18, 2021
020d713
Merge branch 'master' into upgrade/go-ethereum/v1.9.16-2021215130719
ricardolyn Feb 19, 2021
c1c9959
fix: put warning check for the privacy enhancements block in the righ…
ricardolyn Feb 23, 2021
e09c241
fix: whitespace removal
ricardolyn Feb 23, 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
Prev Previous commit
Next Next commit
Merge branch 'upgrade/go-ethereum/v1.9.14-2021211111542' into upgrade…
…/go-ethereum/v1.9.15-2021212113514
  • Loading branch information
ricardolyn committed Feb 12, 2021
commit 2857363fc796f84696f60b550c57bdb27a324cfb
6 changes: 1 addition & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file configures github.com/golangci/golangci-lint.

run:
timeout: 3m
timeout: 5m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
Expand Down Expand Up @@ -32,10 +32,6 @@ linters-settings:
min-occurrences: 6 # minimum number of occurrences

issues:
# Quorum - Disabling check for "S1039: unnecessary use of fmt.Sprintf (gosimple)" until we upgrade to geth 1.9.20 and have the lint fixes that also were applied in go-ethereum, as it was creating many necessary changes in geth codebase
exclude:
- S1039
# End Quorum
exclude-rules:
- path: crypto/blake2b/
linters:
Expand Down
3 changes: 2 additions & 1 deletion accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ func (b *SimulatedBackend) stateByBlockNumber(ctx context.Context, blockNumber *
if err != nil {
return nil, err
}
return b.blockchain.StateAt(block.Root())
statedb, _, err := b.blockchain.StateAt(block.Root())
return statedb, err
}

// CodeAt returns the code associated with a certain account in the blockchain.
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ Example call:

### OnSignerStartup / `ui_onSignerStartup`

This method provide the UI with information about what API version the signer uses (both internal and external) as well as build-info and external API,
This method provides the UI with information about what API version the signer uses (both internal and external) as well as build-info and external API,
in k/v-form.

Example call:
Expand Down
6 changes: 6 additions & 0 deletions cmd/clef/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ func init() {
testFlag,
advancedMode,
acceptFlag,
// <Quorum>
utils.PluginSettingsFlag,
utils.PluginLocalVerifyFlag,
utils.PluginPublicKeyFlag,
utils.PluginSkipVerifyFlag,
// </Quorum>
}
app.Action = signer
app.Commands = []cli.Command{initCommand,
Expand Down
3 changes: 2 additions & 1 deletion cmd/geth/consolecmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ at block: 0 ({{niltime}})

// Tests that a console can be attached to a running node via various means.
func TestIPCAttachWelcome(t *testing.T) {
defer SetResetPrivateConfig("ignore")()
// Configure the instance for IPC attachment
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
coinbase := "0x491937757d1b26e29c507b8d4c0b233c2747e68d"
var ipc string

datadir := setupIstanbul(t)
Expand Down
3 changes: 3 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/multitenancy"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/permission"
"github.com/ethereum/go-ethereum/plugin"
"github.com/ethereum/go-ethereum/private"
gopsutil "github.com/shirou/gopsutil/mem"
cli "gopkg.in/urfave/cli.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion consensus/clique/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (api *API) Status(startBlockNum *rpc.BlockNumber, endBlockNum *rpc.BlockNum
}
signStatus[sealer]++
}
return &status{
return &Status{
InturnPercent: float64(100*optimals) / float64(numBlocks),
SigningStatus: signStatus,
NumBlocks: numBlocks,
Expand Down
18 changes: 18 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,18 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par
return bc, nil
}

// Quorum
func NewMultitenantBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *params.ChainConfig, engine consensus.Engine, vmConfig vm.Config, shouldPreserve func(block *types.Block) bool, txLookupLimit *uint64) (*BlockChain, error) {
bc, err := NewBlockChain(db, cacheConfig, chainConfig, engine, vmConfig, shouldPreserve, txLookupLimit)
if err != nil {
return nil, err
}
bc.isMultitenant = true
return bc, err
}

// End Quorum

// GetVMConfig returns the block chain VM config.
func (bc *BlockChain) GetVMConfig() *vm.Config {
return &bc.vmConfig
Expand Down Expand Up @@ -1835,6 +1847,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
// If the chain is terminating, stop processing blocks
if bc.insertStopped() {
log.Debug("Abort during block processing")
// QUORUM
if bc.isRaft() {
// Only returns an error for raft mode
return it.index, ErrAbortBlocksProcessing
}
// END QUORUM
break
}
// If the header is a banned one, straight out abort
Expand Down
3 changes: 3 additions & 0 deletions core/vm/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ var (
ErrGasUintOverflow = errors.New("gas uint64 overflow")
ErrInvalidRetsub = errors.New("invalid retsub")
ErrReturnStackExceeded = errors.New("return stack limit reached")

ErrReadOnlyValueTransfer = errors.New("VM in read-only mode. Value transfer prohibited.")
ErrNoCompatibleInterpreter = errors.New("no compatible interpreter")
)

// ErrStackUnderflow wraps an evm error when the items on the stack less
Expand Down
2 changes: 1 addition & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func run(evm *EVM, contract *Contract, input []byte, readOnly bool) ([]byte, err
if evm.chainRules.IsYoloV1 {
precompiles = PrecompiledContractsYoloV1
}
if p := precompiles[*contract.CodeAddr]; p != nil {
if p := precompiles[address]; p != nil {
return RunPrecompiledContract(p, input, contract)
}
}
Expand Down
10 changes: 5 additions & 5 deletions core/vm/instructions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func TestSAR(t *testing.T) {
// getResult is a convenience function to generate the expected values
func getResult(args []*twoOperandParams, opFn executionFunc) []TwoOperandTestcase {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{})
env = NewEVM(Context{}, nil, nil, params.TestChainConfig, Config{})
stack, rstack = newstack(), newReturnStack()
pc = uint64(0)
interpreter = env.interpreter.(*EVMInterpreter)
Expand Down Expand Up @@ -263,7 +263,7 @@ func TestJsonTestcases(t *testing.T) {

func opBenchmark(bench *testing.B, op executionFunc, args ...string) {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{})
env = NewEVM(Context{}, nil, nil, params.TestChainConfig, Config{})
stack, rstack = newstack(), newReturnStack()
evmInterpreter = NewEVMInterpreter(env, env.vmConfig)
)
Expand Down Expand Up @@ -498,7 +498,7 @@ func BenchmarkOpIsZero(b *testing.B) {

func TestOpMstore(t *testing.T) {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{})
env = NewEVM(Context{}, nil, nil, params.TestChainConfig, Config{})
stack, rstack = newstack(), newReturnStack()
mem = NewMemory()
evmInterpreter = NewEVMInterpreter(env, env.vmConfig)
Expand All @@ -524,7 +524,7 @@ func TestOpMstore(t *testing.T) {

func BenchmarkOpMstore(bench *testing.B) {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{})
env = NewEVM(Context{}, nil, nil, params.TestChainConfig, Config{})
stack, rstack = newstack(), newReturnStack()
mem = NewMemory()
evmInterpreter = NewEVMInterpreter(env, env.vmConfig)
Expand All @@ -547,7 +547,7 @@ func BenchmarkOpMstore(bench *testing.B) {

func BenchmarkOpSHA3(bench *testing.B) {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{})
env = NewEVM(Context{}, nil, nil, params.TestChainConfig, Config{})
stack, rstack = newstack(), newReturnStack()
mem = NewMemory()
evmInterpreter = NewEVMInterpreter(env, env.vmConfig)
Expand Down
1 change: 1 addition & 0 deletions core/vm/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package runtime

import (
"context"
"fmt"
"math/big"
"os"
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ require (
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
github.com/fatih/color v1.3.0
github.com/ethereum/go-ethereum/crypto/secp256k1 v0.0.0-00010101000000-000000000000
github.com/fatih/color v1.7.0
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff
github.com/go-ole/go-ole v1.2.1 // indirect
Expand Down Expand Up @@ -91,7 +92,8 @@ require (
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/karalabe/cookiejar.v2 v2.0.0-20150724131613-8dcd6a7f4951
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772
gopkg.in/oleiade/lane.v1 v1.0.0
gopkg.in/urfave/cli.v1 v1.20.0
gotest.tools v2.2.0+incompatible // indirect
)
12 changes: 10 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c h1:JHHhtb9XWJrGNMcrVP6vyzO4dusgi/HnceHTgxSejUM=
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/fatih/color v1.3.0 h1:YehCCcyeQ6Km0D6+IapqPinWBK6y+0eB5umvZXK9WPs=
github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c=
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
Expand Down Expand Up @@ -319,8 +323,12 @@ gopkg.in/karalabe/cookiejar.v2 v2.0.0-20150724131613-8dcd6a7f4951 h1:DMTcQRFbEH6
gopkg.in/karalabe/cookiejar.v2 v2.0.0-20150724131613-8dcd6a7f4951/go.mod h1:owOxCRGGeAx1uugABik6K9oeNu1cgxP/R9ItzLDxNWA=
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772 h1:hhsSf/5z74Ck/DJYc+R8zpq8KGm7uJvpdLRQED/IedA=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
gopkg.in/oleiade/lane.v1 v1.0.0 h1:Xs7/GTdnZNGuuXV7z8gTrHoHEeHdCnhuNXm4n0UpxjY=
gopkg.in/oleiade/lane.v1 v1.0.0/go.mod h1:e9mCiNjxfTGlkjxn/TPK3JUwhjKjby5cjXuGotH/QlE=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
Expand Down
7 changes: 5 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,11 @@ func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error)
}

// fetchKeystore retrieves the encrypted keystore from the account manager.
func fetchKeystore(am *accounts.Manager) *keystore.KeyStore {
return am.Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
func fetchKeystore(am *accounts.Manager) (*keystore.KeyStore, error) {
if ks := am.Backends(keystore.KeyStoreType); len(ks) > 0 {
return ks[0].(*keystore.KeyStore), nil
}
return nil, errors.New("local keystore not used")
}

// ImportRawKey stores the given hex encoded ECDSA key into the key directory,
Expand Down
33 changes: 18 additions & 15 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,19 @@ var (
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(EthashConfig), nil}
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(EthashConfig), nil, nil, false, 32, 35, big.NewInt(0), big.NewInt(0), nil, nil}

// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Clique consensus.
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}}
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil, false, 32, 32, big.NewInt(0), big.NewInt(0), nil, nil}

TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(EthashConfig), nil}
TestChainConfig = &ChainConfig{big.NewInt(10), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(EthashConfig), nil, nil, false, 32, 32, big.NewInt(0), big.NewInt(0), nil, nil}
TestRules = TestChainConfig.Rules(new(big.Int))

QuorumTestChainConfig = &ChainConfig{big.NewInt(10), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, new(EthashConfig), nil, nil, true, 64, 32, big.NewInt(0), big.NewInt(0), nil, big.NewInt(0)}
QuorumTestChainConfig = &ChainConfig{big.NewInt(10), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(EthashConfig), nil, nil, true, 64, 32, big.NewInt(0), big.NewInt(0), nil, big.NewInt(0)}
)

// TrustedCheckpoint represents a set of post-processed trie roots (CHT and
Expand Down Expand Up @@ -395,7 +395,7 @@ func (c *ChainConfig) String() string {
default:
engine = "unknown"
}
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, YOLO v1: %v, Engine: %v}",
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v YOLO v1: %v PrivacyEnhancements: %v Engine: %v}",
c.ChainID,
c.HomesteadBlock,
c.DAOForkBlock,
Expand All @@ -412,6 +412,7 @@ func (c *ChainConfig) String() string {
c.IstanbulBlock,
c.MuirGlacierBlock,
c.YoloV1Block,
c.PrivacyEnhancementsBlock,
engine,
)
}
Expand Down Expand Up @@ -813,6 +814,7 @@ type Rules struct {
IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool
IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool
IsYoloV1 bool
IsPrivacyEnhancementsEnabled bool
}

// Rules ensures c's ChainID is not nil.
Expand All @@ -822,15 +824,16 @@ func (c *ChainConfig) Rules(num *big.Int) Rules {
chainID = new(big.Int)
}
return Rules{
ChainID: new(big.Int).Set(chainID),
IsHomestead: c.IsHomestead(num),
IsEIP150: c.IsEIP150(num),
IsEIP155: c.IsEIP155(num),
IsEIP158: c.IsEIP158(num),
IsByzantium: c.IsByzantium(num),
IsConstantinople: c.IsConstantinople(num),
IsPetersburg: c.IsPetersburg(num),
IsIstanbul: c.IsIstanbul(num),
IsYoloV1: c.IsYoloV1(num),
ChainID: new(big.Int).Set(chainID),
IsHomestead: c.IsHomestead(num),
IsEIP150: c.IsEIP150(num),
IsEIP155: c.IsEIP155(num),
IsEIP158: c.IsEIP158(num),
IsByzantium: c.IsByzantium(num),
IsConstantinople: c.IsConstantinople(num),
IsPetersburg: c.IsPetersburg(num),
IsIstanbul: c.IsIstanbul(num),
IsYoloV1: c.IsYoloV1(num),
IsPrivacyEnhancementsEnabled: c.IsPrivacyEnhancementsEnabled(num),
}
}
4 changes: 4 additions & 0 deletions params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ const (
Bls12381PairingPerPairGas uint64 = 23000 // Per-point pair gas price for BLS12-381 elliptic curve pairing check
Bls12381MapG1Gas uint64 = 5500 // Gas price for BLS12-381 mapping field element to G1 operation
Bls12381MapG2Gas uint64 = 110000 // Gas price for BLS12-381 mapping field element to G2 operation

QuorumMaximumExtraDataSize uint64 = 65 // Maximum size extra data may be after Genesis.
// Quorum - payload for a transaction, the size of the buffer to 128kb to match the maximum allowed in chain config
QuorumMaxPayloadBufferSize uint64 = 128
)

// Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
Expand Down
3 changes: 3 additions & 0 deletions rpc/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func TestServerRegisterName(t *testing.T) {
}

wantCallbacks := 9
// Quorum - Add extra callback for the function added by us EchoCtxId
wantCallbacks += 1
// End Quorum
if len(svc.callbacks) != wantCallbacks {
t.Errorf("Expected %d callbacks for service 'service', got %d", wantCallbacks, len(svc.callbacks))
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.