Skip to content

docs: spec for SnapchainConfigRegistry schema and TOML rendering - #489

Merged
topocount merged 3 commits into
mainfrom
kjs/neyn-13018-c1-snapchain-config-registry-spec
Aug 5, 2026
Merged

docs: spec for SnapchainConfigRegistry schema and TOML rendering#489
topocount merged 3 commits into
mainfrom
kjs/neyn-13018-c1-snapchain-config-registry-spec

Conversation

@topocount

@topocount topocount commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

Describe why this issue should be fixed and link to any relevant design docs, issues or other relevant items.

Change Summary

Describe the changes being made in 1-2 concise sentences.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review

Additional Context

If this is a relatively large or complex change, provide more details here that will help reviewers.


Stack created with GitHub Stacks CLIGive Feedback 💬


PR-Codex overview

This PR focuses on updating the ci.yml workflow to pin the foundry version for consistent formatting and enhancing the documentation for SnapchainConfigRegistry to clarify its schema and operational details.

Detailed summary

  • Updated foundry version from stable to v1.2.3 in .github/workflows/ci.yml.
  • Changed docker/bake-action version from v3 to v7 and added files: docker-compose.yml.
  • Expanded documentation for SnapchainConfigRegistry detailing its schema, data model, and operational guidelines.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copilot AI lite review requested due to automatic review settings August 4, 2026 21:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a normative specification document for the SnapchainConfigRegistry contract’s on-chain schema and its exact TOML rendering contract with consumers (including pagination, validation rules, and TOML-injection considerations), so clients can safely fetch/merge config via eth_call.

Changes:

  • Documented the ValidatorSet data model and the semantics of effectiveAt, key encoding, and ordering.
  • Specified the exact TOML output grammar/format and pagination composition properties.
  • Documented validation responsibilities (on-chain vs operator), peer-string allowlist, and operational/deployment considerations.
Suppressed comments (1)

docs/snapchain-config-registry.md:255

  • This references "C4" again, but C4 is not defined anywhere in the document. Remove the label or add a definition so readers can trace the referenced invariant.
a `"`. The invariant C4 asserts as a property test is therefore exact: the number of `"` characters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/snapchain-config-registry.md Outdated
Comment thread docs/snapchain-config-registry.md Outdated
@topocount
topocount force-pushed the kjs/neyn-13018-c1-snapchain-config-registry-spec branch 4 times, most recently from c0edbbf to 2f477e9 Compare August 4, 2026 22:13
Pins the byte-level agreement between the registry contract and its
consumers before either side is written: struct shape, integer and hex
formatting, block separators, the peer-string allowlist, the validation
split between contract and operator, and the gas growth curve.

Two decisions carry most of the weight:

- Public keys are stored as bytes32, so a validator-set entry can only
  render through a fixed hex alphabet and cannot break out of its TOML
  string literal. That leaves the two peer strings as the only injection
  surface, which a strict character allowlist closes.

- Each validator-set block carries its own trailing blank line rather
  than sitting between separators, which is what makes the paginated
  getter compose exactly with the canonical one.
`forge fmt` output is not stable across foundry releases, and CI installs
`stable`, so the formatter drifts underneath `forge fmt --check` without
anyone changing a line of Solidity.

That has already happened. This tree was formatted with v1.2.3, stable as
of the last commit to main on 2025-06-17. Current stable wraps
multi-parameter function headers differently and wants to reflow 63
otherwise-untouched files, so `forge fmt --check` fails on a clean
checkout of main -- CI is red before any change is applied.

Pinning is the smaller fix. The alternative is a repo-wide reformat that
touches most of src/, script/ and test/, conflicts with every open PR,
and buys nothing but agreement with whichever formatter happens to be
current. None of the six `multiline_func_header` settings reproduces the
existing style, so there is no configuration that avoids the churn.

Verified: v1.2.3 formats main with zero diffs, and builds and tests this
tree identically to current stable.

Bump this deliberately, in a commit that also runs the repo-wide
`forge fmt`, rather than letting it drift.
The pinned v3 cannot run on current runners at all:

  docker/bake-action < v5 is not compatible with buildx >= 0.20.0,
  please update your workflow to latest docker/bake-action or use an
  older buildx version.

So the build-image job fails before it builds anything, independently of
what is in the tree.

`files` is required from v6 on, and names the compose file bake was
already reading by default.
@topocount
topocount force-pushed the kjs/neyn-13018-c1-snapchain-config-registry-spec branch from 2f477e9 to 1c210bd Compare August 5, 2026 20:55
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Coverage after merging kjs/neyn-13018-c1-snapchain-config-registry-spec into main will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Bundler.sol100%100%100%100%
   BundlerV1.sol100%100%100%100%
   FnameResolver.sol100%100%100%100%
   IdGateway.sol100%100%100%100%
   IdRegistry.sol100%100%100%100%
   KeyGateway.sol100%100%100%100%
   KeyRegistry.sol100%100%100%100%
   RecoveryProxy.sol100%100%100%100%
   StorageRegistry.sol100%100%100%100%
   TierRegistry.sol100%100%100%100%
src/abstract
   EIP712.sol100%100%100%100%
   Guardians.sol100%100%100%100%
   Migration.sol100%100%100%100%
   Nonces.sol100%100%100%100%
   Signatures.sol100%100%100%100%
src/validators
   SignedKeyRequestValidator.sol100%100%100%100%

@topocount
topocount merged commit 94cbd17 into main Aug 5, 2026
4 checks passed
@topocount
topocount deleted the kjs/neyn-13018-c1-snapchain-config-registry-spec branch August 5, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants