Commit graph

16516 commits

Author SHA1 Message Date
Jared Wasinger
8e8371056a bal-related fixes for the downloader 2026-01-06 17:47:27 +09:00
Jared Wasinger
8e028f3757 core/types: ensure that block bodies are always downloaded (they will contain BALs even if they are otherwise empty). This is a temporary hack to ensure we can sync bal devnet 1 2026-01-06 15:05:57 +09:00
Jared Wasinger
a3f9b3dc26 add validation that the BAL doesn't report indexes above what is allowed (block tx count + 2 max index) 2026-01-05 13:18:31 +09:00
Jared Wasinger
1746bafa28 add back static checks for selfdestruct/sstore and add extra gas check for selfdestruct stateless component 2025-12-23 19:51:08 -08:00
Jared Wasinger
18fa37c3b5 core/vm: refactor calls gas calculation to exit early if there isn't enough gas to cover cost component that doesn't depend on state lookups 2025-12-23 19:26:05 -08:00
Jared Wasinger
54d9e4ff40 remove TODO that is no longer relevant 2025-12-18 12:16:18 -08:00
Jared Wasinger
158e44a531 attempt miner fix (untested) 2025-12-18 11:02:22 -08:00
Jared Wasinger
630a79e9d4 fix crash when attempting to call debug_getAccessList on block that doesn't contain one. remove the new pre/post-tx tracer hooks and use the system contract start/end hooks instead in the bal tracer 2025-12-18 09:52:38 -08:00
Jared Wasinger
abaef48d54 attempt to align behavior with other clients (spec tests currently incorrect) 2025-12-16 18:00:05 -08:00
Jared Wasinger
00136d1735 only perform state reads in selfdestruct if we have sufficient gas to cover the state access costs 2025-12-16 11:21:31 -08:00
Jared Wasinger
c112198644 fix the last commit 2025-12-16 11:02:30 -08:00
Jared Wasinger
283c334db7 wip: special storage key/val encoding 2025-12-16 08:29:47 -08:00
Jared Wasinger
6f3e3de9c0 perf experiment: fully concurrent origin storage loading 2025-12-15 16:20:34 -08:00
Jared Wasinger
898ff115ac perf experiment: limit the number of concurrently-executing txs to the number of CPUs 2025-12-15 11:27:31 -08:00
Jared Wasinger
64558ff6aa revamp BAL validation error logging 2025-12-15 10:55:18 -08:00
Jared Wasinger
85fc41406b comment out BPO1/2 in amsterdam fork test config to make tests pass: the Amsterdam tests aren't filled with bpo1/2 activated 2025-12-15 10:54:42 -08:00
Jared Wasinger
fe72cf69da update test release to bal experimental v1.8.0 2025-12-15 10:53:27 -08:00
Jared Wasinger
1ef2b5d739 validate that accounts in the BAL are unique 2025-12-15 10:48:10 -08:00
Jared Wasinger
10a4b0917e add method to log a state diff from two sets of AccountMutations 2025-12-12 07:33:33 -05:00
lightclient
827a60e9f8 cmd/geth: add flag to set genesis (#32844)
This PR is an alternative to #32556.

Instead of trying to be smart and reuse `geth init`, we can introduce a
new flag `--genesis` that loads the `genesis.json` from file into the
`Genesis` object in the same path that the other network flags currently
work in.

Question: is something like `--genesis` enough to start deprecating
`geth init`?

--

```console
$ geth --datadir data --hoodi
..
INFO [10-06|22:37:11.202]  - BPO2:                        @1762955544
..
$ geth --datadir data --genesis genesis.json
..
INFO [10-06|22:37:27.988]  - BPO2:                       @1862955544
..
```

Pull the genesis [from the
specs](https://raw.githubusercontent.com/eth-clients/hoodi/refs/heads/main/metadata/genesis.json)
and modify one of the BPO timestamps to simulate a shadow fork.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-12-10 16:33:08 +00:00
Jared Wasinger
f61df31e1f core/vm: refactor call gas pricing such that Geth will not perform state access if the component of the call price which is independent from the state is not sufficient to cover the provided gas. 2025-12-09 19:03:17 +00:00
Jared Wasinger
0a8f3b0177 core/vm: for selfdestruct/sstore whose gas funcs are dependent on reading state, move readOnly call context check into gas func to avoid unecessary state reads in the gas handler in case where these are called in a static context. 2025-11-25 12:13:58 -08:00
Jared Wasinger
6b6d3f2f68 small refactors 2025-11-24 09:42:00 -08:00
Jared Wasinger
e364107006 remove logging statement 2025-11-23 21:44:29 -08:00
Jared Wasinger
2b003dc9a6 fix triggered by a 'contract creation -> revert -> creation of same contract' in the same transaction 2025-11-22 21:17:40 +08:00
Jared Wasinger
159bbcd831 minor refactor. instrument the bal tracer with some debug logging 2025-11-22 16:33:01 +08:00
Jared Wasinger
2614e20cea correctly set the error in IntermediateRoot of BALStateTransition 2025-11-18 15:53:25 +08:00
Jared Wasinger
b3d8591cb0 more cleanup 2025-11-13 01:44:32 +08:00
Jared Wasinger
74ca164123 cleanup bal state transition 2025-11-12 17:51:01 +08:00
Jared Wasinger
abd8612b1d add state prefetch timer 2025-11-12 15:16:25 +08:00
Jared Wasinger
2721e8a1a2 attempt to optimize state root calculation for BALs 2025-11-12 14:51:54 +08:00
Jared Wasinger
b24306eacc fix some lint issues 2025-10-28 12:35:00 +08:00
Jared Wasinger
b44c182cbd more odds-and-ends 2025-10-28 12:09:44 +08:00
Jared Wasinger
9f9f5af6fa fix up odds-and-ends 2025-10-28 12:09:33 +08:00
Jared Wasinger
e481a1a7d1 fix json encoding of BAL for debug API: make it human-readable again 2025-10-21 19:36:50 +08:00
Jared Wasinger
2994e096c6 update TODO in the code. remove old changes from the statedb unit tests 2025-10-20 18:02:41 +08:00
Jared Wasinger
068757faea small fixups 2025-10-20 16:52:16 +08:00
Jared Wasinger
0de169fd31 apply same changes to hook invocation regarding nonce/code update for legacy selfdestruct 2025-10-17 14:47:27 +08:00
Jared Wasinger
6610c2b3cc fix errors from rebase 2025-10-17 13:39:44 +08:00
Jared Wasinger
dfd2e44701 use amsterdam blob schedule for amsterdam fork. remove unused struct 2025-10-17 13:31:48 +08:00
Jared Wasinger
06d62a54ce general cleanup. note bug which I'm waiting on test case in order to push fix for it. 2025-10-17 13:31:48 +08:00
Jared Wasinger
77a98936ed clarify case about selfdestructing initcode 2025-10-17 13:31:48 +08:00
Jared Wasinger
58eac317b1 ensure that CodeChange tracer hooks don't get called for noop cases where the cur and prev code is the same 2025-10-17 13:31:48 +08:00
Jared Wasinger
fbe136a45e fix build 2025-10-17 13:31:48 +08:00
Jared Wasinger
eb7f934f26 minor cleanups 2025-10-17 13:31:48 +08:00
Jared Wasinger
ca6ba13d1b ensure tracers don't call CodeChange with prevCode==curCode (was done in the case of a failed contract creation). remove unecessary error check and panic 2025-10-17 13:31:48 +08:00
Jared Wasinger
c2c132d6a0 more documentation 2025-10-17 13:31:48 +08:00
Jared Wasinger
2e84d09c1c improve --experimental.bal flag description 2025-10-17 13:31:48 +08:00
Jared Wasinger
45fc8d2468 remove amsterdam tests 2025-10-17 13:31:48 +08:00
Jared Wasinger
68a4ecaf1f refactor: move access list index mutations/read construction within the ConstructionAccessList and don't expose it publicly 2025-10-17 13:31:46 +08:00