diff --git a/index.md b/index.md deleted file mode 100644 index f703786..0000000 --- a/index.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -# You don't need to edit this file, it's empty on purpose. -# Edit theme's home layout instead if you wanna make some changes -# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults -layout: default ---- - -|---| -|[SEBAK API Document](https://bosnet.github.io/sebak)| -|[GoDoc of SEBAK](https://godoc.org/boscoin.io/sebak)| -|[Introduction of ISAAC Consensus protocol betterments](/introduction-isaac-consensus-protocol-betterment/)| -|[Simple guide for SEBAK migration](/simple-guide-for-sebak-migration/)| -|[SEBAK how to report issues](/how-to-report-issue/)| -|[SEBAK command](/SEBAK-command/)| -|[SEBAK deployment](/SEBAK-deployment/)| -|[SEBAK deployment standalone](/SEBAK-deployment-standalone/)| -|[SEBAK for exchange](/SEBAK-for-exchange/)| -|[SEBAK installation](/SEBAK-installation/)| -|[SEBAK testnet](/SEBAK-testnet/)| -|[SEBAK watcher node mode](/watcher-node-mode/)| -|[Introduction of ISAAC Consensus protocol betterments](/introduction-isaac-consensus-protocol-betterment/)| -|[How block inflation works](/how-block-inflation-works/)| -|[How pf inflation works](/how-pf-inflation-works/)| -|[How to make transaction post](/how-to-make-transaction-post/)| -|[What is GON?](/what-is-gon/)| -|[Whar kind of key pair SEBAK in use?](/What-kind-of-key-pair-sebak-in-use/)| -|[How the consensus protocol works](/how-the-consensus-protocol-works/)| -|[How to calculate block time buffer](/how-to-calculate-block-time-buffer/)| -|[How to sync blocks with validators](/how-to-sync-blocks-with-validators/)| -|[How to check a ballot is valid](/how-to-check-a-ballot-is-valid/)| -|[How to select the proposer](/how-to-select-the-proposer/)| -|[How transactions are shared](/how-transactions-are-shared/)| diff --git a/sebak_command.md b/sebak_command.md index 97e846c..1f12017 100644 --- a/sebak_command.md +++ b/sebak_command.md @@ -4,7 +4,6 @@ permalink: /SEBAK-command/ --- --- # SEBAK command -To install `sebak` command, please check the [installation guide](./sebak_installation.md). # Options ```sh @@ -119,11 +118,8 @@ Flags: --log string set log file --log-format string log format, {terminal, json} (default "terminal") --log-level string log level, {crit, error, warn, info, debug} (default "info") - --log-rotate-max-count string max count of rotated logs (default "0") - --log-rotate-max-days string max days of rotated logs (default "0") - --log-rotate-max-size string max size of rotate log (default "100") - --log-rotate-uncompress disable compression of rotate log --network-id string network id + --ntp string ntp server for time sync (default "time.bora.net") --operations-in-ballot-limit string operations limit in a ballot (default "10000") --operations-limit string operations limit in a transaction (default "1000") --publish string endpoint url for other nodes @@ -138,6 +134,7 @@ Flags: --sync-pool-size string sync pool size (default "300") --sync-retry-interval string sync retry interval (default "10s") --threshold string threshold (default "67") + --time-sync-command string command for syncing local time --timeout-accept string timeout of the accept state (default "2s") --timeout-allconfirm string timeout of the allconfirm state (default "30s") --timeout-init string timeout of the init state (default "2s") @@ -198,10 +195,10 @@ Usage: Flags: --dry-run Print the transaction instead of sending it - --endpoint string endpoint to send the transaction to (https / memory address) - -h, --help help for unfreezeRequest - --network-id string network id - --verbose Print extra data (transaction sent) + —endpoint string endpoint to send the transaction to (https / memory address) + -h, —help help for unfreezeRequest + —network-id string network id + —verbose Print extra data (transaction sent) ``` ## `sebak version` @@ -209,5 +206,5 @@ Flags: This command for print current version. ```sh $ sebak version -0.1.X -``` +version= git= build= +``` \ No newline at end of file diff --git a/tech_how_the_consensus_protocol_works.md b/tech_how_the_consensus_protocol_works.md deleted file mode 100644 index 27c152c..0000000 --- a/tech_how_the_consensus_protocol_works.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -layout: post -permalink: /how-the-consensus-protocol-works/ ---- ---- -# How the consensus protocol works - -# Consensus Protocol - -There are two protocols in `SEBAK`. One is `ISAAC` protocol for consensus and another is `Transaction Protocol` for sharing transactions. - -## `ISAAC` Protocol -The `ISAAC` is a consensus protocol based on [`PBFT`](http://pmg.csail.mit.edu/papers/osdi99.pdf). -In the `ISAAC`, all nodes will vote two times to determine which transactions to include in this block. -For each voting unit, the nodes have the role `proposer` or` validator`. -The `proposer` gathers the transactions for this vote and puts them in a ballot and passes it to the `validator`s. -The `validator` checks that the transactions in the ballot are valid and then votes. -If the voting determines that the ballot is valid, all nodes confirm the transactions in the ballot. - -## State Diagram - - 'Height + 1' - ┌──────────────────────────────────────────────────────────────────────────────────┐ - ╎ ╎ - ╎ ╎ - ╎ 'get ballot' 'get 67% of YES' 'get 67% of YES' ╎ - ▼ ╎ - INIT ────────────────────> SIGN ──────────────────> ACCEPT ──────────────────> ALL_CONFIRM - ▲ ╎ ╎ - ╎ ╎ ╎ - ╎ 'get 34% of NO or EXP' ╎ 'get 34% of NO or EXP' ╎ - ╎ ╎ ╎ - └────────────────────────────────────────────────────┘ - 'Round + 1' - -## `ISAAC` States -1. `INIT` - Proposed or received a ballot with transactions. - -1. `SIGN` - Checked that the ballot is valid by itself. - -1. `ACCEPT` - Checked that the ballot is valid by validators. - -1. `ALL_CONFIRM` - Confirmed block with the transactions in the ballot. - -## Voting Hole - -1. `YES` - Agreed - -1. `NO` - Disagreed - -1. `EXP` - Expired - -## Terms - -* TIMEOUT_INIT - The timeout for `INIT` state. The default value is 2 sec. - -* TIMEOUT_SIGN - The timeout for `SIGN` state. The default value is 2 sec. - -* TIMEOUT_ACCEPT - The timeout for `ACCEPT` state. The default value is 2 sec. - -* B(ISAAC State, Voting Hole) - A ballot with ISAAC state and voting hole. - -### Examples - -* B(`INIT`, `YES`) - A ballot with ISAAC state `INIT` and voting hole `YES`. - -* B(`SIGN`, `NO`) - A ballot with ISAAC state `INIT` and voting hole `NO`. - -* B(`ACCEPT`, `EXP`) - A ballot with ISAAC state `INIT` and voting hole `EXP`. - -## Voting Process - -### Network Start -* At the beginning of the network, the genesis block is saved with block height 1 and round 0. -* The node start with `INIT` state, height 2 and round 0. - -### `INIT` -1. The timer is set to TIMEOUT_INIT. -1. The steps to propose transactions are as follows. - * If the node is [proposer](how_to_select_the_proposer.md) of this round, it broadcasts a B(`INIT`, `YES`), - * The ballot includes valid transactions(only hashes) or empty(If the transaction pool is empty). - * When the node broadcasts the ballot, the node goes to the next state. - * If the node is not `proposer`, it waits until receiving the B(`INIT`, `YES`). - * When it receives the ballot, the node goes to the next state. - * When the timer expires, the node goes to the next state. - -### `SIGN` -1. The timer is reset to TIMEOUT_SIGN. -1. The node checks [the proposed ballot is valid](how_to_check_a_ballot_is_valid.md). - * If the proposed ballot is valid(or empty), the node broadcasts B(`SIGN`, `YES`). - * If the proposed ballot is invalid, the node broadcasts B(`SIGN`, `NO`). - * When the timer expires, the node hasn't sent a ballot in `SIGN` state yet, it broadcasts B(`SIGN`, `EXP`). -1. Each node receives ballots and goes to the next state after, - * the number of B(`SIGN`, `YES`) is greater than or equal to 67% of validators, the node broadcasts B(`ACCEPT`, `YES`). - * the number of B(`SIGN`, `NO`) or B(`SIGN`, `EXP`) is greater than 33% of validators, - the node goes back to `INIT` state with same height and round + 1. - -### `ACCEPT` -1. The timer is reset to TIMEOUT_ACCEPT. -1. When the timer expires, the node hasn't sent a ballot in `ACCEPT` state yet, it broadcasts B(`ACCEPT`, `EXP`). -1. Each node receives ballots and, - * if the number of B(`ACCEPT`, `YES`) is greater than or equal to 67% of validators, the node goes to the next state. - * if the number of B(`ACCEPT`, `NO`) or B(`ACCEPT`, `EXP`) is greater than 33% of validators, - the node goes back to `INIT` state with same height and round + 1. - -### `ALL-CONFIRM` -1. the node confirms and saves the block with proposed transactions even though it is empty. -1. the node filters [invalid transactions](how_to_check_a_ballot_is_valid.md#transaction-validation) in the transaction pool. -1. It goes to `INIT` state with height + 1 and round 0. - -### `INIT` -* If the node is `proposer`, it waits for [block time buffer](tech_how_to_calculate_block_time_buffer.md) and propose. -* Else, it waits for `block time buffer` + TIMEOUT_INIT to receive proposed ballot. - -## Transaction Protocol -1. [`Transaction Protocol`](how_transactions_are_shared.md) is a protocol for sharing transactions between the nodes.