Bitcoin full node and query server

January 2021

Archive of the libbitcoin Slack #general channel.

Friday, January 1, 2021

Sergey Pahomov21:52
Hey, team. Sorry for the relatively newbie question. I'm trying to query my own wallet history via: https://github.com/libbitcoin/libbitcoin-client/blob/master/examples/console/client.cpp#L142-L143 Using "tcp://mainnet.libbitcoin.net:9091" as a connection address. But I'm getting: object does not exist response. I'm passing my wallet's address as an address. Do I understand correctly that this node should have the whole blockchain copy, and hence my wallet's history too?
neillm21:53
To query that server, you need to build version3
14 replies · Sergey Pahomov, neillm · last Jan 10, 2021
Sergey Pahomov18:04
But I'm using version3, I guess. I built it from https://github.com/libbitcoin/libbitcoin-client master branch. As other components of libbitcoin
neillm18:05
Try building from the version3 branch. master is staging for version4
Sergey Pahomov18:09
Oh, I'm sorry. Thank you very much for your answer. Btw, is it possible to query and interact with a third party bitcoin nodes, via 4th version? Or is it not ready yet and under development?
neillm18:11
Yes, of course. libbitcoin communicates on the bitcoin p2p protocol. The client -> server interaction is a separate protocol, and right now, several commands in v4 are not compatible with v3 servers.
Sergey Pahomov18:14
Brilliant, thank you Neillm.
neillm18:14
As a side note, version4 libbitcoin-server (i.e. bs) can respond to several queries from bitcoin-cli, over the json-rpc interface. But if you're asking if libbitcoin-client can query bitcoind, the answer is no because it doesn't support a high performance query interface.
Sergey Pahomov18:20
Ok, great clarification. I'm not really interested at this time in server. What I want to to do is a small client app which will be able to query any bitcoin node. As far as I understood I should use v3 for it. Along with http://aaronjaramillo.org/ tutorials and docs from gihub?
aaronjaramillo.org
Aaron Jaramillo
neillm18:23
Yes, version3 is production, so it's recommended right now. You may want to look at libbitcoin-node, as it contains everything needed to communicate with bitcoin peers on the p2p protocol. libbitcoin-client is specifically made to communicate with libbitcoin-server, so it's not clear it's what you want.
Sergey Pahomov18:33
OK, I understood, guess I should be more attentive. I'll go through tutorial once again.
Sergey Pahomov23:28
Hey, Neillm Exact copypaste of https://github.com/AaronJaramillo/LibbitcoinTutorial/blob/master/HDKeychain/Balance.cpp With a different bitcoin-address and uri:
tcp://31.127.58.6:8333
Acquired from https://bitnodes.io/nodes/?q=United%20Kingdom Also ended with the connection timed out.
bitnodes.io
Bitnodes is currently being developed to estimate the size of the Bitcoin network by finding all the reachable nodes in the network.
neillm03:29
libbitcoin-client code works with libbitcoin-server as the endpoint, NOT bitcoind, which only supports the p2p protocol. libbitcoin has a rich and high-performance client/server query interface that is unrelated to the bitcoin p2p protocol. Pointing code written using libbitcoin-client to a node that doesn't understand the protocol won't work.
Sergey Pahomov13:37
Oh, I am sorry. Thank you very much for response
(edited)
neillm14:37
No problem. If you're using version3 client code, you can query the community servers: https://github.com/libbitcoin/libbitcoin-server/wiki/Community-Servers
Sergey Pahomov13:30
Thanks, Neillm. I understood that bitcoin-server is a node (and hence it stores the whole blockchain) with a zmq-based query interface. And then it broadcasts queries to the p2p network.

Saturday, January 2, 2021

evan00:14
replied to a thread: view
LETS DO IT!!! What would be the best hardware to have? And what would be the most minimal hardware? I’ll get something in between.

Sunday, January 3, 2021

N
narodnik09:33
hey evan, how old are you? do you want to learn programming?

Monday, January 4, 2021

evan03:39
I am 35 :( but I am willing to learn anything if you are willing to teach!
neillm03:41
Not sure if age is relevant, just motivation in my experience.
evan04:15
You think 12 cores /24 threads would be enough??
1 reply · neillm · last Jan 04, 2021
neillm04:18
Yes, that's good. Validation from scratch takes times, but it also matters how fast your I/O is, etc. Once you're sync'd, that's plenty good.

Tuesday, January 5, 2021

N
narodnik21:40
The network code in libbitcoin is very well designed
evan22:10
I agree, not that I have a clue what I’m looking at but I spent months looking at everything I could, even back to obelisk and sx
👍 2

Monday, January 11, 2021

N
narodnik16:42
void session::start_channel(channel::ptr channel,
    result_handler handle_started)
{
    channel->set_notify(notify_on_connect_);
    channel->set_nonce(pseudo_random::next(1, max_uint64));

    // The channel starts, invokes the handler, then starts the read cycle.
    channel->start(
        BIND3(handle_starting, _1, channel, handle_started));
}

void session::handle_starting(const code& ec, channel::ptr channel,
    result_handler handle_started)
{
    if (ec)
    {
        LOG_DEBUG(LOG_NETWORK)
            << "Channel failed to start [" << channel->authority() << "] "
            << ec.message();
        handle_started(ec);
        return;
    }

    attach_handshake_protocols(channel,
        BIND3(handle_handshake, _1, channel, handle_started));
}
Read on channel is started before handshake protocol is attached. Is this a problem?
evoskuil16:54
You mean due to a race between read of an incoming message and ability to handle it in the handshake protocol? I don’t believe so but I’ll look at it. It’s been a while since I’ve been in there.
N
narodnik18:23
Yep, just wondering
evoskuil18:31
Love that you’re taking a close look.
N
narodnik19:01
The design is excellent
👍 2

Thursday, January 21, 2021

N
narodnik16:48
Interesting today bitcoin.org took down the whitepaper. Shows how they can be easily pushed around by a nobody, and Bitcoin is vulnerable to social attacks. https://twitter.com/Narodism/status/1352238840854040576
Also this article linked is interesting https://www.conformal.com/the-bitcoin-consensus-red-herring/
(edited)
evoskuil17:05
I reference that article in the book I think.

Thursday, January 28, 2021