infra-role-geth/defaults/main.yml

125 lines
3.5 KiB
YAML

---
geth_service_name: 'geth'
geth_service_path: '/docker/{{ geth_service_name }}'
geth_compose_path: '{{ geth_service_path }}/docker-compose.yml'
# Security, json is optional
#geth_account_addr: ~
#geth_account_pass: ~
#geth_account_json: ~
# account
geth_account_json_file: '{{ geth_cont_vol }}/keys/account.json'
geth_account_pass_file: '{{ geth_cont_vol }}/keys/account.pass'
geth_account_addr_file: '{{ geth_cont_vol }}/keys/account.addr'
# Container config
geth_cont_tag: 'v1.10.3'
geth_cont_image: 'ethereum/client-go:{{ geth_cont_tag }}'
geth_cont_name: '{{ geth_service_name }}-node'
geth_cont_vol: '{{ geth_service_path }}/node'
geth_enode_file: '{{ geth_cont_vol }}/keys/enode'
geth_sync_check_script: '/usr/local/bin/check_sync_{{ geth_cont_name | replace("-", "_") }}.sh'
# Enable metrics
geth_metrics_enabled: true
geth_metrics_port: 6060
# RPC port of administration
geth_rpc_enabled: true
geth_rpc_addr: '127.0.0.1'
geth_rpc_port: 8545
# Available: admin, clique, debug, eth, les, miner, net, personal, rpc, txpool, web3
geth_rcp_api: 'eth,net,web3,personal,admin'
# useful for linking containers
geth_rpc_extra_vhost: geth
geth_rpc_vhosts:
- 'localhost'
- '{{ geth_cont_name }}'
- '{{ geth_rpc_extra_vhost }}'
- '{{ hostname }}'
- '{{ hostname }}.wg'
- '{{ ansible_local.wireguard.vpn_ip }}'
# Wrapper for easier RPC usage
get_rpc_wrapper: '{{ geth_service_path }}/rpc.sh'
# Web Sockets API
geth_websocket_enabled: true
geth_websocket_port: '{{ geth_rpc_port + 1 | int }}'
geth_websocket_api: 'eth,net,web3,personal,admin'
geth_websocket_origins: 'localhost'
# Sync mode: full, fast, light, snap
geth_sync_mode: 'light'
# Maximum number of untrusted peers that can connect
geth_max_peers: 50
# Maximum pending connection attempts
geth_max_pend_peers: 30
# Maximum percentage of time allowed for serving LES requests (0-90)
geth_light_serv: 90
# Peer discovery protocol
geth_discovery_enabled: true
geth_v5disc_enabled: true
# List of trusted peers to connect to
geth_trusted_peers: []
geth_trusted_peers_file: '{{ geth_cont_vol }}/data/trusted-nodes.json'
# Any additional flags you want to provide
geth_extra_flags: []
# Some custom testnets require a custom init
geth_init_enabled: false
geth_init_genesis_path: '{{ geth_cont_vol }}/genesis.json'
#geth_init_url: ~
#geth_init_sha256: ~
# Custom bootnodes
geth_bootnodes: []
# Mining settings
geth_miner_enabled: false
geth_miner_threads: '{{ ansible_processor_vcpus }}'
geth_miner_account: '{{ geth_account_addr }}'
# Whisper protocol
geth_whisper_enabled: false
geth_whisper_pow: 0.2
# logging
geth_lov_level_names:
silent: 0
error: 1
warn: 2
info: 3
debug: 4
detail: 5
geth_log_level_name: 'info'
geth_log_level_id: '{{ geth_lov_level_names[geth_log_level_name | lower] | mandatory }}'
# Available: mainnet, goerli, rinkeby, yolov1, ropsten
geth_network_name: 'mainnet'
# Port to listen on
geth_port: 30303
# Address to advertise
geth_public_addr: '{{ ansible_host }}'
# Consul config
geth_consul_enabled: true
geth_consul_default_tags:
- geth
- '{{ env }}.{{ stage }}'
- '{{ geth_network_name }}'
geth_consul_extra_tags: []
geth_consul_tags: '{{ geth_consul_default_tags + geth_consul_extra_tags }}'
# Geth cache size. WARNING: Values higher than 1GB cause issues.
geth_cache_size: ~
# Container memory limits
geth_cont_mem_ratio: 0.6
geth_cont_mem_limit: '{{ (ansible_memtotal_mb * geth_cont_mem_ratio|float) | int }}'
# general container management
compose_recreate: 'smart'
compose_state: 'present'
compose_restart: false