lambdaclass / lambdaclass/ethlambda
Store swallows DB errors with `.expect()`, propagate Result through storage layer
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 82
- Forks
- 28
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 20
Description
crates/storage/src/store.rs calls StorageBackend methods (begin_read, begin_write, put_batch, commit, etc.) but swallows all returned Results via .expect() at 50+ call sites. Any DB error (disk full, corruption, etc.) panics the node instead of being handled gracefully.
The fix is to make Store's public methods return Result<T, Error> and propagate with ?, then update callers in crates/blockchain/src/store.rs accordingly.
Related: #82
Fixing this is also a prerequisite for #266. Without it, the "too many open files" error panics the node rather than being returned as a recoverable error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/storage/src/store.rs by reviewing the Store public methods and the StorageBackend calls that currently use .expect(), then trace their callers in crates/blockchain/src/store.rs. Done means DB errors are returned through the storage and blockchain store layers as Result values rather than causing panics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain, distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100