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

planner: allow prepaid fees to be collected in outputs #4313

Closed
TalDerei opened this issue May 3, 2024 · 1 comment
Closed

planner: allow prepaid fees to be collected in outputs #4313

TalDerei opened this issue May 3, 2024 · 1 comment
Labels
C-design Category: work on the design of Penumbra needs-refinement unclear, incomplete, or stub issue that needs work _P-medium Medium priority
Milestone

Comments

@TalDerei
Copy link
Collaborator

TalDerei commented May 3, 2024

There's parity between the wasm planner and the core planner, but there are some additional design considerations that have been discussed, and will be noted here for future reference.

Currently, we release the surplus prepaid swap-claim fee directly into the transaction fee, making the transaction unnecessarily more expensive than it needs to be. We may consider releasing the excess value as a change output note.

Additionally, there's been discussion of allowing a specific change address to be specified, and change notes to be paid in any asset denomination. This would be a UX boost because the current design is more restrictive since you need UM to do anything on the network.

@github-project-automation github-project-automation bot moved this to Backlog in Penumbra May 3, 2024
@TalDerei TalDerei added C-design Category: work on the design of Penumbra needs-refinement unclear, incomplete, or stub issue that needs work labels May 3, 2024
@erwanor erwanor changed the title planner design considerations planner: allow prepaid fees to be collected in outputs May 3, 2024
@erwanor erwanor added the _P-medium Medium priority label May 3, 2024
TalDerei added a commit that referenced this issue May 3, 2024
## Describe your changes

This PR adds a port of the wasm planner, integrating it within the
`penumbra-view` crate.

**`SwapClaim` handling**
In the process of porting this PR, we found a bug in the handling of
`SwapClaim` actions with the wasm planner.

`SwapClaim` actions produce surplus value from their prepaid fees) that
must be released so that the transaction balance to zero. In principle,
it should be possible to release this value into an output note. This
isn't the approach we took with this PR. Instead, we release it to the
transaction fee, providing a base for us to improve on later. This will
be tracked by #4313.

## Issue ticket number and link
References #4081

## Checklist before requesting a review

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

---------

Co-authored-by: Erwan Or <[email protected]>
@hdevalence
Copy link
Member

These are all done except for #4322

@github-project-automation github-project-automation bot moved this from Backlog to Done in Penumbra May 6, 2024
@TalDerei TalDerei added this to the Sprint 5 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-design Category: work on the design of Penumbra needs-refinement unclear, incomplete, or stub issue that needs work _P-medium Medium priority
Projects
Archived in project
Development

No branches or pull requests

3 participants