Skip to content

Fix incremental snapshot state-root domain separation #771

Closed

Description

@flyingrobots

1. Background Context

Canonical and incremental snapshots must commit to the same reachable WARP state under the existing state-root v1 law.

2. Observed

The accumulator produces a different state root for the same state and root node.

2b. Expected

Accumulator and canonical snapshot roots are equal.

2c. Reproduction

On main 2d79ecc, the Docker regression snapshot_accum::tests::accumulator_root_matches_the_canonical_snapshot_root fails its equality assertion. One test ran; setup and compilation succeeded.

2d. Blast radius

Incremental snapshot consumers. Population and introduction date not measured. Canonical snapshot hashing remains unchanged.

2e. Hypothesis

The accumulator omits the existing state-root domain prefix; equality after adding that prefix would confirm the diagnosis.

2f. Diagnosis

Source inspection confirms SnapshotAccumulator::compute_state_root omits STATE_ROOT_V1, while snapshot::compute_state_root hashes it before the root binding. The deterministic regression demonstrates the divergence.

3. Prerequisites

None; independently mergeable on current main.

4. Scope

In: existing domain prefix, cross-implementation regression, canonical documentation and changelog.
Out: reachable-state boundary changes, hash-law version changes, broader execution-footprint work from #716.

5. Why now

Extract the independent correctness fix before landing the reviewed PR sequence.

6. Risks

Previously emitted accumulator roots change to the existing canonical law. This does not migrate old artifacts or claim old incorrect roots verify under the canonical law.

7. Definition of Done

The regression fails on the parent and passes after the fix; relevant snapshot tests pass in Docker; current-head independent review and required CI pass.

8. Stakeholders

Echo runtime and retained-artifact consumers.

9. Related Issues

Extracted from PR #716; remaining execution-footprint scope stays deferred.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions