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

refactor: remove processed key and handling code #216

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Conversation

jtieri
Copy link
Member

@jtieri jtieri commented Sep 4, 2024

This PR removes the ProcessedKey, which was previously being used by the swap and forward middleware to determine if a packet being handled was already processed by a middleware further up in the stack. If a packet was previously processed by some other middleware then this value would be initialized via a value passed through a context, this would ensure the PFM would not make a second call into the underlying app and invoke the OnRecvPacket callback twice, ensuring that the mint/burn voucher logic would not be invoked more than once.

If for some reason there is a need to have this sort of handling in the future then we can revisit bringing in this code.

@jtieri jtieri added BACKPORT Backport into maintained branches packet-forward-middleware Label for items related to the packet forward middleware labels Sep 4, 2024
I cannot find a link to the code so this now links to the spec
@jtieri jtieri requested review from agouin and Reecepbcups and removed request for agouin September 4, 2024 20:18
@jtieri jtieri merged commit 8cb681e into main Sep 4, 2024
11 of 12 checks passed
@jtieri jtieri deleted the justin/processed-key branch September 4, 2024 21:22
mergify bot pushed a commit that referenced this pull request Sep 4, 2024
* refactor: remove processed key and handling code

* refactor: ensure the underlying apps `OnRecvPacket` callback is invoked

* docs: fix broken link to Defund-Labs interquery.

I cannot find a link to the code so this now links to the spec

(cherry picked from commit 8cb681e)
mergify bot pushed a commit that referenced this pull request Sep 4, 2024
* refactor: remove processed key and handling code

* refactor: ensure the underlying apps `OnRecvPacket` callback is invoked

* docs: fix broken link to Defund-Labs interquery.

I cannot find a link to the code so this now links to the spec

(cherry picked from commit 8cb681e)
jtieri added a commit that referenced this pull request Sep 4, 2024
* refactor: remove processed key and handling code

* refactor: ensure the underlying apps `OnRecvPacket` callback is invoked

* docs: fix broken link to Defund-Labs interquery.

I cannot find a link to the code so this now links to the spec

(cherry picked from commit 8cb681e)

Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>
jtieri added a commit that referenced this pull request Sep 4, 2024
* refactor: remove processed key and handling code

* refactor: ensure the underlying apps `OnRecvPacket` callback is invoked

* docs: fix broken link to Defund-Labs interquery.

I cannot find a link to the code so this now links to the spec

(cherry picked from commit 8cb681e)

Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORT Backport into maintained branches packet-forward-middleware Label for items related to the packet forward middleware
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants