514 releases

0.3.50 Jan 31, 2024
0.2.383 Jan 8, 2024
0.2.365 Dec 29, 2023
0.2.315 Nov 29, 2023
0.1.4 Mar 23, 2023

#1830 in Network programming

Download history 93/week @ 2024-01-17 95/week @ 2024-01-24 10/week @ 2024-01-31 33/week @ 2024-02-28 1739/week @ 2024-03-13 1164/week @ 2024-03-20 45/week @ 2024-03-27 46/week @ 2024-04-03

3,367 downloads per month

GPL-3.0 license

56KB
1K SLoC

sn_testnet

This crate has utilities for working with local test networks.

It exposes two structs, Testnet and TestnetBuilder, that can be used to configure and launch local test networks:

let (mut testnet, network_contacts_path) = Testnet::configure()
    .node_bin_path("~/.safe/node/safenode")
    .node_launch_interval(5000)
    .clear_nodes_dir()
    .flamegraph_mode(true)
    .build()?;
testnet.launch_genesis(None, vec["--json-output"])?;
testnet.launch_nodes(30, &network_contacts_path, vec!["--json-output"])?;
testnet.configure_network_contacts(&network_contacts_path)?;

It also has a binary, testnet, which can be used to create local test networks and have new nodes join an existing network. Run testnet --help to see the tool can be used.

License

This Safe Network repository is licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).

Dependencies

~20–33MB
~513K SLoC