2018-09-19 | #4622420

Hard Fork Date | Block Number

Info

  • Network: Sokol

  • Date: 2018-09-19

  • Block number: 4622420

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. add an address of the new PoaNetworkConsensus contract to engine/authorityRound/params/validators/multi;

  3. add blockRewardContractAddress (obtained from step 1) and blockRewardContractTransition (equal to 4639000) to engine/authorityRound/params.

  4. Organize the HF on block 4622420.

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 the hard fork 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

Follow Sokol spec.json hard-fork guide

Verify

grep -n -A2 4622420 spec.json

You should see:

"4622420": { "safeContract": "0x4c6a159659CCcb033F4b2e2Be0C16ACC62b89DDB" }

Last updated