Commit graph

1470 commits

Author SHA1 Message Date
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
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
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
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
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
266cf85510
rpc: remove deprecated method Notifier.Closed #29162 (#1022)
Co-authored-by: Undefinedor <wanghao@imwh.net>
2025-05-06 09:44:20 +08:00
Daniel Liu
d25c6f02a7
all: not copy loop var for golang v1.22 (#1020) 2025-04-29 17:27:36 +08:00
benjamin202410
e1772ce08a
fix: improve timeout message log (#996)
* fix: improve timeout message log

* Update bft_handler.go

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-04-29 01:48:56 -07:00
Daniel Liu
1d3e5cb455 core: prefetch next block state concurrently #19328 2025-04-28 16:57:56 +08:00
Daniel Liu
b628212d8e
rpc: change BlockNumber constant values to match ethclient #27219 (#992) 2025-04-28 10:59:34 +08:00
JukLee0ira
b4308ba733
internal/ethapi: disable sending of non eip155 replay protected tx #22339 (#971)
* internal/ethapi: disable sending of non eip155 replay protected tx #22339

* eth: optimize the initialization logic of EthAPIBackend

* fix
2025-04-25 11:55:52 +08:00
Daniel Liu
94b3ca1eeb
all: remove version field #25096 (#970) 2025-04-24 18:55:15 +08:00
Daniel Liu
4fb622bfd0
all: remove public field from rpc.API #25059 (#969) 2025-04-24 18:53:59 +08:00
JukLee0ira
63b04b4114
eth: some typo mistake (#16802) (#948) 2025-04-21 16:36:20 +08:00
Daniel Liu
b9a6c8c32d
cmd, core, eth, trie: add trie read caching layer (#18087) (#946) 2025-04-16 17:27:43 +08:00
wgr523
6a38aa00aa
Reward float upgrade (#940)
* feat: use float type reward

* feat: add test of float reward
2025-04-16 02:03:41 -07:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
5b8c267122 trie: use trie.NewStackTrie instead of new(trie.Trie) (#22246) 2025-04-07 16:44:32 +08:00
Daniel Liu
54f73e471f trie: Derivesha with stacktrie (#21407) 2025-04-07 16:44:32 +08:00
Daniel Liu
a4c7d7f458 all: clean duplicate constants in package common 2025-04-07 16:43:01 +08:00
Gerui Wang
6bac06b1e7 feat: fixed reward per node (per capita) 2025-03-25 22:33:49 +08:00
Gerui Wang
84ae914350 feat: add TIPEpochHalving, better style 2025-03-25 22:16:35 +08:00
Wang Gerui
7c4668fa91 style: clean comment 2025-03-25 22:10:03 +08:00
Daniel Liu
a9b9f53701 core, eth, trie: add a prefix to contract code (21080) 2025-03-24 22:31:03 +08:00
Daniel Liu
6285a4fe05 core: improve commit genesis 2025-03-20 14:15:09 +08:00
Daniel Liu
3e4a13d038 rpc: accept finalized as block number 2025-03-19 17:47:52 +08:00
Daniel Liu
ccf8ff2e64 cmd/utils, eth/ethconfig: remove flag docroot 2025-03-19 15:32:57 +08:00
Daniel Liu
5ef815a6c9 eth/gasprice: sanity check ratio values (#31270) 2025-03-14 08:04:02 +08:00
Daniel Liu
8f68af5da0 eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644) 2025-03-14 08:04:02 +08:00
Daniel Liu
975cddacc5 eth/gasprice: fix deserialization error for foundry 2025-03-14 08:01:07 +08:00
Daniel Liu
9167867bab eth/downloader: fix peer idleness tracking when restarting statesync (#21260) 2025-03-11 16:37:02 +08:00
Daniel Liu
8d63a56777 eth/downloader: fix data race in downloader (#20204) 2025-03-11 16:35:31 +08:00
Daniel Liu
0273448333 core, eth/downloader: fix validation and downloader printout flaw (#17974) 2025-03-11 13:24:02 +08:00
Miro
2dfa020165 eth/filters: fix TestPendingLogsSubscription (#23619)
The test did not synchronize with per-case goroutines, and thus didn't notice
that some tests were just hanging. This change adds missing synchronization
and fixes the broken tests.
2025-03-10 15:42:59 +08:00
Daniel Liu
2697703c0f core, eth, params: make indexer configurable (#17188) 2025-03-10 15:41:53 +08:00
Daniel Liu
66e73ad32e cmd, les: remove light client code (#28586) 2025-03-10 15:40:07 +08:00
Daniel Liu
f039b26e7a light: CHT and bloom trie indexers working in light mode (#16534) 2025-03-06 15:30:48 +08:00
wgr523
c36e4d54c0
Upgrade reward 2.0 (#865)
* refactor: reward hook gets prepared for upgrade

* feat: new reward hook, config change, unit tests

* add missing code

* feat: filter penalty in reward. add unit test

* update constant and config

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-03-02 02:44:34 -08:00
Daniel Liu
6e8fe5121d eth/downloader: speed up tests by generating chain only once (#17916) 2025-03-01 15:55:27 +08:00
Daniel Liu
588dcd35ce cmd, common, core, eth: optimize rollback by flag 2025-03-01 11:34:32 +08:00
Daniel Liu
bf011986a5 eth/downloader: fixes data race between synchronize and other methods (#21201) 2025-02-26 15:06:08 +08:00
Daniel Liu
2955a988ca eth/downloader: more context in errors (#21067) 2025-02-26 15:06:08 +08:00
Daniel Liu
3ee371454f eth/downloader: make syncing error obvious (#19413) 2025-02-26 15:06:08 +08:00
Daniel Liu
04adabe55c eth/downloader: fix nil droppeer in state sync (#19232) 2025-02-26 15:06:08 +08:00
Daniel Liu
96db952576 downloader: fix edgecase where returned index is OOB for downloader (#18335) 2025-02-26 15:06:08 +08:00
Daniel Liu
3adec81483 downloader: different sync strategy (#18085) 2025-02-26 15:06:08 +08:00
Daniel Liu
9ad4e1d282 downloader: measure successfull deliveries, not failed (#17983) 2025-02-26 15:06:08 +08:00