Skip to content

feat(fees)!: estimation correctness, wait-for-decided semantics, v0.6 parity with genlayer-js#90

Open
MuncleUscles wants to merge 1 commit into
v0.19-devfrom
feat/v06-fee-estimation-rework
Open

feat(fees)!: estimation correctness, wait-for-decided semantics, v0.6 parity with genlayer-js#90
MuncleUscles wants to merge 1 commit into
v0.19-devfrom
feat/v06-fee-estimation-rework

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Mirror of genlayerlabs/genlayer-js#187 (same designer rulings, 2026-06-09 fee walkthrough), plus py-specific parity fixes.

Mirrored

  • Effective receipt gas price max(quoteGasPrice(), eth_gasPrice); zero price on an enabled policy raises (consensus rejects zero caps with FeeValueMustBeNonZero since CON-547); effective budget floor max(on-chain view, price × 306,192 gas).
  • Simulation-derived budgets no longer clobbered by the provisional 100M default.
  • wait_until='decided'|'finalized' (legacy status maps with one-time DeprecationWarning); new is_successful(tx).
  • Enum completeness: status 14 LEADER_REVEALING — fixes a KeyError crash mid-poll (the map lookup was unguarded), VoteType 3/4, v0.6 ResultType remap; DEPLOY_CALL_KEY = bytes32(1); fee revert selector naming in send errors.

py-specific

  • asimov chain config gains the fee contracts (FeeManager/RoundsStorage/Appeals — addresses verified against the js chain config); fee APIs were unusable on asimov from py.
  • Studio floor-fallback formula unified with js (message-reveal leg was missing → divergent quotes).
  • appeal_transaction/top_up_and_submit_appeal auto-resolve the minimum bond when value is omitted — previously defaulted to 0, a guaranteed on-chain revert; top_up_fees now requires value.

Verified: 90/90 non-network unit tests (17 testnet-marked tests require live RPC DNS, deselected as usual).

… parity with genlayer-js

Mirrors genlayer-js feat/v06-fee-estimation-rework (same designer rulings):
- effective receipt gas price = max(quoteGasPrice(), eth_gasPrice); zero price on
  an enabled policy raises instead of producing a zero cap; effective execution
  budget floor = max(on-chain view, price x 306,192 gas local recompute)
- simulation-derived budgets no longer clobbered by the 100M default (floor vs
  observed x headroom); default constant documented as provisional w/ TODO(data)
- wait_until='decided'|'finalized' replaces status (legacy param mapped with
  one-time DeprecationWarning); new is_successful(tx) helper
- enum completeness: status 14 LEADER_REVEALING (fixes a KeyError crash mid-poll),
  VoteType 3 TIMEOUT / 4 NONDET_DISAGREE, v0.6 ResultType remap
- DEPLOY_CALL_KEY = bytes32(1) deploy sentinel; fee revert selector naming in
  send errors (InsufficientFees/MaxPriceExceeded/ExecutionBudgetExceeded/
  BudgetTooLow/RollupBudgetBelowFloor/FeeValueMustBeNonZero)

py-specific parity fixes:
- asimov chain config gains FeeManager/RoundsStorage/Appeals addresses (parity
  with js testnetAsimov)
- Studio floor-fallback formula unified with js (message-reveal leg included)
- appeal_transaction/top_up_and_submit_appeal auto-resolve the minimum bond when
  value is omitted (previously defaulted to 0 = guaranteed on-chain revert);
  top_up_fees now requires value
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e9467be-26d5-431e-9c96-f4638b4ce311

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/v06-fee-estimation-rework

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant