Bitcoin full node and query server

Oct 27, 2024

View in context in the libbitcoin Slack #general mirror.

A
Antoine Poinsot19:42
Here is my "Libbitcoin for Core people" writeup, which intends to conceptually summarizes how Libbitcoin works for people familiar with Bitcoin Core. https://gist.github.com/darosior/97958327835eeef4119418e4d3b6d27f I intend it to post it to Delving Bitcoin (probably tomorrow) so people can discuss it and you can participate if you're so inclined. I tried to keep it a high-level overview, so i've omitted some details you've shared here. These can be brought up if people ask about a certain area in the comments. If you have the time to skim through it please let me know if i got anything wrong or feel i'm misrepresenting something.
evoskuil20:14
When received, all checks which don't require strict ordering are performed and transactions are stored in a global transaction index.
Under milestone only the commitments are checked. Otherwise block.check is performed. This may requires check context (for forks), but it does not require prevouts.
// Header state is checked by organize.
code protocol_block_in_31800::check(const chain::block& block,
    const chain::context& ctx, bool bypass) const NOEXCEPT
{
    code ec{};
    if (bypass)
    {
        // Only identity is required under bypass.
        if (((ec = block.identify())) || ((ec = block.identify(ctx))))
            return ec;
    }
    else
    {
        // Identity is not correct if error::invalid_transaction_commitment.
        if ((ec = block.check()))
        {
            if ((ec != system::error::invalid_transaction_commitment) &&
                block.is_malleated())
                return system::error::block_malleated;

            return ec;
        }

        if ((ec = block.check(ctx)))
            return ec;
    }

    return system::error::block_success;
}
(edited)