Daniel Liu
cab1c19cd2
core/state: mark account as dirty when resetObject occurs #27339 ( #1224 )
...
This changes the journal logic to mark the state object dirty immediately when it
is reset.
We're mostly adding this change to appease the fuzzer. Marking it dirty immediately
makes no difference in practice because accounts will always be modified by EVM
right after creation.
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-31 16:04:51 +08:00
Daniel Liu
6c5c8c13de
core, trie: rework trie committer #25320 ( #1103 )
...
* all: rework trie and trie committer
* all: get rid of internal cache in trie
* all: fixes
* trie: polish
* core, trie: address comments
* trie: fix imports
* core/state: address comments
* core/state/snapshot: polish
* trie: remove unused code
* trie: update tests
* trie: don't set db as nil
* trie: address comments
* trie: unskip test
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-31 15:58:48 +08:00
Daniel Liu
2dcec889e6
core/state: do not ignore null addr while iterative dump #27320 ( #1223 )
...
fixes bug which caused the zero-address to be ignored during an iterative state-dump.
---------
Co-authored-by: Park Changwan <pcw109550@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-08-29 05:25:15 +08:00
Daniel Liu
bbc4612d9f
core/state: remove notion of fake storage #24916 ( #1219 )
2025-08-29 05:24:28 +08:00
Daniel Liu
3fed9ebeb8
core, eth, trie: rework preimage store #25287 ( #1099 )
...
* core, trie, eth, cmd: rework preimage store
* trie: address comment
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-29 05:22:44 +08:00
Daniel Liu
3926b08074
core/state: maintain destruction flag by default #26371 ( #1218 )
2025-08-28 18:51:36 +08:00
Daniel Liu
152e3d9923
core/state: return error when storage trie can't be opened #26350 ( #1216 )
...
This changes the StorageTrie method to return an error when the trie
is not available. It used to return an 'empty trie' in this case, but that's
not possible anymore under PBSS.
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-26 15:31:00 +08:00
Daniel Liu
4a4de2319f
core/state: fix typos and comments ( #1206 )
...
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-08-26 15:22:37 +08:00
Daniel Liu
18d2dbad89
core, trie: port snap sync changes #24898 ( #1096 )
...
core, eth, les, trie: rework snap sync
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-26 15:20:39 +08:00
Daniel Liu
516883d14c
all: snapshot dump + unify with trie dump #22795 ( #1205 )
2025-08-22 16:39:28 +08:00
Daniel Liu
d52bfaa5ca
all: introduce trie owner notion #24750 ( #1090 )
...
* cmd, core/state, light, trie, eth: add trie owner notion
* all: refactor
* tests: fix goimports
* core/state/snapshot: fix ineffasigns
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-08-22 16:37:39 +08:00
Daniel Liu
0c57a6c64c
core/state: remove toAddr helper in tests #22772 ( #1203 )
...
Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>
2025-08-21 13:38:23 +08:00
Daniel Liu
da624be994
core/state: fix panic in state dumping #22225 ( #1202 )
...
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-08-21 13:37:51 +08:00
Daniel Liu
06d94520ba
core/state: fix some comments #21450 ( #1201 )
2025-08-21 13:36:45 +08:00
Daniel Liu
eaa1452a53
core/state: add state transition tool for testing #20958 ( #1200 )
2025-08-20 16:30:34 +08:00
Daniel Liu
628e1e52bb
core/state: make GetCodeSize mirror GetCode implementation wise #21056 ( #1198 )
...
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-08-20 15:08:05 +08:00
Daniel Liu
9013bfbf6f
core/state: include zero-address in state dump if present #21038 ( #1195 )
...
* Include 0x0000 address into the dump if it is present
* core/state: go fmt
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2025-08-20 15:06:37 +08:00
Daniel Liu
cdd6a9eb94
eth: add debug_accountRange API #19645 ( #1194 )
...
This new API allows reading accounts and their content by address range.
Co-authored-by: Wenbiao Zheng <delweng@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-08 09:55:17 +08:00
Daniel Liu
8750881da2
trie: remove the sync bloom, used by fast sync #24047 ( #1077 )
2025-08-08 09:31:26 +08:00
Daniel Liu
3da4549e07
core/state: move state account to core/types + abstracted write account to trie #23567 ( #1072 )
2025-08-08 09:13:34 +08:00
Daniel Liu
f9025ecc91
core/state: unexport NodeIterator #27239 ( #1222 )
...
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-08-04 11:53:31 +08:00
Daniel Liu
1d9fd6bdd2
core: show db error-info in case of mismatched hash root #26870 ( #1220 )
...
When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-04 11:51:47 +08:00
Daniel Liu
cb888541c5
core, trie: add state metrics #23433 ( #1071 )
2025-08-04 11:19:42 +08:00
Daniel Liu
52f5766059
core: pre-allocate in Copy() #25279 ( #1213 )
2025-07-28 16:57:51 +08:00
Daniel Liu
2eac17980c
core/state: avoid statedb.dbErr due to emptyCode #21051 ( #1197 )
2025-07-28 16:55:29 +08:00
Daniel Liu
cdd48dd4de
core/state: fix staticcheck warnings #20357 ( #1193 )
2025-07-28 16:53:27 +08:00
Daniel Liu
77522e51ec
core, trie: decode the value for storage dump #19943 ( #1189 )
...
* core, trie: decode the value for storage dump
* core/state: address comment
Co-authored-by: gary rong <garyrong0905@gmail.com>
2025-07-28 16:52:06 +08:00
Daniel Liu
ae006030c6
core: fill blockNumber in logs #26345 ( #1215 )
2025-07-11 10:53:48 +08:00
Daniel Liu
6f84f67a15
core: rename CommitTrie to commitTrie #25896 ( #1214 )
2025-07-11 10:48:10 +08:00
Daniel Liu
495a8b919a
core/state: simplify meter code #24304 ( #1208 )
2025-07-11 10:15:16 +08:00
Daniel Liu
906f07736e
core/state: remove unuseful code #23092 ( #1207 )
2025-07-11 10:09:56 +08:00
Daniel Liu
f98fbc7dc7
core/state: fix database leak and copy tests #19306 ( #1192 )
...
Co-authored-by: zcheng9 <zcheng9@hawk.iit.edu>
2025-07-11 09:58:59 +08:00
Daniel Liu
ef0fe4ed95
core/state: revert noop finalise, fix copy-commit-copy #20113 ( #1191 )
2025-07-11 09:52:31 +08:00
Daniel Liu
be97571471
core/state: fix state object deep copy #20100 ( #1190 )
2025-07-11 09:47:37 +08:00
Daniel Liu
16638e9e17
core/state: avoid unnecessary conversions #19870 ( #1188 )
2025-07-11 09:42:20 +08:00
Daniel Liu
220b2f4174
core/state: fix random test args #19255 ( #1187 )
...
Co-authored-by: Sheldon <11510383@mail.sustc.edu.cn>
2025-07-11 09:37:51 +08:00
Daniel Liu
618a8dd247
core, cmd: streaming json output for command #15475 ( #1184 )
2025-07-11 09:29:13 +08:00
Daniel Liu
9affb6a582
core/state: memory efficient, add AddPreimage test #16663 ( #1182 )
2025-07-02 14:53:00 +08:00
Daniel Liu
b4f4b95634
core/state: rename new variable #18301 ( #1178 )
2025-07-02 14:13:47 +08:00
Daniel Liu
957e9d8d05
core/state: remove lock #18065 ( #1174 )
2025-07-02 14:13:06 +08:00
Daniel Liu
801e92b56d
XDCx, consensus: fix some typos ( #1173 )
2025-07-02 14:12:11 +08:00
Daniel Liu
e24293a49c
core, eth: fix tracer dirty finalization #16588 ( #1172 )
2025-07-02 14:11:22 +08:00
Daniel Liu
4c5d1bd95e
core: change handling of dirty objects in state #15225 #16485 #16491 ( #1171 )
...
* core: change handling of dirty objects in state #15225
* core/state: fix bug in copy of copy State #16485
* core/state: fix ripemd-cornercase in Copy #16491
2025-07-02 14:07:21 +08:00
Daniel Liu
dbe173e794
core, trie: speed up some tests with quadratic processing flaw #21987 ( #1057 )
2025-06-25 16:17:05 +08:00
Daniel Liu
937b3d75e0
core, eth, trie: prepare trie sync for path based operation #21504 ( #1046 )
2025-06-21 08:30:25 +08:00
Daniel Liu
7feff61647
core/state: remove toAddr helper in tests #22772 ( #1100 )
2025-06-17 13:33:47 +08:00
Daniel Liu
45d89bd4d1
trie: faster snapshot generation #22504 ( #1062 )
2025-06-17 13:13:14 +08:00
Daniel Liu
93c2745b7b
all: disable recording preimage of trie keys #21402 ( #1054 )
2025-06-17 13:10:47 +08:00
wgr523
e13265a7d7
record total minted into smart contract ( #1026 )
...
* feat: record total minted into smart contract
* feat: GetCurrentTotalMinted API
2025-06-16 02:31:33 -07:00
Daniel Liu
6395c15280
core/state, eth, trie: stabilize memory use, fix memory leak #21491 ( #1040 )
2025-05-20 15:14:47 +08:00