Andrew Ashikhmin
0fdd60a0d1
Execution Spec Tests & HashCheck() ( #6444 )
...
Run tests from a new repo
https://github.com/ethereum/execution-spec-tests .
Also introduce `HashCheck()` function that checks correctness of block's
uncle, transaction, and withdrawals hashes.
2022-12-28 17:01:40 +01:00
Andrew Ashikhmin
b4a73e0579
Fix intra_block_state_test ( #6458 )
...
Postfix after PR #6440
2022-12-28 12:26:37 +01:00
Andrew Ashikhmin
714888b016
HashBuilder: fix top node shorter than 32 bytes ( #6456 )
...
Prior to withdrawals, it was extremely unlikely to have short (RLP < 32)
top trie nodes outside test scenarios.
2022-12-28 11:58:37 +01:00
Alex Sharov
fc71d441a6
mdbx_to_mdbx better logging ( #6455 )
2022-12-28 13:27:42 +07:00
Alex Sharov
fa6f6038e7
kv: tx.Prefix method ( #6441 )
2022-12-26 17:58:21 +07:00
ledgerwatch
387b4d7f35
Native tracers step 10 - remove duplicate SelfDestruct capture, clean up ( #6440 )
...
Moved some of the tracers to `eth/tracers/logger` to make it more
similar to go-ethereum.
Removed Erigon-specific `Capture-` functions
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-26 04:56:39 +00:00
ledgerwatch
24040f3044
Native tracers step 9 - add native tracers ( #6434 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-25 07:28:41 +00:00
Alex Sharov
45fd92f17b
exclude genesis from "append with gap" assert ( #6428 )
2022-12-24 14:28:02 +07:00
Alex Sharov
ade933be6b
kv_remote: server to support thread-safe multi-streams per 1 tx ( #6402 )
2022-12-24 13:11:15 +07:00
ledgerwatch
f364eff389
Native tracers step 7 - restructure js tracer files ( #6415 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-23 18:10:37 +00:00
Andrew Ashikhmin
4931f113c2
Add override.shanghaiTime flag ( #6414 )
...
and remove `--override.terminaltotaldifficulty` &
`--override.mergeNetsplitBlock`
2022-12-23 17:06:56 +01:00
ledgerwatch
a49e287618
Native tracers step 6: Rename Tracer to EVMLogger, reduce args CaptureExit ( #6410 )
...
Getting closer to Geth's tracer interfaces
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-23 05:43:08 +00:00
Alex Sharov
130ab85bea
e3: kv/temporal prototype 3 ( #6395 )
2022-12-22 09:37:32 +07:00
Andrew Ashikhmin
49bb63661f
core/vm: derive maxStack from numPop & numPush ( #6397 )
2022-12-21 14:55:00 +01:00
Andrew Ashikhmin
dc248c5ea4
core/vm: Move interpreter.ReadOnly check into the opcode implementations ( #6396 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/23970
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-12-21 12:44:01 +01:00
Andrew Ashikhmin
5582435a95
core/vm: Simplify error handling in interpreter loop ( #6394 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/23952
Co-authored-by: Paweł Bylica <chfast@gmail.com>
2022-12-21 11:57:53 +01:00
Andrew Ashikhmin
0986342690
core/vm: remove unused NewEVMInterpreterByVM ( #6393 )
2022-12-21 09:51:00 +01:00
Giulio rebuffo
173d11c43c
removed retry logic from Erigon-CL ( #6389 )
2022-12-20 22:11:08 +01:00
Alex Sharov
0ce84e41e1
integration: warmup staeg ( #6388 )
2022-12-20 22:59:23 +07:00
Andrew Ashikhmin
06df4333b2
core/vm: avoid memory expansion check for trivial ops ( #6383 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/24048
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-12-20 16:47:51 +01:00
alex.sharov
dd9f117a0c
save
2022-12-20 22:27:11 +07:00
Max Revitt
4bdb35f94c
Withdrawals part 2 ( #6180 )
...
Continuation of PR #6009 . Storage and retrieval of withdrawals.
- [x] storage of withdrawals on writeblock
- [x] composite key (block number | block hash)
- [x] value ([]withdrawal)
- [x] retrieval of withdrawals with block
- [x] tests around storing/retrieving withdrawals
- [x] tested in hive
- [x] commits tidied
## Hive Failures
- [x] Withdrawals Fork on Block 2
- [x] Withdrawals Fork on Block 3
- [ ] Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal
Account - No Transactions ( Syncing client rejected valid chain)
- [ ] Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 2 blocks - Withdrawals on Genesis - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 2 blocks - Withdrawals on Block 2 - Single Withdrawal
Account - No Transactions (Syncing client rejected valid chain)
- [ ] Sync after 2 blocks - Withdrawals on Block 2 - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 128 blocks - Withdrawals on Block 2 - Multiple
Withdrawal Accounts (Unexpected error on BalanceAt: Post
"http://172.17.0.4:8545/ ": context deadline exceeded, expected=<None>)
- [ ] Withdrawals Fork on Block 1 - 8 Block Re-Org, Sync (Expected no
error on EngineNewPayloadV2: error=Post "http://172.17.0.4:8551/ ":
context deadline exceeded)
- [ ] Withdrawals Fork on Block 8 - 10 Block Re-Org Sync (Expected no
error on EngineNewPayloadV2: error=Post "http://172.17.0.4:8551/ ":
context deadline exceeded)
- [ ] Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block
Re-Org Sync (Expected no error on EngineNewPayloadV2: error=Post
"http://172.17.0.4:8551/ ": context deadline exceeded)
- [ ] Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block
Re-Org Sync (Expected no error on EngineNewPayloadV2: error=Post
"http://172.17.0.4:8551/ ": context deadline exceeded)
2022-12-20 09:09:04 +00:00
Andrew Ashikhmin
31d30df59f
core/vm: fill gaps in jump table with opUndefined ( #6372 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/24031
Co-authored-by: Paweł Bylica <chfast@gmail.com>
2022-12-20 08:18:24 +01:00
Alex Sharov
cce0f251b4
e3: kv/temporal prototype 2 ( #6377 )
2022-12-20 09:28:10 +07:00
Andrew Ashikhmin
e5f818c832
core/vm: remove unused 'unofficial' opcodes ( #6371 )
...
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-12-19 14:47:29 +01:00
Andrew Ashikhmin
a00a4000a4
core/vm: simplify op lookup in contract ( #6370 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/23974
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
2022-12-19 14:10:45 +01:00
Alex Sharov
dfa6505f93
e3: kv/temporal prototype ( #6367 )
2022-12-19 15:38:54 +07:00
ledgerwatch
97c9a9108d
Native tracers - step 4 ( #6363 )
...
Remove `callType` argument from `CaptureStart`, and change `callType
vm.CallType` to `typ vm.OpCode` in `CaptureEnter` and move to the first
position (as it is in geth)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-19 03:12:08 +00:00
ledgerwatch
0761671607
Native tracers step 3 ( #6362 )
...
Remove `env` argument from all Capture functions except for
`CaptureStart`
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 17:06:40 +00:00
ledgerwatch
b8c6a4d263
Native tracers - step 2 ( #6360 )
...
Splitting function `CaptureStart` into `CaptureStart` (when depth == 0)
and `CaptureEnter` (when depth > 0), while removing argument `depth`.
Same with splitting `CaptureEnd` into `CaptureEnd` and `CaptureExit`
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 16:11:31 +00:00
ledgerwatch
3999c46046
Native tracers - step 1 ( #6356 )
...
In this first step, the new functions `CaptureTxStart` and
`CaptureTxEnd` are introduced to all tracers
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 04:36:57 +00:00
alex.sharov
c5d720591a
save
2022-12-18 11:10:40 +07:00
Alex Sharov
4ef39ea43c
unify logs a bit ( #6354 )
2022-12-18 09:23:11 +07:00
Andrew Ashikhmin
0fc2022a0e
Extend fork ID to timestamp-based forks ( #6324 )
...
Starting from
[Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md ),
forks are based on timestamps rather than block heights (see PR #6238 ).
This PR extends [EIP-2124](https://eips.ethereum.org/EIPS/eip-2124 ) Fork
ID to include timestamp-based blocks. See also
https://github.com/ethereum/go-ethereum/pull/25878 .
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2022-12-16 12:08:54 +01:00
Alex Sharov
43f83cd7d8
e3: use of ordered-map generic ( #6335 )
2022-12-16 13:59:57 +07:00
Roberto Bayardo
cf6173d042
Make empty but non-nil Withdrawals arrays decode as empty but non-nil. ( #6291 )
2022-12-15 08:52:14 +00:00
Alex Sharov
863e1ed07b
e3: handle "kill -9" during merge, auto-hide history .ef file if not corresponding .v file ( #6304 )
2022-12-15 13:49:06 +07:00
Alex Sharov
ce9203d80d
e3: more aggressive prune #780 ( #6299 )
2022-12-14 09:50:48 +07:00
ledgerwatch
556a81ce6f
Fix tests ( #6278 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-11 14:57:24 +00:00
Alex Sharov
7a055a51d4
e3: graceful shutdown ( #6272 )
2022-12-11 13:15:55 +07:00
Andrew Ashikhmin
ecefc53dd0
Remove Ropsten & Fermion ( #6262 )
...
See https://blog.ethereum.org/2022/11/30/ropsten-shutdown-announcement
2022-12-10 22:55:31 +00:00
ledgerwatch
0a31f5ac2a
Workaround for the code history of BSC system contracts ( #6274 )
...
Works around a flaw in the upgrade logic of the system contracts. Since
they are updated directly, without first being self-destructed and then
re-created, the usual incarnation logic does not get activated, and all
historical records of the code of these contracts are retrieved as the
most recent version. This problem will not exist in erigon3, but until
then, a workaround will be used to access code of such contracts through
a special structure, `SystemContractCodeLookup`
Fixes https://github.com/ledgerwatch/erigon/issues/5865
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-10 22:41:04 +00:00
ledgerwatch
b5a7faa8db
[e3] Incremental reconstitution ( #6270 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-10 09:34:17 +00:00
ledgerwatch
35c279d291
Optimize modexp ( #6247 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-08 06:43:40 +00:00
Andrew Ashikhmin
7eab12d90d
Shanghai & Cancun forks should be based on timestamp ( #6238 )
2022-12-07 18:45:44 +01:00
hexoscott
499c40fe4f
fix for nil pointer dereference in mining ( #6237 )
2022-12-07 16:54:22 +00:00
Krishna Upadhyaya
d5199f521b
Added delhiBlock for mumbai-hard-fork ( #6233 )
2022-12-07 18:34:14 +07:00
calmbeing
0ad765930d
Apply BSC Gibbs upgrade for mainnet ( #6211 )
...
For issue #6163 , based on pr #5359 of Gibbs , Supported BSC mainnet
Gibbs hardfork
2022-12-07 18:20:14 +07:00
Alex Sharov
12ee33a492
e3: don't put nil to pool ( #6219 )
2022-12-06 13:07:16 +07:00
Alex Sharov
4e25872e91
e3: use fact that lifecycle of readList smaller than State22 and RoTx ( #6212 )
2022-12-06 10:11:03 +07:00