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

Update 0020-ckb-consensus-protocol.md #440

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions rfcs/0020-ckb-consensus-protocol/0020-ckb-consensus-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Created: 2019-6-19
* [Specification](#Specification)
* [Two-Step Transaction Confirmation](#Two-Step-Transaction-Confirmation)
* [Dynamic Difficulty Adjustment Mechanism](#Dynamic-Difficulty-Adjustment-Mechanism)
* [Protocol Parameters](#Protocol-Parameters)

<a name="Abstract"></a>
## Abstract
Expand Down Expand Up @@ -348,3 +349,28 @@ $$

The two cases differ only in the edge cases. The first case guarantees that the total reward issued in epoch *i* + 1 will not exceed R(*i* + 1).

<a name="Protocol-Parameters"></a>
### Protocol Parameters

We now list the actual parameters used when implementing this protocol in Nervos CKB.

| Name/Explanation | Related Name in our Client | Value |
| :-------------- | :----------------------------------- | :-------------- |
| maximum number of uncles per block | MAX_UNCLE_NUM | 2 |
| $o_{\rm ideal}$ | DEFAULT_ORPHAN_RATE_TARGET | 2.5% |
| $L_{\rm ideal}$ | DEFAULT_EPOCH_DURATION_TARGET | 4 hour |
| *w<sub>close</sub>* | TX_PROPOSAL_WINDOW | 2 |
| *w<sub>far</sub>* | TX_PROPOSAL_WINDOW | 10 |
| $C_{\rm m}^{\rm max}$ | MAX_EPOCH_LENGTH | 1800 |
| $C_{\rm m}^{\rm min}$ | MIN_EPOCH_LENGTH | 300 |
| block size limit | MAX_BLOCK_BYTES | 597000 |
| block cycle limit | MAX_BLOCK_CYCLES | 3500000000 |
| The upper bound number of `txpid`s in a proposal zone | MAX_BLOCK_PROPOSALS_LIMIT | 1500 |
| Proposer fee share |PROPOSER_REWARD_RATIO | 40% |
| Before which a block reward cannot be spent | CELLBASE_MATURITY | 4 epoch |

Several other parameters are implemented in the consensus component of our client. While a detailed description of these parameters falls outside the scope of this document, you can find them in [RFC15](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md).

* DEFAULT_SECONDARY_EPOCH_REWARD: 1.344 billion per year
* INITIAL_PRIMARY_EPOCH_REWARD: 4.2 billion per year
* DEFAULT_PRIMARY_EPOCH_REWARD_HALVING_INTERVAL: 4 years
Loading