Skip to content

node: confirm broadcast delivery before closing the connection - #66

Merged
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:broadcast-keep-connection
Jun 18, 2026
Merged

node: confirm broadcast delivery before closing the connection#66
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:broadcast-keep-connection

Conversation

@pzafonte

@pzafonte pzafonte commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

broadcast_transaction opened a connection, sent the transaction, but closed the connection right away. Closing immediately tore the connection down before the peer had relayed the transaction. The transaction was dropped, so a valid broadcast reported success but never showed up in the mempool.

Send a ping after the transaction and wait for the matching pong before closing. A peer handles a connection's messages in order, so the pong cannot arrive until the transaction ahead of it was processed, which confirms the peer took it in.

Part of #51.

broadcast_transaction opened a connection, sent the transaction, but
closed the connection right away. Closing immediately tore the
connection down before the peer had relayed the transaction. The
transaction was dropped, so a valid broadcast reported success but
never showed up in the mempool.

Send a ping after the transaction and wait for the matching pong before
closing. A peer handles a connection's messages in order, so the pong
cannot arrive until the transaction ahead of it was processed, which
confirms the peer took it in.
@rustaceanrob
rustaceanrob merged commit ee8981b into kernel-node:master Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants