make it more extremely hard Gasworks asks the age...

Creato il: 6 dicembre 2026

Risposto usando GPT-6.2 Thinking da Chat01

Domanda

make it more extremely hard

Gasworks asks the agent to write an optimizer for smart-contract bytecode: a program that takes a system of EVM-style contracts and returns bytecode that behaves identically but uses less gas.

What the agent gets
A Python starter project with the virtual machine (which is the specification), a small assembler, and an optimizer that returns its input unchanged.
A few sample systems.
A task statement that defines "behaves identically": after any sequence of transactions, both versions must agree on success, output, logs, calls to outside addresses, storage and balances.
What makes it hard

Outside addresses are adversarial. A call to one can call back into any contract of the system, any number of times, before it returns. Every saving the optimizer makes around a call (keeping a storage value in memory, delaying a write, dropping a repeated read) is therefore only safe if it can prove what a call-back could or could not see or change.

The difficulty comes in three levels:

General rewriting: constant folding, removing redundant work, cheaper dispatch. The models do this well.
Reasoning about locks: a contract with a re-entrancy lock cannot be re-entered mid-call, so its storage can be cached across calls. The optimizer has to prove the lock holds on every path, and notice when a setter or a second contract breaks it.
Whole-system reasoning: which contracts can reach which, which values are fixed constants and which can be changed by a later transaction.
How it is graded
The verifier runs the agent's optimizer on 40 hidden systems, then replays 400 seeded transaction sequences against both versions with hostile re-entrant outside addresses.
Any difference in behaviour fails that system and earns 0 for its checks.
For equivalent systems, the score is the share of my reference optimizer's gas saving that the agent achieved.
For the 24 hard checks (80 points), only savings beyond a "cautious rewrite" count. That baseline is my reference with call-back reasoning switched off.
General rewriting alone is worth about 20 points; the rest needs the lock and whole-system reasoning.
Area Points
Basic contracts 9
Ledger behind its lock 10
Ledger with setters that open the lock 20
Pool with fixed constants 16
Pool with changeable parameters 25
Scale (six-contract systems, time limit) 10
Unusual code shapes 10

RL Gym Task Authoring and Self-Check
A basic pre-submission validation. It covers only what the task requirements state directly and helps candidates catch issues before submitting. It is not the final review, and the final review may identify additional issues. It reports what looks good, what is not passing yet, and what has no proof. It does not suggest redesigns.

Repository context
Use this guidance when authoring or reviewing a task. Run the self-check workflow below when validating a submission; its scratch-copy and no-edit rules apply to validation, not to an explicitly requested authoring change.

Read README.md for the index and the selected task's detailed guide: brownfield/README.md or greenfield/README.md.
Each task root contains task.toml, instruction.md, app/config.toml, environment/Dockerfile, reference-solution/, verifier/, and proof-of-work/.
Only app/ and instruction.md are candidate-visible. Keep reference solutions, verifiers, mutants, proof-of-work, and authoring guidance private.
Keep instructions, setup/run commands, reference behavior, and verification aligned. Keep verifier/scoring.yml synchronized with the verifier's TESTS declarations, which currently award points.
Brownfield has zero-point existing-feature gates in verifier/hidden-tests/. These must pass before scored tests run and are reported separately in reward.json.
Generate solutions using the latest qualifying frontier model versions available at generation time. Outdated models are not allowed. Use medium reasoning effort and include at least two proof-of-solution runs from different qualifying frontier models per task.
Store runs in proof-of-work/model-reasoning-timestamp/, omitting the provider prefix. Include solution/, generation metadata.json and trajectory.jsonl, and verifications/<run-number>/reward.json. Nondeterministic verification also requires metadata and trajectory files in each numbered verification folder.
Keep the root README short and task details in the task READMEs. Update this file when shared authoring guidance changes. Exclude generated dependencies, build output, local databases, and secrets from submissions.
How to run
Task Progress:

  • 1. Read the instruction and the scoring files
  • 2. Run the reference through the verifier twice
  • 3. Run each mutant and compare the score with its weight
  • 4. Read the proof-of-work run records
  • 5. Write the report
    For self-checks, work in a scratch copy of the repo. Do not edit the candidate's files. Run the workflow separately for each task being submitted.

From the selected task root (brownfield/ or greenfield/), read instruction.md, task.toml, verifier/tests/, verifier/scoring.yml, and any verifier/hidden-tests/.
Prepare a fresh scratch copy of reference-solution/ using its setup commands. For Taskboard, use the task's app/config.toml for setup/run commands; GoRedis's reference has its own config.toml. Use the task environment for installed dependencies. Run the verifier twice, using a fresh reference workspace and separate output directory for each run. Keep both scores and logs.
Run each patch in verifier/mutants/ independently against a fresh reference copy, after an unmutated control. Compare the score with the targeted weight and the mutant README's expected score. This repository does not define check:reference or check:mutants npm scripts.
Grade a fresh app/ copy and confirm 0/100. For brownfield, also confirm all existing-feature gates pass.
Open the reference and model run records. Note each run's score, model name/version, reasoning effort, and the instruction and verifier version it was generated against.
After running the workspace's configured setup, invoke the verifier from the task root with absolute paths:

WORKSPACE=/absolute/path/to/prepared-workspace
TASK_DIR="$PWD"
OUT_DIR=/absolute/path/to/results
python3 verifier/tests/run_tests.py
The verifier starts the configured app; leave its port free. Save each run's reward.json and verifier.log. GoRedis also uses OUT_DIR/setup.log to detect setup failure, so preserve setup output there. Scores in this repository use 0–100: the reference target of 1.0 below means 100/100.

What to check

  1. Instruction
    Check Passing looks like
    Realistic A genuine use case with a practical application. Not an arbitrary puzzle with many invented constraints.
    No verifier or test leakage It does not name test files, test cases, check names, weights or how the score is computed.
    No evaluation framing It does not say or imply the task is for RLVR, benchmarking, training or evaluating models.

  2. Verifier
    Check Passing looks like
    Deterministic The reference scores exactly 1.0, and gives the same score on a repeat run. A saved run record showing this exists. If there is no such proof, treat it as "not shown yet".
    Genuine (black-box) It checks behaviour and output, not how the solution is written. It does not require specific function names, attributes, internal values, file names or message text, unless the instruction states them. Many valid implementations should be able to pass.
    Real partial credit It does not rely on all-or-nothing components. A component worth 30% or 40% of the total that gives nothing on a single failure is flagged, because it cannot tell partly correct from fully wrong.
    Functionality weights No single functionality carries more than 25% of the total score. Each major functionality has several granular sub-checks.
    Sub-check weights No single sub-check carries more than 5% of the total score.
    Non-functional share Non-functional requirements (for example performance, limits, robustness) total no more than 20% of the score.
    If the weights break any of these limits, say so and ask the candidate to review the weight allocation.

  3. Mutants
    Check Passing looks like
    Count and mix 7 to 8 mutants on core functional behaviour, plus 1 to 2 on non-functional behaviour.
    Each mutant breaks only its own feature Take the weight of the feature a mutant targets (for example 7%). With that mutant applied, the reference should score about 100% minus that weight (93%). A difference of more than 2 percentage points either way is flagged.
    Caught for the right reason Mutants fail on behaviour, not because the build fails. Run an unmutated control first, and confirm it still scores 1.0.

  4. Reference solution
    Check Passing looks like
    Exists There is a reference solution that builds and runs.
    Scores 1.0 Run against the verifier, it scores exactly 1.0, with the same score on every run.
    Below 1.0 Flag it and ask the candidate to check it. The cause may be the verifier or the reference.
    Not hacky The reference does not hard-code expected values or detect the test inputs to reach 1.0. It solves the task the way the instruction describes.

  5. Proof-of-work
    Check Passing looks like
    Qualifying model runs At least two distinct qualifying models have completed single-pass runs, with records and scores. Use the model anchors and release-date rule below; do not require an exact name match. A missing or unverified run is "not shown yet".
    Difficulty target Each qualifying model must score below 30% in a single pass on the final version, using medium reasoning effort. A score of 30% or higher is flagged for review.
    Repeated zero scores If multiple independent qualifying model runs score 0%, gently ask the author to review whether the instruction and verifier are clear and aligned. Consistent zero scores may indicate a task or verifier issue, rather than only high difficulty.
    Latest version Every run was generated against the latest instruction and the latest verifier. If the instruction or verifier changed after a run was recorded, the proof is not valid until the solution is regenerated and the run completed again on the latest versions.
    Use these as provider and release-date anchors, not as a static exact-name allowlist: GPT-5 Sol / GPT-6 Astra, Claude Opus 5 / Claude Fable 5, Gemini Argon 4 / Gemini 3.8 Flash, Grok 4.7, Muse Wonder, Kimi K3, Qwen 3.8 Max, MiMo V2.6 Pro, Mistral Large 4, GLM 5.3, MiniMax M3, and Nemotron 3.5 Lightning. Normalize case, punctuation, separators, and common provider/model aliases before comparing names. Identify the publishing company for both the candidate model and the matching anchor; use an official model catalog or release announcement to confirm publisher and release chronology when needed. A candidate model qualifies when it is from the same company as an anchor and was released on or after that company's anchor model. Accept newer generations and naming variants, including GPT-6 Sol, GPT-6.1, and GPT-5.1-Sol as later OpenAI models than GPT-5 Sol; do not reject them because their names differ from an anchor. Do not compare version numbers across companies or infer release order from name alone. If the publisher or release chronology cannot be confirmed, treat the run as outside the qualifying set. Runs from companies not represented by these anchors do not count toward candidate-provided proof-of-work. Require at least two distinct qualifying models, each run with medium reasoning effort and scoring below 30% in a single pass on the final task version.

If multiple independent qualifying model runs score 0%, gently ask the author to review whether the task instruction and verifier are clear and aligned. Present this as a possible issue to investigate, not as a conclusion that either is defective.

If proof runs use other models, including free-tier models, acknowledge them as useful early evidence. Explain gently that they may not predict the final assessment: after submission, the task may be evaluated with two leading frontier models selected from examples such as GPT-6 Sol, Claude Opus 5.5, and GPT-6 Astra, using high reasoning effort. The expected score in that assessment is below 40%. Free-tier proof alone may not be sufficient if the task does not meet the final evaluation criteria. Use wording such as: "If your proof runs use other or free-tier models, they can still help you assess the task before submission. For a consistent final assessment, we may also run it after submission with two leading frontier models (for example, GPT-6 Sol, Claude Opus 5.5, or GPT-6 Astra) at high reasoning effort; the task is expected to score below 40%. Free-tier results may differ from that assessment, so final acceptance will depend on the task meeting the evaluation criteria."

To check the last row, compare the instruction and verifier version recorded in each run (a commit, hash or timestamp) with the current files. If the run record has no version, say that the freshness of the proof cannot be confirmed.

How to word the report
Report every miss as a check that is not passing yet. Do not say the work is bad or wrong, and do not accuse.
For checks that meet the stated criteria, use "Looks good" instead of "Passing".
Use plain, calm wording: "This check is not passing yet:", "This is not shown yet:", "Please review:".
Give the evidence: the score, the weight, the count, or the file. Say what you ran and what you read.
Do not propose designs or rewrites. State what failed and what would show it passing.
If a check could not be run, say so once and say why.
Report template

RL Gym Task Self-Check: <task name>

Instruction

  • Realistic: <Looks good / not passing yet, with a one-line reason>
  • No verifier or test leakage: <...>
  • No evaluation framing: <...>

Verifier

  • Deterministic (reference at 1.0, repeatable, proof saved): <...>
  • Genuine (behaviour-based, no unstated exact names or values): <...>
  • Partial credit (no large all-or-nothing component): <...>
  • Functionality weights (max 25%, multiple sub-checks): <...>
  • Sub-check weights (max 5%): <...>
  • Non-functional share (max 20%): <...>

Mutants

  • Count and mix (7-8 core, 1-2 non-functional): <...>
  • Score with each mutant applied matches its weight (within 2 points): <...>
  • Caught on behaviour, control run at 1.0: <...>

Reference solution

  • Exists and runs: <...>
  • Scores 1.0 on every run: <...>
  • Not hacky: <...>

Proof-of-work

  • At least two qualifying-model runs present and verified: <...>
  • Each qualifying model below 30% with medium reasoning on the final version: <...>
  • Repeated 0% scores reviewed for possible instruction/verifier misalignment: <...>
  • Generated against the latest instruction and verifier: <...>

Items to review

<Numbered list of every check that is not passing yet or not shown yet, in the order above. Include the gentle post-submission assessment note when the submitted runs do not meet the provider/release-date rule. Write "None" if everything passes.>

Always end the report with: This is a basic pre-submission validation, not the final review. The final review may identify additional issues.

If the list contains any items, put this reminder after that note so it is the final line: Please resolve the feedback above before you submit the task. Omit the reminder when the list is "None".
Self-check before sending
Every number in the report came from a run or a file read in this check.
Every miss is worded as "not passing yet" or "not shown yet", with the evidence.
No fixes or redesigns are proposed.
The scratch copy was used, and the candidate's repo was not changed.

Pensiero

Hardening the task

I’m interpreting “more extremely hard” as strengthening the Gasworks benchmark itself. I’d add nested execution, deferred failures, dynamic memory expansion, bounded adversarial inputs, and exact trace-based gas verification while preserving deterministic replay.

Building a harder benchmark

I’d make Gasworks stress whole-system reasoning: nested reentrancy, dynamic targets, delegate-style context, storage aliasing, cyclic call graphs, revert-sensitive effects, transaction sequences, and exact trace equivalence. The optimizer would need preserve logs, returndata, calls, balances, storage, and failure behavior while reducing gas.

Strengthening proof requirements

I’d require conservative whole-program proofs over every allowed transaction sequence and hostile callback strategy. Any uncertain transformation should be rejected, while successful optimizations preserve failures, returndata, logs, calls, storage, balances, and gas-sensitive behavior.

Resolving gas semantics

I’m separating gas accounting from observable behavior: reduced cost must not alter failures, outputs, logs, calls, storage, or balances. Gas-sensitive execution therefore needs explicit treatment, especially around external calls and out-of-gas paths.

Escalating the challenge

I’d turn Gasworks into a whole-system optimizer: dynamic targets, nested callbacks, cross-contract locks, persistent state, hostile returns, unusual bytecode, and exact behavior preservation across every transaction sequence.

Authoring harder systems

I’d frame Gasworks as a whole-system optimizer challenge with adversarial reentrancy, dynamic dispatch, cyclic dependencies, persistent state, hostile callbacks, storage aliasing, unusual bytecode, and exact observational equivalence across every legal transaction sequence.

Worked for 1m 39s

Risposta

Text version

To make Gasworks extremely hard, I would elevate it from a re-entrancy-aware bytecode optimizer into a whole-system, adversarial, path-sensitive program optimizer.

The key change: the agent must reason not only about whether a storage value can change during a call, but whether it can change through an arbitrarily deep chain of callbacks, indirect calls, cross-contract lock interactions, and future transactions.

Here is the significantly harder version.

:::writing{variant="document" id="83172"}

