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

Fix output indexes to be represented as a u32 (*requires reindex*) #69

Open
wants to merge 2 commits into
base: new-index
Choose a base branch
from

Conversation

shesek
Copy link
Collaborator

@shesek shesek commented Feb 15, 2024

Bitcoin's consensus rules allows for output indexes larger than u16, which would result in an overflow prior to this fix.

This recently happened with a transaction on testnet:
https://blockstream.info/testnet/tx/ca3b75556430e1adf9e9790bce9c73a3d9afdb42305588e64c65b258c06c05c9

Based on @junderw's mempool/electrs#75. Thanks!

This PR branch is based on top of #67, which should get merged first.

Note that this change requires a full database reindex.

@LeoComandini
Copy link
Collaborator

utACK 8a69538, code review

Bitcoin's consensus rules allows for output indexes larger than u16,
which would result in an overflow prior to this fix.

This recently happened with a transaction on testnet:
https://blockstream.info/testnet/tx/ca3b75556430e1adf9e9790bce9c73a3d9afdb42305588e64c65b258c06c05c9

Based on @junderw's mempool/electrs#75. Thanks!

This change requires a full database reindex.
@shesek
Copy link
Collaborator Author

shesek commented Feb 20, 2024

Rebased.

@shesek shesek changed the title Fix output indexes to be represented as a u32 Fix output indexes to be represented as a u32 (*requires reindex*) Feb 20, 2024
@sammy007
Copy link

sammy007 commented Jun 8, 2024

Any ETA on merging this obviously necessary fix?

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.

3 participants