Commit graph

476 commits

Author SHA1 Message Date
Daniel Liu
d8fd0923a9
refactor(miner): polish miner configuration #19480 (#2135)
Miner configuration is unified under [Eth.Miner] (GasCeil/GasPrice/Etherbase/ExtraData), replacing legacy top-level [Eth] miner keys.

Operational impact: existing config files using [Eth].GasPrice/[Eth].Etherbase/[Eth].ExtraData must be migrated before upgrade.

Behavior update: gasprice=0 remains valid; only negative gas prices are sanitized at startup.

Default change: XDCGenesisGasLimit is reduced to 42,000,000 and now feeds miner default GasCeil (including default --miner-gaslimit), so nodes relying on defaults should review capacity expectations.
2026-03-10 18:51:36 +05:30
Daniel Liu
d4a6f43ef2
refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125)
* refactor(txpool): remove wrapper type #27841

Partial backport of ethereum/go-ethereum PR #27841, limited to txpool wrapper removal.

- Migrate txpool interfaces/call sites from `*txpool.Transaction` to `*types.Transaction`
- Update eth/miner/contracts paths and related tests accordingly
- No intended behavior change

Blob sidecar validation/handling changes from upstream are not included here.

* refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243

Replace the old SubscribeNewTxsEvent-style plumbing with the new
SubscribeTransactions(ch, reorgs) interface across txpool, eth protocol
manager, API backend, miner worker, and test helpers.

Key changes:
- Extend txpool/subpool tx subscription interface with a reorgs flag
- Route eth tx announcement path to reorgs=false (new tx announcements only)
- Route API/miner subscriptions to reorgs=true
- Move subscription-scope cleanup to TxPool.Close()
- Add Gas field to LazyTransaction in legacy pending view