Gasworks: Adversarial Whole-System EVM Optimization

Objective

Build a high-performance optimizer for EVM-style smart-contract bytecode.

The optimizer receives an entire interconnected system of contracts and produces a new version of that system that consumes less gas while preserving its exact observable behavior.

This is not a conventional peephole optimizer. The optimizer must perform bytecode-level analysis, path-sensitive reasoning, interprocedural analysis, cross-contract dependency analysis, and adversarial re-entrancy reasoning.

The central challenge is proving when an optimization remains valid despite arbitrary interactions between contracts and hostile external addresses.

Correctness is absolute. An optimization that saves gas but changes even one observable behavior is invalid.

1. Execution and equivalence requirements

The supplied Python virtual machine defines the authoritative execution semantics.

For every finite sequence of transactions and every permitted behavior of external addresses, the original and optimized systems must agree on:

  • Transaction success or failure.
  • Return and revert data.
  • Emitted logs, including their order and contents.
  • Calls to external addresses, including their observable arguments and ordering.
  • Final storage of every contract.
  • Final balances of every account.
  • All other externally observable effects supported by the VM.

The optimizer must preserve behavior across transaction boundaries, not merely for one isolated execution.

External addresses are fully adversarial. They may:

  • Re-enter any contract in the system.
  • Re-enter the currently executing contract.
  • Call multiple contracts before returning.
  • Construct arbitrary calldata and transaction values.
  • Trigger indirect and mutually recursive call chains.
  • Return arbitrary data or failure results.
  • Behave differently depending on the state they observe.
  • Repeat callbacks at different nesting depths.
  • Exploit every callback opportunity permitted by the VM.

No external call may be assumed pure, harmless, deterministic, or non-reentrant.

2. The optimization problem

The optimizer must discover and apply safe transformations across the entire contract system.

A. Advanced bytecode optimization

Implement:

  • Constant propagation across basic blocks and functions.
  • Path-sensitive constant folding.
  • Dead-code and unreachable-block elimination.
  • Redundant stack-operation elimination.
  • Common-subexpression elimination.
  • Redundant storage-read elimination.
  • Storage-write elimination where observationally safe.
  • Control-flow simplification.
  • Jump-table and dispatch optimization.
  • Cross-function value propagation.
  • Equivalent instruction-sequence replacement.
  • Safe elimination of repeated computations.
  • Interprocedural optimization across contract boundaries.

The optimizer must work with noncanonical bytecode, including unusual stack layouts, shared code regions, indirect jumps, overlapping control-flow structures, and equivalent but differently encoded instruction sequences.

It must not depend on clean source-level function boundaries.

B. Deep re-entrancy reasoning

The optimizer must understand that an external call is a potential execution of the entire reachable contract system.

For every external call, it must determine:

  1. Which contracts can be reached through callbacks.
  2. Which entry points those contracts expose.
  3. Which storage locations those entry points can modify.
  4. Which values can be changed indirectly through additional callbacks.
  5. Whether any assumptions made before the call remain valid afterward.

This analysis must be transitive.

If Contract A calls an external address, which calls Contract B, which calls Contract C, which modifies a storage location subsequently read by A, the optimizer must recognize the dependency.

A direct-call-only analysis is insufficient.

C. Formal lock-state reasoning

The optimizer must identify and reason about re-entrancy locks even when they are not implemented as conventional boolean variables.

Locks may be represented through:

  • Boolean storage variables.
  • Integer counters.
  • Bit flags.
  • Multiple storage slots.
  • State-machine transitions.
  • Locks acquired and released by helper functions.
  • Locks distributed across multiple contracts.

The optimizer must prove whether a lock is held on every relevant execution path.

It must account for:

  • Conditional lock acquisition.
  • Multiple early returns.
  • Reverting execution paths.
  • Nested function calls.
  • Multiple entry points.
  • Lock release through helper functions.
  • Lock modification by other contracts.
  • Setters that temporarily or permanently disable protection.
  • Multiple locks whose validity depends on one another.
  • Locks acquired in one contract and relied upon in another.

