Skip to content

fix: overlay broadcaster#302

Closed
pawellewandowski98 wants to merge 3 commits intomasterfrom
fix-overlay-broadcaster
Closed

fix: overlay broadcaster#302
pawellewandowski98 wants to merge 3 commits intomasterfrom
fix-overlay-broadcaster

Conversation

@pawellewandowski98
Copy link
Collaborator

Description of Changes

This PR improves the resiliency of the Overlay Service host discovery process in the go-sdk. It aligns the default SLAP tracker configuration and query timeouts with the @bsv/sdk (TypeScript) implementation.

Fixes:

  • Distinction between RequireAckAll and RequireNone (based on TS version and empty topic array)
  • Improved the broadcast flow to strictly separate successful responses from errors before processing admittance. Previously, error responses could trigger admittance checks, now we only evaluate result from hosts that returned a 200 OK.
  • Increased default SHIP query timeout, before at 1 second there was no successful response (only error="context deadline exceeded"), 5s allows to get at least one success response
  • Added the three BSVA cluster SLAP trackers (overlay-us-1.bsvb.tech, etc.) as defaults. This moves away from a single point of failure and matches the redundancy provided in the TS SDK.

Testing Procedure

This issues was found when working on go-uhrp-storage-server

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
overlay/topic/broadcaster.go 0.00% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link

shruggr added a commit to b-open-io/go-sdk that referenced this pull request Mar 12, 2026
shruggr added a commit that referenced this pull request Mar 12, 2026
* Fix ComputeMissingHashes not handling odd node counts at intermediate levels

When a Merkle tree level has an odd number of nodes, Bitcoin duplicates
the last node to form a pair. ComputeMissingHashes only handled this at
level 0 via explicit Duplicate markers but never propagated them to
higher levels. This caused incomplete proofs when building full trees
from transaction hashes (e.g. in Arcade), leaving the top-level sibling
missing and causing "Missing hash for index N at height M" errors on
the client side during BEEF verification.

* update changelog for v1.2.19

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* Include dependabot updates: x/crypto, x/net, x/sync, upload-artifact

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* Update CI Go version from 1.24 to 1.25 to match go.mod

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* Bump golangci-lint from v2.1.6 to v2.11.2 for Go 1.25 compat

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: distinction between RequireAckAll and RequireNone

* chore: update default SLAP trackers

* chore: increase default SHIP timeout

* Include overlay broadcaster fixes in v1.2.19 changelog (#302)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Paweł Lewandowski <[email protected]>
@shruggr
Copy link
Collaborator

shruggr commented Mar 12, 2026

Included in v1.2.19 release via #298 (squash merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants