Skip to content

Experimental: Bitmark Electrum stack (server + wallet) — run your own #148

Description

@melvincarvalho

Summary

The Bitmark Electrum stack now works end-to-end (experimental): an ElectrumX server that indexes the chain off bitmarkd, and the Electrum-Bitmark 4.7.2 light wallet that connects to it over TLS and shows BTMK balances/history. This issue is a guide to running your own — so anyone can host light-wallet infrastructure for Bitmark, no central server required.

What it is

  • electrumx-bitmark (server) — reads blocks from a synced bitmarkd via RPC, builds an address index, speaks the Electrum protocol.
  • electrum-bitmark (wallet) — a light SPV-style client; users run only this and point it at any server.

Run your own server

Prereqs: a synced bitmarkd with txindex=1, server=1, RPC enabled (rpcuser/rpcpassword, rpcallowip=127.0.0.1); plus build-essential + libleveldb-dev.

git clone https://github.com/project-bitmark/electrumx-bitmark
cd electrumx-bitmark
python3 -m venv venv && ./venv/bin/pip install -e . plyvel python-rapidjson

Config (env file):

export COIN=Bitmark
export NET=mainnet
export DB_DIRECTORY=/path/to/electrumx-db
export DAEMON_URL=http://rpcuser:rpcpass@127.0.0.1:9266/
export SERVICES=tcp://127.0.0.1:50001,rpc://127.0.0.1:8001
export DB_ENGINE=leveldb

Run it (first start indexes the whole chain — give it time):

source your.env && ./venv/bin/python ./electrumx_server

For remote/SSL access (optional, recommended): terminate TLS in front with haproxy/nginx on port 50002 to backend 127.0.0.1:50001, using a Let's Encrypt cert. (haproxy must be mode tcp with long timeouts so wallet subscriptions don't drop.)

Connect the wallet

  1. Build/run Electrum-Bitmarkhttps://github.com/project-bitmark/electrum-bitmark
  2. Tools -> Network -> your server, port 50001 (TCP) or 50002 (SSL)
  3. It syncs and shows your BTMK balance.

Status: experimental — important

  • This is early/testbed software — run it, test it, report issues.
  • Use legacy b... addresses only. Bitmark is pre-SegWit — do not use btm1... (SegWit) addresses; they are unsafe on a non-SegWit chain. (Known wallet issue: it should not offer SegWit — legacy-only fix planned.)

What's next

  • Wallet: disable SegWit (legacy-only), peer discovery.
  • Server: packaged setup, a fast-bootstrap (signed chainstate snapshot) so you don't index from genesis.
  • A community server list (so wallets can auto-discover independently-run servers).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions