Commit Graph

2823 Commits

Author SHA1 Message Date
joeycli
bb167a9af6 chore: add stack debug 2024-08-12 19:35:26 +08:00
joeycli
66bd59013f chore: delete debug code and add log 2024-08-12 18:20:27 +08:00
joeycli
3a34c737dc feat: support has state on statedb and must fullsync under version 2024-08-12 17:58:22 +08:00
joeycli
4635a457c1 feat: add caching db and trie copy 2024-08-12 17:30:21 +08:00
joeycli
e1a2b8e8d6 feat: init genesis 2024-08-12 16:00:06 +08:00
joeycli
6cf5169ce1 feat: add version scheme for startup 2024-08-12 11:46:32 +08:00
joeycli
7f3aac35e4 feat: add mode for new caching db 2024-08-12 11:07:45 +08:00
joeycli
435410f6f3 chore: forbid versiondb rewind 2024-08-12 10:50:49 +08:00
joeycli
d2e5c03965 feat: add version commit 2024-08-12 10:35:13 +08:00
joeycli
41ab497c22 feat: setup versa db 2024-08-09 17:29:47 +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
NathanBSC
222e10810e core: cache block after wroten into db 2024-07-22 18:22:56 +08:00
Chris Li
a262acfb00
fix: remove delete and dangling side chains in prunefreezer (#2582) 2024-07-17 11:01:40 +08:00
Chris Li
87e622e51f
fix: the bug of blobsidecars and downloader with multi-database (#2564) 2024-07-16 22:37:03 +08:00
Chris Li
13d454796f
fix: pruneancient freeze from the previous position when the first time (#2542) 2024-07-16 22:36:18 +08:00
galaio
c6af48100d
freezer: Opt freezer env checking (#2580) 2024-07-16 21:44:39 +08:00
buddho
6d5b4ad64d
miner/worker: broadcast block immediately once sealed (#2576) 2024-07-16 21:24:37 +08:00
Nathan
c96fab04a3
core/vote: not vote if too late for next in turn validator (#2568) 2024-07-11 22:39:07 +08:00
buddho
27d86948fa
core: adapt highestVerifiedHeader to FastFinality (#2574) 2024-07-11 15:01:01 +08:00
will-2012
a00ffa762c
fix: fix statedb copy (#2567) 2024-07-10 15:39:20 +08:00
buddho
863fdea026
core: avoid to cache block before wroten into db (#2566) 2024-07-10 14:46:11 +08:00
Nathan
90e67970ae
core: clearup testflag for Cancun and Haber (#2572) 2024-07-09 14:30:19 +08:00
Chris Li
bc970e5893
fix: delete unexpected block (#2562) 2024-07-08 19:21:56 +08:00
wayen
a5810fefc9
fix: fix state inspect error after pruned state (#2557) 2024-07-04 22:24:22 +08:00
Roshan
f7de51f74e
upgrade: add HaberFix hardfork (#2535) 2024-06-26 14:51:52 +08:00
Nathan
00f094c37e
core/forkchoice: improve stability when inturn block not generated (#2451) 2024-06-18 15:53:05 +08:00
Chris Li
7b08a70a23
perf: optimize chain commit performance for multi-database (#2509) 2024-06-18 15:20:23 +08:00
irrun
f467c6018b
feat: add mev helper params and func (#2512) 2024-06-13 11:13:39 +08:00
VM
9bb4fed1bf
fix: add an empty freeze db (#2495) 2024-06-04 15:47:16 +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
Chris Li
05543e558d
fix: fix inspect database error (#2484) 2024-05-27 15:10:59 +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
08769ead2b
dev: ensure consistency in BPS bundle result (#2479)
* dev: ensure consistency in BPS bundle result

* fix: remove env operation once the sim is discarded & rename
2024-05-21 12:24:41 +08:00
Matus Kysel
4d0f1e7117
RIP-7212: Precompile for secp256r1 Curve Support (#2400) 2024-05-21 11:44:21 +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
Nathan
0560685460
core: clearup feynman testflag and rialto code (#2457) 2024-05-14 16:37:17 +08:00
Martin HS
691d195526 core/rawdb: add sanity-limit to header accessor (#29534) 2024-05-11 10:24:39 +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
buddho
1d81f3316f
metrics: add blockInsertMgaspsGauge to trace mgasps (#2396) 2024-04-30 17:58:04 +08:00
galaio
31d92c50ad
chore: add metric & log for blobTx; (#2428) 2024-04-27 06:37:42 +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
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
fb435eb5f1
fix: allow fast node to rewind after abnormal shutdown (#2401) 2024-04-18 13:45:02 +08:00
dylanhuang
11503edeb2
chore: render system bytecode by go:embed (#2201) 2024-04-15 11:23:23 +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
4bb1bd1a77
deps: update prsym to solve warning about quic-go version (#2389) 2024-04-11 14:11:15 +08:00
buddho
a75e82367d
fix: ensure empty withdrawals after cancun (#2384) 2024-04-10 14:42:16 +08:00
GalaIO
26f50099f4
blobtx: fix some found issues; (#2383) 2024-04-10 14:31:23 +08:00
Ng Wei Han
48f58a50bb
core: stateDb has no trie and no snap return err (#2369) 2024-04-07 12:07:25 +08:00
buddho
c3623e9af7
core: fix block report when chain is not setHead (#2352) 2024-04-01 19:26:50 +08:00
zzzckck
32ac07f257
upgrade: update system contracts bytes code and hardfork time of Feynman upgrade (#2361) 2024-04-01 16:37:03 +08:00
irrun
3b7ee60e14
Merge pull request #2357 from irrun/re/bidfeeceil
feat: add builder fee ceil in mev_params
2024-04-01 13:38:30 +08:00
irrun
438cdf0861 fix: type 2024-04-01 12:13:00 +08:00
VM
212b7a6972
core: improve chain rewinding mechanism (#2334)
* core: improve chain rewinding mechanism (#29196)

* fix: fix incorrect comment

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: VM <arimas@foxmail.com>
2024-04-01 11:41:09 +08:00
irrun
04a3b1f94f fix: add bid fee ceil 2024-04-01 11:20:12 +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
Matus Kysel
dddf20e6e0
fix missing block asigment WithSidecars 2024-03-26 10:10:42 +01: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
irrun
e0b98ef9cb
feat: export GasCeil in mev_params (#2323) 2024-03-22 16:37:20 +08:00
Ng Wei Han
fd284c74dd
cmd/utils, core: only full sync for fast nodes (#2280) 2024-03-21 11:42:33 +08:00
VM
fdbe2e3cb0
cmd/utils, node: switch to Pebble as the default db if none exists (#27136) (#2312) 2024-03-21 11:41:21 +08:00
Ng Wei Han
9684ba3a83
core: rephrase TriesInMemory log (#2228) 2024-03-21 11:37:47 +08:00
Haotian
66ed85ef82 params: use the same variable name as EIP-4788 (#29195)
In https://eips.ethereum.org/EIPS/eip-4788 the name `BEACON_ROOTS_ADDRESS` is used. This change makes geth use the same variable name to avoid confusion.
2024-03-20 19:21:09 +08:00
Lee Bousfield
3c81d559e7 core/txpool/blobpool: return ErrAlreadyKnown for duplicate txs (#29210)
Signed-off-by: Lee Bousfield <ljbousfield@gmail.com>
2024-03-20 19:21:09 +08:00
weiihann
6978f009ab cmd/geth, core/rawdb: add dbDeleteTrieState 2024-03-20 17:33:06 +08:00
weiihann
74d20546c3 core: don't check genesis hash for no tries 2024-03-20 17:33:06 +08:00
buddho
ccd7a44be0
core/vm: fix PrecompiledContractsCancun (#2310) 2024-03-20 16:24:02 +08:00
VM
10ae179a73
cmd/utils, core/rawdb, triedb/pathdb: flip hash to path scheme (#2241) 2024-03-19 15:18:58 +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
Ng Wei Han
d9b9b7f66b
core/state: fix taskResult typo (#2240) 2024-03-18 11:00:07 +08:00
zzzckck
a4b436806e
fix: systemTx should be always at the end of block (#2277) 2024-03-12 21:11:20 +08:00
buddho
8ef781a41e
upstream: more code review fix (#35) 2024-03-11 18:56:19 +08:00
buddh0
270793f13a Merge branch 'develop' into cancun_code_merge_v1.13.12_v1.13.14 2024-03-11 15:16:24 +08:00
buddho
b7d3be0398
upstream: Cancun code merge v1.13.12~v1.13.14 fix CI (#34) 2024-03-11 14:57:31 +08:00
yzb
6386172b95
all: use errors.New() when there is no param rather than fmt.Errorf() (#2247) 2024-03-11 14:52:33 +08:00
teslaedison
4051c34e18
typo: fix struct names in comments (#2256) 2024-03-11 14:51:59 +08:00
buddho
16c6e462e0
fix: ensure EIP-4788 not supported with Parlia Engine (#2268) 2024-03-11 14:26:57 +08:00
wayen
def3512fd8
feat: support separate trie database (#2021)
* feat: support separate database for state data
2024-03-08 16:07:29 +08:00
buddh0
411d5c5001 Merge tag 'v1.13.14' into cancun_code_merge_v1.13.12_v1.13.14 2024-03-08 15:36:25 +08:00
Raina
89c4ab2a05
feat: support MEV (#2224) 2024-03-08 11:15:35 +08:00
buddho
b75720d270
core: skip checking state root existence when do snapsync by fast node (#2258) 2024-03-07 10:00:01 +08:00
buddho
93d652bad3
upstream: more code review fix (#33)
* add GenesisHeader to ChainHeaderReader

* fix check cancun header for parlia

* misc
2024-03-01 19:19:18 +08:00
Roberto Bayardo
51b479e564
core/txpool: elevate the 'already reserved' error into a constant (#29095)
declare the 'already reserved' error in errors.go
2024-02-27 13:27:50 +02:00
buddho
ba58f5793f
upstream: code review fix (#31)
* rerun go generate

* fix log in worker

* enable blobpool

* add SubscribeReannoTxsEvent for blobpool

* eth: fix potential hang in waitXXXExtension

* fix networkID when new eth handler

* remove unexpected +

* disable SyncTargetFlag

* add commented code in enableSyncedFeatures

* fix typo
2024-02-27 19:07:14 +08:00
Delweng
45a272c7b9
core/txpool: no need to log loud rotate if no local txs (#29083)
* core/txpool: no need to run rotate if no local txs

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

* Revert "core/txpool: no need to run rotate if no local txs"

This reverts commit 17fab173883168c586d57ca9c05dfcbd9e7831b4.

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

* use Debug if todo is empty

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2024-02-26 18:34:45 +02:00
Péter Szilágyi
63aaac8100
core/txpool/blobpool: reduce default database cap for rollout (#29090)
xcore/txpool/blobpool: reduce default database cap for rollout
2024-02-26 14:27:56 +02:00
Roberto Bayardo
32d4d6e616
core/txpool: reject blob txs with blob fee cap below the minimum (#29081)
* make blobpool reject blob transactions with fee below the minimum

* core/txpool: some minot nitpick polishes and unified error formats

* core/txpool: do less big.Int constructions with the min blob cap

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-02-26 11:06:52 +02:00
buddh0
2ecffd3acd Merge branch 'develop' into cancun_code_merge_v1.13.0_v1.13.11 2024-02-26 17:04:49 +08:00
zjubfd
73f27a590f
feat: add new fork block and precompile contract for BEP294 and BEP299 (#2047) 2024-02-26 16:17:03 +08:00
buddh0
a501442a89 Merge branch 'develop' into cancun_code_merge_v1.13.0_v1.13.11 2024-02-21 19:25:44 +08:00
buddho
9ec1223f4d
Cancun code merge v1.13.0 v1.13.11 fix ci (#29)
* remove i386 linux tests

* test: fix building of tests

* return empty logs instead of nil in receipts

* keep InitialBaseFee same with geth, so not break a ton of cases

* fix eth dir

* fix subdir of core

* fix subdir of eth

* fix cmd/geth dir

* fix ethtest by adding UpgradeStatusMsg when handshake

* fix ethclient_test.go

* fix ethclient/simulated

* fix internal

* fix graphql

* fix consensus

* fix accounts

* fix log

* fix p2p

* fix metrics

* fix tests dir

* fix golangci-lint

---------

Co-authored-by: Matus Kysel <matus.kysel@bnbchain.org>
2024-02-21 19:19:20 +08:00
colin
b9ca38b735
core/txpool: fix typo (#29036)
* fix typos

* address comments
2024-02-21 10:00:01 +02:00
buddho
bba3fa9af9
core,eth,internal: fix typo (#29024) 2024-02-20 19:42:48 +08:00
buddho
7f5e96dc6c
core/txpool: fix typo (#29031) 2024-02-20 12:08:56 +02:00