Skip to content

storage: check alt blocks when handling missing tx request in DB#599

Open
redsh4de wants to merge 1 commit intoCuprate:mainfrom
redsh4de:feat/txs_in_block-alt-blocks
Open

storage: check alt blocks when handling missing tx request in DB#599
redsh4de wants to merge 1 commit intoCuprate:mainfrom
redsh4de:feat/txs_in_block-alt-blocks

Conversation

@redsh4de
Copy link
Copy Markdown
Contributor

What

Support alt blocks in TxsInBlock

Closes #580

Why

txs_in_block only searches the main chain at the moment. A peer can request missing transactions for a block that is on an alt chain - either from a reorg or because Cuprate broadcasts alt blocks as of #577

Where

storage/blockchain

How

  • Add a get_alt_block_blob_with_tx_hashes helper that retrieves an alt block's blob and tx hashes
  • Extend txs_in_block to try the main chain first, then fall back to alt-chain tables on KeyNotFound
  • For alt-chain tx blobs, check alt_transaction_blobs first, then fall back to checking main-chain blobs.

@github-actions github-actions bot added the A-storage Area: Related to storage. label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-storage Area: Related to storage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check alt blocks when handling missing tx request in DB

1 participant