Inspiration

Currently the only way to submit a transaction to bitcoin is via an api or by downloading and installing a bitcoind node and syncing the whole chain. Tx pigeon is a small cli tool that lets anyone broadcast to the network directly without having to run a full node, and it keeps the users private by only connection to nodes over tor

What it does

It crawls the bitcoin DNS seeds for address with the libre relay service flag enabled and connects to them over TOR. You can then broadcast a transaction directly to these nodes, and they will then relay them around then network.

This works with standard and non-standard transactions, such as large op_returns or whatever other relaxed rules libre relay makes available to users.

How we built it

Its build using rust. It mimics the bitcoin network message protocol to act like a real node. We check to see if a node has accepted the tx by sending a GetData(inv(tx)) message, which will send us back the transaction if the node has included it in its mempool.

Challenges we ran into

Find fake nodes was an issue at first, as lots of address come back from the dns seeds with the libre relay service flag. Also trying to connect to so many nodes was an issue so had to implement some tokio async threading to support multiple connections

Accomplishments that we're proud of

It works!

here are all the non-standard tx's i managed to get mined over the past few days using tx-pigeon

https://mempool.space/address/bc1pat2m75pj7ptyc0ek38gs2lzgj5c38yx3z5qtj3gs7ks0h8et4xrs8elxtq

And this is the tx i made during my video demo

https://mempool.space/tx/278bdc58d662dd613d5f2e49455bf87da1a42b1039785aedc8fcd2b27fcecf35

I also made a simple script to create non-standard op_returns to make this easy to test.

also people are using it already to submit transactions to mainnet!

https://x.com/ottosch_/status/1924122484632150052

https://x.com/0x_orkun/status/1922226237755306187

What we learned

Bitcoin network messaging and how bitcoin nodes interact with each other

What's next for tx-pigeon

Continue to build it out, and add a webfront that people can use to submit transactions over nostr

Built With

Share this project:

Updates