How much data does it take to prove a given transaction exists on the blockchain?

As I understand the SVP protocol, a client can be reasonably certain that a transaction has been accepted on the blockchain if they know it is a member of a certain block, via the Merkle path, and a reasonable number of blocks have been mined on top of that block.

How much total data would that be, roughly? I guess if you were beginning with 0 knowledge, you would need all of the block headers, beginning from the genesis block? But once you are convinced you are looking at the head of the right chain, you could discard all of the ancient block headers, and just save a recent one as a trusted starting point to evaluate subsequent transactions?


I guess the premise of my question is faulty, as a fake transaction could always be embedded in a fake chain, if enough computing resources were available. So, there is no amount of data that insures a transaction is valid, without access to other information, e.g., what is the longest chain currently in existence.

A better question for my purposes would be how much would the electricity cost to create one fake block header at today’s difficulty level? Figuring that blockchain currently pays around $ 60K to mine one block, I would guess it must be in that order of magnitude, though smaller since we are removing the race condition.

How much data does it take to prove a given transaction exists on the blockchain?

As I understand the SVP protocol, a client can be reasonably certain that a transaction has been accepted on the blockchain if they know it is a member of a certain block, via the Merkle path, and a reasonable number of blocks have been mined on top of that block.

How much total data would that be, roughly? I guess if you were beginning with 0 knowledge, you would need all of the block headers, beginning from the genesis block? But once you are convinced you are looking at the head of the right chain, you could discard all of the ancient block headers, and just save a recent one as a trusted starting point to evaluate subsequent transactions?


I guess the premise of my question is faulty, as a fake transaction could always be embedded in a fake chain, if enough computing resources were available. So, there is no amount of data that insures a transaction is valid, without access to other information, e.g., what is the longest chain currently in existence.

A better question for my purposes would be how much would the electricity cost to create one fake block header at today’s difficulty level? Figuring that blockchain currently pays around $ 60K to mine one block, I would guess it must be in that order of magnitude, though smaller since we are removing the race condition.

Blockchain endpoint working

I wanna clear this thing that how blocks are retrieved and created in from the nodes using an end point. The end point is basically centralized and have nothing to do with network if i’m not wrong. Is that end point is also running some kinda setup to keep blocks in sync as well as connected nodes? In a network we have nodes [B,C,D,E,F,G…] and we have endpoint A. Lets say we have to retrieve a block then on which node the request will be sent?

Take example of STORJ in that request lands on one server(kinda end point) only then it broadcast to all. Isn’t the centralized system.

How to communicate with encrypted bitcoin wallet using bitcoin-core in NodeJS

I have a full node running in my local system and I am using this library named bitcoin-core to communicate with the bitcoind server. Now I have encrypted my wallet with a passphrase so I understand that for making transactions I need to have a passphrase. I am not sure what changes do I need to do for that in the library?

Can someone help me with this please?

bitcoin error: Could not connect to the server 127.0.0.1:19443

This question is been asked many times before, but none of the solutions are working for me.

I am running a bitcoind process from inside a docker-compose.yml file like this :

command: bitcoind -regtest -server -rpcuser=rpc -rpcpassword=x -rpcport=10340 -datadir=/root/litecoind-simnet/ -conf=/root/litecoind-simnet/litecoin.conf 

With docker-compose up the process runs fine and logs the messages on the terminal.

After entering into the created docker container with docker exec -it <containername> bash this works fine too creating a block:

bitcoin-cli -regtest -rpcuser=rpc -rpcpassword=x -rpcport=10340 generate 1

Now, I want to store the rpc related information provided in the above command in a bitcoin.conf file, which I provide by creating /root/litecoind-simnet/litecoin.conf with following content :

server=1 rpcuser=rpc rpcpassword=x rpcport=10340 

After this when I run bitcoin-cli -regtest generate 1, I get this error

error: Could not connect to the server 127.0.0.1:19443  Make sure the bitcoind server is running and that you are connecting to the correct RPC port. 

How can I make the configurations in bitcoin.conf make visible to the bitcoind? Any help will be appreciated. Thank you.

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

Unable to bind any endpoint for RPC server

I recently updated my bitcoin docker image to bitcoing v0.18.0 version and can’t allow external rpc connections to it now. It binds to localhost if I set rpcallowip=X.X.X.X, then I tried to used rpcbind parameter also, but couldn’t set my docker container to allow external rpc connetions.

This is what I get:

bitcoin_1       | 2019-05-23T13:39:34Z Bitcoin Core version v0.18.0 (release build) bitcoin_1       | 2019-05-23T13:39:34Z Assuming ancestors of block 0000000000000000000f1c54590ee18d15ec70e68c8cd4cfbadb1b4f11697eee have valid signatures. bitcoin_1       | 2019-05-23T13:39:34Z Setting nMinimumChainWork=0000000000000000000000000000000000000000051dc8b82f450202ecb3d471 bitcoin_1       | 2019-05-23T13:39:34Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation bitcoin_1       | 2019-05-23T13:39:34Z Using RdSeed as additional entropy source bitcoin_1       | 2019-05-23T13:39:34Z Using RdRand as an additional entropy source bitcoin_1       | 2019-05-23T13:39:34Z Default data directory /root/.bitcoin bitcoin_1       | 2019-05-23T13:39:34Z Using data directory /home/BTC bitcoin_1       | 2019-05-23T13:39:34Z Config file: /home/BTC/bitcoin.conf bitcoin_1       | 2019-05-23T13:39:34Z Using at most 125 automatic connections (1048576 file descriptors available) bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements bitcoin_1       | 2019-05-23T13:39:34Z Using 0 threads for script verification bitcoin_1       | 2019-05-23T13:39:34Z Binding RPC on address X.X.X.X port XXXX failed. bitcoin_1       | 2019-05-23T13:39:34Z Unable to bind any endpoint for RPC server bitcoin_1       | 2019-05-23T13:39:34Z Error: Unable to start HTTP server. See debug log for details. bitcoin_1       | Error: Unable to start HTTP server. See debug log for details. bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: In progress... bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread start bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread interrupt bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: done 

My bitcoin.conf file looks like this:

server=1 rpcbind=X.X.X.X rpcallowip=0.0.0.0/0 rpcport=XXXX port=XXXX rpcuser=user rpcpassword=password 

How to ./configure a built for Raspberry Pi?

I want to use this guide to set up a headless bitcoin core full node and came across the line:

./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --disable-wallet 

Unfortunately, the blog does not explain why he uses this.

First of all, I want to use my node with wallet so I probably should not use that option. Second, I want to configure it to be usefull with a Raspberry Pi which has only 1GB of RAM and is also running other stuff, for example my Logitech Media Server for audio streaming.

I know that I can use a config file for running bitcoind with entries for upload limit and other setups. Do I need to run the skript also with options or are both setups interchangeably?

ALso, I get the error Found Berkeley DB other than 4.8 upon configure. This would also be important to know, if I can have a wallet with the BDB other than 4.8 or if I have to install 4.8 (and how).