Skip to content

Preflight check

Alexander Kolotov edited this page May 9, 2018 · 14 revisions

Deployment

  1. Prepare Multisig contracts for Home and Foreign
  2. Choose number of validators (3 for example). Gather ETH public keys.
  3. Fund with POA and ETH all 3 keys. Try small amounts first. (max 1 eth, 1 poa)
  4. Choose required signatures threshold (2 for example)
  5. Fund temporary deployment account from which all contracts will be deployed.
  6. git clone poa-bridges contracts; npm install; npm run compile
  7. cd deploy && npm install
  8. prepare .env file with correct RPC URLs, Validators eth addresses, Max, Min, Daily thresholds
  9. run node deploy.js
  10. Update https://medium.com/poa-network/introducing-poa-bridge-and-poa20-55d8b78058ac medium post with official contract address
  11. deploy all validator's nodes using Mr. X scripts
  12. deploy bridge UI
  13. deploy monitoring

Checks

  1. do test deposit from home to foreign
  2. do test withdraw from foreign to home
  3. increase home daily limit, make sure that is able to do deposit more than old value of daily limit
  4. increase foreign daily limit, make sure that is able to do withdraw more than old value of daily limit
  5. add validator on home and foreign, make sure that there is no double spend
  6. stop the bridge operations by changing the limits, make sure that the bridge does not relay transactions
  7. accidentally send POA20 to foreign address and use claimTokens to withdraw from it
  8. stop all bridges and make sure monitoring works
  9. change contract (which one?) addresses and make sure monitoring works
  10. roll back local dbs on validators and make sure they don't do double spend
  11. stop 2 validators, do deposit, wait for one validator signatures for deposit, run validators, make sure that deposit relayed sucessfully
  12. stop 2 validators, do withdraw, wait for one validator signatures for withdraw, run validators, make sure that withdraw relayed sucessfully
  13. make malicious validator's tx and make sure monitoring works on home
  14. make malicious validator's tx on foreign and make sure monitoring works
  15. spend all money on validator account and check monitoring
  16. try to deposit more than max deposit value
  17. try to deposit less than min deposit value
  18. try to withdraw more than max withdraw value
  19. try to withdraw less than min withdraw value
  20. hit daily limit
  21. verify it waits for 8 blocks before sending tx
  22. upgrade bridge contracts to new version and make sure that balances of POA and POA20 was not changed, the bridge can still withdraw and deposit (withdraw first), rollback of dbs will not lead to double spend
  23. make sure that logs from all validators come to papertrail server.
Clone this wiki locally