Commit Graph

315 Commits

Author SHA1 Message Date
Roshan
0574452b4d upgrade: update testnet contracts bytecode and hardfork time for Feynman (#2237) 2024-02-26 16:08:50 +08:00
Roshan
a2ddb75b02 chore: update bls generate-proof cmd (#2215) 2024-02-16 16:19:30 +08:00
Roshan
fd0ee7d3e9 fix: adjust the timing of initializing Feynman system contracts (#2203)
* fix: adjust the timing of initializing Feynman system contracts

* fix test case
2024-02-04 17:53:34 +08:00
Roshan
d7e7f73718 chore: add initialize for TokenRecoverPortalContract (#2194) 2024-02-01 16:18:34 +08:00
Roshan
7f6c4cd7cd Merge remote-tracking branch 'BNB-chain/develop' into bc-fusion-roshan
# Conflicts:
#	cmd/geth/blsaccountcmd.go
#	miner/worker.go
2024-01-30 16:27:57 +08:00
buddho
29427c51fd consensus/parlia: set nonce before evm run (#2185) 2024-01-29 14:44:58 +08:00
Roshan
13f17f2970 fix: adjusted the timing of UpgradeBuildInSystemContract (#2166)
* fix: adjusted the timing of `UpgradeBuildInSystemContract`

* fix review comments

* fix review comments

* fix review comments

* fix review comments

* add `UpgradeBuildInSystemContract` to `traceBlock`

* add `UpgradeBuildInSystemContract` to `traceBlock`

* add `UpgradeBuildInSystemContract` to all trace functions
2024-01-22 12:15:05 +08:00
buddho
8ed5d24e1d tests: revive evm test cases (#2116) 2024-01-10 16:58:27 +08:00
Roshan
7466f0a075 Merge branch 'develop' into bc-fusion
# Conflicts:
#	core/systemcontracts/upgrade.go
#	params/config.go
2024-01-08 11:37:58 +08:00
Roshan
64a57a3e2a chore: update abi and bytecode (#2137) 2024-01-08 11:15:14 +08:00
buddho
de1a126ec5 parlia: fix verifyVoteAttestation when verify a batch of headers (#2121) 2024-01-03 15:58:06 +08:00
Roshan
432085ea62 fix: avoid update validators on Feynman block (#2102) 2023-12-25 11:20:50 +08:00
Roshan
167da21801 Merge branch 'develop' into merge
# Conflicts:
#	params/config.go
2023-12-21 16:14:09 +08:00
Roshan
6685f68995 chore: fix CI issues (#2085) 2023-12-19 09:46:15 +08:00
buddho
e44de3ab27 core: LoadChainConfig return the predefined config for built-in networks firstly (#2078)
* core: LoadChainConfig return predefined config for built-in net firstly

* cmd/geth: add a warn message for chain config in the configuration file

* consensus/parlia: change chain config log level when New parlia

* core: fix code style
2023-12-18 17:07:50 +08:00
Roshan
94b68156c8 chore: update logic of determining breathe block and returned data of verifyDoubleSignEvidence (#2056) 2023-12-12 17:24:43 +08:00
Roshan
ab8793ae9f fix: bug in determining breathe block (#2055) 2023-12-12 14:21:30 +08:00
Roshan
6744d7c15f chore: modify breath block interval for test (#2054) 2023-12-11 17:12:42 +08:00
Roshan
8f3c525adc chore: resolve merge conflicts and fix review comments 2023-12-08 16:20:30 +08:00
Roshan
030e41607e feat: add new fork block and precompile contract for BEP294 and BEP299 (#1874) 2023-11-30 19:36:54 +08:00
buddho
1edb34fd67 consensus/parlia: recover faster when snapshot of parlia is gone in disk (#2008) 2023-11-28 14:03:05 +08:00
buddho
789442372d consensus/parlia: increase size of snapshot cache in parlia (#2007) 2023-11-28 13:56:01 +08:00
buddh0
cd0356b106 core/systemcontracts: include BEP-319 on kepler hardfork 2023-11-22 19:09:34 +08:00
buddho
0224d48df4 core: enable Shanghai EIPs (#1970) 2023-11-20 19:19:26 +08:00
buddho
3fc9f750d1 consensus/parlia: hardfork block can be epoch block (#1964) 2023-11-14 16:33:57 +08:00
lx
01d75a9d21 dependency: go version to 1.20 and some dependencies in go.mod (#1939)
* go.mod: upgrade prysm and the indrect dependency
prysm from v4.0.2 to v4.0.8, and run go mod tidy

* ci: upgrade go version from 1.19 to 1.20
* go-version: upgrade from v1.19 to v1.20
there is some dependency on go v1.20, such as go-libp2p v0.27.8
and also run go mod tidy

* dependency: upgrade docker version for security
it is not a big issue, since docker is only used for test purpose.

* rand: update the usage of math/rand after golang v1.20

2 APIs of math/rand module were deprecated since golang v1.20.
that is: rand.Seed() and rand.Read(), refer: ettps://pkg.go.dev/math/rand

"rand.Seed(seed int64)" has been replaced by: "r := rand.New(rand.NewSource(seed int64))",
need to initialize it with an instance before use

"rand.Read()" has been replaced by "crypto/rand.Read()"

* readme: need golang v1.20+ to build bsc
2023-10-24 21:51:30 +08:00
Nathan
a6cfcfe2b3 consensus/parlia: fix nextForkHash in Extra filed of block header (#1923) 2023-10-17 19:09:11 +08:00
Nathan
52e2cb86a5 parlia: reject header with non-nil WithdrawalsHash(#1884)
* parlia: reject header with `WithdrawalsHash` before shanghai fork

* log: output chainconfig when start up

* eth: fix TestOptionMaxPeersPerIP failure of goroutine order
2023-09-21 12:02:59 +08:00
NathanBSC
0f622f3829 lint: fix all golang lint after big merge (#1861) 2023-09-08 16:36:16 +08:00
NathanBSC
6632d3bf99 Merge branch 'develop' into merge_develop_to_big_merge_v1.10.16_v1.12.2 2023-09-08 11:14:09 +08:00
NathanBSC
6af6162297 vote: check consensus key match vote key before voting (#1858) 2023-09-08 10:20:07 +08:00
NathanBSC
202ab70922 Big merge v1.10.16 v1.12.2 fix ci (#1850)
* fix: crash of highestVerifiedHeader

* fix: panic of blobpool

* fix: genesis set up

* 1. modify NewDatabaseWithNodeDB to upstream
2. fix race use of hasher in statedb
3. fix use wrong value when updateTrie

* fix dir legacypool

* fix dir blobpool

* fix dir vote

* remove diffsync related code

* fix core/state/snapshot

* disable pipeCommit for now

* fix applyTransaction for bloom setting

* CI: fast finality in gasprice test

* CI: diffFetcher was removed

* CI: downloader, remove beaconsync test

* CI: no beaconsync in downloader, remove a failed case

TestCheckpointChallenge was removed in:
https://github.com/ethereum/go-ethereum/pull/27147
since after merge, it is useless for ethereum, but might be useful for BSC.
disable the case right now, as it is not a big issue.

* CI: bsc protocol decHandlers

* CI: receipt Bloom process

* 1. skip CheckConfigForkOrder for non-parlia engine
2. all test cases in core work well now
	cd core && go test ./... -v

* fix test cases in trie dir

* CI: no beaconsync in downloader, remove a failed case(redo)

* fix dir miner

* fix dir cmd/geth

* CI: filter test, BaseFee & Finality

* fix dir graphql

* remove diffStore

* fix ethclient

* fix TestRPCGetTransactionReceipt

* fix dir internal

* ut add dir ethstats and signer

* disable pipeCommit thoroughly; fix concurrent map iteration and map write in statedb

* CI: fix snap sync

it could be changed by mistake

* fix tests/Run to generate snapshot

* prepare for merge

* remove useless

* use common hasher in getDeletedStateObject, no race here

* an critical comment for state.Prepare

* do not copy nil accessList

* add omitempty tag for unused new fields of core.Genesis

* remove totalFees

* calculate fees before FinalizeAndAssemble

* revert interface Finalize of consensus

* do not double gas limit upon london block

* use Leveldb as default

* Revert "remove diffStore"

This reverts commit df343b1374.

* Revert "remove diffsync related code"

This reverts commit 8d84b81fea.

* compile pass after revert

* remove diffsync

* fix dir eth/protocols/trust

* fix TestFastNode

* decHandlers for trust protocol

* keep persist diff in test
2023-09-07 16:39:29 +08:00
NathanBSC
2290201ff1 Merge branch 'develop' into big_merge_v1.10.16_v1.12.2 2023-08-23 19:37:39 +08:00
NathanBSC
872d22ed2d upstream: Merge tag 'v1.12.2' into develop 2023-08-23 17:46:08 +08:00
NathanBSC
9b95339c38 vote: remove DisableBscProtocol and add flag to skip votes assmebling (#1805) 2023-08-14 17:48:36 +08:00
Péter Szilágyi
811a674059 all: update golang/x/ext and fix slice sorting fallout (#27909)
The Go authors updated golang/x/ext to change the function signature of the slices sort method. 
It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just 
picked a new version that some other dep depends on, causing our code to fail building.

This PR updates the dep on our code too and does all the refactorings to follow upstream...
2023-08-12 00:19:12 +02:00
NathanBSC
54dbb2ba05 finality: add more check to ensure reuslt of assembleVoteAttestation (#1791) 2023-08-02 18:10:04 +08:00
NathanBSC
54b4e58382 rpc: add GetFinalizedHeader/Block to simplify using the fast finality (#1789) 2023-08-02 14:05:46 +08:00
Delweng
7c95ebd63d consensus/misc: move eip1559 into a package (#27828)
* consensus/misc: move eip1559 as a sub directory

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

* consensus/misc: package name

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

* all: eip1559

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-08-01 12:58:45 +03:00
Delweng
3ca92f70e5 all: replace data gas to blob gas in comments (#27825)
* eth: excessDataGas -> excessBlobGas

* consensus: data gas -> blob gas

* core: data gas -> blob gas

* params: data gas -> blob gas
2023-08-01 10:07:25 +03:00
Péter Szilágyi
57268f7e6c all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
Felix Lange
393d4db18c core/types: add 4844 data gas fields in Receipt (#27743)
* core/types: add data gas fields in Receipt

* core/types: use BlobGas method of tx

* core: fix test

* core/types: fix receipt tests, add data gas used field test

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2023-07-27 14:11:09 +03:00
NathanBSC
3fd5b0c149 fix: defend ddos voting attack with other mini fix according to audit (#1741) 2023-07-11 10:13:08 +08:00
NathanBSC
f455263950 metrics: add counter for voting status of whole network (#1720) 2023-06-20 10:58:13 +08:00
Dan Laine
a848212709 consensus/clique: use slices package for sorting (#27488)
Also adds Address.Less for sorting use in other packages.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-06-19 09:04:16 +02:00
Sanghee Choi
760fd0c79b consensus/clique: fix typo in comment (#27503) 2023-06-19 08:47:00 +02:00
NathanBSC
38002f8a56 fix: set the signer of parlia to the most permissive one (#1682) 2023-06-12 13:31:18 +08:00
Péter Szilágyi
c7c84ca16c all: remove the Rinkeby testnet (#27406) 2023-06-02 14:03:21 +03:00
Ng Wei Han
e802c737ab consensus, core/rawdb, miner: downgrade logs (#1662) 2023-05-31 22:01:28 +08:00
Péter Szilágyi
1f9b69b36d consensus, core, eth/downloader, params: 4844 chain validation (#27382) 2023-05-31 10:21:13 +03:00