You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replaying the event log results in "expired" error for successfully completed sessions #1651
❯ cargo run -- history
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
Running `/Users/spacebear/Projects/rust-payjoin/target/debug/payjoin-cli history`
Session ID Sender/Receiver Completed At Status
25 Receiver Not Completed Session expired at Time(Time(1778362082))
1 Receiver 1778275755 Session expired at Time(Time(1761155560))
2 Receiver 1778275755 Session expired at Time(Time(1761234352))
Sessions 1 and 2 were completed but display the "expired" status erroneously.
changed the title [-]payjoin-cli history command displays "expired" status for successfully completed sessions[/-][+]Replaying the event log results in "expired" error for successfully completed sessions[/+]on Jun 17, 2026
consider whether replay_event_log should error at all on expired sessions
The strongest reason to keep it this way is that this explicitly forces sessions to be dropped when they expire, otherwise implementers can run resume on expired sessions if they don't properly look for the SessionStatus::Expired beforehand
The strongest reason to keep it this way is that this explicitly forces sessions to be dropped when they expire, otherwise implementers can run resume on expired sessions if they don't properly look for the SessionStatus::Expired beforehand
This is a good point and I actually ran into this issue locally after attempting to remove the expiration error on replay.
#1672 addresses the core bug in replay_event_log, but I'm keeping this open until we revisit the payjoin-cli history display for expired sessions which is still confusing
if it's just in the DB it's useful for resuming sessions > resumed. Just removing the column from the display is good. "Closed at" could work for display but imoh it's not necessary. Seems like it either expires, or you have a transaction in a block with that block's timestamp (or detection time if you're super detailed)
Activity
spacebear21 commentedon Jun 17, 2026
This is actually a bug in
replay_event_log, because it returns an Expiration error upon replay if the expiration duration has elapsed.[-]payjoin-cli history command displays "expired" status for successfully completed sessions[/-][+]Replaying the event log results in "expired" error for successfully completed sessions[/+]zealsham commentedon Jun 17, 2026
@spacebear21 I’ll work on this if you’re not currently working on it already
Spacebear commentedon Jun 18, 2026
Hi I think you meant @spacebear21
zealsham commentedon Jun 18, 2026
omg!, i'm so sorry for the tag. i blindly trusted github suggestion
benalleng commentedon Jun 23, 2026
We only want this error when the session still beleives that the session is active so something like
// deleted as it did not workshould be sufficient IMOEdit: this did not work as expected so I think I need to rethink what this block is looking forzealsham commentedon Jun 23, 2026
i was able to trace this to constructHistory for both receive and send returning InternalReplayError::Expired if expiration has elpased
Fix replayEventLog report closed session as expired.
benalleng commentedon Jun 24, 2026
From #1672 (comment)
The strongest reason to keep it this way is that this explicitly forces sessions to be dropped when they expire, otherwise implementers can run resume on expired sessions if they don't properly look for the
SessionStatus::Expiredbeforehandspacebear21 commentedon Jun 24, 2026
This is a good point and I actually ran into this issue locally after attempting to remove the expiration error on replay.
spacebear21 commentedon Jun 24, 2026
#1672 addresses the core bug in replay_event_log, but I'm keeping this open until we revisit the payjoin-cli history display for expired sessions which is still confusing
benalleng commentedon Jun 25, 2026
I think we can solve this in 2 ways.
Ended atClosed atTerminated atTerminal timestampSuccessandFallbackBroadcastare the only two states to show a completed at timestamp all others remainNot Completespacebear21 commentedon Jun 25, 2026
DanGould commentedon Jun 30, 2026
if it's just in the DB it's useful for resuming sessions > resumed. Just removing the column from the display is good. "Closed at" could work for display but imoh it's not necessary. Seems like it either expires, or you have a transaction in a block with that block's timestamp (or detection time if you're super detailed)