Change log
Introduce monitoring typestates, replyable error handling, and other updates for more robust session lifecycle management.
Selected Improvements:
Updates to Typestates and Session Event Log Replay
- Receiver Monitor Typestate (#1061)
- Sender closed variant (#1129)
- Rename sender session events (#1125, #1116)
- Remove
PollingForProposal
from session event (#1128) - Return closed session state during replays (#1136)
- Introduce
SessionEvent::Closed
(#1078) - Name multi-field SessionEvent variants (#1051)
- Enforce
handle_fatal_reject
type safety (#1058) - Remove uninitialized session state (#1014)
- Enforce that
SessionHistory
is created internally (#1062) - Reduce visibility of common recv abstractions (#1109)
- Abstract V2 Sender over SenderContext and remove public Url (#1141)
Improve Error Handling
- Handle fatal errors in receiver state machine (#1060)
- Update sender
process_res
to parse and process error response (#1114) - HPKE encrypt error response (#1115)
- Use
HasReplyableErrorTransition
in reply error typestate (#1130) - Use reply key for replyable errors to v2 senders (#981)
- Improve
receive
error hierarchy (#1031) - Separate session replay & protocol operation (#1036)
API and Dependency Refinements
- Depend on
url/serde
with no default features (#1126) - Use String type instead of Url on Request Struct (#1122)
- Remove the url crate dep from payjoin-test-utils (#1111)
- Remove use of payjoin::Url and url::Url in public methods (#1057)
- Make
payjoin::uri
module public (#1048) - Replace
psbt_with_fee_contributions
with pub fn (#1120) - Refactor sender to validate PjParam by version (#901)
- Replace bitcoind with corepc_node (#1041)
- Bump MSRV to 1.85.0 (#957)
- Upgrade testcontainers (#970)
Build, CI, and Workflow Enhancements
- Run all tests in macOS CI (#1094)
- Use tracing crate instead of log (#1020)
- Add Pull Request Review Template (#967)
- Add bug issue templates (#758, #784)
- Add Feature Request, Good First Issue, and General Issue Templates (#891)
- Enforce new AI Disclosure in PR Checklist (#1012)
Miscellaneous Cleanups
- Remove redundant fields from
WantsInputs
,WantsOutputs
, andWantsFeeRange
events (#1106, #1102, #1092) - Remove mailbox from receiver session context (#1112)
- Remove extraneous clones and redundant Vec clones in HPKE encrypt functions (#1089, #982, #845)
- Use
expiration
instead ofexpiry
(#1087) - Clarify request construction methods for sender and receiver (#814)
What's Changed
- Rename FFI error types to avoid naming conflicts by @spacebear21 in #830
- Serve a page on / for payjoin-directory by @zealsham in #824
- Shift cargo mutants inclusion files to be within the core module by @benalleng in #833
- Bump payjoin-ffi version to 0.24 by @arminsabouri in #842
- Bump payjoin-cli version to 0.2.0 by @arminsabouri in #838
- Remove to/from json methods on typestates by @arminsabouri in #835
- Bump payjoin-directory version to 0.0.3 by @arminsabouri in #840
- Bump payjoin-test-utils version to 0.0.1 by @arminsabouri in #841
- Add initial warnings against OHTTP request reuse by @0xZaddyy in #828
- Add bug issue templates (#758) by @thebrandonlucas in #784
- Fix ffi fmt and run
fmt --check
in CI by @arminsabouri in #832 - Remove python-bitcoinlib dependency for ffi by @benalleng in #849
- Session persister mutants by @benalleng in #791
- Helper method for optional parameters with docstring by @zealsham in #853
- Fix minor typo in README by @Mshehu5 in #858
- Setup Lint workflows for payjoin-ffi by @arminsabouri in #846
- Add
expected_weight
field toInputPair
by @arturgontijo in #772 - Fragment parameter fixes by @nothingmuch in #852
- Update receiver typestate documentation for functions shared between v1 and v2 (and some InputPair documentation) by @mehmetefeumit in #769
- Prevent concurrent lockfile conflicts using flock and add backup by @0xZaddyy in #851
- Remove unnecessary payjoin-ffi dependencies by @spacebear21 in #866
- Remove redundant clones by @shinghim in #845
- Add mutant catch for incompatible mixed fragment by @benalleng in #871
- Fix
pjos
handling in v2 receiver and sender by @spacebear21 in #847 - Use tempfile for temporary e2e test directories by @spacebear21 in #868
- Clarify request construction methods for sender and receiver by @0xZaddyy in #814
- Derive weight from witness for p2wsh inputs by @arminsabouri in #862
- Uniffi dart by @spacebear21 in #829
- Remove commented out ffi reciever unit test by @arminsabouri in #887
- Enforce nightly rust toolchain by @spacebear21 in #885
- Separate out fee application into own typestate by @arminsabouri in #881
- Replaces 'flock' with mkdir locking by @Johnosezele in #886
- Add PartialEq/Eq to errors for easier comparison by @w3irdrobot in #768
- Add Feature Request, Good First Issue, and General Issue Templates by @thebrandonlucas in #891
- Use FnMut closures for receiver typestate checks by @benalleng in #883
- Abstract common sender functionality, not heirarchy by @DanGould in #884
- Remove mod/uni payjoin-ffi distinction by @DanGould in #899
- Cargo mutants version update by @benalleng in #882
- Remove unneeded PSBT fields when extracting request by @arminsabouri in #907
- Restore PSBT input field
witness_script
by @arminsabouri in #908 - Restore original psbt output fields by @arminsabouri in #909
- Diff based cargo-mutants by @benalleng in #910
- e2e test concurrency fixes by @nothingmuch in #913
- refactor: introduce payjoin_directory::Service by @nothingmuch in #914
- Check ntxid after proposal finalization by @arminsabouri in #905
- Stale mutant exclusions by @benalleng in #918
- Remove NS1R from master by @arminsabouri in #923
- Add default directory to payjoin-cli by @zealsham in #874
- Reduce visibility of
JsonReply::new
by @arminsabouri in #931 - Add coverage converting impl error to jsonreply by @arminsabouri in #936
- Remove
change_vout
fromProvisionalProposal
by @arminsabouri in #939 - Reduce FFI transition save boilerplate via macros by @arminsabouri in #944
- Add amount to recv session context by @arminsabouri in #920
- Decapsulate v1 provisional and payjoin typestate from v2 typestate by @arminsabouri in #938
- Rename
context
tosession_context
by @arminsabouri in #953 - Full mutant coverage by @benalleng in #928
- Replace bitcoincore-rpc with custom reqwest client by @bc1cindy in #945
- Reduce visibility of state transition types by @arminsabouri in #955
- Bump MSRV to 1.85.0 by @benalleng in #957
- Tests: optimize clone usage in integration tests by @bc1cindy in #960
- chore: Enhance JsonReply leakage test by @Prabhat1308 in #961
- Add Pull Request Review Template by @DanGould in #967
- Upgrade testcontainers by @spacebear21 in #970
- Optimize SessionPersister trait for better ownership semantics by @bc1cindy in #962
- Fix RPC error message regression in reqwest client by @bc1cindy in #971
- Decoupling v2 receiver typestates from v1 typestates by @arminsabouri in #951
- Add test cov for
WantsFeeRange
ser/deserialization by @arminsabouri in #975 - Add dart github workflow by @spacebear21 in #876
- Add test to enforce v1 output substitution disabling in v2 by @Johnosezele in #963
- Add documentation builder to pre-commit hook recommendation by @mehmetefeumit in #820
- Remove redundant Vec clones in HPKE encrypt functions by @bc1cindy in #982
- Rename _danger-local-https to _manual-tls by @0xZaddyy in #763
- Enforce 1.85 toolchain in Dart/Python workflows by @spacebear21 in #986
- Optimize clone usage in receive module by @bc1cindy in #972
- Replace String clones with references in CLI RPC methods by @bc1cindy in #977
- Refactor sender to validate PjParam by version by @DanGould in #901
- Optimize the workflow for dart CI by @benalleng in #988
- Optimize the workflow for python CI by @benalleng in #989
- Reduce visibility of
session_context
method by @arminsabouri in #991 - Introduce metrics Collection via prometheus for payjoin directory by @zealsham in #848
- Migrate payjoin-cli from sled to rusqlite by @Mshehu5 in #873
- Simplify session id pj cli by @arminsabouri in #999
- Remove apt commands from bindings generate script by @arminsabouri in #1000
- Add missing uniffi exports by @spacebear21 in #1001
- Remove duplicate short id calculation code by @arminsabouri in #1004
- Update msrv deps by @benalleng in #959
- Fetching ohttp-keys should time out quickly by @zealsham in #1005
- Take advantage of MSRV 1.85.0 in
payjoin-ffi
by @DanGould in #1006 - Separate receiver::{v1,v2} abstraction cleanly by @DanGould in #998
- Use default dev profile for development in ffi by @benalleng in #1011
- Enforce new AI Disclosure in PR Checklist by @DanGould in #1012
- Add receiver pk to session metadata by @arminsabouri in #995
- Refactor
WantsFeeRange
by @DanGould in #1010 - Add receiver builder by @arminsabouri in #1002
- Supertrait seal
{send,receive}::..State
traits by @DanGould in #994 - Use reply key for replyable errors to v2 senders by @nothingmuch in #981
- not all integration tests depend on both v1 and v2 support by @nothingmuch in #1018
- flake.lock: Update by @nothingmuch in #1015
- Configure directory with config & clap by @nothingmuch in #927
- use tracing crate instead of log by @nothingmuch in #1020
- remove duplicate short CLI flag by @nothingmuch in #1024
- Improve
receive
error heirarchy by @DanGould in #1031 - Save max fee rate in receiver session context by @arminsabouri in #1033
- Render PR checklist in details to hide it by @DanGould in #1037
- Change
from_id
return type toSelf
by @arminsabouri in #1040 - Update directory and ffi toml files where deps were incorrect by @benalleng in #1044
- Replace bitcoind with corepc_node by @spacebear21 in #1041
- One expiration error: Separate session replay & protocol operation by @DanGould in #1036
- Name multi-field SessionEvent variants by @spacebear21 in #1051
- Oneline
ProtocolError::V1
JsonReply
conversion by @spacebear21 in #1052 - Change return type of
apply_unchecked_from_payload
by @arminsabouri in #1053 - Pull session context out of receiver state by @arminsabouri in #1054
- Remove uninitialized session state by @arminsabouri in #1014
- Remove references to ReplyableError in tests by @spacebear21 in #1059
- Enforce
handle_fatal_reject
type safety by @arminsabouri in #1058 - Remove optional return types from session history methods by @0xZaddyy in #1055
- Enforce that
SessionHistory
is created internally by @arminsabouri in #1062 - Make payjoin::uri module public by @Johnosezele in #1048
- Remove use of payjoin::Url and url::Url in public Api by @benalleng in #1057
- Replace custom RPC client with bitcoind-async-client by @arminsabouri in #1063
- InvalidFormat instead of DecodeBech32 & InvalidHrp by @nothingmuch in #1074
- Display session history in payjoin-cli by @arminsabouri in #1039
- Rename
V2GetContext
toPollingForProposal
by @arminsabouri in #1072 - Update Receiver State transition methods to consume self by @arminsabouri in #1076
- Consume
self
inPollingForProposal::process_res
by @arminsabouri in #1080 - Reduce OhttpKeys' public API by @nothingmuch in #1069
- trivial: use expect instead of unwrap for const Hrp::parse by @nothingmuch in #1083
- Remove OptionalTransitionOutcome helper methods by @arminsabouri in #1081
- Remove unnecessary URI accessors from public api by @nothingmuch in #1082
- Add dart to flake devshells by @nothingmuch in #1086
- Use "expiration" instead of "expiry" by @arminsabouri in #1087
- Remove mut ohttp keyconfig by @arminsabouri in #1085
- Remove extraneous clones in
create_poll_request
by @arminsabouri in #1089 - Replace SystemTime with bitcoin::absolute::Time by @nothingmuch in #1047
- Reduce visibility of ohttp methods by @arminsabouri in #1088
- Sanitize sensitive data from log messages to prevent privacy leaks by @0xZaddyy in #950
- remove redundant .to_string() to fix lint.sh by @nothingmuch in #1093
- Remove redundant fields from
WantsFeeRange
event by @arminsabouri in #1092 - Replace redis with file based mailbox storage by @nothingmuch in #915
- Run all tests in macOS CI by @spacebear21 in #1094
- Exclude static mutation on default expiration time const by @benalleng in #1090
- Add lockfile backup to update-lock-files script by @benalleng in #1043
- Remove redundant fields from
WantsOutputs
event by @arminsabouri in #1102 - Introduce SessionEvent::Closed by @spacebear21 in #1078
- Process res error handling by @arminsabouri in #1075
- Simply return replay error on expiration by @spacebear21 in #1107
- Reduce visibility of common recv abstractions by @arminsabouri in #1109
- Bump uniffi-dart revision by @spacebear21 in #1110
- Remove mailbox from receiver session context by @arminsabouri in #1112
- Remove redundant fields from
WantsInputs
event by @arminsabouri in #1106 - Remove the url crate dep from payjoin-test-utils by @benalleng in #1111
- FFI: tighten error conversions by @chavic in #1029
- Fix apply_fee_range error handling by @spacebear21 in #1108
- Rename session events by @spacebear21 in #1116
- Use String type instead of Url on Request Struct by @benalleng in #1122
- Replace
pip
withuv
in payjoin-ffi/python by @thebrandonlucas in #1073 - HPKE encrypt error response by @arminsabouri in #1115
- Replace
psbt_with_fee_contributions
with pub fn by @arminsabouri in #1120 - Depend on
url/serde
with no default features by @DanGould in #1126 - Update sender
process_res
to parse and process error response by @arminsabouri in #1114 - Remove
PollingForProposal
from session event by @arminsabouri in #1128 - Handle fatal errors in receiver state machine by @spacebear21 in #1060
- Use
HasReplyableErrorTransition
in reply error typestate by @arminsabouri in #1130 - Fix typo in payjoin/Cargo.toml by @arminsabouri in #1133
- Sender closed variant by @benalleng in #1129
- Receiever Monitor Typestate by @arminsabouri in #1061
- Return closed session state during replays by @arminsabouri in #1136
- Rename sender session events. by @zealsham in #1125
- Remove redundant
try_for_each
in history method by @arminsabouri in #1139 - Remove terminal_error method for sender and receiver by @benalleng in #1123
- Rename ffi exported receiver session history struct by @arminsabouri in #1142
- Expose missing sender session history FFI methods by @arminsabouri in #1140
- Expose receiver status off FFI session history by @spacebear21 in #1145
- Abstract V2 Sender over SenderContext and remove public Url by @benalleng in #1141
- Bump payjoin version to 1.0.0-rc.0 by @arminsabouri in #1148
New Contributors
- @Mshehu5 made their first contribution in #858
- @arturgontijo made their first contribution in #772
- @Johnosezele made their first contribution in #886
- @w3irdrobot made their first contribution in #768
- @bc1cindy made their first contribution in #945
- @Prabhat1308 made their first contribution in #961
- @chavic made their first contribution in #1029
Full Changelog: payjoin-0.24.0...payjoin-1.0.0-rc.0