The main specification is in Bootstrap_pipeline.tla
- all messages are for the same
chain_id
- all headers are for the same
proto_level
- no
timestamp
s - only three message types:
Get_current_branch
/Current_branch
Get_block_headers
/Block_header
Get_operations
/Operation
- i.e. no
Current_head
or mempool
- bootstrapping nodes have the ability to request a specific history sample, by levels
- bootstrapping nodes only communicate with established nodes
- node's are blacklisted when we timeout while communicating with them
- lengths of all chains are bounded by
MAX_LEVEL
- number of operations per block is bounded by
MAX_OPS
block = {
header : Headers,
ops : Seq(Operations)
}
header = {
level : Levels,
predecessor : BlockHashes,
context : Hashes,
fitness : 0..Max_fitness,
ops_hash : Hashes
}
ops = {
block_hash : BlockHashes,
op : 0..MAX_OPS
}
BAD_NODES
- byzantine nodesGOOD_NODES
- nodes who follow the protocolBAD_BOOTSTRAPPING
- byzantine bootstrapping nodesGOOD_BOOTSTRAPPING
- bootstrapping nodes who follow the protocolMIN_PEERS
- minimum number of peersMAX_PEERS
- maximum number of peersMAX_LEVEL
- maximum level of a blockMAX_OPS
- maximum number of operations per blockCURRENT_HEAD
- each good node's current headBLOCKS
- each good node's blocksVALIDATOR
- Blocks -> { "known_valid", "known_invalid", "unknown" }SAMPLES
- GOOD_NODES * Bootstrapping_nodes -> Seq_n(Levels)HASH_BLOCK_MAP
- BlockHashes -> Headers
b_blacklist
- each good bootstrapping node's set of blacklisted peersb_messages
- each good bootstrapping node's set of messagesn_blacklist
- each good node's set of blacklisted peersn_messages
- each good node's set of messages
sent_get_branch
- each good bootstrapping node's set of peers to whom they have sent a Get_current_branch messagesent_get_headers
- each good bootstrapping node's function from peers to whom they have sent a Get_block_headers message to the requested headerssent_get_ops
- each good bootstrapping node's function from peers to whom they have sent a Get_operations message to the requested operationsrecv_branch
- each good bootstrapping node's set of peers from whom they have received a Current_branch messagerecv_header
- each good bootstrapping node's function from peers from whom they have received a Block_header message to set of headers receivedrecv_ops
- each good bootstrapping node's function from peers from whom they have received a Operation message to set of operations received
sent_branch
- each good node's set of peers to whom they have sent a Current_branch messagesent_headers
- each good node's function from peers to whom they have sent a Block_header message to the set of headers sentsent_ops
- each good node's function from peers to whom they have sent a Operation message to the set of operations sentrecv_get_branch
- each good node's set of peers from whom they have received a Get_current_branch messagerecv_get_headers
- each good node's set of peers from whom they have received a Get_block_headers messagerecv_get_ops
- each good node's set of peers from whom they have received a Get_operations message
phase
- each good bootstrapping node's phaseconnections
- each good and bad bootstrapping node's set of connectionscurrent_head
- each good bootstrapping node's current headfittest_head
- each good bootstrapping node's peers' current headsvalidated_blocks
- each good bootstrapping node's function from level to validated block at that levellevel_to_validate
- each good bootstrapping node's lowest common level of fetched headers and operationsheader_pipe
- each good bootstrapping node's queue of fetched headersoperation_pipe
- each good bootstrapping node's queue of fetched operations
servicing_headers
- each good node's function from peers from whom they have received a Get_block_headers message to the headers they requestedservicing_ops
- each good node's function from peers from whom they have received a Get_operations message to the operations they requested
TODO