thirdweb-dev / engine

The most powerful backend engine for web3 apps.
https://thirdweb.com/engine
Apache License 2.0
152 stars 59 forks source link

Updates: v2 Nonce #597

Closed farhanW3 closed 3 months ago

farhanW3 commented 3 months ago

Added nonceResyncQueue & nonceResyncWorker.

New flows:

with this we catch all missing nonce


PR-Codex overview

This PR focuses on implementing a NonceResyncWorker to periodically resync nonces for wallets, improving nonce management in the system.

Detailed summary

The following files were skipped due to too many changes: src/worker/tasks/nonceResyncWorker.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

d4mr commented 3 months ago

~added a comment, also it would be good to convert recycledNonces to a set. Because there is another source now where we push to recycledNonces, and we do this non-atomically, having it be a set would be useful.~

done