Skip to content

Istanbul BFT Test Specification

Alan Chen edited this page Sep 15, 2017 · 10 revisions

Istanbul BFT Test Specification

Functional Testing

# of validators 4 7

Numbering System

Test cases are numbered with the format of TA-B-CC-DD where:

Symbol Description
T Numbering initial, defaults to T.
A Group. F: Functional tests. P: Performance tests.
B Attribute sub-group. U: Unit tests. S: Situational tests.
C Sequence.
D Sub-sequence.

General consensus tests

Number Item Description Expectation
TFS-01-01 Blockchain initialization Run geth init with proper gensis.json Should run without fails.
TFS-01-02 Run geth Run geth after geth init. Should run without fails.
TFS-01-03 Peer connection Run geth with static validators should be able to connect to peers admin.peers should return expected peers.
TFS-01-04 Consensus progress Validator network should be able to generate blocks Watch 10 blocks and each block should be created in 3 seconds.
TFS-01-05 Round robin proposer selection Validator network should pick proposers in round robin fashion Watch 12 blocks and make sure each validator generates at least 3 blocks in a 4 validator network.

Dynamic validators addition/removal testing

Number Item Description Expectation
TFS-02-01 Add validators Randomly add several validators Validator network should grow.
TFS-02-02 New validators consensus participation Add a new validator in validator network Watch few block and see if the newly added validator has been picked as proposer at least once.
TFS-02-03 Remove validators Randomly remove few validators Validator network should shrink.
TFS-02-04 Reduce validator network size below 2F+1 Reduce validator network size but keep it more than 2F+1. Blocks should still be created continuously.
TFS-02-05 Reduce validator network size below 2F+1 Reduce validator network size to less than 2F+1. Blocks should stop being created.

Recoverability testing

Number Item Description Expectation
TFS-03-01 Add validator to more than 2F+1 Add validators in a network with < 2F+1 validators to > 2F+1. Blocks should start being created.

Non-Byzantine faulty behavior testing

Number Item Description Expectation
TFS-04-01 Stop F validators In a 3F+1 network, stop F validators. Blocks should keep generating.

Byzantine faulty behavior testing

Number Item Description Expectation
TFS-05-01 F faulty validators In a 3F+1 network, setup F faulty validators and 2F+1 normal validators. Blocks should keep generating.
TFS-05-02 F+1 faulty validators In a 3F+1 network, setup F+1 faulty validators and 2F normal validators. Blocks should stop generating.

Block synchronization testing

Number Item Description Expectation
TFS-06-01 Node connection Run a 3F+1 validator network and start a new node The node should be able to connect to the validators.
TFS-06-02 Node synchronization Run a 3F+1 validator network, start a new node, and stop validator mining. The node and validators should have the same block height.

Gossip network testing

Number Item Description Expectation
TFS-07-01 Consensus on gossip network Run a weakly connected 3F+1 validator network, each validator connects to only one other validator. Block should keep generating.

Send a large number of transactions

# of validators 4 7 10
Block gas limit 21000*1000 21000*2000 21000*3000
TxPool size 2048 8192 10240
Testing time (seconds) 150 300 600
Number Item Description Expectation
TPS-01-XX Load testing All possible permutations of entries in above table Watch 50 blocks and measure if all transactions are included.

Notes:

1. Create a new blockchain with 3f+1 validators.
2. Send transactions (Use `eth_sendTransaction`).
3. See if the block creation works.

Performance Testing

# of validators 4 7
Block gas limit 21000*1000 21000*2000 21000*3000