feat: add sunsetAt datetime for chains - #201
Open
simsonraj wants to merge 2 commits into
Open
Conversation
product-security-plaid-production
Bot
requested review from
Unheilbar and
flodesi
July 10, 2026 16:27
|
👋 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! |
There was a problem hiding this comment.
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
ChainDetailswith optionalSunsetAt(sunset_atin YAML). - Adds parsing/accessor helpers:
ParseSunsetDate,GetSunsetDate,SunsetPassed,IsSunset(+ remote equivalents). - Backfills
sunset_atfor 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.
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.
Add sunset dates for deprecated chains
Summary
sunset_atfield to track when a chain went (or will go) offline, and backfills it for deprecated chains using researched shutdown dates.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.IsDeprecatedis unchanged.Data (selectors.yml, regenerated all_selectors.yml)