Skip to content

Scope reference receipts by operation, pool, and actor - #213

Merged
Obiajulu-gif merged 2 commits into
Chainmove:mainfrom
akintewe:fix/issue-181-scoped-reference-keys
Aug 19, 2026
Merged

Scope reference receipts by operation, pool, and actor#213
Obiajulu-gif merged 2 commits into
Chainmove:mainfrom
akintewe:fix/issue-181-scoped-reference-keys

Conversation

@akintewe

@akintewe akintewe commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • DataKey::Reference(String) keyed idempotency receipts globally by the raw external reference alone, so an unrelated user could submit a predictable reference on another pool/operation/actor first and cause a legitimate, unrelated request to fail as a duplicate.
  • Idempotency keys are now derived from a domain/version tag, the operation kind, the pool ID, and the participant address, then hashed to a fixed-size BytesN<32> digest (DataKey::ScopedReference) to bound storage cost regardless of reference length.
  • Receipts written under the old global key are still honored for exact-scope replays (backward compatibility), but that key is never written to going forward.
  • A duplicate call within the same scope with matching parameters remains idempotent; a matching reference with conflicting parameters is still rejected as DuplicateReference.
  • README updated to document the new key scoping and legacy compatibility behavior.

Test plan

  • Cross-pool, cross-operation, cross-actor reference reuse no longer errors
  • Exact-retry within the same scope stays idempotent
  • Conflicting-parameter retry within the same scope is rejected
  • Legacy global receipts still resolve as idempotent replays for their original scope

closes #181

Reference receipts were keyed globally by the raw external reference
string, so an unrelated user could submit a predictable reference on
another pool/operation first and cause a legitimate request on a
different scope to be rejected as a duplicate.
Explain how reference receipts are now scoped/hashed and how legacy
unscoped receipts remain readable for backward compatibility.
@Obiajulu-gif
Obiajulu-gif merged commit d3d1837 into Chainmove:main Aug 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SECURITY][IDEMPOTENCY] Scope contract references by operation, pool, and actor to prevent cross-pool preemption

2 participants