Menu

Post image 1
Post image 2
1 / 2
0

I Thought I'd Just Call a Blockchain API. It Didn't Work Out That Way.

DEV Community·Pavel Goldin·about 1 month ago
#sB1XbBR7
#celery#webdev#backend#event_id#conn#amount
Reading 0:00
15s threshold

I walked into a crypto project thinking I'd just pull data from a blockchain API. That's not how it went. I join the project. Stack: FastAPI, PostgreSQL, Redis as Celery broker, Celery workers, Docker, Web3. Startup on a hype wave, real money, architecture built on the fly. I look at the payment processing architecture and my first thought: guys, are you serious? Financial operations with real money, zero idempotency, Redis as broker with no persistence, Web3.py synchronous calls inside Celery tasks. The conversation was short: here's the task, fix what's there. Deadlines were burning. What Was Broken First month of prod. A user writes to support: credited twice, withdrew double. I open the logs, clean. Two identical events, both 200, four seconds apart. Both processed. The user got double the balance. Daily reconciliation with on-chain data showed a discrepancy: several accounts with a balance higher than confirmed transactions should allow.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More