RPC for LND: rpc_pb2_grpc vs lnd_grpc

I’m trying to automate launching multiple LND instances with a Python script. I’ve been trying to use lnd_grpc but can’t get it to work. I created an issue in the LND repository and was pointed towards https://api.lightning.community/. This website does have plenty of documentation and examples, but I can quite get the relationship between lnd_grpc (which I’ve been using) and rpc_pb2_grpc (which is used throughout the documentation).

For instance, initializing a new wallet (as per official docs) in lnd_grpc is:

lnd_rpc = lnd_grpc.Client()

which is different from that in rpc_pb2_grpc.

Are these libraries (is this a proper word?) compatible? Should I switch from lnd_grpc to rpc_pb2_grpc?

How to create the data parameter for a PSBT?

I am sure this is a dumb question but if using:

bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

How do you create the data parameter? Where does it come from?



I should have read the BIP first, it looks like it is an unsigned tx. So in order to create a PSBT you need to first create an unsigned tx? And include the hex as an argument.

Bitcoin Testnet API that allows transaction lookup and submission of raw transactions

I’m looking for a well developed, maintained and stable API allowing to access bitcoin testnet. Something like Infura for Ethereum. Googling gives many results, but can somebody point me out what is really in use?
In the moment for me BlockCypher looks the best, but can I really trust it?
It would be nice if the API was free, but it not necessarily has to be.

BIP39 Path in Ledger Nano S

On a Ledger Nano S, you are given a BIP39 24 word mnemonic. What is the path to the address used? Is it m/44’/144’/0’/0/0 ?

Say for example I use the address generated by the Ledger Nano S to store ripple. But then I lose the device. I can generate an infinite number of addresses from the mnemonic, but I’d like to know which default path address holds the tokens.

How to code bitcoin transaction for shopping cart

I have written website shopping cart software using MySQL and PHP and I need to add a way for users to pay with Bitcoin.
This seems like a basic need for developers in general, but I’m having difficulty nailing down exactly how this works. Apologies in advance if this is a duplicated question!

The shopping cart shows the total amount due and when the user chooses to pay with Bitcoin, I imagine it should work like this:

shopping cart software generates a new payment (raw transaction?) address where the user should send their bitcoin payment.

Something (?) monitors the blockchain for the payment to this new address and updates the local database / user web interface to acknowledge when the payment is received.

I would appreciate any information clarifying the above processes!

A lot of searches about this including here on StackExchange are returning plugins for wordpress or joomla or such, but I don’t want to use one of those overloaded CMS packages. Perhaps there’s an existing API I would leverage but ideally I’d like to code as much of it myself as possible to limit the “unknowns” in the workings of this cart. tyvmia

Is it possible to separate blockchain and wallet functions?

I’m looking for a way to use bitcoin-core in monero-way (It uses separate blockchain daemon and wallet daemon).

I’d like to run bitcoin-qt interface on my laptop and connect to external node with full blockchain. In this way I can share my full node with other people and my wallet will be safe.

Is it possible to use bitcoin-core in this way?

P.S.: I listen about electrum-server, but I don’t want to use another software.

Miner transaction selection – how are sigops considered?

There is a limit on how much a block can sigop (set to 80000?). There is also a limit on how much a single transaction can sigop (set to 16000?). It thus seems possible (and if it’s not possible, the remaining of this question is void, but then how is it prevented?) that an attacker submits five special transactions to consume the whole block sigop limit.

If such attacking transactions are using very generous fees per byte, if the miner chooses which transactions to include in a block based on fee per byte metric, it would include the attacking transactions in a block, getting relatively huge fees per byte, but not filling the block because of sigop limit. This would mean that the miner could get more in fees if it avoided attacking transactions, but the question is whether such selection avoidance is implemented by default.

Bcoin initial blockchain sync progress isn’t saved

I’m using bcoin and it’s class FullNode to run a full Bitcoin Node.
Here’s the configuration:

const node = new bcoin.FullNode({
        prefix: '/mnt/d/bcoin',
        network: 'testnet',
        indexTX: true,
        indexAddress: true

And then I start the node with this code, identical to the one they use in their official example.

(async () => {
        await node.open()
        await node.connect();

        node.on('connect', (entry, block) => {
                console.log('%s (%d) added to chain.', entry.rhash(), entry.height);

        node.on('tx', (tx) => {
                 console.log('%s added to mempool.', tx.txid());

})().catch((err) => {

It seems to be working fine, I get notifications of the blocks added in the console. the program crashes once in a while to the lack of memory, however, I found a fix to that. The progress of sync seems to never be saved, however. If I were to restart the app when it’s on 1,000,000 blocks in (testnet) – the sync will start over. The files are created in the /mnt/d/bcoin folder and it’s already 10 GB in size. In comparison to the official bitcoin node – it always carries on the sync that’s already in progress. I have never been able to finish the inital blockchain download with bcoin because I run it in my PC and it always fails for various reasons. So is it expected behavior for bcoin to reset its IBD progress every time? Would it read the existing block files after IBD?