Skip to content

fix retain, replace by filter#68

Merged
lightsing merged 3 commits intodev/m2from
fix/retain
Mar 20, 2026
Merged

fix retain, replace by filter#68
lightsing merged 3 commits intodev/m2from
fix/retain

Conversation

@lightsing
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the previous in-place “retain/purge” approach with a “filter-to-new” approach for removing pending attestations, updating the core timestamp API plus SDK/CLI purge flows accordingly.

Changes:

  • Core: replace retain_attestations*-style logic with a new filter_attestations that returns a modified copy, and update purge_pending to return a filtered Timestamp.
  • SDK: rework pending purge into filter_pending* APIs that return a new DetachedTimestamp plus a list of purged URIs.
  • CLI: update the purge command to use the new SDK filtering API and write a new proof to disk.

Reviewed changes

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

File Description
packages/sdk-rs/src/purge.rs Introduces filter_pending* returning a new timestamp + purged URI list.
crates/core/src/codec/v1/timestamp.rs Adds filter_attestations (copy-based filtering) and updates pending-related iteration/APIs.
crates/core/src/codec/v1/digest.rs Makes DigestHeader Copy.
crates/cli/src/commands/purge.rs Switches CLI purge implementation to the new filter-based approach.

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

@lightsing lightsing merged commit 91ef293 into dev/m2 Mar 20, 2026
2 checks passed
@lightsing lightsing deleted the fix/retain branch March 20, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants