-
Notifications
You must be signed in to change notification settings - Fork 2
Network Management
The following is a reference guide for all of the commands to manage a network. There is also a walk through to create your own network.
All of the following commands are accessible from net mode. Learn more about command line modes
Usage: create
Create a network and output the network contract address. This action requires marcos and a block confirmation to complete. As such, it can take over a minute to complete in some cases.
Example:
$ mcli -console
> j net
> create
To create a network AND use it with the current machine pass the use parameter at the end of the command.
Example:
> create use
Usage: use <0x_NETWORK_CONTRACT_ADDRESS>
Specify a network for use with future network commands like peer add_relation
Example:
$ mcli -console
> j net
> use 0xa660fF4B0be3669B926a2FC160C114CE7a5C4664
Using network contract:
0xa660fF4B0be3669B926a2FC160C114CE7a5C4664
Usage: join <0x_NETWORK_CONTRACT_ADDRESS>
Join the specified network.
Example:
$ mcli -console
> j net
> join 0xa660fF4B0be3669B926a2FC160C114CE7a5C4664
Successfully updated networkContractAddress in config.yml 0xa660fF4B0be3669B926a2FC160C114CE7a5C4664
Usage: info <0x_NETWORK_CONTRACT_ADDRESS>
Display network info including which peers are in the network and the account address that administers the network.
Example:
$ mcli -console
> j net
> info 0x23369304a69B468b619298806655810bc783DD57
Network Info:
Contract Address 0x23369304a69B468b619298806655810bc783DD57
Admin 0x7c3031E6F4E28d3CeeF5B4a452499cDD0E71a803
Peers:
10.27.16.10/24 Nx0a150e819460d8b9ec0aac551acbbf38c2bfcf4b
10.27.16.11/24 Nx4869aa87208d3aa107da0f36609957c34a046a9d
10.27.16.12/24 Nx1abe2b6e2de5414fa1014882caa943afe57298cd
Usage: delete <0x_NETWORK_CONTRACT_ADDRESS>
Delete a network.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> delete 0xa660fF4B0be3669B926a2FC160C114CE7a5C4664
Usage: peer add <Nx_NODEID>
Add a node to the network. Note a peer relation must be added via peer add_relation to create an mPipe between the nodes.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> peer add Nx0a150e819460d8b9ec0aac551acbbf38c2bfcf4b
Usage: peer add_relation <Nx_NODEID> <Nx_NODEID>
Create an mPipe between two nodes in the network. This implicitly adds a peer to the network.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> peer add_relation Nx0a150e819460d8b9ec0aac551acbbf38c2bfcf4b Nx1abe2b6e2de5414fa1014882caa943afe57298cd
Usage: peer relations <Nx_NODEID>
Output info for peers connected to the specified node.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> peer relations Nx4869aa87208d3aa107da0f36609957c34a046a9d
Retrieved peers:
Peer0 Nx0a150e819460d8b9ec0aac551acbbf38c2bfcf4b
Peer1 Nx1abe2b6e2de5414fa1014882caa943afe57298cd
Usage: peer info <Nx_NODEID>
Display info for the specified node.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> peer info Nx0a150e819460d8b9ec0aac551acbbf38c2bfcf4b
Peer Info:
Network Id 12
IP 10.27.16.10/24
Active true
Peers:
0 Nx4869aa87208d3aa107da0f36609957c34a046a9d
1 Nx1abe2b6e2de5414fa1014882caa943afe57298cd
Usage: peer remove <Nx_NODEID>
Removes a peer from a network.
The network needs to be set via use before this command can be run.
Example:
$ mcli -console
> j net
> use 0x23369304a69B468b619298806655810bc783DD57
> peer remove Nx4869aa87208d3aa107da0f36609957c34a046a9d
To submit feedback or report technical issues, please email support@marconi.org