Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast Finality #19

Draft
wants to merge 199 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
c0c6396
fix pruner block tool bug, add some check logic
joeylichang Mar 25, 2022
91d7cd5
[R4R]Prefetch state data on mining process (#803)
qinglin89 Mar 28, 2022
58f3b2c
fix code of difflayer not assgin before return (#808)
unclezoro Mar 28, 2022
5f1aabe
fix race condition on preimage (#797)
unclezoro Mar 28, 2022
4ff9697
[R4R]add sharedStorage for prefetching to L1 (#792)
flywukong Mar 28, 2022
d894987
[R4R] state verification pipeline (#795)
forcodedancing Mar 28, 2022
cde35b0
add sharedStorage to the prefetcher of miner (#818)
flywukong Mar 29, 2022
4598334
disable diffsync when pipecommit is enabled (#820)
unclezoro Mar 30, 2022
c57b02c
change prefetch thread num (#830)
flywukong Apr 1, 2022
f5a1c07
fix deadlock when failed to verify state root (#834)
unclezoro Apr 2, 2022
05925da
fix deadlock on miner module when failed to commit trie (#835)
unclezoro Apr 2, 2022
1ff4721
fix:replace fake transaction with first peek for txCurr
qinglin89 Apr 6, 2022
12c5eb0
[R4R]Fix mining-prefetcher panic for empty transaction initial of txC…
qinglin89 Apr 6, 2022
343b315
put error check to the correct location (#842)
forcodedancing Apr 6, 2022
1aeadc1
[R4R] prepare for release of v1.1.9 (#849)
forcodedancing Apr 8, 2022
74ecbf2
Merge pull request #850 from bnb-chain/develop
unclezoro Apr 8, 2022
15bc254
fix logic issue: handlers.removePeer() is called twice. (#856)
Jolly23 Apr 24, 2022
0f5a4c8
[R4R]fix:Shift panic for zero length of heads (#870)
qinglin89 Apr 25, 2022
717b38c
[R4R] fix:defer bloomprocessor close (#860)
qinglin89 Apr 28, 2022
5b5abc4
[R4R] fix validator pipecommit issue (#877)
forcodedancing Apr 29, 2022
4feb52e
[R4R]: add Euler Hardfork, including BEP-127 and BEP-131 (#885)
gothery001 Apr 29, 2022
b679ba8
prepare for release v1.1.10 (#889)
unclezoro May 5, 2022
55ef216
relace binance to bnb in changelog
unclezoro May 5, 2022
2f2b98a
Merge pull request #888 from bnb-chain/develop
unclezoro May 5, 2022
878e602
[WIP]p2p protocol implement of fast finality
pythonberg1997 Feb 25, 2022
678ad21
vote broadcast
pythonberg1997 Feb 28, 2022
eeb6afb
vote broadcast
pythonberg1997 Feb 28, 2022
af3bed7
Fix review comments
pythonberg1997 Mar 1, 2022
f201365
Update vote broadcast routine
pythonberg1997 Mar 2, 2022
2dd4067
Update vote broadcast routine
pythonberg1997 Mar 3, 2022
8621182
Update vote broadcast routine
pythonberg1997 Mar 3, 2022
cbfad2b
Fix issue related votes broadcast
pythonberg1997 Mar 8, 2022
ed36f05
[R4R]Fast Finality: add bls account commands (#9)
NashBC Mar 8, 2022
a512633
add vote attestation to header (#10)
NashBC Mar 8, 2022
67b0aa8
[WIP]Fast Finality: reward distribution
pythonberg1997 Mar 1, 2022
a84f410
Some updates
pythonberg1997 Mar 2, 2022
43afdec
Some updates
pythonberg1997 Mar 3, 2022
c2fb5e2
Some updates
pythonberg1997 Mar 3, 2022
501070a
Correct data length of signature in precompiled contract
pythonberg1997 Mar 8, 2022
2d758ff
Implement finality reward distribution
pythonberg1997 Mar 9, 2022
d7238be
Minor errors fixed
pythonberg1997 Mar 14, 2022
3cee9cc
Minor errors fixed
pythonberg1997 Mar 14, 2022
4ecd1c9
Handle nil header issue
pythonberg1997 Mar 15, 2022
07a17fb
Handle nil header issue
pythonberg1997 Mar 15, 2022
304a3f9
Fix comment issues
pythonberg1997 Mar 15, 2022
f2a82e2
journal
calmbeing Feb 20, 2022
1094e27
vote manager
calmbeing Feb 22, 2022
24df294
update
calmbeing Feb 24, 2022
da0dfbf
Addressed comments from walt
calmbeing Mar 1, 2022
709b359
update
calmbeing Mar 3, 2022
d955dc0
addressed comments
calmbeing Mar 9, 2022
1e7f2f4
update
calmbeing Mar 10, 2022
142d450
add unit test
calmbeing Mar 14, 2022
015099e
resolved all comments
calmbeing Mar 15, 2022
1086892
fix compile error
unclezoro Mar 16, 2022
f1507cb
[R4R] Prepare for integration phase1 (#14)
realuncle Mar 17, 2022
3191b13
integrate vote pool related components into eth backend (#13)
calmbeing Mar 17, 2022
2e99878
Minor issues fixed
pythonberg1997 Mar 17, 2022
5293f37
Minor issues fixed
pythonberg1997 Mar 17, 2022
35ccef9
revert trimspace password
Mar 18, 2022
58bba9f
fix validator map issue
Mar 18, 2022
3a7a440
Update for integration
pythonberg1997 Mar 18, 2022
949f1f1
Update for integration
pythonberg1997 Mar 18, 2022
70d0335
add some logs for vote parts
Mar 21, 2022
3ff4d02
Change votesCh to voteCh and fix some typos
pythonberg1997 Mar 21, 2022
649405d
update the signal of startVote variable
Mar 21, 2022
183e1ef
Fix validator set verification errors
pythonberg1997 Mar 22, 2022
89bb539
update event type
Mar 22, 2022
60ddd42
Fix validator set verification errors
pythonberg1997 Mar 22, 2022
a09f8a0
Fix looking for peers error
pythonberg1997 Mar 22, 2022
debc674
Fix looking for peers error
pythonberg1997 Mar 22, 2022
0b95a9f
add prometheus metrics for vote pool
Mar 24, 2022
cb692b4
Fix voteMsg issue
pythonberg1997 Mar 24, 2022
1015871
fix the bug of bls verify peers' vote
Mar 24, 2022
4a26de4
fix the diff between voteHash and voteDataHash
Mar 24, 2022
27530b9
update logs
Mar 24, 2022
b897917
Fix head extra's length issue
pythonberg1997 Mar 25, 2022
1111183
Fix finality reward issue
pythonberg1997 Mar 25, 2022
cca3bb0
Fix finality reward issue
pythonberg1997 Mar 25, 2022
30d8d68
fix the issue of transfer futureVotes
Mar 26, 2022
8a531d3
update blsPassWordDirFlag to fileFlag
Mar 28, 2022
a6349f5
update prometheus metrics of vote pool
Mar 28, 2022
3b5e80b
add prometheus metrics for vote manager
calmbeing Mar 28, 2022
fec3cde
add prometheus metrics for vote journal and vote signer
calmbeing Mar 28, 2022
88cb5e2
fix parentHash bug
calmbeing Mar 29, 2022
80946cb
Fix validator out of index issue
pythonberg1997 Mar 30, 2022
c94d029
Update ETH68 UTs and finality reward code
pythonberg1997 Mar 31, 2022
cc50efc
change vote data struct
NashBC Mar 31, 2022
fc16513
[R4R]Update reward and slash parts for new fast finality mechanism (#21)
pythonberg1997 Apr 7, 2022
95d42e1
update vote parts based on new finality mechanism
calmbeing Apr 1, 2022
506f212
update
calmbeing Apr 2, 2022
0408079
fix comments
calmbeing Apr 6, 2022
7d95364
fix comments
calmbeing Apr 6, 2022
33b9797
update and add more unit tests
calmbeing Apr 7, 2022
ed90c8c
[R4R]Fast Finality: consensus part (#11)
NashBC Apr 8, 2022
bfa0614
changed log format
calmbeing Apr 8, 2022
6e137f6
fix panic (#24)
NashBC Apr 8, 2022
e1d77cf
Fix for loop issue of GetHighestFinalizedNumber
pythonberg1997 Apr 11, 2022
86ec0c5
move assemble attestation to finalize phase (#25)
NashBC Apr 12, 2022
44018e0
fix assemble vote attestation (#26)
NashBC Apr 12, 2022
00121e8
fix seal hash mismatch (#27)
NashBC Apr 12, 2022
59c5e48
remove TODO used for integration test before
calmbeing Apr 12, 2022
c8cce04
update logs
calmbeing Apr 13, 2022
bb596c1
fix transfer future votes logic
calmbeing Apr 13, 2022
5998963
update
calmbeing Apr 14, 2022
9900ab5
misc fix
NashBC Apr 21, 2022
48728e6
go.mod: upgrade to github.com/holiman/uint256 v1.2.0 (#22745)
holiman May 10, 2021
57d83e2
eth/protocols/snap: adapt to uint256 API changes (#22851)
fjl May 10, 2021
875e1ff
Add the check of whether nil votePool in handler
calmbeing Apr 21, 2022
b18da4e
fix panic
NashBC Apr 21, 2022
3444660
fix tests
NashBC Apr 21, 2022
06dac9b
Update UT of vote_pool (#5)
calmbeing Apr 24, 2022
cfa5d59
add parlia simulator
NashBC Apr 7, 2022
17edb19
comment console tests
NashBC Apr 24, 2022
ff0622b
Update contracts' ABI
pythonberg1997 Apr 25, 2022
87b77b5
Resolved comments
calmbeing Apr 26, 2022
cd5492d
Update for LynnFork (#7)
pythonberg1997 Apr 26, 2022
cb0b827
Fix first round final review PR comments
pythonberg1997 Apr 26, 2022
8718c7b
Fix wrong order of `distributeIncoming` and `distributeFinalityReward…
pythonberg1997 Apr 26, 2022
6309bbb
Remove rlphash
pythonberg1997 Apr 26, 2022
77e3e0e
resolved comments
calmbeing Apr 26, 2022
61a2813
fix comments (#11)
NashBC Apr 27, 2022
905fb8d
fix verify seal
NashBC Apr 29, 2022
308bb0b
Add subscribe new vote api
pythonberg1997 May 5, 2022
b27e424
Change vote hashes to votes
pythonberg1997 May 5, 2022
2941c87
Update system contracts' bytecode
pythonberg1997 May 6, 2022
1d497d3
Update test codes to pass CI jobs
pythonberg1997 May 6, 2022
cf58f83
Update test codes to pass CI jobs
pythonberg1997 May 6, 2022
4080a1f
export get highest justified or finalized block
NashBC May 5, 2022
b235667
add justified and finalized gauge
NashBC May 6, 2022
8ba2ab0
Fix error of applySystemContractUpgrade
pythonberg1997 May 7, 2022
9da3eae
Update genesis hash
pythonberg1997 May 7, 2022
4d08be1
fix sign recently
NashBC May 7, 2022
1519e91
fix abi unpack
NashBC May 9, 2022
7fccc24
update genesis hash
NashBC May 9, 2022
d75fbd5
Update Slash contract's abi
pythonberg1997 May 12, 2022
c538017
Update reward distribution logic
pythonberg1997 May 12, 2022
6cdaa92
Fix vote subscribe related issues
pythonberg1997 May 10, 2022
9c65be6
First round final review comments fixed
pythonberg1997 May 13, 2022
a43518c
Resolve final review comments
calmbeing May 13, 2022
282b0b3
Resolved comments from nash
calmbeing May 13, 2022
17326a1
minor update
calmbeing May 13, 2022
a61a40a
fix get finalized block in loop
NashBC May 13, 2022
8505054
fix comments
NashBC May 13, 2022
023fc17
Update genesis hash
calmbeing May 16, 2022
b462313
First round final review comments fixed
pythonberg1997 May 16, 2022
b61ea3e
Resolved comments
calmbeing May 16, 2022
b479494
Update
calmbeing May 16, 2022
582e609
Update
calmbeing May 17, 2022
c029c7f
Update to use lru for voteData buffer
calmbeing May 17, 2022
18d8adb
Add subscribe finalized header API
pythonberg1997 May 17, 2022
daafa45
Fix nil pointer issue
pythonberg1997 May 17, 2022
8c7551a
Minor update
calmbeing May 17, 2022
eeb0838
Deleted unnecessary func
calmbeing May 18, 2022
82e6d2a
Fix wrong type event issue
pythonberg1997 May 18, 2022
b7cb370
Update error returns
calmbeing May 18, 2022
271269c
Update
calmbeing May 18, 2022
6a17f37
Fix abi unmarshal failed issue
pythonberg1997 May 18, 2022
1156b85
Update logic to check nil interface
calmbeing May 18, 2022
45a8abe
Update handler
calmbeing May 19, 2022
e6d0ca6
Typo fixed
calmbeing May 19, 2022
4410a49
update
calmbeing May 19, 2022
20cc49f
update
calmbeing May 19, 2022
01c5702
Update BSCValidatorSet contract's abi
pythonberg1997 May 19, 2022
249c737
Fix rebase error
calmbeing May 20, 2022
bf7c07e
Update system contracts upgrade
pythonberg1997 May 20, 2022
cdeca70
Minor update after rebase on newest develop branch
calmbeing May 20, 2022
bf6b7f2
fix get justified header
NashBC May 18, 2022
5ae6d15
fix get finalized header
NashBC May 18, 2022
0e2c168
fix comments
NashBC May 20, 2022
e5abbed
Update system contracts' code
pythonberg1997 May 20, 2022
66459e5
fix the backoff time after boneh fork
NashBC May 26, 2022
b01ae3b
fix backoff time
NashBC May 27, 2022
01ec078
no initial delay for the first candidate validator
NashBC May 27, 2022
0d5c4c0
fixed faucet native token name
dmitry123 May 28, 2022
b0ca4dc
Merge pull request #17 from Ankr-network/BAS-00-faucet-fixes
hedwig0x May 28, 2022
8017af4
added logs to the genesis account
dmitry123 May 28, 2022
7c4cb16
bring support of storing logs inside genesis block
dmitry123 May 30, 2022
5cf6a8e
fully working and eip-1967 compatible upgrade model w/o evm hooks
dmitry123 May 31, 2022
64e8ad1
fixed crashing app if staking contract reverts w/o error
dmitry123 Jun 1, 2022
9fde6d1
Revert "bring support of storing logs inside genesis block"
dmitry123 Jun 1, 2022
155eab6
Revert "added logs to the genesis account"
dmitry123 Jun 1, 2022
5526c9f
removed commented code
dmitry123 Jun 1, 2022
6b7b3de
added new genesis submodule, allowed to use unsafe RPC mode with 1337…
dmitry123 Jun 5, 2022
5ff2f1f
Add more debug logs for voteManager
calmbeing Jun 6, 2022
25425b5
implemented native function for parlia block verification (~8 times c…
dmitry123 Jun 6, 2022
f095123
Merge branch 'audit-fixes' into bas-relay-hub
dmitry123 Jun 6, 2022
103ee06
added config for enabling BAS precompiles
dmitry123 Jun 6, 2022
bd5e869
Fix startVote logic in voteManager
calmbeing Jun 8, 2022
c4d66b2
update
calmbeing Jun 8, 2022
dceab93
Merge pull request #32 from calmbeing/vote_part
calmbeing Jun 8, 2022
8ddd01a
optimized parlia block verifier precompile
dmitry123 Jun 8, 2022
5ea41fd
Update precompile contracts set
pythonberg1997 Jun 9, 2022
c542b5c
Update system contracts' code
pythonberg1997 Jun 17, 2022
6326efb
implemented block rewards for parlia consensus engine
dmitry123 Jun 21, 2022
087a84f
changed blockdump script
dmitry123 Jun 21, 2022
c6268eb
changed format for blockproof static call
dmitry123 Jul 11, 2022
47d9b0e
Merge remote-tracking branch 'nr/fast_finality' into fast-finality
dmitry123 Jul 11, 2022
6e23d38
fixed bug with distributing finality rewards
dmitry123 Jul 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[R4R] fix:defer bloomprocessor close (#860)
* fix:defer bloomprocessor close

* fix: fix deadlock in Close

* perf:rm defer bloomprocessors Close and manual close before return
qinglin89 authored Apr 28, 2022
commit 717b38c5f53b623054280c528b55ad7db711ba5a
3 changes: 3 additions & 0 deletions core/state_processor.go
Original file line number Diff line number Diff line change
@@ -410,6 +410,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
for i, tx := range block.Transactions() {
if isPoSA {
if isSystemTx, err := posa.IsSystemTransaction(tx, block.Header()); err != nil {
bloomProcessors.Close()
return statedb, nil, nil, 0, err
} else if isSystemTx {
systemTxs = append(systemTxs, tx)
@@ -419,11 +420,13 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg

msg, err := tx.AsMessage(signer)
if err != nil {
bloomProcessors.Close()
return statedb, nil, nil, 0, err
}
statedb.Prepare(tx.Hash(), block.Hash(), i)
receipt, err := applyTransaction(msg, p.config, p.bc, nil, gp, statedb, header, tx, usedGas, vmenv, bloomProcessors)
if err != nil {
bloomProcessors.Close()
return statedb, nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
}