-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow syncing from pruned nodes #143
Comments
Do we really want to sync from pruned nodes even though there are plenty of full nodes on the network? Seems like a lot of complexity for relatively little gain. |
It's not a high priority right now but if the average blocksize goes up I'd expect to see more pruned nodes and fewer full nodes to sync from. At the end of the day the most bandwidth intensive operation is uploading historical blocks to other peers. It's like 98% of your bandwidth usage. If we can spread that cost around to more nodes (pruned nodes in this case) then we can lighten the load on everyone else. |
We have more issues with this.
|
Pruned nodes signal themselves with the
NodeNetworkLimited
service flag. Since they are capable of serving a least a limited number of blocks, we should allow syncing from them if appropriate.Things to do:
Allow nodes signaling
NodeNetworkLimited
to be selected as a sync candidate if we are less than 30 days from the tip. 30 days is just a guess at an appropriate number I suppose it could be a little longer.We don't currently allow outgoing connections to nodes not signaling
NodeNetwork
. Ideally we would allow outgoing connections toNodeNetworkLimited
nodes if we are less than 30 days from the tip, but at startup we don't really know how far we are from the tip. Maybe the best way to handle this is to allow at most half of our outgoing slots to be taken up by pruned nodes.If we send a
GetBlocks
message to a pruned node and they don't have the block, they will respond with aNotFound
message. We don't currently handle theNotFound
and instead will eventually timeout. We need to make it handle theNotFound
response and disconnect the peer.The text was updated successfully, but these errors were encountered: