update documentation to include maxCodeSizeConfig documentation. (#1006)

This commit is contained in:
Sai V 2020-05-29 21:17:40 +08:00 committed by GitHub
parent 282b74045a
commit dcab518e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 2 deletions

View File

@ -1,12 +1,44 @@
# Upgrade to Quorum 2.6.0
# Upgrade to Quorum 2.6.0
Quorum 2.6.0 upgrades the base `geth` version from 1.8.18 to 1.9.7
See [ethereum 1.9.0](https://blog.ethereum.org/2019/07/10/geth-v1-9-0/) for the complete list if new features added as a part of `geth` 1.9.7.
**Note** `geth` 1.9.7 has several enhancements at the database layer which are part of Quorum 2.6.0. Hence, once migrates to 2.6.0, it cannot rollback to older version of Quourm. The recommendation is to keep the back of the data directory before upgrading to 2.6.0 which can be used to revert back to older version if necessary.
A node running on Quorum 2.6.0 can coexist on a network where other nodes are running on lower version of Quorum and thus supports node by node upgrade to Quorum 2.6.0. The suggested upgrade process is as described below:
* Bring down the node which needs to be upgraded to Quorum 2.6.0. Modify the `genesis.json` file to include `istanbulBlock` and `petersburgBlock`. The values for this should be set to an appropriate value in future by when the entire network would have upgraded to Quorum 2.6.0. This is important as the gas calculation logic has changed in `geth` 1.9.7. Not setting this value properly can result in `Bad block error`
* Quorum 2.6.0 has deprecated genesis attributes `maxCodeSize` and `maxCodeSizeChangeBlock`. To allow tracking of multiple `maxCodeSize` value changes, a new attribute `maxCodeSizeConfig` is added to genesis. If the `maxCodeSize` was changed multiple times, it could possibly result in `Bad block` error for any new node joining the network. The changes in Quorum 2.6.0 address this and enable tracking of historical changes of `maxCodeSize` in genesis and thus allow it to be changed multiple times in network life. With this change when `init` is executed in Quorum 2.6.0, `geth` will force usage of `maxCodeSizeConfig`. A sample example is shown below.
```javascript
"config": {
"homesteadBlock": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"chainId": 10,
"eip150Block": 0,
"eip155Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip158Block": 0,
"isQuorum": true,
"maxCodeSizeConfig": [
{
"block": 5,
"size": 35
},
{
"block": 15,
"size": 24
},
{
"block": 20,
"size": 35
}
]
},
```
* Execute `geth --datadir path/to/datadir init genesis.json` with the modified `genesis.json`
* Bring up the node in Quorum 2.6.0