Skip to content

Port LBRY SDK 0.113.0 daemon behavior to Go#3

Open
kodxana wants to merge 1 commit into
LBRYFoundation:masterfrom
kodxana:master
Open

Port LBRY SDK 0.113.0 daemon behavior to Go#3
kodxana wants to merge 1 commit into
LBRYFoundation:masterfrom
kodxana:master

Conversation

@kodxana

@kodxana kodxana commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR expands the initial Go daemon into a substantially compatible port of
Python LBRY SDK 0.113.0.

Major changes

  • Implement the legacy lbrynet CLI and daemon startup contract.
  • Preserve the complete active JSON-RPC and command signature surface.
  • Add supervised component startup, shutdown, readiness, and status reporting.
  • Implement wallet files, accounts, address management, BIP32 keys, channel
    keys, transaction construction, signing, balancing, and broadcasting.
  • Implement SPV networking, header synchronization, checkpoints, address
    subscriptions, reconnect handling, and SQLite-backed ledger state.
  • Add claim, channel, stream, repost, collection, support, purchase, TXO,
    transaction, wallet, account, and file-management RPC behavior.
  • Implement revision-15 daemon database migrations and managed-stream storage.
  • Add persistent blob storage, encrypted stream assembly, HTTP range streaming,
    DHT discovery, peer transfer, tracker announcements, and reflector uploads.
  • Add immediate reflection for newly published and downloaded streams, with
    periodic retry coverage.
  • Add resource limits and validation for network responses, descriptors, blobs,
    JSON-RPC frames, and reflector traffic.
  • Add Desktop-compatible Linux, macOS, and Windows packaging.
  • Add differential compatibility tests against pinned Python SDK commit
    e7666f489418e96b6d2104974e93915b539235c5.
  • Add CI setup for the pinned Python oracle and cross-platform daemon archives.

Compatibility testing

The Go implementation is compared against the pinned Python SDK for CLI,
configuration, wallet, database, SPV, transaction, claim, RPC, streaming, and
protocol behavior.

An unmodified Linux lbry-desktop checkout was tested by replacing only its
daemon executable. The following workflows were exercised:

  • Existing wallet loading and full SPV synchronization
  • Balance and transaction updates
  • Stream resolution, blob download, and video playback
  • Tips, boosts, and transaction abandonment
  • Channel creation and updates
  • Stream publishing with channel signatures and thumbnails
  • Automatic reflector upload
  • Normal Desktop-controlled daemon shutdown

Known limitations

  • BitTorrent infohash source management and downloading are not implemented.
    The native torrent component currently owns the expected TCP and UDP ports.
  • Automatic payment of non-zero wallet-server fees remains incomplete.
  • Legacy wallet files are supported, but old address databases are rebuilt by
    synchronization rather than migrated directly.
  • Persisted DHT peer loading and proactive full-bucket replacement remain.
  • Public Python StreamController event APIs remain to be implemented.
  • Some Windows-specific wallet path semantics still require parity work.
  • A small number of malformed-input edge cases intentionally return safer Go
    errors instead of reproducing Python crashes or invalid behavior.

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