Commit graph

13193 commits

Author SHA1 Message Date
Daniel Liu
6200e8d7de
core, trie: change format 0x%x to %#x #25221 (#1094) 2025-06-17 13:31:20 +08:00
Daniel Liu
dabaf392a7
trie: fix size accounting in cleaner #25007 (#1093)
Decrease children size instead of dirties size when marking dirties as cleaned up in trie cleaner

Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>
2025-06-17 13:29:57 +08:00
Daniel Liu
e4de0e82a2
trie: remove unused makeHashNode #24702 (#1089)
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
2025-06-17 13:28:59 +08:00
Daniel Liu
205a94ea4f
trie: fix two issues in trie iterator #24539 (#1086)
* trie: fix memory leak in trie iterator

In the trie iterator, live nodes are tracked in a stack while iterating.
Popped node states should be explictly set to nil in order to get
garbage-collected.

* trie: fix empty trie iterator
2025-06-17 13:27:57 +08:00
Daniel Liu
f07824db20
core, ethdb, tests, trie: implement NewBatchWithSize API for batcher #24392 (#1085) 2025-06-17 13:26:50 +08:00
Daniel Liu
bebc87e2f0
trie: fix typos (#1080) 2025-06-17 13:25:40 +08:00
Daniel Liu
5e8a096844
eth/fetcher, trie: unit test reliability fixes #23020 #23415 (#1070)
Some tests take quite some time during exit, which I think causes
some appveyor fails like this:

    https://ci.appveyor.com/project/ethereum/go-ethereum/builds/39511210/job/xhom84eg2e4uulq3

One of the things that seem to take time during exit is waiting
(up to 100ms) for the syncbloom to close. This PR changes it to use
a channel, instead of looping with a 100ms wait.

This also includes some unrelated changes improving the reliability of
eth/fetcher tests, which fail a lot because they are time-dependent.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-06-17 13:21:18 +08:00
Daniel Liu
a41a92978d
trie: small optimization of delete in fullNode case #22979 (#1069) 2025-06-17 13:17:07 +08:00
Daniel Liu
1f05c3e5fd
trie: reuse dirty data instead of hitting disk when generating #22667 (#1065)
* core/state/snapshot: reuse memory data instead of hitting disk when generating

* trie: minor nitpicks wrt the resolver optimization

* core/state/snapshot, trie: use key/value store for resolver

* trie: fix linter

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-06-17 13:15:22 +08:00
Daniel Liu
45d89bd4d1
trie: faster snapshot generation #22504 (#1062) 2025-06-17 13:13:14 +08:00
Daniel Liu
93c2745b7b
all: disable recording preimage of trie keys #21402 (#1054) 2025-06-17 13:10:47 +08:00
Daniel Liu
d6cecbf570
trie: extend range proof #21250 (#1050) 2025-06-17 13:06:36 +08:00
Daniel Liu
e8c9fdde0f
eth/downloader: refactor downloader + queue #21263 (#1041)
* eth/downloader: refactor downloader + queue

downloader, fetcher: throttle-metrics, fetcher filter improvements, standalone resultcache

downloader: more accurate deliverytime calculation, less mem overhead in state requests

downloader/queue: increase underlying buffer of results, new throttle mechanism

eth/downloader: updates to tests

eth/downloader: fix up some review concerns

eth/downloader/queue: minor fixes

eth/downloader: minor fixes after review call

eth/downloader: testcases for queue.go

eth/downloader: minor change, don't set progress unless progress...

eth/downloader: fix flaw which prevented useless peers from being dropped

eth/downloader: try to fix tests

eth/downloader: verify non-deliveries against advertised remote head

eth/downloader: fix flaw with checking closed-status causing hang

eth/downloader: hashing avoidance

eth/downloader: review concerns + simplify resultcache and queue

eth/downloader: add back some locks, address review concerns

downloader/queue: fix remaining lock flaw

* eth/downloader: nitpick fixes

* eth/downloader: remove the *2*3/4 throttling threshold dance

* eth/downloader: print correct throttle threshold in stats

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-06-17 13:01:06 +08:00
wgr523
e13265a7d7
record total minted into smart contract (#1026)
* feat: record total minted into smart contract

* feat: GetCurrentTotalMinted API
2025-06-16 02:31:33 -07:00
Daniel Liu
ae70b5dc14
cmd: disable prefetch next block state by default, fix #997 (#1025) 2025-06-06 17:23:12 +08:00
Daniel Liu
1490033ec9
trie: fix typos #23768 (#1074) 2025-06-04 17:13:58 +08:00
Daniel Liu
7fbf862806
trie: improve the node iterator seek operation #22470 (#1064) 2025-06-03 12:18:46 +08:00
Daniel Liu
958ad72b8e
trie: fix bloom crash on fast sync restart #22332 (#1060) 2025-06-03 11:54:40 +08:00
Daniel Liu
b18f9f2705
trie: use github.com/holiman/bloomfilter/v2 #22044 (#1059) 2025-06-03 11:52:45 +08:00
Daniel Liu
c4a98d2ddb
trie: remove redundant conversions (#1056) 2025-06-03 11:50:02 +08:00
Daniel Liu
aa7c8644c3
all: fix tests on 32-bit and windows + minor rpc fixes #21871 (#1055) 2025-06-03 11:47:11 +08:00
Wanwiset Peerapatanapokin
29cc718d4a
Merge pull request #1037 from Tarunshrma/fix-blocknumber-hex-unmarshal
rpc: support decimal integer as block number
2025-06-03 07:12:58 +04:00
Daniel Liu
63ff193931
trie: avoid copybytes for stacktrie #22686 (#1063)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-06-03 10:58:46 +08:00
Daniel Liu
5b071d1b0d
trie: rename NodeFlag to nodeFlag (#1049) 2025-05-26 15:18:47 +08:00
Daniel Liu
5dd41a6765
trie: support empty range proof #21199 (#1048)
Co-authored-by: gary rong <garyrong0905@gmail.com>
2025-05-26 15:18:14 +08:00
Daniel Liu
b9626bfebf
trie: fix gaped range proof test case #21484 (#1047)
Co-authored-by: gary rong <garyrong0905@gmail.com>
2025-05-26 15:17:31 +08:00
Daniel Liu
2dd50b63ed
eth/downloader: improve test (#1043)
* eth/downloader: more context in errors #21067

* eth/downloader: fix spuriously failing tests #21149
2025-05-26 15:16:39 +08:00
Daniel Liu
e581aa5240
eth/downloader: flush state data before exit #16280 (#1042) 2025-05-26 15:15:32 +08:00
Wanwiset Peerapatanapokin
c7349e77d0
Merge pull request #1038 from XinFinOrg/update-bootnode
update mainnet bootnode
2025-05-21 13:35:36 +04:00
Daniel Liu
6395c15280
core/state, eth, trie: stabilize memory use, fix memory leak #21491 (#1040) 2025-05-20 15:14:47 +08:00
Daniel Liu
b94b29b8d0
trie: check nil bloom (#1039) 2025-05-20 15:13:34 +08:00
wanwiset25
6119591b7f update mainnet bootnode 2025-05-19 15:03:47 +04:00
Daniel Liu
1472f3b1eb
docs: add document for JSONRPC API (#1027)
* docs: add document for module XDPoS

* docs: add document for module admin

* docs: add document for module debug

* docs: add document for module eth

* docs: add document for module miner

* docs: add document for module net

* docs: add document for module personal

* docs: add document for module rpc

* docs: remove module shh

* docs: add document for module txpool
2025-05-19 15:30:52 +08:00
Tarun Sharma
c14f2e17aa test: Updated test cases to include MaxInt64, MinInt64 and MaxUint64, also rename testcase to TestHas0xPrefix to cover Has0xPrefix public method in hexutil package 2025-05-16 12:55:45 +04:00
Tarun Sharma
631be3cc04 refactor: Removed IsValidHexString and make has0xPrefix as public as per review comment 2025-05-16 12:33:25 +04:00
Tarun Sharma
46a301a528 test: added more table test data for TestBlockNumberJSONUnmarshal 2025-05-16 10:36:36 +04:00
JukLee0ira
47dae16a40
node: add JWT secret log line #25095 (#1036) 2025-05-16 12:03:11 +08:00
JukLee0ira
c145287e87
node: allow JWT pass by file only #24579 (#1035) 2025-05-16 12:01:36 +08:00
JukLee0ira
d81a5b6be1
docs: fix document for contract XDCValidator (#1034) 2025-05-15 19:15:50 +08:00
Daniel Liu
4fabc43a01
core/vm: fix invalid merkle root caused by PR #627 (#1033) 2025-05-14 16:47:53 +08:00
JukLee0ira
96c23408a5
docs: add document for contract XDCValidator (#1032) 2025-05-13 12:45:26 +08:00
Tarun Sharma
cccfefa669 test: adding test condition to mustFail=false in TestBlockNumberJSONUnmarshal for valid number input 2025-05-12 17:34:01 +04:00
Tarun Sharma
78e82ac8a9 test: updated test cases to cover hex and number support for XDPoS_getV2BlockByNumber 2025-05-09 14:32:01 +04:00
Tarun Sharma
8d0e24b2e2 api: accept both hex and decimal for block number 2025-05-08 17:57:46 +04:00
Tarun Sharma
47d4bf4bf6 common: add public method to check for valid hex string 2025-05-08 17:56:48 +04:00
JukLee0ira
7a659c9e7d
node: change JWT error status to 401 Unauthorized #25629 (#1029) 2025-05-08 16:24:41 +08:00
Daniel Liu
fbd4364fc3
cmd, debug: fix debug_verbosity (#1030) 2025-05-08 16:10:53 +08:00
Daniel Liu
c70186be18
internal/web3ext: remove deprecated debug api (#1031)
* internal/web3ext: remove debug api backtraceAt

* internal/web3ext: remove debug api setMutexProfileRate
2025-05-08 15:58:44 +08:00
JukLee0ira
fe422720f3
cmd, node: implement --authrpc-vhosts flag #24506 (#1028) 2025-05-08 11:13:44 +08:00
Wanwiset Peerapatanapokin
d21406c43e
Merge pull request #917 from XinFinOrg/update-reward-api
add new api XDPoS_getRewardByAccount
2025-05-07 15:29:32 +04:00