Skip to content

lazy nonce locks#162

Open
mihaimarcu2004 wants to merge 4 commits into
mainfrom
devin/1783330083-lazy-nonce-locks
Open

lazy nonce locks#162
mihaimarcu2004 wants to merge 4 commits into
mainfrom
devin/1783330083-lazy-nonce-locks

Conversation

@mihaimarcu2004

Copy link
Copy Markdown
Contributor

No description provided.

devin-ai-integration Bot and others added 4 commits July 6, 2026 09:34
- SignerClient construction no longer performs network I/O; nonces are
  fetched lazily on first use per api key (async path uses the generated
  TransactionApi instead of blocking requests)
- process_api_key_and_nonce holds a per-api-key asyncio.Lock across nonce
  assignment and send, so concurrent orders on one key arrive in nonce
  order while different keys send in parallel
- explicit nonce/api_key_index callers bypass the nonce manager entirely
- remove unused get_api_key_nonce
- add unit tests covering lazy fetch, rotation, ordering under
  asyncio.gather, per-key parallelism, failure/invalid-nonce recovery

Co-Authored-By: mihai <mihai2004marcu@gmail.com>
- extract arg binding into extract_tx_args
- name the explicit-nonce and rejected-tx conditions
- module-level DEFAULT_NONCE / DEFAULT_API_KEY_INDEX constants
- docstring describing the locking/ordering behavior

Co-Authored-By: mihai <mihai2004marcu@gmail.com>
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.

1 participant