Commit graph

1707 commits

Author SHA1 Message Date
Daniel Liu
9f720806e1
refactor(core): remove unnecessary parameters #30776 (#2068) 2026-02-20 13:51:30 +05:30
Daniel Liu
296d612167
fix(eth): align traceBlockParallel with Prague parent-hash pre-exec (#2067)
traceBlockParallel replays transactions from the parent state to build per-tx prestate for tracers. In the previous flow, Prague's parent-hash system contract processing was not applied before replay, so the prepared state could diverge from canonical block execution semantics.

This commit keeps the parallel tracing path consistent with block processing rules by applying ProcessParentBlockHash before tx replay when Prague is active.

The regression test TestTraceBlockParallelPragueParentHashSystemCall is strengthened to assert the actual EIP-2935 history slot value (ring-buffer key for block-1) equals block.ParentHash(), instead of relying on an indirect EXTCODESIZE side effect. This makes the test deterministic and directly tied to the bug.

Validation: go test ./eth/tracers -run TestTraceBlockParallelPragueParentHashSystemCall
2026-02-17 15:00:55 +05:30
Daniel Liu
bba58ec20b
fix(eth): fix state hooks in API #30830 (#2066) 2026-02-17 14:44:47 +05:30
Daniel Liu
cfca45a7eb
refactor(all): rework EVM constructor #30745 (#2065) 2026-02-17 14:35:18 +05:30
Daniel Liu
373037032f
fix(eth): do system contract processing prior to parallel-tracing #30520 (#2064) 2026-02-17 14:22:39 +05:30
Daniel Liu
cc2109342c
feat(core): implement EIP-2935 #29465 #30924 (#2033) 2026-02-12 09:01:26 +05:30
Daniel Liu
85f2bebfd1
refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +05:30
Daniel Liu
d7a42cb038
refactor(core): clean up EVM environmental structure #31061 (#1985) 2026-02-10 16:40:54 +05:30
Daniel Liu
e39a523260
refactor(all): cleanup the APIs for initializing genesis #25473 #26747 (#2017)
* refactor(all): cleanup the APIs for initializing genesis #25473

* fix(core): fix accessor mismatch for genesis state #26747
2026-02-07 00:18:39 +05:30
Daniel Liu
d74c23cca1
perf(core): use uint256 in state #28598 (#1977) 2026-02-05 13:59:23 +05:30
Daniel Liu
934c8d0679
perf(all): use big.Int.Sign() to compare with 0 (#1969) 2026-02-05 11:45:44 +05:30
Daniel Liu
9cf795c908
perf: improve state reader with error handling and committed flag #27428 (#1166)
- Add error returns to Database.Reader() and NodeIterator() methods
- Introduce committed flag to prevent usage of tries after commit
- Update callers to handle new error signatures
- Add MustNodeIterator() helper for backward compatibility

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2026-02-03 20:55:53 +05:30
Daniel Liu
7ce60a2a79
rpc: add a rpc.rangelimit flag #33163 (#1957) 2026-01-29 11:50:58 +05:30
Daniel Liu
e77ac510d0
all: replace Div/Mul with Rsh/Lsh if possible #29911 (#1966) 2026-01-29 11:31:58 +05:30
Daniel Liu
4768d00e1e
eth/filters, cmd: add config of eth_getLogs address limit #33320 #32327 (#1961)
* eth/filters: change error code for invalid parameter errors #33320

* eth/filters, cmd: add config of eth_getLogs address limit #32327
2026-01-29 11:26:45 +05:30
Daniel Liu
bd42edee0b
eth/filters: fix error when blockHash is used with fromBlock/toBlock #31877 (#1962) 2026-01-27 08:46:24 +05:30
Daniel Liu
3e1f75eafb
core, eth, miner: 4844 blob transaction pool #26940 (#1911) 2026-01-19 11:24:01 +05:30
Daniel Liu
3e68f0e1d8
cmd/utils, eth: rename ApiBackend to APIBackend (#1955) 2026-01-16 17:27:48 +05:30
Daniel Liu
583338686f
all: expose block number information to statedb #27753 (#1936) 2026-01-16 15:55:04 +05:30
Daniel Liu
b3d354a897
all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
wit liu
3fb8b87a87
eth/filters: terminate pending tx subscription on error #32794 (#1901) 2026-01-04 17:31:29 +05:30
Daniel Liu
292c0506c0
core/txpool, eth: refactor function IsSigner (#1889) 2025-12-25 09:27:37 +05:30
Daniel Liu
aa8c43caf3
core/txpool: make tx validation reusable across packages/pools #27429 (#1873) 2025-12-23 16:28:30 +05:30
Daniel Liu
3fd03e0814
core, core/types: rename AuthList to SetCodeAuthorizations #30935 (#1884) 2025-12-23 15:40:53 +05:30
Daniel Liu
835579e304
core/txpool: add validation and comprehensive tests for SetGasPrice (#1876)
This commit adds robust input validation to the SetGasPrice method and
implements comprehensive table-driven tests to ensure correct behavior.

Changes in core/txpool/txpool.go:
- Add nil gas price validation with graceful error handling
- Add validation to reject negative gas prices
- Add validation to reject gas prices exceeding 1000 GWei maximum
- Return detailed error messages for each validation failure
- Log warnings when invalid gas prices are rejected

Changes in eth/api_miner.go:
- Update MinerAPI.SetGasPrice to check error return from txPool.SetGasPrice
- Return false when validation fails (when SetGasPrice returns error)
- Return true when validation succeeds (when SetGasPrice returns nil)

New tests in core/txpool/txpool_test.go:
- Implement TestSetGasPrice using table-driven test pattern
- Test 4 invalid cases: nil, negative, exceed max+1, exceed 10000 GWei
- Test 7 valid cases: 0, 1 wei, 1 GWei, 100 GWei, 500 GWei, max-1, max
- Each test case includes expected error value for precise validation
- All 11 test cases verify both error returns and gas price state
- Tests use isolated pool instances to ensure independence
2025-12-23 15:40:24 +05:30
Daniel Liu
8c380e76f5
core, eth/tracers: support debug_traceCall for special tx, fix #1870 (#1872)
- Fix "invalid transaction v, r, s values" error when calling debug_traceCall
  on BlockSigners contract (0x89)
- Fix "nonce too low" error by respecting Message.SkipNonceChecks flag
- ApplySignTransaction now accepts *Message and uses msg.From directly
- Add fallback to signature recovery for real transactions
- Skip nonce validation when SkipNonceChecks=true (for traceCall)
- Add comprehensive unit tests for both scenarios

Root cause: BlockSigners uses special fast-path that calls
ApplySignTransaction directly, which previously attempted signature
recovery on unsigned transactions from debug_traceCall.

Fixes #1870
2025-12-22 12:02:05 +05:30
Daniel Liu
510be504ef
eth/tracers: prestate lookup EIP7702 delegation account #32080 (#1828)
Implement https://github.com/ethereum/go-ethereum/issues/32078
Parse and lookup the delegation account if EIP7702 is enabled.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
2025-12-20 11:12:33 +05:30
Daniel Liu
142b1155d8
all: implement eip-7702 set code tx #30078 (#1759) 2025-12-19 14:09:45 +04:00
wit liu
a83c43f240
all: use 0x-prefix string for type Address in log message (#1874) 2025-12-19 08:55:21 +04:00
Daniel Liu
999ded17da
all: change chain head markers from block to header #26777 (#1846) 2025-12-16 07:36:51 +04:00
Daniel Liu
ebbbdf2bff
core/state: move state log mechanism to a separate layer #30569 #30732 (#1775) 2025-12-16 07:33:19 +04:00
Daniel Liu
7f89733a09
eth/tracers, core: handle non-EVM tx tracing, fix #1863 (#1865)
* Detect non-EVM special transactions and construct a synthetic top level callFrame in OnTxStart.
* GetResult returns the virtual frame for non-EVM txs to preserve debug API compatibility.
* Add bounds checks in OnTxEnd and OnLog to avoid panics when callstack is empty.
* Add unit tests to verify the fix
2025-12-15 12:33:32 +04:00
Daniel Liu
94d0fceffe
all: use FinalizedBlockNumber instead of CommittedBlockNumber (#1847) 2025-12-11 16:19:51 +05:30
wgr523
1089f0b4fe
record total minted API v2 (#1769)
* feat: GetTokenSupply API, total minted and burned

* feat: token supply API finish burned token. rename minted record functions

* fix(api): handle edge case about minus 1 for epoch in token supply

* fix: check both total minted and burned before breaking loop

* style: modify minor style

* style: modify by comment and rebase code

* chore: modify test based on statedb_utils
2025-12-09 19:43:19 +08:00
wit liu
d6309612fc
all: fix unnecessary whitespace (#1800) 2025-12-08 15:07:11 +05:30
Daniel Liu
52f682065a
eth/ethconfig: update file gen_config.go (#1822) 2025-12-08 12:54:20 +05:30
Daniel Liu
4881c9445a
core, eth: for types with accurate size calcs, return uint64 #26046 (#1791) 2025-12-07 15:52:03 +05:30
Daniel Liu
1990e73b3c
core, eth/hooks, internal/ethapi: rename xdc sort package (#1707) 2025-12-07 15:47:49 +05:30
Daniel Liu
b4b6328544
eth: use slices package for sorting #27490 (#1702) 2025-12-07 15:43:37 +05:30
Daniel Liu
c922f26d0c
all: replace strings.Split with more efficient strings.SplitSeq (#1698) 2025-12-07 15:42:23 +05:30
Daniel Liu
4c098ddf1f
core/vm: fold EVMInterpreter into EVM #32352 (#1838) 2025-12-04 10:31:40 +05:30
wit liu
10ac141b76
eth: use consistent receiver name for downloadTester (#1797) 2025-12-04 08:04:05 +05:30
Daniel Liu
ec08863ba0
all: use WaigGroup.Go() to simplify code (#1699) 2025-11-29 17:17:08 +05:30
Daniel Liu
627d77ae24
eth/hook: fix parameter mame mismatch in HookPenalties(), close XFN-141 (#1741) 2025-11-18 17:49:18 +05:30
Daniel Liu
6235de71ba
all: rework statedb utils (#1785) 2025-11-18 11:26:28 +05:30
Daniel Liu
0050bef807
all: rework trc21 (#1777) 2025-11-18 11:24:56 +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
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
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
b2664ec363
cmd, core, eth: disable prefetch by default, fix #1718 (#1719) 2025-11-16 11:22:48 +05:30