Archive of the libbitcoin Slack #general channel.
void session_outbound::attach_protocols(channel::ptr channel)
{
const auto version = channel->negotiated_version();
if (version >= version::level::bip31)
attach<protocol_ping_60001>(channel)->start();
else
attach<protocol_ping_31402>(channel)->start();
if (version >= version::level::bip61)
attach<protocol_reject_70002>(channel)->start();
if (version >= version::level::headers)
attach<protocol_header_in>(channel, chain_)->start();
attach<protocol_block_in>(channel, chain_)->start();
attach<protocol_transaction_in>(channel, chain_)->start();
attach<protocol_transaction_out>(channel, chain_)->start();
attach<protocol_address_31402>(channel)->start();
using serve = system::message::version::service;
const auto services = settings_.services;
if ((services & serve::node_compact_filters) == serve::node_compact_filters)
attach<protocol_compact_filter_out>(channel, chain_)->start();
}bx ec-new only accepts base16 entropy with at least 128 bits. I'm passing 1ffffffffffffffffffffffffffffffff hex which technically has 129 bits and yet bx ec-new complains that the argument is invalid. What am I missing? (I understand that we should be using bx seed but I'm just testing some features)bx ec-new 01ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff and ffffffffffffffffffffffffffffffff. Their decimal values are one and the same but the resulting addresses are completely different. What might be happening in the background?The optimal number of threads for any pool varies. I have found that on my 32 dual core (64) machines, 32 is more optimal than 64 for the validation threadpool. At some point the cost of fanning out the parallel jobs exceeds the benefit of parallelism. For this reason the node limits the number of threads configured to the number that are reported by the operating system, but that’s fairly arbitrary and more of a safeguard against gross misconfiguration.
pseudo_random used within ruststd::unique_ptr for libbitcoin::system::wallet::hd_private https://github.com/darkrenaissance/darkfi/blob/libbitcoin-gen/gen/libbitcoin/src/helpers.hpp#L8generate!("libbitcoin::system::pseudo_random_fill")The optimal number of threads for any pool varies. I have found that on my 32 dual core (64) machines, 32 is more optimal than 64 for the validation threadpool. At some point the cost of fanning out the parallel jobs exceeds the benefit of parallelism. For this reason the node limits the number of threads configured to the number that are reported by the operating system, but that’s fairly arbitrary and more of a safeguard against gross misconfiguration.
header_const_ptr_list_const_ptr using grep. I can only find usage of it.
Where/how is it defined?/libbitcoin-system/include/bitcoin/system/message/messages.hpp
There's all these DECLARE_MESSAGE_POINTER_TYPE macros.full_node has a block_chain typed object and when I call node->chain() it returns a safe_chain& typed object. Is it safe for me to typecast the outcome of node->chain() back to block_chain?
I wanna poll for what’s the head block’s hash & height, which I cannot get with a `safe_chain` typed object.
These are available on `block_chain` only:
/// Get highest confirmed or candidate header.
bool get_top(system::chain::header& out_header, size_t& out_height,
bool candidate) const;
/// Get highest confirmed or candidate checkpoint.
bool get_top(system::config::checkpoint& out_checkpoint,
bool candidate) const;
/// Get height of highest confirmed or candidate header.
bool get_top_height(size_t& out_height, bool candidate) const; fetch_block_header accomplish what you want without trying to bypass the abstraction provided. Alternatively you're implementing a server and should derive to get access.bn seems to work fine, though. This issue is not present on bn.
Do you know when bn is expected to be solid?