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

Transaction builder should handle invalid tip height #1706

Open
notmandatory opened this issue Nov 14, 2024 · 0 comments
Open

Transaction builder should handle invalid tip height #1706

notmandatory opened this issue Nov 14, 2024 · 0 comments
Labels
audit Suggested as result of external code audit module-wallet

Comments

@notmandatory
Copy link
Member

notmandatory commented Nov 14, 2024

"In the transaction builder, current_height will crash on an invalid absolute locktime height. If None was provided by the caller, this would let a remote chain source crash us by providing at invalid tip height. But that's considered out of scope. Although it seems unlikely that this parameter would be exposed to a third party, it's safer to only panic on inconsistent internal state and not on externally provided inputs."

"Out of scope since we trust our chain source but the transaction creation code will crash if the tip's height is not less than 500'000'000 (LockTime::from_height L1305), which could allow a remote Electrum or Esplora server to crash us."

@notmandatory notmandatory added audit Suggested as result of external code audit module-wallet labels Nov 14, 2024
@notmandatory notmandatory added this to BDK Nov 14, 2024
@notmandatory notmandatory changed the title Transaction builder should handle invalid absolute locktime height Transaction builder should handle invalid tip height Nov 14, 2024
@notmandatory notmandatory moved this to Discussion in BDK Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Suggested as result of external code audit module-wallet
Projects
Status: Discussion
Development

No branches or pull requests

1 participant