-
Notifications
You must be signed in to change notification settings - Fork 34
Testnet deploy @ 2018.09.16
This is a doc served as our testnet deployment and also our QA process on testnet.
- Testnet: Kovan
- node: parity --chain kovan
- contract: 0x50e4e9dd51F071D63437c1908e93F2Db58b28785 , could check the oldest 16 transactions also the event triggered by the contract
- db backup for child chain server after QA's done: here.
- code change backup: branch testnet_2018_09_16
- One process for parity node:
parity --chain kovan
- Another process running operator child chain server:
python -m plasma_cash.child_chain
(there was port conflict on 8546 on my mac for some reason. As a result, changed the port to 8547. Need to change hardcoded port in plasma_cash/child_chain/main.py and plasma_cash/dependency_config.py). However, seems like ubuntu environment won't have same problem.
- use python ide to run commands directly (like the style in README)
Mainly changes for contract address, also turn on level db instead of default memory db.
see final change here: config.py
plasma_config = dict(
ROOT_CHAIN_CONTRACT_ADDRESS='0x50e4e9dd51F071D63437c1908e93F2Db58b28785',
AUTHORITY=b';\x08\x84\xf4\xe5\x0e\x9b\xc2\xce\x9b"J\xb7/\xea\x89\xa8\x1c\xdf|',
AUTHORITY_KEY=b'\xa1\x89i\x81|,\xef\xad\xf5+\x93\xeb \xf9\x17\xdc\xe7`\xce\x13\xb2\xac\x90%\xe06\x1a\xd1\xe7\xa1\xd4H',
)
db_config = {
'type': 'leveldb'
}
Did a manual QA on testnet. However, we did not test finalize exit
as that need to wait 2 weeks.
Tested all 3 types of challenge. Could check in the contract event.
The contract deployed to testnet is altered to emit event for all functions (see code here).
In explorer, by default, it is showing hex
in event log, need to change the last one to Text
to show human readable event log. (see following image)
- operator: 0x3B0884f4E50e9BC2CE9b224aB72feA89a81CDF7c (for convenience, same as userA)
- userA: 0x3B0884f4E50e9BC2CE9b224aB72feA89a81CDF7c
- userB: 0xb83e232458A092696bE9717045d9A605FB0FEc2b
- userC: 0x08d92dcA9038eA9433254996a2D4F08D43BE8227
All three kinds of challenge is tested within the above flow.
After userA transfer to userB, and userB transfer to userC. UserB try to exit and userC challenge it.
Continue with the previous flow, user C transfer back to userA. And then userA try to send to userB and userC, where userB's transaction is earlier then userC's one. UserC try to exit with its transaction. And userB challenged double spent since its tx comes earlier.
So from the flow above, userB is the final eligible owner of the coin. After userB start exit with its final transaction, userC tries to do a challenge. Since userB should be able to exit with the coin, userB can successfully respond the challenge.