Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Don't broadcast propagated transaction #49

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Conversation

tuommaki
Copy link
Contributor

If transaction has already been propagated (tx.propagated == true), don't send it to P2P network anymore.

If transaction has already been propagated (tx.propagated == true),
don't send it to P2P network anymore.
@tuommaki tuommaki requested a review from musitdev January 23, 2024 08:09
@tuommaki tuommaki self-assigned this Jan 23, 2024
Copy link
Contributor

@musitdev musitdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one remarks. tx_chan.send_tx(&tx) use p2p broadcast that doesn't fail if one node fail to receive the Tx. It only fails if there's no protocol writing registered.
Do we have to manage a fail when the Tx is send?

@tuommaki
Copy link
Contributor Author

Just one remarks. tx_chan.send_tx(&tx) use p2p broadcast that doesn't fail if one node fail to receive the Tx. It only fails if there's no protocol writing registered.
Do we have to manage a fail when the Tx is send?

Sounds like it wouldn't be easy in the current setting? It could also be a bit pointless, as there's no "catch-up replication" implemented, where a node would pull missing data if it was offline for a period of time. I'm not really sure if any of these are necessary during the devnet period?

@tuommaki tuommaki merged commit 6afedc6 into main Jan 23, 2024
4 checks passed
@tuommaki tuommaki deleted the dont-broadcast-propagated-tx branch January 23, 2024 09:05
@musitdev
Copy link
Contributor

If the node crash or restart, it should bootstrap from another node to get all missing data. The fact is that an error can occur during sending the Tx without because the distant node has crashed. Some heartbeat should be implemented if not. If the heartbeat fails, the node that has network issue should restart and bootstrap. If the connection issue last less than the heartbeat, the node should resent the tx to avoid restarting both node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants