Skip to content

[PoI] : Persist authenticated committee history in the PoI CLI #332

Description

@itsyaasir

Problem

The poi verify command currently constructs committee resolution with a fresh in-memory cache. Every invocation therefore repeats the authenticated committee walk from genesis to the proof epoch, and any committees authenticated before a transient failure are discarded when the process exits.

Proposed scope

  • Provide a file-backed CommitteeCache adapter that can be reused by the CLI and the advanced committee-cache example.
  • Store committee entries under the IOTA configuration directory, for example poi/committee-cache/<chain-identifier>/epoch-<epoch>.bcs.
  • Preserve the complete CommitteeCacheKey, including the trusted genesis ChainIdentifier and epoch.
  • Write authenticated committees atomically and never overwrite a conflicting entry.
  • Configure poi verify with CommitteeResolution::from_genesis_with_cache for both managed-network and explicit-genesis verification.
  • Document the cache location and that deleting it is safe but makes the next verification slower.

Acceptance criteria

  • A later CLI invocation reuses committees authenticated by an earlier invocation.
  • Mainnet, testnet, devnet, and custom genesis files cannot collide in one backend.
  • A failed or interrupted walk preserves committees stored before the failure.
  • Malformed or conflicting cache entries fail closed with a useful error.
  • No new CLI flag is required for the default behavior.

Out of scope

  • Concurrent epoch-summary prefetching for the first cold walk.
  • Network retry or backoff policy.
  • Genesis download pinning and validation tracked by H2.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions