# Consensus spec divergence edge cases

Spec special-case rules that clients may apply per-element or to the aggregate, causing divergence

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2026-07-02. Updated 2026-11-17._

## How it works
A protocol rule has an undefined or under-specified edge, and each implementation resolves it its own way. The spec may say a special-case return applies ("result will be 1") without saying whether it applies per element or to the aggregate [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md). Each client is locally correct against its own reading, so nothing fails in isolation; the divergence only appears when two implementations meet the same input. The root cause is an ambiguity in the written rule, not a bug in any single client.

## Where it shows up
- Spec text with special-case return values for degenerate inputs (infinity, zero, empty) that does not say per-element vs aggregate [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)
- Precompiles or validation rules reachable from any contract, where one client short-circuits and another computes fully [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)
- Multi-element inputs (pairing products, batched checks) where a special case in one element could short-circuit the whole result [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)
- Client code paths that early-return on a sentinel value versus paths that fold it into a running computation [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)

## How to review
For every special-case rule, ask: does the spec pin the result for multi-element input, and do all implementations agree on that exact input? The invariant is that for any input, every client returns the same value. Build a differential test with a degenerate value in one element of a multi-element input and compare clients [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md). Read the spec sentence literally against each implementation's branch structure; if one short-circuits and another accumulates, the ambiguity is real.

## How finders spotted it
- Read the spec sentence against two client implementations, noticed the infinity rule was mathematically ambiguous for multi-pairing products, diffed execution-specs vs Nethermind logic, and built test vectors with infinity in one pair [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)

## Variants seen
- Per-element vs aggregate application of a special-case return in a precompile [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md)

## Impact and severity
Divergence in a contract-reachable precompile can be embedded in a transaction only some clients accept, which can lead to a chain split and validator slashing [E1](https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md). Severity rises with reach: a rule shared by all clients and reachable from any contract scales the damage across the network.

## Evidence
- E1: https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_protocol_specification%3A3.1.1.md
- E2: https://bugbountylibrary.com/r/sherlock%3A2023-01-optimism%3AM-6.md
- E3: https://bugbountylibrary.com/r/h1%3A3559522.md
