text:
How can I create a simple P2SH transaction in regtest?
I'm running bitcoind in the regtest mode on my computer. I need at least one transaction that spends a P2SH output in my local blockchain. Is there a way to create a P2SH transaction using bitcoin-cli?

Yes we could do that easily, first we launch bitcoin core on regtest bitcoind -regtest -fallbackfee=0.0002 -daemon
then we create and load a wallet
bitcoin-cli -regtest createwallet "my_wallet"

then we generate 100 blocks to get some coins bitcoin-cli -regtest generatetoaddress 101 "$(bitcoin-cli -regtest getnewaddress)"
then we gonna need 3 new addresses for our 2-of-3 multisig address so lets create them
ADDR1=$(bitcoin-cli -regtest getnewaddress)
ADDR2=$(bitcoin-cli -regtest getnewaddress)
ADDR3=$(bitcoin-cli -regtest getnewaddress)

We get the public keys associated ( you might need jq here )
PUBKEY1=$(bitcoin-cli -regtest getaddressinfo $ADDR1 | jq -r '.pubkey')
PUBKEY2=$(bitcoin-cli -regtest getaddressinfo $ADDR2 | jq -r '.pubkey')
PUBKEY3=$(bitcoin-cli -regtest getaddressinfo $ADDR3 | jq -r '.pubkey')

then we create our 2-of-3 multisig address P2SH_MULTISIG=$(bitcoin-cli -regtest createmultisig 2 "[\"$PUBKEY1\",\"$PUBKEY2\",\"$PUBKEY3\"]" | jq -r '.address')
We send some coins to it bitcoin-cli -regtest sendtoaddress $P2SH_MULTISIG 1
Then we generate new blocks to confirm the transaction bitcoin-cli -regtest generatetoaddress 1 "$(bitcoin-cli -regtest getnewaddress)"
we create a descriptor with the public keys
DESC_NO_CHECKSUM="sh(multi(2,$PUBKEY1,$PUBKEY2,$PUBKEY3))"
DESC_WITH_CHECKSUM=$(bitcoin-cli -regtest getdescriptorinfo "$DESC_NO_CHECKSUM" | jq -r '.descriptor')

then we import the multisig address
bitcoin-cli -regtest importmulti "[{\"desc\": \"$DESC_WITH_CHECKSUM\", \"timestamp\": \"now\", \"internal\": false, \"watchonly\": true}]"

then we get the unspent transactions and get the transaction ID, output index (vout), and amount for the UTXO
UTXO=$(bitcoin-cli -regtest listunspent | jq -r ".[] | select(.address == \"$P2SH_MULTISIG\")")
TXID=$(echo $UTXO | jq -r '.txid' | tr -d '\n')
VOUT=$(echo $UTXO | jq -r '.vout')
AMOUNT=$(echo $UTXO | jq -r '.amount')

then we create a new destination address with the correct change amount
DESTADDR=$(bitcoin-cli -regtest getnewaddress)
CHANGE=$(echo "$AMOUNT - 0.0002" | bc | LC_ALL=C awk '{printf "%.8f", $0}')

then we create the raw transaction
RAW_TX=$(bitcoin-cli -regtest createrawtransaction "[{\"txid\":\"$TXID\",\"vout\":$VOUT}]" "{\"$DESTADDR\":$CHANGE}")

we sign it with the private keys of the 2 of 3 addresses
PRIVKEY1=$(bitcoin-cli -regtest dumpprivkey $ADDR1)
PRIVKEY2=$(bitcoin-cli -regtest dumpprivkey $ADDR2)

SIGNED_TX=$(bitcoin-cli -regtest signrawtransactionwithkey $RAW_TX "[\"$PRIVKEY1\",\"$PRIVKEY2\"]" "[{\"txid\":\"$TXID\",\"vout\":$VOUT,\"scriptPubKey\":\"$(echo $UTXO | jq -r '.scriptPubKey')\",\"redeemScript\":\"$(bitcoin-cli -regtest createmultisig 2 "[\"$PUBKEY1\",\"$PUBKEY2\",\"$PUBKEY3\"]" | jq -r '.redeemScript')\",\"amount\":$AMOUNT}]")

then we can send it
bitcoin-cli -regtest sendrawtransaction $(echo $SIGNED_TX | jq -r '.hex')

and in the end we generate a new block to confirm the transaction
bitcoin-cli -regtest generatetoaddress 1 "$(bitcoin-cli -regtest getnewaddress)"

This won't allow you to spend the coins, though, as you need to import the P2SH address into the wallet too. In a legacy wallet, this could be done with addmultisigaddress, but in new descriptor wallets all of the above can be done directly with descriptors too.

I modified my answer

Thanks for the answer, when I try use PRIVKEY1=$(bitcoin-cli -regtest dumpprivkey $ADDR1), it raises this error: Only legacy wallets are supported by this command

Thats because you were using a descriptor wallet which does not have dumpprivkey, I updated my answer for descriptorwallet

I'm also getting Only legacy wallets are supported by this command for importing address. bitcoin-cli -regtest importaddress $P2SH_MULTISIG

Havent tested my previous solution, they were some mistake I changed the method, be sure to start from the first step.

You need to use importdescriptors, not importmulti.

I have not yet used descriptor wallet :/ gonna have to look into it

Unfortunately, it doesn't work yet.


text:
How to import addresses into Bitcoin client
1,"1DdDMWFX3h6fkjktDBsKuUN91vVz8KpMnB","L33oVzrKNfwWHxPubNc9MGuYLxGmJFCQdgibV1oFCEq3tPPQapvz"
2,"15o6KpFLdFkVGkoZLEJPcZt7AaWLR5ZAsm","L3iTwmNdRborLifKWNJzYagsiPcEdvcMKCGeAgPCZ2XzMUrzdkyb"

I generated two addresses, how can I add them to the  client?

Does this answer your question? How can I import an address or public key into my wallet.dat file?

Security Note: Do NOT use the addresses you pasted in your question. Anyone can now access any funds in those addresses as anyone can import the private keys and gain full access to the addresses, including sending the BTC.
It will depend on the client you use. Here are two examples:
Electrum:

Start a new wallet file
When given the option to select what kind of wallet to use, select Import Bitcoin addresses or private keys
Paste your private keys here
Complete the setup to gain access to the funds

Bitcoin Core:

Open your wallet
Click Window -> Console
If you have protected your wallet, use this command walletpassphrase "YourLongPassphrase" 600
Use this command to import private keys importprivkey yourPrivateKeyInWalletImportFormat

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Is the secret seed number also the private number?
I purchased a bitcoin in 2014 from Coinbase. I received a long alphanumeric number. No private code or seed phrase. I received a 16-digit secret seed at a later date. Is the secret seed I received a replacement for the seed phrase or private number that I can use to access my bitcoins on Coinbase?

The best resource to find this out would probably be Coinbase's user manual, but perhaps someone here is familiar enough with the service's offering to be able to tell you.

I would start with looking at the alfanumeric number.
Is it in hexadecimal? If yes , is it 32 bytes long --> random number
Is it a code that begins with a 5 or L or K --> Private key
Never share any of these.
But you can calculate the Public key and the Bitcoin address from those.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
most profitable scrypt mining machine per dollar with unlimited budget and free power?
I know The 7950 is the most efficient in (MH/s)/$/watt... but I have contractual access to unlimited free power. I'm already using the power anyway so the marginal cost of the power is actually zero. Is there a machine I could build and turn a profit with at this point? Litecoin is not the most profitable Scrypt coin to mine now, so don't assume I'm mining Litecoin.
The asics coming out "soon" might be a concern, if they actually even come out soon, but its my understanding that they are good for being low wattage, whereas the hash/dollar is similar to GPUs still.
Assuming I could be confident that a Scrypt asic manufacturer is trustworthy enough to buy from, I wouldn't be opposed to doing that, but thats really a pretty big gamble, unlike ordering a bunch of parts from amazon/newegg on cyber monday.
Also I'll be able to resell GPUs, so even if this becomes non-viable after 6 months or so, I'll be able to recover a decent chunk of my investment.
I say "unlimited budget" meaning I can fully saturate a motherboard with GPUs or purchase an asic without an issue, whatever the most efficient is.

There are a few other GPUs that do a bit better according to this list:
https://litecoin.info/Mining_hardware_comparison
I think this is just based on user feedback to the Wiki.  The ones with a lot more khash/s are multi-card setups.
Really if you have free power you should mine with whatever you can afford, then add more cards after you have coins and have sold them.  There are instructions on a cheap multi-card system here:
http://www.coinminingrigs.com/
Unfortunately many of the parts referenced are difficult to find - they sell like hot cakes!  The R9 280X is equivalent to the 7950 and is usually cheaper.
Don't forget that there are dozens of scrypt based currencies and mining the most profitable one over LTC can net you a lot more income.  I can't post any more links here but google multipool or check www.multipool.in for a start.
Also don't forget that if you put in a nice 4 or 6 core processor you can also do CPU mining for PrimeCoin, QuarkCoin or ProtoShares.
Good luck!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What is the purpose of indexing the mempool by these five criteria?
In the bitcoin source code in txmempool.h, a comment says that unconfirmed transactions are indexed by five criteria:
 * mapTx is a boost::multi_index that sorts the mempool on 5 criteria:
 * - transaction hash (txid)
 * - witness-transaction hash (wtxid)
 * - descendant feerate [we use max(feerate of tx, feerate of tx with all descendants)]
 * - time in mempool
 * - ancestor feerate [we use min(feerate of tx, feerate of tx with all unconfirmed ancestors)]

I can understand why would we  need to index transactions by the time they are in the mempool. But I can't understand the need for sorting them based on txid and wtxid (while they are hash output, so they are like random numbers, why bother to index them?).
And I also don't understand the meaning of descendant feerate and ancestor feerate. The simple concept I can deduce is that miners are willing to put transactions with higher fee rates in their block, so sorting based simply on fee rate makes sense to me, but why is sorting based on parents and children of a transaction?

The mempool is the short-term memory of a full node. We use its content e.g. to:

exchange information with peers
build block templates
estimate feerates
track pending payments to our wallet

