doc: add payment lane bep - #703
Conversation
Pull Request ReviewThis PR adds a new proposal document, Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
| - `signal < SHRINK_TRIGGER_RATIO` — the chain has slack: the quota ratio decreases by `SHRINK_STEP`, down to the effective minimum. | ||
| - Otherwise — the hysteresis band: the quota is unchanged, absorbing fluctuation and preventing oscillation. | ||
|
|
||
| Note that `generalGasUsed` includes payment gas consumed beyond the quota (that gas competed as general traffic), so the signal responds to both pressure sources: general demand squeezing available space, and payment demand overflowing its own floor. |
There was a problem hiding this comment.
A bit different from the above: generalGasUsed = total gas consumed by general transactions in the block.
|
|
||
| ### 3.3 Dynamic Quota Adjustment | ||
|
|
||
| `paymentLaneSize` for block `n` is a deterministic function of chain history, computed by every node from block `n−1`; no new header field is required. The adjustment reads a single signal: |
There was a problem hiding this comment.
Todo: think more. Restart / snap-sync maybe need to walk all the history to rebuild?
There was a problem hiding this comment.
reuse header field?? header extra??
| signal(n−1) = generalGasUsed(n−1) / GasLimit(n−1) | ||
| ``` | ||
|
|
||
| - `signal >= EXPAND_TRIGGER_RATIO` — the chain is congested: the quota ratio increases by `EXPAND_STEP`, up to the effective maximum. |
There was a problem hiding this comment.
mark: quota ratio -> quota size, because the gas limit may be different, it is better to use the absolute value here.
No description provided.