Commit graph

13639 commits

Author SHA1 Message Date
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
473b22bd55
console: handle undefined + null in console funcs #21160 (#1525) 2025-09-24 07:45:57 +08:00
Daniel Liu
2563cd13ed
trie: cleanup stateTrie #25640 (#1113)
It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly.

Recently there are a few tickets #25613 #25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top.

Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing.

Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state.

The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR.

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-09-24 07:45:06 +08:00
Daniel Liu
862f18ec58
core/state, trie: fix trie flush order for proper pruning #25581 (#1112)
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-09-24 07:44:22 +08:00
Wanwiset Peerapatanapokin
53e5601825
Merge pull request #1493 from XinFinOrg/fix-rewardhash
fix: XDPoS_v2 save reward file during Seal for block miner for v2 engine
2025-09-23 12:49:12 +04:00
wanwiset25
1935cb7f25 add more details in logging 2025-09-23 11:55:17 +04:00
Daniel Liu
13d64fb5b5
metrics: fix some typos in comments and names #31023 (#1557) 2025-09-22 20:44:29 +08:00
Daniel Liu
6e5f466df9
common: remove duplicate test cases #32624 (#1556) 2025-09-22 20:43:50 +08:00
wit liu
79f681688b
go.mod: clean go.mod (#1553) 2025-09-22 20:43:20 +08:00
Daniel Liu
31f5c7da88
all: remove deprecated uses of math.rand #26710 (#1549) 2025-09-22 20:42:14 +08:00
wit liu
07399bc552
all: fix misspell (#1523)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 20:11:19 +08:00
wit liu
7d5a03a46e
all: fix unnecessary conversion (#1527)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:45:42 +08:00
wit liu
d9ae317a38
all: format golang files (#1548)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:41:54 +08:00
Daniel Liu
03c18e9d47
event: add FeedOf[T] #26310 #26803 (#1547) 2025-09-21 19:41:24 +08:00
Daniel Liu
94992cd1df
event: add ResubscribeErr #22191 (#1546)
This adds a way to get the error of the failing subscription
for logging/debugging purposes.

Co-authored-by: Łukasz Zimnoch <lukaszzimnoch1994@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-09-21 19:40:44 +08:00
Daniel Liu
612182f4ab
event: remove redundant conversions #21903 (#1545) 2025-09-21 19:40:16 +08:00
Daniel Liu
219e59dc4f
event: fix inconsistency in Lock and Unlock #20933 #20940 (#1544)
Co-authored-by: Boqin Qin <Bobbqqin@gmail.com>
2025-09-21 19:39:40 +08:00
Daniel Liu
27354ec059
event: fix goroutine leak #20667 (#1543) 2025-09-21 19:39:08 +08:00
Daniel Liu
b0c0e4c1bf
event: add missing timer.Stop call in TestFeed #20868 (#1542)
Co-authored-by: ucwong <ucwong@126.com>
2025-09-21 19:38:34 +08:00
Daniel Liu
fb5cdfc729
event, p2p/simulations/adapters: fix rare goroutine leaks #20657 (#1541)
Co-authored-by: Boqin Qin <bobbqqin@bupt.edu.cn>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-09-21 19:38:03 +08:00
Daniel Liu
1156e7ca0c
console: fix the wrong error msg of datadir testcase #29183 (#1540) 2025-09-21 19:37:32 +08:00
Daniel Liu
4ca4c854ad
console: add cleanup to avoid leaks in newTester #27695 (#1539) 2025-09-21 19:36:43 +08:00
Daniel Liu
72b932acbf
console: use default APIs when server doesn't have rpc_modules #26267 (#1537) 2025-09-21 19:36:04 +08:00
Daniel Liu
de00ee9ba3
console: fix some typos #25551 (#1536) 2025-09-21 19:35:28 +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
wit liu
607fa3cc90
XDCx: remove unused functions and variables (#1530)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:02:21 +08:00
wit liu
a663ea311c
all: fix white space (#1529)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:01:34 +08:00
Daniel Liu
cb077e7ea4
console: fix admin.sleepBlocks #21629 (#1528)
Co-authored-by: Hanjiang Yu <delacroix.yu@gmail.com>
2025-09-21 19:00:55 +08:00
Daniel Liu
1b5bc181f3
console: prevent importRawKey from getting into CLI history #21279 (#1526) 2025-09-21 19:00:14 +08:00
Daniel Liu
5ad87e559f
cmd, console: password input fixes #20960 (#1524) 2025-09-21 18:59:34 +08:00
Daniel Liu
94a85f4162
console: fix some goja-related crashes/errors in the bridge #21050 (#1522) 2025-09-21 18:58:28 +08:00
wit liu
590cbafae9
all: fix goimports (#1521)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 18:57:54 +08:00
Daniel Liu
395071e9f6
console: fix inconsequential goroutine leak #20667 (#1520) 2025-09-21 18:56:56 +08:00
Daniel Liu
2e545959dd
internal/web3ext: enforce mixed caps variable names #19059 (#1519) 2025-09-21 18:56:21 +08:00
Daniel Liu
7c69d03a88
accounts/abi/bind/v2: add Address method to BoundContract #32559 (#1518)
Co-authored-by: Mobin Mohanan <47410557+tr1sm0s1n@users.noreply.github.com>
2025-09-21 18:55:42 +08:00
wit liu
1a2c8ee180
all: fix govet (#1517)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 18:55:13 +08:00
Daniel Liu
185e28ad14
go.mod: add tool section in module file #32598 (#1513) 2025-09-21 18:54:30 +08:00
Daniel Liu
85d71e71dd
eth/filters: add address limit to filters #31876 (#1504) 2025-09-21 18:53:52 +08:00
Daniel Liu
81e3bd0f90
eth/tracers/logger: fix json-logger output missing #30804 (#1502)
Fixes a flaw introduced in
https://github.com/ethereum/go-ethereum/pull/29795 , discovered while
reviewing https://github.com/ethereum/go-ethereum/pull/30633 .

Co-authored-by: Martin HS <martin@swende.se>
2025-09-21 18:53:13 +08:00
Daniel Liu
ff779bae72
eth/tracers: fill the creationMethod in flatCall #30539 (#1501)
`flatCallTracer` will now specify the type of a create in the action
via the `creationMethod` field.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-09-21 18:52:27 +08:00
Daniel Liu
0b13b19b55
trie: fix some typos #25551 #25648 (#1111) 2025-09-21 18:51:15 +08:00
Wanwiset Peerapatanapokin
1f6bd2bae5
Merge pull request #1280 from XinFinOrg/XDPoSv2-privatenet-improve-genesis
Improve genesis for easy privatechain deployment
2025-09-20 19:03:52 +04:00
Wanwiset Peerapatanapokin
fd22d58cc1
Merge pull request #1257 from XinFinOrg/improve-consensus-logs
Improve consensus logs
2025-09-20 19:03:34 +04:00
wanwiset25
b4f79c0b14 improve logs 2025-09-20 18:12:11 +04:00
wanwiset25
30e1a9a7fd fix 2025-09-20 17:56:20 +04:00
wgr523
968fb0124b
style: change limitPenaltyEpoch in config to real meaning, avoid +1 (#1538) 2025-09-19 13:43:31 -07:00
wgr523
5a6d25ec08
engine_v2: fix negative underflow in getBlockInfoByEpochNum (#1481) 2025-09-17 22:52:28 +08:00
wgr523
b8e5baa978
all: fix minted token recorded value is zero (#1480) 2025-09-17 22:50:52 +08:00
Daniel Liu
af69d382ff
eth/tracers: various fixes #30540 (#1491)
Breaking changes:

- The ChainConfig was exposed to tracers via VMContext passed in
`OnTxStart`. This is unnecessary specially looking through the lens of
live tracers as chain config remains the same throughout the lifetime of
the program. It was there so that native API-invoked tracers could
access it. So instead we moved it to the constructor of API tracers.

Non-breaking:

- Change the default config of the tracers to be `{}` instead of nil.
This way an extra nil check can be avoided.

Refactoring:

- Rename `supply` struct to `supplyTracer`.
- Un-export some hook definitions.

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
2025-09-17 09:04:38 +08:00