Skip to content

✨ Add PruneExpiredCredentials execute message #827

Description

@ccamel

Context

Credentials whose VC validity interval has ended no longer need to remain in the authority active credential set.

The contract should provide a bounded pruning operation to remove expired credentials.

Expected behavior

Add a PruneExpiredCredentials execute message.

PruneExpiredCredentials {
    limit: Option<u32>,
}

Only the app authority is allowed to call this message.

The message must remove credentials whose valid_until is present and lower than or equal to the current block time.

Credentials without valid_until must not be pruned.

The operation must be bounded by limit.

Events

The execution must emit an event containing:

action = "prune_expired_credentials"
pruned_count

Each pruned credential should also be emitted with its identifier if practical.

Notes

After pruning, removed credentials must no longer be returned by Credential or Credentials.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions