Просмотр исходного кода

bin/genev: added tmux sessions script

Dastan-glitch 3 лет назад
Родитель
Сommit
5f89f4f0bb

+ 32 - 0
bin/genev/script/genevd_a.toml

@@ -0,0 +1,32 @@
+## JSON-RPC listen URL
+rpc_listen="tcp://127.0.0.1:28870"
+
+## Current display name
+#nickname="NICKNAME"
+
+## net settings
+[net]
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:28882"]
+
+## Connection slots
+outbound_connections=8
+
+## P2P external addresses
+external_addr = ["tcp://127.0.0.1:28882"]
+
+## Peers to connect to
+#peers = ["tls://127.0.0.1:28881"]
+
+## Seed nodes to connect to
+seeds=["tcp://127.0.0.1:28881"]
+
+# Prefered transports for outbound connections
+outbound_transports = ["tcp"]
+
+## these are the default configuration for the p2p network
+#manual_attempt_limit=0
+#seed_query_timeout_seconds=8
+#connect_timeout_seconds=10
+#channel_handshake_seconds=4
+#channel_heartbeat_seconds=10

+ 32 - 0
bin/genev/script/genevd_b.toml

@@ -0,0 +1,32 @@
+## JSON-RPC listen URL
+rpc_listen="tcp://127.0.0.1:28871"
+
+## Current display name
+#nickname="NICKNAME"
+
+## net settings
+[net]
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:28883"]
+
+## Connection slots
+outbound_connections=8
+
+## P2P external addresses
+external_addr = ["tcp://127.0.0.1:28883"]
+
+## Peers to connect to
+#peers = ["tls://127.0.0.1:28881"]
+
+## Seed nodes to connect to
+seeds=["tcp://127.0.0.1:28881"]
+
+# Prefered transports for outbound connections
+outbound_transports = ["tcp"]
+
+## these are the default configuration for the p2p network
+#manual_attempt_limit=0
+#seed_query_timeout_seconds=8
+#connect_timeout_seconds=10
+#channel_handshake_seconds=4
+#channel_heartbeat_seconds=10

+ 32 - 0
bin/genev/script/genevd_c.toml

@@ -0,0 +1,32 @@
+## JSON-RPC listen URL
+rpc_listen="tcp://127.0.0.1:28872"
+
+## Current display name
+#nickname="NICKNAME"
+
+## net settings
+[net]
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:28884"]
+
+## Connection slots
+outbound_connections=8
+
+## P2P external addresses
+external_addr = ["tcp://127.0.0.1:28884"]
+
+## Peers to connect to
+#peers = ["tls://127.0.0.1:28881"]
+
+## Seed nodes to connect to
+seeds=["tcp://127.0.0.1:28881"]
+
+# Prefered transports for outbound connections
+outbound_transports = ["tcp"]
+
+## these are the default configuration for the p2p network
+#manual_attempt_limit=0
+#seed_query_timeout_seconds=8
+#connect_timeout_seconds=10
+#channel_handshake_seconds=4
+#channel_heartbeat_seconds=10

+ 32 - 0
bin/genev/script/genevd_d.toml

@@ -0,0 +1,32 @@
+## JSON-RPC listen URL
+rpc_listen="tcp://127.0.0.1:28873"
+
+## Current display name
+#nickname="NICKNAME"
+
+## net settings
+[net]
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:28885"]
+
+## Connection slots
+outbound_connections=8
+
+## P2P external addresses
+external_addr = ["tcp://127.0.0.1:28885"]
+
+## Peers to connect to
+#peers = ["tls://127.0.0.1:28881"]
+
+## Seed nodes to connect to
+seeds=["tcp://127.0.0.1:28881"]
+
+# Prefered transports for outbound connections
+outbound_transports = ["tcp"]
+
+## these are the default configuration for the p2p network
+#manual_attempt_limit=0
+#seed_query_timeout_seconds=8
+#connect_timeout_seconds=10
+#channel_handshake_seconds=4
+#channel_heartbeat_seconds=10

+ 34 - 0
bin/genev/script/genevd_seed.toml

@@ -0,0 +1,34 @@
+## JSON-RPC listen URL
+rpc_listen="tcp://127.0.0.1:28880"
+
+## Current display name
+#nickname="NICKNAME"
+
+## net settings
+[net]
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:28881"]
+
+## Connection slots
+# outbound_connections=8
+
+## P2P external addresses
+# external_addr = ["tls://127.0.0.1:28881"]
+
+## Peers to connect to
+#peers = ["tls://127.0.0.1:28881"]
+
+## Seed nodes to connect to
+# seeds=["tls://lilith0.dark.fi:28881", "tls://lilith1.dark.fi:28881"]
+
+# Prefered transports for outbound connections
+outbound_transports = ["tcp"]
+
+## these are the default configuration for the p2p network
+#manual_attempt_limit=0
+#seed_query_timeout_seconds=8
+#connect_timeout_seconds=10
+#channel_handshake_seconds=4
+#channel_heartbeat_seconds=10
+
+

+ 30 - 0
bin/genev/script/tmux_sessions.sh

@@ -0,0 +1,30 @@
+#!/bin/sh
+# Start a tmux session of 4 genev daemons, and 4 genev clis.
+set -e
+
+tmux new-session -s "genevd" -n "genevd" -d
+tmux send-keys "../../../genevd --localnet --config genevd_seed.toml" Enter && sleep 1
+tmux split-window -h
+tmux send-keys "../../../genevd --localnet --config genevd_a.toml" Enter
+tmux split-window -h
+tmux send-keys "../../../genevd --localnet --config genevd_b.toml" Enter
+tmux select-pane -t 0
+tmux split-window -v
+tmux send-keys "../../../genevd --localnet --config genevd_c.toml" Enter
+tmux select-pane -t 2
+tmux split-window -v
+tmux send-keys "../../../genevd --localnet --config genevd_d.toml" Enter
+
+
+tmux new-window -t "genevd:1" -n "genev"
+tmux send-keys "../../../genev -e tcp://127.0.0.1:28870" Enter
+tmux split-window -v
+tmux send-keys "../../../genev -e tcp://127.0.0.1:28871" Enter
+tmux split-window -h
+tmux send-keys "../../../genev -e tcp://127.0.0.1:28872" Enter
+tmux select-pane -t 0
+tmux split-window -h
+tmux send-keys "../../../genev -e tcp://127.0.0.1:28873" Enter
+
+
+tmux attach