Related HFs Sokol HF 2018-09-19 and Core HF 2018-10-22
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 oftestrpc
, newsolidity-coverage
); - security improvements were made according to reports of security audits.
Major pull requests
- (Feature) Add minting statistics to RewardByBlock contract (poanetwork/poa-network-consensus-contracts#197)
- (Fix) Get rid of limitation in RewardByBlock.addExtraReceiver function (poanetwork/poa-network-consensus-contracts#196)
- (Feature) Add script for checking contracts' functions for a clashing (poanetwork/poa-network-consensus-contracts#179)
- (Fix) Reduce gas spending, improve migrations, and minor enhancements (poanetwork/poa-network-consensus-contracts#171)
- (Feature) Allow cancellation of a ballot in
VotingToManageEmissionFunds
by its creator for 15 minutes after it's created (poanetwork/poa-network-consensus-contracts#168) - (Fix) Accounting of pending confirmations in ValidatorMetadata's
moveMetadata
andclearMetadata
functions (poanetwork/poa-network-consensus-contracts#164) - (Fix) Add moveMetadata and clearMetadata functions to ValidatorMetadata contract (poanetwork/poa-network-consensus-contracts#158)
- (Fix) Finalization without reverts, optimizations and unit tests updates (poanetwork/poa-network-consensus-contracts#155)
- (Fix) Remove changing of ProxyStorage's address from ValidatorMetadata (poanetwork/poa-network-consensus-contracts#150)
- (Feature) Block Reward emission by time (poanetwork/poa-network-consensus-contracts#133)
- (Feature) Add extra getters for Voting DApp optimization (poanetwork/poa-network-consensus-contracts#129)
- (Feature) Add new validator with mining/voting/payout keys at once (poanetwork/poa-network-consensus-contracts#118)
- (Feature) Allow finalize at once if all validators gave their votes (poanetwork/poa-network-consensus-contracts#113)
- (Fix) removeVotingKey and removePayoutKey shouldn't revert if voting/ payout key is already removed (poanetwork/poa-network-consensus-contracts#127)
- (Fix) Add missed unit tests (poanetwork/poa-network-consensus-contracts#125)
- (Refactor) Small enhancements, refactoring and fixes (poanetwork/poa-network-consensus-contracts#122)
- (Refactor) Update solc to 0.4.24 and truffle to 4.1.11 (poanetwork/poa-network-consensus-contracts#106)
- (Feature) Unit tests and enhancements for Increased Emission Supply (poanetwork/poa-network-consensus-contracts#105)
- (Fix) MoC can be removed (poanetwork/poa-network-consensus-contracts#101)
- (Fix) Update web3 (poanetwork/poa-network-consensus-contracts#99)
- (Refactor) New smart contracts refactoring (poanetwork/poa-network-consensus-contracts#96)
- (Feature) Add BlockReward contract (poanetwork/poa-network-consensus-contracts#83)
- (Refactor) Code refactoring (poanetwork/poa-network-consensus-contracts#82)
- (Feature) Upgradable contracts (poanetwork/poa-network-consensus-contracts#81)
- (Fix) Some of proposals from auditors (poanetwork/poa-network-consensus-contracts#135)
Minor pull requests
- (Fix) Async wait for RewardByBlock contract address (poanetwork/poa-network-consensus-contracts#199)
- (Fix) 2_deploy_contract.js for correct deployment of RewardByBlock (poanetwork/poa-network-consensus-contracts#198)
- (Feature) POA solidity-flattener instead of Python solidity flattener (poanetwork/poa-network-consensus-contracts#194)
- (Fix) Update npm packages (poanetwork/poa-network-consensus-contracts#192)
- (Fix) A few enhancements in migrations/2_deploy_contract.js (poanetwork/poa-network-consensus-contracts#188)
- (Fix) Update README.md (poanetwork/poa-network-consensus-contracts#183)
- (Fix) Enhancements of migration scripts (poanetwork/poa-network-consensus-contracts#182)
- (Fix) Enhancement of VotingToManageEmissionFunds._finalize function (poanetwork/poa-network-consensus-contracts#181)
- (Refactor) Put address arguments at the end of argument list of functions (poanetwork/poa-network-consensus-contracts#178)
- (Refactor) Remove
this
and other code improvements (poanetwork/poa-network-consensus-contracts#175) - (Fix) Replace uint8 with uint256 to reduce gas spending (poanetwork/poa-network-consensus-contracts#174)
- (Fix) Minor improvements of KeysManager and PoaNetworkConsensus.setProxyStorage (poanetwork/poa-network-consensus-contracts#173)
- (Fix) Remove theoretical reentrancy from
VotingTo._createBallot
method and other enhancements (poanetwork/poa-network-consensus-contracts#170) - (Fix) Security enhancements of
VotingToChange*.migrateBasicOne
function (poanetwork/poa-network-consensus-contracts#169) - (Fix) Deny using VotingToChange* functions unless migration is completed (poanetwork/poa-network-consensus-contracts#167)
- (Feature) Checking if a voting key is EOA or a contract in VotingToManageEmissionFunds (poanetwork/poa-network-consensus-contracts#165)
- (Refactor) Move
implementation
andversion
functions fromEternalStorage
toEternalStorageProxy
(poanetwork/poa-network-consensus-contracts#163) - (Refactor) Replace returns(address) with returns(interface) in several private functions (poanetwork/poa-network-consensus-contracts#162)
- (Fix) Using of BallotsStorage.getProxyThreshold in VotingToManageEmissionFunds (poanetwork/poa-network-consensus-contracts#160)
- (Fix) Replace abi.encodePacked with abi.encode (poanetwork/poa-network-consensus-contracts#159)
- (Fix) ValidatorMetadata contract enhancements (poanetwork/poa-network-consensus-contracts#157)
- (Fix) PoaNetworkConsensus contract and KeysManager.migrateMiningKey function (poanetwork/poa-network-consensus-contracts#156)
- (Fix) Removing usage of a free pointer from EternalStorageProxy's fallback function (poanetwork/poa-network-consensus-contracts#151)
- (Refactor) A few enhancements proposed by auditors (poanetwork/poa-network-consensus-contracts#149)
- (Refactor) Add KeysManager.getInitialKeyStatus function instead of initialKeys and getInitialKey (poanetwork/poa-network-consensus-contracts#148)
- (Fix) Don't allow adding voting/ payout key for zero mining key (poanetwork/poa-network-consensus-contracts#147)
- (Fix) Fixes and enhancements of BallotsStorage.sol, EternalStorageProxy.sol, KeysManager.sol, ValidatorMetadata.sol, VotingToChange.sol, VotingToChangeKeys.sol (poanetwork/poa-network-consensus-contracts#145, poanetwork/poa-network-consensus-contracts#146, poanetwork/poa-network-consensus-contracts#152, poanetwork/poa-network-consensus-contracts#153, poanetwork/poa-network-consensus-contracts#166)
- (Feature) A new RewardByBlock.addExtraReceiver function (poanetwork/poa-network-consensus-contracts#144)
- (Fix) Add keeping of RewardByBlock and VotingToManageEmissionFunds addresses to ProxyStorage (poanetwork/poa-network-consensus-contracts#143)
- (Fix) Fixes of migration scripts (poanetwork/poa-network-consensus-contracts#141, poanetwork/poa-network-consensus-contracts#142)
- (Fix) BlockReward upgradability and splitting into RewardByBlock and RewardByTime (poanetwork/poa-network-consensus-contracts#140)
- (Fix) Add solc to scripts/package.json (poanetwork/poa-network-consensus-contracts#138)
- (Refactor) Rename BlockReward.rewardHBBFT function to rewardByTime (poanetwork/poa-network-consensus-contracts#136)
- (Refactor) Rewrite migrations/2_deploy_contract.js (poanetwork/poa-network-consensus-contracts#134)
- (Fix) Checking transaction status in scripts/migrate (poanetwork/poa-network-consensus-contracts#132)
- (Fix) Refreshing unit tests' results in README (poanetwork/poa-network-consensus-contracts#131)
- (Fix) "Stack too deep" error in VotingToChangeKeys.getBallotInfo (poanetwork/poa-network-consensus-contracts#130)
- (Fix) migrations/2_deploy_contract.js (poanetwork/poa-network-consensus-contracts#124)
- (Fix) PoaNetworkConsensus small changes (poanetwork/poa-network-consensus-contracts#123)
- (Refactor) Enhancements and fixes (poanetwork/poa-network-consensus-contracts#112)
- (Fix) Unit tests for solidity-coverage (poanetwork/poa-network-consensus-contracts#109)
- (Fix) KeysManager and a few enhancements (poanetwork/poa-network-consensus-contracts#104)
- (Fix) Known vulnerability in
hoek@4.2.0
dependency (poanetwork/poa-network-consensus-contracts#97) - (Fix) README text about PoaNetworkConsensus bytecode (poanetwork/poa-network-consensus-contracts#79)
- (Refactor) Collapse master and demo branch (poanetwork/poa-network-consensus-contracts#76)