Repository navigation
chore: contracts owns the anchor-name vectors; CI checks our copy - #9
Draft
JamesCarnley wants to merge 1 commit into
Draft
JamesCarnley wants to merge 1 commit into
JamesCarnley wants to merge 1 commit into
Conversation
The v1 anchor-name encoding is defined by contracts specs/02 and enforced by the deployed EFSIndexer; EFSRouter (contracts#55) and encodeName implement it too. The conformance vectors therefore belong with the spec, in the contracts repo: when the SDK and the contract disagree, the SDK is the side that is wrong, and changing a rule should not require an SDK PR first. Two copies with nothing comparing them would let one drift while both suites stay green, so scripts/check-name-vectors-drift.mjs fails CI when our copy differs from contracts main, network-hard-fail like the deployment drift gate. The file's header now names the contracts copy as canonical (both copies change together via contracts#55). Until contracts#55 merges the file to contracts main, the new step fails with HTTP 404 — merge #55 first. Verified: the check fails on the 404 today, and pointed at #55's current head it reports the first differing line; names-vectors tests (177), biome ci, changeset status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/hardhat/test/fixtures/anchor-names.vectors.json, next tospecs/02. The SDK keeps a byte-identical copy.scripts/check-name-vectors-drift.mjsfails when the SDK copy differs from contractsmainand prints the first differing line. It fails hard on network errors, like the existing deployment drift gate.Why
The v1 name encoding is defined by contracts
specs/02, enforced by the deployedEFSIndexer, and implemented again byEFSRouter(#55) and the SDK'sencodeName. The vectors are that rule written as examples, so they belong with the spec. If the SDK and the contract disagree, the SDK is the side that's wrong, and changing a rule shouldn't require an SDK PR first. specs/10's contentHash vectors already follow this pattern.Two copies with nothing comparing them would let one drift while both test suites stay green. That's how the media-type validators diverged twice.
Test plan
maintoday: fails with HTTP 404 (expected until #55 merges)names-vectors.test.ts: 177 passedpnpm lint,pnpm changeset status --since=origin/mainAgents involved
Claude Opus 5.5 (SDK dev session). Coordinated with the contracts-issues agent working on #55.
🤖 Generated with Claude Code