eos icon indicating copy to clipboard operation
eos copied to clipboard

p2p assemble a block based on previously shared transactions and summary info

Open pmesnier opened this issue 9 years ago • 9 comments

This is a TODO in the p2p net plugin code. Currently a complete block is shared when available. Ideally just a block summary will be shared and the peers should be able to reconstruct the block using known transactions and the "block summary." I'm not entirely sure what a block summary is, also are the signed transactions sufficient or are generated transactions necessary, in which case they need to be shared.

pmesnier avatar Aug 31 '17 15:08 pmesnier

I think it should not be necessary to share generated transactions. Full nodes will generate them in the course of processing the normal transactions, so there's no need to send them over the network.

nathanielhourt avatar Sep 05 '17 14:09 nathanielhourt

Perhaps block summary should be block_header?

nathanielhourt avatar Sep 05 '17 14:09 nathanielhourt

This issue is really part of #291.

pmesnier avatar Sep 13 '17 10:09 pmesnier

This is one of the TODO's identified as necessary for efficient p2p networking. Creating branch p2p-send-block-summaries for this issue.

pmesnier avatar Sep 26 '17 02:09 pmesnier

Part of the P2P protocol involves sharing SignedTransactions as they occur. However, signed blocks contain processed transactions containing MessageOutput lists.

I'm not sure the best way to pass the message output content. Should I carry it in the summary along with the transaction ID? Or pass them separately? Ignore them? Generate them anew on the receiving nodes? Something else?

pmesnier avatar Sep 27 '17 05:09 pmesnier

Ignore them -- the P2P layer doesn't need to deal with trx outputs. Everything on the P2P network is capable of generating its own trx outputs.

nathanielhourt avatar Sep 27 '17 15:09 nathanielhourt

Very well. That's the easiest solution.

pmesnier avatar Sep 27 '17 16:09 pmesnier

Holding on this issue. I've got the implementation done but I need to finish last phases of initial syncing, which is fetching blocks above the last irreversible, and then retrieving any unblocked signed transactions so that when block summaries are received the block can be made whole.

pmesnier avatar Sep 28 '17 13:09 pmesnier

PR #543 addresses this issue

pmesnier avatar Oct 05 '17 17:10 pmesnier