docs: clarify block limit overfill behavior#18
Conversation
Deploying megaeth-documentation with
|
| Latest commit: |
b77c408
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4f72bc26.megaeth-documentation.pages.dev |
| Branch Preview URL: | https://william-doc-clarify-block-li.megaeth-documentation.pages.dev |
| The per-block limits for compute gas, data size, KV updates, and state growth | ||
| can only be fully evaluated after a transaction has been executed. When building | ||
| a block, these limits are enforced as follows: |
There was a problem hiding this comment.
Factual error: the table above shows Compute Gas has no per-block limit (N/A). It should not be listed here.
Also, the introductory sentence wraps mid-sentence — per the style guide, each sentence should be on its own line.
| The per-block limits for compute gas, data size, KV updates, and state growth | |
| can only be fully evaluated after a transaction has been executed. When building | |
| a block, these limits are enforced as follows: | |
| The per-block limits for data size, KV updates, and state growth | |
| can only be fully evaluated after a transaction has been executed. | |
| When building a block, these limits are enforced as follows: |
| 1. Before executing a transaction, the block builder checks whether _any previous transaction_ has already caused the block to exceed a per-block limit. If so, the new transaction is rejected _before_ execution and the block is sealed. | ||
| 2. Otherwise, the transaction is executed. If its execution causes the block to exceed a per-block limit, the transaction is still included — it is not reverted or discarded. Per-transaction limits still apply. |
There was a problem hiding this comment.
Multiple sentences per line, violating the "one sentence, one line" convention from CLAUDE.md.
| 1. Before executing a transaction, the block builder checks whether _any previous transaction_ has already caused the block to exceed a per-block limit. If so, the new transaction is rejected _before_ execution and the block is sealed. | |
| 2. Otherwise, the transaction is executed. If its execution causes the block to exceed a per-block limit, the transaction is still included — it is not reverted or discarded. Per-transaction limits still apply. | |
| 1. Before executing a transaction, the block builder checks whether _any previous transaction_ has already caused the block to exceed a per-block limit. | |
| If so, the new transaction is rejected _before_ execution and the block is sealed. | |
| 2. Otherwise, the transaction is executed. | |
| If its execution causes the block to exceed a per-block limit, the transaction is still included — it is not reverted or discarded. | |
| Per-transaction limits still apply. |
| In other words, the last transaction in a block is allowed to push the block's | ||
| resource usage beyond the per-block limit. This maximizes block utilization by | ||
| avoiding the waste of a valid transaction whose resource consumption can only be | ||
| known after execution. |
There was a problem hiding this comment.
Sentences wrap mid-line. Each sentence should be on its own line.
| In other words, the last transaction in a block is allowed to push the block's | |
| resource usage beyond the per-block limit. This maximizes block utilization by | |
| avoiding the waste of a valid transaction whose resource consumption can only be | |
| known after execution. | |
| In other words, the last transaction in a block is allowed to push the block's resource usage beyond the per-block limit. | |
| This maximizes block utilization by avoiding the waste of a valid transaction whose resource consumption can only be known after execution. |
|
Two issues found: Factual error (blocking): The introductory sentence lists "compute gas" as having a per-block limit, but the table above shows its per-block limit is N/A. It should only list data size, KV updates, and state growth. Style (non-blocking): Several places have multiple sentences on a single line, violating the "one sentence, one line" convention from CLAUDE.md. Suggestions attached inline. The content and 3-step enforcement model are clear and accurate (modulo the compute gas mistake) — this is a useful clarification. |
|
The previous inline comments have all been addressed in the latest commit — compute gas removed, one-sentence-per-line fixed throughout. One process note: Content LGTM otherwise. |
Summary
Test plan
limit.rs