Skip to main content

Node and client configuration

caution

Use with caution, overriding some configurations could lead to node instability and/or a complete desynchronization from Massa blockchain.

Node configuration

You can override the default configuration via the massa-node/config/config.toml file.

[logging]
level = 2

[api]
draw_lookahead_period_count = 10
bind_private = "127.0.0.1:33034"
bind_public = "0.0.0.0:33035"
bind_api = "0.0.0.0:33036"
max_arguments = 128
openrpc_spec_path = "base_config/openrpc.json"
max_request_body_size = 52428800
max_response_body_size = 52428800
max_connections = 100
max_subscriptions_per_connection = 1024
max_log_length = 4096
allow_hosts = []
batch_request_limit = 16
ping_interval = 60000
enable_http = true
enable_ws = true
enable_broadcast = true

[grpc]
enabled = true
accept_http1 = false
enable_cors = false
enable_health = true
enable_reflection = true
enable_mtls = false
bind = "0.0.0.0:33037"
accept_compressed = "Gzip"
send_compressed = "Gzip"
max_decoding_message_size = 52428800
max_encoding_message_size = 52428800
max_channel_size = 128
timeout = 60
max_frame_size = 16777215
concurrency_limit_per_connection = 32
max_concurrent_streams = 1024
tcp_nodelay = true
draw_lookahead_period_count = 10
max_block_ids_per_request = 50
max_operation_ids_per_request = 250
server_certificate_path = "config/tls/server.pem"
server_private_key_path = "config/tls/server.key"
client_certificate_authority_root_path = "config/tls/client_ca.pem"
enable = true

[execution]
max_final_events = 10000
readonly_queue_length = 10
cursor_delay = 2000
stats_time_window_duration = 60000
max_read_only_gas = 4294967296
abi_gas_costs_file = "base_config/gas_costs/abi_gas_costs.json"
wasm_gas_costs_file = "base_config/gas_costs/wasm_gas_costs.json"
initial_vesting_path = "base_config/initial_vesting.json"
hd_cache_path = "storage/cache/rocks_db"
lru_cache_size = 200
hd_cache_size = 2000
snip_amount = 10
broadcast_slot_execution_output_channel_capacity = 5000

[ledger]
initial_ledger_path = "base_config/initial_ledger.json"
disk_ledger_path = "storage/ledger/rocks_db"
final_history_length = 100

[consensus]
max_discarded_blocks = 100
max_future_processing_blocks = 400
max_dependency_blocks = 2048
force_keep_final_periods_without_ops = 32
force_keep_final_periods = 5
block_db_prune_interval = 5000
stats_timespan = 60000
broadcast_blocks_headers_channel_capacity = 128
broadcast_blocks_channel_capacity = 128
broadcast_filled_blocks_channel_capacity = 128

[protocol]
bind = "[::]:31244"
connect_timeout = 3000
keypair_file = "config/node_privkey.key"
initial_peers_file = "base_config/initial_peers.json"
read_write_limit_bytes_per_second = 2000000000
message_timeout = 5000
ask_block_timeout = 10000
max_known_blocks_size = 1024
max_node_known_blocks_size = 1024
max_node_wanted_blocks_size = 1024
max_simultaneous_ask_blocks_per_node = 128
max_send_wait = 0
max_known_ops_size = 1000000
asked_operations_buffer_capacity = 600000
max_node_known_ops_size = 200000
max_known_endorsements_size = 2048
max_node_known_endorsements_size = 2048
operation_batch_buffer_capacity = 10024
operation_announcement_buffer_capacity = 2000
operation_batch_proc_period = 500
operation_announcement_interval = 300
max_operations_per_message = 1024
try_connection_timer = 5000
timeout_connection = 1000
max_ops_kept_for_propagation = 320000
max_operations_propagation_time = 32000
max_endorsements_propagation_time = 32000
thread_tester_count = 25
max_in_connections = 100

[network]
routable_ip = "37.187.156.118"

[metrics]
enabled = true
bind = "[::]:31248"
tick_delay = 5000

[bootstrap]
bootstrap_list = [ [ "149.202.84.7:31245", "N1kKfgrCveVnosUkxTzaBw5cf9f2cbTvK3R5Ssb2Pf76au8xwmH",], [ "149.202.84.39:31245", "N12sNdL7YwSawpnJrk9XCWDjKbgfNamAobp62AX5qfkgpBkGh2wC",], [ "37.187.156.118:31245", "N1NnuSW48GKGaYZamAVKXfXbbnt3StxWoHpYtBZSJvY9e8U1BTC",],]
bootstrap_protocol = "Both"
bootstrap_whitelist_path = "base_config/bootstrap_whitelist.json"
bootstrap_blacklist_path = "base_config/bootstrap_blacklist.json"
bind = "[::]:31245"
connect_timeout = 15000
bootstrap_timeout = 1200000
retry_delay = 60000
max_ping = 10000
read_timeout = 100000
write_timeout = 100000
read_error_timeout = 200
write_error_timeout = 200
max_clock_delta = 5000
cache_duration = 15000
max_simultaneous_bootstraps = 2
ip_list_max_size = 10000
per_ip_min_interval = 1000
max_bytes_read_write = 20000000

[pool]
max_operation_pool_size = 500000
max_operation_pool_excess_items = 100000
operation_pool_refresh_interval = 5000
operation_max_future_start_delay = 50000
max_endorsements_pool_size_per_thread = 25000
max_item_return_count = 100
broadcast_endorsements_channel_capacity = 2000
broadcast_operations_channel_capacity = 5000

[selector]
initial_rolls_path = "base_config/initial_rolls.json"

[factory]
initial_delay = 100
staking_wallet_path = "config/staking_wallet.dat"
stop_production_when_zero_connections = false

[versioning]
mip_stats_warn_announced_version = 30

[protocol.default_category_info]
target_out_connections = 10
max_in_connections_per_ip = 2
max_in_connections = 15
allow_local_peers = false

[protocol.peers_categories.Bootstrap]
target_out_connections = 2
max_in_connections_per_ip = 1
max_in_connections = 2
allow_local_peers = false

[protocol.peers_categories.Standard]
target_out_connections = 3
max_in_connections_per_ip = 1
max_in_connections = 10
allow_local_peers = false

[protocol.peers_categories.default_category_info]
target_out_connections = 3
max_in_connections_per_ip = 1
max_in_connections = 10
allow_local_peers = false

Client configuration

You can override the default configuration via the massa-client/config/config.toml file.

history = 10
history_file_path = "config/.massa_history"
timeout = 1000

[default_node]
# The IP of your node. Works both with IPv4 (like 127.0.0.1) and IPv6 (like ::1) addresses, if the node is bound to the correct protocol.
ip = "127.0.0.1"
private_port = 33034
public_port = 33035
grpc_port = 33037

[client]
# maximum size in bytes of a request
max_request_body_size = 52428800
# request timeout
request_timeout = 60000
# maximum number of outcoming connections allowed
max_concurrent_requests = 100
# certificate_store, `Native` or `WebPki`
certificate_store = "Native"
# JSON-RPC request object id data type, `String` or `Number`
id_kind = "Number"
# max length for logging for requests and responses. Logs bigger than this limit will be truncated
max_log_length = 4096
# custom headers passed to the server with every request (default is empty).
headers = []

[client.http]
# whether to enable HTTP.
enabled = true