romanz / romanz/electrs

Feature: decouple index DB from specific RPC implementation

Open
#554 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Rust
Stars
1.4k
Forks
561
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Today, electrs only supports JSONRPC, so adding more RPC implementations is tricky (e.g. https://github.com/romanz/electrs/issues/257).

Describe the solution you'd like
We should probably decouple all index build/query code into a separate library crate, allowing composing it with specific RPC protocols.

Describe alternatives you've considered
Using cargo features (similar to how BWT allows both Electrum RPC and HTTP API).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing index build/query code and the JSONRPC implementation to identify the coupling described in the issue. Compare the proposed separate library-crate approach with the cargo-features alternative and the BWT example. Done means index functionality can be composed with multiple RPC protocols without depending on one specific implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.