Last active
February 18, 2022 12:21
-
-
Save inigoflores/e74ae44406b40437c9c4713607ea845c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
[ | |
{kernel, | |
[ | |
%% force distributed erlang to only run on localhost | |
{inet_dist_use_interface, {127,0,0,1}} | |
]}, | |
{lager, | |
[ | |
{suppress_supervisor_start_stop, true}, | |
{log_root, "/var/log/miner"}, | |
{crash_log, "crash.log"}, | |
{colored, true}, | |
{metadata_whitelist, [poc_id]}, | |
{handlers, | |
[ | |
{lager_file_backend, [{file, "console.log"}, {level, info}, | |
{formatter, lager_default_formatter}, | |
{formatter_config, [date, " ", time, " ", {pterm, ospid, <<"NOPID">>}, | |
" [",severity,"] ", | |
pid, "@", module, ":", function, ":", line, " ", | |
message, "\n"]}]}, | |
{lager_file_backend, [{file, "error.log"}, {level, error}]} | |
]} | |
]}, | |
{libp2p, | |
[ | |
{use_dns_for_seeds, true}, | |
{seed_dns_cname, "seed.helium.io"}, | |
{seed_config_dns_name, "_seed_config.helium.io"}, | |
{similarity_time_diff_mins, 30}, | |
{random_peer_pred, fun miner_util:random_val_predicate/1}, | |
{ip_confirmation_host, "https://ifconfig.co"}, | |
{node_aliases, | |
[ | |
{"/p2p/112qB3YaH5bZkCnKA5uRH7tBtGNv2Y5B4smv1jsmvGUzgKT71QpE", "/ip4/52.8.80.146/tcp/2154"}, | |
{"/p2p/112ewJNEUfSg3Jvo276tMjzFC2JzmmZcJJ32CWz2fzYqbyCMMTe1", "/ip4/54.219.236.122/tcp/2154"}, | |
{"/p2p/1124CJ9yJaHq4D6ugyPCDnSBzQik61C1BqD9VMh1vsUmjwt16HNB", "/ip4/54.176.88.149/tcp/2154"}, | |
{"/p2p/11263KvqW3GZPAvag5sQYtBJSjb25azSTSwoi5Tza9kboaLRxcsv", "/ip4/54.193.165.228/tcp/2154"}, | |
{"/p2p/11w77YQLhgUt8HUJrMtntGGr97RyXmot1ofs5Ct2ELTmbFoYsQa", "/ip4/44.238.156.97/tcp/2154"}, | |
{"/p2p/11afuQSrmk52mgxLu91AdtDXbJ9wmqWBUxC3hvjejoXkxEZfPvY", "/ip4/13.37.13.24/tcp/2154"} | |
]} | |
]}, | |
{blockchain, | |
[ | |
{snap_source_base_url, "https://snapshots.helium.wtf/mainnet"}, | |
{fetch_latest_from_snap_source, true}, | |
{honor_quick_sync, true}, | |
{quick_sync_mode, blessed_snapshot}, | |
{blessed_snapshot_block_height, 1160641}, | |
{blessed_snapshot_block_hash, | |
<<114,177,177,98,217,154,188,18,212,229,36,77,57,49,35,131,227,60,157,115,47,34,29,59,241,63,24,152,221,198,197,5>>}, | |
{listen_addresses, ["/ip4/0.0.0.0/tcp/44158"]}, | |
{key, {ecc, [{key_slot, 0}, {onboarding_key_slot, 15}, {bus, "i2c-0"}, {address, 16#60}]}}, %% don't make this the last line in the stanza because sed and keep it on one line | |
{base_dir, "/var/data"}, | |
{onboarding_dir, "/mnt/uboot"}, | |
{num_consensus_members, 16}, | |
{seed_nodes, "/ip4/18.217.27.26/tcp/2154,/ip4/35.161.222.43/tcp/443,/ip4/99.80.158.114/tcp/2154,/ip4/3.66.43.167/tcp/443,/ip4/52.220.121.45/tcp/2154,/ip4/54.207.252.240/tcp/443,/ip4/3.34.10.207/tcp/2154,/ip4/13.238.174.45/tcp/443"}, | |
{peerbook_update_interval, 180000}, | |
{max_inbound_connections, 200}, | |
{outbound_gossip_connections, 50}, | |
{gossip_version, 2}, | |
{peerbook_allow_rfc1918, false}, | |
{metadata_fun, fun miner_util:metadata_fun/0}, | |
{relay_limit, 50}, | |
{disable_gateway_cache, true}, | |
{gw_cache_retention_limit, 0}, | |
{gw_context_cache_max_size, 0} | |
]}, | |
{relcast, | |
[ | |
{db_open_opts, | |
[{total_threads, 4}, | |
{max_background_jobs, 2}, | |
{max_background_compactions, 2} | |
%% {max_background_flushes, 2}, % not sure if needed | |
]}, | |
{defer_count_threshold, 30}, | |
{defer_time_threshold, 1000} | |
]}, | |
{rocksdb, | |
[{global_opts, | |
[ | |
{max_open_files, 128}, | |
{compaction_style, universal}, | |
{memtable_memory_budget, 8388608}, % 8MB | |
{arena_block_size, 262144}, % 256kB | |
{write_buffer_size, 262144}, % 256kB | |
{db_write_buffer_size, 8388608}, % 8MB | |
{max_write_buffer_number, 10}, | |
{keep_log_file_num, 5}, | |
{max_log_file_size, 1048576}, %% keep log files 1mb or less | |
{log_file_time_to_roll, 86400} %% rotate logs once a day | |
]} | |
]}, | |
{miner, | |
[ | |
{denylist_keys, ["1SbEYKju337P6aYsRd9DT2k4qgK5ZK62kXbSvnJgqeaxK3hqQrYURZjL"]}, | |
{denylist_type, github_release}, | |
{denylist_url, "https://api.github.com/repos/helium/denylist/releases/latest"}, | |
{jsonrpc_ip, {127,0,0,1}}, %% bind JSONRPC to localhost only | |
{jsonrpc_port, 4467}, | |
{mode, gateway}, | |
{use_ebus, true}, | |
{batch_size, 2500}, | |
{curve, 'SS512'}, | |
{block_time, 60000}, | |
{late_block_timeout_seconds, 3600}, | |
{hotfix_dir, "/opt/miner/hotfix"}, | |
{update_dir, "/opt/miner/update"}, | |
{api_base_url, "https://api.helium.io/v1"}, | |
{election_interval, 30}, | |
{radio_device, { {127,0,0,1}, 1680, | |
{127,0,0,1}, 31341} }, | |
{default_routers, ["/p2p/11w77YQLhgUt8HUJrMtntGGr97RyXmot1ofs5Ct2ELTmbFoYsQa","/p2p/11afuQSrmk52mgxLu91AdtDXbJ9wmqWBUxC3hvjejoXkxEZfPvY"]}, | |
{mark_mods, [miner_hbbft_handler]}, | |
{stabilization_period, 50000}, | |
{reg_domains_file, "countries_reg_domains.csv"}, | |
{frequency_data, #{'US915' => [903.9, 904.1, 904.3, 904.5, 904.7, 904.9, 905.1, 905.3], | |
'EU868' => [867.1, 867.3, 867.5, 867.7, 867.9, 868.1, 868.3, 868.5], | |
'EU433' => [433.175, 433.375, 433.575], | |
'CN470' => [486.3, 486.5, 486.7, 486.9, 487.1, 487.3, 487.5, 487.7 ], | |
'CN779' => [779.5, 779.7, 779.9], | |
'AU915' => [916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0, 918.2], | |
'AS923_1' => [923.2, 923.4, 923.6, 923.8, 924.0, 924.2, 924.4, 924.6], | |
'AS923_2' => [921.4, 921.6, 921.8, 922.0, 922.2, 922.4, 922.6, 922.8], | |
'AS923_3' => [916.6, 916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0], | |
'AS923_4' => [917.3, 917.5, 917.7, 917.9, 918.1, 918.3, 918.5, 918.7], | |
'KR920' => [922.1, 922.3, 922.5, 922.7, 922.9, 923.1, 923.3], | |
'IN865' => [865.0625, 865.4025, 865.985], | |
'RU864' => [864.1, 864.3, 864.5, 864.7, 864.9, 868.9, 869.1]} | |
} | |
]}, | |
{grpcbox, [ | |
{servers, [ | |
#{ | |
grpc_opts => #{ | |
service_protos => [gateway_pb], | |
services => #{'helium.gateway' => helium_gateway_service} | |
}, | |
transport_opts => #{ssl => false}, | |
listen_opts => #{ | |
port => 8080, | |
ip => {0, 0, 0, 0} | |
}, | |
pool_opts => #{size => 100}, | |
server_opts => #{ | |
header_table_size => 4096, | |
enable_push => 1, | |
max_concurrent_streams => unlimited, | |
initial_window_size => 65535, | |
max_frame_size => 16384, | |
max_header_list_size => unlimited | |
} | |
} | |
]} | |
]} | |
]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment