Open linden opened 6 months ago
@linden, remember to re-request review from reviewers when ready
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
!lightninglabs-deploy mute
This PR adds support for the browser using indexeddb as a storage backend for
headerfs
instead of the file system.Why IndexedDB?
I'd initially chosen to go with localStorage for simplicity but due to recent rate limiting changes it made syncing past a couple 100 blocks freeze, indexddb does not have share these limitations. I'd also looked into emulating the file system but it turned out to add a lot of complexity with a performance loss over just using indexeddb directly.
Browser Testing.
Since Go only provides an executor for your native platform testing needs to be done via a custom executor targeting the browser. I've written my own called
wasmexec
which also provides file system access for ease of testing, you can run tests via the following:I'm planning on provider this as part of a Github Action in the future.
btcd
Changes.Running this in the browser without
wasmexec
's file system access requires a couple of changes tobtcd
'saddrmgr
&btcutil
as they require a file system. Changes made in https://github.com/btcsuite/btcd/pull/2124.