Phase 1: Strategy D: epoch / indirection revocation #73
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erikinkinen/AES!73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "1-strategy-d-epoch-indirection-revocation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #33
Summary
This PR adds Strategy D (
epoch_indirection) for constant-time revocation viaedge-local epoch indirection.
Revocation no longer needs eager graph-wide deletion for this strategy:
RevokeCapbumps epochs on selected root edges, and enforcement is deferred toUseCapvia deterministic epoch-chain validation over delegation ancestry.This keeps replay deterministic, preserves event-log v3 compatibility, and maps
stale epoch denials to the existing
invalidatedreason.Scope
Included
CapabilityEdge:epochepoch_at_issueparent_epoch_at_issueEdgeStore:bump_epoch(EdgeId)with overflow guardDelegateCapcapturesparent_epoch_at_issue = parent.epochCreateCapinitializes epoch fields to zero/defaultReduceRightspreserves epoch metadataRevokerKind::EpochIndirectionepoch_indirection_revoker()RevocationEnforcementPolicy::LazyEpochRevokeCap(Strategy D) bumps epochs on normalized direct rootsUseCapperforms epoch-chain stale checks and denies withinvalidated--revoker epoch_indirectionrevokersupportsepoch_indirectionExplicitly excluded
v=3remains current)stale_epochreason)Behavioral contract (locked)
UseCapOutcomeReason::Invalidated.parent_epoch_at_issueisInvariantViolation.InvariantViolation.v=3with strategy-specificrevokermetadata.Design details
Epoch metadata model
epoch: current revocation epoch for the edge.epoch_at_issue: issuance baseline for the edge itself.parent_epoch_at_issue: parent epoch captured at delegation time.UseCap epoch-chain check
For a present, non-marker-invalidated edge:
edge.epoch != edge.epoch_at_issueparent_epoch_at_issuemissing: invariant failureparent.epoch != child.parent_epoch_at_issueRevokeCap (Strategy D)
sort+unique)EdgeStore::bump_epochremoved_edgesempty,edges_removed == 0Compatibility and replay
v0/v1/v2read/replay support unchanged.v3writer/reader now acceptsrevoker:"epoch_indirection".Verification
cmake --build _build --target aes_edge_store_tests aes_graph_validation_tests aes_snapshot_tests aes_apply_event_tests aes_engine_tests aes_revocation_strategy_tests aes_event_log_format_tests aes_event_log_reader_tests aes_event_log_replay_tests aes_cli_simulate_tests aesctest --test-dir _build --output-on-failure -R "aes_edge_store_tests|aes_graph_validation_tests|aes_snapshot_tests|aes_apply_event_tests|aes_engine_tests|aes_revocation_strategy_tests"ctest --test-dir _build --output-on-failure -R "aes_event_log_format_tests|aes_event_log_reader_tests|aes_event_log_replay_tests|aes_cli_simulate_tests|aes_revocation_oracle_tests|aes_invalid_event_determinism_tests"Review focus
CreateCap,DelegateCap,ReduceRights)UseCapepoch-chain logic and invariant/error boundariesbumponly, deferred denial)revokerparse/encode and replay determinism forepoch_indirection