HFs Core 2018 10 22

Vadim Arasev edited this page Oct 8, 2018 · 6 revisions

Info

  • Network: Core
  • Date: 2018-10-22
  • Block number: 5329160

Description

Problems

  • Governance smart contracts are non-upgradable.
  • Feature request: we need to increase emission supply for self-sustainability of the network (poanetwork/RFC#14).
  • Feature request: there is no ability to create one ballot for three keys (poanetwork/poa-network-consensus-contracts#92).
  • Feature request: there is no ability to finalize ballot earlier if all validators voted before the end of a ballot (poanetwork/RFC#8).
  • DApp performance: There are no tuple getters in smart contracts. It leads to the low performance of Voting DApp.
  • pragma solidity ^0.4.18; used for governance smart contracts is outdated.
  • Smart contracts need to be refactored in order to make them easy to read.
  • Smart contracts need to be checked for security and design issues (audit report by MixBytes team, audit report by ChainSecurity team).
  • Minor bugs.

Changelog

Major changes

  • smart contracts were made upgradable: BallotsStorage, KeysManager, ProxyStorage, ValidatorMetadata, VotingToChangeKeys, VotingToChangeMinThreshold, VotingToChangeProxyAddress;
  • scripts for migration from old to new smart contracts were added to scripts/migrate directory;
  • new smart contracts for Increased Emission Supply were added: VotingToManageEmissionFunds, EmissionFunds, RewardByBlock;
  • a new feature was implemented for creating a ballot to add a new validator with three keys at once;
  • a new feature was implemented for finalizing a ballot before its end time in case of all validators voted;
  • tuple getters were added to increase the performance of Voting DApp;
  • smart contracts were migrated to the latest stable Solidity compiler version (0.4.24);
  • smart contracts were refactored;
  • npm packages were updated;
  • found bugs were fixed;
  • the test environment was updated (ganache-cli instead of testrpc, new solidity-coverage);
  • security improvements were made according to reports of security audits.

Major pull requests

Minor pull requests

Solution

  1. Deploy new smart contracts and migrate all the data from old to new contracts with scripts/migrate/migrateAll.js.
  2. Update poa-chain-spec/contracts.json.
  3. Update poa-chain-spec/abis.
  4. Update poa-chain-spec/spec.json:
  • add an address of the new PoaNetworkConsensus contract to engine/authorityRound/params/validators/multi;
  • add blockRewardContractAddress (obtained from step 1) and blockRewardContractTransition (equal to 5761140 - November 17th, 2018) to engine/authorityRound/params.
  1. Organize the HF on block 5329160.

Increased Emission Supply

In the scope of this hard fork, the emission supply will be increased by 1 POA per block.

POA has a block time of ~5 seconds and rewards each validated block miner 1 POA for each block. These block rewards never run out and after November 17th, 2018 there will be 2 POA minted per block. The remaining 1 POA per block will be put aside to benefit the network however the current Validators vote to choose, some example use cases are to Burn coins, hold coins or spend on R&D for the POA Foundation. Validator's reward will remain at 1 POA after this transition.

You can find more info located in the POA Whitepaper Economy Section and RFC issue #14.

Instructions

NOTE: You should be running parity version >=1.11. If you're still running 1.10.x, please follow this guide first to upgrade https://github.com/poanetwork/poa-devops/blob/master/docs/Update-parity-version.md

To complete the hardfork you should follow this instruction that will replace spec.json on your node: https://github.com/poanetwork/poa-devops/blob/master/docs/Spec-hardfork.md

  • on STEP 2 (create group_vars/all...) use the following parameters:
MAIN_REPO_FETCH: "poanetwork"
GENESIS_BRANCH: "core"
  • on STEP 3 (create/edit hosts file...) please double-check that you're using your CORE node's IP address

  • on STEP 6 (connect to the node...) after you've done all the checks, also verify HF block number:

grep -n -A2 5329160 spec.json

You should see:

>             "5329160": {
>                 "safeContract": "0xa105Db0e6671C7B5f4f350ff1Af6460E6C696e71"
>             }

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.