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

transitions are slightly different for GoQ #245

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
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
52 changes: 18 additions & 34 deletions docs/configure-and-manage/configure/consensus-protocols/ibft.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,10 @@ To update an existing network with a new `blockperiodseconds`:
"epochlength": 30000,
"requesttimeoutseconds": 4
},
"transitions": {
"ibft": [
{
"block": <FutureBlockNumber>,
"blockperiodseconds": <NewValue>
}
]
}
"transitions": [{
"block": <FutureBlockNumber>,
"blockperiodseconds": <NewValue>
}]
},
...
}
Expand All @@ -209,14 +205,10 @@ To update an existing network with a new `blockperiodseconds`:
"epochlength": 30000,
"requesttimeoutseconds": 4
},
"transitions": {
"ibft": [
{
"block": 1240,
"blockperiodseconds": 4
}
]
}
"transitions": [ {
"block": 1240,
"blockperiodseconds": 4
}]
},
...
}
Expand Down Expand Up @@ -250,15 +242,11 @@ To swap between block header validator selection and contract validator selectio
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"transitions": {
"ibft": [
{
"block": <FutureBlockNumber>,
"validatorselectionmode": <SelectionMode>,
"validatorcontractaddress": <ContractAddress>
}
]
}
"transitions": [{
"block": <FutureBlockNumber>,
"validatorselectionmode": <SelectionMode>,
"validatorcontractaddress": <ContractAddress>
}]
},
...
}
Expand All @@ -275,15 +263,11 @@ To swap between block header validator selection and contract validator selectio
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"transitions": {
"ibft": [
{
"block": 102885,
"validatorselectionmode": "contract",
"validatorcontractaddress": "0x0000000000000000000000000000000000007777"
}
]
}
"transitions": [ {
"block": 102885,
"validatorselectionmode": "contract",
"validatorcontractaddress": "0x0000000000000000000000000000000000007777"
}]
},
...
}
Expand Down
78 changes: 33 additions & 45 deletions docs/configure-and-manage/configure/consensus-protocols/qbft.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ You can pre-deploy the validator smart contract in a new QBFT network by specify

You can migrate an existing [IBFT](ibft.md) network to a QBFT network with the following steps:

1. Stop the network.
1. Update the IBFT genesis file with a non-zero `testQBFTBlock` fork block.
For example, if the current block number in your IBFT network is 100, set `testQBFTBlock` to any block greater than
1. Stop all nodes in the network.
1. Update the genesis file with a suitable transition block, this needs to be far enough in the future so that you can co-ordinate ahead of time.
For example, if the current block number in your IBFT network is 100, set transiton block to any block greater than
100, and once that fork block is reached, QBFT consensus will be used instead of IBFT.

!!! example "Sample QBFT genesis file"
Expand All @@ -160,12 +160,15 @@ You can migrate an existing [IBFT](ibft.md) network to a QBFT network with the f
"istanbul": {
"epoch": 30000,
"policy": 0,
"ceil2Nby3Block": 0,
"testQBFTBlock": 120
"ceil2Nby3Block": 0
},
"transitions": [{
"block": 120,
"algorithm": "qbft"
}]
...
```

1. run `geth init` with the new genesis file
1. Restart the network with the updated genesis file.

## Transitions
Expand All @@ -186,7 +189,7 @@ For example, you can update the [block time](#configure-block-time-on-an-existin
To update an existing network with a new `blockperiodseconds`:

1. Stop all nodes in the network.
2. In the [genesis file](#genesis-file), add the `transitions` configuration item where:
1. In the [genesis file](#genesis-file), add the `transitions` configuration item where:

* `<FutureBlockNumber>` is the upcoming block at which to change `blockperiodseconds`.
* `<NewValue>` is the updated value for `blockperiodseconds`.
Expand All @@ -204,14 +207,10 @@ To update an existing network with a new `blockperiodseconds`:
"epochlength": 30000,
"requesttimeoutseconds": 4
},
"transitions": {
"qbft": [
{
"block": <FutureBlockNumber>,
"blockperiodseconds": <NewValue>
}
]
}
"transitions": [{
"block": <FutureBlockNumber>,
"blockperiodseconds": <NewValue>
}]
},
...
}
Expand All @@ -228,21 +227,18 @@ To update an existing network with a new `blockperiodseconds`:
"epochlength": 30000,
"requesttimeoutseconds": 4
},
"transitions": {
"qbft": [
{
"block": 1240,
"blockperiodseconds": 4
}
]
}
},
...
"transitions": [{
"block": 1240,
"blockperiodseconds": 4
}]
}
...
}
```

3. Restart all nodes in the network using the updated genesis file.
4. To verify the changes after the transition block, call
1. run `geth init` with the new genesis file
1. Restart all nodes in the network using the updated genesis file.
1. To verify the changes after the transition block, call
[`istanbul_getValidators`](../../../reference/api-methods.md#istanbul_getvalidators), specifying `latest`.

### Swap validator management methods
Expand All @@ -269,15 +265,11 @@ To swap between block header validator selection and contract validator selectio
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"transitions": {
"qbft": [
{
"block": <FutureBlockNumber>,
"validatorselectionmode": <SelectionMode>,
"validatorcontractaddress": <ContractAddress>
}
]
}
"transitions": [{
"block": <FutureBlockNumber>,
"validatorselectionmode": <SelectionMode>,
"validatorcontractaddress": <ContractAddress>
}]
},
...
}
Expand All @@ -294,15 +286,11 @@ To swap between block header validator selection and contract validator selectio
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"transitions": {
"qbft": [
{
"block": 102885,
"validatorselectionmode": "contract",
"validatorcontractaddress": "0x0000000000000000000000000000000000007777"
}
]
}
"transitions": [{
"block": 102885,
"validatorselectionmode": "contract",
"validatorcontractaddress": "0x0000000000000000000000000000000000007777"
}]
},
...
}
Expand Down