Skip to content

feat(wasm-sdk): add broadcast_with_delay helper to mitigate DAPI race…#21

Draft
thephez wants to merge 3 commits into
v2.1-devfrom
wasm-sdk-feat-minimize-st-delay
Draft

feat(wasm-sdk): add broadcast_with_delay helper to mitigate DAPI race…#21
thephez wants to merge 3 commits into
v2.1-devfrom
wasm-sdk-feat-minimize-st-delay

Conversation

@thephez
Copy link
Copy Markdown
Owner

@thephez thephez commented Sep 4, 2025

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:

image

To < 5 min (due to 2 tests still taking full time):
image

.unwrap()
.set_timeout_with_callback_and_timeout_and_arguments_0(
closure.as_ref().unchecked_ref(),
2000, // 2 seconds
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

In my experience, 2 seconds was the minimum reliable time from my network.

thephez and others added 3 commits September 15, 2025 09:44
… 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>
@thephez thephez force-pushed the wasm-sdk-feat-minimize-st-delay branch from daaa223 to ceb7c17 Compare September 15, 2025 14:24
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