Replace bitcoin electrs/esplora with fulcrum + mempool stack#257
Open
Kukks wants to merge 2 commits into
Open
Conversation
Drops the legacy `electrs` (bitcoin) and `esplora` (bitcoin) services in favour of: - `fulcrum` for the modern Electrum protocol (TCP + WebSocket) - `mempool-api` + `mempool-mariadb` for the esplora-compatible REST API - `mempool-web` for the block explorer UI - `esplora-relay` (nginx) that rewrites unprefixed paths to /api/* so `chopsticks` (and arkd, via ARKD_ESPLORA_URL) keep talking to an esplora-shaped surface unchanged Liquid stack (electrs-liquid, esplora-liquid, chopsticks-liquid) is untouched. Legacy host ports preserved for backward compatibility: 30000 (HTTP esplora -> nginx relay) and 50000 (Electrum TCP -> fulcrum).
8 tasks
fulcrum publishes Electrum on both TCP (50000) and WebSocket (50003). GetEndpoints auto-derives the first port mapping only, so the WS URL was previously invisible. Add an explicit "fulcrum (ws): ws://..." line alongside the TCP one so browser/JS Electrum clients know which URL to use.
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.
Summary
Drops the legacy bitcoin-side
electrsandesploraservices in favour offulcrum(modern Electrum protocol) and themempoolstack (esplora-compatible REST + UI). The Liquid services (electrs-liquid,esplora-liquid,chopsticks-liquid) are deliberately left untouched.Architecture
Why the nginx relay
chopsticksreverse-proxies its--electrs-addrverbatim with no path manipulation (verified by readingnigiri-chopsticks/router/electrs_handler.go). Mempool serves esplora-compat endpoints under/api/*while electrs served them at the root. Theesplora-relay(nginx) sits between chopsticks and mempool-api, prepending/apiso:nigiri faucet/mint/pushCLI commands keep workingARKD_ESPLORA_URL: http://chopsticks:3000keeps working with no env-var changePort mapping (legacy host ports preserved)
30000electrs HTTP esploraesplora-relay(nginx) → mempool-api50000electrs Electrum TCPfulcrumElectrum TCP5000esplora UImempool-webUINew ports added:
50003(fulcrum WS),8999(mempool-api).Files touched
cmd/nigiri/resources/docker-compose.yml— service swapcmd/nigiri/resources/esplora-relay.conf— new nginx config (path rewrite to/api/*)cmd/nigiri/main.go— embed + provision the new resource and per-service volume dirscmd/nigiri/start.go— bitcoin explorer service list (CI / non-CI)internal/docker/mock_client.go— updated mock endpoints/portstest/start_stop_test.go— updated fixtures and expected service listsTest plan
go build ./...go vet ./...go test ./test/... -run 'TestDataDirSetup|TestBasicStartStop|TestServiceCombinations|TestStateManagement'— all greendocker compose -f cmd/nigiri/resources/docker-compose.yml config --quiet— validnigiri startboots the new stack;nigiri faucet <addr>works (chopsticks → relay → mempool-api round-trip)nigiri start --liquid— liquid stack untouched, still worksnigiri start --ark— arkd's ESPLORA_URL still resolves; wallet creation/funding flow worksnigiri start --ci— headless explorer stack starts (nomempool-web)Notes / follow-ups
nigiri forgetbefore upgrade so the newdocker-compose.ymland theesplora-relay/default.confresource are re-provisioned.BACKEND_MAINNET_HTTP_HOST=mempool-api— the UI will label things as mainnet but talk to the regtest backend. We can revisit this if a regtest-native UX is needed.STATISTICS_ENABLEDandLIGHTNING_ENABLEDare both set tofalseto keep the regtest stack lean; toggle if needed.