Skip to content

docs(oracle): document auth-after-effect ordering#288

Merged
RealiCZ merged 2 commits into
mainfrom
agent/issue-287
May 7, 2026
Merged

docs(oracle): document auth-after-effect ordering#288
RealiCZ merged 2 commits into
mainfrom
agent/issue-287

Conversation

@TroublorBot
Copy link
Copy Markdown
Collaborator

Generated by engineer-agent — review carefully before merging.

Summary

Documents Oracle auth-after-effect ordering, including block gas consumption and trace-consumer implications.

Fixes #287

Adds an Authorization Check Ordering subsection under Restricted Write
Interface, a Rationale entry explaining the design intent, and a
Security Considerations section covering the block-gas-budget and
trace-interpretation implications for integrators.

Refs #287

Generated-by: engineer-agent
@TroublorBot TroublorBot added the agent Generated by AI agents label May 6, 2026
@TroublorBot TroublorBot self-assigned this May 6, 2026
@Troublor Troublor added api:unchanged No change to the public interface or API comp:doc Changes in the documentation spec:stable Touches stable spec code — must not change behavior spec:unchanged No change to any `mega-evm`'s behavior and removed spec:stable Touches stable spec code — must not change behavior labels May 6, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 6, 2026

Documentation is accurate, well-structured, and follows spec conventions. The Security Considerations section covers both the gas-budget attack surface and the trace-consumer pitfall clearly. The design-intent hint block and rationale entry complement each other without being redundant.

One minor phrasing issue flagged inline; otherwise LGTM.

Comment thread docs/spec/system-contracts/oracle.md Outdated
#### Authorization Check Ordering

For `setSlot`, `setSlots`, `emitLog`, and `emitLogs`, the function body — including all `SSTORE` operations and `LOG` emissions — MUST execute before the caller authorization check.
On an unauthorized call, the body MUST run to completion (consuming gas for the iteration and any storage writes), and the call MUST then revert with `NotSystemAddress()`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "the iteration and any storage writes" doesn't fit setSlot (single SSTORE, no loop) or emitLog/emitLogs (LOG emissions, no SSTORE). Suggest something like:

Suggested change
On an unauthorized call, the body MUST run to completion (consuming gas for the iteration and any storage writes), and the call MUST then revert with `NotSystemAddress()`.
On an unauthorized call, the body MUST run to completion (consuming gas for all operations it performs — `SSTORE` writes, `LOG` emissions, and any loop iterations), and the call MUST then revert with `NotSystemAddress()`.

@TroublorBot
Copy link
Copy Markdown
Collaborator Author

TroublorBot commented May 6, 2026

Applied the reviewer's suggestion verbatim — replaced "consuming gas for the iteration and any storage writes" with "consuming gas for all operations it performs — SSTORE writes, LOG emissions, and any loop iterations" so the phrasing accurately covers all four methods including the single-operation setSlot and emitLog.

…ring

Replaces "the iteration and any storage writes" with a more precise
enumeration covering SSTORE writes, LOG emissions, and loop iterations,
so the phrasing correctly describes setSlot and emitLog/emitLogs in
addition to the batched variants.

Generated-by: engineer-agent
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 6, 2026

Previous phrasing fix was applied correctly. Documentation is accurate, well-structured, and covers all the necessary behavioral, rationale, and security angles. LGTM.

@TroublorBot
Copy link
Copy Markdown
Collaborator Author

TroublorBot commented May 6, 2026

Acknowledged — no further changes needed.

@RealiCZ RealiCZ merged commit 7e57209 into main May 7, 2026
30 checks passed
@RealiCZ RealiCZ deleted the agent/issue-287 branch May 7, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Generated by AI agents api:unchanged No change to the public interface or API comp:doc Changes in the documentation spec:unchanged No change to any `mega-evm`'s behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(oracle): document auth-after-effect ordering for integrators

3 participants