Commit Graph

2036 Commits

Author SHA1 Message Date
zzzckck
0dab664d98
txpool: apply miner's gasceil to txpool (#2680)
apply `Eth.Miner.GasCeil` to TxPool even the node did not enable `--mine` option
Otherwise, there could be accmulated pending transactions in txpool.
Take an example:
- Currently, BSC testnet's block gaslimit is 70M, as 20M gas is reserved for
  SystemTxs, the maximum acceptable GasLimit for transaction is 50M.
- TxPool recevied a transaction with GasLimit 60M, it would be accepted in TxPool but it
  will never be accepted by validators. Such kinds of transactions will be kept in txpool
  and gradually make the txpool overflowed
2024-09-04 16:02:27 +08:00
zzzckck
d3450f13c9
log: add some p2p log (#2677) 2024-09-03 14:27:53 +08:00
buddho
5d19f2182b
internal/ethapi: make GetFinalizedHeader monotonically increasing (#2655) 2024-08-20 11:51:32 +08:00
yuhangcangqian
f532da6ca0
chore: fix some comments (#2597)
Signed-off-by: yuhangcangqian <cuibuwei@qq.com>
2024-07-25 10:46:52 +08:00
zzzckck
c94fc290e7
Merge pull request #2612 from buddh0/merge_master_into_develop
Merge master into develop
2024-07-25 10:44:24 +08:00
buddho
7f3c5ce4cd
cmd/utils: add new flag OverridePassedForkTime (#2611) 2024-07-25 10:43:32 +08:00
buddh0
99e4e950f8 Merge branch 'master' into develop 2024-07-25 10:20:23 +08:00
Nathan
17e0e45a09
BEP-341: Validators can produce consecutive blocks (#2482) 2024-07-23 13:55:45 +08:00
NathanBSC
c6cb43b7ca Revert "miner/worker: broadcast block immediately once sealed (#2576)"
This reverts commit 6d5b4ad64d31907e0d3def45ac283b540cbe9ec9.
2024-07-22 18:23:10 +08:00
Chris Li
87e622e51f
fix: the bug of blobsidecars and downloader with multi-database (#2564) 2024-07-16 22:37:03 +08:00
buddho
6d5b4ad64d
miner/worker: broadcast block immediately once sealed (#2576) 2024-07-16 21:24:37 +08:00
Nathan
90e67970ae
core: clearup testflag for Cancun and Haber (#2572) 2024-07-09 14:30:19 +08:00
Matus Kysel
971c0fa380
tests: fix unstable test (#2561) 2024-07-04 07:56:35 +02:00
Nathan
f2e7f1dd24
fix: ensure empty withdrawals after cancun before broadcast (#2525) 2024-06-21 15:00:56 +08:00
zzzckck
6094d7157e
UT: random failure of TestSnapSyncWithBlobs (#2519)
this case failed randomly in github CI, the ratio of around 20%
but can not be reproduced locally by:
```
  go test -p 1 -v -run TestSnapSyncWithBlobs -count 100
```
there could be a potential risk between `runEthPeer` and `runSnapExtension`,as
they shared the same handler.peers.
Add extra wait time for `runEthPeer` to resolve it.

And same for another UT: testBroadcastBlock
2024-06-20 11:14:52 +08:00
will-2012
99d31aeb28
perf: speedup pbss trienode read (#2508) 2024-06-18 11:47:22 +08:00
irrun
f467c6018b
feat: add mev helper params and func (#2512) 2024-06-13 11:13:39 +08:00
zoupingshi
1047f0e59a
chore: fix function name (#2501)
Signed-off-by: zoupingshi <hellocatty@tom.com>
2024-06-05 15:12:48 +08:00
Nathan
8b9558bb4d
params/config: add Bohr hardfork (#2497) 2024-05-30 11:51:34 +08:00
Chris Li
63e7eac394
fix: keep 9W blocks in ancient db when prune block (#2481) 2024-05-29 15:11:52 +08:00
lx
d7b9866d3b
Merge pull request #2487 from bnb-chain/master
merge PRs from master to develop branch
2024-05-22 13:56:19 +08:00
Nathan
f190c49252
core/vm: add secp256r1 into PrecompiledContractsHaber (#2483) 2024-05-21 17:46:42 +08:00
Mars
c856d21719
fix: move mev op to MinerAPI & add command to console (#2475) 2024-05-20 14:00:28 +08:00
galaio
6b8cbbe172
sync: fix some sync issues caused by prune-block. (#2466) 2024-05-16 12:07:13 +08:00
Nathan
0c0958ff87
eth/handler: check lists in body before broadcast blocks (#2461) 2024-05-15 14:54:25 +08:00
Eric
d436f9e2e8
eth/fetcher/block_fetcher.go: add metrics for import failed block (#2459) 2024-05-14 19:29:43 +08:00
Nathan
0560685460
core: clearup feynman testflag and rialto code (#2457) 2024-05-14 16:37:17 +08:00
Nathan
23f6194fad
eth/handler: check blobs before broadcast blocks (#2450) 2024-05-13 16:20:50 +08:00
Nathan
b57c779759
eth/filters: enforce topic-limit early on filter criterias (#29535) (#2448)
This PR adds a limit of 1000 to the "inner" topics in a filter-criteria

Co-authored-by: Martin HS <martin@swende.se>
2024-05-11 10:24:19 +08:00
zzzckck
a7d5b02919
release: prepare for release v1.4.7 (#2442)
* release: prepare for release v1.4.7

* code: avoid golang-lint error for TxLookupLimit
2024-05-09 19:47:52 +08:00
knowmost
0c101e618a
chore: fix some typos (#2433) 2024-05-09 16:05:46 +08:00
galaio
7bc5a3353d
txpool: limit max gas when mining is enabled; (#2435) 2024-05-09 15:54:31 +08:00
Eric
7cab9c622c
eth/gasprice: add query limit to defend DDOS attack (#2423) 2024-04-25 14:05:12 +08:00
Chris Li
d653cda82e
feat: adaptive for loading journal file or journal kv during loadJournal (#2406)
* core: check journalType before load journal
* fix: when delete trieJournal delete from kv & file
2024-04-19 16:23:28 +08:00
careworry
4b54601d5c
chore: fix some typos in comments (#2408) 2024-04-19 13:17:58 +08:00
Chris Li
c0afdc9a98
core: separated databases for block data (#2227)
* core: use finalized block as the chain freeze indicator (#28683)
* core/rawdb: use max(finality, head-90k) as chain freezing threshold
* core: impl multi database for block data
* core: fix db inspect total size bug
* core: add tips for user who use multi-database
* core: adapt some cmd for multi-database
* core: adapter blockBlobSidecars
* core: fix freezer readHeader bug

---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2024-04-18 15:12:05 +08:00
buddho
cbcd26c9a9
fix: no import blocks before or equal to the finalized height (#2398) 2024-04-17 14:19:50 +08:00
Chris Li
3a6e3c67f2
core/trie: persist TrieJournal to journal file instead of kv database (#2341) 2024-04-15 10:47:54 +08:00
buddho
d7836bfe98
fix: set withdrawals properly when fetching empty block (#2386) 2024-04-10 19:46:34 +08:00
buddho
a75e82367d
fix: ensure empty withdrawals after cancun (#2384) 2024-04-10 14:42:16 +08:00
sellskin
e4688e4e7a
remove code that will not be executed (#2333) 2024-04-03 14:02:34 +08:00
zzzckck
7dbafe7453
fix: don't switch to snapsync for fast node (#2367) 2024-04-02 19:01:22 +08:00
GalaIO
9ab8565128
cancun: change empty withdrawHash value of header; (#2350) 2024-03-29 15:03:21 +08:00
buddho
7c89c65a97
4844: bugfix and improve (#2337)
* core: add debug log for CheckDataAvailableInBatch
* narrow the semantics of func resetItems
* freezer: refactor ResetTable & ResetItems;
* fix: fix some lint issues;
* only newSnapshot for genesis block
* freezer: opt reset blob table logic;
* fix: opt da check logic;
* freezer: opt reset blob table logic;
* fix: fix failed UTs;
* core/types: fix EmptyBody
* freezer: refactor write ancient blocks logic;
* code: update code owner file

---------

Co-authored-by: GalaIO <GalaIO@users.noreply.github.com>
Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com>
2024-03-28 16:35:39 +08:00
buddho
38db9bf4e2
BlobTx: implement EIP-4844 on BSC (#2279)
* ci: temp enable blobtx branch ci run;
* Switch ON blobpool & ensure Cancun hardfork can occur (#2223)
* feat: support blob storage & miscs; (#2229)
* chainconfig: use cancun fork for BSC;
* feat: fill WithdrawalsHash when BSC enable cancun fork;
* rawdb: support to CRUD blobs;
* freezer: support to freeze block blobs;
* blockchain: add blob cache & blob query helper;
* freezer: refactor addition table logic, add uts;
* blobexpiry: add more extra expiry time, and logs;
* parlia: implement IsDataAvailable function;
* blob: refactor blob transfer logic;
* blob: support config blob extra reserve;
* blockchian: support to import block with blob & blobGasFee; (#2260)
* blob: implement min&max gas price logic;
* blockchian: support import side chain;
* blobpool: reject the banned address;
* blockchain: add chasing head for DA check;
* params: update blob related config;
* blockchain: opt data available checking performance;
* params: modify blob related params;
* gasprice: support BEP-336 blob gas price calculate;
* blobTx: mining + brodcasting (#2253)
* blobtx mining pass (#2282)
* Sidecar fetching changes for 4844 (#2283)
* ci: temp enable blobtx branch ci run;
* Switch ON blobpool & ensure Cancun hardfork can occur (#2223)
* feat: support blob storage & miscs; (#2229)
* chainconfig: use cancun fork for BSC;
feat: fill WithdrawalsHash when BSC enable cancun fork;
* rawdb: support to CRUD blobs;
* freezer: support to freeze block blobs;
* blockchain: add blob cache & blob query helper;
* freezer: refactor addition table logic, add uts;
* blobexpiry: add more extra expiry time, and logs;
* parlia: implement IsDataAvailable function;
* blob: refactor blob transfer logic;
* blob: support config blob extra reserve;
* blockchian: support to import block with blob & blobGasFee; (#2260)
* blob: implement min&max gas price logic;
* blockchian: support import side chain;
* blobpool: reject the banned address;
* blockchain: add chasing head for DA check;
* params: update blob related config;
* blockchain: opt data available checking performance;
* params: modify blob related params;
* gasprice: support BEP-336 blob gas price calculate;
* fix failed check for WithdrawalsHash (#2276)
* eth: include sidecars in fitering of body
* core: refactor sidecars name
* eth: sidecars type refactor
* core: remove extra from bad merge
* eth: fix handlenewblock test after merge
* Implement eth_getBlobSidecars && eth_getBlobSidecarByTxHash (#2286)
* execution: add blob gas fee reward to system;
* syncing: support blob syncing & DA checking;
* naming: rename blobs to sidecars;
* fix the semantics of WithXXX (#2293)
* config: reduce sidecar cache to 1024 and rename (#2297)
* fix: Withdrawals turn into empty from nil when BlockBody has Sidecars (#2301)
* internal/api_test: add test case for eth_getBlobSidecars && eth_getBlobSidecarByTxHash (#2300)
* consensus/misc: rollback CalcBlobFee (#2306)
* flags: add new flags to override blobs' params;
* freezer: fix blob ancient save error;
* blobsidecar: add new sidecar struct with metadata; (#2315)
* core/rawdb: optimize write block with sidecars (#2318)
* core: more check for validity of sidecars
* mev: add TxIndex for mev bid (#2325)
* remove useless Config() (#2326)
* fix WithSidecars (#2327)
* fix: fix mined block sidecar issue; (#2328)
* fix WithSidecars (#2329)

---------
Co-authored-by: GalaIO <GalaIO@users.noreply.github.com>
Co-authored-by: buddho <galaxystroller@gmail.com>
Co-authored-by: Satyajit Das <emailtovamos@gmail.com>
Co-authored-by: Eric <45141191+zlacfzy@users.noreply.github.com>
Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com>
2024-03-22 22:37:47 +08:00
Delweng
291ab99d4a eth/tracers: prestate tracer add blob fee (#29168)
* eth/tracers: prestate balance add blob fee

Signed-off-by: jsvisa <delweng@gmail.com>

* eth/tracers: prestate test support blob tx

Signed-off-by: jsvisa <delweng@gmail.com>

* eth/tracers: add prestate blob tx test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2024-03-20 19:21:09 +08:00
Sina Mahmoodi
c170814596 eth/catalyst: update simulated beacon for cancun (#28829)
* eth/catalyst: update simulated beacon for cancun

* validate blob hashes

* compute hashes from commitment

* fix beacon root and payload version

* check commitment conversion

* fix random attr

* flip dev to cancun
2024-03-20 19:21:09 +08:00
buddho
16b040e8c4
eth/ethconfig: remove overridekepler and overrideshanghai (#2304) 2024-03-19 14:33:11 +08:00
Ng Wei Han
880f7ab865
fix: add FeynmanFix upgrade for a testnet issue (#2288) (#2299) 2024-03-18 15:30:32 +08:00
buddho
8ef781a41e
upstream: more code review fix (#35) 2024-03-11 18:56:19 +08:00