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.15 #1131

Merged
merged 55 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 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
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
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
550c952
Merge branch 'master' into upgrade/go-ethereum/v1.9.15-2021212113514
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
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
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 {
ricardolyn marked this conversation as resolved.
Show resolved Hide resolved
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
ricardolyn marked this conversation as resolved.
Show resolved Hide resolved
}

// 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.