Commit graph

3024 commits

Author SHA1 Message Date
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
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
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
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
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
Gary Rong
7410413eec core/state, core/tracing: add state read hooks 2025-10-17 13:29:38 +08:00
Gary Rong
af34c01b90 core/tracing: reshape the comments in core/tracing 2025-10-17 13:28:51 +08:00
Jared Wasinger
b33cf06ce7 all: add block access list construction via flag --experimentalbal. When enabled, post-Cancun blocks which lack access lists will have them constructed on execution during import. When importing blocks which contain access lists, transaction execution and state root calculation is performed in parallel. 2025-10-17 13:28:04 +08:00
Youssef Azzaoui
b373d797d8
core/state: state copy bugfixes with Verkle Trees (#31696)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This change addresses critical issues in the state object duplication
process specific to Verkle trie implementations. Without these
modifications, updates to state objects fail to propagate correctly
through the trie structure after a statedb copy operation, leading to
inaccuracies in the computation of the state root hash.

---------

Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-10-16 19:19:44 +02:00
rjl493456442
e03d97a420
core/txpool/legacypool: fix pricedList updates (#32906)
This pr addresses a few issues brought by the #32270 

- Add updates to pricedList after dropping transactions.
- Remove redundant deletions in queue.evictList, since
pool.removeTx(hash, true, true) already performs the removal.
- Prevent duplicate addresses during promotion when Reset is not nil.
2025-10-14 08:40:04 +02:00
Marius van der Wijden
7b693ea17c
core/txpool/legacypool: move queue out of main txpool (#32270)
This PR move the queue out of the main transaction pool.
For now there should be no functional changes.
I see this as a first step to refactor the legacypool and make the queue
a fully separate concept from the main pending pool.

---------

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-10-13 19:07:36 +02:00
Delweng
a7359ceb69
triedb, core/rawdb: implement the partial read in freezer (#32132)
This PR implements the partial read functionalities in the freezer, optimizing
the state history reader by resolving less data from freezer.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-10-13 19:40:03 +08:00