-
Notifications
You must be signed in to change notification settings - Fork 37
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
Tx cut-through #332
Tx cut-through #332
Commits on Sep 6, 2024
-
Add new typestates for output and input contributions
This effectively splits the `ProvisionalProposal` state into three states that must be completed in order: - `WantsOutputs` allows the receiver to substitute or add output(s) and produces a WantsInputs - `WantsInputs` allows the receiver to contribute input(s) as needed to fund their outputs and produces a ProvisionalProposal - `ProvisionalProposal` is only responsible for finalizing the payjoin proposal and producing a PSBT that will be acceptable to the sender
Configuration menu - View commit details
-
Copy full SHA for b5dae4e - Browse repository at this point
Copy the full SHA b5dae4eView commit details -
Allow contributing multiple inputs
`contribute_witness_input` is now `contribute_witness_inputs`. It takes an arbitrary number of inputs as a HashMap and returns a `ProvisionalProposal`.
Configuration menu - View commit details
-
Copy full SHA for 4325e93 - Browse repository at this point
Copy the full SHA 4325e93View commit details -
Implement disable_output_substitution check correctly
When disable_output_substitition is true, the receiver may not change the script pubkey or decrease the value of their original output, but is allowed to increase the amount or add new outputs.
Configuration menu - View commit details
-
Copy full SHA for 4062b56 - Browse repository at this point
Copy the full SHA 4062b56View commit details -
Use a builder pattern in WantsOutputs and WantsInputs
- Output substitution functions return a modified WantsOutputs instead of a WantsInputs. `freeze_outputs` is used to proceed to the WantsInputs step. - Similarly, contribute_witness_inputs returns a modified WantsInputs and `freeze_inputs` returns the ProvisionalProposal - One change output (aka drain script) must be identified if outputs are replaced. The change output receives all excess input amount from the receiver, and will be responsible for paying receiver fees if applicable.
Configuration menu - View commit details
-
Copy full SHA for 5f9ca53 - Browse repository at this point
Copy the full SHA 5f9ca53View commit details -
Implement receiver fee contributions
Modify `apply_fee` to enable fee contributions from the receiver for fees not covered by the sender. This includes - any fees that pay for additional inputs, in excess of the sender's max_additional_fee_contribution. - all fees that pay for additional *outputs*. - in the case where the sender doesn't have a fee output (e.g. a sweep transaction), all tx fees are deducted from the receiver output.
Configuration menu - View commit details
-
Copy full SHA for d629598 - Browse repository at this point
Copy the full SHA d629598View commit details -
Adds two integration tests for transaction cut-through: - Receiver UTXO consolidation - Receiver forwarding payment to a third-party Also fixes some issues in outputs and inputs contribution logic that became apparent while testing.
Configuration menu - View commit details
-
Copy full SHA for b737500 - Browse repository at this point
Copy the full SHA b737500View commit details -
Add custom error types for output and input contributions
Partially addresses payjoin#312
Configuration menu - View commit details
-
Copy full SHA for f4f2f37 - Browse repository at this point
Copy the full SHA f4f2f37View commit details -
Insert additional outputs in random indices
Additional outputs should be inserted at random indices for privacy, while preserving the relative ordering of receiver/sender outputs from the original PSBT. This commit also ensures that `disable_output_substitution` checks are made for every receiver output, in the unlikely case that there are multiple receiver outputs in the original PSBT.
Configuration menu - View commit details
-
Copy full SHA for ab9b8b8 - Browse repository at this point
Copy the full SHA ab9b8b8View commit details
Commits on Sep 11, 2024
-
Allow receiver to specify a max feerate
This ensures that the receiver does not pay more in fees than they would by building a separate transaction at max_feerate instead. That prevents a scenario where the sender specifies a `minfeerate` param that would require the receiver to pay more than they are willing to spend in fees. Privacy-conscious receivers should err on the side of indulgence with their preferred max feerate in order to satisfy their preference for privacy. This commit also adds a `max-feerate` receive option to payjoin-cli.
Configuration menu - View commit details
-
Copy full SHA for 59c3d27 - Browse repository at this point
Copy the full SHA 59c3d27View commit details