Skip to content

feat: add sunsetAt datetime for chains - #201

Open
simsonraj wants to merge 2 commits into
mainfrom
feat/sunset-date
Open

feat: add sunsetAt datetime for chains#201
simsonraj wants to merge 2 commits into
mainfrom
feat/sunset-date

Conversation

@simsonraj

@simsonraj simsonraj commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Add sunset dates for deprecated chains

Deprecation vs. sunset: Deprecated marks a chain as discouraged (it may still be live).
SunsetAt is the date it goes offline — a future date means it is still live, a past date
means it is offline. Empty means no sunset is scheduled.

Summary

  • Introduces a sunset_at field to track when a chain went (or will go) offline, and backfills it for deprecated chains using researched shutdown dates.
  • marks all remaining Goerli-based testnets as deprecated.
  • Previously we only had a boolean deprecated flag with no notion of when — this enables downstream systems (e.g. Insights, alerting) to build advance-warning logic and distinguish "deprecated" from "actually offline".

Changes

New API (types.go, selectors.go)

  • ChainDetails.SunsetAt — optional RFC 3339 datetime or 2006-01-02 date; empty means no sunset set. Fully backward compatible (omitempty).
  • GetSunsetDate(selector) (time.Time, bool, error) — returns the parsed date; ok is false when none is set.
  • IsSunset(selector) (bool, error) — reports whether the sunset date has passed as of now.
  • IsDeprecated is unchanged.

Data (selectors.yml, regenerated all_selectors.yml)

  • Backfilled sunset_at on 47 deprecated chains with dates sourced from official announcements / block explorers.
  • Marked 6 Goerli testnets (goerli-{arbitrum,base,linea,mantle,optimism,zksync}-1) as deprecated with Goerli's sunset date (2024-04-13).
  • All Holesky chains carry 2025-09-30 (Ethereum Holesky sunset), except holesky-fraxtal-1 (2025-10-17) and holesky-morph-1 (2025-10-21), which keep their own confirmed shutdown dates.

@github-actions

Copy link
Copy Markdown

👋 simsonraj, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

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 sunset_at timestamp to chain metadata so downstream consumers can distinguish “deprecated” from “actually offline,” and provides Go helpers (local + remote) to parse and evaluate that sunset date.

Changes:

  • Extends ChainDetails with optional SunsetAt (sunset_at in YAML).
  • Adds parsing/accessor helpers: ParseSunsetDate, GetSunsetDate, SunsetPassed, IsSunset (+ remote equivalents).
  • Backfills sunset_at for deprecated chains and adds tests to ensure all configured dates parse.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
types.go Adds SunsetAt to ChainDetails.
selectors.go Implements sunset parsing and “has sunset passed” helpers.
selectors_test.go Adds unit tests for parsing and sunset logic + validates all configured sunset_at values.
remote/remote.go Adds remote API equivalents for sunset helpers.
selectors.yml Backfills sunset_at values and deprecates remaining Goerli testnets per PR description.
all_selectors.yml Regenerated output including sunset_at fields.
test_extra_selectors.yml Adds an extra-selector fixture with a past sunset_at.
extra_selectors_test.go Extends E2E test to validate sunset_at propagation.
README.md Documents the new sunset helpers and explains “deprecation vs. sunset.”

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

Comment thread selectors.go Outdated
Comment thread README.md
Comment thread types.go Outdated
Comment thread extra_selectors_test.go Outdated
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