Add support for creating custom blockchain networks

Signed-off-by: Edward Evans <edward.evans@consensys.net>
pull/2/head
Edward Evans 5 years ago
parent 99274ace2f
commit 3ae296aa3f
No known key found for this signature in database
GPG Key ID: D043D2B173BC2484
  1. 3
      README.md
  2. 6
      templates/config.toml.j2

@ -45,7 +45,8 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `besu_systemd_state` | restarted | The default option for the systemd service state | | `besu_systemd_state` | restarted | The default option for the systemd service state |
| `besu_host_ip` | "" | The host IP that Besu uses for the P2P network. This specifies the host on which P2P listens | | `besu_host_ip` | "" | The host IP that Besu uses for the P2P network. This specifies the host on which P2P listens |
| `besu_default_ip` | "{{ default(ansible_host) \| default('127.0.0.1') }}" | The fallback default for `besu_host_ip` | | `besu_default_ip` | "{{ default(ansible_host) \| default('127.0.0.1') }}" | The fallback default for `besu_host_ip` |
| `besu_network` | mainnet | The network that this node will join. Other values are 'ropsten', 'rinkeby', 'goerli', 'dev'| | `besu_network` | mainnet | The network that this node will join. Other values are 'ropsten', 'rinkeby', 'goerli', 'dev' and 'custom' |
| `besu_genesis_path | ___unset___ | The path to the genesis file, only valid when `besu_network` is `custom` |
| `besu_sync_mode` | FAST | Specifies the synchronization mode. Other values are 'FULL' | | `besu_sync_mode` | FAST | Specifies the synchronization mode. Other values are 'FULL' |
| `besu_log_level` | INFO | The log level to use. Other log levels are 'OFF', 'FATAL', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL' | | `besu_log_level` | INFO | The log level to use. Other log levels are 'OFF', 'FATAL', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL' |
| `besu_p2p_port` | 30303 | Specifies the P2P listening ports (UDP and TCP). Ports must be exposed appropriately | | `besu_p2p_port` | 30303 | Specifies the P2P listening ports (UDP and TCP). Ports must be exposed appropriately |

@ -2,7 +2,11 @@
data-path="{{besu_data_dir}}" data-path="{{besu_data_dir}}"
logging="{{besu_log_level}}" logging="{{besu_log_level}}"
{% if besu_network.lower() != "custom" %}
network="{{besu_network}}" network="{{besu_network}}"
{% else %}
genesis-file="{{ besu_genisis_path }}
{% endif %}
sync-mode="{{besu_sync_mode}}" sync-mode="{{besu_sync_mode}}"
host-whitelist=[{{besu_host_whitelist|map('to_json')|join(',')}}] host-whitelist=[{{besu_host_whitelist|map('to_json')|join(',')}}]
@ -34,4 +38,4 @@ metrics-port={{besu_metrics_port}}
{% if besu_bootnodes|length > 0 %} {% if besu_bootnodes|length > 0 %}
# bootnodes # bootnodes
bootnodes={{besu_bootnodes}} bootnodes={{besu_bootnodes}}
{% endif %} {% endif %}

Loading…
Cancel
Save