Skip to content

Conversation

@Troublor
Copy link
Collaborator

@Troublor Troublor commented Dec 24, 2025

Summary

Improve block limit error messages to accurately reflect the limit checking logic:

  • Post-execution limits (data, KV, compute gas, state growth):

    • Remove tx_used field since it's always 0 when the error is thrown
    • Use "reached" with >= to reflect the actual check condition (block_used >= limit)
    • These errors occur when the block already exceeded limits from a previous transaction
  • Pre-execution limits (encode size, DA size):

    • Keep tx_used field since the current transaction's size is relevant
    • Use "exceeded" with + and > since these check block_used + tx_used > limit

Test plan

  • cargo check passes

@Troublor Troublor requested a review from megakabi December 24, 2025 02:36
- For post-execution limits (data, KV, compute gas, state growth):
  Remove tx_used field since it's always 0 when error is thrown.
  Use 'reached' with '>=' to reflect the actual check condition.

- For pre-execution limits (encode size, DA size):
  Keep tx_used field and use 'exceeded' with '+' and '>' since
  these check block_used + tx_used > limit.
@Troublor Troublor force-pushed the william/refactor/error-message branch from 958bf49 to 8d4f770 Compare December 24, 2025 02:41
@Troublor Troublor merged commit 9306d15 into main Dec 24, 2025
2 checks passed
@Troublor Troublor deleted the william/refactor/error-message branch December 24, 2025 08:38
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.

3 participants