Commit Graph

97 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
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
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
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
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
NathanBSC
38002f8a56 fix: set the signer of parlia to the most permissive one (#1682) 2023-06-12 13:31:18 +08:00
Ng Wei Han
e802c737ab consensus, core/rawdb, miner: downgrade logs (#1662) 2023-05-31 22:01:28 +08:00
NathanBSC
3d8753cae6 fix: remove naturally finality 2023-05-30 09:51:31 +08:00
Mister-EA
1036dc70be core: port several London EIPs on BSC(#1422)
Here is the list:
 a.BEP-227: Implement EIP-3198: BASEFEE opcode
 b.BEP-226: Implement EIP-1559 with base fee of 0
 c.BEP-228: Implement EIP-3541: Prevent deploying contracts starting with 0xEF
 d.BEP-212: Implement EIP-3529: Reduction in Refunds
2023-05-25 17:34:04 +08:00
NathanBSC
1b8ec07b2e fix: log info when failed to verifyVoteAttestation 2023-05-11 16:49:30 +08:00
minh-bq
4e2168566b fix: recently signed check when slashing unavailable validator (#1547)
The first validator in snap.Recents is shifted out and allowed to seal the block
already. However, when determining if we should slash the validator in Finalize
and FinalizeAndAssemble, we mark that first validator as unable to seal block
and don't slash this validator. This commit fixes that bug and creates a
separate helper function to check if the validator recently signed a block for
consistency in all places the check happens.
2023-05-08 21:15:14 +08:00
NathanBSC
5f690d32eb metrics: add a counter for validator to check work status of voting (#1583) 2023-05-06 20:47:31 +08:00
NathanBSC
daae7718a8 fix: support golang 1.20 by upgrading prysm to v4 (#1576) 2023-05-06 09:56:10 +08:00
NathanBSC
5b75f597b4 fix: remove dynamic metric labels about fast finality (#1572) 2023-05-05 14:15:43 +08:00
dylanhuang
779f4a80ee fix: lint error and docs (#1520)
* ci: upgrade golangci-lint
* build: move blst env to build stage
* chore: fix lint error
* docs: update readme
2023-04-25 09:11:29 +08:00
lx
b6274dd2df Merge branch 'master' into develop 2023-04-24 20:13:54 +08:00
NathanBSC
265dca1a20 fix: simplify update of attestation (#1514)
* fix: simplify update of attestation

* metrics: trace verifyVoteAttestationFailed and updateAttestationFailed
2023-04-24 14:47:17 +08:00
lx
0146b070cb upgrade: rename hardfork to Luban & Plato (#1505) 2023-04-21 18:11:32 +08:00