The index allows us to look up the full transaction objects based on each of the keys of the index.
txid/wtxid
For example, the txid and wtxid appear in the context of transaction relay as shorthand identifiers for the full transaction objects. We tell a peer that we have a list of new txs using just the txids and they respond by asking for a subset of those by listing the respective txid/wtxids. We use this key to look up the object and serve their request. We also use the txid to reassemble blocks after getting a new block per "compact block relay". Similarly, when a new transaction spends an unconfirmed input, we can look up the parent transaction per the txid referenced in the input of that new transaction. Generally, we use txid any time we reference individual transactions.
time in mempool
When we build new transactions, we need to estimate the feerate that'll get us a confirmation in the intended time frame. We base our estimate on tracking how long transactions were in our mempool before they got included in a block.
While unconfirmed transactions remain valid indefinitely (or until an input gets spent in another transaction), we want to allow users to easily supersede unsuccessful attempts at transacting. Full nodes drop transactions after they have stuck around their mempool for 14 days.  Additionally, it is policy to only keep the first of a set of conflicting transactions unless the first transaction signaled replaceability  and the subsequent transactions fulfill the requirements to replace the predecessor.
Either way, we want to look up transactions per the time they've been in the  mempool sometimes, and if we wouldn't have an index for that, we'd have to sort the whole mempool each time to do so.
ancestor feerate
An ancestor set is composed from a transaction and all of its ancestors. Ancestors are transactions that an observed transaction topologically depends upon: a transaction cannot be included in a block until all of its parents have been included. If tx_C spends an output of tx_B and tx_B spends an output of tx_A, tx_A and tx_B are ancestors of tx_C, and the ancestor set of tx_C is {tx_A, tx_B, tx_C}. The ancestor feerate of a transaction refers to Σ(fees)/Σ(vsize) of its ancestor set.
When we build block templates, we sort all transactions by their ancestor feerates and pick the ancestor set with the highest ancestor feerate to the block template. After picking an ancestor set, each related transaction's ancestor set is updated, and we pick the new highest. Repeat until the block is full or there is nothing left to pick.
This approach ensures that the transactions appear in the topological order in the block, correctly prioritizes child-pays-for-parent situations, and greedily maximizes the collected transaction fees in the block template. If we only looked at the feerate of the transaction, we might miss that a transaction is dependent on a heavy low-fee transaction, or that a transaction has been bumped by a high feerate child.
descendant feerate
The descendant feerate is the counterpart to the ancestor feerate. It's the Σ(fees)/Σ(size) of the given transaction and all its descendants. E.g. tx_A has two child transactions tx_B and tx_C. If tx_B has a lower feerate than tx_A, but tx_C has a higher feerate than tx_A, then tx_C has the highest descendant feerate, tx_B has the lowest descendant feerate, and tx_A has one between the two.
The mempool size is limited. Sometimes, when there is a lot of blockspace demand, more transactions are submitted to the network than can fit in your node's mempool. At that point, the mempool will drop the transactions that are least likely to be included in a block. While the ancestor feerate tells us what is most valuable to include, the descendant feerate tells us which transactions are signaling the lowest priority. We drop the transactions with the lowest descendant feerate first. If we only looked at the transaction's feerate itself, we might miss that a low feerate transaction is the parent in a CPFP situation. In the case of the above example, we would first drop tx_B because it has the lowest feerate, and then drop tx_A (whose descendant feerate is higher than its own feerate at that point, but lower than tx_C's). Evicting tx_A also evicts tx_C because it cannot be included in a block with its parent creating the output it spends.

Regarding ancestor feerate, "An ancestor set is composed from a transaction and all of its ancestors" -- just to be clear, only the transactions unconfirmed ancestors.

Regarding ancestor feerate, "After picking an ancestor set, each related transaction's ancestor set is updated ..." To clarify (but please check my understanding) "related" transactions are those that were not chosen, but have ancestors that were. And the way we update such transactions' ancestor sets is to pretend that the chosen transactions are no longer in the mempool, as if they have already been mined.

Just adding onto Murch's answer, which does a great job at explaining the uses of each index.

But I can't understand the need for sorting them based on txid and wtxid (while they are hash output, so they are like random numbers, why bother to index them?).

Note that indexing by something doesn't necessarily mean ability to sort by it. Boost multi index containers allow each index to have different properties (ordered vs hashed, unique vs non-unique, etc.), which makes this data structure very suitable for the mempool use case. The txid/wtxid indices allow us to quickly look something up by txid/wtxid (boost::multi_index::hashed_unique), while entry time and feerate are specifically for sorting (boost::multi_index::ordered_non_unique). We won't sort by txid and, similarly, we won't try to uniquely identify a mempool entry based on its ancestor feerate.
You can find more information by looking at the type declaration of this data structure and the Boost multi index container reference.

Welcome glozow!

Woop woop! Instant upvote :)


text:
What is the nBits field in the CBlockHeader class?
In the source code for the CBlockHeader class, there is a field called nBits.
/** Nodes collect new transactions into a block, hash them into a hash tree,
 * and scan through nonce values to make the block's hash satisfy proof-of-work
 * requirements.  When they solve the proof-of-work, they broadcast the block
 * to everyone and the block is added to the block chain.  The first transaction
 * in the block is a special one that creates a new coin owned by the creator
 * of the block.
 */
class CBlockHeader
{
public:
    // header
    int32_t nVersion;
    uint256 hashPrevBlock;
    uint256 hashMerkleRoot;
    uint32_t nTime;
    uint32_t nBits;
    uint32_t nNonce;

As far as I searched in the code, I didn't found any comment for this field. But I saw the CheckBlockHeader function using the nBits field to check proof of work of the block. So I interpret that it's a representation of the difficulty for the block.
static bool CheckBlockHeader(const CBlockHeader& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW = true)
{
    // Check proof of work matches claimed amount
    if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
        return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "high-hash", "proof of work failed");

    return true;
}

Is my understanding correct?

I interpret that it's a representation of the difficulty for the block. ... Is my understanding correct?

Yes, it is a compact representation of the network target for that block. The target being a kind of inverse of the difficulty.

How is difficulty stored in blocks
Is there a rationale for the compact representation of the target?


