New answers tagged

1

nixbitcoindev explains here that the additional security provided by nix-bitcoin is due to minimalism, code reproducibility, compartmentalization and defense in depth. nix-bitcoin uses NixOS which is a purely functional operating system which means that it builds the entire operating system from the source code of every application of the Linux kernel ...


2

No, not all passphrases are used to generate the private keys for a wallet. Only specifically brain wallets do that. Passphrases in actual wallet software like Bitcoin Core and Electrum are used to encrypt the wallet. The private keys are still randomly and securely generated. Your passphrase is only used as an encryption key so that the private keys are ...


3

There are lot of things you can learn and try from below link including designing complex bitcoin scripts: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line


3

Yes, bcoin: http://bcoin.io/ https://github.com/bcoin-org/bcoin bcoin is a modular Bitcoin library for nodejs with full node and SPV node functionality, as well as a scalable BIP44 wallet used in production by several Bitcoin businesses including Purse.io. Bcoin has the second-fastest initial sync time out of all available full node implementations (after ...


0

You could, but this is very ill-advised to do so. Bitcoin consensus rules being implementation-defined rather than specification-defined re-implementation are unfortunately insecure. Thanks to libbitcoinconsensus, it has been made safer to build transactions with external tool. There might be a nodejs implementing transaction building logic out there, but ...


0

The Snap (v.0.20.0) is having various issues, some of which are mentioned here. As mentioned above, the Ubuntu PPA is saying that it shouldn't be used. There is apparently a second PPA that is at least semi-official. That works and doesn't overwrite my chain.


1

Addresses for outbound connections are largely chosen at random. The filtering of addresses comes at the time the addresses are first received by the node before they are added to the address database. This filter checks what services the nodes offer, what network they are on (e.g. IPv4, IPv6, TOR), and the time that they were reported to last be seen. Your ...


0

I like Blockstream Green (they have multisig, with 2FA for larger payments, so extra security) and BlueWallet (sometimes you might prefer singlesig for enhanced privacy + they have Lightning Network support in addition to on-chain Bitcoin).


1

Unfortunately, the method used to generate new keys at the time was to generate them randomly and store them in the wallet.dat file. So if you don't have a backup of the file after the address was used, it is not guaranteed that your backups will have the necessary key. I would suggesting dumping the wallet.dat file to see all the private keys contained ...


1

I personally like Blockstream Green as in addition to being simple to use, it has many features about security and privacy


0

According to BIP 34, you must include the block Height to your Coinbase transaction, otherwise, it will be invalid, The scryptSig of your coinbase transaction, must begin with number of pushed bytes (Actually is 0x03) and then the hex representation of your candidate block, dont forget the little endian conversion


2

The bytes you would put in the block header would be, in order: 0x00 0x00 0x00 0x20. That's how the number 221 (= 0x20000000) is stored in 32-bit little endian encoding. Note that this is actually a large number; that range is used for BIP9-compatible versions. Older blocks that use versions 1 through 4 predate BIP9.


4

It's important to note that the block hash is over the entire block header, which contains: Block Version Nonce Previous block hash Timestamp Merkle Root nBits Of these, only the nBits and previous block hash are fixed - all of the others can be manipulated to alter the hashed data at will. Once all 32 bits of the nonce value have been exhausted (which ...


1

when I looking to a debug.log I don't see anything about blocks. Is it possible? I expect the net category of log information should contain entries relating to the exchange of blocks with peers but I would not expect the full block data to be logged. The name of the debug log suggests it is mainly intended as a way to investigate problems, and not intended ...


0

If anyone else need it i post the solution here: Dim seg As JToken = JToken.Parse("{""rules"": [""segwit""]}")


0

If you have txindex enabled and are using a Linux, debian-based machine, install jq: sudo apt install jq and save this script somewhere as "any-name.sh": #!/bin/bash BLOCK_HASH=$(bitcoin-cli getbestblockhash) BLOCK_TEMPFILE=bestblock.json VIN_TXNS_TEMPFILE=vin_txns.temp VIN_N_TEMPFILE=vin_n.temp # Check if all temp files and addresses file exists,...


0

Blockstream.info is powered by Esplora, which is open source and reasonably easy to run yourself. You can then query that API as much as you want, with no rate limits. Note that you need quite a bit more disk space than just running Bitcoin Core. Esplora code repo (front end, with links to back end repo): https://github.com/Blockstream/esplora


1

Nodes follow the chain with the most cumulative work, not the lowest hash of the latest block (which would be most work for the current block).


1

To get more details about the next steps for a PSBT, you can use the analyzepsbt RPC. Additionally, decodepsbt will tell you what information is in a PSBT so you can use that to inspect the PSBT to learn what is missing.


0

In my view, we cannot move LevelDB index files such as chainstate, etc. to an external slow storage. According to this link, we should only move the blkxxxxx.dat and revxxxxx.dat files to an external storage. These files are inside ${datadir}/blocks/ by default. Since the index directory (${datadir}/blocks/index) contains high i/o-frequency LevelDB index ...


0

bitcoind uses transactions it relays (and later see as mined) to estimate the feerate to set for transactions its wallet creates. On regtest, you don't relay then mine enough transactions so bitcoind's estimation buckets are not filled enough to give a reliable estimate. Without such an estimate the wallet, out of safety, prefer not to create any transaction ...


0

It seems to me that your actual problem is getting the balances for numerous Bitcoin addresses. As @darosior noted, the service you were looking into does not appear to offer an API. However, e.g. blockchair.com has an API endpoint that allows you to query up to 25,000 addresses at once. Even though blockchair.com also limits queries, you may be able to ...


6

