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

Feature/bos dpos pbft #6

Closed
wants to merge 118 commits into from

Conversation

Vardhamana
Copy link

@Vardhamana Vardhamana commented Dec 4, 2018

Change Description
reduce the gap between HEAD and LIB

Consensus Changes

change to PBFT

API Changes

Documentation Additions

Design Document (中文)

Design Document (English)

Test and Deployment

Thaipanda
Thaipanda previously approved these changes Dec 4, 2018
Thaipanda pushed a commit that referenced this pull request Dec 6, 2018
qianxiaofeng and others added 25 commits January 4, 2019 17:37
…ad falls on the fork that the majority is prepared or that I used to prepare
* dpos pbft

* bug fix: ignore empty certificate on view change validation

* bug fix: force switch to new schedule when there is new schedule in pending; remove unnecessary logs.

* open view change related logs.

* separate checkpoint db from pbft state

* update certificate validations.

* add logs for large scale debug.

* bug fix: generate prepare (commit) certificates with valid prepare (commits) msgs

* turn on view change related logs for testing.

* extend waiting time on BP schedule change.

* separate checkpoint db from state db; remove dpos confirm related logic.

* move checkpoints dir into blocks dir; open more logs for debug.

* no longer persist target view (default value will be current view +1); open more logs for debug.

* bug fix: avoid fetching empty block state.

* open prepare-adding related logs

* bug fix: inappropriate comparision may lead to crash during sorting.

* force activate schedule once gpo is set.

* remove unnecessary logs.

* force all bps, who belong to any schedule in fork db blocks, sending pbft related msgs. bug fix: cannot load empty pbft index upon restart.

* bp candidates are involved in pbft consensus.

* bug fix: proposed new view should be strictly equal to view changed cert.

* open new_view related logs.

* force new view check, even if I am the primary.

* bug fix: calculate primary key

* extend view change timeout to 8 sec.

* skip view change validation for test.

* skip new view validation for test.

* add prepare validation

* update prepared(committed) cert validation, add uuid info for view change msg.

* open view change validation related log.

* increase prepare (commit) timeout to 2s.

* remove unnecessary logs; optimise msg validation.

* remove unnecessary validations

* remove uuid from pbft msgs; only publish new msgs into chain plugin.

* reformat end itr validation.

* include chain_id into pbft msgs; extend msg cache ttl to very long.

* include chain_id into pbft msgs; extend msg cache ttl to very long.

* skip all signature validation for test.

* change to fetch from forkdb

* fix crash bug

* optimise certificate validation

* add uuid into pbft msgs

* replace committed cert with stable checkpoint; use stable checkpoints to skip view change state; not send any pbft msgs when syncing and replaying.

* send view change immediately on transition to veiw change state (do not wait for timer)

* increase view change waiting time.

* bug fix: fetch stable checkpoint block id.

* remove sig validation for profiling

* bug fix: accept prepare(commit) msgs from bp candidates; enqueue msg only when connection is active;

* skip cert check on view change msgs

* no pbft msgs if all connections are syncing

* add current view into view change msg.

* skip sig check for profiling; add timestamp & current view in view change msg

* force resend checkpoints; send msgs only to active connections

* optimise debug log.

* add constructor (destructor) log for pbft ctrl;

* add timestamp to all pbft msgs; skip all msgs that are generated before 10s ago; open sig check;

* add connection monitor log

* add more connection monitor info

* add view assertion

* remove debug logs; optimise some implementation.

* prevent bp set lib via checkpoints; force send prepare (commit) msg after transit to new state;

* enable net plugin queue log and restrict out queue size to 10

* dont send pbft untili  handshake finished

* use pbft_queue to send pbft message

* bug fix: treat an isolated node as synced one.

* add log

* revert Dockerfile

* fix network issue by adding pbft queue and timeout

* separate outqueue limit for write queue and pbft queue

* add debug log in handle pbft msg.

* check write queue size for safty

* add log

* update log

* disable 'syncing' & 'current' check; add set_view api in producer api plugin to enable manually view set (after set, node will transit to view change state immediately).

* remove write queue size limit, add log for local_txns

* clear outqueue when close conn

* resolve conflict

* do not bcast pbft msgs if I am not in sync; only bcast (forward) to current connections; force send checkpoints upon committed local; clean view change cache upon new state; bug fix: cal pending stable checkpoint via block info (instead of num)

* add timeout when conn is doing connecting

* clean up do_queue_write

* increase checkpoint interval to 100; increase block production sleep time to 100ms.

* skip switch fork if is pbft prepared, to ensure invariance

* add pbft test

* add pbft_supported into block_state, ensure prepared fork is current chain.

* bug fix: set prepared block as pbft_supported

* bug fix: set my prepare block as supported fork.

* correct conditions for prepare reserve; fix typo

* add prepared and my prepare priority to fork_db, to ensure fork_db head falls on the fork that the majority is prepared or that I used to prepare

* add log

* bug fix: add all prepared cert info pbft db, to ensure consistency

* clear pbft state during transit to new view

* prevent sending and receiving pbft msgs during syncing; reformat logs;

* switch connection stats monitor to debug level

* correct my prepare mark; remove unnecessary methods; change log level to debug in net plugin
@qianxiaofeng qianxiaofeng force-pushed the feature/bos-dpos-pbft branch 2 times, most recently from 09087c5 to db7466b Compare January 12, 2019 04:14
@Vardhamana Vardhamana closed this Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants