Skip to content

Conversation

@evanlinjin
Copy link
Member

Description

There is a bug in miniscript where they fail to take into consideration an OP_PUSH.. (4 weight units) when calculating
max_satisfaction_weight for pkh script types.

We add this weight explicitly for pkh script types during coin selection.

Notes to the reviewers

The alternative is to patch miniscript (as @afilini mentioned).

Changelog notice

Implement workaround for miniscript max_satisfaction_weight bug with pkh scripts.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

There is a bug in miniscript where they fail to take into consideration
an `OP_PUSH..` (4 weight units) when calculating
`max_satisfaction_weight` for `pkh` script types.

We add this weight explicitly for `pkh` script types during coin
selection.
@evanlinjin evanlinjin self-assigned this Oct 4, 2022
@evanlinjin evanlinjin added the bug Something isn't working label Oct 4, 2022
@evanlinjin evanlinjin marked this pull request as draft October 4, 2022 14:30
@evanlinjin
Copy link
Member Author

@afilini We call .max_satisfaction_weight in multiple places. We should do a patch like you mentioned. Closing for now.

@evanlinjin evanlinjin closed this Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant