diff --git a/defaults/main.yml b/defaults/main.yml index 96d32c8..3136993 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -33,7 +33,9 @@ geth_aliases: # Sync mode: full, fast, light geth_sync_mode: 'light' # Maximum number of untrusted peers that can connect -geth_max_peers: 25 +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 @@ -42,6 +44,15 @@ geth_v5disc_enabled: true geth_trusted_peers: [] geth_trusted_peers_file: '{{ geth_data_path }}/trusted-nodes.json' +# 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 diff --git a/tasks/container.yml b/tasks/container.yml index 8a9d4dc..b512dfd 100644 --- a/tasks/container.yml +++ b/tasks/container.yml @@ -31,9 +31,19 @@ {% if geth_sync_mode != 'light' %} --lightserv={{ geth_light_serv }} {% endif %} + {% if geth_miner_enabled %} + --mine + --miner.threads="{{ geth_miner_threads }}" + --miner.etherbase="{{ geth_miner_account | mandatory }}" + {% endif %} + {% if geth_whisper_enabled %} + --shh + --shh.pow={{ geth_whisper_pow }} + {% endif %} --verbosity={{ geth_log_level_id }} --cache={{ geth_cache }} --maxpeers={{ geth_max_peers }} + --maxpendpeers="{{ geth_max_pend_peers }}" --port={{ geth_port }} --nat=extip:{{ geth_public_addr }} --unlock={{ geth_account_addr }}