Create logger.py for centralized logging utility
Title feat(specs): clarify and implement idempotent retry semantics for /verify and /settle endpoints
Overview This PR addresses Issue #452 by explicating and codifying the idempotent retry behavior for the /verify and /settle endpoints within both the protocol specifications and reference implementation. Additionally, it adds clear documentation notes and backend logic to ensure repeated requests with the same payload do not produce duplicate transactions or side effects.
Changes *Updated protocol documentation (specs/rest.md, etc.) to define idempotent retry rules for /verify and /settle: For repeated requests with the same Payment Payload and Payment Requirements, the endpoint produces an identical response and does not register new effects.
*In the TypeScript example server: Enhanced /verify and /settle handlers to check for duplicate requests and respond with previous results, preventing reprocessing. Example usage of an “idempotency key” shown via a simple in-memory/store cache for repeat protection.
*Added unit tests: verified that repeated requests return the same result and do not repeat side effects. Extended documentation with a best practices section on idempotent retries for client/service implementers.
Testing All new and existing tests have passed in local Node.js environment.
Retried requests (due to client disconnect or timeout) result in a single processed action with the same response.
Risk Changes are backwards-compatible and do not affect existing functionality, but make the flow more robust. Tests show no unexpected side effects.
Additional Information References discussion: #452 Major logic changes are in isolated commits for easy review.
🟡 Heimdall Review Status
| Requirement | Status | More Info | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reviews |
🟡
0/1
|
Denominator calculation
|
@jessedydx is attempting to deploy a commit to the Coinbase Team on Vercel.
A member of the Team first needs to authorize it.