text:
How to connect a bitcoin node to a complete node through the local network?
I currently have a full bitcoin node on my local network and I would like to create another node but only update it by local network.
I have tried with:
./bitcoind -connect<iplocal>
./bitcoind -addnode<iplocal>
but I get the following error
syntax error near unexpected token `newline'
I appreciate your help.

You need an equals sign (=) after -connect.

i'm goint to try ./bitcoin-qt -connect="iplocal"

As mentioned above, your command needs to be ./bitcoind -connect=<iplocal>
-connect= will connect ONLY to that specified node. -addnode= will connect to the specified node in addition to attempting to connect to global nodes. If you're bootstrapping a new node either will work


text:
How to "create new receiving address" from recently installed full node, (0.21.0) with new encrypted wallet?
On March 11th, 2021, I completed my downloaded of the full node from Bitcoin Core, (Bitcoin-0.21.0-win64-setup), on my Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz - 16.0GB,  Windows 10Pro.
I created a new wallet with encryption and I named it.
The "get new address" box remains grayed out.
After unlocking with "passphrase" [] 100),
Console command "getnewaddress" was unsuccessful.  "update" says I'm wallet version 169900.
Node is fully synced and has remained in operation, with "check box" saying up to date, and with 10 active connections to Bitcoin network.
I haven't seen any new problems reported, with this issue, since 0.21.0 release.  I'm pretty sure I've tried and was unsuccessful with all other suggestions for the same issue.
Any ideas are greatly appreciated.  Further, I'm a boomer noob, who left programming after the mouse was introduced.
Uggh! Wondering if I should delete node and start over without encrypted wallet?

If the passphrase command is unsuccessful, it means your password isn't correct.

The pass phrase command was only used to unlock the encryption on wallet. It was successful and showed padlock icon open. Then while open. I instituted the other commands.

Can you paste the full output of the getwalletinfo command?

20:31:52
￼
getwalletinfo
20:31:52
￼
{
"walletname": "trlight",
"walletversion": 169900,
"format": "bdb",
"balance": 0.00000000,
"unconfirmed_balance": 0.00000000,
"immature_balance": 0.00000000,
"txcount": 0,
"keypoololdest": 9223372036854775807,
"keypoolsize": 0,
"keypoolsize_hd_internal": 0,
"unlocked_until": 0,
"paytxfee": 0.00000000,
"private_keys_enabled": true,
"avoid_reuse": false,
"scanning": false,
"descriptors": false
}

What happens when you use the keypoolrefill (while having the wallet unlocked)?

Just tried. first time no result, so I closed wallet, opened it and still nothing so I tried again but different report resulted.

09:25:44
￼
walletpassphrase(…)
09:25:45
￼
null
09:26:12
￼
keypoolrefill
09:26:12
￼
null
09:27:40
￼
Executing command without any wallet
09:27:40
￼
walletpassphrase(…)
09:27:40
￼
null
09:28:13
￼
keypoolrefill
09:28:13
￼
null
09:29:02
￼
getnewaddress
09:29:02
￼
Error: This wallet has no available keys (code -4)

Note that this question was apparently resolved in this Bitcoin Core issue: https://github.com/bitcoin/bitcoin/issues/21456. Please feel free to write an answer from the content linked.


text:
Why does my Bitcoin wallet not access funds in my Coinbase portfolio?
I bought and sold Bitcoin on Coinbase which is now in my portfolio. How do I recover the portfolio money? I tried Bitcoin wallet but it only accesses the active Bitcoin, not the funds in my portfolio.

Are you askig how to withdraw fiat money from your coinbase account?

I tried Bitcoin wallet ...

There are many different Bitcoin wallets and the answer may depend on exactly which one you are using. For example there is "Bitcoin Wallet" for Android phones which is sometimes known as the Schildbach wallet. There is also Bitcoin Core for PCs and many others.

... but it only accesses the active Bitcoin, not the funds in my portfolio.

A typical Bitcoin wallet such as Bitcoin Core or Electrum gives you exclusive personal control over some money. These are what is called non-custodial wallets - there is no third-party custodian who has custody of your money.
Coinbase accounts are custodial. So far as the Bitcoin network is concerned, Coinbase owns money in Coinbase accounts, not you.
Ownership of money in the Bitcoin network is determined by who holds the secret numbers known as private keys. Money is associated with a private key. If a wallet doesn't have the private key for some money, then that wallet cannot access that money to spend it.
If it helps, imagine having bank accounts at two different banks. Your bank statement from one bank won't include any money in the other bank. You cannot instruct one bank to send someone money that is in the other bank. Bitcoin doesn't work like banks but it does have separation of control where there are several private keys in use.

How do I recover the portfolio money?

You can, for example, get your non-custodial wallet to display an address to "receive bitcoin". Then log into Coinbase and use its facilities to pay money to (or withdraw money to) that address.


text:
Preventing secretly mined chains
In order to prevent attackers from secretly mining chains (which they could later publish to perform double-spending attacks), would it be possible to require some information to be included in the next block that can only be known if the last block in the chain was published to the network? Something like a random number that is only generated in response to the block being public.
That way, secretly mined side-chains can automatically be rejected by the network.

Bitcoin is peer to peer with no special adjudicators or notaries. How would such a mechanism could be invented without special privileged roles, in a way that is better than the existing mechanism based on accumulated proof of work?

Well there are rules for when nodes accept blocks, such as for instance that the transactions in the block have to be unspent. One such rule could be that blocks additionally have to contain this number. My question was more what this could be. Alternatively, blocks could be rejected if they are published a certain time after they were mined.

This is precisely what federated byzantine agreement algorithms like that used by XRP and Avalanche do. But this is a such a huge change that you can't really consider the algorithm to be proof-of-work anymore.
What happens is that a block is not accepted when it is mined but some subsequent process that can only happen once the block is public is required. So if the block is not made public, it will never be accepted.
The scheme Arthur Britto, Jed McCaleb and myself developed for the XRP Ledger in 2011 allows each participant to choose whose signatures they will require before they locally consider the block valid. Only when you collect sufficient signatures do you accept the block. There is no way to obtain the signatures unless the block is made public.
A somewhat complex algorithm handles the case where a chain is built privately and then revealed later. That chain may have more work but it will have fewer signatures in the intermediary blocks. There's "preferred ledger by branch" code that detects this and heavily discourages adoption of the one with the fewer intermediary signatures.
Again, this is such a radical change that the result is not really proof-of-work but a different algorithm. In the case of the XRP Ledger's algorithm, it doesn't use any proof-of-work at all. But you could use this "preferred chain by branch" logic and the signatures as proof of the chain being made public in connection with proof-of-work if you wanted to.

@Prayank No. But it's not about bitcoin either since bitcoin (as presently constructed) has no such mechanism. Bitcoin could, if its users wanted to, adopt the mechanism that other blockchains use to prevent this (without any other changes unless they were also desired).

Thanks for the response David! My question was about cryptocurrencies in general (it just found its way into the bitcoin subforum by accident). My thought was that if we can find an easier way reject fraudulent sidechains, it would more easily be possible to make finite blockchains that fit into every smartphone in order to decentralize mining. link


text:
Is the public address for Tesla's wallet known?
I understand if this isn't likely the place.
It has been all over the news that Tesla has bought 1.5 billion in bitcoin. I'm curious if tesla's public wallet address(es) are known?
If they are not known, what is the most likely culprit? shouldn't it be public information?

No, it's not known, and information like that generally won't be publicly released. Bitcoin addresses aren't generally publicly associated with the real-life identities of their owners.
I would expect a company like Tesla to have the bulk of their cryptocurrency assets stored in institutional custody regardless, for liability and regulatory reasons.


text:
What is the actual weight of the bitcoin blockchain?
In several websites, I read different current size of bitcoin blockchain:

https://ycharts.com/indicators/bitcoin_blockchain_size
and
https://www.blockchain.com/explorer/charts/blocks-size

both say around 620GB.

https://bitinfocharts.com/bitcoin/

say around 490GB.

https://www.statista.com/statistics/647523/worldwide-bitcoin-blockchain-size/

say around 600GB, but below in the page it's written

Bitcoin's blockchain size was close to reaching 5450 gigabytes in 2024

??? what do these 5.4TB come from?
And why there are incongruences among different websites? Maybe bitinfocharts.com only considers blocks without indexes? Answer is no, because for example the above ychars.com and blockchain.com websites (which both gives 620GB) tell that indexes are not included, so...

The answer below gives good discussion of the legitimate differences, but the Statista article text is just bizarre. I wonder if it's AI-generated or something.

My node currently reports:
$ bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 873668,
  "headers": 873668,
  "bestblockhash": "00000000000000000001b0251f80ba44e47217f661a06628f48eb71d659ce0eb",
  "difficulty": 103919634711492.2,
  "time": 1733586184,
  "mediantime": 1733584532,
  "verificationprogress": 0.9999971534840028,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000009ef4d8bff5438c3689882eee",
  "size_on_disk": 706175424632,
  "pruned": false
}

size_on_disk "accounts for block files and undo data, and not for chainstate or any indexes you may have enabled  on the block data" (H/T Pieter Wuille in comments). This includes stale blocks and invalid blocks the node may have downloaded and validated. 706,175,424,632 bytes translate to about 657.68 GiB. Only the block data of the best chain should even be a little smaller, so 620 GiB might fit that.
I don’t know how bitinfocharts.com gets only 490 GiB. They must be using a different methodology. Perhaps they are providing a sum of the total serialized block data instead of the size of a node’s block files, but that’s just a guess.
From your source at Statista.com:

Bitcoin's blockchain size was close to reaching 5450 gigabytes in 2024, as the database saw exponential growth by nearly one gigabyte every few days.

I have no idea how Statista arrived at "5450 gigabytes", and the blockchain does not grow exponentially, it is growing linearly at no more than 4 GiB per week. It could briefly grow faster if the hashrate suddenly increases, but the difficulty adjustment would quickly correct that.


text:
pywallet needs 'bsddb' package to run, please install it
On a Ubuntu 24.04.1 LTS VM I installed Python 2.7.18 via:
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xzf Python-2.7.18.tgz
cd Python-2.7.18/
sudo ./configure --enable-optimizations
sudo make altinstall
python --version
Python 2.7.18

pywallet downloaded via:
git clone https://github.com/jackjack-jj/pywallet.git

Running:
python /home/john/pywallet/pywallet.py --dumpwallet --dumpwithbalance --wallet=/home/john/bitcoin/.bitcoin/wallet.dat
pywallet needs 'bsddb' package to run, please install it

Verifying Python is correct version:
python --version
Python 2.7.18

Using Python's -v (verbose) option I see:
import bsddb # directory /usr/local/lib/python2.7/bsddb
# /usr/local/lib/python2.7/bsddb/__init__.pyc matches /usr/local/lib/python2.7/bsddb/__init__.py
import bsddb # precompiled from /usr/local/lib/python2.7/bsddb/__init__.pyc

The above paths contain bsddb.
bsddb was installed via:
wget https://files.pythonhosted.org/packages/f0/24/92034482656945fc6ceb10551222b43a0ff8d0c87e15839120487820067e/bsddb3-6.2.9.tar.gz
cd bsddb3-6.2.9
sudo pip install -e /home/john/bsddb3/bsddb3-6.2.9 --log /home/john/LOG_FILE

The above LOG_FILE shows:
Successfully installed bsddb3

I needed to use the pip install -e because pip was producing errors on the SSL/TLS front.
When I test (import bsddb):
python
Python 2.7.18 (default, Dec  7 2024, 14:38:44)
[GCC 13.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bsddb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/bsddb/__init__.py", line 67, in <module>
    import _bsddb
ImportError: No module named _bsddb
>>>

Looks like bsddb isn't installed correctly, any ideas?

your bsddb module was either not installed or not properly linked during the Python build.
to fix that we install DB Berkeley properly
sudo apt update
sudo apt install libdb-dev libdb5.3-dev

then we rebuild
cd Python-2.7.18/
sudo make clean

we reconfigure
sudo ./configure --enable-optimizations --with-dbmliborder=gdbm:ndbm:bdb

then finaly we install and build and it should be linked properly
sudo make altinstall

now it should work
sudo ./configure --enable-optimizations --with-dbmliborder=bdb --with-bdb=/usr/local
sudo make altinstall


text:
Errors while verifying public keys in pgp (bitcoin core 26 / ubuntu 22.04)
Following the official how-to (step #6) and trying to verify bitcoin-26.0 release signature, I'm unable to import any of the builder keys I download.
For example on gpg --import achow101.gpg, I get
gpg: [don't know]: invalid packet (ctb=7b)
gpg: read_block: read error: Invalid packet
gpg: import from 'achow101.gpg' failed: Invalid keyring
gpg: Total number processed: 0

Does anyone had the same issue? I'm using Ubuntu 22.04.3 LTS.
Many thanks.

I cannot reproduce your issue. My steps were: 1. go to the key file of achow101, 2. click "Download raw file" button, 3. gpg --import Downloads/achow101.gpg which succeeded. This machine runs Ubuntu 23.04, but I don’t expect that to be the issues. How did you acquire the file?

Great, could you please write that as an answer post instead of a comment?

[Solved] I got the file with wget https://github.com/bitcoin-core/guix.sigs/blob/main/builder-keys/achow101.gpg. That's my error here, the correct link is https://raw.githubusercontent.com/bitcoin-core/guix.sigs/main/builder-keys/achow101.gpg. Thank you Murch for your answer!


text:
How do I recover from a cryptocurrency scam?
I lost about $45,000 to crypto investment scam just recently. The
company posed as an investment company that could deliver a certain
percentage in returns if you deposit your Bitcoin with them. At first, it seemed real, it worked twice. I didn't realize they set up a bot (robot) that will completely shutdown your account after you have decided to invest high. I suddenly couldn’t access my profile, I complained to the admin, he gave a excuses that they had a downtime and needed to upgrade their website, this took over 2 months. Within that period, I began to suspect that I had been scammed. I contacted my bank to see if they could do anything about this situation, they couldn’t. Local police say it’s impossible to get my money back.
Can anyone help me? This has made me really frustrated as I invested all my savings.

Assuming this is in the United States based upon your use of $, document everything and report the details of the scam to the FBI. Your money is likely gone, but they may be able to direct you further and the scammer(s) will make mistakes as they go and be brought down eventually.

Try to find others who got scammed by the same "company" and pool your resources to pay for an investigation. IANAL but a class action lawsuit may be an option.

This does not deserve a whole answers so I will put in a comment. RedGrittyBrick and Bill Huneke have given some good information, Sadly you cannot count on the police. But bare in mind that every bitcoin transaction is traceable. Your transaction to the scam wallet, form there bitcoins will travel through some proxy wallets to cover the tracks. But, every single transaction is recorded in block chain. So your bitcoins can be traced to endpoint, which is some bitcoin exchange market where they were exchanged for real money. With any luck the exchange has records who received the money.

Did you send them dollars or did you send them bitcoins?

How do I recover from a cryptocurrency scam?

You don't. At least, you don't recover your money. I guess you recover by learning from the mistake and doing things more safely in future. It may be worth asking an accountant if the financial loss on your investment can be offset against other taxable income.

I contacted my bank to see if they could do anything about this situation

The whole point of cryptocurrencies is to take control away from banks.

Local police say it’s impossible to get my money back.

True. for any loss less than $100000 the police are likely to only hand out advice. It isn't worth their while to try and investigate most cases where people willingly give their own money to unknown people in faraway countries. Foreign police forces often just ignore any requests for help in such matters.
Although there's nothing I can find in the writings of Satoshi Nakamoto about law enforcement and Bitcoin, the blockchain is deliberately designed to promote privacy and an effect of this is to make it harder for police to investigate Bitcoin related crime. It is obvious that privacy was important to the designers of Bitcoin.

Can anyone help me ?

No.
However plenty of scammers will offer to help you. Ignore them. Having been tricked once, you are now a prime target for confidence tricksters who think you may be vulnerable and easily tricked.

This has made me really frustrated as I invested all my savings.

This is understandable. Sorry for your loss, I hope you are able to put this behind you and move on.

Related Questions:

Trust and 3rd parties

How to tell if a cryptocurrency exchange or trading platform is trustworthy?

Tracing money

Recovery from theft — Tracing money to exchanges
Can I get any info of the owner of the bitcoin wallet?
HD addresses and traceability question
Trace fund flows between Bitcon addresses using transaction data

Remember:

The Bitcoin blockchain contains no information about people or accounts. The Bitcoin network itself deliberately does not require anyone to register or identify themself.
Thieves are likely to quickly pass money through many  accounts and/or wallets, including accounts or wallets created by other victims they have tricked into laundering stolen money (e.g. by fake jobs etc), through many exchanges, back and forth into different cryptocurrencies, into gift cards cashed for them by other victims, etc.
Exchanges and other businesses may operate in countries that require them to protect the identity of their customers. These businesses may not want to be the arbiter of who is telling the truth. You may need court orders or criminal investigation by police, possibly in multiple countries, to get an exchange to divulge information. This is not simple.

"The whole point of cryptocurrencies is to take control away from banks." And law enforcement.

Couldn't "how to recover" also include proper accounting for tax purposes? Might it at least be possible for OP to get a tax break on the money lost?

@R interesting point. answer updated

@JollyJoker: Answer updated.

for any loss less than $100000 the police are likely to only hand out advice out of interest, what country you are talking about? USA? isn't that a sort of scam? company fake activity that has nothing to do with what they declared

@Suncatcher: UK¹, No, Yes.    (¹ based on presentation by ex-police regional cybercrime officer)

but is this 100K limit is based on some laws or just established common practice? can you file a complaint to prosecution or somewhere about police inaction?

@Suncatcher: There is no fixed limit, it is just an example based on the example cases the ex-policeman described to us at a security awareness briefing. The decision whether to investigate depends on an overall assessment of the case. You can always complain to the police commissioner, to the independent police ombudsman or to your local member of parliament. As an example, nobody will spend $50000 investigating a dispute between someone who sent $500 claiming it was an investment to someone in Russia who apparently used a false name and where Russian police won't cooperate.

I'm sorry for your loss. As a 'tech person' reasonably informed about cryptocurrency, I concur that it is highly unlikely that you will ever recover any money.
Some information about Bitcoin and online scams
Technically, it is not hopeless though. You recovering (some) money would hinge on this chain of events:

It is not completely impossible that the perpetrators will be
identified. Especially if it can be established that there are a
large number of victims, thus warranting proper investigation resources.
If they are ultimately identified, it is
possible they will be charged (quite likely in some jurisdictions,
highly unlikely in others, I imagine).
If they are charged and
convicted it is possible (but not likely) that some of your money
will be returned to you. Again, that probably depends on the
jurisdiction but it also largely depends on how much money can be
squeezed out of them compared to the number of victims.

How to identify the perps?

It is false that bitcoin transactions are "untraceable". There was a recent global bust related to child exploitation, for example, that was built on bitcoin addresses
Even if not traceable today, I imagine that in the next decade or two, public resources may make it easy to track down a large number of the more significant-sized bitcoin addresses. What doesnt work today, may still warrant follow up in a few years. Particularly in the case of large accounts
Information other than bitcoin addresses can also help. They must have had a website, email addresses, maybe they phoned you. Any of those details may, in some cases, help find the perpetrators. It is certainly possible to 'cover your tracks', but not everybody does this and does it correctly.

What you can do
Collect all the raw information (all emails, dates and times, phone numbers or call logs, the bitcoin ATM into which you put your cash or other currency exchange details).  Take that all that raw data to law enforcement. Maybe, try various branches of law enforcement. Maybe try to find a way to connect with other victims so that the importance of your case is increased (you would have to contract a knowledgeable programmer to attempt this).
Professional money recovery?
Apparently, there are services you can hire that specialize in this. Some of them seem to imply they don't charge unless they are successful. You might want to spend some time browsing Google search results such as these. I know nothing about these.
Obviously, be very careful since some of these may be tricky (but legitimate) or even fully fraudulent. Some of these may be cynically built on the theory that someone who has fallen for a scam should be easy to scam a second time. But if you can find a service that looks good and you figure out some way to validate it as a trustworthy (maybe get someone to help you with that), it might be worth trying out.
In my opinion these services are, theoretically, not necessarily fraudulent. (How's that for a recommendation?)
Conclusion
All this is probably a lot of work and might even entail more money invested and probably low chance of success. But, given how ignorant most people are about Bitcoin and online scams in general, I wanted to weigh in. If you've got the time and the will, I think you deserve to be able to consider all your options.

"They must have had a website, email addresses". This is definitely where OP should start. It may not lead very far, but for people not very knowledgeable in the workings of cryptocurrencies, this can still be a treasure trove of information, especially if any of those are hosted in the US or other friendly country.

Short of having law enforcement and the legal system whose jurisdiction the scammer(s) reside in compelling them to return the funds, you are out of luck.
Bitcoin transactions are irreversible. Once they have the coins in addresses for which you do not own the keys, there is nothing you can do to recover them.
Your only option may be to treat this as an expensive lesson. If it is too good to be true, it probably is.

I am not even sure BC was even involved. It could as well be that the scammers took the money, put it anywhere safe and pretended they invested it in something like BC. In the end, everything around that what happens behind such a systen is scam and fake, so…

Your best bet is to report to the proper authorities.
Contrary to popular belief, Bitcoin transactions are in fact traceable. There is a slight chance that the scammer(s) proceed to make a mistake and withdraw the BTC you transferred in a way that sheds a light on their identity.

If you know at least one BTC address of the scammer than analytical tracing can start. Another post is flagged as related to this one:
Looking for someone to help me recover stolen BTC
There are addresses listed with the message that they belong to the scammer. The first one belongs to the exchange Luno.com so the scammer moved the coins directly as deposit to a service. I'm too lazy to type the other addresses from the picture but I assume you'll find similar situations. If you're sure that the scammer used these addresses and you want more information then pls paste it here in a copy/paste version.
In most cases it's not so easy but in case the scammer cashed out there then the exchange might know the id or bank account data of the scammer. Or at least a withdrawal address of the scammer.
You need law enforcement support to get client data from an exchange.


text:
What prevents miners from mining more bitcoin after 21million btc?
What prevents miners from mining more bitcoin after 21million btc was mined?

related: https://bitcoin.stackexchange.com/q/161/5406, https://bitcoin.stackexchange.com/q/13374/5406, https://bitcoin.stackexchange.com/q/2756/5406,

The Bitcoin protocol allows block authors to create a limited amount of new bitcoins in the outputs of the coinbase-transaction (which also collects the transactions fees) in each block. The amount of the so called block subsidy is limited by the consensus rules.1 Creating more than the allowed amount makes a block invalid to other Bitcoin nodes.
Each full node unilaterally enforces the consensus rules. This means that while a miner would be able to create a block that breaks the consensus rules, every other full node in the network would recognize it as invalid, drop the block, and ban the peer that sent it to them.
A change in the consensus rules that allows blocks that were previously considered invalid is called a hardfork. Hard forks require social consensus of the complete ecosystem or will cause a split of the network as each node operator determines for themselves which software to run. Even if a majority of the hashrate and a majority of the network's nodes hardforked to a new version of the Bitcoin protocol that allowed blocks with a higher block reward, the remaining nodes enforcing the original consensus rules would consider it invalid and continue to follow their own rules. Therefore, an intolerant minority may be able to veto a hardfork, especially if this minority has a significant share of the economic weight. If the economic majority prefers the original rules, miners following the hardforked chain may find it difficult to sell their mining reward. This is essentially what happened in the case of the SegWit2x hardfork attempt.
In the case that both protocol versions have some economic support, a persistent fork may be calved in the form of an airdropped altcoin. This is essentially what happened in the cases of Bitcoin Cash spinning out from Bitcoin, and Bitcoin Cash calving Bitcoin SV.

1
The block subsidy started at 50 bitcoin per block and halves every 210,000 blocks. We're currently in the third era where miners are allowed to create 12.5 bitcoin per block. Having recently passed block 600,000, more than 18,000,000 bitcoins have been found already, and the next halving to 6.25 bitcoins per block is coming up at block 630,000 in spring 2020.

How does the bitcoin protocol detect if more than the allowed limit of bitcoin is created?

The protocol doesn't. Every other full node does, though. Every single full node individually rejecting the invalid block then causes the block to be rejected by the network collectively.

So basically if you do 51% attack, you will be able to create more bitcoin, am i right?

@Zheer: No.  A 51% attack gives you the ability to create a longer blockchain (in terms of work) than everyone else put together, which will be accepted by conforming nodes as the true blockchain if it consists of valid blocks.  But if your blocks create more bitcoins than the protocol allows, then they are invalid and conforming nodes will reject your chain, no matter how long it is.

@Nate Eldredge if you control most of the nodes say(90%) how can the confirming nodes prevent you from creating more bitcoins than the protocol allows?

Well, there is certainly nothing stopping you from mining your own chain following different rules, and awarding yourself as many coins as you like.  But anyone who is still running an ordinary node or client will not consider those coins to be "bitcoins".  If you try to use those coins to pay someone running an ordinary client, their software will not tell them they have been paid, and they won't give you any goods or services in exchange for those coins.

@Zheer: It's analogous to me firing up my laser printer and printing millions of "dollar bills" with my face instead of George Washington's.  Sure, I can make as many as I want, but everyone can see that they are not the same as the "real" bills, and they won't accept them as payment or give me goods or services in exchange.

@Zheer: It is of course possible that people would decide to adopt a client with a higher limit, just as they could decide to start using my money in place of the US dollars issued by the Federal Reserve.  They could even decide to start using the name "Bitcoin" for the new protocol, just as they could decide my money is now the "real" US dollar.  But it would require a conscious decision.

@Zheer: And by the way, none of this has anything to do with how much mining power is controlled.  You can mine your own chain, with your own rules, whether you have 1% of the mining power or 51% or 99.9%.  But other nodes still get to decide what protocol they want to follow; you can't force them to change.

When a miner find a valid hash he had to write the new block according to  the bitcoin protocol rules, if he try to cheat, like writing that instead of the 12.5 bitcoin that issued to the bitcoin miners (him) it is 50 bitcoin, the network will refuse and ignore this block till he write it properly or someone else write it with the good hash and the right rules.
So in your case the protocol said that there will be no more bitcoin issued after the year 2140 if the protocol does not change, a winning miner have to be careful to follow the rules when he issue his block or he can loose his coins since another will see the winning hash but not the proper block, so he will write the block himself with the winning hash and the proper rules and take the coins for him.

"the protocol of the bitcoin network which is agreed by more than 51% of the miners" this is false, a majority of miners cannot arbitrarily decide on the network's rules. It is the network's nodes which decide this. If a majority of miners change the rules, then the network's nodes will simply ignore the new blocks they create.

In order to change the bitcoin protocol you have to do a hard fork, am i right?

@Zheer not necessarily, what you have to do is submit a BIP and then depending on the modification it can be a soft or a hard fork, see this article https://medium.com/@galea/bitcoin-development-who-can-change-the-core-protocol-478b8ac5fe43

@Zheer: The miners could collectively enforce a soft fork, i.e. a tightening of rules to reduce the valid set of actions to a subset. The miners cannot loosen rules unilaterally as blocks would get rejected by the nodes that still enforce the rules.
See here for a more comprehensive explanation: https://bitcoin.stackexchange.com/a/30821/5406

Bitcoin block reward gets cut in half, mathematically limiting the reward. This happens every 4 years, roughly speaking. The block reward hits 0 when the amount mined is 21 million. The reward keeps declining until this happens.


text:
Don't miners control who is allowed to make transactions?
Simple question really, considering theres a very small group of miners controlling the chain ATM.
Whats to stop them from being forced by the goverment to disallow certain transactions or just mining empty blocks to jack up the transaction price?
Or even worse, whats to stop a country like china from just investing massive ammounts of money into unbeatable mining pools and destroying every appearing coin that way?
Don't miners have way to much power in the current system? Especially since crypto is supposed to be decentralized

Simple question really, considering theres a very small group of miners controlling the chain ATM.

Miners are distributed around the world, many of them may join the same mining pool to even out the variance in payouts though. Do not confuse the number of mining pools for the number of miners. Really, it is not possible to know the number of distinct mining entities that exist.

Whats to stop them from being forced by the goverment to disallow certain transactions or just mining empty blocks

Nothing. If a certain govt could reliably regulate any miners within their jurisdiction, then they could perhaps enforce a rule like this.
The good news is, since hashing power is distributed, no one govt can censor the chain in this way. If Govt-A decides to censor transactions, it won't affect any miner that exists outside of Govt-A's control, and so while the transactions in question may take a little longer (on average) to get confirmed, this won't censor them outright.
In fact, the miners existing under Govt-A's rule will now likely become less profitable, as they will be unable to mine the transactions that are sanctioned by Govt-A. This means all other miners will become more profitable for it - the system is self-balancing in this respect.

Or even worse, whats to stop a country like china from just investing massive ammounts of money into unbeatable mining pools and destroying every appearing coin that way?

The majority-attack (51% attack) is a well-known attack that is possible against the network. An attacker with a majority of hashpower could censor transactions indefinitely, but there is a caveat: doing so requires a HUGE investment of capital, and then a HUGE ongoing electricity cost, for the entire length of time the attack is maintained. Further still, once the investment into the specialized computer hardware is made, an entity could mine profitably instead of spending money to attack the network. This is a heavy financial incentive - perhaps some government would be willing to ignore this, but it seems unlikely for an attack to be sustainable (and indeed, we have a decade worth of evidence of a system that works as intended, and has not been attacked in this way).

Excellent reply. I'd just like to note one important aspect. Mining pools control which TX's go into blocks. So, even though the pool participants are scattered (we don't know how scattered though), the concentration of mining power into less than a dozen pools is cause for concern. I made a quick spreadsheet from data from blockchain.com and over 70% hashrate is in Chinese pools.

@JoseFonseca that is a good point, and there is work being done to remedy that exact problem. For example see BlueMatt's BetterHash protocol, it allows the individual miner to generate the block template (and thus pick transactions), even if they are mining as part of a pool: https://github.com/TheBlueMatt/bips/blob/master/bip-XXXX.mediawiki

The stakeholders of bitcoin don't want miners to do that. If miners do that, the stakeholders (the people who are paying for the miners to mine) would change the rules. For example, they'd change the mining algorithm. That would turn the miners expensive ASICs into space heaters (a little faster).

Don't miners have way to much power in the current system? Especially since crypto is supposed to be decentralized

The miners only have power because the people paying for their mining hardware and electricity like the job they're doing. If they don't provide the censorship resistance and forward progress without double spends that the stakeholders want, the rules will change.
Miners know this and such a scenario would cost them a huge amount of money, so they are strongly incentivized not to let it happen.

What you are describing is a majority attack which a miner own more than 51% of the hashing power, it has happened once in 2014 but the miner then decided to lower its power to allow the bitcoin to work as intended, you should also notice that the things a miner owning this power can do is limited, see this answer: https://bitcoin.stackexchange.com/a/662/95422
Now if someone or a government try to do a 51% attack, it will cost a huge amount of resources even for a country like China to being able to own more than 51% of the hashing power, and once they have that they will likely make the trust in the network to zero and the price with it too, rendering the operation quite costly for almost no benefit, whereas they could use that power to play the game with the other and get rewarded for it.
Here is a better summary in video: https://www.youtube.com/watch?v=yWTQgmCuiCw&feature=youtu.be
and a more in depth answer: https://bitcoin.stackexchange.com/a/90309/95422


text:
Is there any reason a lightning node could not be ran without fees?
Every lightning node charges fees to route payments. This is I assume because running a node costs electricty and effort. But I was wondering, since bitcoin fees are not incurred after a channel is created and before it is closed, there is no technical cost to running a lightning node. So let's say some good samaritan with has 50BTC burning a hole in his pocket. Considering he's absolutely loaded, he takes that money, sets up a lightning node and routes payments for absolutely no fee, neither base fee nor transaction fees (presumably becoming the most popular node in the process). Could he do that without incurring any costs, aside from closing and opening channels (for which he would charge incurr fees to pay bitcoin miners). Or is there still some way he looses money simply for routing transactions?

The good samaritan ("Sam") would indeed not lose money per se. However, if there are no fees on Sam’s channels, some channels may get lopsided as only one direction does not cost fees. For the channels to remain useful, either Sam or his counterparties may need to spend additional funds to rebalance the channels.


text:
How to send zero fee bitcoin transaction
Please does anyone know how I can send zero fee bitchin transactions? I know if might not confirm, I just wanna know if there are any wallets or sites or softwares that I can use to accomplish this.

As RedGrittyBrick noted below, a transaction is only considered reliable after it is confirmed. The first confirmation happens when a transaction gets included in a block. It's not clear to me what you're trying to achieve by sending a transaction that doesn't get confirmed. Could you please elaborate?

Bitcoin Core and a number of libraries that facilitate building transactions will allow you to create a zero fee transaction. The problem is that most nodes on the network will not relay transactions with a fee rate below the minRelayTxFee (1 satoshi/virtualbyte). Additionally, most miners don't include transactions below the minRelayTxFee in their blocks.

I don't care if it never confirms, I just want it to appear on the blockchain. I would to know the simplest way to do this as I'm not experienced in writing codes and can't download the whole blockchain on bitcoin core.. Maybe like a wallet or site that will help me achieve this.

@sissy, not being confirmed is the same as not being in the blockchain

One of the reason wallet force fees is to prevent spam, if they allow customer to send zero fees transaction that have almost no chance of being accepted by miner, their node will be banned (my guess).
In fact you should be careful if you find a wallet that allow you to do zero transaction fees, since they have no incentive to do that it could be a scam trying to steal your private keys.
The solution is simply to make your own node so you can play around and test with zero fee transaction, you can start there:
https://bitcoin.org/en/full-node


text:
How to create a bitcoin transaction without inputs
How can I create a transaction without inputs and it will be broadcasted but of course won't get confirmed? I would like the simplest method to do this

This is not possible. Only the coinbase transaction is allowed to have a null, or non-existent input, and the only way to create that is to mine a block. Moreover, it must adhere to additional rules, such as the inclusion of the block height in the coinbase section of the vin (the scriptSig) as per BIP 34.
Unless you happen to run a mining pool, or have enough hashpower to solo mine a block, you cannot do this.
Creating a transaction with no inputs whatsoever is not possible without a hard fork.

But I've seen video evidences of this happening. A transaction was made but its never confirmed cos it's not real.

Do you have a link to the video? That sounds extremely unlikely, and more likely as a way to sell you on some scam service

https://youtu.be/s8Ij1oPYBsU that's a video evidence. It's very real.

@sissy That is a scam, those videos are aiming to sell you software which will steal any crypto on you computer after you install it. The videos are a way to market them to people who are not familiar with the space and are looking for shortcuts/hacks

Coinbase transactions have inputs. They just reference null outpoints.

@pinhead Right, my mistake. I've update the answer

In addition, BIP144 uses a 0 to mark SegWit serialization. That 0 would be interpreted as "tx has no inputs" by non-SegWit nodes and rejected: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki#Serialization


text:
scantxoutset timing out
I have extremely simple python code to use scantxoutset.
The problem is that when I debug in pycharm it keeps timing out.
rpc_connection = rpcConnector.rpcConnect()

json_req = [{"desc": "addr(1K6KoYC69NnafWJ7YgtrpwJxBLiijWqwa6)"}]

tx_scan = rpc_connection.scantxoutset("start", json_req)

If I run without debugging, the script finishes before scantxoutset returns anything.
Am I using this incorrectly?


text:
How can I import the private keys of a MultiBit Classic wallet into Electrum?
I had an old Multibit Classic program on my computer. I was able to open the private key using OpenSSL. I downloaded Electrum to my computer and created a new wallet importing the private key. However, now when I open Electrum I don't see my bitcoins, the balance and history show empty. Is there anything I can do?

Hi Nakke, there are 278 questions on this site with the "multibit" tag, including 16 also tagged with "electrum". Are you sure none of them have a solution to your problem?

Hi. I have tried searching but have not found an answer. Many of the questions are related to decryption and I do not have this problem.

Is it possible that your Electrum wallet only created addresses of a different output type than the one you were using with MultiBit? Have you checked whether Electrum and MultiBit use the same derivation paths?


text:
Can a blockchain's transactions be reversed?
Blockchains are often described as 'immutable' (meaning the history cannot be rewritten after the fact), but is this really true? How easy is it to change the history?
I have read about the Ethereum DAO hack and how the blockchain has been hard forked to reverse a transaction by the hacker. This is very disappointing. I thought cryptos by design were irreversible, even with a hard fork.
How can we measure the immutability of a blockchain? Is Ethereum less safe than Bitcoin, for example?

I've edited this question to be more on-topic. In its original form I agree it would be off-topic, but the core of the question is still relevant and interesting to Bitcoin users, so I think it is worth keeping open.

No, as far as we know, Ethereum transactions cannot be reversed.
The DAO hack exploited a badly coded smart contract.
The smart contract runs on top of Ethereum, so there are two layers involved here: the Ethereum blockchain and virtual machine (EVM) and the smart contracts which run on the EVM.
Neither the EVM or the Ethereum blockchain were exploited. That one particular smart contract was.
You may be referring to the 2016 Ethereum fork. That was, indeed, a controversial fork which led to a discussion about Ethereum governance.
In that particular situation, the Ethereum developers did reverse the DAO theft by reorganizing the blockchain. This was done deliberately by the developers. Ethereum wasn't hacked and transactions still can't be reversed, but in that occasion the developers themselves did fork Ethereum to save the DAO funds. They won't do this for any reason though, in fact that fork had widespread support from the community, so your coins are safe. Ethereum won't reverse transactions to harm investors and hopefully another DAO-style hack won't happen in the future.

So basically a transaction can be reversed if a majority of the community (or more likely, the wallet developers) approves of the reverse?

@JoseFonseca "They won't do this for any reason though": It is a very bold statement to make when a precedent has been set.

@user2741831 Yes. That's what happened in 2016. This applies to every cryptocurrency, including Bitcoin. In fact Bitcoin rolled back transactions in 2010.

@UgamKamat Statistically it's a correct statement. Out of millions of transactions only one has ever been reversed so IMO it's fair to say they don't do this for just any reason and without overwhelming public consent. In the end The People rule cryptocurrencies. If 97% of users demand a change, they'll likely make the change.

Probably makes me a bad person, but I feel like the goal of bitcoin is removing the human (corruptible) element out of finance and replace it with a purely pragmatic machine. Although I guess if a majority of people simply violate the bitcoin protocol collectively, theres nothing anyone can do about it.

@user2741831 That's correct. Bitcoin aims to be as free from human influence as possible. It's not perfect but it's the closest we've gotten to a financial system without political influence.

@JoseFonseca 2010 Bitcoin rollback was because of the protocol level vulnerability (overflow error), not to undo a transaction that stole somebody else's coins.

@JoseFonseca 97% of eth users did NOT vote on the DAO fork. That website apparently accounts for 2.67 million eth worth of votes, out of ~75 million eth that existed at the time (only ~3.5% of eth). For all we know, this 'majority yes' vote could come from literally just one wealthy individual, it is not necessarily representative of the wider userbase. Devs made the decision, attempting to map this choice onto users is trying at best.

@UgamKamat Correct. I'm not passing any judgement at all about whether one was more justified than the other. Personally I would not have forked ETH, as bad as I feel for those who lost funds.

The Bitcoin blockchain is not absolutely immutable, it is probabilistically immutable.
We say this because the history of transactions (the blockchain) is secured by mining power, and mining success is a probabilistic. Given a certain amount of hashpower, we expect that we'll find a block within some certain amount of time - but it is possible to find the block on the first attempt, however incredibly unlikely that may be. So for an attacker to re-write history, we expect that they will need a majority of hashpower on the network, otherwise probability is working heavily against them. For more info see section 11 of the original bitcoin whitepaper.
So the finality of a transaction is related to what portion of hashpower is being controlled by 'honest miners'. Thankfully, there are heavy financial incentives for miners to behave honestly, and so after a decade of operation, we haven't seen a majority-attack against the network take place.

The DAO hack was a different situation: ethereum developers decided that rolling back the chain to erase the DAO hack (and all transactions that had happened since then) was a good idea. This led to an interesting conundrum: what is the real guarantee offered by a blockchain? Is it probabilistic immutability? Or is there more to it than that? How much does the human element weigh in, and control the outcome? Why did the Eth developers have such power?
This is an important test of one of the core tenants of a system like Bitcoin: does any group control the protocol? How large of a group is needed, before effecting a change becomes possible?
If every single bitcoin user decided that it was a good idea to change the protocol to include a mandatory cat image with every transaction, then it would be simple to make the change (after all, everyone already agrees, and will implement the change). However, if only a small portion of users want to make this change, then they will need to convince the rest that it is a good idea. As the network grows and more users come on board, this becomes increasingly difficult to accomplish.

For bitcoin (or any blockchain) to succeed, it is paramount that no small group is able to make these sorts of decisions unilaterally, otherwise that group would represent a huge threat to the network. If the group were compromised by a bad actor, they could wreck undue havoc on the network.
This is a crucially important point: having a large, decentralized network with many users makes it more difficult to enact change. If a network has a small number of users, it will be easier to convince a majority of them to make the change.
Looking at Bitcoin's history, we can see that it is extremely difficult to force a change onto the network. Some of the most influential businesses, persons, miners, and some developers pushed heavily for a change in the base block size in 2016/2017, but were unable to convince the majority of network users to go along with it, and thus failed.
Even the developers cannot unilaterally push a change onto the network. They can propose changes (including rolling the chain back), but if the users (ie those that run nodes) do not agree with the change, then the devs cannot force it through. The open source process involves a ton of peer review and is a transparent process that would be difficult to push a contentious change through. Anyone is free to propose a change, of course, but the onus is on the proposer to convince everyone else that it is a good idea.

TL;DR:
As a user, you should want some guarantees that the system of money you are buying into will not be arbitrarily changed or rolled back at some point in the future. This means at least two things:

There is a large amount of mining power securing the network (and no large pool of hashpower that could be pointed at the network exists otherwise).
No small group of people can easily force a change onto the network.

Doesn't that just ultimate ly mean the majority of devs control the entire currency and human apathy?

@user2741831 no, the devs can propose changes, but ultimately in a healthy (sufficiently decentralized) network it is users that must agree with and adopt the changes proposed. Devs cannot just force a change through. I've added a little more info to my answer to help explain this.

but if the program used for mining, for example, hive os, is being used for a lot of miners,  miners actually don't have the power right? even if the miners don't want an update, hive os could agree one day to change the code, and they'll win because they have majority of miners on control

@JohnBalvinArias no, if hive OS released a malicious update, miners could a) not update to it, and b) ultimately run a different OS. In the case of hard-forking changes, regular users would also have to update their nodes with the new code as well. In the case of soft-forking changes, a majority of hashpower would have to enforce the change in order for it to take hold. Nobody has the unilateral control to enforce such a thing.


text:
Where can I find Armory 92.3 for download?
I am trying to use Windows XP and need Armory 92.3
to do it. Where can I download that version without compiling?

A version for XP can be downloaded from github. This is actually 93.3 not 92.3. It says "Armory 0.93.3 for Windows XP, Vista, 7, 8+ (64-bit)"
I have not used this version and cannot vouch for it in any way.
As I expect you know, Windows-XP is an insecure operating system. Microsoft stopped supporting XP in 2014, 5 years ago now. Personally I'd install Linux (e.g. Ubuntu) on the same hardware in order to create a safer environment than XP for a Bitcoin wallet. This might be slightly less of an issue if the computer is never connected to the Internet or to USB devices etc. Duubtless you have considered this but I feel I should mention this for any less-informed people who might read this.


text:
MultiBit with multiple addresses to Electrum
I have an old MultiBit Classic wallet, where I have received some BTC to two addresses (same wallet). When I import the private key from MultiBit (seems it's the compressed variant) to Electrum desktop, Electrum imports it correctly, but shows only transactions and balance from the first address. Transactions received by the second address (which happened years later) are not shown and I can't import the second address into Electrum, because the wallet is non-deterministic.
I would like to simply send all the money from MultiBit to a new Electrum wallet, but the old MultiBit has trouble synchronising with network.
Please help - how to move all the BTC associated with my private key to a new Electrum wallet?

go to Tools-> Export Private Keys
After you find the .key file, open it in a text editor. The key file should start with the line: “KEEP YOUR PRIVATE KEYS SAFE !”
The keys start at the last # line

Thank you. I did not realize that MultiBit created another PK.


text:
Why isn't my PSBT considered complete after walletprocesspsbt and finalizepsbt?
I created a transaction using createrawtransaction spending a UTXO that I own the keys to and then converted it to PSBT using converttopsbt, then I used walletprocesspsbt and finalizepsbt. After finalizepsbt, my "complete" value is false.
Is there a way to get more details on why it's not considered completed?
Thanks,
Francois

Have you tried using analyzepsbt to see what it thinks the next step is? You could also use decodepsbt to inspect it and see if there is anything missing.

Thanks Andrew! I missed the method analyzepsbt.

Any updates here?

@Andrewchow: given that Francois was asking how to figure out more details, I think your comment would be a great answer.

Hi Pieter, Andrew, Murch, I had a weird bug where after importing a private key into my wallet, when doing the walletprocesspsbt, it did not sign my psbt transaction. I reloaded the wallet and was able to successfully sign the transaction. Are the wallet private keys cached on load? It's also possible that I was the problem :). The analyzepsbt gave me the clue to investigate my issue. Thanks for the help guys!

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.


text:
Error when doing a getdescriptorinfo on a Miniscript descriptor (V24.0.1)
I'm trying to play around with miniscript and import them into Bitcoin Core v24.0.1.
I created the following descriptor in https://miniscript.fun  and tried to validate it in Bitcoin Core
bitcoin-cli getdescriptorinfo "wsh(thresh(2,nl:older(12960),s:pk(038b4059419fe3b95acdee6aff2f9afdca87231d14bd2cbcd3367b11d9d819a71d),s:pk([c893176c/48'/0'/0'/2']xpub6EpqBFyJW2qiEmgcYZqwEGCRuQh3y9fY72RWeAG7pNvKJWgnx7mkviWtfsF7VNQhWPx43zzNfkWhoF8RcnP2KKsXbNHrFNdzx8MFy83N5Sq/0/*)))#925wgae2"

However, I get the following error:

A function is needed within P2WSH

Where did I go wrong?
Thanks!

Your descriptor (including the Miniscript) is valid. I think you are getting this error because you used an xpub (mainnet encoding of an extended public key) on a testnet node.
On a mainnet node:
$ bitcoin-cli getdescriptorinfo "wsh(thresh(2,nl:older(12960),s:pk(038b4059419fe3b95acdee6aff2f9afdca87231d14bd2cbcd3367b11d9d819a71d),s:pk([c893176c/48'/0'/0'/2']xpub6EpqBFyJW2qiEmgcYZqwEGCRuQh3y9fY72RWeAG7pNvKJWgnx7mkviWtfsF7VNQhWPx43zzNfkWhoF8RcnP2KKsXbNHrFNdzx8MFy83N5Sq/0/*)))#925wgae2"
{
  "descriptor": "wsh(thresh(2,nl:older(12960),s:pk(038b4059419fe3b95acdee6aff2f9afdca87231d14bd2cbcd3367b11d9d819a71d),s:pk([c893176c/48'/0'/0'/2']xpub6EpqBFyJW2qiEmgcYZqwEGCRuQh3y9fY72RWeAG7pNvKJWgnx7mkviWtfsF7VNQhWPx43zzNfkWhoF8RcnP2KKsXbNHrFNdzx8MFy83N5Sq/0/*)))#925wgae2",
  "checksum": "925wgae2",
  "isrange": true,
  "issolvable": false,
  "hasprivatekeys": false
}

On a regtest node (converting the xpub to a tpub):
$ bitcoin-cli -regtest getdescriptorinfo "wsh(thresh(2,nl:older(12960),s:pk(038b4059419fe3b95acdee6aff2f9afdca87231d14bd2cbcd3367b11d9d819a71d),s:pk([c893176c/48'/0'/0'/2']tpubDFCThVnzDJoAWZsTzkq2SBXoEXnhxYAbef1oziKGAHgD3oMW2Lcr5ABiuuKu1sMwJJUxfaWFCrLkVRd31eEGCmKpey39vuJEY5wfj84sNhm/0/*)))#qxjqansp"
{
  "descriptor": "wsh(thresh(2,nl:older(12960),s:pk(038b4059419fe3b95acdee6aff2f9afdca87231d14bd2cbcd3367b11d9d819a71d),s:pk([c893176c/48'/0'/0'/2']tpubDFCThVnzDJoAWZsTzkq2SBXoEXnhxYAbef1oziKGAHgD3oMW2Lcr5ABiuuKu1sMwJJUxfaWFCrLkVRd31eEGCmKpey39vuJEY5wfj84sNhm/0/*)))#qxjqansp",
  "checksum": "qxjqansp",
  "isrange": true,
  "issolvable": false,
  "hasprivatekeys": false
}

This was absolutely the reason. Thank you Antoine!


text:
Multiple outputs and different amounts on blockchain explorer when I sent BTC from Crypto.com to Coinbase
So I sent BTC from my Crypto.com wallet to my Coinbase wallet.
I then went on the blockchain explorer to view the transaction and I am seeing an input that is not my address and various outputs which include my address as well as other addresses that do not belong to me.
The unknown addresses also have different amounts too.
why am I seeing various outputs with different addresses and amounts?
Thank you!

I then went on the blockchain explorer to view the transaction and I am seeing an input that is not my address

I am not familiar with this particular site, but this is not unexpected. When custodial services hold user funds, they don't necessarily keep the funds in a separate wallet per user. Instead, they have one giant wallet with all the user's funds, and a database to keep track of how much of it is owed to each user. For example, this could be a viable scenario:

User U wants to make a deposit, so the service creates address A, stores it in the database as "A is receive addr for U", and hands A to the user on the website.
User U deposits 1 BTC on A. These funds are now controlled by the service, but it credits U with 1 BTC.
User V does the same; the service creates address B, stores it in the database, and hands it to V on the site.
User V deposits 10 BTC on B. The service now controls 11 BTC. The service credits V with 10 BTC in its database.
Now V wants to withdraw 1 BTC to address C. The service looks at its entire wallets, which contains a UTXO worth 1 BTC and a UTXO worth 10 BTC. It decides that it is most economical to use the 1 BTC when withdrawing, and does so - despite the fact that this 1 BTC UTXO is actually the result of a payment crediting another user.

When V now looks at the blockchain, they will observe a transaction that seems to come "from" address A, which is unknown to V. This is misleading. The general advice is not to pay attention to "from" addresses, as they have very little meaning except to the wallet that actually creates the transaction. It is also none of V's concern - they get the funds, and that's what matters.

as well as various outputs which include my address as well as other addresses that do not belong to me.

This too, is expected. Transactions are cheaper when they batch multiple payments together. The website may have queued up your request for a withdrawal for a short period of time, during which other users also made withdrawals. It then constructed a single transaction that performs all these withdrawals in one go, saving fees and wallet fragmentation for the service. One of the outputs may also be "change" going back to a new address belonging to the service, if the input amounts do not exactly cover the total amount intended to be withdrawn.

In an effort to save on transaction size (and thus transaction fees), Bitcoin exchanges will "batch" multiple withdrawals into a single transaction. If you see a lot of other outputs on your withdrawal from an exchange, it is likely that most of these are the withdrawals of other users that have been batched together with your withdrawal, as well as outputs to send any remaining change back to the exchange's hot wallet.


text:
Can someone explain why I only received 1 output (24 cents) from my transaction ($3,253.29)
Hash 0608854cc459dd9b126b20b9a605ea0ed877500a4a92e31ece6b08e3aaeaf937
I sent ($3,253.29) USDT from cryptonator to my BTC coinbase wallet and I only received 24 cents. Can somebody please explain what happened here? I'm freaking out and it was my entire savings.
Please help!

You cannot send USDT to a BTC wallet; they are different currencies. Perhaps Coinbase also has a USDT wallet, though. This is made more confusing by the fact that USDT resides on Omni, which on its turn does use the Bitcoin blockchain - but it has nothing to do with BTC besides that, and you need separate software to send/receive that token.

Hi Shubz Kaila, I'm afraid that you will need to contact the customer support of Coinbase and/or Cryptonator. We don't have insight into what services either provide or how they operate. This community's expertise is limited to Bitcoin, we do not cover other cryptocurrencies.

My friend,
I'm sad to tell you you might have been robbed of your money....
Cryptonator has a 2,5 stars rating. The reviews say it should not be trusted.
It seems it was split into 2 different addresses. The one where you received your cash (20 cents) and another one where they received the whole rest. This address has received well over 588 000 $ USD already. So this isn't the first time it happened. it's as if they sent you the minimum they could just to get the transaction going.
If I'm correct this address is your coinbase wallet: (value 0,20 cents)
This is the robbers wallet: (value: 588k) 163y4H32GbQSM8qgKwsDfyhmmvDnHKKaaa
In the future, use trusted exchanges such as binance, crypto.com, kraken and coinbase....
So sorry for you, sincerely...
(https://i.sstatic.net/JPx8W.png)


text:
How do you generate a qr code for a new address and check for incoming payments from the command line?
Which one do you recommend for this

Command line to generate QR-Code + address for requesting money
Command line to check if the above has been received

I don't want to install too many versions of Bitcoin wallets on my machine so I thought I'd come here asking for some guidance first
Using Ubuntu 16.04

Using Bitcoin Core, I would combine getnewaddress, qrencode, and listtransactions.
> bitcoin-cli getnewaddress ( "label" "address_type" )

Allows you to generate a new invoice address and label it to identify the current purchasing process. It returns a string with the newly generated address which you can then decorate according to the BIP21 URI scheme to allow operating systems to recognize it as a Bitcoin address, and output that the resulting string using a quick response code tool such as qrencode.
Finally, you would poll your wallet for new transactions using
> bitcoin-cli listtransactions ( "label" count skip include_watchonly )

which will give you recent transactions relevant to the wallet, or alternatively allows you to specifically filter by the label you previously attached in getnewaddress. The rpc descriptions I linked are for Bitcoin Core 0.21.0, but older docs are available through the same site.
Note that versions preceding Bitcoin Core 0.17.0 (released in October 2018) are past their End of Life date in their maintenance cycle. I would emphatically recommend using a newer version of Bitcoin than what may have shipped with Ubuntu 16.04.


text:
I am having a problem with network reply stalling at 3 months behind
I have Bitcoin_wallet 'Version wallet 9.26' installed on an old Oppo R11s phone I have a message saying "Synchronizing with network, 3 months behind" When trying to transfere funds across to a Samsung S21 Ultra 5G phone I have a message saying "Currently payments are not possible because a replay is in progress". I have tryed to Reset Block Chain but as soon as it get to 3 months it stalls and will not finish. Any help would be appreciated.

I have Bitcoin_wallet 'Version wallet 9.26

The latest is 10.16, I would first backup the wallet, test recovery from the backup on a different device and then upgrade this device to 10.16 and retry synchronisation.

as it get to 3 months it stalls and will not finish. Any help would be appreciated.

I would check for active peers in the "Network Monitor" menu item. There is also a menu item for "Report issue" which might get a response from the developers if you are using the current version and not an old version.

Thank you for your reply. How would I transfer the backup to my Samsung and where will I find the backup. Also I am guessing because of the age of my phone "Oppo" I am unable to Report my problem. BTW I have the latest version on my Samsung

Thank you, you solved my issue


text:
Lightning channel opening stuck - Alby Hub
I opened my second lightning channel (only receiving capacity) on Alby Hub (on StartOS) and it's been stuck in "opening" for almost 12hr. I tried to see the "funding transaction" I tracked the funding transaction on mempool and it has a 1.01 sats/vb. Is there a way to speed it up or cancel it (I paid the channel opening over LN)?


text:
If someone knows my address, can they track where the Bitcoin I received came from, down to the fourth or fifth sender
This question concerns a friend of mine who has traded Bitcoin in a hostile country. If the authorities know his address would they know the addresses of who sent him Bitcoin. Let's imagine someone sent BTC to another person who aggregated it and sent to my friend. Can they trace the BTC back to the original sender. Some of the BTC was sent from exchanges at different stages of the transaction but some was bought from bitcoin ATMs, some from other people using different wallets ( exchanges, trust wallets, Blockchain etc) . How far back can authorities trace . Some was sent directly to the friends wallet, others were added to other purchases BTC and sent ,

This is a very broad question. You may want to read up on this topic at https://en.bitcoin.it/wiki/Privacy and ask more specific questions.

Can they trace the BTC back to the original sender.

Yes, a sufficiently motivated nation-state has the resources to attempt this. Individuals can only make it extra difficult for them.
The blockchain data doesn't identify individuals or businesses explicitly but is public. A sufficiently resourced agency of a nation-state can combine this blockchain information with external sources of information and may thus be able to infer underlying business relationships and participation in real-world transactions.
Avoiding address reuse and running money through mixers and multiple exchanges etc obviously makes this much much harder and more expensive for the nation-state's agencies, and more private for the transaction participants. But nothing can be 100% private.
I expect most people buying something, for their own use, whose purchase is a misdemeanour, would not worry much.
The next leader of Hezbollah, buying arms and ammunition, say, might be expected to be concerned about this sort of thing.


text:
Can a silent payment address body be brute forced?
As I understand Silent Payment address is a way for sender to brute force find an invoice (address) on Taproot.
Question: Can sender then generate all 4 billion addresses of the private key, destroying privacy?

No, that’s not an accurate understanding. The sender uses the private keys associated with his own UTXOs and the public key provided by the receiver to generate a shared secret. They can do this with many different combinations of UTXOs and thereby generate many shared secrets, but even so, they do not learn anything about the receiver’s address body, because each address is a function of the sender’s private keys and the receiver’s single public key.

Taking a few steps back, it's helpful to remember that a taproot "address" is just a bech32m encoding of a public key. The majority of wallets today generate these public keys using BIP32, where child keys are derived from a master key. This is likely where you're getting the number "4 billion addresses." It's important to point out, however, all you need to create a taproot output is a valid public key.
BIP352 (Silent payments) is different in that there is no derivation or pre-generation of addresses by the recipient. The sender creates a public key for the recipient and encodes it as a taproot output. For details on how the sender creates this public key for the recipient, I'd recommend reading the overview section of BIP352. At a high level, however, the important details are:

The sender first creates a shared secret between them and the recipient by multiplying the sum of their private keys with the recipient's scan public key (i.e., Elliptic Curve Diffie-Hellman key exchange)
This shared secret is turned into a public key and added to the sender's spend public key, ensuring the resulting output is only spendable by the recipient
The resulting public key (shared secret + recipient's spend public key) is encoded as a taproot output in the transaction

The resulting public key is unique to this transaction. If the sender sends again to the same recipient silent payment address, they will necessarily have to use different UTXOs, which in turn guarantees each silent payment output is unique to the transaction it is in.


text:
Moving BTC to cold wallet over Binance
The BTC withdrawal fee in Binance (and pretty much every other exchange) is 0.0005 BTC - very high. However, if you do the withdrawal over their Binance network then the fee is only 0.0000014 BTC (a mere fraction!). Question is, can that network be used to withdraw "pure" BTC? How? The address I have on my (Trezor) cold wallet is a SegWit address which apparently doesn't fit the criteria.
Also, if it's stored in a separate network, does that mean that I'll only be able to sell my BTC via Binance?
Many thanks.

It sounds to me that the differing fees stem from a qualitative difference in what you are being offered. The "withdrawal over the Binance network" provides you an IOU for Bitcoin. If you want to take possession of the actual bitcoins on your Trezor, you will need to chose the Bitcoin withdrawal method. This is more expensive, because it requires an on-chain transaction to be committed to the Bitcoin blockchain.


text:
How can you make the most basic version of BTC Nodes/Peer to Peer communication?
I started to work on my version of blockchain, and for that, I read how everything works, and everything made sense. But when I got to Nodes/CConnman/CNode, after reading for a week, I understood most of the connection between these classes. However, then I saw more classes, and then more classes—I got lost in the sauce. To understand it, I had to learn C++ first. I'm used to writing in TypeScript, so I learned it and implemented the socket in CConnman. After setting up a basic relation where a CNode is created for every incoming connection, I have an array of CNode to keep track of the nodes I'm connected to. But after that, I got lost again. Any suggestions would be appreciated.

Bitcoin Core’s connection management is probably much more complicated than what you are looking to do. You may want to look into the actual message flow that nodes adhere to for the peer-to-peer protocol and create a very simple implementation of that. You can for example have a look at the Bitcoin Developer Guide’s P2P Network section. There are also several libraries that implement parts of the peer-to-peer protocol in TypeScript and JavaScript which may be more accessible for you to read. You could for example have a look at the bcoin repository to see if that is more accessible.


text:
Somebody sells at 4k instead of 40k. Who gets it?
If somebody sells x amount of BTC (or any other crypto) mistakenly at 4k instead of the current 40k (assumption), who will get it and for how much? Will somebody just be the happy one?

Related: https://bitcoin.stackexchange.com/a/20759/5406

This comes under "questions I have but feel will make me look stupid if I ask" - I'm glad someone did :)

TLDR: The highest bidder on the exchange will get it.
One of the main jobs of an exchange is to match sellers with buyers. The exchange will help users sell for the highest price possible, and buy for the lowest price possible. If the price you want is lower than the highest bidder (buyer), the exchange will tell the buyer, "hey, we found someone that wants to sell you bitcoin at your price!". The buyer does not know that you were willing to sell for 4000.
Noone will be lucky. All reputable exchanges have several people wanting to buy at a price higher than 4000 when the current price is 40 000.
You can figure out the price you're going going to sell for if you take a look in the orderbook. There you can see people wanting to both buy and sell bitcoin for different prices.
In the picture, green orders are buyers, and red orders are sellers. The price you're going to get when you sell bitcoin is the top green one.

You can try it for yourself! Add a limit sell order with 4000 as the price. Depending on the exchange it will tell you that by placing the order, 100% of the order will be filled. The final price is not going to be 4000, but probably very close to 33 828.

So basically, you can't place a REAL mistake-sell, only a quite bad one?! Or in other words - and that's why i asked in the first place - it does not make sense to just place a 4k-order and hope somebody mistakenly sells at this price? Because that would be quite cool, wouldn't it :) (or bad for the person who makes the mistake). Thanks for the response!

yes, I think you can try it by buying $1 or $10 worth of bitcoin on Robinhood or Coinbase Pro, so it is not going to hurt you for that $1 or $10

your answer says "The final price is not going to be 4000, but probably very close to 40 000."... do you mean very close to 33828?

Yes, pretty much impossible! It's only possible in order books with very low liquidity. As long as you use a reputable exchange and trade bitcoin, you won't find that.
No, it does not make sense to do that. Every single buyer willing to pay more than 4k will get filled before you.

Yes! Very close to 33828 using my image an example.

AFAIK, if it is the same as stocks, then it is "The person who entered it first", meaning:
If somebody put in the limit order to Buy At $33,000, before you, then your $4000 will be matched to his limit order, but because he entered it first, then the transaction between you and him will be $33,000.  That's the rule.
There are tons of buy orders to buy at $33,000 or $32,999, so the $4000 will be matched by those numbers first. (and it will be sold at $33,000 or whatever the highest bidder is).


text:
cgminer doesnt use my GPU
CentOS6 x64, build last cgminer with openCL support
[ay@pandora6 log]$ sudo lshw | grep -i geforce
             product: G73 [GeForce 7600 GS]

[ay@pandora6 log]$ uname -a
Linux pandora6 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[ay@pandora6 log]$ cat /etc/redhat-release
CentOS release 6.4 (Final)

[ay@pandora6 /]$ nvidia-settings -v
nvidia-settings:  version 304.108  (buildmeister@swio-display-x64-rhel04-06)  Wed Jul 31 20:47:31 PDT 2013

Why cgminer does not use GPU ?
[ay@pandora6 /]$ /usr/local/bin/cgminer -n
 [2013-10-11 14:58:09] CL Platform 0 vendor: Advanced Micro Devices, Inc.
 [2013-10-11 14:58:09] CL Platform 0 name: AMD Accelerated Parallel Processing
 [2013-10-11 14:58:09] CL Platform 0 version: OpenCL 1.1 AMD-APP-SDK-v2.5 (684.213)
 [2013-10-11 14:58:09] Error -1: Getting Device IDs (num)
 [2013-10-11 14:58:09] clDevicesNum returned error, no GPUs usable
 [2013-10-11 14:58:09] 0 GPU devices max detected

Mining on a 7 year old, low end nVidia card is just not sensible. I don't even think it's possible on 7xxx cards. I have an ASIC miner that's 40 times more power efficient than your GPU would be, and it can't pay for the power it takes to run it.

@DavidSchwartz does the sensibility of the mining operation depend on what you are trying to achieve?  For example if you wanted to contribute to the "security" of the bitcoin network is any sort of mining helpful or not?

@Deesbek Not likely. If you mine in a pool, you aren't really contributing to the security of the network much. And if you solo mine, you won't have any effect unless you find a block, which you likely never will.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
GUI miner not working properly (slush's pool)
I'm trying to mine for slush's pool with GUIminer. The miner says that I am mining, and gives me a mhash number, but says that no matter how long I mine, I still have 0 shares.

The pool says that I have no mhash input to the pool.

Thanks in advance, bark

What's the longest you have been running the miner?

I've been running it for about 2 hours

Ok, according to the mining calculators you should find a share at difficulty on average once every 20 minutes. Unless its a fluke and you simply have bad luck, there really is something wrong here.

You're trying to mine bitcoin with your CPU? It's like cutting diamonds with a sardine.

I agree that you really don't want to be mining with your cpu.  If this was with your gpu and this was happening, your debug output would probably involve a "check your hardware" error like the one many people got from the newest AMD SDK.  That is fixed by rolling back drivers to the best compatible set.
You should look at the console by going to the menu bar: View > Show Console.  Click the tab that pops up named Console and perhaps post a screenshot of that.

Try setting the server as "other" and typing in stratum.bitcoin.cz as the host and 3333 as the port.


text:
Which package should I be downloading for my Linux Ubuntu computer, 64 os?
So there are

linux (tgz)
ARM linux
RISC-V linux
PPC64 linux

But I've got no idea what the differences are, aside from a guess that ARM Linux is meant to be run from lower-level-heavy Linux versions.
For context I'm downloading Bitcoin Core mainly with the intention of looking through the code, tinkering with UI, and learning more to potentially take over to some of my blockchain projects. Any help would be awesome!

ARM, RISC and PPC refer to comparatively uncommon types of CPU for desktop PCs. ARM is dominant for phones and probably used in many Android tablets.
If those terms are unfamiliar to you,  you almost certainly need the plain (tgz) version intended for the  Intel x86 / AMD 64 architecture machines that are almost all PCs sold in recent decades.
If you want to read the source code, all four are probably derived from common code. Download the source, not an installable binary