Skip to content

feat(gltest): fee-aware transactions and backend-agnostic success assertions - #91

Merged
MuncleUscles merged 3 commits into
v0.30-devfrom
feat/fee-params-support
Jun 10, 2026
Merged

MuncleUscles merged 3 commits into
v0.30-devfrom
feat/fee-params-support

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Closes the 'gltest cannot test fee-enabled backends at all' gap from the fee audit.

  • transact_method/deploy accept fees / fee_value / wait_until and thread them verbatim to genlayer-py (SDK resolves defaults — gltest does not re-implement estimation). Deprecated status= kwarg replaced by wait_until 'decided'/'finalized'.
  • Direct/sim mode ignores fee kwargs gracefully (gasless by design) — dev-env-targeted tests run unchanged in direct mode.
  • tx_execution_succeeded now requires consensus acceptance and recognizes both receipt shapes (Studio leader_receipt.execution_result == SUCCESS; testnet tx_execution_result_name == FINISHED_WITH_RETURN), preferring genlayer_py.transactions.is_successful. An UNDETERMINED tx with a leader FINISHED_WITH_RETURN result is now correctly False — the leader's result exists even without a validator majority.
  • genlayer-py dependency relaxed to <0.20.0 (fee-aware 0.19 line).

209 tests green (the 22 example-suite failures pre-exist on base — missing contracts/ scaffold, environmental). Depends on genlayerlabs/genlayer-py#90 for wait_until/is_successful.

…ertions

- contract.transact_method / factory.deploy accept fees / fee_value /
  wait_until and thread them verbatim to genlayer-py (SDK resolves defaults;
  gltest does not re-implement estimation); deprecated status= kwarg dropped
  in favor of wait_until 'decided'/'finalized'
- direct/sim mode ignores fee kwargs gracefully (gasless by design)
- tx_execution_succeeded now requires consensus acceptance and recognizes both
  receipt shapes: Studio (leader_receipt.execution_result == SUCCESS) and
  testnet (tx_execution_result_name == FINISHED_WITH_RETURN), preferring
  genlayer_py.transactions.is_successful — an UNDETERMINED tx with a leader
  FINISHED_WITH_RETURN result is now correctly False
- genlayer-py dependency relaxed to <0.20.0 (fee-aware 0.19 line)
@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: f2eb1221-67e3-4451-92b9-e173f2dfad18

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/fee-params-support

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.

The glsim suite (71 tests incl. the fee-RPC compatibility layer) was not in
CI at all, and tests.yml had no push trigger — merges to v0.30-dev got no
post-merge runs.
@MuncleUscles
MuncleUscles merged commit 60f850f into v0.30-dev Jun 10, 2026
3 checks passed
@MuncleUscles
MuncleUscles deleted the feat/fee-params-support branch June 10, 2026 12:07
MuncleUscles added a commit that referenced this pull request Jun 11, 2026
…suggestions (#94)

Opt-in pytest options --fee-profile=PATH and --fee-profile-headroom (default
1.25). Every deploy/write executed through gltest records the consumed fee
data from Studio receipts (fees.consumed.executionConsumed /
messageFeesConsumed); at session end PATH is written as a JSON fee profile
(max observed x headroom, decimal strings) that frontends pass verbatim as
'suggestions' to createTransactionKit from @genlayer/transaction-kit.

Time-unit allocations are omitted: the backend reports consumed fee amounts
only, not time-unit usage. Testnet receipts expose no consumed-fee data yet,
so profiles measured there come out empty (warned at session end).

Also catches uv.lock up with the genlayer-py<0.20.0 pin relax from #91.
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