-
Notifications
You must be signed in to change notification settings - Fork 65
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
(Update) Steps to deploy and migrate all upgradable contracts to the network #78
Comments
Code refactoring was done today: varasev@5f61157 All tests are successful: https://travis-ci.org/varasev/poa-network-consensus-contracts/builds/375967913 |
@varasev are we ready for the audit? |
@igorbarinov not yet, but we're almost there. I need about two days to complete code tests (migrations, poa-dapps-voting and poa-test-setup). I'll let you know as soon as everything is ready. |
@igorbarinov now everything is ready to start security audit in my repo: https://github.com/varasev/poa-network-consensus-contracts/tree/5f6115761d915252017e851c6fd841fb0d01724e An actual tree for |
auditors will fork the repo, it's better if they will fork out of poanetwork one. Let's organize it in a branch, |
@igorbarinov ok, a new branch has been created in poanetwork's repo: https://github.com/poanetwork/poa-network-consensus-contracts/tree/security-audit |
The script for deployment and migration of all contracts is ready: https://github.com/varasev/poa-network-consensus-contracts/blob/a9119ab23cc86ba61c17a986264256391a6f7092/scripts/migrate/migrateAll.js How to use it for the SOKOL network: $ cd scripts/migrate
$ NETWORK=sokol node migrateAll For the CORE network: $ cd scripts/migrate
$ NETWORK=core node migrateAll Here is the output after today's test run. It had been working for about 15 minutes:
|
@varasev do you plan to implement these comments poanetwork/RFC#14 (comment) before audit will start? |
@vbaranov yes, I do, if the audit has not been started yet. @igorbarinov I created |
@varasev yes, I sent it to two auditors. But they didn't start yet.
@rstormsf will assist you with audits |
@igorbarinov We conferred with @rstormsf and @vbaranov today and decided that it's better to make some code refactoring before an audit. Can we start the audit a week later? I need a few days to complete working on
|
The current contracts' code can be viewed here: https://github.com/varasev/poa-network-consensus-contracts/tree/17ee6bad37e5f9a2f714457ac1747d460643d929/contracts I'll change solidity version of all contracts to ^0.4.23 and test them a bit later. |
All contracts have been updated to solidity v0.4.23: varasev@9fef157 |
@varasev do Truffle tests work for refactored smart-contracts? |
@vbaranov Yes, of course. The results of the tests: https://travis-ci.org/varasev/poa-network-consensus-contracts/builds/379172517 |
@varasev if it is ready, would you mind to update branch for audit with refactored contracts? |
@vbaranov At the moment all contracts are ready for audit, except |
I guess the security audit will be started at the specific commit in audit branch. So, there is no problem to move refactored consensus contracts there now, if they are ready, and then add the update for |
OK, I've updated |
@varasev would you mind to eliminate |
@varasev also, let's migrate from |
I will create separate issues. It is a mess here... |
Yes, I've already checked them with solhint 1.1.10 before an upgrade to 0.4.23 and eliminated all errors which could be fixed. Let me know, please, if you see any errors that I might have missed.
OK, it's already in my TODO. |
The next steps need to be taken to update all contracts on the network after we finish making them upgradable and after security audit is done.
These steps are implemented inside
scripts/migrate/migrateAll.js
: https://github.com/varasev/poa-network-consensus-contracts/blob/master/scripts/migrate/migrateAll.jsDeploy
PoaNetworkConsensus
contract with the current MoC and the current mining keys list in constructor.Deploy
ProxyStorage
contract and call itsinit
method withPoaNetworkConsensus
address as a parameter.Call
PoaNetworkConsensus.setProxyStorage
with the address ofProxyStorage
as a parameter.Run
scripts/migrate/migrateKeys.js
. It will deploy and initializeKeysManager
contract and migrate all keys from an oldKeysManager
contract.Run
scripts/migrate/migrateVotings.js
. It will deploy and initializeBallotsStorage
,VotingToChangeKeys
,VotingToChangeMinThreshold
andVotingToChangeProxyAddress
contracts and migrate all thresholds and ballots from old contracts.Deploy
ValidatorMetadata
.Call
ProxyStorage.initializeAddresses
method.Run
scripts/migrate/migrateMetadataNew.js
.The text was updated successfully, but these errors were encountered: