We Tested Our Own x402 Agent Payments With Real Money — Found a Bug, Fixed It, Here’s the Proof
说明与用途
x402支付网关在Base主网的AI代理支付过程中因OFAC制裁缓存过期导致5 MB下载,导致支付超时。通过将下载移出支付路径、设置每小时缓存刷新以及将授权窗口扩大到600秒,所有GPU订单均能在秒级完成。
问题
The x402 payment endpoint failed for some GPU jobs due to a stale OFAC sanctions-list cache causing a 5 MB Treasury re‑download that exceeded the 120‑second authorization window.
结果
All eight GPU jobs settled with on‑chain hashes; two previously failing jobs now complete in 18.8 s. The payment path no longer stalls due to cache refresh.
工作流
- 1. Submit GPU job request to public x402 endpoint.
- 2. Endpoint issues 402 Payment Required challenge.
- 3. Agent signs authorization and sends payment request.
- 4. System checks OFAC cache; previously triggered a 5 MB download.
- 5. Payment processed and on‑chain transaction confirmed.
- 6. Job executed and resources torn down.
证据
2 of 8 jobs failed on a 120‑second payment authorization window.
Root cause wasn’t price lookup or payment logic — it was our OFAC sanctions‑list cache going stale, triggering a live 5MB Treasury re‑download on every payment with no timeout.
Re‑ran the exact failing config: settled in 18.8 seconds.
- 记录日期: 2026-09-22T14:15:39.403Z