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

Run coin selection properties with non-zero withdrawal #2014

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented Aug 10, 2020

Issue Number

From looking at #2006, but surely not related.

Overview

  • I added a withdrawal field to CoinSelProp and used it in coin selection properties

Comments

  • I'm not that familiar with the coin selection, but this seems like a good idea, right?

@Anviking Anviking self-assigned this Aug 10, 2020
@Anviking Anviking force-pushed the anviking/2006/wdrl-in-props branch from 01771b1 to da30d07 Compare August 10, 2020 12:43
@Anviking Anviking marked this pull request as ready for review August 10, 2020 12:47
@Anviking Anviking force-pushed the anviking/2006/wdrl-in-props branch from da30d07 to 65c48bc Compare August 10, 2020 13:22
shrinkWdrl = map Quantity . shrink . getQuantity
arbitrary = do
utxo <- arbitrary
wdrl <- Quantity <$> frequency [(65, return 0), (35, arbitrary)]
Copy link
Member Author

@Anviking Anviking Aug 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

65% no withdrawal like previously

@Anviking Anviking requested a review from KtorZ August 10, 2020 13:43
@Anviking Anviking force-pushed the anviking/2006/wdrl-in-props branch from e03d29f to abe7916 Compare August 10, 2020 14:07
Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I wonder if we can add some properties, especially when withdrawal is edge case in comparison with inputs 🤔

When looking at the testing for coin selection I noticed these
properties assumed withdrawal=0.

By extending CoinSelProp we can also test what happens when withdrawal /= 0.

They pass. I don't think there's a problem here.
@Anviking Anviking force-pushed the anviking/2006/wdrl-in-props branch from abe7916 to 7d2d929 Compare August 11, 2020 07:36
@Anviking
Copy link
Member Author

bors r+

iohk-bors bot added a commit that referenced this pull request Aug 11, 2020
2014: Run coin selection properties with non-zero withdrawal r=Anviking a=Anviking

# Issue Number

From looking at  #2006, but surely not related.


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I added a withdrawal field to `CoinSelProp` and used it in coin selection properties

# Comments

- I'm not that familiar with the coin selection, but this seems like a good idea, right?

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <[email protected]>
@Anviking Anviking added the IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG label Aug 11, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 11, 2020

Timed out

@Anviking
Copy link
Member Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 11, 2020

Build succeeded

@iohk-bors iohk-bors bot merged commit e096e34 into master Aug 11, 2020
@iohk-bors iohk-bors bot deleted the anviking/2006/wdrl-in-props branch August 11, 2020 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants