Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Introduce parlia to akula #8

Merged
merged 49 commits into from
Sep 19, 2022

Conversation

galaio
Copy link
Collaborator

@galaio galaio commented Sep 19, 2022

Introduce parlia consensus to support BSC network.

Scope:

Support block synchronization on both BSC testnet and mainnet. Details:

Parlia consensus integrated.
Few modifications around EVM.
Two precompiled smart contracts are integrated. (Tendermint Light Client and IAVL Merkel Prover)
Hard fork on BSC network.
Consensus adapt to Hard fork.

vorot93 and others added 30 commits August 4, 2022 12:30
vorot93 and others added 19 commits September 7, 2022 19:39
* add bsc.ron, same as goerli, which is a PoSA testnet

cp src/res/chainspec/goerli.ron src/res/chainspec/bsc.ron

* update bsc.ron, calculate system contract's codehash

* bsc genesis block is generated with correct blockhash

* add bsc forks: mirrorsync, bruno, euler

After this commit, block data of bsc network can be downloaded with:
  ./target/debug/akula --chain bsc --max-block 1000000 --datadir  ~/Library/akula_bsc

* remove some debug log
* precompiled contract integration with bsc client

Signed-off-by: cryyl <[email protected]>

* upgrade system contract

Signed-off-by: cryyl <[email protected]>

* update Cargo.lock

Signed-off-by: cryyl <[email protected]>

Signed-off-by: cryyl <[email protected]>
feat: impl bsc mainnet and testnet full sync.

details:
opt akula consensus Trait for parlia;
add parlia's system gas caculate;
add parlia's system tx and validators check;
add parlia's snapshot and SnapRW Trait;
add parlia's hardfork logic;
add parlia's genesis configs;
debug and fix bsc mainnet or testnet fullsync bugs;
adjust parlia struct;
remove useless declares;
fix review issues;
opt go_rng file;
@galaio galaio added the WIP tag work in progress for PR label Sep 19, 2022
@galaio galaio added R4R ready for review for PR and removed WIP tag work in progress for PR labels Sep 19, 2022
Copy link
Collaborator

@brilliant-lx brilliant-lx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brilliant-lx brilliant-lx merged commit 2f53236 into bnb-chain:develop_parlia Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
R4R ready for review for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.