Commit graph

14161 commits

Author SHA1 Message Date
Daniel Liu
338d1b4632
feat(eth,miner): wire miner gas tip updates from RPC #28933 (#2136)
Synchronize miner gas tip updates across subsystems when RPC updates gas price.

- update eth miner API to apply gas tip changes to both txpool and miner
- add miner/worker SetGasTip path and initialize worker tip from config
- adjust bind util test to use params.GWei over base fee

Ref: #28933
2026-03-11 07:26:47 +05:30
Daniel Liu
de142957b3
refactor(core/txpool): don't inject lazy resolved transactions into the container #28917 (#2133) 2026-03-11 07:26:37 +05:30
Daniel Liu
9eb90bca0e
feat(eth): log full node id after register peer (#2149) 2026-03-10 18:53:07 +05:30
Daniel Liu
be40f8ac21
chore(cicd,common): unify XDC runtime binary across networks (#2147)
Package a single XDC binary for all networks and remove binary-switching logic from the CI/CD flow.

Changes:

- cicd/Dockerfile: build once and copy only /usr/bin/XDC

- cicd/entry.sh: validate NETWORK and remove runtime relink

- Makefile: make XDC-devnet-local depend on XDC; remove constants file swap

- common/constants: delete duplicated constants.go.{testnet,devnet,local}

Impact:

- network differences are now driven by runtime config, not separate binaries
2026-03-10 18:52:38 +05:30
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
9d6e8fc83f
refactor(core/txpool/legacypool): use uint256.Int instead of big.Int #28606 (#2134) 2026-03-10 18:50:40 +05:30
Daniel Liu
f5e2d16f50
refactor‌(core/txpool/legacypool): tiny #28654 (#2131) 2026-03-10 18:48:29 +05:30
Daniel Liu
d1860fa38e
test(build,Makefile): switch quick-test from --quick to -short (#2130)
Replace the quick-test target to run `go run build/ci.go test -short -failfast`.

Remove the `--quick` flag and package-filter path from `build/ci.go`, so test selection relies on Go's built-in short mode instead of custom package exclusion.

This keeps quick-test behavior aligned with tests guarded by `testing.Short()` and avoids maintaining bespoke skip logic in CI tooling.
2026-03-10 18:47:49 +05:30
Daniel Liu
bad1116a28
test(consensus,core): skip long-running tests in short mode (#2129) 2026-03-10 18:46:59 +05:30
Daniel Liu
e9043cceb2
refactor(txpool/legacypool): remove ErrAlreadyKnown in legacypool #28400 (#2127) 2026-03-10 18:45:30 +05:30
Daniel Liu
c8f241ce15
docs(core/txpool/legacypool): fix typos #28258 (#2126) 2026-03-10 18:45:06 +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
5bb1f035a2
feat(core/vm): implement EIP-7883 - ModExp Gas Cost Increase #31606 #32015 (#2123)
https://eips.ethereum.org/EIPS/eip-7883

---------

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2026-03-10 18:43:55 +05:30
Daniel Liu
0581dec6b7
fix(common/countdown): stabilize reset timing assertions (#2120)
Fix flaky countdown reset tests by performing an explicit second Reset before validating the second timeout window, and using a boundary-safe time check.

Observed failure:

--- FAIL: TestCountdownShouldReset (14.00s)
    countdown_test.go:53: Correctly reset the countdown once
    countdown_test.go:72: Countdown did not reset correctly second time
2026-03-10 18:42:58 +05:30
Daniel Liu
8331c1431f
refactor(params): rename AllXDPoSProtocolChanges to AllDevChainProtocolChanges (#2054) 2026-03-10 18:42:26 +05:30
anunay-xin
4e902c2939
ci: add Slack notification for PR readiness (#2148)
* feat(workflow): add Slack notification for PR readiness

* fix(workflow): enhance Slack notification conditions for PRs
2026-03-10 10:10:19 +05:30
Daniel Liu
e02bc0723a
refactor(core): semantic journalling #28880 (#2081)
This is a follow-up to #29520, and a preparatory PR to a more thorough
change in the journalling system.

This PR hides the journal-implementation details away, so that the
statedb invokes methods like `JournalCreate`, instead of explicitly
appending journal-events in a list. This means that it's up to the
journal whether to implement it as a sequence of events or
aggregate/merge events.

This PR also makes it so that management of valid snapshots is moved
inside the journal, exposed via the methods `Snapshot() int` and
`RevertToSnapshot(revid int, s *StateDB)`.

JournalSetCode journals the setting of code: it is implicit that the
previous values were "no code" and emptyCodeHash. Therefore, we can
simplify the setCode journal.

The self-destruct journalling is a bit strange: we allow the
selfdestruct operation to be journalled several times. This makes it so
that we also are forced to store whether the account was already
destructed.

What we can do instead, is to only journal the first destruction, and
after that only journal balance-changes, but not journal the
selfdestruct itself.

This simplifies the journalling, so that internals about state
management does not leak into the journal-API.

Preimages were, for some reason, integrated into the journal management,
despite not being a consensus-critical data structure. This PR undoes
that.

---------

Co-authored-by: Martin HS <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-03-07 17:42:10 +05:30
anunay-xin
973efe6482
feat(start.sh): add configurable miner gas limit with default value (#2140) 2026-03-07 17:26:11 +08:00
Daniel Liu
ed95075f03
fix(params): accept legacy foudationwalletaddr in chain config, fix #2063 (#2141)
Add backward-compatible XDPoSConfig JSON decoding for the legacy key
"foudationWalletAddr" introduced before PR #2063 renamed it to
"foundationWalletAddr".

Without this compatibility layer, old on-disk chain configs are decoded with a
zero FoundationWalletAddr, causing XDPoSConfigEqual mismatch and startup rewind
("mismatching XDPoS not equal in database").

This patch:
- Implements custom UnmarshalJSON for XDPoSConfig that reads both keys.
- Prefers foundationWalletAddr when both keys are present.
- Keeps existing behavior for all other fields.
- Adds regression tests for legacy-key decoding and precedence.

Validation:
- go test ./params/...
2026-03-07 06:37:24 +08:00
Daniel Liu
4f599282b3
fix(core): remove slot dirtyness if it's set back to origin value #29731 #31874 (#2080) 2026-03-06 13:25:30 +05:30
Daniel Liu
92ffb4dba7
test(ethclient): port gethclient tests from upstream (#2053) 2026-03-06 13:20:03 +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
d542efe08d
feat(core/vm): implement EIP-7823 - Set upper bounds for MODEXP #31818 #32363 (#2119) 2026-03-06 11:24:22 +05:30
Daniel Liu
b71279d442
feat(metrics): allow changing influxdb interval #33767 (#2118) 2026-03-06 11:24:00 +05:30
Daniel Liu
436166e447
feat(internal/ethapi): add eth_getStorageValues method #32591 (#2116) 2026-03-06 11:22:36 +05:30
Daniel Liu
45aadcd311
build(build): upgrade toolchain to go 1.25.7 (#2115) 2026-03-06 11:22:02 +05:30
Daniel Liu
daad965727
build(build): upgrade -dlgo version to 1.25.7 #33874 (#2114) 2026-03-06 11:21:15 +05:30
Daniel Liu
c3f18256cb
build(build): upgrade to golangci-lint v2.10.1 #33875 (#2112) 2026-03-06 11:18:04 +05:30
Daniel Liu
5695f8a712
perf(core): reduce alloc #33576 (#2085) 2026-03-06 11:17:47 +05:30
Daniel Liu
275424c44f
fix(core): revert pending storage updates if they revert to original #29661 (#2079)
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2026-03-06 11:16:03 +05:30
Daniel Liu
3eb198b1a5
refactor(core): storage journal entry should revert dirtyness too #29641 (#2078)
Currently our state journal tracks each storage update to a contract, having the ability to revert those changes to the previously set value.

For the very first modification however, it behaves a bit wonky. Reverting the update doesn't actually remove the dirty-ness of the slot, rather leaves it as "change this slot to it's original value". This can cause issues down the line with for example write witnesses needing to gather an unneeded proof.

This PR modifies the storageChange journal entry to not only track the previous value of a slot, but also whether there was any previous value at all set in the current execution context. In essence, the PR changes the semantic of storageChange so it does not simply track storage changes, rather it tracks dirty storage changes, an important distinction for being able to cleanly revert the journal item.

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2026-03-06 11:15:44 +05:30
Daniel Liu
69ab9b8e30
fix(crypto): fix coordinate check (#2072)
Co-authored-by: Felix Lange <fjl@twurst.com>
2026-03-06 11:14:31 +05:30
Daniel Liu
2eed6c057b
fix(consensus): hardening header verification #33860 (#2071) 2026-03-06 11:10:32 +05:30
Daniel Liu
3fad5e1ab4
refactor(ethclient): implement new sim backend #28202 (#2062)
Introduce a new simulated backend implementation under ethclient/simulated and migrate bind-facing wrappers/tests to use it.

Key changes:

- Add the new backend entry points and behavior in ethclient/simulated, including chain control helpers used by tests (commit/rollback/fork/time adjustment).

- Update legacy bind wrappers in accounts/abi/bind/backends to delegate to the new simulated backend while preserving old APIs.

- Align bind v2/backend and utility tests to the new simulated backend client surface and transaction flow.

- Refresh abigen/bind tests and shared interfaces impacted by the backend migration.

Compatibility notes:

- Keep backward-compatible wrapper constructors for existing contract test code.

- Preserve legacy transaction paths in tests while supporting EIP-1559-aware flows where applicable.

Validation:

- Verified affected packages compile and pass tests.

- Verified repository-wide go test ./... passes after follow-up compatibility fixes.
2026-03-06 11:09:10 +05:30
benjamin202410
bad22c2515
chore: enable reward, penalty and dynamic gas on devnet (#2121)
* chore: enable reward, penalty and dynamic gas on devnet

* update number to 3420000 for devnet

---------

Co-authored-by: liam.lai <liam.lai@babylonchain.io>
2026-03-04 20:54:18 -08:00
Daniel Liu
41fb331a2e
chore(AGENTS.md): add AGENTS.md with guidelines for AI agents #33890 #33921 (#2083) 2026-03-03 17:26:58 +08:00
Daniel Liu
e250435851
fix(crypto): remove keccak_ziren.go (#2113) 2026-03-03 11:15:42 +08:00
Daniel Liu
b991bd8aa7
test(ethclient): port ethclient tests from upstream (#2060) 2026-03-01 22:45:01 +04:00
Daniel Liu
2611f1dd9a
fix(all): fix typo foudation (#2063) 2026-02-28 18:00:55 +04:00
Daniel Liu
5b8c6ef8fd
feat(p2p): swarm POC3 #17041 (#2059) 2026-02-28 17:30:04 +04:00
Daniel Liu
ad0eea0f07
refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046)
The upstream libray has removed the assembly-based implementation of
keccak. We need to maintain our own library to avoid a peformance
regression.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
2026-02-28 17:23:57 +04:00
Daniel Liu
5f3613e203
fix(eth): add index to callTracer log #33629 (#2044)
closes https://github.com/ethereum/go-ethereum/issues/33566

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2026-02-28 17:01:13 +04:00
Daniel Liu
f11cf2cce7
fix(crypto): fix ECIES invalid-curve handling #33669 (#2043)
Co-authored-by: fengjian <445077+fengjian@users.noreply.github.com>
2026-02-28 17:00:35 +04:00
Daniel Liu
2a96ecf87e
feat(accounts): add support for Ledger Nano Gen5 #33297 (#2042)
adds support for the 0x0008 / 0x8000 product ID (Ledger Apex | Nano
Gen5).

Co-authored-by: mmsqe <tqd0800210105@gmail.com>
2026-02-28 17:00:13 +04:00
Daniel Liu
2515d6c6c5
fix(trie): fix embedded node size validation #33803 (#2047)
The `decodeRef` function used `size > hashLen` to reject oversized
embedded nodes, but this incorrectly allowed nodes of exactly 32 bytes
through. The encoding side (hasher.go, stacktrie.go) consistently uses
`len(enc) < 32` to decide whether to embed a node inline, meaning nodes
of 32+ bytes are always hash-referenced. The error message itself
already stated `want size < 32`, confirming the intended threshold.
Changed `size > hashLen` to `size >= hashLen` in `decodeRef` to align
the decoding validation with the encoding logic, the Yellow Paper spec,
and the surrounding comments.

Co-authored-by: sashass1315 <sashass1315@gmail.com>
2026-02-28 16:59:52 +04:00
Daniel Liu
01aafc93bf
fix(ethclient): use common.Hash to debug_traceTransaction #32404 (#2048) 2026-02-28 16:59:32 +04:00
Daniel Liu
fe317dc94c
feat(ethclient): add tracing API methods #31510 (#2050)
Added methods `TraceCallWithCallTracer` and `TraceTransactionWithCallTracer`.

Fixes #28182

---------

Co-authored-by: Ragnar <rodiondenmark@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2026-02-28 16:59:14 +04:00
Daniel Liu
906efdd4e7
chore(p2p): changes necessary by swarm-network-rewrite #16898 (#2051) 2026-02-28 16:58:25 +04:00
Daniel Liu
3454841ade
fix(core): hex encode validators/validator/penalties in Header JSON (#2057)
Ensure JSON marshal/unmarshal uses hex for validators, validator, and penalties so Header encoding is consistent with RPC output.
2026-02-28 16:56:37 +04:00
Daniel Liu
3367939f96
chore(version): update version to v2.7.0-devnet (#2058) 2026-02-28 16:56:10 +04:00