Bitcoin full node and query server

Apr 10, 2023

View in context in the libbitcoin Slack #general mirror.

evoskuil09:17
I did this quick pair of runs to establish the benefit of parallelism (by tx within a block) for tx.set_strong() , which precedes confirmation evaluation. The store is fully concurrent/thread safe read/write. So I just dropped in this one change (adding bc::par_unseq), and got the graphed result for blocks 50k-190k:
TEMPLATE
bool CLASS::set_strong(const header_link& link) NOEXCEPT
{
    const auto txs = to_txs(link);
    if (txs.empty())
        return false;

    const table::strong_tx::record strong{ {}, link };

    // ========================================================================
    const auto scope = store_.get_transactor();

    return std::all_of(bc::par_unseq, txs.begin(), txs.end(),
        [&](const tx_link& fk) NOEXCEPT
        {
            return store_.strong_tx.put(fk, strong);
        });
    // ========================================================================
}
image.png