Below is an example scenario:
LiteClient: Ef_cmIsszQinqjDnK4LIib3vSBE8Zhf-ytgRJDGispoD-Et5
TxChecker: Ef8zZWfeh22ib982EIgo_FZM0n2Iym1WHFBRBA_H7BEfsoMK
- Deploy the system to fastnet using key block 27788014 from testnet.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml deploy all -s 27788014 -w -1- send checkBlock for a block in the same epoch → OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef_cmIsszQinqjDnK4LIib3vSBE8Zhf-ytgRJDGispoD-Et5 check-block -s 27788015- send checkBlock for the previous epoch → Not OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef_cmIsszQinqjDnK4LIib3vSBE8Zhf-ytgRJDGispoD-Et5 check-block -s 27788013- send checkTransaction with a valid transaction in the current epoch → OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef8zZWfeh22ib982EIgo_FZM0n2Iym1WHFBRBA_H7BEfsoMK check-tx -s 27788020 -t 7E55E639D4EF717A89A06C5F20937768151E31F822DCFA04751C743721CCCA21Contract chain: wallet -> tx_checker -> lite_client -> tx_checker -> wallet (transaction_checked#756adff1)
Link to tx from lite_client to checker: link
- send checkTransaction with a transaction in the prev epoch → Not OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef8zZWfeh22ib982EIgo_FZM0n2Iym1WHFBRBA_H7BEfsoMK check-tx -s 27788013 -t E0F62001C2F78F3FB54199762EE382A7AF03AEF4D86A85EF6BA8FEDB58604CBFContract chain: wallet -> tx_checker -> lite_client -> (bounce) tx_checker
Link to tx with bounced msg from lite_client: link
- send newKeyBlock with an old block → Not OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef_cmIsszQinqjDnK4LIib3vSBE8Zhf-ytgRJDGispoD-Et5 new-key-block -s 27787289- send newKeyBlock with new epoch -> OK.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef_cmIsszQinqjDnK4LIib3vSBE8Zhf-ytgRJDGispoD-Et5 new-key-block -s 27793804- send checkTransaction with tx in new epoch -> Ok.
go run main.go --network fastnet --config ./.trustless-bridge-cli.yaml send -a Ef8zZWfeh22ib982EIgo_FZM0n2Iym1WHFBRBA_H7BEfsoMK check-tx -s 27793805 -t E9FC1788AA8976959922CE27EDF0CB3E7622F62777EFF07037DB2099208E8BBBContract chain: wallet -> tx_checker -> lite_client -> tx_checker -> wallet
Link to tx from lite_client to tx_checker: link
LiteClient: EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1
TxChecker: EQCEILr1N8ey9Ar-9OtnCq8A4v217lsE0pJuEZgrZOStAVVa
- Deploy the system to testnet using key block 765944 from fastnet.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml deploy all -s 765944 -w 0- send checkBlock for a block in the same epoch → OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1 check-block -s 765945- send checkBlock for the previous epoch → Not OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1 check-block -s 765940- send checkTransaction with a valid transaction in the current epoch → OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQCEILr1N8ey9Ar-9OtnCq8A4v217lsE0pJuEZgrZOStAVVa check-tx -s 765950 -t 5052521713ECA40FF82B354FC520D026B94601660A67574A7AF0E3DA8BF68C67- send checkTransaction with a transaction in the prev epoch → Not OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQCEILr1N8ey9Ar-9OtnCq8A4v217lsE0pJuEZgrZOStAVVa check-tx -s 765941 -t 2FEFFECAD8215086C991F68D3C42BC57A7A801A5BB45CF720FE6C4221AA42FD0- send newKeyBlock that does not change the epoch → OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1 new-key-block -s 850663- send newKeyBlock with an old block → Not OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1 new-key-block -s 765652- send newKeyBlock with new epoch -> OK.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQBGWoImJJ8Uw4Lz0b2yXjpOf31awQfXHJthrYB4zppnL3c1 new-key-block -s 850955- send checkTransaction with tx in new epoch -> Ok.
go run main.go --network testnet --config ./.trustless-bridge-cli.yaml send -a EQCEILr1N8ey9Ar-9OtnCq8A4v217lsE0pJuEZgrZOStAVVa check-tx -s 850956 -t 92C2D323580579391FDE2AB9EE0B749CF6D66D179CE0F0430F049A0735180557