Skip to content

test: handle transaction nonces locally - #1769

Merged
gilcu3 merged 3 commits into
mainfrom
1606-flaky-pytests-since-nearcore-210-2
Jan 16, 2026
Merged

gilcu3 merged 3 commits into
mainfrom
1606-flaky-pytests-since-nearcore-210-2

Conversation

@gilcu3

@gilcu3 gilcu3 commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Closes #1606 (again)

@gilcu3 gilcu3 linked an issue Jan 15, 2026 that may be closed by this pull request
@gilcu3
gilcu3 force-pushed the 1606-flaky-pytests-since-nearcore-210-2 branch 2 times, most recently from 42f52bf to ee441d9 Compare January 15, 2026 13:34
Comment on lines 496 to 498
nonce = cluster.contract_node.near_node.get_nonce_for_pk(
candidate_account_id, creator_key.pk
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only remaining place where we do not manage the nonce. The reason is a bit complicated to explain, but basically is related to the dance we do here to create accounts and access_keys. Given that we are anyway moving away from pytests, I did not want to spend too much time refactoring that. The bug we were hitting should not re-appear here, so it should be fine.

@gilcu3
gilcu3 force-pushed the 1606-flaky-pytests-since-nearcore-210-2 branch from ee441d9 to 1aea542 Compare January 15, 2026 13:38

@DSharifi DSharifi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up.

Blocker:

  • Can you just change the complex list comprehension to a simple for loop?

DSharifi
DSharifi previously approved these changes Jan 15, 2026

@DSharifi DSharifi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing.

Approved with a suggestion

@gilcu3
gilcu3 enabled auto-merge January 15, 2026 16:30

@kevindeforth kevindeforth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@gilcu3
gilcu3 added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit ddb3cd6 Jan 16, 2026
16 checks passed
@gilcu3
gilcu3 deleted the 1606-flaky-pytests-since-nearcore-210-2 branch January 16, 2026 08:43
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.

flaky pytests since nearcore 2.10

3 participants