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.10.2 #1391

Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
381 commits
Select commit Hold shift + click to select a range
1296908
cmd/faucet: update the embedded website asset
karalabe Jan 14, 2021
d13c59f
Merge pull request #22169 from karalabe/faucet-regen
karalabe Jan 14, 2021
c4deebb
core/state/snapshot: add generation logs to storage too
karalabe Jan 15, 2021
3944976
Merge pull request #22177 from karalabe/snapshot-storage-logs
karalabe Jan 15, 2021
8d62ee6
les: don't drop sentTo for normal cases (#22048)
rjl493456442 Jan 15, 2021
c76573a
eth/protocols/eth: fix slice resize flaw (#22181)
dadeg Jan 16, 2021
034ecc3
les: remove useless protocol defines (#22115)
rjl493456442 Jan 16, 2021
3981822
tests/fuzzers/abi: better test generation (#22158)
MariusVanDerWijden Jan 18, 2021
10555d4
cmd/geth: dump config for metrics (#22083)
MariusVanDerWijden Jan 18, 2021
5e9f5ca
core/state/snapshot: write snapshot generator in batch (#22163)
rjl493456442 Jan 18, 2021
24c1e30
cmd/geth: graceful shutdown if disk is full (#22103)
alex347 Jan 19, 2021
45cb1a5
eth, les: add new config field SyncFromCheckpoint (#22123)
rjl493456442 Jan 19, 2021
d1301eb
oss-fuzz: fix abi fuzzer (#22199)
MariusVanDerWijden Jan 20, 2021
7da8f75
go.mod: upgrade golang-lru (#22134)
ucwong Jan 20, 2021
81bf9f9
downloader: extract findAncestor search functions (#21744)
meowsbits Jan 20, 2021
1e1865b
core: implement background trie prefetcher
holiman Feb 5, 2020
42f9f1f
core/state: convert prefetcher to concurrent per-trie loader
karalabe Jan 8, 2021
ddadc3d
Merge pull request #21047 from holiman/improve_updates_2
karalabe Jan 20, 2021
c4307a9
eth/filters: fix potential deadlock in filter timeout loop (#22178)
s1na Jan 21, 2021
231040c
event: add ResubscribeErr (#22191)
lukasz-zimnoch Jan 21, 2021
9e1bd0f
trie: fix range prover (#22210)
rjl493456442 Jan 22, 2021
f26c19c
common/mclock: remove dependency on github.com/aristanetworks/goarist…
fjl Jan 22, 2021
db35d77
cmd, geth: CLI help fixes (#22220)
ligi Jan 24, 2021
3708454
cmd, geth: CLI help fixes (#22220)
ligi Jan 24, 2021
797b081
eth/protocols/snap: snap sync testing (#22179)
holiman Jan 25, 2021
1770fe7
go.mod: update dependencies (#22216)
MariusVanDerWijden Jan 25, 2021
c0862f4
graphql: change receipt status to decimal instead of hex (#22187)
renaynay Jan 25, 2021
59a7913
go.mod: upgrade github.com/huin/goupnp (#22227)
ucwong Jan 25, 2021
04a7226
snapshot: merge loops for better performance (#22160)
ehnuje Jan 25, 2021
49cdcf5
core: reset to genesis when middle block is missing (#22135)
rjl493456442 Jan 25, 2021
adf130d
eth/tracers: move tracing APIs into eth/tracers (#22161)
rjl493456442 Jan 25, 2021
d2779ed
eth, p2p: reserve half peer slots for snap peers during snap sync (#2…
holiman Jan 25, 2021
7202b41
tests/fuzzers/abi: fixed one-off panic with int.Min64 value (#22233)
MariusVanDerWijden Jan 25, 2021
573f373
internal/ethapi: print tx details when submitting (#22170)
karalabe Jan 26, 2021
14d4954
core/state: fix panic in state dumping (#22225)
holiman Jan 26, 2021
6816182
core: speed up header import (#21967)
holiman Jan 26, 2021
ad038b6
accounts/scwallet: use go-ethereum crypto instead of go-ecdh (#22212)
fjl Jan 26, 2021
9c57293
accounts/scwallet: update documentation (#22242)
gballet Jan 26, 2021
a72fa88
les: switch to new discv5 (#21940)
zsfelfoldi Jan 26, 2021
2e5d141
rpc: deprecate Client.ShhSubscribe (#22239)
gballet Jan 27, 2021
eb21c65
cmd,core,eth,params,tests: define yolov3 + enable EIP-2565 (#22213)
s1na Jan 28, 2021
7a800f9
les/utils: UDP rate limiter (#21930)
zsfelfoldi Jan 28, 2021
f25b437
cmd/clef: don't check file permissions on windows (#22251)
holiman Jan 29, 2021
3c728fb
eth/tracers: fix unigram tracer (#22248)
s1na Feb 1, 2021
e3430ac
eth: check snap satelliteness, delegate drop to eth (#22235)
karalabe Feb 2, 2021
4eae0c6
cmd/geth, node: allow configuring JSON-RPC on custom path prefix (#22…
renaynay Feb 2, 2021
ef84da8
all: remove unneeded parentheses (#21921)
alexprut Feb 2, 2021
83e4c49
trie : use trie.NewStackTrie instead of new(trie.Trie) (#22246)
ucwong Feb 2, 2021
3512b41
core: reset txpool state on sethead (#22247)
MariusVanDerWijden Feb 3, 2021
54735a6
fuzzers: added consensys/gurvy library to bn256 differential fuzzer (…
MariusVanDerWijden Feb 3, 2021
2812132
internal/ethapi: comment nitpick (#22270)
MariusVanDerWijden Feb 5, 2021
098a2b6
eth: move eth.Config to a common package (#22205)
rjl493456442 Feb 5, 2021
fba5a63
internal/ethapi: fix typo in comment (#22271)
MariusVanDerWijden Feb 5, 2021
7ed860d
eth: don't wait for snap registration if we're not running snap (#22272)
holiman Feb 5, 2021
e74bd58
consensus: remove seal verification from the consensus engine interfa…
gballet Feb 5, 2021
994cdc6
cmd/utils: enable snapshots by default
karalabe Feb 7, 2021
477fd42
metrics: fix cast omission in cpu_syscall.go (#22262)
isdyaufh8o7cq Feb 8, 2021
bbe694f
Merge pull request #22280 from karalabe/snapshot-default
karalabe Feb 8, 2021
d86906f
params: just to make snapshots a bit more official
karalabe Feb 8, 2021
f566dd3
all: bloom-filter based pruning mechanism (#21724)
rjl493456442 Feb 8, 2021
123e934
Merge pull request #22288 from karalabe/1.10.unstable
karalabe Feb 8, 2021
2728672
core/state/pruner: fix compaction after pruning
karalabe Feb 8, 2021
944d901
Merge pull request #22291 from karalabe/fix-pruner-compaction
karalabe Feb 8, 2021
74dbc20
core/state/pruner: fix compaction range error
holiman Feb 8, 2021
2fdba3a
Merge pull request #22294 from holiman/pruner_compact_fix
karalabe Feb 9, 2021
2778667
internal/debug: add switch to format logs with json (#22207)
s1na Feb 9, 2021
cb3c7e4
accounts/abi/bind: fixed unpacking error (#22230)
MariusVanDerWijden Feb 10, 2021
409b16e
cmd/utils, eth/ethconfig: unindex txs older than ~1 year
karalabe Feb 8, 2021
1bbc8a1
Merge pull request #22293 from karalabe/txunindex-1year
karalabe Feb 10, 2021
111abdc
cmd/devp2p: fix documentation for eth-test (#22298)
renaynay Feb 11, 2021
ef227c5
core: fix temp memory blowup caused by defers holding on to state
karalabe Feb 12, 2021
2fc465a
Merge pull request #22319 from karalabe/fix-defer-leak
karalabe Feb 12, 2021
7d1b711
les: enable les/4 and add tests (#22321)
zsfelfoldi Feb 12, 2021
08c878a
cmd/utils: add workaround for FreeBSD statfs quirk (#22310)
gballet Feb 15, 2021
7778780
cmd/geth: fix js unclean shutdown (#22302)
alex347 Feb 15, 2021
e991bda
trie: fix bloom crash on fast sync restart
karalabe Feb 16, 2021
f4fcd4f
rpc: increase the number of subscriptions in storm test (#22316)
gballet Feb 16, 2021
915c614
Merge pull request #22332 from karalabe/fix-fastsync-restart-bloom-crash
karalabe Feb 16, 2021
9ec3329
core/state/snapshot: ensure Cap retains a min number of layers
karalabe Feb 16, 2021
6291fc9
Merge pull request #22331 from karalabe/enforce-min-snap-difflayers
karalabe Feb 16, 2021
bfdff4c
eth: fix snap sync cancellation
karalabe Feb 16, 2021
f9445e9
cmd/devp2p/internal/ethtest: use shared message types (#22315)
renaynay Feb 16, 2021
1489c3f
Merge pull request #22334 from karalabe/fix-snap-cancel
karalabe Feb 16, 2021
e01096f
eth/handler, broadcast: optimize tx broadcast mechanism (#22176)
holiman Feb 17, 2021
52e5c38
core/state: copy the snap when copying the state (#22340)
holiman Feb 18, 2021
9ec32a9
rlp: handle case of normal EOF in Stream.readFull (#22336)
oneeman Feb 18, 2021
b1835b3
node: always show websocket url in logs (#22307)
holiman Feb 18, 2021
6ec1561
eth: implement eth66 (#22241)
holiman Feb 18, 2021
d36276d
p2p/dnsdisc: fix hot-spin when all trees are empty (#22313)
fjl Feb 19, 2021
c027507
les: renamed lespay to vflux (#22347)
zsfelfoldi Feb 19, 2021
ca76db6
cmd/utils: disable caching preimages by default
karalabe Feb 19, 2021
c5023e1
travis, appveyor, build: bump Go to 1.16
karalabe Feb 19, 2021
8647233
les: fix balance expiration (#22343)
zsfelfoldi Feb 19, 2021
8f03e3b
tests/fuzzers/les: add fuzzer for les server handler (#22282)
zsfelfoldi Feb 20, 2021
3ecfdcc
les: clean up server handler (#22357)
rjl493456442 Feb 22, 2021
c4a2b68
cmd/geth: add db commands stats, compact, put, get, delete (#22014)
holiman Feb 23, 2021
142fbcf
internal/ethapi: reject non-replay-protected txs over RPC (#22339)
MariusVanDerWijden Feb 23, 2021
2d1a0e9
accounts/abi/bind: fix up Go mod files for Go 1.16
karalabe Feb 23, 2021
2743fb0
Dockerfile: bump to Go 1.16 base images
karalabe Feb 23, 2021
4ee8d2d
travis, appveyor, build, Dockerfile: bump Go to 1.16 (#22351)
karalabe Feb 23, 2021
cdb6a84
Merge pull request #22350 from karalabe/disable-preimage-collection
karalabe Feb 23, 2021
c9aa267
travis: bump Android NDK version
karalabe Feb 23, 2021
b502c86
Merge pull request #22368 from karalabe/ndk-bump
karalabe Feb 23, 2021
70afe15
travis: bump builders to Bionic
karalabe Feb 23, 2021
bf5b379
Merge pull request #22369 from karalabe/android-bionic-builder
karalabe Feb 23, 2021
f54dc4a
travis: manually install Android since Travis is stale (#22373)
karalabe Feb 24, 2021
8e547ee
cmd/utils: remove deprecated command line flags (#22263)
renaynay Feb 24, 2021
b2b5c82
eth/protocols/snap: lower abortion and resumption logs to debug
karalabe Feb 25, 2021
96d9306
Merge pull request #22381 from karalabe/lower-error-log
karalabe Feb 25, 2021
378e961
cmd, eth, les: enable serving light clients when non-synced (#22250)
rjl493456442 Feb 25, 2021
7a3c890
les, light: improve txstatus retrieval (#22349)
rjl493456442 Feb 25, 2021
bbfb1e4
all: add support for EIP-2718, EIP-2930 transactions (#21502)
lightclient Feb 25, 2021
de9465f
cmd/devp2p: add eth66 test suite (#22363)
renaynay Feb 25, 2021
dc109cc
les: move server pool to les/vflux/client (#22377)
zsfelfoldi Feb 25, 2021
0928562
all: define Berlin hard fork spec
karalabe Feb 25, 2021
27b3137
rpc: add separate size limit for websocket (#22385)
fjl Feb 26, 2021
744707a
Merge pull request #22380 from karalabe/berlin
karalabe Feb 26, 2021
3822b09
accounts/keystore: use github.com/google/uuid (#22217)
MariusVanDerWijden Feb 26, 2021
498458b
core/state: fix eta calculation on pruning (#22386)
holiman Feb 26, 2021
d968704
les: UDP pre-negotiation of available server capacity (#22183)
zsfelfoldi Mar 1, 2021
19d7a37
core/rawdb: fix the transaction indexer (#22395)
rjl493456442 Mar 1, 2021
7834e4a
core, eth: unship EIP 2315
karalabe Mar 2, 2021
430f69e
core/vm/runtime: more unshipping
karalabe Mar 2, 2021
0540d3c
cmd/geth: put allowUnsecureTx flag in RPC section (#22412)
MariusVanDerWijden Mar 3, 2021
c539a05
params: update chts (#22418)
rjl493456442 Mar 3, 2021
07e907c
cmd/utils: fix txlookuplimit for archive node (#22419)
rjl493456442 Mar 3, 2021
ba99910
core/forkid, params: unset Berlin fork number (#22413)
karalabe Mar 3, 2021
b24804d
les: fix nodiscover option on the client side (#22422)
zsfelfoldi Mar 3, 2021
5a81dd9
cmd: retire whisper flags (#22421)
rjl493456442 Mar 3, 2021
cd316d7
tests: update to latest tests (#22290)
MariusVanDerWijden Mar 3, 2021
56dec25
params: release geth 1.10.0 stable
fjl Mar 3, 2021
6338537
params: begin v1.10.1 release cycle
fjl Mar 3, 2021
9230ca4
Revert "core/forkid, params: unset Berlin fork number (#22413)"
karalabe Mar 4, 2021
de61da9
build: fix PPA failure due to updated debsrc
karalabe Mar 4, 2021
89026d5
Merge pull request #22431 from karalabe/builder-fix-ppa
karalabe Mar 4, 2021
5b95453
build: add support for Ubuntu Hirsute Hippo
karalabe Mar 4, 2021
dab90e4
Merge pull request #22432 from karalabe/add-hirsute
karalabe Mar 4, 2021
658cb9f
Merge pull request #22414 from karalabe/unship-2315
karalabe Mar 7, 2021
44c0bb2
Merge pull request #22426 from ethereum/revert-22413-unship-berlin
karalabe Mar 7, 2021
72b8cac
tests: update reference tests with 2315 removed from Berlin
holiman Mar 7, 2021
5aba946
Merge pull request #22452 from holiman/testupdate_berlin
karalabe Mar 7, 2021
c2d2f4e
params: release Geth v1.10.1
karalabe Mar 8, 2021
1826708
params: begin v1.10.2 release cycle
karalabe Mar 8, 2021
be87f76
core/types: reduce allocations in GasPriceCmp (#22456)
MariusVanDerWijden Mar 8, 2021
3d299b7
les: fix errors in metric namespace (#22459)
holiman Mar 9, 2021
22082f9
cmd: extend dumpgenesis to support network flags on the cmd (#22406)
rjl493456442 Mar 9, 2021
aae7660
p2p/enr: fix decoding of incomplete lists (#22484)
fjl Mar 11, 2021
6387c52
cmd/geth: add ancient datadir flag to snapshot subcommands (#22486)
michael1011 Mar 12, 2021
3f74c8e
cmd/devp2p: better testcase failure output for ethtests (#22482)
holiman Mar 13, 2021
c6d4500
eth, les: properly init statedb accesslist during tracing (#22480)
holiman Mar 14, 2021
faacc8e
cmd/geth, eth/downloader: remove copydb command (#22501)
holiman Mar 15, 2021
bc47993
tests/fuzzers: fix goroutine leak in les fuzzer (#22455)
holiman Mar 16, 2021
9983072
core/types: improve comments in new EIP-2718 code (#22402)
lightclient Mar 16, 2021
7076e8e
cmd/clef: docs - link to ethereum org repo (#22400)
ligi Mar 16, 2021
7cbf1d7
cmd/clef (docs): fix image background (#22399)
ligi Mar 16, 2021
94ab4ea
core/rawdb: fix transaction indexing/unindexing hashing error (#22457)
holiman Mar 16, 2021
62d8022
les: fix UDP connection query (#22451)
zsfelfoldi Mar 16, 2021
6d9707a
les: fix UDP connection query (#22451)
zsfelfoldi Mar 16, 2021
91726e8
les: allow either full enode strings or raw hex ids in the API (#22423)
zsfelfoldi Mar 16, 2021
410089a
eth/protocols/snap, eth/downloader: don't use bloom filter in snap sync
holiman Mar 17, 2021
117fa7d
eth/protocols/snap: fix typo (#22530)
r1cs Mar 19, 2021
6a528fc
cmd/devp2p/internal/ethtest: return request ID in BlockHeaders respon…
renaynay Mar 19, 2021
aa8b218
ethclient: fix error handling for header test (#22514)
meowsbits Mar 19, 2021
38ea7f2
accounts/abi/bind: add NoSend transact option (#22446)
reds Mar 19, 2021
a90861a
go.mod: upgrade goleveldb to commit 64b5b1c (#22436)
ucwong Mar 19, 2021
345890a
go.mod: upgrade goupnp to commit 0ca76305 (#22479)
ucwong Mar 19, 2021
d50e9d2
consensus/ethash: remove unnecessary variable definition (#22512)
jacksoom Mar 19, 2021
e3a3f7c
cmd/devp2p: use AWS-SDK v2 (#22360)
qhenkart Mar 19, 2021
5bc0343
p2p/dnsdisc: fix flaw in dns size calculation (#22533)
holiman Mar 19, 2021
c454717
core: fix potential race in chainIndexerTest (#22346)
s1na Mar 19, 2021
d3040a8
cmd/devp2p/internal/ethtest: skip eth/66 tests when v66 not supported…
renaynay Mar 19, 2021
9429ab1
cmd/devp2p: add flag for AWS region (#22537)
fjl Mar 19, 2021
5bf6612
cmd/devp2p: fix error in updating the cursor when collecting records …
holiman Mar 20, 2021
36b51b8
cmd/devp2p: add old block announcement test to eth test suite (#22474)
renaynay Mar 20, 2021
ec73ec0
cmd/utils: fix compilation issue on openbsd (#22511)
tobias-hildebrandt Mar 20, 2021
eaccdba
core: fix method comment for `txpool.requestReset` (#22543)
derekchiang Mar 22, 2021
aab3560
accounts: eip-712 signing for ledger (#22378)
MrChico Mar 22, 2021
0c70b83
all: add read-only option to database (#22407)
rjl493456442 Mar 22, 2021
8d6cc16
cmd/geth: check block range against chain head in export cmd (#22387)
s1na Mar 22, 2021
a31f6d5
core/state/snapshot: fix panic on missing parent
karalabe Mar 22, 2021
f304290
Merge pull request #22551 from karalabe/snapshot-parent-get-panic
karalabe Mar 22, 2021
477ec75
Merge pull request #22513 from holiman/no_snap_bloom
karalabe Mar 23, 2021
e862cbf
internal/web3ext, node: migrate node admin API (Start|Stop)RPC->HTTP …
meowsbits Mar 23, 2021
5129cdc
cmd/devp2p: skip ENR field tails properly in nodeset filter (#22565)
fjl Mar 24, 2021
15e6c27
p2p: fix minor typo and remove fd parameter in checkInboundConn (#22547)
terasum Mar 24, 2021
ab8fd4d
p2p/dnsdisc: rate limit resolving before checking cache (#22566)
fjl Mar 24, 2021
c5df05b
eth/protocols/snap: fix the flaws in the snap sync (#22553)
rjl493456442 Mar 24, 2021
0fda25e
eth/tracers, core: use scopecontext in tracers, provide statedb in ca…
holiman Mar 25, 2021
497448b
core: fix condition on header verification
holiman Mar 25, 2021
bed74b3
cmd/devp2p: fix comparison of TXT record value (#22572)
fjl Mar 25, 2021
4adf0b9
Merge pull request #22573 from holiman/checkfreq
karalabe Mar 25, 2021
54c0d57
eth: dump rpc gas cap and tx fee cap (#22574)
MariusVanDerWijden Mar 25, 2021
6d7ff6a
eth/protocols, metrics, p2p: add handler performance metrics
karalabe Mar 26, 2021
efe0229
Merge pull request #22581 from karalabe/network-latency-monitoring
karalabe Mar 26, 2021
2550e46
eth/protocols, metrics: use resetting histograms for rare packets
karalabe Mar 26, 2021
6477ea6
Merge pull request #22586 from karalabe/resettting-histogram
karalabe Mar 26, 2021
9557271
eth: fix corner case in sync head determination (#21695)
zouguangxian Mar 26, 2021
cae6b55
cmd/geth, consensus/ethash: add support for --miner.notify.full flag …
fjl Mar 26, 2021
62379f0
metrics/influxdb: don't push empty histograms, no measurement != 0
karalabe Mar 26, 2021
063f78c
Merge pull request #22590 from karalabe/nil-histogram
karalabe Mar 26, 2021
099be04
eth/protocols/snap: add peer id and req id to the timeout logs
karalabe Mar 26, 2021
e7f3962
Merge pull request #22591 from karalabe/snap-detailed-timeout-logs
karalabe Mar 26, 2021
27056f6
cmd/devp2p: update to newer cloudflare API client (#22588)
fjl Mar 26, 2021
76700ac
core/state/pruner: move the compaction out of the pruning procedure (…
rjl493456442 Mar 29, 2021
7644795
eth/protocols/snap: try to prevent requests timing out
holiman Mar 29, 2021
b6912c1
core: add BlockGen.GetBalance method (#22589)
renaynay Mar 29, 2021
24588ba
cmd/puppeth: specify working directory for nodejs 15 (#22549)
MariusVanDerWijden Mar 29, 2021
43a3768
Merge pull request #22596 from holiman/snap_timelimits
karalabe Mar 30, 2021
59ac3c9
cmd/geth: add db dumptrie command (#22563)
holiman Mar 30, 2021
44fe466
core/vm: fix Byzantium address list (#22603)
nebojsa94 Mar 30, 2021
3faae5d
ethstats: avoid creating subscriptions on background goroutine (#22587)
MariusVanDerWijden Mar 30, 2021
61ff3e8
core/state/snapshot, ethdb: track deletions more accurately (#22582)
karalabe Mar 30, 2021
4a37ae5
rpc: tighter shutdown synchronization in client subscription (#22597)
fjl Mar 30, 2021
55300d4
all: fix miner hashRate -> hashrate on API calls
karalabe Mar 31, 2021
73ed689
Merge pull request #22604 from karalabe/hashrate-capitalization-fix
karalabe Mar 31, 2021
c79fc20
core/state/snapshot: fix data race in diff layer (#22540)
fxfactorial Apr 6, 2021
706683e
internal/ethapi: fix eth_chainId method (#22243)
piersy Apr 6, 2021
adf09ae
graphql: add support for tx types and tx access lists (#22491)
AmitBRD Apr 6, 2021
5338ce4
internal/debug: add JSON log format and rename logging flags (#22341)
s1na Apr 6, 2021
95219ae
cmd/utils: move cache sanity check to SetEthConfig (#22510)
petesimard Apr 6, 2021
e275b1a
consensus/ethash: replace a magic number with it's constant (#22618)
Evolution404 Apr 6, 2021
2d89fe0
les: move client pool to les/vflux/server (#22495)
zsfelfoldi Apr 6, 2021
a600dab
eth, les: fix tracers (#22473)
rjl493456442 Apr 7, 2021
9d10856
core, eth, internal/ethapi: create access list RPC API (#22550)
MariusVanDerWijden Apr 7, 2021
2a7c4b6
eth: fix tracing state retrieval if requesting the non-dirty genesis
karalabe Apr 7, 2021
264fff7
Merge pull request #22629 from karalabe/fix-chain-tracing-from-0
karalabe Apr 7, 2021
e3ff37c
params: update CHTs for v1.10.2
karalabe Apr 8, 2021
a665f5d
Merge pull request #22632 from karalabe/cht-1.10.2
karalabe Apr 8, 2021
97d11b0
params: release go-ethereum v1.10.2 stable
fjl Apr 8, 2021
0bd499d
Merge branch 'master' into upgrade/go-ethereum/v1.10.2-2022428043256
baptiste-b-pegasys May 17, 2022
d5beb40
Merge branch 'master' into upgrade/go-ethereum/v1.10.2-2022428043256
baptiste-b-pegasys May 17, 2022
860a94b
Merge branch 'master' into upgrade/go-ethereum/v1.10.2-2022428043256
baptiste-b-pegasys May 18, 2022
9235d77
Merge branch 'master' into upgrade/go-ethereum/v1.10.2-2022519080100
baptiste-b-pegasys May 19, 2022
09786a3
fixes: diffs, todos done
baptiste-b-pegasys May 19, 2022
a2f2522
fix: tracers
baptiste-b-pegasys May 19, 2022
0eeba8a
fix: tracers
baptiste-b-pegasys May 20, 2022
b4d9f90
fix: quorum precompile contracts
baptiste-b-pegasys May 20, 2022
efc28e8
Merge branch 'ConsenSys:master' into upgrade/go-ethereum/v1.10.2-2022…
baptiste-b-pegasys May 20, 2022
3f7499d
remove note book
baptiste-b-pegasys May 20, 2022
1eacac4
diff fixes: private db prepare, api result
baptiste-b-pegasys May 23, 2022
451c69b
fix: revert diff
baptiste-b-pegasys May 23, 2022
3ad2c37
remove useless warning
baptiste-b-pegasys May 23, 2022
9c76ee9
fix diffs
baptiste-b-pegasys May 23, 2022
62d31e9
Merge branch 'upgrade/go-ethereum/v1.10.2-2022519080100' into upgrade…
baptiste-b-pegasys May 24, 2022
f3a7c31
fix: merge
baptiste-b-pegasys May 24, 2022
7289a1e
fix: merge, diff
baptiste-b-pegasys May 24, 2022
ae03921
revert unwanted modification
baptiste-b-pegasys May 27, 2022
68987a8
Update eth/api_backend.go
achraf17 May 31, 2022
3bfa8dc
Update eth/api_backend.go
achraf17 May 31, 2022
966c786
update state_accessor.go
achraf17 May 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion accounts/abi/bind/auth.go
Expand Up @@ -209,7 +209,7 @@ func NewWalletTransactor(w accounts.Wallet, account accounts.Account, chainId *b
From: account.Address,
Signer: func(address common.Address, transaction *types.Transaction) (*types.Transaction, error) {
if address != account.Address {
return nil, errors.New("not authorized to sign this account")
return nil, ErrNotAuthorized
}
if transaction.ChainId() == nil {
chainId = transaction.ChainId()
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Expand Up @@ -755,11 +755,11 @@ type filterBackend struct {
bc *core.BlockChain
}

func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
func (fb *filterBackend) PSMR() mps.PrivateStateMetadataResolver { return fb.bc.PrivateStateManager() }

func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
func (fb *filterBackend) EventMux() *event.TypeMux { panic("not supported") }

func (fb *filterBackend) PSMR() mps.PrivateStateMetadataResolver { return fb.bc.PrivateStateManager() }

func (fb *filterBackend) HeaderByNumber(ctx context.Context, block rpc.BlockNumber) (*types.Header, error) {
if block == rpc.LatestBlockNumber {
return fb.bc.CurrentHeader(), nil
Expand Down
6 changes: 5 additions & 1 deletion accounts/abi/bind/base.go
Expand Up @@ -63,6 +63,8 @@ type TransactOpts struct {

Context context.Context // Network context to support cancellation and timeouts (nil = no timeout)

NoSend bool // Do all transact steps but do not send the transaction

// Quorum
PrivateFrom string // The public key of the Tessera/Constellation identity to send this tx from.
PrivateFor []string // The public keys of the Tessera/Constellation identities this tx is intended for.
Expand Down Expand Up @@ -293,7 +295,9 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
if err != nil {
return nil, err
}

if opts.NoSend {
return signedTx, nil
}
if err := c.transactor.SendTransaction(ensureContext(opts.Context), signedTx, PrivateTxArgs{PrivateFor: opts.PrivateFor}); err != nil {
return nil, err
}
Expand Down
15 changes: 8 additions & 7 deletions accounts/external/backend.go
Expand Up @@ -204,13 +204,14 @@ func (api *ExternalSigner) SignTx(account accounts.Account, tx *types.Transactio
to = &t
}
args := &core.SendTxArgs{
Data: &data,
Nonce: hexutil.Uint64(tx.Nonce()),
Value: hexutil.Big(*tx.Value()),
Gas: hexutil.Uint64(tx.Gas()),
GasPrice: hexutil.Big(*tx.GasPrice()),
To: to,
From: common.NewMixedcaseAddress(account.Address),
Data: &data,
Nonce: hexutil.Uint64(tx.Nonce()),
Value: hexutil.Big(*tx.Value()),
Gas: hexutil.Uint64(tx.Gas()),
GasPrice: hexutil.Big(*tx.GasPrice()),
To: to,
From: common.NewMixedcaseAddress(account.Address),
// Quorum
IsPrivate: tx.IsPrivate(),
}
var res signTransactionResult
Expand Down
1 change: 0 additions & 1 deletion accounts/keystore/keystore.go
Expand Up @@ -316,7 +316,6 @@ func (ks *KeyStore) SignTxWithPassphrase(a accounts.Account, passphrase string,
return nil, err
}
defer zeroKey(key.PrivateKey)

if tx.IsPrivate() {
return types.SignTx(tx, types.QuorumPrivateTxSigner{}, key.PrivateKey)
}
Expand Down
82 changes: 82 additions & 0 deletions accounts/usbwallet/ledger.go
Expand Up @@ -52,8 +52,10 @@ const (
ledgerOpRetrieveAddress ledgerOpcode = 0x02 // Returns the public key and Ethereum address for a given BIP 32 path
ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Ethereum transaction after having the user validate the parameters
ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration
ledgerOpSignTypedMessage ledgerOpcode = 0x0c // Signs an Ethereum message following the EIP 712 specification

ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet
ledgerP1InitTypedMessageData ledgerParam1 = 0x00 // First chunk of Typed Message data
ledgerP1InitTransactionData ledgerParam1 = 0x00 // First transaction data block for signing
ledgerP1ContTransactionData ledgerParam1 = 0x80 // Subsequent transaction data block for signing
ledgerP2DiscardAddressChainCode ledgerParam2 = 0x00 // Do not return the chain code along with the address
Expand Down Expand Up @@ -170,6 +172,24 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
return w.ledgerSign(path, tx, chainID)
}

// SignTypedMessage implements usbwallet.driver, sending the message to the Ledger and
// waiting for the user to sign or deny the transaction.
//
// Note: this was introduced in the ledger 1.5.0 firmware
func (w *ledgerDriver) SignTypedMessage(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) {
// If the Ethereum app doesn't run, abort
if w.offline() {
return nil, accounts.ErrWalletClosed
}
// Ensure the wallet is capable of signing the given transaction
if w.version[0] < 1 && w.version[1] < 5 {
//lint:ignore ST1005 brand name displayed on the console
return nil, fmt.Errorf("Ledger version >= 1.5.0 required for EIP-712 signing (found version v%d.%d.%d)", w.version[0], w.version[1], w.version[2])
}
// All infos gathered and metadata checks out, request signing
return w.ledgerSignTypedMessage(path, domainHash, messageHash)
}

// ledgerVersion retrieves the current version of the Ethereum wallet app running
// on the Ledger wallet.
//
Expand Down Expand Up @@ -367,6 +387,68 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction
return sender, signed, nil
}

// ledgerSignTypedMessage sends the transaction to the Ledger wallet, and waits for the user
// to confirm or deny the transaction.
//
// The signing protocol is defined as follows:
//
// CLA | INS | P1 | P2 | Lc | Le
// ----+-----+----+-----------------------------+-----+---
// E0 | 0C | 00 | implementation version : 00 | variable | variable
//
// Where the input is:
//
// Description | Length
// -------------------------------------------------+----------
// Number of BIP 32 derivations to perform (max 10) | 1 byte
// First derivation index (big endian) | 4 bytes
// ... | 4 bytes
// Last derivation index (big endian) | 4 bytes
// domain hash | 32 bytes
// message hash | 32 bytes
//
//
//
// And the output data is:
//
// Description | Length
// ------------+---------
// signature V | 1 byte
// signature R | 32 bytes
// signature S | 32 bytes
func (w *ledgerDriver) ledgerSignTypedMessage(derivationPath []uint32, domainHash []byte, messageHash []byte) ([]byte, error) {
// Flatten the derivation path into the Ledger request
path := make([]byte, 1+4*len(derivationPath))
path[0] = byte(len(derivationPath))
for i, component := range derivationPath {
binary.BigEndian.PutUint32(path[1+4*i:], component)
}
// Create the 712 message
payload := append(path, domainHash...)
payload = append(payload, messageHash...)

// Send the request and wait for the response
var (
op = ledgerP1InitTypedMessageData
reply []byte
err error
)

// Send the message over, ensuring it's processed correctly
reply, err = w.ledgerExchange(ledgerOpSignTypedMessage, op, 0, payload)

if err != nil {
return nil, err
}

// Extract the Ethereum signature and do a sanity validation
if len(reply) != crypto.SignatureLength {
return nil, errors.New("reply lacks signature")
}
signature := append(reply[1:], reply[0])
return signature, nil
}

// ledgerExchange performs a data exchange with the Ledger wallet, sending it a
// message and retrieving the response.
//
Expand Down
4 changes: 4 additions & 0 deletions accounts/usbwallet/trezor.go
Expand Up @@ -185,6 +185,10 @@ func (w *trezorDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
return w.trezorSign(path, tx, chainID)
}

func (w *trezorDriver) SignTypedMessage(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) {
return nil, accounts.ErrNotSupported
}

// trezorDerive sends a derivation request to the Trezor device and returns the
// Ethereum address located on that path.
func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, error) {
Expand Down
43 changes: 42 additions & 1 deletion accounts/usbwallet/wallet.go
Expand Up @@ -68,6 +68,8 @@ type driver interface {
// SignTx sends the transaction to the USB device and waits for the user to confirm
// or deny the transaction.
SignTx(path accounts.DerivationPath, tx *types.Transaction, chainID *big.Int) (common.Address, *types.Transaction, error)

SignTypedMessage(path accounts.DerivationPath, messageHash []byte, domainHash []byte) ([]byte, error)
}

// wallet represents the common functionality shared by all USB hardware
Expand Down Expand Up @@ -525,7 +527,46 @@ func (w *wallet) signHash(account accounts.Account, hash []byte) ([]byte, error)

// SignData signs keccak256(data). The mimetype parameter describes the type of data being signed
func (w *wallet) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error) {
return w.signHash(account, crypto.Keccak256(data))

// Unless we are doing 712 signing, simply dispatch to signHash
if !(mimeType == accounts.MimetypeTypedData && len(data) == 66 && data[0] == 0x19 && data[1] == 0x01) {
return w.signHash(account, crypto.Keccak256(data))
}

// dispatch to 712 signing if the mimetype is TypedData and the format matches
w.stateLock.RLock() // Comms have own mutex, this is for the state fields
defer w.stateLock.RUnlock()

// If the wallet is closed, abort
if w.device == nil {
return nil, accounts.ErrWalletClosed
}
// Make sure the requested account is contained within
path, ok := w.paths[account.Address]
if !ok {
return nil, accounts.ErrUnknownAccount
}
// All infos gathered and metadata checks out, request signing
<-w.commsLock
defer func() { w.commsLock <- struct{}{} }()

// Ensure the device isn't screwed with while user confirmation is pending
// TODO(karalabe): remove if hotplug lands on Windows
w.hub.commsLock.Lock()
w.hub.commsPend++
w.hub.commsLock.Unlock()

defer func() {
w.hub.commsLock.Lock()
w.hub.commsPend--
w.hub.commsLock.Unlock()
}()
// Sign the transaction
signature, err := w.driver.SignTypedMessage(path, data[2:34], data[34:66])
if err != nil {
return nil, err
}
return signature, nil
}

// SignDataWithPassphrase implements accounts.Wallet, attempting to sign the given
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/README.md
Expand Up @@ -920,4 +920,4 @@ There are a couple of implementation for a UI. We'll try to keep this list up to
| QtSigner| https://github.com/holiman/qtsigner/| Python3/QT-based| :+1:| :+1:| :+1:| :+1:| :+1:| :x: | :+1: (partially)|
| GtkSigner| https://github.com/holiman/gtksigner| Python3/GTK-based| :+1:| :x:| :x:| :+1:| :+1:| :x: | :x: |
| Frame | https://github.com/floating/frame/commits/go-signer| Electron-based| :x:| :x:| :x:| :x:| ?| :x: | :x: |
| Clef UI| https://github.com/kyokan/clef-ui| Golang/QT-based| :+1:| :+1:| :x:| :+1:| :+1:| :x: | :+1: (approve tx only)|
| Clef UI| https://github.com/ethereum/clef-ui| Golang/QT-based| :+1:| :+1:| :x:| :+1:| :+1:| :x: | :+1: (approve tx only)|
8 changes: 4 additions & 4 deletions cmd/clef/main.go
Expand Up @@ -253,12 +253,12 @@ var AppHelpFlagGroups = []flags.FlagGroup{
testFlag,
advancedMode,
acceptFlag,
// <Quorum>

// Quorum
utils.PluginSettingsFlag,
utils.PluginLocalVerifyFlag,
utils.PluginPublicKeyFlag,
utils.PluginSkipVerifyFlag,
// </Quorum>
},
},
}
Expand Down Expand Up @@ -288,12 +288,12 @@ func init() {
testFlag,
advancedMode,
acceptFlag,
// <Quorum>

// Quorum
utils.PluginSettingsFlag,
utils.PluginLocalVerifyFlag,
utils.PluginPublicKeyFlag,
utils.PluginSkipVerifyFlag,
// </Quorum>
}
app.Action = signer
app.Commands = []cli.Command{initCommand,
Expand Down
Binary file modified cmd/clef/sign_flow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions cmd/devp2p/dns_cloudflare.go
Expand Up @@ -17,6 +17,7 @@
package main

import (
"context"
"fmt"
"strings"

Expand Down Expand Up @@ -79,7 +80,7 @@ func (c *cloudflareClient) checkZone(name string) error {
c.zoneID = id
}
log.Info(fmt.Sprintf("Checking Permissions on zone %s", c.zoneID))
zone, err := c.ZoneDetails(c.zoneID)
zone, err := c.ZoneDetails(context.Background(), c.zoneID)
if err != nil {
return err
}
Expand Down Expand Up @@ -112,7 +113,7 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
records = lrecords

log.Info(fmt.Sprintf("Retrieving existing TXT records on %s", name))
entries, err := c.DNSRecords(c.zoneID, cloudflare.DNSRecord{Type: "TXT"})
entries, err := c.DNSRecords(context.Background(), c.zoneID, cloudflare.DNSRecord{Type: "TXT"})
if err != nil {
return err
}
Expand All @@ -134,14 +135,15 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
if path != name {
ttl = treeNodeTTL // Max TTL permitted by Cloudflare
}
_, err = c.CreateDNSRecord(c.zoneID, cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl})
record := cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl}
_, err = c.CreateDNSRecord(context.Background(), c.zoneID, record)
} else if old.Content != val {
// Entry already exists, only change its content.
log.Info(fmt.Sprintf("Updating %s from %q to %q", path, old.Content, val))
old.Content = val
err = c.UpdateDNSRecord(c.zoneID, old.ID, old)
err = c.UpdateDNSRecord(context.Background(), c.zoneID, old.ID, old)
} else {
log.Info(fmt.Sprintf("Skipping %s = %q", path, val))
log.Debug(fmt.Sprintf("Skipping %s = %q", path, val))
}
if err != nil {
return fmt.Errorf("failed to publish %s: %v", path, err)
Expand All @@ -155,7 +157,7 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
}
// Stale entry, nuke it.
log.Info(fmt.Sprintf("Deleting %s = %q", path, entry.Content))
if err := c.DeleteDNSRecord(c.zoneID, entry.ID); err != nil {
if err := c.DeleteDNSRecord(context.Background(), c.zoneID, entry.ID); err != nil {
return fmt.Errorf("failed to delete %s: %v", path, err)
}
}
Expand Down