Commit Graph

13751 Commits

Author SHA1 Message Date
zjubfd
05925da696
fix deadlock on miner module when failed to commit trie (#835) 2022-04-02 17:53:19 +08:00
zjubfd
f5a1c073bc
fix deadlock when failed to verify state root (#834) 2022-04-02 11:52:03 +08:00
flywukong
c57b02c293
change prefetch thread num (#830) 2022-04-01 21:56:23 +08:00
zjubfd
4598334a9a
disable diffsync when pipecommit is enabled (#820) 2022-03-30 11:22:00 +08:00
flywukong
cde35b0b36 add sharedStorage to the prefetcher of miner (#818)
* add sharedStorage to the prefetcher of miner

* fix miner prefetcher copy
2022-03-30 00:19:47 +08:00
WayToFuture
d8949871fb [R4R] state verification pipeline (#795)
* pipeline state verification

* update codes and add logs for debug

* refactor

* update and add logs

* refactor

* refactor

* remove unneeded logs

* fix a blocking issue

* fix sync issue when force kill

* remove logs

* refactor based on comments

* refactor based on comments

* refactor based on comments

* refactor based on comments

* refactor based on comments

* fix a deadlock issue

* fix merkle root mismatch issue during sync

* refactor based on review comments

* remove unnecessary code

* remove unnecessary code

* refactor based on review comments

* change based on comments

* refactor

* uew dummyRoot to replace emptyRoot

* add nil check

* add comments

* remove unneeded codes

* format comments

Co-authored-by: forcodedancing <liguo.fudan@gmail.com>
2022-03-30 00:19:47 +08:00
flywukong
4ff96978cb [R4R]add sharedStorage for prefetching to L1 (#792)
* add sharedStorage for prefetching to L1

* remote originStorage in stateObjects

* fix core

* fix bug of sync map

* remove read lock when get & set keys

* statedb copy use CopyWithSharedStorage

* reduce lock access

* fix comment

* avoid sharedPool effects on other modules

* remove  tryPreload

* fix comment

* fix var name

* fix lint

* fix L1 miss data && data condition

* fix comment
2022-03-30 00:19:47 +08:00
zjubfd
5f1aabeb38 fix race condition on preimage (#797) 2022-03-30 00:19:47 +08:00
zjubfd
58f3b2cd84 fix code of difflayer not assgin before return (#808) 2022-03-30 00:19:47 +08:00
Leon
91d7cd5fd2 [R4R]Prefetch state data on mining process (#803)
* perf(miner):add mining prefetcher

* fix ineffassign

* fix comments

* fix comments

* fix comments: add AsMessagePrefetch to skip nonce check

* fix comment:refactor check order of method Forward

* fix comments:rename variables

* fix comments: rename

* rename

* fix comments: refactor

* update
2022-03-30 00:19:47 +08:00
user
c0c6396509 fix pruner block tool bug, add some check logic 2022-03-25 15:22:21 +08:00
zjubfd
a50a05d624 merge with go-ethereum 1.1.5 2022-02-10 18:48:16 +08:00
Felix Lange
fb3a6528cf
go.mod: upgrade to github.com/karalabe/usb v0.0.2 (#24356)
This upgrade resolves a build issue on Android 7+ and removes
a build warning on macOS >= 12.0.
2022-02-08 19:58:27 +01:00
Martin Holst Swende
5a0d487c3b
signer/core: fix complex typed data sign (EIP712) (#24220)
Co-authored-by: specerxi <xhxpecer@gmail.com>
2022-02-08 14:40:00 +01:00
rjl493456442
2d20fed893
miner: avoid data race in miner (#24349) 2022-02-07 18:34:13 +01:00
Martin Holst Swende
6ce4670bc0
cmd/devp2p: implement snap protocol testing (#24276)
This also contains some changes to the protocol handler to
make the tests pass.
2022-02-04 15:24:32 +01:00
aaronbuchwald
aaca58a7a1
go.mode: bump graphql-go dependency to v1.3.0 (#24324) 2022-02-02 18:21:25 +02:00
Péter Szilágyi
1a7e345af4
Merge pull request #24328 from karalabe/uke-catalyst
cmd: auto-enable beacon APIs if TTD is defined
2022-02-02 18:15:38 +02:00
Péter Szilágyi
d99e759e76
cmd: auto-enable beacon APIs if TTD is defined 2022-02-02 17:57:34 +02:00
komika
afe344bcf3
accounts/abi/bind: improve WaitMined error handling (#24321)
This change makes it so WaitMined no longer logs an error when the receipt
is unavailable. It also changes the simulated backend to return NotFound for
unavailable receipts, just like ethclient does.
2022-02-01 16:42:51 +01:00
Sina Mahmoodi
c5436c8eb7
eth/tracers: clean-up tracer collection (#24320)
* eth/tracers: clean-up tracer collection

* Rm test for dropped tracer
2022-02-01 10:44:44 +01:00
Brandon Harden
b868ca1790
accounts: correct spelling mistake (#24323)
I believe the sentence is attempting to explain that the URL is "[used] by upper layers to define a sorting order over all wallets from multiple backends."
2022-02-01 11:36:39 +02:00
rjl493456442
9da25c5db7
all: separate catalyst package (#24280)
* all: seperate catalyst package

* eth/catalyst: moved some methods, added docs

* eth/catalyst, les/catalyst: add method docs

* core, eth, les, miner: move common function to beacon package

* eth/catalyst: goimported

* cmd/utils, miner/stress/beacon: naming nitpicks

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2022-01-31 14:22:35 +02:00
ligi
a5c0cfb451
build: fix lint on ARM (#24311)
* build: append GOARM to arm lint download URL

otherwise it fails with:

downloading from https://github.com/golangci/golangci-lint/releases/download/v1.42.0/golangci-lint-1.42.0-linux-arm.tar.gz
ci.go:347: download error: status 404

* build: increase timeout for lint

Otherwise it times out on a pi

* Increase timeout even further

saw longer build times
2022-01-31 14:17:18 +02:00
Sina Mahmoodi
cac09a3823
eth/tracers: native prestate tracer (#24268)
* eth/tracers: add initial native prestate tracer

* fix balance hex

* handle prestate for tx from and to

* drop created contract from prestate

* fix sender balance

* use switch instead

Co-authored-by: Martin Holst Swende <martin@swende.se>

* minor fix

* lookup create2 account

* mv code around a bit

* check stackLen for create2

* fix transfer tx for js prestate tracer

* fix create2 addr

* track extcodehash in js prestate tracer

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-01-31 09:51:17 +01:00
ligi
0c1bd22ec0
cmd/geth: make test pass on a pi4 by using lightkdf (#24314) 2022-01-31 09:50:10 +01:00
Paweł Bylica
64c53edf83
tests: external evm benchmarks (#24050)
* tests: add ipsilon/evm-benchmarks git submodule

* tests: plug-in evm-benchmarks
2022-01-28 08:47:19 +01:00
zjubfd
859186f299
Merge pull request #743 from binance-chain/develop
[R4R] Release v1.1.8
v1.1.8
2022-01-28 11:44:08 +08:00
Valentin Trinqué
abd49a6c48
rpc: set Request.GetBody for client requests (#24292)
When talking to an HTTP2 server, there are situations where it needs to
"rewind" the Request.Body. To allow this, we have to set up the Request.GetBody
function to return a brand new instance of the body.

If not set, we can end up with the following error:

    http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error

See this commit for more information: cffdcf672a
2022-01-27 10:59:05 +01:00
Sina Mahmoodi
a9885505ca
internal/web3ext: add eth.getLogs wrapper (#24297) 2022-01-27 10:56:04 +01:00
Sina Mahmoodi
e282246a4b
cmd/utils: open db in readonly when dev datadir exists (#24298) 2022-01-27 10:06:40 +01:00
zjubfd
21a3b11d17
prepare for relase v1.1.8 (#741) 2022-01-26 14:57:22 +08:00
dylanhuang
6499b3f890
doc: update discord link (#740) 2022-01-26 14:30:07 +08:00
zjubfd
eb7e3092d5
[R4R] implement State Verification && Snapshot Commit pipeline (#668)
* pipeline commit trie

add metrics

reopen trie

* add unit testcase

* resolve keefe's comment

* resolve igor's comments

* update prefetch

remove prefetcher

* no need to return error for precacheTransaction

* fix lint issue

* add some comments

* remove useless code

* add default option is false

* fix diffsync nil point

* fix panic on  GetProofByHash

Co-authored-by: zjubfd <zjubfd@google.com>
2022-01-26 14:12:18 +08:00
Martin Holst Swende
015fde9a2c
eth/tracers: avoid using blockCtx concurrently (#24286) 2022-01-25 14:45:30 +01:00
Marius van der Wijden
29cb5deea3
core/rawdb: fix typo (#24289) 2022-01-25 11:36:51 +01:00
Péter Szilágyi
78f13a3a57
Merge pull request #24288 from holiman/prefer_prefixed
core/rawdb: do prefixed lookup first
2022-01-25 12:18:16 +02:00
Martin Holst Swende
0e35192797
core/rawdb: do prefixed lookup first 2022-01-25 10:51:18 +01:00
zhiqiangxu
f39f068161
accounts/abi: simplify Arguments.Unpack (#24277)
Since len(nonIndexedArgs) is definitely 0 in this context, the code can be simplified.
2022-01-24 17:19:43 +01:00
Péter Szilágyi
f9ce40bb84
Merge pull request #24281 from karalabe/dev-read-write
cmd/utils: fix regression placing dev mode datadir readonly
2022-01-24 10:35:39 +02:00
Péter Szilágyi
4230f5f08f
cmd/utils: fix regression placing dev mode datadir readonly 2022-01-24 10:19:31 +02:00
rjl493456442
78636ee568
eth, miner: use miner for post-merge block production (#23256)
* eth, miner: remove duplicated code

* eth/catalyst: remove unneeded code

* miner: keep update pending state even the Merge is happened

* eth, miner: rebase

* miner: fix tests

* eth, miner: address comments from marius

* miner: use empty zero randomness for pending blocks after the merge

* eth/catalyst: gofmt

* miner: add warning log for state recovery

* miner: ignore uncles for post-merge blocks

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2022-01-24 09:19:52 +02:00
ucwong
bd615e0e5f
go.mod : golang-set 1.8.0 go.mod added & cardinality check for subset (#24165) 2022-01-24 06:46:49 +02:00
David Cai
683854255c
accounts: fix typo in errors.go (#24270) 2022-01-24 06:44:29 +02:00
Denver
06e16de894
internal/ethapi: remove unnecessary comment (#24271)
Because there is no `fullTx` parameter at function signatures and
uncle apis does not return txs also, those lines are un-necessary.
2022-01-24 06:43:51 +02:00
Darioush Jalali
2dfa4bcf6c
trie: test for edgecase in VerifyRangeProof (#24257)
* trie/proof: edge case for VerifyRangeProof

* more consistency with other tests in the file

* trie: fix test todo

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-01-21 14:35:30 +01:00
Shihao Xia
eef7a33135
core, miner, rpc, eth: fix goroutine leaks in tests (#24211)
* fix blocking and non-blocking issues

* core: revert change in blockchain.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-01-21 12:22:44 +01:00
rjl493456442
ae45c97d3d
trie: fix range prover (#24266) 2022-01-21 10:41:51 +01:00
Di Peng
c029cdc90b
core: fix typo in blockchain test (#24263) 2022-01-21 09:12:40 +01:00
Felix Lange
5bcbb2980b
rpc: add PeerInfo (#24255)
This replaces the sketchy and undocumented string context keys for HTTP requests
with a defined interface. Using string keys with context is discouraged because
they may clash with keys created by other packages.

We added these keys to make connection metadata available in the signer, so this
change also updates signer/core to use the new PeerInfo API.
2022-01-20 12:45:07 +01:00