-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.yml
138 lines (120 loc) · 4 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
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.14.12'
geth_cont_image: 'ethereum/client-go:{{ geth_cont_tag }}'
geth_cont_name: '{{ geth_service_name }}-node'
geth_cont_vol: '{{ geth_service_path }}/node'
geth_cont_stop_grace_period: '1m'
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, engine
geth_rcp_api: 'eth,net,web3,personal,admin,engine'
# useful for linking containers
geth_rpc_extra_vhost: geth
geth_rpc_vhosts:
- 'localhost'
- '{{ geth_cont_name }}'
- '{{ geth_rpc_extra_vhost }}'
- '{{ inventory_hostname }}'
- '{{ inventory_hostname }}.wg'
- '{{ ansible_local.wireguard.vpn_ip }}'
# Wrapper for easier RPC usage
geth_rpc_wrapper: '{{ geth_service_path }}/rpc.sh'
# Web Sockets API
geth_websocket_enabled: false
geth_websocket_addr: '127.0.0.1'
geth_websocket_port: '{{ geth_rpc_port|int + 1 | int }}'
geth_websocket_api: 'eth,net,web3,personal,admin,engine'
geth_websocket_origins: '{{ geth_rpc_vhosts }}'
# Engine API
geth_authrpc_enabled: true
geth_authrpc_addr: '127.0.0.1'
geth_authrpc_port: 8551
geth_authrpc_vhosts: '{{ geth_rpc_vhosts }}'
#geth_authrpc_jwtsecret: '0x64charHexEncodedSecretToken'
geth_authrpc_jwtsecret_file: '{{ geth_cont_vol }}/keys/jwtsecret'
# Sync mode: full, fast, light, snap
geth_sync_mode: 'snap'
# 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_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, sepolia, holesky
geth_network_name: 'mainnet'
#geth_network_id: ~
# Port to listen on
geth_port: 30303
# Address to advertise
geth_public_addr: '{{ ansible_host }}'
# Consul config
geth_consul_enabled: true
geth_consul_service_name: 'geth-{{ geth_network_name }}'
geth_consul_rpc_advertised_address: '{{ ansible_local.wireguard.address }}'
geth_consul_scope: 'main'
geth_consul_default_tags:
- 'geth'
- 'scope:{{ geth_consul_scope }}'
- '{{ 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: 'auto'
compose_state: 'present'
compose_pull: 'always'