adding miner capability to the role

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
pull/12/head
Joshua Fernandes 5 years ago
parent 19594f90a4
commit 0b80cfe819
  1. 3
      README.md
  2. 3
      defaults/main.yml
  3. 24
      templates/config.toml.j2

@ -53,6 +53,9 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `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_min_gas` | 1000 | The minimum price that a transaction offers for it to be included in a mined block |
| `besu_miner_enabled` | false | Enables mining when the node is started |
| `besu_miner_coinbase` | 0x | Account to which mining rewards are paid |
| `besu_miner_extra_data` | "" | A hex string representing the 32 bytes to be included in the extra data field of a mined block. |
| `besu_rpc_http_enabled` | true | Enabled the HTTP JSON-RPC service |
| `besu_rpc_http_host` | 0.0.0.0 | Specifies the host on which HTTP JSON-RPC listens |
| `besu_rpc_http_port` | 8545 | Specifies the port on which HTTP JSON-RPC listens |

@ -34,6 +34,9 @@ besu_sync_mode: FAST
besu_log_level: INFO
besu_p2p_port: 30303
besu_min_gas: 1000
besu_miner_extra_data: ""
besu_miner_coinbase: 0x
besu_miner_enabled: "false"
besu_rpc_http_enabled: "true"
besu_rpc_http_host: 0.0.0.0
besu_rpc_http_port: 8545

@ -2,8 +2,8 @@
data-path="{{besu_data_dir}}"
logging="{{besu_log_level}}"
# private_key
{% if besu_node_private_key_file != "" %}
# private_key
node-private-key-file="{{besu_node_private_key_file}}"
{% endif %}
@ -21,25 +21,35 @@ host-whitelist=[{{besu_host_whitelist|map('to_json')|join(',')}}]
identity="{{ besu_identity }}"
{% endif %}
# rpc
{% if besu_miner_enabled|bool == True %}
# miner
miner-enabled=true
miner-coinbase="{{besu_miner_coinbase}}"
{% if besu_miner_extra_data != "" %}
miner-extra-data="{{besu_miner_extra_data}}"
{% endif %}
{% endif %}
{% if besu_rpc_http_enabled|bool == True %}
rpc-http-enabled={{besu_rpc_http_enabled}}
# 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 %}
# ws
{% if besu_rpc_ws_enabled|bool == True %}
rpc-ws-enabled={{besu_rpc_ws_enabled}}
# ws
rpc-ws-enabled=true
rpc-ws-host="{{besu_rpc_ws_host}}"
rpc-ws-port={{besu_rpc_ws_port}}
{% endif %}
# graphql
{% if besu_graphql_http_enabled|bool == True %}
graphql-http-enabled={{besu_graphql_http_enabled}}
# 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(',')}}]

Loading…
Cancel
Save