A lock is not considered protective merely because a storage variable is set before an external call.

The optimizer must establish that the lock remains effective throughout every possible callback path.

D. Cross-contract lock dependencies

The optimizer must reason about lock relationships across the complete system.

For example:

Contract A holds lock X and calls Contract B.

Contract B holds lock Y and calls an external address.

The external address re-enters Contract A through a different entry point.

The optimizer must determine whether X and Y jointly prevent relevant state modifications, whether another entry point bypasses either lock, and whether the callback can modify state that A assumes remains unchanged.

It must also identify cases where:

  • One contract can release another contract's lock.
  • A setter changes lock behavior.
  • A callback reaches a privileged entry point.
  • Multiple contracts share or indirectly reference state.
  • A lock is effective only under a particular call ordering.
  • Two individually safe contracts create an unsafe combined execution path.

Lock proofs must be based on actual reachable execution paths, not contract names, function names, or superficial patterns.

E. Whole-system storage invariants

The optimizer must distinguish between values that are:

  1. Permanently constant.
  2. Immutable after initialization.
  3. Constant only within a transaction.
  4. Constant only within a particular call frame.
  5. Constant only while a specific lock invariant holds.
  6. Potentially mutable through callbacks.
  7. Mutable by another contract or a later transaction.
  8. Dependent on previous transaction history.

It must discover invariants across contracts.

For example, a pool may read a configuration value from a ledger. The ledger may expose a setter that appears unrelated to the pool's execution path.

The optimizer must establish whether that setter is actually reachable, whether it can be invoked through an adversarial callback, and whether the configuration value can change between transactions.

Only proven invariants may justify replacing storage operations with constants or cached values.

F. Interprocedural effect analysis

The optimizer must construct conservative summaries of functions and their transitive effects.

These summaries must capture:

  • Storage reads.
  • Storage writes.
  • Balance changes.
  • External calls.
  • Potential callbacks.
  • Reverts and failure propagation.
  • Values returned to callers.
  • Lock acquisition and release.
  • Dependencies on other contracts.
  • State changes that invalidate previously established facts.

Summaries must account for indirect calls and recursive call graphs.

When a function's effects cannot be established, the optimizer must conservatively invalidate affected assumptions.

G. Temporal and transaction-history reasoning

The optimizer must reason about how contract state evolves across an arbitrary number of transactions.

It must not assume that:

  • A value remains unchanged because it was constant in the initial state.
  • A lock remains held after a transaction.
  • A configuration value cannot change because no setter was called in the current execution.
  • A contract's state is independent of another contract's transaction history.
  • A previously established invariant survives every possible transaction sequence.

It must identify which optimizations are valid permanently and which are valid only within specific execution contexts.

3. Whole-system graph analysis

The optimizer must analyze the system as a connected graph rather than optimizing contracts independently.

It must handle:

  • Cyclic contract dependencies.
  • Multiple contracts sharing storage dependencies.
  • Multiple entry points reaching the same internal code.
  • Indirect and dynamically selected call targets.
  • Mutually recursive contract interactions.
  • Multiple locks protecting overlapping state.
  • Configuration changes propagating through several contracts.
  • Callback paths that cross the entire system.
  • Contracts whose behavior depends on the state of several other contracts.

The analysis must remain sound when the system contains six or more interconnected contracts.

It must not rely on a fixed contract ordering or assume that the contract being optimized is isolated.

4. Adversarial execution scenarios

The optimizer must remain correct under combinations of difficult execution conditions.

Examples include:

Scenario 1: Indirect re-entrancy

A calls an external address, which calls B, which calls C, which re-enters A through a different entry point.

Scenario 2: Lock invalidation

