0

I'd like to better understand how a light node can retrieve a complete node. If I understood correctly, I can consider a light node a node which is part of the peer-to-peer network that receives and stores only block headers, which means around 80 Bytes every 10 minutes (of course with some approximations).

Suppose that the light client wants to retrieve the complete block number 1234. I've seen on the documentation the getData message, which other nodes can reply with a block message.

Do you have any hints on how to evaluate how many bytes the light client must send for the getData message and how many bytes must be received? I think it could sufficient to retrieve only one block from the network since the light node can validate if this block is part of its local head-only-blockchain.

Thanks for the support :)

1 Answer 1

0

Suppose that the light client wants to retrieve the complete block number 1234. I've seen on the documentation the getdata message, which other nodes can reply with a block message.

Do you have any hints on how to evaluate how many bytes the light client must send for the getdata message and how many bytes must be received?

It depends on how big the block is. The block is 0-1 MB prior to segregated witness activating, and 0-4 MB afterward. In general, the earlier the block is from, the less data it contains.

There's some overhead for the message header, but it's 24 bytes, so it doesn't really matter.

3
  • Ok thank you! Is my way of thinking about the exchanged messages correct ?
    – gatb27
    Apr 6, 2017 at 5:18
  • There's overhead for message framing, and keepalive messages. It's not exactly 80 bytes/10 minutes.
    – Nick ODell
    Apr 6, 2017 at 5:32
  • What is the best approximation we can do to evaluate this overhead?
    – gatb27
    Apr 6, 2017 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.