eos icon indicating copy to clipboard operation
eos copied to clipboard

DAWN-21 ⁃ p2p sync pending transactions

Open blockone-syncclient opened this issue 9 years ago • 7 comments

(Replaces github issue #571)

Phil:

moving this over from #550 (github). This also relates to super-isssue #291 (github).

I believe I have a solution to the problem of effectively sending 1000s of pending transactions to a newly started producer node. I assume that a non-producing node has no need to cache pending transactions apart fromm possibly being able to forward transacitions on to other producer nodes.

The solution is it add a second queue on the connection object that would be filled with previously packed transactions. Then bundles of transactions are sent out at a lower priority than the notification and request messages.

The pending txn queue can be popluated with all cached packed transactions, or with all except those in a list, or only with those in the list.

Testing is proceeding.

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Joshua Lavin commented:

Phil:

This enhancement includes 2 extensions to the p2p protocol - I added a new message, "go_away" to convey that a compliant peer should not try to reconnect after an active connection closure. This allows for redundant remote connections in the node's config to facilitate quick reconnection after peer restart without worrying about duplication of messages.

Second, I extended the data passed with the notify and request messages, adding a "mode" for distinguishing between normal or catch-up modes, and an explicit indication that either the block or the transaction list is not supplied, rather than being supplied but empty. In catch-up mode, an empty id list in the request means send all pending blocks or transactions, whereas a nonempty list with a catchup-up messages indicates which block or transactions to not send, think of "send all except these"

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Phil Mesnier commented:

(from oct 20 gh #571) still in progress. Most recent push includes all the pieces necessary (IMO) to sort out initial sync once and for all. Still a little buggy in terms of determining which participant should do what, but I've got 10 hours of train time today to sort that all out.

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Phil Mesnier commented:

See PR #587

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Phil Mesnier commented:

[~dan.larimer] I have a remaining question on the block summaries + transaction ids. The issue is that the User Transactions in the block are "ProcessedTransactions" which includes output messages. Also GeneratedTransactions are included in the merkle calculation so they need to be included in the reassembled signed block.

So what should I be doing to reconstitute the processed transactions so that hash values and merkles match?

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Bezwada Satyapravin commented:

Please let us know how to QA this ticket.

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

➤ Phil Mesnier commented:

Marked this one done - Dan decided that for STAT we'll just go with sending full blocks making this issue redundant.

blockone-syncclient avatar Nov 06 '17 23:11 blockone-syncclient

Sync'd the issue back to JIRA and closing.

coreylederer avatar Nov 06 '17 23:11 coreylederer