feat(wasm-sdk): add broadcast_with_delay helper to mitigate DAPI race…#21
Draft
thephez wants to merge 3 commits into
Draft
feat(wasm-sdk): add broadcast_with_delay helper to mitigate DAPI race…#21thephez wants to merge 3 commits into
thephez wants to merge 3 commits into
Conversation
thephez
commented
Sep 4, 2025
| .unwrap() | ||
| .set_timeout_with_callback_and_timeout_and_arguments_0( | ||
| closure.as_ref().unchecked_ref(), | ||
| 2000, // 2 seconds |
Owner
Author
There was a problem hiding this comment.
In my experience, 2 seconds was the minimum reliable time from my network.
… condition Adds a helper method that broadcasts state transitions with a 2-second delay before waiting for results, preventing the race condition where waitForStateTransitionResult may be called before the transaction propagates through DAPI nodes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
daaa223 to
ceb7c17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses custom function with built-in delay instead of
broadcast_and_wait, to get quicker response (i.e. don't wait for full 80 second timeout every time).Changes test time from ~25 min:
To < 5 min (due to 2 tests still taking full time):
