Skip to content
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

retry only if processing completed for a packet #1393

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

agouin
Copy link
Member

@agouin agouin commented Feb 1, 2024

retries := dst.trackProcessingMessage(t)

here we track the height where we are "processing" a message. This is prior to attempting the broadcas

if blocksSinceLastProcessed < blocksToRetrySendAfter {

here, we check if the number of blocks since the lastProcessedHeight is at least 5, and will retry if so.

So, if we broadcast and don't see the observed event within 5 blocks, it will retry. This is especially an issue on faster chains such as sei and dydx where tx propagation through the p2p network can take more than 5 blocks

This modifies the behavior to be: if the last attempted broadcast completed, then retry if it has been more than 5 blocks since the previous broadcast attempt.

Additionally:
removePacketRetention was using the incorrect key for clearing caches on the counterparty, which for acks can lead to counterparty recvpackets not being cleared.

Related: #1359

@agouin agouin marked this pull request as ready for review February 1, 2024 05:10
Copy link
Member

@jtieri jtieri left a comment

Choose a reason for hiding this comment

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

great catch on these! had two questions for ya but other than that this looks good

Copy link
Member

@jtieri jtieri left a comment

Choose a reason for hiding this comment

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

huge performance boost right here, great sleuthing!

@jtieri jtieri merged commit d821ab7 into main Feb 1, 2024
19 checks passed
@jtieri jtieri deleted the andrew/retry_only_after_processing branch February 1, 2024 18:10
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