Add a paginated read view enumerating only the currently revoked attestation digests
Description
The append-log exposes get_attestation_append_log, get_attestation_digest_at, and is_attestation_revoked. To list which digests are currently revoked, an integrator must read the whole log, then probe is_attestation_revoked for every index — O(N) round-trips and no way to page. There is a paginated view of revoked indices already, but none returning the digests themselves in revoked state.
This issue adds get_revoked_attestation_digests(start, limit) -> Vec<AttestationDigestInfo> that pages over the log and returns only entries whose index is currently revoked, so an auditor can fetch revoked digests directly.
Requirements and context
- Repository scope: Liquifact/Liquifact-contracts only.
- Add
get_revoked_attestation_digests(start: u32, limit: u32) -> Vec<AttestationDigestInfo> reusing the same AttestationDigestInfo shape returned by get_attestation_digest_at.
- Page over the append-log honoring
start/limit, and skip indices that are not currently revoked (respecting any prior unrevoke_attestation_digest).
- Bound
limit with the existing pagination ceiling; return an empty Vec past the end rather than panicking.
- Pure read-only: no auth, no writes, no TTL bump.
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/contracts-revoked-digests-view
- Implement changes
- Write code in:
escrow/src/lib.rs — get_revoked_attestation_digests.
- Write comprehensive tests in:
escrow/src/tests/attestations.rs — assert only revoked entries appear, pagination boundaries, exclusion of un-revoked entries, empty result past the end, and the over-cap guard.
- Add documentation: extend the attestation docs and integrator view-surface reference.
- Include NatSpec-style doc comments (
///) on the new view.
- Validate security assumptions: bounded reads, no mutation, correct interaction with un-revoke.
- Test and commit
Test and commit
- Run
cargo fmt --all -- --check, cargo build, and cargo test.
- Cover edge cases and failure paths: no revocations, mixed revoked/un-revoked, page past end, limit above the cap.
- Include the full
cargo test output and a short security notes section in the PR description.
Example commit message
feat: add paginated revoked-attestation-digests read view with boundary tests
Guidelines
- Minimum 95 percent test coverage for impacted modules.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the Liquifact community on Discord for questions, reviews, and faster merges: https://discord.gg/JrGPH4V3
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Add a paginated read view enumerating only the currently revoked attestation digests
Description
The append-log exposes
get_attestation_append_log,get_attestation_digest_at, andis_attestation_revoked. To list which digests are currently revoked, an integrator must read the whole log, then probeis_attestation_revokedfor every index — O(N) round-trips and no way to page. There is a paginated view of revoked indices already, but none returning the digests themselves in revoked state.This issue adds
get_revoked_attestation_digests(start, limit) -> Vec<AttestationDigestInfo>that pages over the log and returns only entries whose index is currently revoked, so an auditor can fetch revoked digests directly.Requirements and context
get_revoked_attestation_digests(start: u32, limit: u32) -> Vec<AttestationDigestInfo>reusing the sameAttestationDigestInfoshape returned byget_attestation_digest_at.start/limit, and skip indices that are not currently revoked (respecting any priorunrevoke_attestation_digest).limitwith the existing pagination ceiling; return an emptyVecpast the end rather than panicking.Suggested execution
git checkout -b feature/contracts-revoked-digests-viewescrow/src/lib.rs—get_revoked_attestation_digests.escrow/src/tests/attestations.rs— assert only revoked entries appear, pagination boundaries, exclusion of un-revoked entries, empty result past the end, and the over-cap guard.///) on the new view.Test and commit
cargo fmt --all -- --check,cargo build, andcargo test.cargo testoutput and a short security notes section in the PR description.Example commit message
feat: add paginated revoked-attestation-digests read view with boundary testsGuidelines
Community & contribution rewards