Add step to check voucher after payment

This commit is contained in:
Neeraj 2024-08-28 11:01:23 +05:30
parent e24324f63f
commit 3328a75197

View File

@ -530,6 +530,9 @@
```bash
laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4006 -h nitro-bridge"
# Expected output:
# []
```
- Set address of bridge and address of custom token on L1 in the current terminal
@ -550,7 +553,17 @@
```
- Once direct-fund objective is complete, bridge will create mirrored channel on L2
- Check node A' logs to see bridged-fund objective completed
```bash
laconic-so deployment --dir l2alice-nitro-deployment logs nitro-node -f --tail 30
# Expected Output:
# nitro-node-1 | 5:01AM INF INFO Objective cranked address=0x4B64e26da8279AB12bcd4cA9974eC2b4741e175e objective-id=bridgedfunding-0xfe39595894549283b4ffb4c1e3715856e766af00e18bc968d4c61c9267af528a waiting-for=WaitingForNothing
# nitro-node-1 | 5:01AM INF INFO Objective is complete & returned to API address=0x4B64e26da8279AB12bcd4cA9974eC2b4741e175e objective-id=bridgedfunding-0xfe39595894549283b4ffb4c1e3715856e766af00e18bc968d4c61c9267af528a
```
- Check the [Troubleshooting](#troubleshooting) section if command to create a ledger channel fails or gets stuck
- Check status of L1 ledger channel between A and Bridge using channel ID in output above
@ -584,7 +597,17 @@
```
- Once direct fund objective is complete, bridge will create mirrored channel on L2
- Check node C' logs to see bridged-fund objective completed
```bash
laconic-so deployment --dir l2charlie-nitro-deployment logs nitro-node -f --tail 30
# Expected Output:
# nitro-node-1 | 5:06AM INF INFO Objective cranked address=0x03Eb7a84E286c671836b9897AaE24b31D36f9cA8 objective-id=bridgedfunding-0xcfa4c78ec3e8a95b7d2176ff99c7af5a56b040043894dba3962e60fc855741d3 waiting-for=WaitingForNothing
# nitro-node-1 | 5:06AM INF INFO Objective is complete & returned to API address=0x03Eb7a84E286c671836b9897AaE24b31D36f9cA8 objective-id=bridgedfunding-0xcfa4c78ec3e8a95b7d2176ff99c7af5a56b040043894dba3962e60fc855741d3
```
- Check the [Troubleshooting](#troubleshooting) section if command to create a ledger channel fails or gets stuck
- Check status of L1 ledger channel between C and Bridge using channel ID in output above
@ -613,8 +636,32 @@
laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4006 -h nitro-bridge"
# Expected output:
# {"ID":"0x5648967ca443ea02cd50c1f5e3d58a43a96fdbf1c1d225ce436188ca33ea1753","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","Them":"0x4b64e26da8279ab12bcd4ca9974ec2b4741e175e","MyBalance":1000000,"TheirBalance":1000000},"ChannelMode":"Open"}
#{"ID":"0x7469ab77ee580b2da6135fbf58a21ea47869651fafed5f777e520efb0d36f417","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","Them":"0x03eb7a84e286c671836b9897aae24b31d36f9ca8","MyBalance":1000000,"TheirBalance":1000000},"ChannelMode":"Open"}
# [
# {
# "ID": "0xcfa4c78ec3e8a95b7d2176ff99c7af5a56b040043894dba3962e60fc855741d3",
# "Status": "Open",
# "Balance": {
# "AssetAddress": "<Token address on L2>",
# "Me": "0xbbb676f9cff8d242e9eac39d063848807d3d1d94",
# "Them": "0x03eb7a84e286c671836b9897aae24b31d36f9ca8",
# "MyBalance": 1000000,
# "TheirBalance": 1000000
# },
# "ChannelMode": "Open"
# },
# {
# "ID": "0xfe39595894549283b4ffb4c1e3715856e766af00e18bc968d4c61c9267af528a",
# "Status": "Open",
# "Balance": {
# "AssetAddress": "<Token address on L2>",
# "Me": "0xbbb676f9cff8d242e9eac39d063848807d3d1d94",
# "Them": "0x4b64e26da8279ab12bcd4ca9974ec2b4741e175e",
# "MyBalance": 1000000,
# "TheirBalance": 1000000
# },
# "ChannelMode": "Open"
# }
# ]
```
In above expected output the following are observed
@ -680,6 +727,19 @@
# }
```
- Check largest voucher received on the payment channel
```bash
laconic-so deployment --dir l2charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-voucher $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
# Expected output:
# {
# Amount: 200,
# ChannelId: '0x271aa07b32dc6c7d3b1cb9259a8dc86b82254d84a093ab695c7a4fc25fc402e3',
# Signature: '0x8fbdb9bb91932b422c30cc07bf422e4f1c3ae1be1b60e01bbfcb193ae5c8f5b0571de84667d87b5ef9b737287faa0ddf41f1f9fc159673205679622c69fd69d81b'
# }
```
- Check payment channel status again to view updated channel state
```bash