romanz / romanz/electrs

Conditional broadcast

Open
#397 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.

I want to upgrade my cold storage (or try out a new wallet) but I want to pay the least amount of money for it. However the mempool is often very full, so I have to wait and watch it like a hawk and then make sure I am close to my computer with the signed tx ready to go when the time comes.

Describe the solution you'd like
Have electrs have a restful API that I can curl or some CLI option to broadcast a tx when the mempool is small enough or at a certain time (sunday night US time). I can then make either a very simple app

Describe alternatives you've considered
I have a short bash script that uses tor to broadcast a tx to a blockexplorer on the condition, it works but I think this functionality is useful enough to have in this program (which is used by lots of users personally).

Ideally this would be done at the wallet level but with good wallets it's easy enough to export the transaction. Also wallets can't always access the network, what if the laptop goes to sleep overnight? It's very convenient to have this on the node itself.

Additional context

I run electrs personally and so does everyone that runs the node helpers which is now quite a few people. If this functionality were added then I am also sure that wallet devs would be happy to include it.

It seems so trivial but I do think it would be greatly appreciated. Not sure if it can be done simply of if the whole program needs to be reworked to extend the existing functionality.

I would be happy to try to implement this (I have been trying to learn rust lately) but I don't know what your intentions are with the project. If this feature doesn't fit the project then I can happily use my script and run it on the node.

If there is some other reason for the feature not existing then I would be happy to learn why.

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

The issue does not name files, tests, or entry points. First determine how electrs currently handles transaction broadcasting and whether a REST API or CLI belongs in this project; define the scheduling and mempool conditions before implementation. Done should include an agreed interface, documented behavior, and tests for conditional broadcasting.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, cli
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.