Repository navigation
fix(core): retry lost custody declarations, bind handoff acks to incarnation, and key inbox by full tx identity (#1202) - #1239
Conversation
…o custody incarnation, and key inbox consumption by full tx identity (#1202)
|
Reviewed commit: Verdict: one confirmed P2 finding needs correction. [P2] Bound custody-incarnation metadata across key eviction. The unconditional insertion in Reproduction: a review-only regression, Other reviewed dimensions:
Validation: 24 existing tests passed: 11 in Integration: a trial merge with #1248 conflicts in |
Summary
Closes #1202 (including consolidated #1207 and #1208).
PeerRing::relay_custody_declaredtoMutex<BTreeMap<Did, uuid::Uuid>>, recording(peer, tx_id)beforeegress.send_payloadindeclare_opened_relay_custody.tx_id) wheneverenqueue_detachedyieldsOk(None)orenqueued.await_admissionresolves toCancelledorErr(_), ensuring subsequent stabilization rounds retry lost declarations.StorageCustodyIncarnationtracking (generation+handoff_observed) onPeerRingand local custody incarnation metadata onPlacedEntryandSyncedEntryAck.remove_storage_entry_confirmed_bydeletes only whenstorage_custody_incarnation(key) == ack.custody_incarnation(), preventing delayed/ABA handoff ACKs from deleting re-acquired custody state.RelayTransactionId { stream: StreamKey, sequence: u64, digest: TransactionDigest }and updatesRelayInFlight,InboxElement::relay_id, andSwarmInboxDeliveryto track consumption by complete signed transaction identity rather than baretx_id: Uuid.Test Plan
cargo test -p rings-core --features dummy --lib -- dht::storage dht::stabilization message::handlers::storage swarm::application tests::default::test_inbox tests::default::test_dht_stateright(238 passed)cargo check --tests -p rings-core