Skip to content

Comments

fix(database): return error instead of panic when block not found in AlloyDB#3284

Merged
rakita merged 2 commits intobluealloy:mainfrom
doocho:fix/alloydb-block-hash-panic
Jan 8, 2026
Merged

fix(database): return error instead of panic when block not found in AlloyDB#3284
rakita merged 2 commits intobluealloy:mainfrom
doocho:fix/alloydb-block-hash-panic

Conversation

@doocho
Copy link
Contributor

@doocho doocho commented Jan 7, 2026

  • Change DBTransportError struct to AlloyDBError enum
  • Add BlockNotFound variant for missing block errors
  • Handle None case in block_hash_async_ref gracefully

Closes #3278

…AlloyDB

- Change DBTransportError struct to AlloyDBError enum
- Add BlockNotFound variant for missing block errors
- Handle None case in block_hash_async_ref gracefully

This fixes potential panics when:
- Using pruned nodes with deleted block data
- Using light clients without full block data
- Requesting future or non-existent block numbers

Closes bluealloy#3278
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 7, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing doocho:fix/alloydb-block-hash-panic (3a61f56) with main (e7c9d8b)

Summary

✅ 173 untouched benchmarks

@rakita rakita merged commit 2367e60 into bluealloy:main Jan 8, 2026
29 checks passed
@github-actions github-actions bot mentioned this pull request Jan 8, 2026
@doocho doocho deleted the fix/alloydb-block-hash-panic branch January 8, 2026 12:31
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.

AlloyDB: block_hash_async_ref may panic on pruned nodes or missing blocks

2 participants