|
| 1 | +tools |
| 2 | +----- |
| 3 | + |
| 4 | +- `parallel_tests.sh`: Tool to execute the test suite in parallel, useful to |
| 5 | + run multiple integration tests at the same time. |
| 6 | +- `startcluster.py`: This tool will generate a genesis file with a few |
| 7 | + pre-funded accounts to be used as Raidne accounts, and then run a local |
| 8 | + Geth private chain, useful for debugging. |
| 9 | +- `genesis_builder.py`: This tool will generate a genesis file. |
| 10 | +- `transfer_eth.py`: This is just a simple tool to send a eth transfer using |
| 11 | + the provided private key. |
| 12 | + |
| 13 | +debugging |
| 14 | +--------- |
| 15 | + |
| 16 | +- `mint.sh`: Tool to mint test tokens. Usage: |
| 17 | + |
| 18 | +```sh |
| 19 | +./mint.sh 0xf9BA8aDF7F7024D7de8eB37b4c981CFFe3C88Ea7 127.0.0.1:5001 127.0.0.1:5002 127.0.0.1:5000 |
| 20 | +``` |
| 21 | + |
| 22 | +The first argument is the test token with the `mintFor` function, the others |
| 23 | +are endpoints of running Raiden nodes. |
| 24 | + |
| 25 | +Note: Each of the running nodes must have test ETH on their accounts. |
| 26 | + |
| 27 | +- `channels_with_minimum_balance.py`: Tool to open multiple channels. It needs |
| 28 | + a JSON file with the following format: |
| 29 | + |
| 30 | + |
| 31 | +```json |
| 32 | +{ |
| 33 | + "networks": { |
| 34 | + "0xf9BA8aDF7F7024D7de8eB37b4c981CFFe3C88Ea7": [ |
| 35 | + { |
| 36 | + "node1": "node0", |
| 37 | + "minimum_capacity1": 1130220, |
| 38 | + "node2": "node1", |
| 39 | + "minimum_capacity2": 1130220 |
| 40 | + }, |
| 41 | + { |
| 42 | + "node1": "node1", |
| 43 | + "minimum_capacity1": 1130220, |
| 44 | + "node2": "node2", |
| 45 | + "minimum_capacity2": 1130220 |
| 46 | + } |
| 47 | + ] |
| 48 | + }, |
| 49 | + "nodes": { |
| 50 | + "node0": { |
| 51 | + "address": "0x5c11cc525590d9Ff8C7E4Af1704A39Df6c3884b5", |
| 52 | + "endpoint": "http://127.0.0.1:5000" |
| 53 | + }, |
| 54 | + "node1": { |
| 55 | + "address": "0xa9FA88442c404716623155d150c526D8F1ae82E5", |
| 56 | + "endpoint": "http://127.0.0.1:5001" |
| 57 | + }, |
| 58 | + "node2": { |
| 59 | + "address": "0x9df878E37C4B851bbe44841e72299F6f317C685C", |
| 60 | + "endpoint": "http://127.0.0.1:5005" |
| 61 | + } |
| 62 | + } |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +Under `networks` we have the *token address*, and under each token address |
| 67 | +there is a list of channels. The channels have the description of the minimum |
| 68 | +capacity and both participants. If the node happens to already have a channel |
| 69 | +with the partner, and the capacity is equal-or-over the minimum amount, nothing |
| 70 | +is done. If the channel exists and there is not sufficient balance, the script |
| 71 | +will do a deposit. If the channel does not exist the script will open it. |
| 72 | + |
| 73 | +The key `nodes` gives the local endpoint of *running* Raiden nodes, which the |
| 74 | +script will use. Each key in `nodes` dictionary defines a name, these names are |
| 75 | +then used as `node1` and `node2` to define the channel participants. |
| 76 | + |
| 77 | +Note: Each of the running nodes must have test ETH on their accounts. |
| 78 | +Note: For the deposit to work properly the nodes must have some of the required |
| 79 | +tokens, for a test token one can use `mint.sh` to acquire some. |
| 80 | + |
| 81 | +- `stress_test_transfers.py`: Script to run nodes and do some transfers. The |
| 82 | +- script requires a configuration file, like so: |
| 83 | + |
| 84 | +```ini |
| 85 | +[DEFAULT] |
| 86 | +keystore-path = ./keys |
| 87 | +eth-rpc-endpoint = parity.goerli.ethnodes.brainbot.com:8545 |
| 88 | +network-id = goerli |
| 89 | +token-address = 0xf9BA8aDF7F7024D7de8eB37b4c981CFFe3C88Ea7 |
| 90 | +pathfinding-service-address = https://pfs-goerli.services-dev.raiden.network |
| 91 | + |
| 92 | +[node1] |
| 93 | +address = 0x5c11cc525590d9Ff8C7E4Af1704A39Df6c3884b5 |
| 94 | +password-file = ./keys/pass-UTC--2019-11-22T13-47-42.489814312Z--5c11cc525590d9ff8c7e4af1704a39df6c3884b5 |
| 95 | + |
| 96 | +[node2] |
| 97 | +address = 0xa9FA88442c404716623155d150c526D8F1ae82E5 |
| 98 | +password-file = ./keys/pass-UTC--2019-11-22T13-49-45.745576867Z--a9fa88442c404716623155d150c526d8f1ae82e5 |
| 99 | + |
| 100 | +[node3] |
| 101 | +address = 0x9df878E37C4B851bbe44841e72299F6f317C685C |
| 102 | +password-file = ./keys/pass-UTC--2019-11-22T13-50-19.904075843Z--9df878e37c4b851bbe44841e72299f6f317c685c |
| 103 | +``` |
| 104 | + |
| 105 | +This script does not take into account fees, therefore it must the no-fee PFS |
| 106 | +(as per the example configuration above). |
| 107 | + |
| 108 | +pylint |
| 109 | +------ |
| 110 | + |
| 111 | +- `assert_checker.py`: Style tool that requires messages to all asserts. |
| 112 | +- `gevent_checker.py`: Enforces some rules regarding gevent that are necessary |
| 113 | + for Raiden to work properly. |
0 commit comments