Skip to content

Extend get_account_next_index logic#273

Merged
ibraheem-abe merged 4 commits intostagingfrom
feat/roman/extend-get_account_next_index-logic
Feb 24, 2026
Merged

Extend get_account_next_index logic#273
ibraheem-abe merged 4 commits intostagingfrom
feat/roman/extend-get_account_next_index-logic

Conversation

@basfroman
Copy link
Contributor

@basfroman basfroman commented Feb 24, 2026

get_account_next_index (via account_nextIndex) is mempool-aware, unlike get_account_nonce.
This PR adds use_cache: bool = True to async get_account_next_index, allowing callers to fetch a fresh nonce directly from the node and bypass the process-local _nonces cache if it passed with False.

This is needed for flows with an external nonce allocator (like relay endpoint + memcached), to avoid desync between memcached and local _nonces, which can cause future/stale nonce errors and 500s on /api/relay/submit.

Note:

Tests fail not bc of PR

@basfroman basfroman requested a review from a team February 24, 2026 06:04
@basfroman basfroman self-assigned this Feb 24, 2026
@basfroman basfroman changed the base branch from master to staging February 24, 2026 06:04
@github-actions github-actions bot added run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests. labels Feb 24, 2026
@ibraheem-abe ibraheem-abe merged commit 0a5e8b1 into staging Feb 24, 2026
67 checks passed
@ibraheem-abe ibraheem-abe deleted the feat/roman/extend-get_account_next_index-logic branch February 24, 2026 21:27
@ibraheem-abe ibraheem-abe mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants