Skip to content

fix(contracts)!: require consensus acceptance for success, not just the leader's execution result#346

Merged
MuncleUscles merged 5 commits into
v0.40-devfrom
feat/execution-status-guard
Jun 10, 2026
Merged

fix(contracts)!: require consensus acceptance for success, not just the leader's execution result#346
MuncleUscles merged 5 commits into
v0.40-devfrom
feat/execution-status-guard

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Follow-up to #345 closing the remaining 'accepted ≠ executed' gap one level up (designer walkthrough, 2026-06-09).

  • txExecutionResult is the leader's result, written at reveal even when the round ends UNDETERMINED — so the existing check could print 'deployed successfully' with an address that never materializes. Success now also requires status ∈ {ACCEPTED, FINALIZED} (via genlayer-js isSuccessful); failures name both the consensus outcome and the leader result.
  • VoteType 3/4 mapped with real diagnoses (TIMEOUT / NONDET_DISAGREE) instead of 'did not expose an execution result'.
  • deploy/write use the new waitUntil: 'decided' API; explicit fee deposits echoed before sending; reached status reported after success.
  • callKey derivation deduplicated — imported from genlayer-js (incl. DEPLOY_CALL_KEY), removing a byte-for-byte copy that would silently drift.

Depends on genlayerlabs/genlayer-js#187 (waitUntil/isSuccessful APIs). 530 tests green incl. new negative coverage (UNDETERMINED, CANCELED, VoteType 3/4, Studio-shape).

…eader execution result

- assertSuccessfulExecution now requires status ∈ {ACCEPTED, FINALIZED} via the
  SDK's isSuccessful in addition to FINISHED_WITH_RETURN: txExecutionResult is
  the LEADER's result and exists even on UNDETERMINED — previously an
  undetermined deploy printed 'deployed successfully' with an address that
  would never materialize
- failure messages now name both the consensus outcome and the leader result
  ('decided as UNDETERMINED (no validator majority); leader execution result:
  FINISHED_WITH_RETURN')
- map VoteType 3 (TIMEOUT) / 4 (NONDET_DISAGREE) with real diagnoses instead of
  'did not expose an execution result'
- deploy/write use waitUntil: 'decided' (new SDK API) and report the reached
  consensus status; explicit fee deposits are echoed before sending
- callKey derivation deduplicated: import from genlayer-js (incl. new
  DEPLOY_CALL_KEY for deploy-targeted Mode-2 allocations)
@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: dd5fafd3-36c8-499d-a63d-86b4e5c4fec6

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/execution-status-guard

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.

npm 1.1.8 lacks the new fee APIs (isSuccessful, DEPLOY_CALL_KEY, waitUntil),
so CI cannot build against it. github:genlayerlabs/genlayer-js#feat/
v06-fee-estimation-rework builds via the SDK's new prepare script (verified:
fresh install produces dist + exports). Re-pin to the npm semver once
genlayer-js v2 ships (release-sequencing item).
Push trigger was pinned to v0.39 — merges to v0.40-dev/v0.40 got no
post-merge CI.
The OIDC upload fails on ubuntu/windows independent of this PR (#345 merged
with identical failures); tests/build stay blocking.
@MuncleUscles MuncleUscles merged commit 6fadcd7 into v0.40-dev Jun 10, 2026
5 checks passed
@MuncleUscles MuncleUscles deleted the feat/execution-status-guard branch June 10, 2026 12:14
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