Skip to content

fix: handle empty or malformed logs during message processing (#21192)#21598

Merged
nchamo merged 3 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21192-empty-logs-v4-next
Mar 16, 2026
Merged

fix: handle empty or malformed logs during message processing (#21192)#21598
nchamo merged 3 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21192-empty-logs-v4-next

Conversation

@AztecBot

@AztecBot AztecBot commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backport of #21192 to v4-next.

Cherry-pick of 9cc2833 with conflict resolution to adapt to staging branch API differences:

  • Uses macro-based aztecnr_debug_log_format!/aztecnr_warn_log_format! (staging style)
  • Keeps staging's do_sync_state signature (3 params with offchain_inbox_sync)
  • Keeps staging's process_message_ciphertext signature (4 args, no process_custom_message)
  • Keeps staging's aztec_utl_aes128Decrypt method name
  • Adapted test (removed CustomMessageHandler references not present on staging)

Changes backported

  • AES128::decrypt returns Option::none() instead of panicking on malformed ciphertext
  • do_sync_state skips empty logs instead of panicking
  • New try_fields_from_bytes non-panicking conversion function
  • TODO comments for future F-452 work on oracle error handling
  • Tests for all new error paths

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 16, 2026
nchamo and others added 2 commits March 16, 2026 13:41
Adapted to staging branch API:
- Keep staging's process_message_ciphertext signature (4 args, no process_custom_message)
- Keep staging's do_sync_state signature (3 params with offchain_inbox_sync)
- Remove CustomMessageHandler references from test (not present on staging)
- Add empty log guard with warn_log_format using macro-based logging
@AztecBot AztecBot force-pushed the claudebox/backport-21192-empty-logs-v4-next branch from ca67c35 to 3092f0c Compare March 16, 2026 13:42
@nchamo nchamo marked this pull request as ready for review March 16, 2026 13:44
@nchamo nchamo requested a review from nventuro as a code owner March 16, 2026 13:44
@nchamo nchamo self-assigned this Mar 16, 2026
@nchamo nchamo merged commit 32eda99 into backport-to-v4-next-staging Mar 16, 2026
9 checks passed
@nchamo nchamo deleted the claudebox/backport-21192-empty-logs-v4-next branch March 16, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants