Ansible role that will install (& uninstall), configure and runs Besu: an enterprise Java Ethereum Client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-role-besu/templates/config.toml.j2

154 lines
4.5 KiB

# data
data-path="{{besu_data_dir}}"
logging="{{besu_log_level}}"
{% if besu_data_storage_format is defined and besu_data_storage_format != "" %}
data-storage-format="{{besu_data_storage_format}}"
{% endif %}
# JWT
{% if besu_engine_jwt_disabled is defined and besu_engine_jwt_disabled|bool == True %}
engine-jwt-disabled=true
{% else %}
# authentication is enabled by default when engine-jwt-disabled=false
engine-jwt-disabled=false
{% if besu_engine_jwt_secret is defined and besu_engine_jwt_secret != "" %}
engine-jwt-secret="{{besu_engine_jwt_secret}}"
{% endif %}
{% if besu_engine_rpc_port is defined and besu_engine_rpc_port != "" %}
engine-rpc-enabled=true
engine-rpc-port={{besu_engine_rpc_port}}
{% endif %}
{% if besu_engine_host_allowlist is defined %}
engine-host-allowlist={{besu_engine_host_allowlist|map('to_json')|join(',')}}
{% endif %}
{% endif %}
{% if besu_node_private_key_file != "" %}
# private_key
node-private-key-file="{{besu_node_private_key_file}}"
{% endif %}
{% if besu_required_blocks is defined and besu_required_blocks|length > 0 %}
required-blocks=[{{besu_required_blocks|map('to_json')|join(',')}}]
{% endif %}
{% if besu_target_gas_limit is defined %}
# target gas limit
target-gas-limit="{{ besu_target_gas_limit }}"
{% endif %}
{% if besu_genesis_path is defined and besu_genesis_path != "" %}
genesis-file="{{ besu_genesis_path }}"
{% else %}
network="{{besu_network}}"
{% endif %}
min-gas-price={{ besu_min_gas }}
sync-mode="{{besu_sync_mode}}"
host-whitelist=[{{besu_host_whitelist|map('to_json')|join(',')}}]
{% if besu_identity is defined %}
# identity
identity="{{ besu_identity }}"
{% endif %}
{% if besu_miner_enabled|bool == True %}
# miner
miner-enabled=true
miner-coinbase="{{besu_miner_coinbase}}"
{% endif %}
{% if besu_miner_extra_data != "" %}
miner-extra-data="{{besu_miner_extra_data}}"
{% endif %}
{% if besu_rpc_http_enabled|bool == True %}
# rpc
rpc-http-enabled=true
rpc-http-host="{{besu_rpc_http_host}}"
rpc-http-port={{besu_rpc_http_port}}
rpc-http-api=[{{besu_rpc_http_api|map('to_json')|join(',')}}]
rpc-http-cors-origins=[{{besu_rpc_http_cors_origins|map('to_json')|join(',')}}]
{% endif %}
{% if besu_rpc_ws_enabled|bool == True %}
# ws
rpc-ws-enabled=true
rpc-ws-api=[{{besu_rpc_ws_api|map('to_json')|join(',')}}]
rpc-ws-host="{{besu_rpc_ws_host}}"
rpc-ws-port={{besu_rpc_ws_port}}
{% endif %}
5 years ago
{% if besu_graphql_http_enabled|bool == True %}
# graphql
graphql-http-enabled=true
graphql-http-host="{{besu_graphql_http_host}}"
graphql-http-port={{besu_graphql_http_port}}
graphql-http-cors-origins=[{{besu_graphql_http_cors_origins|map('to_json')|join(',')}}]
{% endif %}
# p2p
{% if besu_host_ip != "" %}
p2p-host="{{besu_host_ip}}"
{% endif %}
p2p-port={{besu_p2p_port}}
{% if besu_max_peers is defined %}
max-peers={{besu_max_peers}}
{% endif %}
# metrics
metrics-enabled=true
metrics-host="{{besu_metrics_host}}"
metrics-port={{besu_metrics_port}}
{% if besu_permissions_accounts_config_file is defined %}
# local account permissions
permissions-accounts-config-file-enabled=true
permissions-accounts-config-file="{{ besu_permissions_accounts_config_file }}"
{% endif %}
{% if besu_permissions_nodes_config_file is defined %}
# local node permissions
permissions-nodes-config-file-enabled=true
permissions-nodes-config-file="{{ besu_permissions_nodes_config_file }}"
{% endif %}
{% if besu_permissions_accounts_contract_address is defined %}
# onchain account permissions
permissions-accounts-contract-enabled=true
permissions-accounts-contract-address="{{ besu_permissions_accounts_contract_address }}"
{% endif %}
{% if besu_permissions_nodes_contract_address is defined %}
# onchain node permissions
permissions-nodes-contract-enabled=true
permissions-nodes-contract-address="{{ besu_permissions_nodes_contract_address }}"
permissions-nodes-contract-version={{besu_permissions_nodes_contract_version}}
{% endif %}
{% if besu_bootnodes|length > 0 %}
# bootnodes
bootnodes=[{{besu_bootnodes|map('to_json')|join(',')}}]
{% endif %}
{% if besu_static_nodes_file != "" %}
# static-nodes
3 years ago
static-nodes-file="{{ besu_static_nodes_file }}"
{% endif %}
{% if besu_privacy_enabled|bool == True %}
# Orion
privacy-enabled=true
privacy-url="{{besu_privacy_url}}"
privacy-public-key-file="{{besu_privacy_public_key_file}}"
{% if besu_privacy_marker_tx_signing_key_file != "" %}
privacy-marker-transaction-signing-key-file="{{besu_privacy_marker_tx_signing_key_file}}"
{% endif %}
{% endif %}
{% if besu_xdns_enabled|bool == True %}
Xdns-enabled=true
Xdns-update-enabled=true
{% endif %}