Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Update scenario to firstAllowedBlockToMonitor
Browse files Browse the repository at this point in the history
also
* switch from time to block numbers
* remove hard coded raiden executable
  • Loading branch information
karlb authored and czepluch committed May 17, 2019
1 parent 4ce3fc2 commit ba12034
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions scenarios/scenario_ms_monitor_and_claim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,33 @@ token:
nodes:
mode: managed
count: 2
# Adapt path to Raiden executable
raiden_version: /home/pirate/raiden/venv/RaidenClient/bin/raiden

default_options:
gas-price: fast
environment-type: development
enable-monitoring: true

# The scenario is fairly simple. A channel between two nodes is opened, a transfer is made. Then, node 1 gets stopped
# and node 0 closes the channel. the last assert checks whether the monitoring service interferes and received its reward
# and node 0 closes the channel. The last assert checks whether the monitoring service interferes and received its reward

scenario:
serial:
tasks:
- open_channel: {from: 0, to: 1, total_deposit: 1000}
- transfer: {from: 0, to: 1, amount: 500, expected_http_status: 200}
## Wait for Monitor Request to be sent
- wait: 10
- wait_blocks: 1
- store_channel_info: {from: 0, to: 1, key: "MS Test Channel"}
- stop_node: 1
- close_channel: {from: 0, to: 1}
## Wait for channel to be closed
- wait: 50
- wait_blocks: 1
- assert: {from: 0 , to: 1, total_deposit: 1000, balance: 500, state: "closed"}
- assert_events: {contract_name: "TokenNetwork", event_name: "ChannelClosed", num_events: 1}
## Current blocktime Kovan 15s, so monitoring service reacts after 0.3 * 500 * 15 seconds
- wait: 3000 #change to 3000 before submitting
## The MS reacts after 0.8 * settle_timeout at the latest. 0.8 * 500 = 400
- wait_blocks: 401
- assert_events: {contract_name: "TokenNetwork", event_name: "NonClosingBalanceProofUpdated", num_events: 1}
## Monitored channel must be settled before the monitoring service can claim its reward
## Settlement timeout is 500 blocks -> 500 * 15s in Kovan = 7500s
- wait: 8000
## Settlement timeout is 500, but we've already waited 400 blocks.
- wait_blocks: 100
- assert_ms_claim: {channel_info_key: "MS Test Channel"}

0 comments on commit ba12034

Please sign in to comment.