Archive of the libbitcoin Slack #general channel.
block 896,070 complete in 17,512 secs. Before enabling taproot it was 17,331 secs. So it will be well under 5 hrs on the maxi for full validation to block 900,000, and as I suspected, the additional taproot signature validation was not a material additional cost.88 secs, stop time 15 secs. Store create 9 secs, and initial header sync (up to 200 competing peers) 83 secs. No seeding on this run, though that's usually only a few seconds.1 + (221,000,000 taproot / 2,982,883,321 total) * 4.8 hrs = 4.87 hrs4.90 hrs total to block 899,536 on the maxi (current top). I estimate that on a modern machine of the same size RAM and threads, this would be about half the time, so about 2.5 hrs. I think it's feasible presently to complete full validation to 900k in under an hour on a 2.5Mbps WAN.bx of course isn't updated, but these used to work: https://github.com/libbitcoin/libbitcoin-explorer/blob/master/src/commands/ec-to-witness.cppsendaddrv2 message in the version handshake, by adding a derived protocol_version_70016 and which will be functional once I add derived protocol_address_in_70016 and protocol_address_out_70016. I've also implemented protocol_header_out_70012.
Next is protocol_block_out, which is very similar to header_out (and I completed the query for it along with the header_out, since they are basically the same). Then just need to add header announcements (sendheaders message gets incorporated in protocol_header_out_70012) and block announcements in protocol_block_out (which is only for blocks-first support).
At that point it's a fully functional blocks-only node, with blocks first and headers first protocol support. We'll want to add the compact filters support (bip157 at protocol level 70015) because we have the store/query available. But there's no reason to implement the compact blocks, mempool, or tx relay protocols until we have a tx pool. Everything else is complete up to bip155 (sendarrdv2, @ network level 70016) and bip340/341/342 (taproot, consensus). I expect all of the above to be complete in a couple of weeks.libbitcoin is here for a reason, and if you've ever tried building something on Bitcoin (core), core is a large web and doesn't play that well (imho).This is an incredible weak point. I wish more of the op_return/knots energy would be directed to development here.
I wish more of the op_return/knots energy would be directed to development here.
$ version3/install/bin/bx fetch-height tcp://mainnet1.libbitcoin.net:9081 'WrOzx:DPxBh)R$vL9JEUuclRVx5swjN+v^Xak3VM' 903525 $ version3/install/bin/bx fetch-height tcp://72.65.246.84:9091 897422 $ version3/install/bin/bx fetch-height tcp://72.65.246.84:19091 3611865 $ version3/install/bin/bx fetch-height tcp://mainnet1.libbitcoin.net:19091 2951381
# disabled by default (address) #----------------------------- address_buckets = 1,315,297,540 address_size = 30,000,000,000 # disabled by default (compact filters) #----------------------------- filter_bk_buckets = 850,001 filter_bk_size = 6,810,000 filter_tx_buckets = 850,001 filter_tx_size = 2,700,000,000(edited)
[network] seed = seed.bitcoin.sipa.be:8333 seed = dnsseed.bluematt.me:8333 seed = dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us:8333 seed = seed.bitcoin.jonasschnelli.ch:8333 seed = seed.btc.petertodd.net:8333 seed = seed.bitcoin.sprovoost.nl:8333 seed = dnsseed.emzy.de:8333 seed = seed.bitcoin.wiz.biz:8333 seed = seed.mainnet.achownodes.xyz:8333
milestone 900k record on the maxi of 59.8 minutes. This is almost as fast as the mini (59 mins) despite not having shani, and having half the RAM/SSD/Bus speed. That also included seeding against the 8 nodes, which was completed in 3 seconds.enum : feature_t
{
no_flags = 0,
all_flags = system::bit_all<uint32_t>,
/// -----------------------------------------------------------------------
/// Set at 106 (n/a) [version, verack].
version = system::bit_right<uint32_t>(0),
/// Set at 106 (n/a) [ping].
ping = system::bit_right<uint32_t>(1),
/// Set at 106 (n/a), disabled by config.enable_address [addr].
address = system::bit_right<uint32_t>(2),
/// Set at 209 (n/a), disabled by config.enable_address [getaddr].
get_address = system::bit_right<uint32_t>(3),
/// Set at 311 (n/a), deprecated, enabled by config.enable_alert [alert].
alert = system::bit_right<uint32_t>(4),
/// Set at 31402 (n/a), disabled by enable_address [addr.timestamp].
address_timestamp = system::bit_right<uint32_t>(5),
/// Set at 31800 (n/a) [headers, getheaders].
headers = system::bit_right<uint32_t>(6),
/// Set at 60001 (bip31), nonce and pong messages added [ping.nonce, pong].
ping_pong = system::bit_right<uint32_t>(7),
/// Set at 70001 (bip37) [mempool].
mempool = system::bit_right<uint32_t>(8),
/// Set at 70001 (n/a) [notfound].
not_found = system::bit_right<uint32_t>(9),
/// Set at 70002 (n/a) [multiple inv response].
mempool_multiple = system::bit_right<uint32_t>(10),
/// Set at 70002 (bip61), deprecated, enabled by config.enable_reject [reject].
reject = system::bit_right<uint32_t>(11),
/// Set at 70013 (bip133), enabled by non-zero config.minimum_fee [feefilter].
fee_filter = system::bit_right<uint32_t>(12),
/// -----------------------------------------------------------------------
/// Set by handshake message negotiation, at 70012 (bip130) [sendheaders].
send_headers = system::bit_right<uint32_t>(15),
/// Disabled by config.enable_compact.
/// [sendcmpct, blocktxn, cmpctblock, getblocktxn]
/// Set by post-handshake message negotiations, at 70014 (bip152).
/// Negotiation can establishes multiple versions (only one is defined).
/// Version information is maintained by the compact blocks protocol(s).
send_compact = system::bit_right<uint32_t>(16),
/// Disabled by config.enable_address_v2 (independent of enable_address).
/// Set by handshake message negotiation, at 70016 (bip155) [sendaddrv2, addrv2].
send_address_v2 = system::bit_right<uint32_t>(17),
/// Disabled by config.enable_witness_tx.
/// Set by handshake message negotiation, at 70016 (bip339) [wtxidrelay].
send_witness_tx = system::bit_right<uint32_t>(18),
/// [sendtxrcncl, reqrecon, sketch, reqsketchext, reconcildiff].
/// Disabled by config.enable_erlay, requires wtxidrelay [not supported].
/// Set by handshake message negotiation, at 70016 (bip330).
send_reconcile = system::bit_right<uint32_t>(19),
/// -----------------------------------------------------------------------
/// [getblocks, inv, getdata, block, tx]
/// Set by service::node_network [0], at 106 (excluding 32000 - 32400).
blocks = system::bit_right<uint32_t>(13),
/// Disabled by config.enable_relay.
/// Set by service::node_network [0], at 106.
/// Negated by the version.relay flag, at 70001 (bip37) [version.relay].
transactions = system::bit_right<uint32_t>(14),
/// [merkleblock, filterload, filteradd, filterclear]
/// Set at 70001 (bip37) [not supported, queries allowed but ignored].
/// Set by service::node_bloom [2], at 70011 [otherwise false] (bip111).
bloom = system::bit_right<uint32_t>(20),
/// Set by service::node_witness [3], adds MSG_WITNESS_* inv (bip144).
witness = system::bit_right<uint32_t>(21),
/// Set by service::node_client_filters [6], at 70015 (bip157).
filters = system::bit_right<uint32_t>(22)
}; (edited)protocol_block_out_106 , protocol_block_out_70012 (disables block inv announcement when sendheaders received), protocol_header_out_31800 and protocol_header_out_70012 (enables headers announcement when sendheaders received).
I also added automatic snapshotting when the node is "recent". This includes new is_recent() methods from protocol->session->full_node, a new chaser notification type chase::recent , which is posted by confirmation when a just-organized block is at the configured maximum height or the chain is current (based on is_current() , which is based on configured time from the top confirmed block timestamp (defaults to 60 minutes). Recency is logged at confirmation chaser startup and if it changed to true.
The chase::recent notification is therefore posted 0..1 times for the process. This is caught only by the snapshot chaser, which then takes a snapshot. The snapshot causes all channels to be dropped, the network paused, and restarted when complete. Attachment of protocols to channels tests is_recent() when attaching inbound channels, if delay_inbound is set in node.config , and only attaches block and header inbound protocols when chain is recent. So the recency snapshot serves to reset channels for inbound traffic, and unlike others is not optional/configurable.
I also added duration based events to log the time cost in milliseconds of the snapshot (and a store restart following a disk full resume). Snapshots are typically around a minute. Also added console logging for recency, initial positive state or transition. Finally, added base session_inbound connection acceptance disable and verbose logging, with override in node to disable until is_recent , also only if delay_inbound is configured.and only attaches block and header inbound protocols
delay_inbound is set we don't accept inbound connections or attach outbound protocols (to outbound session channels) until the confirmed chain is current or at maximum configured height ("recent").chase::recent event is consumed. It is handled by the snapshot chaser, which causes a snapshot to be taken (once the node is "recent" - which means current or max height). A snapshot causes all channels to be dropped, which results in no store activity, which allows the table heads and bodies to be flushed to disk, and the heads copied. This also means that the channels are reopened as "recent" - which results in outbound protocols being attached. This is enforced - not configurable. The node will always snapshot once it is recent.chase::recent notification, and that is only used to establish a snapshot, which also resets all channels. We wouldn't want a cycling recency state to cause cycling snapshots. We want just one.milestone 900k record on the maxi of 56.6 minutes. Consistently under 57 mins now. Somehow it keeps getting a little faster. As I add new features, which should have a cost, I also end up optimizing little things. I've started dropping peers for protocol non-conformance. Specifically a lot of Core 25.0 and 25.1 peers send tx inventory despite it not being requested. Also a large number of heavily clock-skewed Core 27.1 and 27.2 nodes, though it appears that these are tied to single owner with a lot of addresses, and not necessarily the node impl.