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

Merge with master #57

Merged
merged 239 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
23ac8df
cmd. core: save preimages on genesis creation (#25538)
gballet Aug 18, 2022
cce7f08
rlp/rlpgen: fix error handling when target type not found (#25547)
jtraglia Aug 18, 2022
a1b8892
trie: improve node rlp decoding performance (#25357)
rjl493456442 Aug 18, 2022
2c5648d
all: fix some typos (#25551)
jtraglia Aug 19, 2022
fa1305f
internal/ethapi: fix comment typo (#25548)
ucwong Aug 19, 2022
32e8490
accounts/abi/bind/backends: typo fix (#25549)
ucwong Aug 19, 2022
656dc8c
eth, les: unlock downloader peerSet if there's an error (#25546)
jtraglia Aug 19, 2022
9762ddf
cmd/geth: parse uint64 value with ParseUint instead of Atoi (#25545)
jtraglia Aug 19, 2022
77308cd
consensus/beacon: check ttd reached on pos blocks (#25552)
MariusVanDerWijden Aug 19, 2022
36874b6
eth/filters: add global block logs cache (#25459)
s1na Aug 19, 2022
0865880
accounts/abi: fix set function (#25477)
zhiqiangxu Aug 19, 2022
ac7ad81
internal/ethapi: fix build regression (#25555)
fjl Aug 19, 2022
0ce494b
eth/fetcher: don't spend too much time on transaction inclusion (#25524)
holiman Aug 19, 2022
02418c2
Revert "eth/fetcher: don't spend too much time on transaction inclusi…
karalabe Aug 22, 2022
395f3d4
eth/catalyst: warn less frequently if no beacon client is available (…
karalabe Aug 22, 2022
2de49b0
params: release go-ethereum v1.10.22
fjl Aug 22, 2022
6d711f0
params: begin v1.10.23 release cycle
fjl Aug 22, 2022
81bd998
core, eth/downloader: handle spurious junk bodies from racey rollback…
karalabe Aug 23, 2022
5758d1f
core/state, trie: fix trie flush order for proper pruning
karalabe Aug 23, 2022
45a660a
consensus/beacon: don't ignore errors
holiman Aug 23, 2022
9ed10b9
Merge pull request #25581 from karalabe/triedb-fix-flush-order
karalabe Aug 23, 2022
4c114af
Merge pull request #25582 from holiman/err_handling
karalabe Aug 23, 2022
d901d85
params: release Geth v1.10.23
karalabe Aug 24, 2022
57896d6
params: begin v1.10.24 release cycle
karalabe Aug 24, 2022
6c40aed
params: begin go-ethereum v1.11 release cycle
fjl Aug 25, 2022
70e1e65
internal/ethapi: rename debug getters to match spec (#25176)
lightclient Aug 25, 2022
f03c37b
accounts/abi/bind: add const for tx fee elasticity multiplier (#25504)
xinbenlv Aug 25, 2022
c394c30
all: remove duplicate word in comments (#25618)
Abirdcfly Aug 29, 2022
6e6b508
cmd/geth: fix legacy receipt detection for empty db (#25609)
s1na Aug 30, 2022
6d882a5
build: fix ignored errors (#25591)
uji Aug 30, 2022
44b36a0
docs: specify execution client (#25566)
sandakersmann Aug 30, 2022
8df8eb4
ethclient: add 'finalized' and 'safe' block number support (#25580)
rachel-bousfield Aug 30, 2022
7813b67
node: change JWT error status to 401 Unauthorized (#25629)
dbadoy Aug 30, 2022
2b6df28
node: fix regression in TestJWT (#25635)
fjl Aug 30, 2022
d10c280
all: move genesis initialization to blockchain (#25523)
rjl493456442 Aug 30, 2022
362256e
eth/catalyst: adjust eta for themerge (#25601)
holiman Aug 31, 2022
279afd7
mobile: close node on error (#25643)
jakub-freebit Aug 31, 2022
8cfcb41
graphql: return correct logs for tx (#25612)
s1na Aug 31, 2022
3d68bb0
trie: fix grammar in comment (#25648)
aaronbuchwald Aug 31, 2022
dafa40e
eth/protocols/snap: fix problems due to idle-but-busy peers
holiman Aug 31, 2022
3f79afb
trie: cleanup stateTrie (#25640)
rjl493456442 Aug 31, 2022
95a2c22
eth/catalyst: prevent division by zero (#25654)
MariusVanDerWijden Aug 31, 2022
d79bd2f
trie: better error reporting (#25645)
holiman Sep 1, 2022
d46184c
core/state: filter out nil trie for copy (#25575)
rjl493456442 Sep 1, 2022
511bf8f
Merge pull request #25651 from holiman/fix_snapqueue
karalabe Sep 1, 2022
d2027ac
mobile: register filter APIs (#25642)
jakub-freebit Sep 2, 2022
198fa95
README.md: improve grammar (#25646)
xternet Sep 2, 2022
d6a12bc
eth/tracers/js: fill in log.refund field (#25661)
s1na Sep 2, 2022
7f2890a
eth/fetcher: throttle peers which deliver many invalid transactions (…
holiman Sep 2, 2022
90711ef
node, rpc: add JWT auth support in client (#24911)
protolambda Sep 2, 2022
38e002f
rpc: check that "version" is "2.0" in request objects (#25570)
dbadoy Sep 2, 2022
0d68b6b
trie: fix typo in comment (#25667)
dbadoy Sep 2, 2022
4b9c307
trie: fix unhandled error in test (#25628)
Kamandlou Sep 2, 2022
7318858
eth/tracers/js: improve integer types in log object (#25668)
fjl Sep 5, 2022
a9ec2ab
trie: check childrens' existence concurrently for snap heal
karalabe Sep 6, 2022
d408cb6
Merge pull request #25694 from karalabe/concurrent-heal-check
karalabe Sep 6, 2022
5ddedd2
core, light, trie: remove DiskDB function from trie database (#25690)
rjl493456442 Sep 7, 2022
a32a02f
params: update chts (#25707)
rjl493456442 Sep 7, 2022
d30e39b
core/vm: rename RANDOM to PREVRANDAO (#25691)
MariusVanDerWijden Sep 7, 2022
dea1fb3
all: cleanup tests (#25641)
rjl493456442 Sep 7, 2022
b1f6dcc
eth, les: rework chain tracer (#25143)
rjl493456442 Sep 7, 2022
6a575ed
eth/tracer: fix broken test (#25715)
rjl493456442 Sep 8, 2022
8363f79
trie: update comments + err check for preimages (#25672)
darioush Sep 8, 2022
de8d5fa
eth/protocols/snap: throttle trie heal requests when peers DoS us (#2…
karalabe Sep 9, 2022
06151eb
p2p/msgrate: be more lenient when calculating 'mean' (#25653)
holiman Sep 9, 2022
610cf02
rpc: improve error codes for internal server errors (#25678)
niczy Sep 9, 2022
389021a
core: place a cap on reorglogs (#25711)
holiman Sep 9, 2022
b628d72
build: upgrade to go 1.19 (#25726)
fjl Sep 10, 2022
0c1888a
p2p/discover/v5wire: reject packets smaller than 63 bytes (#25740)
dbadoy Sep 12, 2022
3a4cef5
core: preallocate maps in TxPool helper methods (#25737)
dbadoy Sep 12, 2022
9a3bd11
accounts/abi: fix typo in error message (#25742)
bprosnitz Sep 13, 2022
818ff32
graphql: fixes missing tx logs (#25745)
s1na Sep 13, 2022
9d71716
cmd/geth: add a verkle subcommand (#25718)
gballet Sep 14, 2022
25b35c9
node: fix HTTP server always force closing (#25755)
ngotchac Sep 14, 2022
0ee8b27
core: fix log order in "Imported new chain segment" (#25768)
fjl Sep 15, 2022
3db4a13
node: fix lint issue in rpcstack.go (#25774)
fjl Sep 15, 2022
1d2f5cf
les/catalyst/api: add support for ExchangeTransitionConfigurationV1 (…
pinkiebell Sep 15, 2022
a89b7ad
params: set TerminalTotalDifficultyPassed to true (#25769)
MariusVanDerWijden Sep 15, 2022
57a65f0
trie: handle more batch commit errors in Database (#25674)
Kamandlou Sep 15, 2022
83989a1
core/rawdb: fix leak of backoff timer (#25776)
ucwong Sep 16, 2022
d213cb0
crypto/bls12381: docfix of g1 Affine (#25729)
georgercarder Sep 16, 2022
8ade5e6
internal/ethapi: return error when requesting invalid trie key (#25762)
lightclient Sep 16, 2022
ada603f
core: don't cache zero nonce in txNoncer (#25603)
dbadoy Sep 16, 2022
8e52015
core: more compact bad block report (#25714)
lightclient Sep 17, 2022
468d184
core: move build version reading to its own package (#25806)
fjl Sep 19, 2022
d728ba9
eth: fix a rare datarace on CHT challenge reply / shutdown
karalabe Sep 20, 2022
18a001f
Merge pull request #25831 from karalabe/fix-challenge-stop-hang
karalabe Sep 20, 2022
d8ada03
core/vm: return copy of input slice in identity precompile, avoid ret…
jwasinger Sep 20, 2022
338bb2e
core/blockchain: downgrade tx indexing and unindexing logs (#25832)
lightclient Sep 21, 2022
5d11d38
eth/tracers: fix trace config for `TraceCall` (#25821)
makcandrov Sep 21, 2022
6eb8f32
eth/catalyst: add locking around newpayload (#25816)
holiman Sep 21, 2022
400ab0d
eth/catalyst: make tests run faster (#25818)
holiman Sep 21, 2022
6215b92
cmd/utils: make --authrpc.jwtsecret a DirectoryFlag (#25849)
jsvisa Sep 22, 2022
fb500d1
eth/protocols/snap: make log messages more clear that sync is ongoing…
holiman Sep 23, 2022
220bdd3
.github: add CL client to issue template (#25814)
s1na Sep 23, 2022
e6d4aed
p2p: add channel buffers to avoid goroutine leaks in tests (#24929)
BurtonQin Sep 23, 2022
65f3c1b
internal/version: use gitCommit injection in version handling code (#…
fjl Sep 23, 2022
e878067
cmd/abigen: change --exc to exclude by type name (#22620)
sebastianst Sep 23, 2022
9b35f3f
tests, les, eth: remove mentions of deprecated Morden testnet (#23570)
Zachinquarantine Sep 23, 2022
3da42f8
all: clean up the configs for pruner and snapshotter (#22396)
rjl493456442 Sep 23, 2022
15b4a4b
cmd/puppeth, cmd/utils: finalize removal of gasTarget flag (#24370)
Zachinquarantine Sep 23, 2022
367e605
core/types: improve accuracy of header.Size() (#25859)
zhiqiangxu Sep 26, 2022
4dc212d
eth/tracers: pad memory slice on OOB case (#25213)
s1na Sep 26, 2022
a3c6d1d
cmd/faucet: fix readme typos (#25867)
omahs Sep 26, 2022
e004e7d
core: fix datarace in txpool, fixes #25870 and #25869 (#25872)
holiman Sep 26, 2022
b32d203
eth/downloader, les/downloader: fix subtle flaw in queue delivery (#2…
zhiqiangxu Sep 26, 2022
c55c56c
core/vm: better handle error on eip activation check (#25131)
qinglin89 Sep 26, 2022
7227c9e
cmd/geth: make dumpgenesis load genesis datadir if it exists (#25135)
jwasinger Sep 26, 2022
3ec6fe6
tests: fix state test error checking (#25702)
meowsbits Sep 26, 2022
fc3e6d0
eth/tracers: use gencodec for native tracers (#25637)
s1na Sep 26, 2022
bff84a9
cmd, core, eth, les, light: track deleted nodes (#25757)
rjl493456442 Sep 27, 2022
13e6985
eth: return state error via GetEVM (#25876)
zhiqiangxu Sep 27, 2022
80cc34a
eth/downloader: make flakey test less flakey (#25879)
holiman Sep 27, 2022
1a63a76
ethclient/gethclient: fix bugs in override object encoding (#25616)
simonovic86 Sep 27, 2022
456b187
trie, eth/protocols/snap: less tiny db-writes during trie-healing (#2…
holiman Sep 28, 2022
1743e61
accounts/abi/bind/backends: fix AdjustTime to respect Fork (#25225)
lightclient Sep 28, 2022
53d68fe
tests: report mgas/s metric in evm benchmarks (#25700)
shekhirin Sep 28, 2022
2b1299b
core/vm: minor trivial clean up (#25880)
lmittmann Sep 28, 2022
85aafcf
eth/tracers: fix a bug in prestateTracer (#25884)
jsvisa Sep 28, 2022
88132af
internal/ethapi: handle odd length hex in decodeHash (#25883)
f01c5700 Sep 28, 2022
052c634
core: rework tx indexer (#25723)
rjl493456442 Sep 29, 2022
c2918c2
accounts/abi: return toGoType error immediately (#25565)
ceyonur Sep 29, 2022
ff1f492
eth/tracers: remove revertReasonTracer, add revert reason to callTrac…
s1na Sep 29, 2022
f651d6d
accounts/abi/bind: parse ABI only once on bind (#25574)
mikhailv Sep 29, 2022
07e0704
internal/flags: fix issue with stringslice migration (#25830)
holiman Sep 29, 2022
ea26fc8
cmd/geth, cmd/utils: geth attach with custom headers (#25829)
holiman Sep 30, 2022
a724163
core/types: add a testcase to TestLegacyReceiptDecoding (#25909)
zhiqiangxu Oct 3, 2022
f61b50b
eth/protocols/snap: serve snap requests when possible (#25644)
holiman Oct 3, 2022
1913b50
eth, miner: add timeout for building sealing block (#25407)
rjl493456442 Oct 3, 2022
ee301c7
all: fix docstrings
holiman Oct 4, 2022
4f7a425
Merge pull request #25924 from holiman/comments_fix
karalabe Oct 4, 2022
e14164d
core: fix linter complaint (#25927)
holiman Oct 4, 2022
5d52a35
eth/tracers: add diffMode to prestateTracer (#25422)
jsvisa Oct 6, 2022
e50aeac
eth/traces: add state limit (#25812)
rjl493456442 Oct 6, 2022
deead99
core/bloombits: speed up windows-test (#25844)
holiman Oct 6, 2022
067bac3
core, ethclient/gethclient: improve flaky tests (#25918)
holiman Oct 6, 2022
9cddfe9
node: prevent exposing engine API on unauthenticated endpoint (#25939)
fjl Oct 6, 2022
df2b3cd
eth/filters: fix for eth_getLogs failing with finalized- and safe tag…
ryanschneider Oct 6, 2022
5647516
cmd/geth: fix help output issues (#25941)
fjl Oct 6, 2022
7eafbec
accounts/usbwallet: support Ledger Nano S Plus and FTS (#25933)
lochjin Oct 11, 2022
5a02b2d
all: fix spelling mistakes (#25961)
holiman Oct 11, 2022
1c737e8
cmd/geth, core: fix typo in comment (#25954)
molecula451 Oct 11, 2022
28d076d
core/rawdb: provide more info on 'gap in the chain' error (#25938)
holiman Oct 12, 2022
a007ab7
core/types: add more context around ErrInvalidChainID (#25367)
MariusVanDerWijden Oct 12, 2022
bed3b10
common/math: optimized modexp (+ fuzzer) (#25525)
holiman Oct 12, 2022
e257b3a
tests/fuzzers/modexp: gofmt (#25972)
fjl Oct 12, 2022
3630caf
node: drop support for static & trusted node list files (#25610)
s1na Oct 12, 2022
eaf095c
accounts/keystore: faster tests (#25827)
holiman Oct 12, 2022
010f47f
eth/protocols/eth: fix typo in log message (#25969)
DragonDev1906 Oct 12, 2022
5b1a04b
eth/filters, ethclient/gethclient: add fullTx option to pending tx fi…
lmittmann Oct 12, 2022
9207e34
go.mod: upgrade github.com/dop251/goja (#25955)
ucwong Oct 12, 2022
c776a98
eth/tracers: fix the issue of panic in prestate with diffmode (#25957)
jsvisa Oct 12, 2022
fb75f11
Revert "go.mod: upgrade github.com/dop251/goja" (#25975)
holiman Oct 12, 2022
15b7e0b
common/math, tests/fuzzers: use big.Int clone (#26006)
holiman Oct 18, 2022
6069d82
cmd/utils: enable snapshot generation in import-mode (#25990)
holiman Oct 19, 2022
d86fe26
core/rawdb: refactor db key prefix (#26000)
s7v7nislands Oct 19, 2022
b9ba6f6
core/rawdb: open meta file in read only mode (#26009)
rjl493456442 Oct 19, 2022
9b9a1b6
internal/ethapi, accounts/abi/backends: use error defined in core (#2…
s7v7nislands Oct 20, 2022
a404195
eth/tracers: fix the issue prestate missing existing contract state (…
jsvisa Oct 21, 2022
5f70f9f
eth/tracers: simplify test framework (#25973)
holiman Oct 21, 2022
a6dda03
all: refactor txpool into it's own package in prep for 4844
karalabe Oct 24, 2022
a2b7481
Merge pull request #26038 from karalabe/split-txpool
karalabe Oct 24, 2022
68ba845
core/types: rename tx files to group them better together
karalabe Oct 26, 2022
5bed24d
Merge pull request #26044 from karalabe/rename-typed-tx-files
karalabe Oct 26, 2022
c4a6621
core, eth: for types with accurate size calcs, return uint64, not flo…
karalabe Oct 26, 2022
1d0c4e2
build: upgrade -dlgo version to Go 1.19.2
sandakersmann Oct 26, 2022
7496ad8
Merge pull request #26049 from sandakersmann/master
karalabe Oct 27, 2022
0c66d97
accounts/scwallet: fix keycard data signing error (#25331)
gballet Oct 27, 2022
4984c4e
build: make ios work again (#26052)
jakub-freebit Oct 27, 2022
9d795d0
core/vm: use optimized bigint (#26021)
holiman Oct 27, 2022
a1fc0d8
eth/filters: change filter block to be by-ref (#26054)
holiman Oct 27, 2022
60e30a9
core/rawdb: refactor db inspector for extending multiple ancient stor…
rjl493456442 Oct 28, 2022
fbdeff9
cmd/evm: calc base fee if parent data is present (#26051)
lightclient Oct 28, 2022
0f49422
eth/tracers: fix gasUsed for native and JS tracers (#26048)
s1na Oct 28, 2022
2c1af8b
cmd, eth: implement full-sync tester (#26035)
rjl493456442 Oct 28, 2022
fb4a97f
rpc: update docstring (#26072)
s7v7nislands Oct 31, 2022
5329aa3
Fix trace call for inner reverts (#25971)
ngotchac Oct 31, 2022
b0d4433
eth: implement eth/68 (#25980)
vdwijden Oct 31, 2022
8e69622
eth/tracers: add withLog to callTracer (#25991)
jsvisa Nov 1, 2022
0c40df5
eth/tracers: prestateTracer - exclude unchanged storage slots in diff…
s1na Nov 1, 2022
8578eb2
accounts/abi: return error on fixed bytes with size larger than 32 by…
zhiqiangxu Nov 1, 2022
2b65219
consensus/ethash: fix typo (#26016)
zhiqiangxu Nov 1, 2022
2415911
docs/postmortems: remove wrong parentheses (#26066)
SebastianSupreme Nov 1, 2022
a2a144c
miner, eth: implement recommit mechanism for payload building (#25836)
rjl493456442 Nov 2, 2022
24f08ec
miner: fail early if core.NewBlockChain fails (#26079)
roberto-bayardo Nov 2, 2022
621b423
p2p/discover: fix handling of distance 256 in lookupDistances (#26087)
jtraglia Nov 2, 2022
4a81e5a
rlp: add more tests for nil pointer / optional field encoding (#26077)
roberto-bayardo Nov 2, 2022
05037ea
rpc: handle wrong HTTP batch response length (#26064)
jmank88 Nov 2, 2022
f3a005f
cmd/clef: add `list-accounts` and `list-wallets` to CLI (#26080)
jmcook1186 Nov 2, 2022
9a4e8e2
crypto/bls12381: docs - fix broken links to references (#26095)
jwasinger Nov 3, 2022
08fb1aa
miner: display change in fees, change recommit period (#26097)
rjl493456442 Nov 3, 2022
a51188a
params: make eip1559 params non-global (#25994)
protolambda Nov 4, 2022
6d55908
signer/core/apitypes: support more input types for eip-712 encoding (…
Nov 4, 2022
33e23ee
accounts/abi.bind: don't fetch head in transact unless required (#25988)
saman-pasha Nov 4, 2022
1774463
cmd/clef: add importraw feature to clef (#26058)
holiman Nov 6, 2022
111ed1a
accounts/abi: properly quote untrusted data in error message (#26110)
ngotchac Nov 7, 2022
ca948b8
eth/catalyst, miner: deduplicate work + show payload id (#26115)
holiman Nov 7, 2022
55a92fa
cmd/clef: list accounts at startup (#26082)
jmcook1186 Nov 7, 2022
9027ee0
p2p/discover: improve discv5 NODES response packing (#26033)
fjl Nov 7, 2022
055528a
cmd/devp2p/internal/ethtest: add support for eth/68 (#26078)
MariusVanDerWijden Nov 7, 2022
d629e02
cmd/devp2p/internal/v4test: ignore FINDNODE in BondThenPingWithWrongF…
marcindsobczak Nov 7, 2022
53b624b
eth/tracers: add multiplexing tracer (#26086)
s1na Nov 8, 2022
4cb1fca
p2p/enode: implement per-source timeout in FairMix (#25962)
zhiqiangxu Nov 8, 2022
a609e7b
common/types: add `Address.Big` (#26132)
tynes Nov 8, 2022
9139734
cmd/devp2p: add more nodekey commands (#26129)
fjl Nov 8, 2022
ee9ff06
graphql: add query timeout (#26116)
ahmetavc Nov 8, 2022
6685f88
cmd/clef: only print first N accounts on startup (#26128)
jmcook1186 Nov 8, 2022
7dc5e78
core/vm: deepcopy jumptable when enabling extra eips (#26137)
yihuang Nov 9, 2022
5fded04
core/state: replace fastcache code cache with gc-friendly structure (…
holiman Nov 9, 2022
dffd93b
cmd/evm: slight change in how t8n handles coinbase pre eip-158 (#26139)
holiman Nov 9, 2022
093b2ac
eth/filters: fix failing benchmark-test (#26144)
holiman Nov 9, 2022
0ad2014
go.mod: update status-im/keycard-go (#26141)
protolambda Nov 10, 2022
5b4c149
internal/debug: add --log.file option (#26149)
fjl Nov 11, 2022
62c973e
go.mod: minimum Go version 1.18 (#26160)
fjl Nov 11, 2022
c539bda
metrics: improve reading Go runtime metrics (#25886)
fjl Nov 11, 2022
ea65eda
eth, catalyst: fix flaky tests (#26153)
holiman Nov 11, 2022
8334b5f
common/lru: fix race in lru (#26164)
holiman Nov 11, 2022
e34e540
accounts/keystore: replace inotify with fsnotify (#26176)
holiman Nov 14, 2022
8c5ce11
eth/filters: send rpctransactions in pending-subscription (#26126)
holiman Nov 14, 2022
f58ebd9
all: use github.com/deckarep/golang-set/v2 (generic set) (#26159)
Jolly23 Nov 14, 2022
9afc681
common/lru: add generic LRU implementation (#26162)
fjl Nov 14, 2022
ae42148
rpc: fix connection tracking set in Server (#26180)
fjl Nov 15, 2022
bc90a88
ethclient: docs, fix misleading comment (#26189)
ligi Nov 16, 2022
b4ea2bf
all: implement EIP-1153 transient storage (#26003)
tynes Nov 16, 2022
add337e
rpc: support injecting HTTP headers through context (#26023)
storyicon Nov 16, 2022
64067fb
eth/tracers: small refactor for native tracers (#26196)
s1na Nov 17, 2022
c3b4268
Dockerfile: upgrade to Go 1.19 (#26195)
fjl Nov 17, 2022
12df456
all: remove remaining uses of untyped golang-lru (#26194)
fjl Nov 17, 2022
722bb21
rlp: improve tests for Split functions (#26200)
therainisme Nov 17, 2022
97c563e
rpc, internal/guide: speed up tests a bit (#26193)
holiman Nov 17, 2022
c2e0abc
ethstats: set readlimit on ethstats server connection (#26207)
holiman Nov 17, 2022
c60610c
Merge branch 'master' into eip-4844
roberto-bayardo Nov 20, 2022
6975f09
eth/catalyst: make tests less time-sensitive (#26201)
holiman Nov 21, 2022
64dccf7
cmd/utils: log path used when checking disk space (#26212)
kumavis Nov 21, 2022
dfddf51
Merge branch 'master' into merge-with-master
roberto-bayardo Nov 22, 2022
d75b06d
merge with latest eip-4844
roberto-bayardo Nov 22, 2022
ec2ec2d
core: implement EIP-3651, warm coinbase (#25819)
MariusVanDerWijden Nov 22, 2022
a35ae26
Merge branch 'eip-4844' into merge-with-master
roberto-bayardo Nov 23, 2022
b91cb5e
Merge branch 'master' into merge-with-master
roberto-bayardo Nov 23, 2022
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

RUN apk add --no-cache gcc musl-dev linux-headers git

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

RUN apk add --no-cache gcc musl-dev linux-headers git

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ archives are published at https://geth.ethereum.org/downloads/.

For prerequisites and detailed build instructions please read the [Installation Instructions](https://geth.ethereum.org/docs/install-and-build/installing-geth).

Building `geth` requires both a Go (version 1.16 or later) and a C compiler. You can install
Building `geth` requires both a Go (version 1.18 or later) and a C compiler. You can install
them using your favourite package manager. Once the dependencies are installed, run

```shell
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (abi ABI) getArguments(name string, data []byte) (Arguments, error) {
var args Arguments
if method, ok := abi.Methods[name]; ok {
if len(data)%32 != 0 {
return nil, fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(data), data)
return nil, fmt.Errorf("abi: improperly formatted output: %q - Bytes: %+v", data, data)
}
args = method.Outputs
}
Expand Down
8 changes: 8 additions & 0 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,14 @@ func (fb *filterBackend) ServiceFilter(ctx context.Context, ms *bloombits.Matche
panic("not supported")
}

func (fb *filterBackend) ChainConfig() *params.ChainConfig {
panic("not supported")
}

func (fb *filterBackend) CurrentHeader() *types.Header {
panic("not supported")
}

func nullSubscription() event.Subscription {
return event.NewSubscription(func(quit <-chan struct{}) error {
<-quit
Expand Down
2 changes: 2 additions & 0 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
)
if opts.GasPrice != nil {
rawTx, err = c.createLegacyTx(opts, contract, input)
} else if opts.GasFeeCap != nil && opts.GasTipCap != nil {
rawTx, err = c.createDynamicTx(opts, contract, input, nil)
} else {
// Only query for basefee if gasPrice not specified
if head, errHead := c.transactor.HeaderByNumber(ensureContext(opts.Context), nil); errHead != nil {
Expand Down
15 changes: 7 additions & 8 deletions accounts/keystore/account_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"sync"
"time"

mapset "github.com/deckarep/golang-set"
mapset "github.com/deckarep/golang-set/v2"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -79,7 +79,7 @@ func newAccountCache(keydir string) (*accountCache, chan struct{}) {
keydir: keydir,
byAddr: make(map[common.Address][]accounts.Account),
notify: make(chan struct{}, 1),
fileC: fileCache{all: mapset.NewThreadUnsafeSet()},
fileC: fileCache{all: mapset.NewThreadUnsafeSet[string]()},
}
ac.watcher = newWatcher(ac)
return ac, ac.notify
Expand Down Expand Up @@ -283,16 +283,15 @@ func (ac *accountCache) scanAccounts() error {
// Process all the file diffs
start := time.Now()

for _, p := range creates.ToSlice() {
if a := readAccount(p.(string)); a != nil {
for _, path := range creates.ToSlice() {
if a := readAccount(path); a != nil {
ac.add(*a)
}
}
for _, p := range deletes.ToSlice() {
ac.deleteByFile(p.(string))
for _, path := range deletes.ToSlice() {
ac.deleteByFile(path)
}
for _, p := range updates.ToSlice() {
path := p.(string)
for _, path := range updates.ToSlice() {
ac.deleteByFile(path)
if a := readAccount(path); a != nil {
ac.add(*a)
Expand Down
12 changes: 6 additions & 6 deletions accounts/keystore/file_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ import (
"sync"
"time"

mapset "github.com/deckarep/golang-set"
mapset "github.com/deckarep/golang-set/v2"
"github.com/ethereum/go-ethereum/log"
)

// fileCache is a cache of files seen during scan of keystore.
type fileCache struct {
all mapset.Set // Set of all files from the keystore folder
lastMod time.Time // Last time instance when a file was modified
all mapset.Set[string] // Set of all files from the keystore folder
lastMod time.Time // Last time instance when a file was modified
mu sync.Mutex
}

// scan performs a new scan on the given directory, compares against the already
// cached filenames, and returns file sets: creates, deletes, updates.
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string], mapset.Set[string], error) {
t0 := time.Now()

// List all the files from the keystore folder
Expand All @@ -50,8 +50,8 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er
defer fc.mu.Unlock()

// Iterate all the files and gather their metadata
all := mapset.NewThreadUnsafeSet()
mods := mapset.NewThreadUnsafeSet()
all := mapset.NewThreadUnsafeSet[string]()
mods := mapset.NewThreadUnsafeSet[string]()

var newLastMod time.Time
for _, fi := range files {
Expand Down
33 changes: 25 additions & 8 deletions accounts/keystore/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,20 @@ import (
"time"

"github.com/ethereum/go-ethereum/log"
"github.com/rjeczalik/notify"
"github.com/fsnotify/fsnotify"
)

type watcher struct {
ac *accountCache
running bool // set to true when runloop begins
runEnded bool // set to true when runloop ends
starting bool // set to true prior to runloop starting
ev chan notify.EventInfo
quit chan struct{}
}

func newWatcher(ac *accountCache) *watcher {
return &watcher{
ac: ac,
ev: make(chan notify.EventInfo, 10),
quit: make(chan struct{}),
}
}
Expand Down Expand Up @@ -71,12 +69,19 @@ func (w *watcher) loop() {
}()
logger := log.New("path", w.ac.keydir)

if err := notify.Watch(w.ac.keydir, w.ev, notify.All); err != nil {
logger.Trace("Failed to watch keystore folder", "err", err)
// Create new watcher.
watcher, err := fsnotify.NewWatcher()
if err != nil {
log.Error("Failed to start filesystem watcher", "err", err)
return
}
defer notify.Stop(w.ev)
logger.Trace("Started watching keystore folder")
defer watcher.Close()
if err := watcher.Add(w.ac.keydir); err != nil {
logger.Warn("Failed to watch keystore folder", "err", err)
return
}

logger.Trace("Started watching keystore folder", "folder", w.ac.keydir)
defer logger.Trace("Stopped watching keystore folder")

w.ac.mu.Lock()
Expand All @@ -100,12 +105,24 @@ func (w *watcher) loop() {
select {
case <-w.quit:
return
case <-w.ev:
case _, ok := <-watcher.Events:
if !ok {
return
}
// Trigger the scan (with delay), if not already triggered
if !rescanTriggered {
debounce.Reset(debounceDuration)
rescanTriggered = true
}
// The fsnotify library does provide more granular event-info, it
// would be possible to refresh individual affected files instead
// of scheduling a full rescan. For most cases though, the
// full rescan is quick and obviously simplest.
case err, ok := <-watcher.Errors:
if !ok {
return
}
log.Info("Filsystem watcher error", "err", err)
case <-debounce.C:
w.ac.scanAccounts()
rescanTriggered = false
Expand Down
117 changes: 117 additions & 0 deletions cmd/clef/consolecmd_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Copyright 2022 The go-ethereum Authors
// This file is part of go-ethereum.
//
// go-ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// go-ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.

package main

import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"
)

// TestImportRaw tests clef --importraw
func TestImportRaw(t *testing.T) {
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name()))
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777)
t.Cleanup(func() { os.Remove(keyPath) })

t.Parallel()
t.Run("happy-path", func(t *testing.T) {
// Run clef importraw
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "importraw", keyPath)
clef.input("myverylongpassword").input("myverylongpassword")
if out := string(clef.Output()); !strings.Contains(out,
"Key imported:\n Address 0x9160DC9105f7De5dC5E7f3d97ef11DA47269BdA6") {
t.Logf("Output\n%v", out)
t.Error("Failure")
}
})
// tests clef --importraw with mismatched passwords.
t.Run("pw-mismatch", func(t *testing.T) {
// Run clef importraw
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "importraw", keyPath)
clef.input("myverylongpassword1").input("myverylongpassword2").WaitExit()
if have, want := clef.StderrText(), "Passwords do not match\n"; have != want {
t.Errorf("have %q, want %q", have, want)
}
})
// tests clef --importraw with a too short password.
t.Run("short-pw", func(t *testing.T) {
// Run clef importraw
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "importraw", keyPath)
clef.input("shorty").input("shorty").WaitExit()
if have, want := clef.StderrText(),
"password requirements not met: password too short (<10 characters)\n"; have != want {
t.Errorf("have %q, want %q", have, want)
}
})
}

// TestListAccounts tests clef --list-accounts
func TestListAccounts(t *testing.T) {
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name()))
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777)
t.Cleanup(func() { os.Remove(keyPath) })

t.Parallel()
t.Run("no-accounts", func(t *testing.T) {
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "list-accounts")
if out := string(clef.Output()); !strings.Contains(out, "The keystore is empty.") {
t.Logf("Output\n%v", out)
t.Error("Failure")
}
})
t.Run("one-account", func(t *testing.T) {
// First, we need to import
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "importraw", keyPath)
clef.input("myverylongpassword").input("myverylongpassword").WaitExit()
// Secondly, do a listing, using the same datadir
clef = runWithKeystore(t, clef.Datadir, "--suppress-bootwarn", "--lightkdf", "list-accounts")
if out := string(clef.Output()); !strings.Contains(out, "0x9160DC9105f7De5dC5E7f3d97ef11DA47269BdA6 (keystore:") {
t.Logf("Output\n%v", out)
t.Error("Failure")
}
})
}

// TestListWallets tests clef --list-wallets
func TestListWallets(t *testing.T) {
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name()))
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777)
t.Cleanup(func() { os.Remove(keyPath) })

t.Parallel()
t.Run("no-accounts", func(t *testing.T) {
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "list-wallets")
if out := string(clef.Output()); !strings.Contains(out, "There are no wallets.") {
t.Logf("Output\n%v", out)
t.Error("Failure")
}
})
t.Run("one-account", func(t *testing.T) {
// First, we need to import
clef := runClef(t, "--suppress-bootwarn", "--lightkdf", "importraw", keyPath)
clef.input("myverylongpassword").input("myverylongpassword").WaitExit()
// Secondly, do a listing, using the same datadir
clef = runWithKeystore(t, clef.Datadir, "--suppress-bootwarn", "--lightkdf", "list-wallets")
if out := string(clef.Output()); !strings.Contains(out, "Account 0: 0x9160DC9105f7De5dC5E7f3d97ef11DA47269BdA6") {
t.Logf("Output\n%v", out)
t.Error("Failure")
}
})
}
Loading