A holds a lock, but a callback reaches a setter in B that changes the condition under which A's lock is considered valid.

Scenario 3: Cross-contract storage mutation

A caches a storage value, calls B, and B indirectly modifies that value through another contract.

Scenario 4: Conditional protection

A lock is held on most paths but is released on an uncommon branch before an external call.

Scenario 5: Temporal invalidation

A configuration value is constant during one transaction but can be changed by a later transaction through an otherwise unrelated entry point.

Scenario 6: Multiple-lock interaction

A relies on two locks in different contracts. A callback can modify one lock without touching the other.

Scenario 7: Recursive callback chains

An external address repeatedly invokes different system contracts, producing a call graph containing cycles and multiple possible return paths.

Scenario 8: State-dependent dispatch

A callback changes a storage value that affects the destination of a later indirect call.

Scenario 9: Revert-sensitive execution

A lock is acquired, an external call occurs, and different nested failure paths determine whether state changes are retained or reverted.

Scenario 10: Cross-contract invariant failure

Two contracts independently satisfy an invariant, but their combined execution allows a callback to violate the assumption used by an optimization.

These conditions may occur together rather than independently.

5. Optimizer correctness requirements

The optimizer must:

  • Accept complete contract systems rather than individual functions alone.
  • Produce valid executable bytecode.
  • Preserve all VM-defined observable behavior.
  • Avoid introducing new externally observable operations.
  • Handle arbitrary supported bytecode structures.
  • Terminate within the available execution budget.
  • Avoid hard-coded contract addresses, storage values, selectors, or sample-specific assumptions.
  • Remain correct when an analysis cannot establish whether a transformation is safe.

Conservative optimization is preferable to an unsound transformation.

The optimizer may decline an optimization when it cannot establish the necessary invariant. However, it should still pursue independent optimizations that remain provably safe.

6. Expected result

The final program must implement a general-purpose optimizer that combines:

  • Bytecode-level optimization.
  • Path-sensitive dataflow analysis.
  • Interprocedural effect analysis.
  • Adversarial callback modeling.
  • Re-entrancy-lock verification.
  • Cross-contract dependency analysis.
  • Whole-system invariant discovery.
  • Transaction-history reasoning.
  • Conservative optimization under uncertainty.

The ultimate challenge is to discover gas savings that are impossible to justify through local instruction rewriting alone.

A successful optimizer must understand not just what a contract executes, but what every other reachable contract could do while that execution is suspended.

The governing principle: Every optimization must remain correct under every execution path that the virtual machine permits, including paths created by hostile re-entrant behavior. :::

What makes this version substantially harder

DimensionOriginal challengeNew challenge
Re-entrancyDirect callbacksArbitrarily nested transitive callbacks
LocksBoolean-style lock reasoningMulti-lock, cross-contract lock proofs
StorageIdentify mutable valuesTemporal and transitive invariant analysis
Call graphContract reachabilityDynamic, cyclic, context-sensitive reachability
OptimizationLocal and interproceduralWhole-system path-sensitive optimization
TransactionsBasic sequence testingArbitrary transaction-history dependencies
Failure handlingBasic success/failureNested revert and state-invalidation reasoning
BytecodeConventional instruction sequencesUnusual control-flow and stack structures

My recommendation

To make this genuinely frontier-model difficult, I would enforce three particularly demanding requirements:

  1. No unsound optimization: Any incorrect transformation invalidates the affected system, regardless of how much gas it saves.
  2. Compositional reasoning: The optimizer must identify safety across multiple contracts, not simply recognize known re-entrancy guard patterns.
  3. Nonlocal optimization: The most valuable savings must require proving invariants that span external calls, multiple contracts, and transaction boundaries.

One important distinction: this is a harder candidate-facing task specification, not proof that the benchmark itself is harder. The verifier must also exercise these combined scenarios, and the reference optimizer must demonstrate that the requested optimizations are achievable.

Condividi questa Q&A