Commit graph

226 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
b71279d442
feat(metrics): allow changing influxdb interval #33767 (#2118) 2026-03-06 11:24:00 +05:30
Daniel Liu
197735a088
fix(cmd): fix wrong flag names in influxdb metrics error messages #33804 (#2036) 2026-02-28 16:51:35 +04:00
Daniel Liu
50210d90e3
refactor(all): remove term whitelist and blacklist (#1994) 2026-02-10 17:09:21 +05:30
Daniel Liu
85f2bebfd1
refactor(all): move genesis initialization to blockchain #25523 (#2018) 2026-02-10 16:56:34 +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
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
5811eb69ce
cmd/XDC, internal/flags: update copyright year to 2026 (#1943) 2026-01-27 08:45:46 +05:30
Daniel Liu
df83610a30
cmd: fix flag variable name (#1958) 2026-01-19 14:05:55 +05:30
Daniel Liu
6a3b92b701
core/types: change SetCodeTx.ChainID to uint256 #30982 (#1840) 2025-12-25 09:26:44 +05:30
wit liu
55c2d47c45
all: use 0x-prefix string for type Address in error message (#1835) 2025-12-23 15:39:23 +05:30
Daniel Liu
1a9935625f
cmd/XDC: fix txpool gasPrice being overridden at checkpoints (#1878)
This commit removes two redundant SetGasPrice() calls in the startNode function that were causing multiple issues:

1. Overriding txpool's configured price limit with the miner's gas price setting, mixing two independent configurations:

- cfg.Eth.GasPrice (from --miner-gasprice --gasprice flag)
- cfg.TxPool.PriceLimit (from --txpool-pricelimit flag)

2. Reverting runtime gasPrice changes made via RPC. When users call miner_setGasPrice RPC method to adjust the gasPrice dynamically, the changes would be unexpectedly reverted at the next checkpoint when startNode re-applies cfg.Eth.GasPrice.

The txpool already initializes its gasPrice from config.PriceLimit during construction (core/txpool/txpool.go:333):

```go
func NewTxPool(config Config, chainconfig *params.ChainConfig, chain blockChain) *TxPool {
	pool := &TxPool{
		gasPrice:         new(big.Int).SetUint64(config.PriceLimit),
	}
```

When mining is started via RPC (miner_start), the MinerAPI.Start() method handles gasPrice propagation correctly.

This change ensures:

- The txpool respects its own configuration
- Runtime gasPrice adjustments via RPC persist across checkpoints
- No unexpected overriding of user-configured values
2025-12-22 12:01:38 +05:30
wit liu
a83c43f240
all: use 0x-prefix string for type Address in log message (#1874) 2025-12-19 08:55:21 +04:00
wit liu
bf4c48c7c6
cmd: nuke geth bug, nobody is using it anyway #19400 (#1814) 2025-12-08 15:08:46 +05:30
Daniel Liu
8eb5fa7666
cmd: remove slave mode and flag XDCSlaveModeFlag (#1824) 2025-12-08 12:53:05 +05:30
Daniel Liu
640d448491
cmd/XDC, metrics/prometheus: fix staticcheck QF1012 (#1713) 2025-12-07 16:03:06 +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
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
de9ed732e2
cmd, eth: implement flag delete-all-bad-blocks (#1770) 2025-11-15 16:50:52 +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
6d7c36bb8f
all: upgrade package version #30638 (#1745) 2025-11-15 16:46:54 +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
28a4f25166
cmd, core, eth, trie: track deleted nodes #22225 #25757 (#1120)
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-11-12 13:32:22 +05:30
Daniel Liu
13ed19bcf2
all: remove XDCx and XDCxlending public API, close XFN-74 XFN-134 (#1675)
* internal: remove XDCx public API

* XDCx, XDCxlending: remove api

* ethclient: remove SendOrderTransaction and SendLendingTransaction

* XDCx, XDCxlending: remove unused variables and function

* eth, internal/ethapi: remove function `OrderStats()`
2025-11-04 11:19:16 +05:30
Daniel Liu
d451580b37
miner, XDPoS, XDC: close chanels by owner, close XFN-41 (#1641) 2025-11-03 14:52:31 +05:30
wit liu
11e82672fe
cmd: fix lint error mirror (#1575) 2025-10-08 12:25:59 +08:00
Daniel Liu
5e9db6066d
console: add note about typing exit to exit #23602 (#1532)
* add explicit note about typing exit in console

* Add note about typing exit as alternative

Co-authored-by: Thad Guidry <thadguidry@gmail.com>
2025-10-08 12:22:52 +08:00
Daniel Liu
0ece8529c4
cmd, eth, internal/ethapi: allow for flag configured timeouts for eth_call #23645 (#1593) 2025-09-26 19:01:02 +08:00
Daniel Liu
6c73723f47
cmd, console: drop geth js command #25000 (#1534) 2025-09-24 07:47:21 +08:00
Daniel Liu
db0cd1581f
console: don't exit on ctrl-c, only on ctrl-d #21660 (#1531)
* add interrupt counter

* remove interrupt counter, allow ctrl-C to clear ONLY, ctrl-D will terminate console, stop node

* format

* add instructions to exit

* fix tests

Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
2025-09-24 07:46:25 +08:00
Daniel Liu
22dc136ffe
cmd: replace passPHRASE with passWORD in any user interactions #19932 (#1535) 2025-09-21 19:31:00 +08:00
Daniel Liu
8615067df1
cmd, console, internal: support interrupting the js console #23387 (#1533) 2025-09-21 19:23:41 +08:00
Daniel Liu
5ad87e559f
cmd, console: password input fixes #20960 (#1524) 2025-09-21 18:59:34 +08:00
wit liu
4a6fccaf69
all: fix whitespace (#1506)
Co-authored-by: wit <wit765765346@gmail>
2025-09-17 08:23:06 +08:00
Daniel Liu
c9f2b73861
cmd, eth: rename config and flag to VMTraceJsonConfig #29573 (#1490) 2025-09-13 10:52:31 +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
ad9003c41e
eth/tracers: live chain tracing with hooks #29189 (#1352)
Here we add a Go API for running tracing plugins within the main block import process.

As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.

The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:

- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
  on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
   to implement only the hooks you want to actually use.

All existing tracers in eth/tracers/native have been rewritten to use the new hook system.

This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2025-09-09 17:30:56 +08:00
Daniel Liu
031ea75eca
eth/tracers: package restructuring #23857 (#1266) 2025-08-29 05:26:36 +08:00
Daniel Liu
6f36533962
all: remove ethash pow 27178 (#1378) 2025-08-26 11:54:01 +08:00
Daniel Liu
516883d14c
all: snapshot dump + unify with trie dump #22795 (#1205) 2025-08-22 16:39:28 +08:00
Daniel Liu
4ec6e8cd58
cmd, node, p2p: implement whitelist and blacklist for peers (#1331) 2025-08-20 15:14:56 +08:00
Daniel Liu
390ea247d3
cmd/XDC: fixes db unavailability for chain commands #21415 (#1204) 2025-07-28 16:56:37 +08:00
Daniel Liu
618a8dd247
core, cmd: streaming json output for command #15475 (#1184) 2025-07-11 09:29:13 +08:00
JukLee0ira
1c5b5ea883
node: remove unused error return from Attach #27450 (#1155) 2025-06-26 10:51:24 +08:00
JukLee0ira
b15a8ac67e
cmd/geth: accountcmd no need to acquire the datadir lock #27084 (#1154) 2025-06-26 10:50:28 +08:00
JukLee0ira
afa3a4ea5c
cmd, internal/ethapi: avoid panic if keystore is not available #27039 (#1157) 2025-06-26 09:14:41 +08:00
JukLee0ira
16f41238b8
cmd, console, node : deprecate personal namespace #26390 (#1153) 2025-06-25 17:57:33 +08:00
Daniel Liu
93c2745b7b
all: disable recording preimage of trie keys #21402 (#1054) 2025-06-17 13:10:47 +08:00
Daniel Liu
ae70b5dc14
cmd: disable prefetch next block state by default, fix #997 (#1025) 2025-06-06 17:23:12 +08:00