In this track: Build, test and reason
advanced · 4 MIN READ

Review a pull request for safety

Connect a change to its affected invariants and authority.

LET’S PICTURE IT

A small edit to a master key rule can matter more than a large formatting change.

SEE IT FOR YOURSELF
A valid counter call, step by stepStep 1 / 4
A valid counter call, step by stepFunction requestincrement()No argumentsBefore executionstored count0A local teaching example with a defined starting stateIncoming callCheck function dispatchCheck coded conditionsRules passConditions passContinue executionA failed check can revert insteadCalculation0 + 1Result: 1Storage writecount = 1Persists if call succeedsCalculating a local value and storing it are separate stepsPersistent statecount1Later readGetter reports 1No new incrementState, logs and browser display have different roles

This example begins with count zero and a request to call increment(). No real contract is deployed.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Identify the behavior change

Write a concrete before-and-after example. A diff’s line count does not measure how much authority or accounting behavior changed.

Trace affected paths

Review callers, shared state, callbacks, upgrades and failure handling that rely on the changed behavior. Local function reasoning may miss cross-component effects.

Evaluate the tests

Look for a regression test that would fail on the old bug and checks the intended property. A test copied from implementation steps can preserve the same mistaken assumption.

Report actionable findings

State the trigger, consequence and relevant code location. Keep uncertainty and required assumptions explicit so the author can reproduce the concern.

Define the test

trigger → changed path → affected invariant
→ concrete consequence → reproducing test
→ proposed correction

Test plans are framework-neutral unless labeled as complete Solidity or JavaScript. Use a local test environment and no real funds.

QUICK CHECK · NO PRESSURE

Is a one-line authorization edit automatically low risk?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.