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

feat: bitcoinjs-lib remove MAX_SAFE_INTEGER limitations #8130

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Nov 15, 2024

Description

i.e those limitations are perfectly fine for Bitcoin as we will never overflow them, but for e.g DOGE, it's pretty easy to end up in situation with outputs for which the value
is greater than MAX_SAFE_INTEGER (but lower than MAX_VALUE).

This removes the check to unbork things for that user.

Issue (if applicable)

closes #8128

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Very high - for those high-value Txs, things could overflow. If any output Tx is malformed, this could end up in either receiving less than attempted, getting less change than expected, or a mix of both, with the network being gifted the overflown mistake.

Testing

  • @kaladinlight to confirm removal is sane
  • regular UTXO sends with smol amounts are still happy

Engineering

  • ^

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)
  • ^

Screenshots (if applicable)

image image

@gomesalexandre gomesalexandre marked this pull request as ready for review November 15, 2024 04:33
@gomesalexandre gomesalexandre requested a review from a team as a code owner November 15, 2024 04:33
@NeOMakinG NeOMakinG self-requested a review November 15, 2024 08:21
Copy link
Collaborator

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

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

@kaladinlight
Copy link
Contributor

This is the wrong bitcoinjs-lib. We need to patch the shapeshift fork currently being used in hdwallet

@kaladinlight kaladinlight merged commit aaf6695 into develop Nov 15, 2024
3 checks passed
@kaladinlight kaladinlight deleted the feat_bitcoinjs_patch_max_value branch November 15, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User rejected the transaction firing incorrectly
3 participants