View in context in the libbitcoin Slack #general mirror.
libbitcoin-node with latest master. I'm not very familar so it's more than likely I've misunderstood something. Running bn --newstore on a fresh install fails after all database files are successfully created. The error message is confusing me. Ideally I'd like to create a regtest config.
I'm using the following minimal config:
$ cat /tmp/bn.cfg [log] path = /tmp/bn-logs [database] path = /tmp/bn-db [inbound] bind = 127.0.0.1:18445 connections = 1 [outbound] connections = 0 $ bn --config /tmp/bn.cfg --newstore
All files are created, opened, loaded, unloaded, and closed successfully: create::create_file(header_head) ... create::close_file(filter_tx_body) Database creation failed with error 'file failed to load, disk may be full'.
-n but with outbound.connections = 0 in the config will cause the node to just idle and do nothing as it will not connect to any peers.[log]
path = {logdir}
[bitcoin]
# Regtest genesis block (hex-encoded)
genesis_block = {genesis_hex}
# Regtest proof of work limit (0x207fffff = 545259519)
proof_of_work_limit = 545259519
# Accept any valid chain (no minimum work requirement)
minimum_work = 0000000000000000000000000000000000000000000000000000000000000000
[forks]
# Regtest allows easy mining without real proof of work
difficult = false
[network]
# Regtest network magic (0xDAB5BFFA = 3669344250)
identifier = 3669344250
[inbound]
# Listen for P2P connections
bind = 127.0.0.1:{p2p_port}
connections = 10
enable_loopback = true
[outbound]
# Disable outbound connections to prevent contacting mainnet seeds
connections = 0
host_pool_capacity = 0
[database]
path = {datadir}
# Tiny regtest DB profile (avoid multi-GB prealloc).
header_buckets = 1
header_size = 1000
txs_buckets = 1
txs_size = 1000
tx_buckets = 1
tx_size = 1000
point_buckets = 1
point_size = 1000
strong_tx_buckets = 1
strong_tx_size = 1000
input_size = 1000
ins_size = 1000
output_size = 1000
outs_size = 1000
candidate_size = 1000
confirmed_size = 1000
duplicate_buckets = 1
duplicate_size = 100
prevout_buckets = 0
prevout_size = 1
validated_bk_buckets = 1
validated_bk_size = 1000
validated_tx_buckets = 1
validated_tx_size = 1000
address_buckets = 1
address_size = 1000
filter_bk_buckets = 0
filter_tx_buckets = 0
[node]
# Don't delay inbound peers waiting for "current" chain state (regtest genesis is old).
delay_inbound = false--help and --version still reference bn) 🙂
./libbitcoin-server/console/bs --help
Usage: bn [-abdfhiklnrsv] [--config value] [--test value] [--write value]
Info: Runs a full bitcoin node.
Options (named):
-a [--slabs] Scan and display store slab measures.
-b [--backup] Backup to a snapshot (can also do live).
-c [--config] Specify path to a configuration settings file.
-d [--hardware] Display hardware compatibility.
-f [--flags] Scan and display all flag transitions.
-h [--help] Display command line options.
-i [--information] Scan and display store information.
-k [--buckets] Scan and display all bucket densities.
-l [--collisions] Scan and display hashmap collision stats (may exceed
RAM and result in SIGKILL).
-n [--newstore] Create new store in configured directory.
-r [--restore] Restore from most recent snapshot.
-s [--settings] Display all configuration settings.
-t [--test] Run built-in read test and display.
-v [--version] Display version information.
-w [--write] Run built-in write test and display. (edited)