Earn Bitcoin by helping others

On BitQ&A you can get your questions answered by setting up a bounty or you can get paid by answering the community's questions.

How to broadcast a transaction to the Bitcoin Peer-to-peer network?

Let’s say a developer wants to broadcast transactions from their app directly to the P2P network (not using RPC calls). How would this be done? I assume a TCP/IP connection needs to be established to one of the active nodes. What follows after that? Which messages need to be exchanged (examples would be very welcome)? Can connection be closed after the broadcast or should the app maintain its connection?

Bonus question: How to discover other nodes and broadcast the transaction to multiple peers in parallel?

Is there any curated list of the IP addresses of the nodes that belong to major miners?

EDIT: It is true that Merchant API will be the way to go when available (it is not at the moment) and that using APIs such as Matter Cloud or What’s on chain is the easiest way to do it right now. But this question is more about understanding how Bitcoin’s server network works. It is an interesting piece of technology. It might also be useful for someone - API providers need to deliver transactions to miners at some point after all.

With that said; this question remains open and bounty still waiting for the right response.

Submit an answer See answers Share on Twitter Share on Facebook

How do Bitcoin payment channels work?

I would like to know how payment channel mechanic works in practice. What do the involved parties need to do, which information they exchange and how is the security ensured.

Bonus question: What different types of payment channels exist?

Only answers that actually explain channels will qualify for the bounty. While linking to 3rd party sources is encouraged and desired, answers that solely do that won’t count.

Submit an answer See answers Share on Twitter Share on Facebook

Best solution for backend BSV hot-wallet

I am looking for a solution to implement a backend hot wallet. It needs to be able to spend pretty much instantly upon API call. The refilling of the wallet can happen manually, but it needs a way to generate a new address and output it somehow so I can refill it. Bonus points if the backend wallet has a way to resolve paymail addresses. Bonus points for links to the respective library. Also helpful to know which proprietary systems exist which could be contacted to see if their system could be leveraged.

Submit an answer See answers Share on Twitter Share on Facebook

How to decode merkle/transaction proof that Bitcoin SV software provides?

One can ask Bitcoin SV not to provide a proof that a given transaction was included in a block. E.g.:

➜ bitcoin-cli gettxoutproof '["ea32120687851afe3418ab3642af94a4c69684e4b87f8a529807489e09d74ec5"]'

Proof can be verified using the verifytxoutproof RPC command, but let’s say I would like to verify the proof in a custom application that does not have access to a Bitcoin node.

How can I decode the proof HEX blob? What data is part of it and how can I get block, merkle proof and transaction information from it?

Submit an answer See answers Share on Twitter Share on Facebook

What will replace OP_CHECKLOCKTIMEVERIFY & OP_CHECKSEQUENCEVERIFY after the Genesis upgrade?

Since these two opcodes will be removed after Genesis and (from my understanding) nLockTime works in a slightly different way (prevents transaction from being included in a block vs. UTXO being locked until given time/block height), how will be possible to achieve same functionality after that?

Is it possible to build a locking/redeem script using other opcodes that achieves the same result? Or is there something else?

Submit an answer See answers Share on Twitter Share on Facebook

Is it possible to use browser's crpyo primitives with bsv library?

I have some code that does a lot of HD derivation and ECIES encryption/decryption and I noticed that it runs quite slow in the browser. I did some profiling and it seems that it spends most of the time in the libraries that handle primitives (sha256 hashing, big int, …).

This makes sense as it seems that we have this primitives natively in node, but we need to use libraries in the browser. I did some Googling and it seems that newer browsers do have some support for this things so I was wondering if it is possible to use that when available? I suspect that would speed up things significantly?

I am thinking about browser’s native APIs such as SubtleCrypto and BigInt. Or even an Emscripten-compiler Javascript library such as js-nacl.

Submit an answer See answers Share on Twitter Share on Facebook

How are Bitcoin blocks structured?

Bitcoin blockchain is made of individual blocks. I am wondering how do these blocks actually look like. Which different data types are part of them? What is each part of the block used for, what is its meaning and what are the possible values that can those values take?

I would also like to, assuming I am looking at a block’s HEX blob, be able to decode it/determine various parts of it.

Submit an answer See answers Share on Twitter Share on Facebook
Made with in Slovenia.