Commit graph

13207 commits

Author SHA1 Message Date
Wanwiset Peerapatanapokin
2ece05993b
Merge pull request #1121 from XinFinOrg/update-cicd
update new rpcs to cicd
2025-06-20 13:04:09 +04:00
Daniel Liu
8e6d98e121
eth/downloader: change intial download size #21366 (#1045)
This changes how the downloader works, a little bit. Previously, when block sync started,
we immediately started filling up to 8192 blocks. Usually this is fine, blocks are small
in the early numbers. The threshold then is lowered as we measure the size of the blocks
that are filled.

However, if the node is shut down and restarts syncing while we're in a heavy segment,
that might be bad. This PR introduces a more conservative initial threshold of 2K blocks
instead.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-06-20 16:32:47 +08:00
Daniel Liu
ea459d68a3
trie: fix spelling mistakes (#1122) 2025-06-20 16:29:57 +08:00
Daniel Liu
67754ff3d4
eth/downloader: save the correct delivery time for state sync #21427 (#1044)
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-06-19 16:34:30 +08:00
wanwiset25
cbe2e46d4a update new rpcs to cicd 2025-06-18 14:14:46 +04:00
Wanwiset Peerapatanapokin
9112440585
Merge pull request #1105 from XinFinOrg/allow-sync-and-gc-configure
make start script accept SYNC_MODE and GC_MODE
2025-06-18 11:51:04 +04:00
wanwiset25
a78982814b make start script accept SYNC_MODE and GC_MODE 2025-06-17 11:32:53 +04:00
Wanwiset Peerapatanapokin
4142debefc
Merge pull request #1104 from XinFinOrg/fix-getrewardbyaccount-edgecase
fix: getrewardbyaccount api edge case
2025-06-17 11:29:08 +04:00
Daniel Liu
e83b87a80e
cicd, params: update bootnodes for testnet (#1110) 2025-06-17 13:35:28 +08:00
Daniel Liu
188d0cf0f9
compression/rle: delete RLE compression #16468 (#1101) 2025-06-17 13:34:25 +08:00
Daniel Liu
7feff61647
core/state: remove toAddr helper in tests #22772 (#1100) 2025-06-17 13:33:47 +08:00
Daniel Liu
3a6beedb8c
trie: fix parallel typo in trie/hasher.go #25241 (#1095) 2025-06-17 13:32:04 +08:00
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
Wanwiset Peerapatanapokin
aa84249c0d
simplify code 2025-06-16 13:53:34 +04: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
wanwiset25
796ee818e3 add condition to fix endIndex out of bounds 2025-06-11 18:37:02 +04: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