Bitcoin full node and query server

Oct 15, 2024

View in context in the libbitcoin Slack #general mirror.

evoskuil12:37
It is likely that the default settings will be suboptimal for your machine, even resulting in thrashing. If you post your basic specs I can make suggestions. One of the aspects we are working on is automatically tuning what is presently manual configuration for given platform. Also note that if your CPU supports sha native (shani), which is about 5x faster individual hashing, it will distort realistic benchmarking, since shani is not yet integrated into the hashing library.
evoskuil18:42
[log]
path = X:/
application = true
news = true
session = true
protocol = false
quitting = false
proxy = false
remote = true
fault = true
verbose = false
#objects = false                    # debug builds only

[database]
path = X:/bitcoin/
minimize = false

[bitcoin]
# defaults to all checkpoints.
#checkpoint = 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f:0
minimum_work = 000000000000000000000000000000000000000052b2559353df4117b7348b64
milestone = 0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5:840000

[forks]

[node]
headers_first = true
allowed_deviation = 1.5
sample_period_seconds = 10
currency_window_minutes = 60
maximum_concurrency = 50,000
maximum_height = 840,000     # stops block sync (not header sync)
snapshot_bytes = 0
snapshot_valid = 0
allocation_multiple = 20

[network]
threads = 16
outbound_connections = 200
connect_batch_size = 5
host_pool_capacity = 10,000
enable_loopback = false
self = xxx.xxx.xxx.xxx:8333         # advertised addresses
inbound_connections = 0             # Use 1 for loopback

user_agent = "/libbitcoin /"
enable_ipv6 = false
enable_alert = false                # log alert messages
enable_reject = false               # send reject messages
enable_address = true               # in/out address messages
enable_transaction = false          # peer should not relay txs
validate_checksum = false           # validate inbound message checksum

invalid_services = 176              # shitcoins
services_minimum = 9                # witness node
services_maximum = 9                # witness node
protocol_maximum = 70012            # current default (send_headers).
protocol_minimum = 31800            # Satoshi:22.0.0 minimum (headers).
minimum_buffer = 1,000,000          # network payload buffer (per channel)
retry_timeout_seconds = 5           # 1s, 2s, 7s f/m/s loopback,  5s for large
connect_timeout_seconds = 5         # 1s, 3s, 5s f/m/s loopback, 10s for large
handshake_timeout_seconds = 5       # time to complete handshake.
channel_heartbeat_minutes = 5       # ping
channel_inactivity_minutes = 10     # receive
channel_expiration_minutes = 60     # unconditional

[database]
# TODO: These require tuning for low RAM machines.

header_buckets = 565,129
header_size = 21,000,000
header_rate = 5

txs_buckets = 565,129
txs_size = 1,000,000,000
txs_rate = 5

tx_buckets = 681,968,291
tx_size = 16,000,000,000
tx_rate = 5

# compressed size
point_buckets = 638,910,752
point_size = 9,000,000,000
point_rate = 5

spend_buckets = 1,739,749,749
spend_size = 16,000,000,000
spend_rate = 5

puts_size = 7,000,000,000
puts_rate = 5

input_size = 92,000,000,000
input_rate  = 5

output_size = 25,000,000,000
output_rate = 5

candidate_size = 2,568,513
candidate_rate = 5

confirmed_size = 2,568,513
confirmed_rate = 5

strong_tx_buckets = 681,968,291
strong_tx_size = 3,000,000,000
strong_tx_rate = 5

validated_tx_buckets = 681,968,291
validated_tx_size = 1
validated_tx_rate = 5

validated_bk_buckets = 565,129
validated_bk_size = 2,000,000
validated_bk_rate = 5

address_buckets = 0
address_size = 1
address_rate = 0

neutrino_buckets = 0
neutrino_size = 1
neutrino_rate = 0
This is similar to what I run. The initial [database] table sizes definitely need to be reduced for low RAM. I would cut these _size values down to 1/4 to 1/10 of above for lower RAM. This is required to prevent mmap thrashing. Also the growth _rate values must be small. I run at 15, but these are probably okay for low RAM at 5.