Skip to content

fix(consensus): improve error handling and remove unreachable panics#645

Merged
Lchangliang merged 2 commits intomainfrom
dev-0408-audit
Apr 10, 2026
Merged

fix(consensus): improve error handling and remove unreachable panics#645
Lchangliang merged 2 commits intomainfrom
dev-0408-audit

Conversation

@Lchangliang
Copy link
Copy Markdown
Contributor

Replace unwrap/unreachable panics with proper error handling across consensus modules to improve node resilience. Key changes:

  • epoch_manager: guard round_manager_tx access during epoch transitions
  • payload_manager: replace unreachable!() with error logging and graceful return
  • buffer_manager: add commit vote cache size limit (1000) to prevent OOM
  • ledger_metadata_db: propagate Result instead of expect/unwrap on DB reads
  • block_buffer_manager: handle missing block_number gracefully in init
  • bootstrap: simplify block_number_to_block_id population with entry API
  • sync_manager: handle ledger info range query errors gracefully

Lchangliang and others added 2 commits April 9, 2026 23:34
Replace unwrap/unreachable panics with proper error handling across
consensus modules to improve node resilience. Key changes:
- epoch_manager: guard round_manager_tx access during epoch transitions
- payload_manager: replace unreachable!() with error logging and graceful return
- buffer_manager: add commit vote cache size limit (1000) to prevent OOM
- ledger_metadata_db: propagate Result instead of expect/unwrap on DB reads
- block_buffer_manager: handle missing block_number gracefully in init
- bootstrap: simplify block_number_to_block_id population with entry API
- sync_manager: handle ledger info range query errors gracefully

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Lchangliang Lchangliang merged commit 1a2cbc5 into main Apr 10, 2026
8 checks passed
@Lchangliang Lchangliang deleted the dev-0408-audit branch April 10, 2026 01:49
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.

2 participants