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

discount: fix weight calculation #218

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

delta1
Copy link
Member

@delta1 delta1 commented Sep 25, 2024

output amount and nonce discount must be weighted by the witness scaling factor as they form part of the base transaction, not the witness data

see ElementsProject/elements#1366

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 6909e1c successfully ran local tests; though I note that if we had a Weight type here like in rust-bitcoin we likely would have caught this :/

@apoelstra apoelstra merged commit 2a8761f into ElementsProject:master Sep 25, 2024
5 checks passed
apoelstra added a commit to ElementsProject/ELIPs that referenced this pull request Sep 27, 2024
9f08b81 elip200: fix discount weight calculation for asset and nonce (Byron Hambly)

Pull request description:

  output amount and nonce discount must be weighted by the witness scaling factor as they form part of the base transaction, not the witness data

  see ElementsProject/elements#1366 and ElementsProject/rust-elements#218

ACKs for top commit:
  apoelstra:
    ACK 9f08b81

Tree-SHA512: c719cd0343887d11b28037cb1b15da73b9d139f95a8c75bb91dd8ea126ed8cf8781485dd6ef26304adb8cd1a08b60c4ee0a14480f25619950f67a1d394d64e3e
@delta1
Copy link
Member Author

delta1 commented Oct 15, 2024

link to #204 too

@delta1 delta1 deleted the discountweight branch October 15, 2024 14:46
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.

2 participants