I copied-and-pasted the release document. I'll remove/strike out what is done.
Release Process Document
Package Deliverables
^^^^^^^^^^^^^^^^^^^^
looks ok
Package Release Process
^^^^^^^^^^^^^^^^^^^^^^^
When we want to release another version of the raiden-contracts package, we need to:
. Check if any source code changes have been done <check-source-changes>_. yes If yes:
. Bump the version on the smart contracts <bump-contracts>_ locally done
. Deploy smart contracts <_deploy-contracts> on all the supported chains and overwrite ``deployment*,json`` files with the new deployment data. locally done
. Verify the deployed smart contracts on Etherscan <verify-contracts>_ locally done
. Measure Gas Costs <measure-gas>_ and update constants.pylocally done
. Bump the package version <bump-package>_ locally done minor bump
. Release the new package version <_release-package>_
services -- careful to use WETH as --token-address! I need to create an issue or PR about this
raiden
token
register
$ python -m raiden_contracts.deploy services --rpc-provider <snip> --private-key <snip> --gas-price 15 --gas-limit 6000000 --token-address 0xc778417e063141139fce010982780140aa0cd5ab
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying ServiceRegistry txHash=0x53243e2853a244f022d408d3e9bad5d8118ce1488d7fe8603de34255a9e20dc7, contracts version 0.6.0
INFO:__main__:ServiceRegistry address: 0xEfd9e542C42098667dE4a291B77439BbdC9358a4. Gas used: 748971
DEBUG:__main__:Deploying UserDeposit txHash=0x1d4a919d1eca7ba1c5b32b4c72b7cd0d21d75317e1ff056e0c542f3b9a3b95dc, contracts version 0.6.0
INFO:__main__:UserDeposit address: 0x93Ff35a97C8FCFafD0dfe0785d960a88fd704d38. Gas used: 1414582
DEBUG:__main__:Deploying MonitoringService txHash=0xf4b83be0ed18afd33d7d12a0a2411d9adf8b8e9fb34aeab51619e1c8ff4b29e8, contracts version 0.6.0
INFO:__main__:MonitoringService address: 0x9837584DE1BE019B039415ad383FE2B19928aAB3. Gas used: 1603991
DEBUG:__main__:Deploying OneToN txHash=0xf91e08b8ebbc5790781d77d8cbba53386db73e1532ba4d904a6b1710d75b74c7, contracts version 0.6.0
INFO:__main__:OneToN address: 0x058Ec47F9750e0616134a1405093514dFE9646F5. Gas used: 758340
DEBUG:__main__:Calling UserDeposit.init() with msc_address=0x9837584DE1BE019B039415ad383FE2B19928aAB3 one_to_n_address=0x058Ec47F9750e0616134a1405093514dFE9646F5
DEBUG:__main__:Sending txHash=0x1fca1f2d1b6f62ada5b39b0ae6dc09a72bd37954a040e69e3934d746165b1173
Deployment information for chain id = 3 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_ropsten.json.
ServiceRegistry at 0xEfd9e542C42098667dE4a291B77439BbdC9358a4 matches the compiled data from contracts.json
UserDeposit at 0x93Ff35a97C8FCFafD0dfe0785d960a88fd704d38 matches the compiled data from contracts.json
MonitoringService at 0x9837584DE1BE019B039415ad383FE2B19928aAB3 matches the compiled data from contracts.json
OneToN at 0x058Ec47F9750e0616134a1405093514dFE9646F5 matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_ropsten.json has been verified and it is CORRECT.
{
"ServiceRegistry": "0xEfd9e542C42098667dE4a291B77439BbdC9358a4",
"UserDeposit": "0x93Ff35a97C8FCFafD0dfe0785d960a88fd704d38",
"MonitoringService": "0x9837584DE1BE019B039415ad383FE2B19928aAB3",
"OneToN": "0x058Ec47F9750e0616134a1405093514dFE9646F5"
}
$ python -m raiden_contracts.deploy raiden --rpc-provider <snip> --private-key <snip> --gas-price 14 --gas-limit 6000000
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying EndpointRegistry txHash=0xbf9850a957ac7bd53cc309604b8421b533c8532a2af1a147ab0f67260fc8df33, contracts version 0.6.0
INFO:__main__:EndpointRegistry address: 0x1588c2c2D57B66Dd5c15D7bA2049829a0938Adc2. Gas used: 555302
DEBUG:__main__:Deploying SecretRegistry txHash=0x6cc1e428d2851d12e75feedc2d314b4be729fb209e3a1ebbbf713d95633a7423, contracts version 0.6.0
INFO:__main__:SecretRegistry address: 0xb2aeBeF06Ea899Cd4C35E63C2434b6bEeC656EA4. Gas used: 313274
DEBUG:__main__:Deploying TokenNetworkRegistry txHash=0x35a05a02bac2dea0ffed3fa211e105a2d6fa30a005bff9eb04674171b62d9090, contracts version 0.6.0
INFO:__main__:TokenNetworkRegistry address: 0xa5519c23c756e54fcf5ABEeeA11ffb98e008Fc73. Gas used: 4708092
Deployment information for chain id = 3 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_ropsten.json.
EndpointRegistry at 0x1588c2c2D57B66Dd5c15D7bA2049829a0938Adc2 matches the compiled data from contracts.json
SecretRegistry at 0xb2aeBeF06Ea899Cd4C35E63C2434b6bEeC656EA4 matches the compiled data from contracts.json
TokenNetworkRegistry at 0xa5519c23c756e54fcf5ABEeeA11ffb98e008Fc73 matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_ropsten.json has been verified and it is CORRECT.
{
"EndpointRegistry": "0x1588c2c2D57B66Dd5c15D7bA2049829a0938Adc2",
"SecretRegistry": "0xb2aeBeF06Ea899Cd4C35E63C2434b6bEeC656EA4",
"TokenNetworkRegistry": "0xa5519c23c756e54fcf5ABEeeA11ffb98e008Fc73"
}
$ python -m raiden_contracts.deploy token --rpc-provider <snip> --private-key <snip> --gas-price 13 --token-supply 10000000 --token-name TestToken --token-decimals 18 --token-symbol TTT
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying CustomToken txHash=0x48d0952029541fa4a6a6a15c38eaec7a9e2bea5ab680a8f28d4bb7aff1050c43, contracts version 0.6.0
INFO:__main__:CustomToken address: 0x197FF14aedB60CC5ACB56c74AFa92C1a14D6c863. Gas used: 1475782
{
"CustomToken": "0x197FF14aedB60CC5ACB56c74AFa92C1a14D6c863"
}
$ python -m raiden_contracts.deploy register --rpc-provider <snip> --private-key <snip> --gas-price 12 --token-address 0x197FF14aedB60CC5ACB56c74AFa92C1a14D6c863 --registry-address 0xa5519c23c756e54fcf5ABEeeA11ffb98e008Fc73
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:calling createERC20TokenNetwork(0x197FF14aedB60CC5ACB56c74AFa92C1a14D6c863) txHash=0x8a6f93bf74e6dc752b6b8fd92b50dcea1eefa29e3ec3a8210fe63c2cf611833d
TokenNetwork address: 0x5977EF72a5aC7a839f0de686407B09b5288C9E5e Gas used: 3060597
Rinkeby - for all releases done as below
services
raiden
token
register
$ python -m raiden_contracts.deploy services \
> --rpc-provider $RINKEBY \
> --private-key $PRIV_RINKEBY \
> --gas-price 12 --gas-limit 6000000 \
> --token-address 0xc778417E063141139Fce010982780140Aa0cD5Ab
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying ServiceRegistry txHash=0x6e79d445012a7a85ed01a83744b8489000b3e0a6ec03ff5eb1139be2757a88af, contracts version 0.6.0
INFO:__main__:ServiceRegistry address: 0x5AaB86ffad99e2a9d89E009F4c927Bd371699Cce. Gas used: 748971
DEBUG:__main__:Deploying UserDeposit txHash=0x79ba608940f2ef7d3018d533b3383b577d4df21a3f157e17f08990b1757a7f0c, contracts version 0.6.0
INFO:__main__:UserDeposit address: 0xfa6B070b8EBD3DBD3fe0350fD611622d95Aa0Fb9. Gas used: 1414582
DEBUG:__main__:Deploying MonitoringService txHash=0x6c4dd48dadacdfaf8abeb600d5897d6caa6a562c7231928ec47ee941190a632d, contracts version 0.6.0
INFO:__main__:MonitoringService address: 0xA0ED03b276cA581e8F120b5DcFe152DaAb0162d9. Gas used: 1603927
DEBUG:__main__:Deploying OneToN txHash=0x095bf812603072c1ec8b41029fd84d45108640b8b88602a9dfc045ba5dcaf8f4, contracts version 0.6.0
INFO:__main__:OneToN address: 0x61b1Eda4435d7C04fD226D673A640d10024D1fe3. Gas used: 758340
DEBUG:__main__:Calling UserDeposit.init() with msc_address=0xA0ED03b276cA581e8F120b5DcFe152DaAb0162d9 one_to_n_address=0x61b1Eda4435d7C04fD226D673A640d10024D1fe3
DEBUG:__main__:Sending txHash=0x9b5b3dd428bb0eac2479eeaf4acf2443a905d400442bf1df60eb38535b755dfd
Deployment information for chain id = 4 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_rinkeby.json.
ServiceRegistry at 0x5AaB86ffad99e2a9d89E009F4c927Bd371699Cce matches the compiled data from contracts.json
UserDeposit at 0xfa6B070b8EBD3DBD3fe0350fD611622d95Aa0Fb9 matches the compiled data from contracts.json
MonitoringService at 0xA0ED03b276cA581e8F120b5DcFe152DaAb0162d9 matches the compiled data from contracts.json
OneToN at 0x61b1Eda4435d7C04fD226D673A640d10024D1fe3 matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_rinkeby.json has been verified and it is CORRECT.
{
"ServiceRegistry": "0x5AaB86ffad99e2a9d89E009F4c927Bd371699Cce",
"UserDeposit": "0xfa6B070b8EBD3DBD3fe0350fD611622d95Aa0Fb9",
"MonitoringService": "0xA0ED03b276cA581e8F120b5DcFe152DaAb0162d9",
"OneToN": "0x61b1Eda4435d7C04fD226D673A640d10024D1fe3"
}
$ python -m raiden_contracts.deploy raiden \
> --rpc-provider $RINKEBY \
> --private-key $PRIV_RINKEBY \
> --gas-price 12 --gas-limit 6000000
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying EndpointRegistry txHash=0x5db419bdbd44372604f703fa342d4a209fc412f085adc70d7dd5d61938da15fb, contracts version 0.6.0
INFO:__main__:EndpointRegistry address: 0x6480c807E5dD02A00F52B6A31Ce2682242Abbdfe. Gas used: 555302
DEBUG:__main__:Deploying SecretRegistry txHash=0xa42ad6d0b3c261028f4462aff3c10db3df25f45d214e099a835ec13cf40ed96d, contracts version 0.6.0
INFO:__main__:SecretRegistry address: 0xB06670589aD705C6c30E314610F63aFe5d638e14. Gas used: 313274
DEBUG:__main__:Deploying TokenNetworkRegistry txHash=0x0d9c01f30c952c57fcf509195d728e3a32a731bd491c6a0cc96cf8294b10491e, contracts version 0.6.0
INFO:__main__:TokenNetworkRegistry address: 0x6f7aaB0ba0B38B95Bd1363A61eC4448dF27FC92a. Gas used: 4703292
Deployment information for chain id = 4 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_rinkeby.json.
EndpointRegistry at 0x6480c807E5dD02A00F52B6A31Ce2682242Abbdfe matches the compiled data from contracts.json
SecretRegistry at 0xB06670589aD705C6c30E314610F63aFe5d638e14 matches the compiled data from contracts.json
TokenNetworkRegistry at 0x6f7aaB0ba0B38B95Bd1363A61eC4448dF27FC92a matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_rinkeby.json has been verified and it is CORRECT.
{
"EndpointRegistry": "0x6480c807E5dD02A00F52B6A31Ce2682242Abbdfe",
"SecretRegistry": "0xB06670589aD705C6c30E314610F63aFe5d638e14",
"TokenNetworkRegistry": "0x6f7aaB0ba0B38B95Bd1363A61eC4448dF27FC92a"
}
$ python -m raiden_contracts.deploy token --rpc-provider $RINKEBY --private-key $PRIV_RINKEBY --gas-price 13 --token-supply 10000000 --token-name TestToken --token-decimals 18 --token-symbol TTT
Web3 provider is RPC connection http://geth.rinkeby.ethnodes.brainbot.com:8545
Enter the private key password:
DEBUG:__main__:Deploying CustomToken txHash=0xdbe2c44eb56b02fece0bd629fa2d6675e6937a740f07cc76a8e1f7bfb1808675, contracts version 0.6.0
INFO:__main__:CustomToken address: 0xCD666869C48634Aa103888ebfD5C1452D8F58202. Gas used: 1475782
{
"CustomToken": "0xCD666869C48634Aa103888ebfD5C1452D8F58202"
}
$ python -m raiden_contracts.deploy register --rpc-provider $RINKEBY --private-key $PRIV_RINKEBY --gas-price 12 --token-address 0xCD666869C48634Aa103888ebfD5C1452D8F58202 --registry-address 0x6f7aaB0ba0B38B95Bd1363A61eC4448dF27FC92a
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:calling createERC20TokenNetwork(0xCD666869C48634Aa103888ebfD5C1452D8F58202) txHash=0x12a93e3848edb693371dec07300c437074a8e1427a475139be9ab316bed97e99
TokenNetwork address: 0x378ed59843a5337ee2D04d826ff26306c774fb25 Gas used: 3055797
Kovan - for all releases done as below
services
raiden
token
register
$ python -m raiden_contracts.deploy services \
> --rpc-provider $KOVAN \
> --private-key $PRIV_KOVAN \
> --gas-price 12 --gas-limit 6000000 \
> --token-address 0xd0a1e359811322d97991e03f863a0c30c2cf029c
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying ServiceRegistry txHash=0xfe766cbbfd50539267dd5ea41f12b1707aebe53036c9338cf3a8ea2b0230dc49, contracts version 0.6.0
INFO:__main__:ServiceRegistry address: 0x7b9aa750740e8A546CeB1a658e2131FD1725282c. Gas used: 749019
DEBUG:__main__:Deploying UserDeposit txHash=0x3bc6a54a0f469c2ec98b1e3bd88ecfc12c20c087a8a0862b1194bca985b7dcc7, contracts version 0.6.0
INFO:__main__:UserDeposit address: 0xC6721d074A01Df152560b7a42e828BE44A7BF751. Gas used: 1414630
DEBUG:__main__:Deploying MonitoringService txHash=0xd6c3c0543fb3cd116ac6f9a57fe99fa80cc991406cd7fdddafa0731153cc8daf, contracts version 0.6.0
INFO:__main__:MonitoringService address: 0xd62f660c15f3EAe8a868085808653b9a6093C1Af. Gas used: 1604039
DEBUG:__main__:Deploying OneToN txHash=0x1fe6a10b65cee9d13505a4f10d0b52aef8781e4fa9a163f908a1b53802f16380, contracts version 0.6.0
INFO:__main__:OneToN address: 0xC2217eE654fd4815a78C1725ACD36d7913C9C709. Gas used: 758340
DEBUG:__main__:Calling UserDeposit.init() with msc_address=0xd62f660c15f3EAe8a868085808653b9a6093C1Af one_to_n_address=0xC2217eE654fd4815a78C1725ACD36d7913C9C709
DEBUG:__main__:Sending txHash=0xca6fd030318f99ab4821ee2e7298045b2bc5ba8aeec02c81834d30790dba5e13
Deployment information for chain id = 42 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_kovan.json.
ServiceRegistry at 0x7b9aa750740e8A546CeB1a658e2131FD1725282c matches the compiled data from contracts.json
UserDeposit at 0xC6721d074A01Df152560b7a42e828BE44A7BF751 matches the compiled data from contracts.json
MonitoringService at 0xd62f660c15f3EAe8a868085808653b9a6093C1Af matches the compiled data from contracts.json
OneToN at 0xC2217eE654fd4815a78C1725ACD36d7913C9C709 matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_services_kovan.json has been verified and it is CORRECT.
{
"ServiceRegistry": "0x7b9aa750740e8A546CeB1a658e2131FD1725282c",
"UserDeposit": "0xC6721d074A01Df152560b7a42e828BE44A7BF751",
"MonitoringService": "0xd62f660c15f3EAe8a868085808653b9a6093C1Af",
"OneToN": "0xC2217eE654fd4815a78C1725ACD36d7913C9C709"
}
$ python -m raiden_contracts.deploy raiden \
> --rpc-provider $KOVAN \
> --private-key $PRIV_KOVAN \
> --gas-price 12 --gas-limit 6000000
Web3 provider is RPC connection http://parity.kovan.ethnodes.brainbot.com:8545
Enter the private key password:
DEBUG:__main__:Deploying EndpointRegistry txHash=0x6208f84c807ed092c0b1a684b53a33a560066b6e7076c317f1e96804c4e0bc32, contracts version 0.6.0
INFO:__main__:EndpointRegistry address: 0x175DC016d515872D93f8Dc7998502452508B4288. Gas used: 555302
DEBUG:__main__:Deploying SecretRegistry txHash=0xaf30d8894617422381b10d58ccfd568f6331fc01158a5d63cdfc20cd5044faab, contracts version 0.6.0
INFO:__main__:SecretRegistry address: 0xd1984E513294CFd99abA6C760A27e3F1608Da776. Gas used: 313274
DEBUG:__main__:Deploying TokenNetworkRegistry txHash=0x1dbf9a6387bd617bfeecb38c170359e7d2278abf3500f63d8589c07f186dc446, contracts version 0.6.0
INFO:__main__:TokenNetworkRegistry address: 0xfa1D64B6463c22d012AE2fBBB29936BcB1e46540. Gas used: 4708092
Deployment information for chain id = 42 has been updated at /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_kovan.json.
EndpointRegistry at 0x175DC016d515872D93f8Dc7998502452508B4288 matches the compiled data from contracts.json
SecretRegistry at 0xd1984E513294CFd99abA6C760A27e3F1608Da776 matches the compiled data from contracts.json
TokenNetworkRegistry at 0xfa1D64B6463c22d012AE2fBBB29936BcB1e46540 matches the compiled data from contracts.json
Deployment info from /home/yh/src/raiden-contracts/raiden_contracts/data/deployment_kovan.json has been verified and it is CORRECT.
{
"EndpointRegistry": "0x175DC016d515872D93f8Dc7998502452508B4288",
"SecretRegistry": "0xd1984E513294CFd99abA6C760A27e3F1608Da776",
"TokenNetworkRegistry": "0xfa1D64B6463c22d012AE2fBBB29936BcB1e46540"
}
$ python -m raiden_contracts.deploy token --rpc-provider $KOVAN --private-key $PRIV_KOVAN --gas-price 13 --token-supply 10000000 --token-name TestToken --token-decimals 18 --token-symbol TTT
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:Deploying CustomToken txHash=0xb5dba82bfc28e540804ffee6439e25e68e86a1dc5c599ae9940282028ab1d936, contracts version 0.6.0
INFO:__main__:CustomToken address: 0x2F14351faCc91DA216E2aa6ee5E8D666462E7C5B. Gas used: 1475782
{
"CustomToken": "0x2F14351faCc91DA216E2aa6ee5E8D666462E7C5B"
}
$ python -m raiden_contracts.deploy register --rpc-provider $KOVAN --private-key $PRIV_KOVAN --gas-price 12 --token-address 0x2F14351faCc91DA216E2aa6ee5E8D666462E7C5B --registry-address 0xfa1D64B6463c22d012AE2fBBB29936BcB1e46540
Web3 provider is RPC connection <snip>
Enter the private key password:
DEBUG:__main__:calling createERC20TokenNetwork(0x2F14351faCc91DA216E2aa6ee5E8D666462E7C5B) txHash=0x2d865c1c598c7b477bea39a532db0c88cf1028c38db25a127c24e1648f6c7ead
TokenNetwork address: 0xe7Bde18DA537BDF255C94250147Ea498cFCbe39C Gas used: 3060597
Mainnet - only for pre-major or major releases skipped for this release
raiden_contracts package provides some constants <https://github.com/raiden-network/raiden-contracts/blob/de13cf9aa7ad7ed230ff204e47103def6a14b0be/raiden_contracts/constants.py#L35>__ showing the amount of gas that each operation requires. This information is manually updated. The amounts can be measured with a script
I copied-and-pasted the release document. I'll remove/strike out what is done.
Release Process Document
Package Deliverables ^^^^^^^^^^^^^^^^^^^^
looks ok
Package Release Process ^^^^^^^^^^^^^^^^^^^^^^^
When we want to release another version of the
raiden-contracts
package, we need to:.
Check if any source code changes have been done <check-source-changes>
_. yes If yes:.
Bump the version on the smart contracts <bump-contracts>
_ locally done.
Deploy smart contracts <_deploy-contracts>
on all the supported chains and overwrite ``deployment*,json`` files with the new deployment data. locally done.
Verify the deployed smart contracts on Etherscan <verify-contracts>
_ locally done.
Measure Gas Costs <measure-gas>
_ and updateconstants.py
locally done.
Bump the package version <bump-package>
_ locally done minor bump.
Release the new package version <_release-package>
_Deploy Smart Contracts
Instructions for deploying the contracts can be found at https://github.com/raiden-network/raiden-contracts#deployment-on-a-testnet, using the
python -m raiden_contracts.deploy
script. We currently deploy on:.. _verify-contracts:
Etherscan Verification
Etherscan verification is documented here: https://github.com/raiden-network/raiden-contracts#verification-with-etherscan. done for all three test networks
.. _measure-gas:
Measure Gas Costs
raiden_contracts
package providessome constants <https://github.com/raiden-network/raiden-contracts/blob/de13cf9aa7ad7ed230ff204e47103def6a14b0be/raiden_contracts/constants.py#L35>
__ showing the amount of gas that each operation requires. This information is manually updated. The amounts can be measured with a script::
Change the Versions of CHANGELOG.md
Also done
Unreleased
section into a new release section... _release-package:
Trigger Package Release
Push the newly created local tag (created at the previous step, e.g.
v0.9.0
) directly to themaster
branch. This will triggertravis
to upload the pypi package automatically, as seen here: https://github.com/raiden-network/raiden-contracts/blob/9fd2124eb648a629aee886f37ade5e502431371f/.travis.yml#L36-L47.