Commit graph

13823 commits

Author SHA1 Message Date
Daniel Liu
f8553d5871
core, miner: fix inconsistent tx blacklist enforcement, close XFN-98 (#1674) 2025-11-18 11:24:08 +05:30
Daniel Liu
3b3aa9b013
core, trie: prepare for path-based trie storage #26603 (#1126)
This PR moves some trie-related db accessor methods to a different file, and also removes the schema type. Instead of the schema type, a string is used to distinguish between hashbased/pathbased db accessors.
This also moves some code from trie package to rawdb package.

This PR is intended to be a no-functionality-change prep PR for #25963 .

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-11-18 11:20:00 +05:30
Daniel Liu
d47260ea98
core, trie: clean up trie interface #26388 (#1125)
* all: cleanup trie interface

* eth, trie: address comments

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-18 11:19:27 +05:30
Daniel Liu
07328dcec4
core, eth, trie: abstract node scheme #25532 (#1123)
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.

Apart from that, a few changes are also included which is worth mentioning:

-  port the changes in the stacktrie, tracking the path prefix of nodes during commit
-  use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-17 11:25:08 +05:30
Daniel Liu
a4fbda2924
trie: wrap deletion in case trie.root is nil #26365 (#1124)
This PR fixes an error in trie commit. If the trie.root is nil, it can be two possible scenarios:

-  The trie was empty, and no change happens
-  The trie was non-empty and all nodes are dropped

For the latter one, we should collect the deletions and apply them into database(e.g. in PBSS).

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-17 11:24:11 +05:30
wit liu
39eb15531d
all: fix whitespace error of golangci-lint, remove extra empty lines (#1676) 2025-11-17 11:16:09 +05:30
Daniel Liu
1fa780768f
core/rawdb: remove unused freezerdb (#1748) 2025-11-17 11:15:06 +05:30
wit liu
e9bf36c7dc
internal/web3ext: remove unused console APIs #23208 (#1756) 2025-11-17 11:14:45 +05:30
Daniel Liu
73061af2c6
core/types: fix immutability guarantees in Block #27844, close XFN-82 (#1727) 2025-11-16 11:23:22 +05:30
Daniel Liu
b2664ec363
cmd, core, eth: disable prefetch by default, fix #1718 (#1719) 2025-11-16 11:22:48 +05:30
wit liu
999b775d8e
common: fix duration comparison in PrettyAge #33064 (#1776) 2025-11-15 16:53:17 +05:30
wit liu
0b2fe7d7b5
eth/downloader: fix incorrect waitgroup in test XTestDelivery #33047 (#1711) 2025-11-15 16:52:49 +05:30
wit liu
5dfa10977c
consensus, params: fix goimports formatting (#1671) 2025-11-15 16:52:30 +05:30
wit liu
0b43ddad75
core/types: prealloc map in HashDifference as in TxDifference #32946 (#1668) 2025-11-15 16:51:38 +05:30
Daniel Liu
e34bbe10c6
core: persist bad blocks #21827 #27489 (#1771) 2025-11-15 16:51:21 +05:30
Daniel Liu
de9ed732e2
cmd, eth: implement flag delete-all-bad-blocks (#1770) 2025-11-15 16:50:52 +05:30
Daniel Liu
c66f8f9fb2
core/state: fix SetStorage override behavior #30185 (#1764) 2025-11-15 16:50:26 +05:30
Daniel Liu
71e8e27f84
all: remove mongodb support in XDCx (#1679)
* all: remove SDK node

* cmd: remove XDCXDBEngineFlag

* cmd: remove XDCXDBConnectionUrlFlag

* cmd, XDCx: remove XDCXDBReplicaSetNameFlag

* XDCx: remove ConnectionUrl

* all: remove mongodb support

* cmd: remove XDCXEnabledFlag
2025-11-15 16:50:02 +05:30
Daniel Liu
0c96e76992
trie, XDCx, XDCxlending: not expose db in trie (#1763) 2025-11-15 16:49:47 +05:30
Daniel Liu
8f0ad36af6
core/state: get rid of field pointer in journal #30361 (#1761) 2025-11-15 16:48:52 +05:30
Daniel Liu
07e2609c25
common: improve variable names for ExtractAddressFromBytes(), close XFN-27 (#1726) 2025-11-15 16:48:01 +05:30
Daniel Liu
4716dc11af
cmd, internal: move func CheckExclusive() to package flags #31189 (#1747) 2025-11-15 16:47:38 +05:30
Daniel Liu
6d7c36bb8f
all: upgrade package version #30638 (#1745) 2025-11-15 16:46:54 +05:30
Daniel Liu
a75a1467ab
eth, internal/ethapi: remove order tx pool API (#1743) 2025-11-15 16:45:05 +05:30
Daniel Liu
650047c81e
consensus/XDPoS, params: fix some comments, close XFN-125 (#1733) 2025-11-15 16:44:39 +05:30
Daniel Liu
f24e68b015
consensus/XDPoS, eth: fix potential rpc.BlockNumber overflow, close XFN-69 (#1735) 2025-11-15 16:44:08 +05:30
Daniel Liu
0fc4c82350
Makefile, build: make test fast fail (#1739) 2025-11-15 16:42:35 +05:30
Daniel Liu
60868c9045
engines/engine_v2: refactor verifyQC by errgroup, close XFN-09 (#1740) 2025-11-15 16:42:15 +05:30
Daniel Liu
fc9ca96104
core/types, miner: remove unused parameter signers for NewTransactionsByPriceAndNonce() (#1732) 2025-11-14 22:37:20 +05:30
Daniel Liu
8cbbc1e83d
consensus, params: remove SkipV2Validation, close XFN-151 (#1730) 2025-11-14 21:53:05 +05:30
Daniel Liu
7a3ac998a3
eth: quick canceling block inserting when debug_setHead is invoked #32067, close XFN-142 (#1728) 2025-11-14 21:52:35 +05:30
Daniel Liu
eef5242fa3
all: pre-allocate memory for slices and maps, close XFN-148 (#1714) 2025-11-14 20:13:36 +05:30
Daniel Liu
f65ecda9f1
cmd/puppeth: improve code (#1716) 2025-11-14 20:11:45 +05:30
wit liu
733b6e2b37
crypto: validate hash length in nocgo Sign #33104 (#1773) 2025-11-14 20:10:48 +05:30
wit liu
cbdde3fbf8
common: fix size comparison in StorageSize #33105 (#1772) 2025-11-14 20:08:01 +05:30
wit liu
a9db265d4e
core/state: fix bug about getting stable LogsHash result #33082 (#1768) 2025-11-14 20:07:32 +05:30
wit liu
0fe8742241
accounts/usbwallet: fix version check in SignTypedMessage #33113 (#1767) 2025-11-14 20:06:46 +05:30
Daniel Liu
7d4578496c
core: fix runtime error index out of range [0] with length 0, close #1765 (#1766) 2025-11-14 20:05:37 +05:30
wit liu
812abd4b83
consensus: delete unused functions rlpHash (#1749) 2025-11-14 20:05:20 +05:30
wit liu
7641bcfd19
core: replace if-else chain with tagged switch on err (#1751) 2025-11-14 20:04:33 +05:30
wit liu
0d6807d15b
rpc: fix flaky test TestServerWebsocketReadLimit #32889 (#1752) 2025-11-14 20:04:09 +05:30
wit liu
d48adc520f
core/types: remove unused var #32989 (#1753) 2025-11-14 20:03:48 +05:30
Daniel Liu
782a7ff5cb
all: fix typos, close XFN-23 (#1725) 2025-11-14 20:02:34 +05:30
wit liu
891a386a58
core/state: using maps.Clone #29365 (#1754) 2025-11-14 20:00:59 +05:30
wit liu
9155d354c9
tracers, consensus/clique: use maps.Clone #29616 (#1755) 2025-11-14 20:00:21 +05:30
wit liu
3107006ac6
swarm: nuke this leftover #30622 (#1757) 2025-11-14 20:00:03 +05:30
wit liu
c82830d228
engines/engine_v2: use errgroup to handle goroutine error (#1758) 2025-11-14 19:59:43 +05:30
wit liu
5b873ea522
core :use batch to write chain config (#1760) 2025-11-14 19:59:10 +05:30
Daniel Liu
1eec428928
blockchain: ensure state exists for prefetcher #20627, fix #1738 (#1742) 2025-11-14 19:58:35 +05:30
wit liu
b31cbfed40
miner: remove unused abs function (#1734) 2025-11-14 19:58:23 +05:30