2021-04-18 16:39:15 +00:00
|
|
|
package config
|
|
|
|
|
2021-06-29 17:02:21 +00:00
|
|
|
// DefaultConfigTemplate defines the configuration template for the EVM RPC configuration
|
|
|
|
const DefaultConfigTemplate = `
|
2021-04-18 16:39:15 +00:00
|
|
|
###############################################################################
|
2021-08-16 09:45:10 +00:00
|
|
|
### EVM Configuration ###
|
2021-04-18 16:39:15 +00:00
|
|
|
###############################################################################
|
|
|
|
|
2021-08-16 09:45:10 +00:00
|
|
|
[evm]
|
|
|
|
|
|
|
|
# Tracer defines the 'vm.Tracer' type that the EVM will use when the node is run in
|
2022-02-19 00:57:43 +00:00
|
|
|
# debug mode. To enable tracing use the '--evm.tracer' flag when starting your node.
|
2021-08-16 09:45:10 +00:00
|
|
|
# Valid types are: json|struct|access_list|markdown
|
|
|
|
tracer = "{{ .EVM.Tracer }}"
|
|
|
|
|
2022-03-21 09:01:21 +00:00
|
|
|
# MaxTxGasWanted defines the gas wanted for each eth tx returned in ante handler in check tx mode.
|
|
|
|
max-tx-gas-wanted = {{ .EVM.MaxTxGasWanted }}
|
|
|
|
|
2021-08-16 09:45:10 +00:00
|
|
|
###############################################################################
|
|
|
|
### JSON RPC Configuration ###
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
[json-rpc]
|
2021-04-18 16:39:15 +00:00
|
|
|
|
|
|
|
# Enable defines if the gRPC server should be enabled.
|
2021-08-16 09:45:10 +00:00
|
|
|
enable = {{ .JSONRPC.Enable }}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
|
|
|
# Address defines the EVM RPC HTTP server address to bind to.
|
2021-08-16 09:45:10 +00:00
|
|
|
address = "{{ .JSONRPC.Address }}"
|
2021-04-18 16:39:15 +00:00
|
|
|
|
|
|
|
# Address defines the EVM WebSocket server address to bind to.
|
2021-08-16 09:45:10 +00:00
|
|
|
ws-address = "{{ .JSONRPC.WsAddress }}"
|
2021-07-28 09:47:29 +00:00
|
|
|
|
|
|
|
# API defines a list of JSON-RPC namespaces that should be enabled
|
2021-08-02 08:30:00 +00:00
|
|
|
# Example: "eth,txpool,personal,net,debug,web3"
|
2021-08-16 09:45:10 +00:00
|
|
|
api = "{{range $index, $elmt := .JSONRPC.API}}{{if $index}},{{$elmt}}{{else}}{{$elmt}}{{end}}{{end}}"
|
2021-07-28 09:47:29 +00:00
|
|
|
|
2021-08-18 14:11:51 +00:00
|
|
|
# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite). Default: 25,000,000.
|
|
|
|
gas-cap = {{ .JSONRPC.GasCap }}
|
2021-09-28 11:33:54 +00:00
|
|
|
|
2021-10-25 15:01:04 +00:00
|
|
|
# EVMTimeout is the global timeout for eth_call. Default: 5s.
|
|
|
|
evm-timeout = "{{ .JSONRPC.EVMTimeout }}"
|
|
|
|
|
|
|
|
# TxFeeCap is the global tx-fee cap for send transaction. Default: 1eth.
|
|
|
|
txfee-cap = {{ .JSONRPC.TxFeeCap }}
|
|
|
|
|
2021-10-13 11:03:49 +00:00
|
|
|
# FilterCap sets the global cap for total number of filters that can be created
|
|
|
|
filter-cap = {{ .JSONRPC.FilterCap }}
|
|
|
|
|
2021-11-17 11:58:52 +00:00
|
|
|
# FeeHistoryCap sets the global cap for total number of blocks that can be fetched
|
|
|
|
feehistory-cap = {{ .JSONRPC.FeeHistoryCap }}
|
|
|
|
|
2021-12-29 21:47:25 +00:00
|
|
|
# LogsCap defines the max number of results can be returned from single 'eth_getLogs' query.
|
|
|
|
logs-cap = {{ .JSONRPC.LogsCap }}
|
|
|
|
|
|
|
|
# BlockRangeCap defines the max block range allowed for 'eth_getLogs' query.
|
|
|
|
block-range-cap = {{ .JSONRPC.BlockRangeCap }}
|
2021-11-17 11:58:52 +00:00
|
|
|
|
2022-03-09 07:31:51 +00:00
|
|
|
# HTTPTimeout is the read/write timeout of http json-rpc server.
|
|
|
|
http-timeout = "{{ .JSONRPC.HTTPTimeout }}"
|
|
|
|
|
|
|
|
# HTTPIdleTimeout is the idle timeout of http json-rpc server.
|
|
|
|
http-idle-timeout = "{{ .JSONRPC.HTTPIdleTimeout }}"
|
|
|
|
|
2022-06-22 10:50:36 +00:00
|
|
|
# AllowUnprotectedTxs restricts unprotected (non EIP155 signed) transactions to be submitted via
|
|
|
|
# the node's RPC when the global parameter is disabled.
|
|
|
|
allow-unprotected-txs = {{ .JSONRPC.AllowUnprotectedTxs }}
|
|
|
|
|
2021-09-28 11:33:54 +00:00
|
|
|
###############################################################################
|
|
|
|
### TLS Configuration ###
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
[tls]
|
|
|
|
|
|
|
|
# Certificate path defines the cert.pem file path for the TLS configuration.
|
|
|
|
certificate-path = "{{ .TLS.CertificatePath }}"
|
|
|
|
|
|
|
|
# Key path defines the key.pem file path for the TLS configuration.
|
|
|
|
key-path = "{{ .TLS.KeyPath }}"
|
2021-04-18 16:39:15 +00:00
|
|
|
`
|