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

Tx combinator refactor #249

Merged
merged 3 commits into from
Nov 1, 2019

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Oct 31, 2019

Resolves #248
Related mimblewimble/grin#3057 (must be merged before this PR)

We no longer use tx building combinators for fee and lock_height.
We now pass an existing tx into build::partial_transaction.
We are also responsible for updating the tx kernel to reflect the features based on the current slate (fee changes based on the tx being built).

The motivation for these changes is to increase the flexibility to support future kernel feature variants, specifically "relative height locked" kernels.
The tx building combinators with_fee and with_lock_height did not fit cleanly with adding new feature variants as the different combinations of optional fields (fee, lock_height etc.) produce different kernel features.

@antiochp antiochp requested a review from yeastplume October 31, 2019 11:24
@yeastplume
Copy link
Member

Thanks for doing the wallet-side changes as well.. will just wait for the node-side merge and retrigger.

@antiochp
Copy link
Member Author

antiochp commented Nov 1, 2019

Just merged the related grin PR and kicked off a build here.

@antiochp
Copy link
Member Author

antiochp commented Nov 1, 2019

Bumped grin dependency in Cargo.lock to reflect the changes on master.

@yeastplume yeastplume merged commit ba6c5ed into mimblewimble:master Nov 1, 2019
@antiochp antiochp deleted the tx_combinator_refactor branch November 4, 2019 14:44
@antiochp
Copy link
Member Author

antiochp commented Nov 4, 2019

We should keep an eye on tx building using master for a bit - should be pretty obvious if this broke something unexpected.

yyangli pushed a commit to mwcproject/mwc-wallet that referenced this pull request May 13, 2020
* update tx building to use simpler kernel feature handling

* pass in tx to build::partial_transaction
and update the kernel on the tx based on features from the slate

* bump SHA for grin dependencies
antiochp added a commit to antiochp/grin-wallet that referenced this pull request Aug 7, 2020
* update tx building to use simpler kernel feature handling

* pass in tx to build::partial_transaction
and update the kernel on the tx based on features from the slate

* bump SHA for grin dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor tx building combinators
2 participants