Note:
LegacyPool currently cannot strictly separate newly seen and resurrected txs,
so the reorgs flag is accepted for API compatibility and future blob-subpool
integration.
2026-03-10 18:44:38 +05:30
Daniel Liu
0b47621d05
fix(miner): avoid XDPoS-only paths on non-XDPoS engines (#2049) 2026-03-06 11:24:39 +05:30
Daniel Liu
9f720806e1
refactor(core): remove unnecessary parameters #30776 (#2068) 2026-02-20 13:51:30 +05:30
Daniel Liu
cfca45a7eb
refactor(all): rework EVM constructor #30745 (#2065) 2026-02-17 14:35:18 +05:30
Daniel Liu
cc2109342c
feat(core): implement EIP-2935 #29465 #30924 (#2033) 2026-02-12 09:01:26 +05:30
Daniel Liu
50210d90e3
refactor(all): remove term whitelist and blacklist (#1994) 2026-02-10 17:09:21 +05:30
Daniel Liu
1f3faa5184
all: set gas limit dynamically (#1945) 2026-01-21 10:49:20 +05:30
Daniel Liu
3e1f75eafb
core, eth, miner: 4844 blob transaction pool #26940 (#1911) 2026-01-19 11:24:01 +05:30
Daniel Liu
b3d354a897
all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
Daniel Liu
51b99e40a8
miner: fix block number extraction for BlockSigner tx (#1894)
Previously, the code used binary.BigEndian.Uint64(data[8:40]), which incorrectly read the index and only extracted the highest 8 bytes of the 32-byte left-padded block number, resulting in wrong values (often zero).
Now, the code uses new(big.Int).SetBytes(data[4:36]).Uint64() to correctly extract the block number from the proper 32-byte field.
This change fixes both the incorrect index and the parsing logic, ensuring accurate block number extraction and correct validation for special transactions.
2026-01-05 15:41:43 +05:30
Daniel Liu
adcc0d3652
miner: fix overflow when compare block number (#1895) 2026-01-05 12:15:04 +05:30
Daniel Liu
ca9e69c924
miner: log commit and finalize time for new block (#1904) 2026-01-04 17:21:49 +05:30
Daniel Liu
be5cfd9756
core, miner: log gas limit error when pack transactions (#1905) 2026-01-04 17:21:34 +05:30
Daniel Liu
999ded17da
all: change chain head markers from block to header #26777 (#1846) 2025-12-16 07:36:51 +04:00
wit liu
d6309612fc
all: fix unnecessary whitespace (#1800) 2025-12-08 15:07:11 +05:30
Daniel Liu
0050bef807
all: rework trc21 (#1777) 2025-11-18 11:24:56 +05:30
Daniel Liu
f8553d5871
core, miner: fix inconsistent tx blacklist enforcement, close XFN-98 (#1674) 2025-11-18 11:24:08 +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
fc9ca96104
core/types, miner: remove unused parameter signers for NewTransactionsByPriceAndNonce() (#1732) 2025-11-14 22:37:20 +05:30
wit liu
b31cbfed40
miner: remove unused abs function (#1734) 2025-11-14 19:58:23 +05:30
Daniel Liu
d319102837
miner: remove NewMinedBlockEvent, close XFN-50 (#1644) 2025-11-04 11:15:45 +05:30
Daniel Liu
815995e9e0
miner: fix inconsistent error evaluation, close XFN-60 (#1632) 2025-11-03 16:16:38 +05:30
Daniel Liu
0677ab40a2
miner: fix pop wrong tx from normal txs queue, close XFN-37 (#1623) 2025-11-03 16:16:10 +05:30
Daniel Liu
3cab0036ed
miner: fix deep copy in copyReceipts, close XFN-49 (#1620) 2025-11-03 16:14:27 +05:30
Daniel Liu
76aa15b7d0
miner: fix concurrent map access in Miner.HashRate, close XFN-52 (#1634) 2025-11-03 14:53:37 +05:30
Daniel Liu
f90a12d9f7
miner: fix inconsistent time unit, close XFN-59 (#1633) 2025-11-03 14:53:10 +05:30
Daniel Liu
d451580b37
miner, XDPoS, XDC: close chanels by owner, close XFN-41 (#1641) 2025-11-03 14:52:31 +05:30
Daniel Liu
a5e68b9c52
miner: not sleep if locks multiple mutex, close XFN-40 (#1639) 2025-10-31 12:24:32 +05:30
Daniel Liu
3efe26df08
all: refactor so NewBlock, WithBody take types.Body #29482 (#1605) 2025-10-08 13:12:35 +08:00
Daniel Liu
8938e27932
all: move err to the last position of return values (#1581) 2025-10-08 12:29:38 +08:00
Daniel Liu
294591e67e
all: remove duplicate word in comments (#1570) 2025-09-24 07:57:33 +08:00
wit liu
99e2885b03
all: fix misspell (#1510)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:27:52 +08:00
wit765
12eab8e785
all: rename ChainId to ChainID #16853 (#1456)
Co-authored-by: wit <wit765765346@gmail>
2025-09-09 22:54:34 +08:00
Daniel Liu
6f36533962
all: remove ethash pow 27178 (#1378) 2025-08-26 11:54:01 +08:00
Daniel Liu
34020969ff
all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
Daniel Liu
5b8c267122 trie: use trie.NewStackTrie instead of new(trie.Trie) (#22246) 2025-04-07 16:44:32 +08:00
Daniel Liu
a9b9f53701 core, eth, trie: add a prefix to contract code (21080) 2025-03-24 22:31:03 +08:00
Daniel Liu
cfc8cca674 common: refactor constants 2025-02-17 09:13:40 +08:00
Daniel Liu
4e951ed8fe all: use github.com/deckarep/golang-set/v2 (generic set) (#26159) 2025-01-24 16:54:11 +08:00
Daniel Liu
d8c9ad3c9f all: replace RWMutex with Mutex in places where RLock is not used (#21622) 2025-01-24 16:18:30 +08:00
benjamin202410
21b05243b6
Merge from master mining time patch (#767)
* merge from master

* close channel

* close channel

---------

Co-authored-by: liam.lai <liam.lai@us>
2024-12-19 01:17:29 -08:00
Daniel Liu
e8452c94a7 metrics: fix some typos (#25551) 2024-12-13 14:00:12 +08:00
Daniel Liu
ed242b4763 all: implement EIP-1153 transient storage (#26003) 2024-11-15 19:39:18 +08:00
Daniel Liu
9b20ac785e consensus/misc: move eip1559 into a package (#27828) 2024-11-01 11:36:53 +08:00
Daniel Liu
8b2e8d9b3a all: refactor txpool into it's own package in prep for 4844 (#26038) 2024-11-01 11:36:53 +08:00
Daniel Liu
e5fb0b4d73 core: remove unused error from TxPool.Pending (#23720) 2024-11-01 11:36:53 +08:00
Daniel Liu
5a31888b19 core, eth, miner: enforce configured mining reward post 1559 too (#22995) 2024-11-01 11:36:52 +08:00
Daniel Liu
684afd0b18 EIP-1559: miner changes (#22896) 2024-11-01 11:36:52 +08:00
Daniel Liu
c36642a0e1 all: fix staticcheck warning ST1008: error should be last return value 2024-10-31 09:51:47 +08:00