Commit Graph

52 Commits

Author SHA1 Message Date
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
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
0222ce7479
upgrade: rename hardfork to Luban & Plato (#1504) 2023-04-21 17:07:11 +08:00
realuncle
f7d15e34df
BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
Leon
af7f0dd30b
consnesus/parlia: abort sealing when block in the same height has upd… (#1382) 2023-03-29 17:36:24 +08:00
Larry
75529530a2
fix: snapshot generation issue after chain reinit from a freezer (#1381) 2023-03-29 16:51:48 +08:00
buddh0
9ffd7e139e clean: reduce useless logs 2023-03-23 11:09:53 +08:00
larry.lx
6526a601cb Revert "parlia: consensus changes according to BEP of Early Broadcast (#1268)"
This reverts commit f5cb1378da878146a6b3402e7ce9f53783e4f977.
2023-03-14 17:31:21 +08:00
larry.lx
540adff8be Revert "parlia: miner changes for BEP-188 of Early Broadcast (#1269)"
This reverts commit c8a1535c74152c8e91eca2d4dfeb914ffb02ba18.
2023-03-14 17:22:49 +08:00
Leon
c1fde0e86c
consensus: fix delete the 1st validator from snapshot.recents list (#1344)
* consensus: fix delete the 1st validator from snapshot.recents list

* consensus:fix uint sub error with negative
2023-03-13 11:10:16 +08:00
Larry
a476e315f2
rename: change the next upgrade name to Planck (#1339) 2023-03-07 09:59:03 +08:00
Larry
85d1237c33
refactor: code of func backOffTime() (#1329)
* consensus: refactor the code in func backOffTime()

* update: more efficient code

* fix: a slice bug
2023-03-03 17:02:44 +08:00
kyrie-yl
c8a1535c74
parlia: miner changes for BEP-188 of Early Broadcast (#1269) 2023-03-01 16:57:42 +08:00
Leon
2a76eb498d
consensus: fix slash bug when validator set changing (#1162) 2023-03-01 16:47:38 +08:00
kyrie-yl
f5cb1378da
parlia: consensus changes according to BEP of Early Broadcast (#1268) 2023-02-28 19:53:17 +08:00
Eric
7674814036
parlia : add a check for the length of extraData. (#1294)
* parlia : add a check for the length of extraData.
2023-02-02 19:48:47 +08:00
dylanhuang
bf68be2bd9
dep: bump the version of several important library (#1274)
* dep: upgrade secp256k1 to use btcec/v2 v2.3.2 and update insecurity pkg

* build ci: upgrade go to 1.19 and golangci-lint to 1.50.1

* docs: fix format that does not follow the goimports

* dep: redirect github.com/bnb-chain/tendermint to v0.31.13

* ci: disable GOPROXY
2023-02-02 19:36:37 +08:00
setunapo
21b985c14b worker: always drop on new block imported.
When new block is imported, there is no need to commit the current
work, even the new imported block is offturn and itself is inturn.

That is because when offturn block is received, the inturn block is
already later to broadcast block, deliver the later block will cause
many reorg, which is not reasonable.

And also make sure all useless work can be discarded, to avoid goroutine leak.
2022-11-21 17:28:23 +08:00
setunapo
de5dd95ada worker: enhancement of the current block generation logic.
Currently, validator only try once to get transactions from TxPool to produce the block.
However, new transactions could arrive while the validator is committing transaction.
Validator should be allowed to add these new arrived transactions as long as
Header.Timestamp is not reached

This commit will:
** commitTransactions return with error code
** drop current mining block on new block imported
** try fillTransactions several times for the best
   not use append mode to follow the GasPrice rule.
** check if there is enough time for another fillTransactions.
2022-11-21 17:28:23 +08:00
setunapo
fe1c8622f6 parlia: Delay() with DelayLeftOver
Right now, DelayLeftOver is used to reserve time for block finalize, not block
broadcast. And the code does not work as expected.

The general block generation could be described as:
|- fillTransactions -|- finalize a block -|- wait until the period(3s) reached -|- broadcast -|
2022-11-16 10:47:58 +08:00
Jolly Zhao
c46671df97 parlia: the newChainHead mights not be imported to Pralia.Snapshot ASAP 2022-10-28 11:42:06 +08:00
dylanhuang
c3e3b1128d
consensus: fix the GasLimitBoundDivisor (#1060) 2022-08-22 11:24:50 +08:00
j75689
79bd42836c fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
yutianwu
3ddedad500 fix comments 2021-05-07 14:31:06 +08:00
yutianwu
cc8efd1ea3 revert changes 2021-04-16 14:05:41 +08:00
yutianwu
061cd5030c upgrade to 1.10.2 2021-04-16 12:45:26 +08:00
zjubfd
7a1262ca14
validator only write database state when enough distance (#116) 2021-03-19 13:42:26 +08:00
zjubfd
f8faf7faaa
[R4R]apply max commit tx time for miner worker (#112)
* apply max commit tx time for miner worker

* update to 200 ms
2021-03-19 13:23:44 +08:00
zjubfd
e55e9cdd76
change the fork waring to debug to avoid confusion (#73) 2021-02-09 11:49:53 +08:00
fudongbai
60606d3919 support fork id in header; elegant upgrade 2021-01-11 13:54:35 +08:00
Hyunsik Lee
cb1afd2b14
Hide some smart contract tracing logs from parlia consensus engine 2020-09-30 02:43:10 +09:00
Hyunsik Lee
7bd1c1f23d
Disable noisy log from consensus engine 2020-09-30 02:43:09 +09:00
fudongbai
c399c88e08 fix not return error when blockTimeVerifyForRamanujanFork failed 2020-08-11 15:13:10 +08:00
fudongbai
4f431e0843 fix index out of range 2020-08-10 11:27:36 +08:00
HaoyangLiu
650d066757 resolve comment 2020-08-07 17:16:39 +08:00
zjubfd
a8c9e53eb0
enforce backoff time for out-turn validator (#23) 2020-08-07 17:06:29 +08:00
HaoyangLiu
8124e60e9d resolve best practice advice 2020-08-04 13:56:13 +08:00
zjubfd
f4816ee8b7
add chain id into sign bytes to avoid replay attack (#18) 2020-07-09 15:46:37 +08:00
zjubfd
6f46fc0589
allow slash failed (#15) 2020-06-30 20:22:57 +08:00
fudongbai
ef1e8746d6 add cross chain contract to system contract 2020-06-30 08:38:15 +00:00
fudongbai
6a19c9803c
remove redundant gaslimit check 2020-06-24 16:17:22 +08:00
fudongbai
4bd4469151
add gas limit check in parlia implement 2020-06-18 00:26:27 +08:00
zjubfd
e83397e26a
Merge pull request #4 from binance-chain/issue3
[R4R]fix validator failed to sync a block produced by itself,  resolve #3
2020-06-15 17:16:35 +08:00
fudongbai
ed9b28fe7b
fix validator failed to sync a block produced by itself 2020-06-02 16:41:48 +08:00
fudongbai
4909842097
add gov init transaction 2020-05-22 10:38:14 +08:00