You can use a self-hosted (but low-burden!) instance of Esplora. Blockstream is also exposing an instance for free (at the moment) at blockstream.info. Disclaimer: if you take part of Bitcoin as an economic actor (as an application providing account balances may imply), you should really consider using your own source of truth and self-host the instance. It'...


1

Will this cause issues when running btc-rpc-explorer if I wanted to query old data? Yes, as it requires txindex. And if so what is the appropriate pruned node amount to access 1-2 years of blockchain history? txindex is currently only supported without pruning, so you need to have a non-pruned bitcoind to use btc-rpc-explorer.


0

You should check https://github.com/janoside/btc-rpc-explorer BTC RPC Explorer is a simple, database-free self-hosted explorer for the Bitcoin blockchain, driven by RPC calls to your own Bitcoin node. It is easy to run and can be connected to other tools (like ElectrumX) to achieve a full-featured explorer. Whatever reasons one may have for running a full ...


1

It means you either have no headers, no block, or both known to be (*) in common with this peer. From the help: $ bitcoin-cli help getpeerinfo .... "synced_headers" : n, (numeric) The last header we have in common with this peer "synced_blocks" : n, (numeric) The last block we have in common with this peer (*) ...


2

As outlined in the comments, there's a couple of possibilities here: You downloaded a very old version of Bitcoin Core, and managed to end up on a private chain where CPU mining is possible, and the chain is still new enough that the block reward is 50 BTC The program you downloaded is a Bitcoin clone and gives the illusion of paying out 50 BTC or more, ...


3

Bitcoin Core has a getmempoolentry command. This takes a txid and returns information about that transaction's mempool status. This includes height which is the block height when transaction entered pool.


0

The website displays the scriptPubKey of the first output as if it was a P2SH (more commonly used for multisig), but it's not. This is a bare multisig. As another explorer example, Esplora displays it more accurately (there is no address for this Script type). The addresses field of getrawtransaction (and a few other commands) output will for bare multisig ...


0

You need to enclose the filename in quotes. eg: dumpwallet "C:\output.txt" As opposed to: dumpwallet C:\output.txt (wrong)


2

The actual encodings of the numbers 1-16 are 0x51, 0x52, etc. This is because the numbers 1-16 are special in Bitcoin script and have their own explicit opcodes. OP_1 is 0x51, OP_2 is 0x52, etc. The correct way to write numbers with their own opcodes is to use those opcodes instead of using a pushdata opcode followed by the number.


2

The first line is normal behaviour: UNUSUAL plugin-bcli: Could not connect to 'lightning-rpc': Connection refused Your lightningd cannot start if the underlying bitcoind is not up-to-date: 2020-07-20T02:59:44.730Z UNUSUAL lightningd: Waiting for initial block download (this can take a while!) 2020-07-20T02:59:44.732Z UNUSUAL lightningd: Unable to estimate ...


1

Transactions fees goes to miner along with the mining rewards. Fee is a function of how much transactions are in mempool and several other things. Using cli of bitcoin node, you can get an estimate fee as per number of blocks time you want for confirmation. Ex - Let's say I am ok with my transaction getting confirmed after approx n blocks are formed ./...


3

Transaction fees are paid to the miner that includes that transaction in their block. Nodes do not earn transaction fees (or any other fees) for validating transactions. You can reduce fees by using segwit inputs, and by waiting for periods when the mempool is relatively empty.


1

Bitcoin Core is primarily a node (also known as a peer) intended to join the Bitcoin network. It includes wallet functionality, but its primary purpose is to interact with the Bitcoin p2p network, and help validate all blocks and transactions for adherence to the consensus rules, which are encoded in the Bitcoin Core source code. Due to this, it also ...


4

When you import a key, you can mark it as trusted. Usually, you would do this after meeting the owner of a key and verifying that they actually control the key, e.g. at a CryptoParty. Since it is infeasible for each user to verify every other user in person, PGP/GPG leverages a "web-of-trust" to establish connections between keys. E.g. Alice has ...


0

So, I completed this without issue by compiling from source. The apt package binaries were installed in /usr/bin. When compiling from source I used the ./configure --prefix= option to install the updated binaries in a different location. All of my configuration and block data remained in /root/.bitcoin. By default, the code looks for bitcoin.conf in ~/....


1

It is De facto standard that address should not be reused. Indeed. and even Bitcoin officially emphasis address should not be reused. There is nothing official, anywhere, in Bitcoin. Does the same condition apply for Multi-signature address ? Yes. If Yes apart from privacy what is the need ? Privacy - for you and those you interact with - is pretty ...


0

If you have to update your Bitcoin core wallet you can just download the new version and open the new bitcoin-qt file.


2

what is exactly the meaning of reserve and change? My guess is that reserve are normal reception addresses and change are, well, change, but I'm still wondering if there's some meaning more specific to Bitcoin Core. reserve means that the key is in the keypool and has not been used yet. This is used for both change and receiving addresses as there are ...


0

Not gonna write a 'tutorial', but here's a couple things that should be mentioned: As you imply, ubuntu provides a standard 'snap' for bitcoin. easily installed via apt. Agree they are a PITA to use, so ... if you use the tar.gz, just extract it somewhere, then (using the appropriate version number): 2a) check the signature on the hash file: gpg --verify ...


2

The following transactions are not broadcastable with the default bitcoin core configuration but could be found in new mined blocks: Transactions whose fee is smaller than 1 sat/vB (and RBF bumps that increment less than 1 sat/B). Transactions with size greater than 100 vkB (and smaller than ~ 1 vMB) Transactions with outputs amounts smaller than 566 ...


1

Ok, so the code is just fine as Andrew assumed. It was odd to me that first several blocks are the same. They all have one transaction and the same output value of 50BTC, but according to site https://blockstream.info/testnet/, where you just type a block height in search bar and you can see all transactions inside of resulting block, this is correct.


Top 50 recent answers are included