Skip to content
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

upgrade operator contract on testnet #202

Closed
4 tasks done
johannbarbie opened this issue Jan 10, 2020 · 10 comments
Closed
4 tasks done

upgrade operator contract on testnet #202

johannbarbie opened this issue Jan 10, 2020 · 10 comments

Comments

@johannbarbie
Copy link
Member

johannbarbie commented Jan 10, 2020

Bounty

with the current contract CAS heartbeats and better slot management is not supported.

Scope

  • test on local environment that upgrade doesn’t break the network
  • deploy new contract code and verify source
  • call upgradeTo() on MinGov
  • wait and finalize governance proposal

Deliverables

  • upgraded contact

Gain for the project

  • ability to add validators

Roles

bounty gardener: @johannbarbie / 10%
bounty worker: name / share
bounty reviewer: name / share

@johannbarbie
Copy link
Member Author

johannbarbie commented Jan 10, 2020

started testing the upgrade locally, got this:

2020-01-10T14:59:23.989Z leap-node:period [submitPeriod] Error Error: Transaction has been reverted by the EVM:
{
  "transactionHash": "0x38a97024e42aef5e311a2ad4555431192d1768efa2859a5f83898b170022b8f7",
  "transactionIndex": 0,
  "blockHash": "0x3920f38ec033398cc2a87745ee85087931374a40cc813b9f7c5494e667305ad6",
  "blockNumber": 4366,
  "from": "0x8f4d90553b596d132a2c876fea27e3294cebb8e4",
  "to": "0x9f551cb197e4357bab7799dd0930a1fe3a93978e",
  "gasUsed": 29072,
  "cumulativeGasUsed": 29072,
  "contractAddress": null,
  "logs": [],
  "status": false,
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "v": "0x2d45",
  "r": "0xd5d3e8e2239d2578fdcd722977dd1cdb6179e5309528294ce554e5ec27a23300",
  "s": "0x79acf7d4164f51df45af554f74a733afbf780c0591dba0232bf85c6075e95771"
}
    at /Users/johba/dev/leap-sandbox/build/node/node_modules/web3-core-method/src/index.js:364:46
    at processTicksAndRejections (internal/process/task_queues.js:86:5)

suspicion:
the slots-bitmap is set to 0 after upgrade, even though some slots are taken already.

@johannbarbie
Copy link
Member Author

ok, with this PR the upgrade works on local network. here is what i did:

leap-contracts johba$ git checkout 8d61b6c0a5009f26949bad01de8c2b9aa77c7476
leap-contracts johba$ cd leap-sandbox
leap-sandbox johba$ yarn build
leap-sandbox johba$ yarn start
leap-contracts johba$ cd leap-guardian
leap-guardian johba$ NUM=64 NODE_URL=http://localhost:7000 PRIV_KEY=0x11..22 node scripts/machineGun.js
leap-guardian johba$ cd leap-contracts
leap-contracts johba$ git checkout fix/takenSlotsUgrade
leap-contracts johba$ CONFIG=$SB/generatedConfig.json truffle deploy --f 5
leap-contracts johba$ cd leap-guardian
leap-guardian johba$ NUM=96 NODE_URL=http://localhost:7000 PRIV_KEY=0x11..22 node scripts/machineGun.js

if period submission would fail, then machine-gun would stop.

@troggy
Copy link
Member

troggy commented Jan 10, 2020

@johannbarbie 👍👍

One thing to keep in mind: leap-node version for such tests should be the same as on testnet (if contract upgrade will be done before node upgrade)

@johannbarbie
Copy link
Member Author

if contract upgrade will be done before node upgrade

as the first machine gun run was able to pass a period submission i guess there is no danger to upgrade nodes before upgrading contracts? 🤔

@johannbarbie
Copy link
Member Author

@troggy
Copy link
Member

troggy commented Feb 14, 2020

I'm on it. leap-node is good enough for testnet

contract deployed an verified at: https://rinkeby.etherscan.io/address/0xd5588c166bc53e9360320ee0fe2daf7b510718ce

There was one more change since this deployment. Will create a new leap-contracts release and deploy the latest version

@troggy
Copy link
Member

troggy commented Feb 17, 2020

  • release leap-contracts 1.4.0
  • execute contract upgrade on testnet
  • upgrade sentinels to leap-node@6.0.0
  • upgrade validators both community and evgeni's:
    • backup network data
    • upgrade to leap-node@6.0.0
  • verify

@troggy
Copy link
Member

troggy commented Feb 17, 2020

contracts upgraded

@troggy troggy closed this as completed Feb 17, 2020
@johannbarbie
Copy link
Member Author

reviewed contract deployment by:

  • comparing verified source code agains changes in repo
  • check proxy-wiring by calling implementation() and checking with params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants