Skip to content

solver: resolve a contract call's inputs under the lock before the worker runs it - #31

Merged
EnzinoBB merged 1 commit into
masterfrom
fix/contract-worker-race
Oct 13, 2026
Merged

EnzinoBB merged 1 commit into
masterfrom
fix/contract-worker-race

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

execute_async hands the calls to a worker thread, and execute() then read
exe_queue and known_contracts (get_transaction, get_deploy_transaction, the
payable convention) without public_access_lock while the main thread could
change them, and wrote the plain bool executor_ready from both threads.

Resolve the starter transaction, the deploy transaction and the method
name convention in execute_async, which runs under the lock, and let
execute() use them; its synchronous callers already hold the lock and keep
resolving them there. executor_ready becomes atomic. The values are the
ones execute() looked up before, so results are unchanged.

Testing

  • Local: nodetests 138/138 with all phase-1 node fixes merged together.
  • Testnet run 38374856915, branch test/phase1-combined (all node fixes) with mixed executors (executor_ref=test/compatible-fixes): 17 of 17 contract calls returned the expected value across the restart test, Counter and Ledger states equal on all 7 nodes, state digests equal up to sequence 1100.

Compatible: no result of a valid contract call changes, so nodes can adopt it one by one.

🤖 Generated with Claude Code

…rker runs it

execute_async hands the calls to a worker thread, and execute() then read
exe_queue and known_contracts (get_transaction, get_deploy_transaction, the
payable convention) without public_access_lock while the main thread could
change them, and wrote the plain bool executor_ready from both threads.

Resolve the starter transaction, the deploy transaction and the method
name convention in execute_async, which runs under the lock, and let
execute() use them; its synchronous callers already hold the lock and keep
resolving them there. executor_ready becomes atomic. The values are the
ones execute() looked up before, so results are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB merged commit 2543b39 into master Oct 13, 2026
2 checks passed
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