Repository navigation
fix(fees): reserve parent appeal capacity in Studio message allocations - #1784
Open
MuncleUscles wants to merge 1 commit into
Open
MuncleUscles wants to merge 1 commit into
MuncleUscles wants to merge 1 commit into
Conversation
Price each on-acceptance internal allocation using its emitting parent’s prepaid appeal horizon and multiply the complete child requirement, including direct child budgets. Carry the root appeal count from the transaction or child fee distribution. Fund every discovered acceptance emission opportunity while keeping an inferred per-message declared budget to one child primary plus its direct subtree. Cover the 360/1440 boundary, nested parents, finalization, discovery, and child accounting.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and outcome
Studio validated on-acceptance internal message allocations using the child's appeal count and multiplied only its primary fee. Consensus requires
(child primary fee + direct child allocation budgets) × (emitting parent's prepaid appeals + 1). Root allocations use the transaction's appeal schedule; nested allocations use their immediate parent's fee params. On-finalization uses one copy.For a parent with three prepaid appeals, a child primary of 180 and direct child budget of 180, Studio previously accepted 360; consensus requires 1,440. The same mistake could also reject a valid allocation when only the child had appeals.
This PR aligns admission with the parent-based rule. Simulation discovery reserves each observed on-acceptance occurrence across the parent's prepaid appeal opportunities. An automatically inferred
declaredBudgetremains the cost of one child emission (primary plus direct children), so a single occurrence does not consume the whole lifecycle allocation.Delivery context
Stacked on Studio #1774, the flat GenVM allocation-input change.
Depends-On: genlayerlabs/genlayer-consensus#1749
Consensus #1744 introduced the contract rule; consensus #1777 corrects its separate off-chain helper. Related Node #2019 carries the flat GenVM input adapter and already depends on Studio #1774. Node #2148 carries the newer remaining-allowance and fee-preparation work. Compose the exact Node and consensus candidate heads for release qualification; the flat-input Node PR's current targeted E2E still used an older consensus pin.
Implementation and validation
git diff --checkpass. Full cross-repository E2E has not run on this commit.The separate allocation envelope/EQ-cap parity gaps and the beyond-prepaid bond-funded appeal policy in consensus #1717 are outside this gas change.