Fix unresumable Sender - #443
Merged
Merged
Conversation
DanGould
force-pushed
the
fix-send-resume
branch
from
December 23, 2024 05:20
469052e to
c0e1d10
Compare
Collaborator
Pull Request Test Coverage Report for Build 12465664083Details
💛 - Coveralls |
DanGould
force-pushed
the
fix-send-resume
branch
from
December 23, 2024 05:32
c0e1d10 to
5b25a0f
Compare
The Sender was generating new hpke keys on resume since keygen was being done in `extract_v2`. This caused a problem where when the Sender was persisted, stopped, and resumed, the receiver would have already pushed a response to a different ShortId than the one the Sender would look for it in the resumed state. By generating a key on Sender creation and persisting that the Sender can produce a consistent HpkeContext every single run.
DanGould
force-pushed
the
fix-send-resume
branch
3 times, most recently
from
December 23, 2024 05:42
c8fd0a3 to
226816a
Compare
This was referenced Dec 23, 2024
Collaborator
|
It looks like the e2e test is silently swallowing errors somehow. This is in |
Collaborator
|
I pushed a fix for the e2e test to correctly bubble up payjoin-cli errors, and confirmed that this commit currently fails on |
Bubble up payjoin-cli errors instead of silently swallowing them.
spacebear21
force-pushed
the
fix-send-resume
branch
from
December 23, 2024 10:55
f1dd5af to
86a9a8a
Compare
Member
Author
|
Also tested 86a9a8a cherry-picked on top of master to make sure it fails. good catch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sender was generating new hpke keys on resume since keygen was being done in
extract_v2. This caused a problem where when the Sender was persisted, stopped, and resumed, the receiver would have already pushed a response to a different ShortId than the one the Sender would look for it in the resumed state.By generating a key on Sender creation and persisting that the Sender can produce a consistent HpkeContext every single run.
I am NOT sure why the e2e test did not catch this. I believed its behavior was starting a receiver, stopping it, starting a sender, stopping it, resuiming a receiver, stopping it, and resuming a sender, and stopping it which is where this bug propagated. It didn't fail before this change and I'm not sure why, it should have.