text:
bitcoin payment has big fees
I am using the bitcoin-rpc and everytime i create an invoice from a PHP script, i create a new address. All is ok, i get the money after, i have a script that checks number of confirmations, then when i try to send my money back to another wallet i see 300 400 usd in fees
bitcoin-cli sendtoaddress "MY_BIG_WALLET" 0.1 "" "" true
When i look on blockchain i see that that everything were sent from every address that i have created
ADDRESS1 ... 0.06
ADDRESS2 ... 0.03
ADDRESS2 ... 0.078
... and so on
Fees are way to big ... How can i send everything from one big address and pay only 20$ usd fee [the default bitcoin fee, i see on some services, 5 usd]?
I believe i pay per vbyte ... but i want to send internally with low or no fees or something.
How big payment gateways like coingate/coinpayments/bitpay are doing this? They too create an adress for every transaction ...
Thank you.

Fees are way to big ... How can i send everything from one big address and pay only 20$ usd fee [the default bitcoin fee, i see on some services, 5 usd]?

To spend from a bigger amount instead of several small, you must have it. If you fragment your bitcoin holdings sending small amount (for testing purpose or any other reason) to your other addresses, then when you would send it further, you should bind several of them, taking up more space on the blockchain and consequently paying higher fee.
You choose the fee amount, maybe you overpay it ... anyway there is many factor that are involved in fee calculation so there is many ways to minimizing them, you can start here: https://en.bitcoin.it/wiki/Techniques_to_reduce_transaction_fees

I believe i pay per vbyte ... but i want to send internally with low or no fees or something.

There is not "send internally": either you can use Bitcoin testnet, that works with valueless testbitcoin you can have for free, or you use mainnet and your transactions pay as any other.

How big payment gateways like coingate/coinpayments/bitpay are doing this? They too create an address for every transaction ...

When payment gateways make payments, they aggregate them: they aggregate multiple inputs (customer deposits) with multiple output (customer withdrawals) in a single big transaction that pay a very big fee, but which is always lower than they would pay with many small transactions; moreover they collecting 5$ you say from any single customer that is paid with the big transaction (and some service also from customers who deposit).

i have like 100 address sending on one big wallet, i pay 500usd sometimes ... for a transaction ... so the big payment gateways are making some sort of custom transaction for what i understood ... more details for that please ? i mean how can i have a payment system that accepts on multiple wallets, lets say 100 but don't have to pay such amount of big fee ...

I'm not sure i understood why you want to send from 100 addresses to one ... if you setup an address for each of your customer, all these address belong to your wallet (and then contribute to your total wallet balance) but when users deposit funds to the address you assigned them, they will pay the bitcoin network fees. After that if you should pay customers withdrawals, you can wait minutes or hours to have a large number of withdrawals and then aggregate them in one big transaction that take funds from all (or many) deposits made on your addresses and pay all withdrawals users requested.

a Bitcoin transaction with multiple input and multiple output is the standard, is not a "sort of custom transaction".

"i'm not sure i understood why you want to send from 100 addresses to one" - i am getting the funds from them trough multiple addresses so i can know who sent what then i must send all those coins to my big account, there is no such thing as user withdrawing, only i get all the coins to my big wallet ... big payment gateway do the same, they create a wallet for every transaction ...

leaving out why you want to do this ... i can give you 3 quick tips to reduce fees: 1' lower confirmation target (bitcoin-cli sendtoaddress "MY_BIG_WALLET" 0.1 "" "" true "" 25 "ECONOMICAL") ... this raise confirmation time to hours or days but it lowers commissions a lot, 25 is the number of block expected to wait, you can choose from 2 to 25, 2' do transaction on weekend, 3' use bech32 addresses  ... and read the guide i linked above.

2-of-3 multisig  369  206  44%  from the article, how to implement that ?  Is the better saving i see. Also no matter what, if i get money on 100 addresses i will still get in the big wallet from 100 addresses, no matter what, so is there a work-around? What i understood from you, the only way is to lower fees trough some techniques ...

also i did bitcoin-cli sendtoaddress "MY_BIG_WALLET_BECH32" 0.1 "" "" true that begins with bc1.... and same results i get, and i know segwit addresses are more efficient with blockspace ... but was the same think ... big fee as well

your case is "single signature", you can achieve the 26% saving receiving from bech32 addresses, so the addr you generate for your customers should be bech32 (bc1..). you save when you receive from bech32 addr not when you receive to a  bech32 addr but sending address are standard 1...

multi-signature are a different use case: https://en.bitcoin.it/wiki/Multi-signature

how much sat/vbyte are you paying for your transactions?

" customers should be bech32 (bc1..)" ... all my payment addresses are bc1...  but clients have their own normal addresses, the 26% will only apply from bc1 to bc1 ? ---
Fee per byte 40 satoshi --- Fee per vbyte 76 satoshi --- Input count / Output count 141 / 1 --- Size 23,229

"but clients have their own normal addresses" > this makes no difference, as customers pay it's own commissions when they send.
"the 26% will only apply from bc1 to bc1 ?" > no, only sending addresses matters, so only them must be bech32 to fully benefit from discount ... but sending to a bech32 addr give you the opportunity to benefit from discount next time you need to send.

"Fee per vbyte 76 satoshi" > if you want you can manually choose how many sat / vbyte you want to pay, in case I suggest you to enable the Replace By the Fee (or RBF) option, so you can increase the fees later if you have choice them too low.
I also suggest you to check this website: mempool.space to see what fees people are actually paying for their transactions, so you can adjust yours to the current situation.

thank you, you are so kind, i will try at next sendings to see what happens, basically i have to get payments on a bc1... addresses then send them to a big bc1... wallet wit smaller fees and wait like 1 week or more till network is light enough to confirm my transaction ... also think about that i might got 100 150 payments so even if i make transaction lets say , 30 sat / vbyte .. it will be like 30 * 150  to pay, right?

i still don't understand how big payment gateways are overcoming this issue, thus it seems that they too are creating an address for every invoice, like they are one time use ... think about, for every address they have to pay at least 3 4 usd to send their money anywhere

This is unrelated to the number of addresses involved. Any output being spent costs fees, regardless of whether they're to the same address or not.


text:
Does Blockchain.info's "totalbc" API value account for "lost" Bitcoins?

totalbc - Total Bitcoins in circulation (delayed by up to 1 hour])

Source: https://blockchain.info/q/
https://blockchain.info/q/totalbc
1865520600000000

It seems like it actually gives the value in satoshis for some reason, but that's not the really confusing part.
What I wonder is if this value really represents the "total Bitcoins in circulation", or just "total Bitcoins mined". Does it account for the "lost" Bitcoins which will never again be possible for anyone to use because the private keys are no longer accessible by any human or machine?
If not, is there a source which lets me grab that number? It's pretty useless to know how many Bitcoins have been mined; I want to know how many currently "really exist", as in, are actually in circulation, or can be "circulated".

@Prayank Um... You mean the ones mined -- not in circulation?

If you define "in circulation" as "could be moved", the answer is unknownable, simply because there is no registry of people who have lost their keys. That said, there are many coins that are known to be unmovable; I have an answer about that here: https://bitcoin.stackexchange.com/a/38998/208

source: Stack Exchange

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

sort: votes


text:
how to create txid from transaction.json
Consider this is the transaction.json file:
{
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "5d1ad7d75b89e7051f17254f7e7342d70fcb502539ddb2ac1b97d5710d5fec37",
      "vout": 1,
      "prevout": {
        "scriptpubkey": "76a9140a7a059306f69dec3d4658c618d4dd33a4b288bb88ac",
        "scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 0a7a059306f69dec3d4658c618d4dd33a4b288bb OP_EQUALVERIFY OP_CHECKSIG",
        "scriptpubkey_type": "p2pkh",
        "scriptpubkey_address": "1xPw97SFdG39TyTon7ZFeon7SgEa77HPa",
        "value": 167972
      },
      "scriptsig": "473044022073cb5faf80c08efe1dc3b2bfbabe93f42ab16aeabe3c091ddfc795a30033ee74022017ac1f308e6ec9eb8360c181f11ebfb0f23d1554baeae47a02628f4ef778a2b7012103f498484d89d98539e4260c378584f3fc41f63e627c86b7001d0845d374d80991",
      "scriptsig_asm": "OP_PUSHBYTES_71 3044022073cb5faf80c08efe1dc3b2bfbabe93f42ab16aeabe3c091ddfc795a30033ee74022017ac1f308e6ec9eb8360c181f11ebfb0f23d1554baeae47a02628f4ef778a2b701 OP_PUSHBYTES_33 03f498484d89d98539e4260c378584f3fc41f63e627c86b7001d0845d374d80991",
      "is_coinbase": false,
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "scriptpubkey": "76a91437ca544d6159d8602780b854f196637f94a734fa88ac",
      "scriptpubkey_asm": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 37ca544d6159d8602780b854f196637f94a734fa OP_EQUALVERIFY OP_CHECKSIG",
      "scriptpubkey_type": "p2pkh",
      "scriptpubkey_address": "165zYdxqvNELWdGfrSM6yrqkqBEXKeTZ5A",
      "value": 164132
    }
  ]
}

How can we calculate the txid from this json file?

Hello Yuvraj, out of curiosity, what do you need this for and how did you obtain the transaction.json file without knowing the TXID in the first place?

@VojtěchStrnad just wanted to know how txid is calculated.

@RedGrittyBrick, basically I need to calculate the input counts, output counts and then convert all of then in binary first and then in hex code later. Lastly I need to double sha256 to get the txid right?

I converted my comments into an answer.

@RedGrittyBrick, how about segwit transactions

@YuvrajChhetri See new addendum to answer.

Calculating TxID

convert data into Bitcoin's pre-segwit network serialisation. Taking care not to make any of the most common mistakes:

Encode counts/lengths using the Bitcoin variable-length Compact-Integer format (sometimes called VarInt) and
Take into account Bitcoin's inconsistent and non-standard use of Endianness (byte order).
Never convert to, or use, hexadecimal string representations (until you have a final TxId result that you want to present that way). Because f("B5") ≠ f(0xB5)

Calculate SHA256(SHA256(serialised-data)).

Example program
TxID  88877248B629DA0DF5A8E31FD0D1FBECAFE48A3D1FC65EAFF141DDD9BDB3361A

A note about Segregated Witness (Segwit)
When Segwit was introduced, it was designed to be backwards compatible with pre-Segwit nodes. So, when sending data to nodes that don't signal Segwit support, Segwit nodes send them data in the pre-Segwit network serialisation, not the Segwit serialisation used for sending data to Segwit nodes. To ensure that both Segwit and pre-Segwit nodes use the same TxID, the pre-Segwit serialisation was used to calculate the TxID even for Segwit transactions. This is what is always used in transaction input references. This makes sure that both Segwit and pre-Segwit nodes maintain the same view of Bitcoin network state, the same view of the UTXO set.
There is a separate WTxID based on a hash of the Segwit serialisation. As BIP 141 says:

Transaction ID
A new data structure, witness, is defined. Each transaction will have 2 IDs.
Definition of txid remains unchanged: the double SHA256 of the traditional serialization format:

Thanks for this!

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


text:
What does lastsend and lastrecv in "getpeerinfo" rpc mean?
The Bitcoin Core RPC docs says lastsend as UNIX epoch time of last send, similarly for lastrecv. Does that mean last sent/received P2P message or transaction?

These are the timestamps of the last time any byte was sent or received to/from the peer over the P2P connection.
The distinction between bytes and messages matters for large messages, such a blocks. On a slow connection, a block may take multiple seconds to send or to be received.

Got it! Thanks!!!


text:
Schedule programmatically ASIC mining
i'm looking to get into ASIC mining buying something around 1kW of power.
I have photovoltaic panels at home and during the day I have excessive power I can use to mine. I'm not set on a specific company but goldshell seems to have some interesting options.
Is it possible to control the ASIC miners programmatically and set the to stop and start at given day times?
I'm fine with using a PC or a raspberry PI to control it but online I cannot find any reference to APIs to control them remotely (if not using the web interfaces).
Has somebody do it before? can you point me to some source explaining more?


text:
Bitcoind will not run, after doing a reindex
After doing a block reindex, bitcoind will not run. I have rebooted my system a couple of times and still get the same message.

As far as your screenshot shows, it is running fine. In what way do you observe it not running?

Normally when you run bitcoind the system starts to update with the latest blocks in the blockchain, and the terminal displays the block info.

No, bitcoind does not show anything on the terminal when it runs, it's a daemon (which means it's a program running in the background). You can make it show output if you use -nodaemon instead, and add -logtoconsole instead. But normally you'd interact with it using bitcoin-cli.

When I try using cli I get an error message: mickin@mickin-IdeaPad-3-15IAU7:~$ bitcoin-cli getblockchaininfo
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/mickin/.bitcoin/bitcoin.conf)

I’m voting to close this question because OP was confused about the usage of the software. I does run, as pointed out in the comments. And it's not related to the reindex performed beforehand.


text:
Hardware wallet security
With a hardware wallet, when you enter your pin and seed onto the hardware wallet software, is that data stored on their servers, and potentially accessible to hackers?
I know that the private key is stored on the hardware wallet, but how does the hardware wallet sign transactions without disclosing the private key to the hardware wallet software and their server?

how does the hardware wallet sign transactions without disclosing the private key to the hardware wallet software

An honestly constructed hardware wallet is designed so that the interface between it and the client software only allows for the client software to pass in an unsigned transaction and receive back a signed transaction.
The hardware wallet contains a processor and code that ensures the private key is never disclosed. The client software has no direct access to the hardware wallets internal storage.
The interface is a kind of API between two computers. That API defines a list of functions (example). The arguments and return values are determined by the API. None of those functions return a private key.
There might be more functions than just transaction signing but each would be carefully designed so that the keys are never disclosed.
A dishonestly or incompetently constructed hardware wallet might leak information (example).


text:
Trouble with HWI
I have downloaded and installed hardware wallet interface, here is the output that I'm getting from ./hwi.py enumerate:
Traceback (most recent call last):
  File "/home/eoin/HWI/./hwi.py", line 7, in <module>
    main()
  File "/home/eoin/HWI/hwilib/_cli.py", line 304, in main
    result = process_commands(sys.argv[1:])
  File "/home/eoin/HWI/hwilib/_cli.py", line 270, in process_commands
    return args.func(args)
  File "/home/eoin/HWI/hwilib/_cli.py", line 63, in enumerate_handler
    return enumerate(password=args.password, expert=args.expert, chain=args.chain)
  File "/home/eoin/HWI/hwilib/commands.py", line 117, in enumerate
    result.extend(imported_dev.enumerate(password, expert, chain))
  File "/home/eoin/HWI/hwilib/devices/trezor.py", line 857, in enumerate
    devs.extend(webusb.WebUsbTransport.enumerate())
  File "/home/eoin/HWI/hwilib/devices/trezorlib/transport/webusb.py", line 130, in enumerate
    dev.getProduct()
  File "/home/eoin/.local/lib/python3.10/site-packages/usb1/__init__.py", line 2003, in getProduct
    return self.open().getProduct()
  File "/home/eoin/.local/lib/python3.10/site-packages/usb1/__init__.py", line 2055, in open
    mayRaiseUSBError(libusb1.libusb_open(self.device_p, byref(handle)))
  File "/home/eoin/.local/lib/python3.10/site-packages/usb1/__init__.py", line 127, in mayRaiseUSBError
    __raiseUSBError(value)
  File "/home/eoin/.local/lib/python3.10/site-packages/usb1/__init__.py", line 119, in raiseUSBError
    raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorAccess: LIBUSB_ERROR_ACCESS [-3]

What is the problem here? It is supposed to tell me the device type and device path, but instead this is what I am getting.

Have you tried sudo ./hwi.py enumerate ?

eoin@eoin-IdeaPad-3-15IAU7:~$ cd HWI
eoin@eoin-IdeaPad-3-15IAU7:~/HWI$ sudo ./hwi.py enumerate
Traceback (most recent call last):
File "/home/eoin/HWI/./hwi.py", line 6, in
from hwilib._cli import main
File "/home/eoin/HWI/hwilib/_cli.py", line 3, in
from .commands import (

File "/home/eoin/HWI/hwilib/commands.py", line 57, in
from .hwwclient import HardwareWalletClient
File "/home/eoin/HWI/hwilib/hwwclient.py", line 19, in
from .psbt import PSBT
File "/home/eoin/HWI/hwilib/psbt.py", line 23, in
from .tx import (
File "/home/eoin/HWI/hwilib/tx.py", line 31, in
from ._serialize import (
File "/home/eoin/HWI/hwilib/_serialize.py", line 23, in
from typing_extensions import Protocol
ModuleNotFoundError: No module named 'typing_extensions'

Seems to be working this morning. How do you retrieve the balance on your hardware wallet? There doesn't seem to be a command for this after using the --help option.

That error means that don't have permission to access the USB device associated with your hardware wallet (which is why using the sudo prefix "works").
Assuming you're running on linux (and subscribe to the principle of least privilege), you'll want to follow the instructions in hwilib/udev/README.md to instruct udev to grant your user ID access.


text:
How safe is sending out transactions using unconfirmed inputs for a service?
I've been running into problems with a high-traffic hot wallet, where a single transaction would lock up any input for a block with the spendzeroconfchange disabled.
Would it be safe for a service like Coinbase to use unconfirmed inputs on average transactions? Would I run into similar issues like MtGox did?

Safety is relative---large payment processors like Coinbase probably have non-block-chain anti-fraud measures.  However, a confirmation (and each additional confirmation after it) reduces the risk of a double spend fraud, so waiting for a certain number of confirmations is an easy and effective anti-fraud measure that doesn't cost you anything.
I don't know for sure what happened to MtGox, but it is true that an unconfirmed transaction can become effectively unspendable if any of its inputs become unavailable---which could happen because a block was created containing a transaction that already spent that input (a double spent) or because the transaction which created that input was added to a block in a mutated form (transaction malleability).

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


text:
Can I Recover Bitcoins Transferred to a “Sending” Address?
In a moment of carelessness, I mistakenly used one of my wallet's sending addresses as the recipient for a transfer from a bitcoin exchange. The exchange confirms the transaction completed, but nothing shows up on my end. Is there any way to recover the amount?

There is no such thing as a "sending address" in general. If you have some specific context where that means something, it would be very helpful if you explained what that was. Also, the term "wallet" can refer to anything. Presumably, you have some specific service in mind. It would be very helpful if you told us what precisely you meant.

@DavidSchwartz, I thought so, but I haven't yet seen the transaction appear in my client (Bitcoin-Qt). There's a top-level tab called “Addresses” which has a subtext: these are your Bitcoin addresses for sending payments. For some boneheaded reason, I accidentally selected the address in the listbox and used that as the recipient for a transfer away from Coinbase. Visit https://blockchain.info/address/1BbNoWd5wgEKkjbFskdYcxeTAhE7dWiXpV and look the most recent transaction. By the way, there's a discrepancy between transactions on that site and in my client. Might my wallet corrupted some how?

Is your bitcoind running and up-to-date?  I had troubles with my bitcoind some days ago, it was spending too much memory and stopped loading new blocks due to spam attacks.  Solved it by temporary adjusting minrelaytxfee=0.005 (basically, ignoring almost all the unconfirmed transactions).  Replacing bitcoin-core with bitcoinXT may also help.

Bitcoin payments are irreversible

Any transaction issued with Bitcoin cannot be reversed, they can only
  be refunded by the person receiving the funds. That means you should
  take care to do business with people and organizations you know and
  trust, or who have an established reputation. For their part,
  businesses need to keep control of the payment requests they are
  displaying to their customers. Bitcoin can detect typos and usually
  won't let you send money to an invalid address by mistake. Additional
  services might exist in the future to provide more choice and
  protection for the consumer.

No, they might not be lost. Addresses can both be used both for sending and receiving transactions. You have sent them to one of your own addresses. In your case you transferred to another address you own. So your wallet will have a new total minus the transaction cost. So technically, you could refund yourself again but you will loose another transaction cost.
Crucial note:
All of this depends on your wallet. Some online wallet services share addresses between different users, so you want to be careful if you are using one of those.
If you are using the standard client, all your addresses are fully under your control and are safe to receive transactions.
Source

There's some other problem then. My wallet's balance remains unchanged and the transaction isn't reflected. I'm using the Bitcoin-Qt application. Any advice?

It's probably worth noting: this is a wallet I discovered unused for a while and I decided to “buy back in”. It had a zero balance. I had bought some bitcoin through Coinbase, and transferred to the address I mentioned around December 26. According to your sources, I should've still received the amount.

Are you synchronized with the blockchain? Any specific error? In the debug terminal typebitcoin-qt -reindex this will rebuild the database. I am using Linux so not sure with other o/systems.

Yes; Bitcoin-Qt reports that it's up to date (green checkbox), and no specific errors. I'll try issuing that command, and report back. There's another oddity here. If you search for transactions with the address I used (reference), you'll see three. The most recent is the one that's missing and would like to recover. The latter two are for 0.01 (a send and receive I can't explain). In Bitcoin-Qt, those latter two transactions are shown with conflicting dates and amounts (0.02) (screenshot).

The address link you are mentioning is that your own address? Or did you send it to an address you do not own?

That is definitely an address I own, which the oddity that it comes from a list that's labeled as sending addresses (screenshot). By the way, still reindexing those blocks as recommended.

Rebuild had no effect. I'm guessing this is a lost cause.

Use your keys to create a new wallet. Your current wallet could be corrupted. But it's definitely not a lost cause.

I think the mystery is partly solved. I tried using -salvagewallet to recover, and when the operation completed, I noticed the address I used for the Coinbase transfer was missing from the addresses list. Curious, I reverted to the previous wallet file (a backup made by salvage), and tried running dumpprivkey 1BbNoWd5wgEKkjbFskdYcxeTAhE7dWiXpV from the debug console. It reports Private key for address 1BbNoWd5wgEKkjbFskdYcxeTAhE7dWiXpV is not known. Wherever that address came from (that's the mystery now), it looks like I'm missing the private key for it and the 0.05 BTC I sent to it.

In short, your answer is correct—but it's pretty clear I've had some wallet corruption here.

https://en.bitcoin.it/wiki/Securing_your_wallet

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


text:
How to get a history of incoming and outgoing transactions for a certain address?
Along with the history of incoming and outgoing transactions, how would I find the first block that that address appeared in (to find when the wallet was created)?
I want to do this by parsing with bitcoin abe or something along those lines.
I'm not the programmer, but I need to know how to tell the developer what I'm looking to create.

To get the history of incoming and outgoing transactions all you need to do is send "listreceivedbyaddress" command to the bitcoind rpc interface. For more detail see here.
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
To see where the address first appeared is more intense, you will need to run a search query on a block chain and analyze each block up until you find an appearance.

To get a history of incoming and outgoing transactions for a address you will need to  parse the blockchain.
The command listreceivedbyaddress only shows that the input of one address does not display the output.


text:
Is the Trusted Third Party an advantage or disadvantage in regards to wallet security?
I'm new to bitcoin and have been reading some intros and FAQs.  Most features of bitcoin seem better than our current currency systems.  However, the one thing that strikes me is the ability to have your wallet stolen.  Either through malware, keylogger, in person, etc.  I've reading some posts on here about securing your wallet.  But the fact remains that it could get stolen.  And if it gets stolen your bitcoin balance is gone.  There is no way to recover it.  If you compare that to credit cards, when your card (or card number) gets stolen, the thief may make payments using the card, but the trusted third party (bank or credit card company) will usually not hold you liable and refund the money.
Therefore, if bitcoin were to become the most widely used currency in the world, people could lose their life savings just by a single virus infection or devious hacker.  Having that bank or credit card company involved provides that extra level of shelter.
Does anyone think this will hold back bitcoin use from becoming widespread throughout the world?

Security is, of course, an issue and when using Bitcoin you should exercise caution. That being said, it is important to remember that the Bitcoin community is rapidly evolving, and new technologies, systems, and services are being developed.
As Bitcoin continues to evolve, companies and computer programs will come up with new solutions to challenges and problems. For example, as you point out wallet security is a major issue.
Already, companies are coming up with more secure wallets, that are hacker proof, and larger exchanges and service providers are being established. For a major company like Mt. Gox there is no incentive to steal Bitcoins, they have a profitable business model and any blow back from theft would far outweigh the incentive to steal.
Over time, companies will probably grow in size so that they can provide third party security comparable to a bank or credit card company for Bitcoins. Of course, it's relevant to wonder if they can do so while maintaining confidentiality.
Security companies will also likely grow in size past that point that they would consider trying to launch any type of scam. Think about it, do you think Norton Anti-virus would ever try to launch a virus program? Most likely not. Currently, most Bitcoin security companies are pretty small, but over time a few brand names will likely emerge.
So to get to the point: No I don't think that the security issues you present will hold back Bitcoin. The Bitcoin community is creative, dynamic, and able to respond to challenges. Companies and programmers will see these challenges as opportunities, and will respond appropriately.
My guess, Bitcoin will eventually be able to provide a sort of third party security, much like a bank, to those who want the extra layer of security, most likely for increased fees. Those who do not want or need that extra layer of security won't be forced to accept it.
So, is the lack of a third party an advantage or disadvantage? Honestly, I think that depends on the situation. If you want to have a highly confidential way to store and transfer money, having a third party involved means someone will be looking into your transactions, at least to some extent. If your biggest concern is having a secure way to store money, than third parties can provide extra security. That being said, there are ways to secure your Bitcoins, and as I stated I believe Bitcoin will eventually be able to provide similar levels of protection.
On a separate note since you are new to Bitcoin, if you are using Bitcoin, I would personally advise that you not keep all of your funds in one account. Divide your bitcoins into several accounts, and if possible keep the bulk of your funds secured offline. If you have a large amount of funds, you could even consider something like a safety deposit box at a bank.
Also, I advise going with trusted brand names, like Mt. Gox, or using service providers backed by Silicon Valley funding, things like that. These sites and services should be more secure.

No, in fact from a payment recipient's perspective this is one of the biggest selling points of Bitcoin!
The service provided by the trusted third party essentially represents an insurance on your balance. This insurance service causes a significant cost to the provider which on the other hand sustains itself by forwarding the cost to its users. I.e. this is why many credit cards cost annual fees and why shop owners are charged a percentage of payments as fee by the credit card company.
In that aspect, Bitcoin is like cash: After it leaves your wallet, you cannot get it back by petitioning a third party. I am sure, if you ask shop owners most of them would much rather have cash than a credit card payment as it just about doubles their margin.


text:
btc transaction by Digital signature
I have old btc wallet and I have Digital signature but i don't have Private key , Is there any way for withdraw btc from wallet just by Digital signature ?

A signature does not allow you to recover the private key unless it was incorrectly constructed. Otherwise we wouldn't be publishing signatures everywhere as then people could steal the private keys.

I know that , I want know can i withdraw just by use Digital signature ? I want create manually transaction by Digital signature. Is it possible ?


text:
Lnd invoice lookup
I am trying to get single invoice with GET /v2/invoices/lookup endpoint on LND REST API by its id as documented here: https://api.lightning.community/?javascript#v2-invoices-lookup. But whatever I do I get "Not found" response. How does one call this endpoint? I tried /v2/invoices/lookup?set_id={id} and add set_id to the request body and call it without parameters at all.
Moreover it is not documented what set_id param actually is. I supose it is same incremental id as is add_index in response of POST /v1/invoices endpoint. Is that true?
I know about GET /v1/invoice/{r_hash_str} endpoint but I would like to use the other because I prefer using integer id over long hash.
One more, it is true that r_hash is always 44 symbols long or is it variable?


text:
Is my Bitcoin address valid for mining?
I am looking at the specific block at height 680175.
When comparing the address which received the block reward
# bitcoin-cli validateaddress 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
{
  "isvalid": true,
  "address": "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
  "scriptPubKey": "76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac",
  "isscript": false,
  "iswitness": false
}

to my newly generated address
# bitcoin-cli validateaddress bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm
{
  "isvalid": true,
  "address": "bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm",
  "scriptPubKey": "0014abe2ef0872f57a217276396035ab71673b2eaffb",
  "isscript": false,
  "iswitness": true,
  "witness_version": 0,
  "witness_program": "abe2ef0872f57a217276396035ab71673b2eaffb"
}

there are some differences in the scriptPubKey and the witness program. Are these differences relevant for mining?
The inferred PubKey hash of the miner address is c825a1ecf2a6830c4401620c3a16f1995057c2ab. Would my PubKey hash be abe2ef0872f57a217276396035ab71673b2eaffb?

When a miner finds a valid block, the coinbase transaction they included in their block pays out the mining reward to their own address. Mining rewards can be sent to any type of output. The only special restriction on coinbase transaction outputs is that they can only be spent after a maturation period of 100 confirmations.
You are looking at two different address types:

bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm is a Pay to Witness Public Key Hash (P2WPKH) address
1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY is a Pay to Public Key Hash
(P2PKH) address.

P2WPKH addresses are the more block weight efficient successor of P2PKH addresses. Spending funds received to P2WPKH addresses takes less than half the blockweight as spending funds received to P2PKH addresses.

The inferred PubKey hash of the miner address is c825a1ecf2a6830c4401620c3a16f1995057c2ab. Would my PubKey hash be abe2ef0872f57a217276396035ab71673b2eaffb?

Yes, that's correct.

Thank you for your answer! So, can I use my PubKey hash for a P2PKH output in the first output of the coinbase transaction? .. according to the example in the TxOut section in https://developer.bitcoin.org/reference/transactions.html

Yes, you could use the same pubkey either for a P2WPKH or a P2PKH. I don't quite understand why you're asking like this, though. You could just pay out to a P2WPKH address instead as well.


text:
How is the witness reserved value set in a coinbase transaction?
In a coinbase transaction the second transaction output seems always to be a 32-byte witness reserved value. Is there any constraint on this value?

The only constraint on this value is that it must be 32 bytes. Otherwise there are no constraints. This is done to allow for a future soft fork to commit to new data and have non-upgraded nodes still be able to store something in the block that commits to the new data. As such, the witness reserved value must remain unconstrained to allow for a future soft fork to work.


text:
Why does decoded block data not match coinbase transaction input?
I am looking at the specific block at height 680175.
Via bitcoin-cli getblock 00000000000000000004dbd66fa71fdcd62658bf8c8e2e153521257ad5858c71 0 I obtained the serialized, hex-encoded block data. According to the section Serialized Blocks the txn_count starts at Byte #81. Following the description of CompactSize Unsigned Integers I get:
In [115]: int.from_bytes(byte_arr[80:81], "little", signed=False)
Out[115]: 253

In [116]: tnx_count = byte_arr[81:83]
     ...: tnx_count = int.from_bytes(tnx_count, "little", signed=False)

In [117]: tnx_count
Out[117]: 1702

There are indeed 1702 transactions which can be verified via ./bitcoin-cli getblock 00000000000000000004dbd66fa71fdcd62658bf8c8e2e153521257ad5858c71 2 in the attribute nTx.
Now I know that the rest of the block data is the transactions' part. According to the section Raw Transaction Format the first 4 bytes are the version:
In [118]: tnx_part = byte_arr[83:]

In [119]: version = tnx_part[:4]

In [120]: int.from_bytes(version, "little", signed=False)
Out[120]: 1

This seems to be correct, too. So, the next bytes determine the number of tx_in count, but there I get 0 which is false. And the input of the coinbase transaction does not start with a 32-byte null:
In [121]: int.from_bytes(data[4:5], "little", signed=False)
Out[121]: 0

In [122]: data[4:10]
Out[122]: bytearray(b'\x00\x01\x01\x00\x00\x00')

Am I missing something? The input of the coinbase transaction seems not to match the description.

You want to read BIP144 which introduces an extended serialized transaction format that includes segregated witness data. It is characterized by an apparent 0 txin count.

Segwit changed the transaction format. This new format is specified in BIP 144. This new format is actually a modification to the original transaction format. The changes are just additions to it.
Specifically, what you are missing is that the field immediately following the version number is a single 0 byte (referred to as the marker byte), instead of the input count. This was done specifically to make a transaction appear as if it has no inputs to a legacy transaction parser. Following this marker byte is a flag byte, which currently is a single 1 byte. Then you have the input count, inputs, output count, and outputs as was previously. The last change is that following the outputs, instead of the lock time, there are multiple arrays containing the witness data for inputs. Lastly the locktime ends the transaction as previously.


text:
My MultiBit is unable to connect
I have installed my MultiBit wallet and there is red "connecting" sign in left bottom corner. Wallet never connects. When I try it from another place (my friends house) everything is ok.
It is obvious that its network problem in my place. I have public IP and port 8333 is properly forwarded. I am using Mac OS X 10.8.5.
I have no idea what else to try or where to look for some error messages. Do you have any ideas what else to try or where to look for some clues?

You shouldn't need to forward port 8333 for MultiBit since it doesn't accept incoming connections.  Do you have a firewall?  Is it blocking outgoing connections?

For anybody with common problem. It was DNS related problem.
Message from console:
01.01.14 21:06:52,881 mDNSResponder[38]: mDNSSendDNSMessage: write msg length failed -1/2
01.01.14 21:06:52,882 mDNSResponder[38]: ERROR: mDNSPlatformWriteTCP - send Broken pipe

Try disabling antivirus to see if it connects or enabling multibit connection in the antivirus> firewall itself if this option is available. Or, check your router firewall for no restrictions  and that upnp Universal Plug and Play connection is allowed.


text:
Not able to install coinpunk on centos and ubuntu server
I have tried to install the coinpunk after following the instructions given on github about coinpunk installation. Bitcoind installed successfully but when i try to run the npm install command, it starts processing and does not stop. Though i tried the same process on two different servers(centos,ubuntu) but it gives same error.

You should open a defect on the project through github

You should tell us the errors and it's unclear what you mean by "does not stop".

If you want a detailed tutorial on how to install coinpunk on centos from scratch then please refer here:
themerkle - how to install coinpunk on centos 6.5

While I think your answer is useful (your tut looks good), it would become useless, should your website ever change or go offline. That's the reason, why link-only answers are considered low quality on Stackexchange. If you were willing to post your tutorial here directly that would be preferable, although of course it'd would be under CC license then.

okay I will add it edit: there are formatting issues, my site will be up and if it goes down google cached it anyways


text:
How to set the sequence number in a coinbase transaction?
The sequence number seems to be used for locking a transaction in mempool. However, the coinbase transaction is not part of the mempool and thus the sequence number does not make sense.
Is it just an "extra nonce"? Or is there any constraint on the sequence number in a coinbase transaction?

There are no special requirements for the sequence number in coinbase transactions. It is subject to the normal sequence number rules, but for coinbases, those largely don't matter. While it can be set to anything, miners generally just leave it as the maximum sequence number rather than using it as another nonce.


text:
Could the "pizza guy" sue now had he not received the pizza?
Let's pretend the guy that spent 10k BTC on a pizza in 2010 did not receive his pizza back in the day (basically got scammed). He shrugged it off as it was only ~20$.
He forgets about it, and notice now that a single bitcoin is valued at around 60k!
Would he be able to sue now 11 years later to get his 10k BTC back, or could he only hope to get back 20$ ?

No, he wouldn't be able to sue.

Basically the Statute of limitations for scam is 5 years, after this delay the claim can be dropped in court.

Even if he still went for it, he would only be entitled to the USD value of the transaction at that moment. It would be unreasonable to ask for a refund 10000x the price that was paid, see I paid in bitcoin, now I'm owed a refund. Can I demand it in bitcoin too?


text:
How to ignore LND on-chain reserve balance?
I have around 120.000 sat remaining on-chain balance in LND and want to sweep the wallet completely, as the node is about to be permanently shut down.
The reserved_balance_anchor_chan amount was previously at 100.000 sat (which is the maximum I believe). I managed to reduce it to 20.000 sat by manually using abandonchannel on a few pending force closures (which had zero local balance anyway, so it didn't matter).
LND now has zero pending/active channels and my config forbids new channel openings, which makes the reserve balance pointless. I have not found a way to completely ignore or deactivate it.
Attempting to use sendcoins results in the expected error:
[lncli] rpc error: code = Unknown desc = reserved wallet balance invalidated: transaction would leave insufficient funds for fee bumping anchor channel closings

Of course, abandoning 20.000 sat would not be a big deal, I'm just curious.


text:
If I buy crypto on a third party site, such as Coinbase or any other sites, how do I safely transfer my wallet into an external 'cold wallet'?
By cold wallet, I mean any type of encrypted USB etc. If this isn't possible how would I buy crypto and then be able to store it on a USB in the first place? This may be a stupid question but I'm kind of new to this stuff.

The coins are not stored on the USB drive, they keys that can spend the coins are.
An 'encrypted USB' would likely not constitute a 'cold storage' device, that term is usually used to describe keys which have never existed on an online device. If you use your (online) computer to generate keys, and then store them on a USB drive, that would not constitute 'cold storage'. Generating and storing keys offline is a best practise, because it reduces the risk of an attacker stealing your keys over-the-wire.
So a lot of your security comes from how the keys are generated, as well as how they're stored. 'Hardware wallets' are devices that are built to provide a mix of security and convenience that many users find appealing, if you are new to all of this, they might be a good choice. For the more technical user seeking extreme security, there are more advanced setups possible (sanitized general-purpose hardware, multi-sig using multiple devices, etc).
Once you've purchased coins, you should be able to initiate a withdrawal from the exchange service, by copy/pasting your 'receiving address' from your wallet software, into the 'send/withdraw/etc' field on the exchange service's website.
Note that some services do not allow you to withdraw your bitcoin (eg, paypal, robinhood), so these are obviously terrible places to purchase bitcoin, that should be avoided at all costs.


text:
Conversion problem
Welcome ...
I made a transfer from a bitcoin core wallet to another wallet, but the transfer did not arrive from yesterday
hash:
7fd7aac91098b5a5144dae424cd5bc2b3224b695a58c0348a47dca601de3cd41


text:
problem with Bitcoin core
The coins were sent from the exchange since yesterday but they did not arrive at Bitcoin Core Hash: 6d580fac9e6597016461e43a9a29d1bf627bcada54efd016d4e0b8fa307f9bf9

Your payment was confirmed yesterday. Your Bitcoin Core is not synchronized with the network, yet. You will see the payment in Bitcoin Core, when it finished synchronizing.

Thank you, thank you. I hope it does not close until the wait is confirmed


text:
Bitcoin to usd$$$$$$
I bought a few programs and set them up. I was incapacitated for 12 mos. Recently I had finance tell me I have 1.3 btc that needs to be converted. Is it true you have to pay finance 75 to convert it. They also said my info was breached. What should I do.i don't wanna be scammed


text:
After sweeping an address I've received a tiny amount on both the address I swept and the dest of the sweep
For some time now I've had a small amount sitting in a legacy address, and I finally decided to sweep it and send the amount less the fee to another address. I chose a small fee, to not spend more on the fee than on what was sent. The transaction got stuck, hovering around 20mb from the tip, neither getting evicted nor moved forward. So eventually I decided to try ViaBTC's free accelerator. This is the only step I took that I've never done before, and that's why I mention it. It worked well, and the next block they got included my transaction. However, just 30 minutes after it had been confirmed, I received an even smaller amount (3 digit Satoshi) to both the address I swept and the one I sent to. I don't have a problem abandoning a three digit Satoshi amount, but I'm puzzled by this. It's never happened to before, and the only thing I did differently was using the acceleration service. I have a hard time believing that they'd reward me for using a free service, but as I said, that's the only thing I did differently. Do they really reward using the free service, or should I suspect some kind of foul play?

That sounds like a "dust attack"

@RedGrittyBrick Thanks. I've heard the term, but never bothered to find out more about it. Now I did. Considering that the info I found says that 546 or less is usually considered spam, and I received 547, I believe you're absolutely right. I'll abandon the address I swept and empty the one I sent to asap.

Does this answer your question? Deanonymizing dust attack

@RedGrittyBrick I believe it does.


text:
Do BIP21 URIs have a required order for the parameters?
I need some help understanding a finer point of BIP21 URIs. Is there a required order for the parameters? I'm not very experienced with the concept of ABNF grammar, so I'm having trouble understanding.
For example, I know this is valid.
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Luke-Jr
And I know this valid:
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Luke-Jr&optionalparam=blahblahblah
But is this valid?
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?optionalparam=blahblahblah&amount=20.3&label=Luke-Jr
Very specifically, must the order of parameters always be amount, label, message, and then optional params? Or is it OK to include optional params before the amount?

The ABNF in BIP21 indicates that the bitcoinparam can be in any order.
bitcoinurn     = "bitcoin:" bitcoinaddress [ "?" bitcoinparams ]
bitcoinaddress = *base58
bitcoinparams  = bitcoinparam [ "&" bitcoinparams ]
bitcoinparam   = [ amountparam / labelparam / messageparam / otherparam / reqparam ]

The third item in this list shows that ordering is not important. Any valid bitcoinparam can be first in the RHS expression. You can then prepend any other bitcoinparam using the same rule. Repeat as needed.


text:
Bitcoind information about the input and output
Im trying to get the wallets/accounts the money got sent to. But getrawtransaction does not give any information about the reciever or sender


text:
Lightning network in real world
Newbie in this area. Trying to understand how lightning network would work in real world.
If I want to buy a coffee on BTC network, I go and pay and unfortunately me and the cashier need to wait 5-10 min before the transaction is "confirmed" on chain. This the cashier wouldn't know for sure if my money is good for that amount of time.
With lightning network, my understanding is that we would be making a transaction on a "side chain" (so the money would be transferred "instantly").
My question is that instantly - Does the lightning network also solve the problem of giving confidence to the cashier that I have the money required? I.e. does the cashier have to wait for the side chain to get "settled" onto the main chain and thus wait 5-10 minutes for a confirmation?

With lightning network, my understanding is that we would be making a transaction on a "side chain"

The lightning network is not a ‘side chain’, that term is usually used to describe an entirely different piece of technology that can be built to work on top of/alongside bitcoin.

Does the lightning network also solve the problem of giving confidence to the cashier that I have the money required?

Yes, lightning payments can settle pretty much instantly, both the customer and cashier would see proof of this in their respective lightning wallet applications. There is no need to wait for an on-chain transaction to be confirmed.

Emphasize on CAN. There is no guarantee at this point that the payment will be instant as the payment process in itself is probabilistic. Emperical tests have shown that about 5% of payments timeout (meaning take longer than 1 minutes) also even if the payment didn't timeout a routing note may delay the setup or settlement resulting in times mich higher than block confirmation time. However in most cases lightning network is pretty instant.

It's true that a payment might be stuck or simply not go through. But in the spirit of the original question I feel it's important to point out that once an LN-payment confirms (which is happening within seconds most of the time), it is already final. There is nothing else to wait for.

Thanks for the answer. Can you explain what is side chaining in context and why LN isn't? Also, why wouldn't every transaction occur on lightning if it is secure and faster?

Consider the Bitcoin blockchain as roughly equivalent to the consolidated sum of all banks in the world, but implemented through a distributed consensus mechanism. When you buy coffee, the rest of the world/blockchain doesn't need to know about that; only the coffee shop does.
In that analogy, opening a lightning channel is roughly equivalent to withdrawing cash from an ATM. The blockchain/banking system registers that you now own less money there, but in return, you got currency in your hand/channel which you can hand over/send to the cashier in exchange for coffee. You can do that as quickly and as frequently as you like, and can also receive cash. Nobody in the banking system/blockchain gets to know about the transactions you do with the "cash".
You don't need a channel to every shop. A single channel to a node that has a few more channels will usually get you connected to the rest of the lightning network, because transactions are routed (via privacy conscious tor routing)


text:
dumpwallet always corrupts my wallet
I have repeated this process a few times, always with the same error.
In one terminal,
./bitcoind -testnet
in another
./bitcoind -testnet getnewaddress
mgj4Y8AvckxborhQzqFAhppcGVGFExqJvB
./bitcoind -testnet dumpwallet /path/to/testnet3/wallet.dat
error: {"code":-1,"message":"CDB() : can't open database file wallet.dat, error 22"}
./bitcoind -testnet stop
Bitcoin server stopping
In the original terminal,
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6
Then I type
./bitcoind -testnet
Error: wallet.dat corrupt, salvage failed
Anybody have an idea what is going on? I updated my bitcoin to the latest on github. I also searched for the error 22 but didn't find anything. I'm guessing CDB means corrupted database. I also looked in debug.log, but I didn't see anything weird.
I know it is the dumpwallet command that is breaking it, because when I omit it from this process, nothing breaks.
The same things happens on the mainnet, altho I have not tested it as much.
Am I using the dumpwallet command incorrectly?

The path you pass to dumpwallet is the filename of the dump.
If you pass the name of your wallet database itself (or any existing file, actually), it will get overwritten.

authors: Евгений Иванков


text:
Sent BTC to change address instead of a receiving address; is it ok to just leave it like that or should I move the BTC to a receiving address?
I read this question, and although it helped clear things up, it didn't quite answer my question.
I inadvertently sent BTC to one of my electrum wallet's change addresses instead of a receiving address. I am asking if it is good enough to just leave the BTC in the change address, or would it be a better idea to move that BTC from the change address to a receiving address in the same wallet. Are there any negative implications of leaving BTC in a change address?

You can leave the coins in the change address and your wallet 'should' show them as a part of your balance. Your wallet should also choose to spend those coins when needed.
tl;dr, a change address is just another Bitcoin address and they are equally as safe to leave you funds in.

Not equally safe. It is safer, as Satoshi Nakamoto stated in Bitcoin whitepaper: "As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner."


text:
How to store Bitcoin safely?
I'm starting to invest in Bitcoin now, regretting not having started in 2017 when I heard about it. I still have little money invested and it doesn't make sense to invest in a hardwallet at the moment.
That's why I'm using an Android phone that I don't use daily as a cold wallet. I generated two wallets using manual entropy with RPG data, one wallet has 12 words and the other has 24 words. And I'm going to use a pass-pharse on each one of them.
My question is: Is there really a need for a seed-pharse with 24 words or 12 is safe enough (I'll use pass-pharse together).
In addition to the pass-pharse, is there anything else to protect my Bitcoins?

Would it be fair to say that your main question is "Are 24-word seed phrases safer than 12-word seed phrases?"?


text:
Bitcoin balance
I downloaded Bitcoin so I could order stuff online. I had money on my cash app. I had to go pick up my kids so my friend said she would purchase it for me using my phone. When I got back I had a confirmation email saying I purchased $50 worth of bitcoin. But when I went on bitcoin I didn't have a balance.I have email verifications for purchase orders. But I also have Bitcoin withdrawals confirmations after the purchase order was completed.but I don't know where it went

Hello, welcome to the bitcoin.stackexchange question & answer website, There are many different software programs for bitcoin, with many different names. From exactly where did you download "Bitcoin" ?


text:
Old Bitcoin Wallet
I have an issue I have an old Bitcoin wallet from 2010 and I didn't remember where I saved it the only thing I remember is the passcode so is there any possibility of tracking the wallet by a passcode and opening it if yes how I can do this and what to do and if I managed to open it can I send it to wallet like Binance or Okx.
thanks

This question is similar to: I have lost my wallet, what can I do?. If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.


text:
Trying to import a multi signature wallet in Bitcoin core
10 years ago I sent 0.01 BTC to a multi-signature address which requires two passwords
I am now trying to import this wallet in Bitcoin Core but I am not able to.
The information I have is:

The BTC address where the BTC is stored
The public key
The passphrase I used as a first password
The second password which was hidden under a hologram on a physical Bitcoin coin

Can anyone guide me as to how to do it?
I am now downloading the whole Bitcoin Core along with the blockchain.
Thank you!


text:
ElectrumX Crashes on Reading blocks from Bitcoind regtest node
Can anyone help me to debug this issue?
What I Am Trying to Do
I am attempting to run a bitcoind regtest node and connect it to electrumx_server
The Problem
When I run electrumx_server, it connects to bitcoind successfully but it crashes when it starts to read the first block giving this error:
RuntimeError: truncated block file
Environment Details
Operating System: Ubuntu 22.04
ElectrumX Version: 1.20.2
bitcoind Version: v27.0
These are the logs when I run electrumx_server command:
INFO:electrumx:ElectrumX server starting
WARNING:Env:lowered maximum sessions from 1,000 to 674 because your open file limit is 1,024
INFO:electrumx:logging level: INFO
INFO:Controller:Python version: 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0]
INFO:Controller:software version: ElectrumX 1.20.2
INFO:Controller:aiorpcX version: 0.22.1
INFO:Controller:supported protocol versions: 1.4-1.4.2
INFO:Controller:event loop policy: None
INFO:Controller:reorg limit is 8,000 blocks
INFO:Daemon:daemon #1 at 127.0.0.1:18443/ (current)
INFO:DB:switching current directory to /home/omarosman23/.electrumx/db
INFO:DB:using leveldb for DB backend
INFO:DB:opened UTXO DB (for sync: True)
INFO:DB:UTXO DB version: 8
INFO:DB:coin: BitcoinSV
INFO:DB:network: regtest
INFO:DB:height: 0
INFO:DB:tip: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
INFO:DB:tx count: 1
INFO:DB:chain size: 0 GB (285 bytes)
INFO:DB:flushing DB cache at 1,200 MB
INFO:History:history DB version: 1
INFO:History:flush count: 1
INFO:BlockProcessor:scanning block directory meta/blocks...
INFO:BlockProcessor:deleted 1 stale block files, total size 285 bytes
INFO:BlockProcessor:catching up to daemon height 101 (101 blocks behind)
INFO:BlockProcessor:height 1 of 101 6962336134cc551e47876c1bcc436986489b8c0d9b6008c34b8781f87bbf3544 2024-12-04 01:07:08 0.000GB 1 txs chain 0GB
INFO:SessionManager:stopping servers
INFO:SessionManager:closing connections...
INFO:SessionManager:connections closed
ERROR:BlockProcessor:error prefetching 0610f78b45cdcb8f3acc06bb6c0fa976ef79e824360058ef1ba76ee119c7cc21: Session is closed
ERROR:BlockProcessor:error prefetching 11575e4c2dd2b786ffe24ab0439f7fec21a6860d9485b63a06273401a37d9f32: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 60c69f7f4fd78479c376cd06163c198aa5e45df053ac90918e9f90b43d69f73a: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 359d3818b64039b05e6552f272c1fb6c98fb713b6f4d3ba8e736dde9e159d0cd: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 46a16268710b51639eec8173bd8cb90ed20bdc45c067824f3c14ccb8941d1bf9: 'NoneType' object has no attribute 'get'
INFO:Controller:shutting down
INFO:Controller:shutdown complete
ERROR:BlockProcessor:error prefetching 55b9ba7f176fdcdd90be70816b12e7e387e2c301993d7190833410d63e910af4: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 70a1e31ab0606cb04a3972005ce708c933a47c39678585de9c7a5a762c40fb19: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 0cecb7ba4ffec37b3da27536c5ef35b87946fe09a6551e515f9a7f09b0896023: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 641e359e27b8d10d4c11b316fab5935dfaa26cc073aeb68a4117005013a1e176: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 208ab8575cb81cee12fdaf920656eb37e3bf1202a80a208bb3dcf9490280bc4d: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 071e7faf308ed9b5d10700bd10aba36f483b08410ba95ccc7bf5ca4120211e00: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 38fc7e85297feb287d1fdcc142976a925611bed841b2aceebe7aa27394759c97: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 2602d075e6764d6f111ab702658d7663746d4c30ab43258d0baf3523d28fac6b: 'NoneType' object has no attribute 'get'
ERROR:BlockProcessor:error prefetching 78b3b683bd21f3ef3bdba8e6af1b8d331e6b70f5062549a2df4371c92ac1dc33: 'NoneType' object has no attribute 'get'
ERROR:electrumx:ElectrumX server terminated abnormally
Traceback (most recent call last):
  File "/home/omarosman23/.local/bin/electrumx_server", line 35, in main
    asyncio.run(controller.run())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/lib/server_base.py", line 125, in run
    await server_task
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/lib/server_base.py", line 98, in serve
    await self.serve(shutdown_event)
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/controller.py", line 143, in serve
    task.result()
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 758, in fetch_and_process_blocks
    await self.advance_blocks(hex_hashes)
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 476, in advance_blocks
    await self.run_with_lock(advance_and_maybe_flush(block))
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 320, in run_with_lock
    return await asyncio.shield(run_locked())
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 319, in run_locked
    return await coro
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 466, in advance_and_maybe_flush
    await run_in_thread(self.advance_block, block)
  File "/home/omarosman23/.local/lib/python3.10/site-packages/aiorpcx/curio.py", line 57, in run_in_thread
    return await get_event_loop().run_in_executor(None, func, *args)
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 510, in advance_block
    for tx, tx_hash in block.iter_txs():
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 113, in iter_txs
    raw = raw[cursor:] + self._read(self.chunk_size)
  File "/home/omarosman23/.local/lib/python3.10/site-packages/electrumx/server/block_processor.py", line 71, in _read
    raise RuntimeError(f'truncated block file for block {self.hex_hash} '
RuntimeError: truncated block file for block 6962336134cc551e47876c1bcc436986489b8c0d9b6008c34b8781f87bbf3544 height 1

Configuration Details
ElectrumX Configuration (config):
DB_DIRECTORY = /home/omarosman23/.electrumx/db
DB_ENGINE = rocksdb
DAEMON_URL = http://rpcuser:rpcpassword@127.0.0.1:18443
COIN = BitcoinSVRegtest
NET= regtest
SSL_CERTFILE = /home/omarosman23/.electrumx/electrumx.crt
SSL_KEYFILE = /home/omarosman23/.electrumx/electrumx.key

Bitcoin Daemon Configuration (bitcoin.conf):
server=1
txindex=1
rpcuser=rpcuser
rpcpassword=rpcpassword
rpcallowip=0.0.0.0/0

[regtest]
rpcbind=0.0.0.0
rpcport=18443

Expected Behavior
The electrumx_server should connect to the bitcoind node, scans the blocks and does not crash

Is this question about Bitcoin or BSV?

I am trying to run on Bitcoin, but I always get this error: electrumx.lib.coins.CoinError: unknown coin Bitcoin and network regtest combination

Your Environment Details says "coin: BitcoinSV", and your config says "COIN = BitcoinSVRegtest". So if you are trying to run Bitcoin, this might be an error source.


text:
How can I take a "snapshot" of the bitcoin blockchain and analyze it?
What I want to do:

Download the copy of bitcoin blockchain
Select from it all those addresses that have bitcoins (> 0.05 BTC) and they have not been active for > 7 days
Display statistics on the site in the form of a graph and with the ability to view all addresses, repeating the search every 7 days and updating the statistics

What? I do not understand:

I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?
How much time and resources will it take?

I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?

You can either use an existing blockchain parser or write your own software to read the blkXXXXX.dat files (in %APPDATA%\Bitcoin\blocks if using Windows)
I used the protocol documentation to write my own parser in Go.
C> blockchain -file %APPDATA%\Bitcoin\blocks\blk02360.dat -longstats -block 115 -tx 2467

Transaction Details in Hex (Decimal/Symbolic):
  Version:................01000000 (1)
  Inputs:.................01 (1)
  Input:1
    Previous Transaction:.35A0AF1A2A97890EEE5FC3D614036ACF10C304D8C2E9B852626E8EA0E7063EA3
    Previous Output Index:0001 (1)
    Script Length:........6A (106)
    Script:...............47304402206EED6418DDDCEB242F5A9E33F74CBC71EC92916B55E95409D7DD2F
                          F05857CA6F02204DB6B0B24EAF200C32B18B19F31ADDF07CFF7FFF5BDE356871
                          D845C110F31EDA0121023A8F1E4FD676A7BD7366E5D232358E92838609875FAC
                          802E604BCEBE1C077CED
    Sequence:.............FFFFFFFF
  Outputs:................02 (2)
  Output 1
    Value:................9714000000000000 (5271)
    Script Length:........19 (25)
    Script:...............76A91412FB816154B441CD9C31B9D2BEA8DB8E6B77D02288AC
  Output 2
    Value:................228A000000000000 (35362)
    Script Length:........17 (23)
    Script:...............A914715CD328A4FFBC4A9099D406BE49181A61FEF37E87
  LockTime:...............00000000 (0)

Statistics for blk02360.dat (2020-12-12 to 2020-12-14)

   115 blocks
215639 transactions (1875.1 per block)
100901 Segwit tx    (46.8%)
644756 inputs       (mean 3.0, max 1100 per transaction)
604246 outputs      (mean 2.8, max 3451 per transaction)

Processed file in 313.6292ms

How much time and resources will it take?

Downloading the blockchain data will take hours or weeks depending mostly on the speed of your storage device - in my experience. I suspect using an SSD instead of a HDD will make a huge difference.
Time to process one blockfile depends on the software used but my simple example shows a typical 128MB blkXXXXX.dat file can be parsed in a third of a second on very modest hardware.
You will have to process several thousand of these.
Time to write a parser will probably be days or weeks depending on your experience and on the complexity of the analysis you want to carry out.


text:
Where can I see the requirements for creating a password in Bitcion core?
In 2017 I created a wallet in Bitcoin core and protected it with a password. The password contains characters like ".,;". When I decided to send my bitcoins the wallet wrote an error "invalid password". Where can I see the specification/specification/clear requirements for the password to be created? I have a suspicion that the use of special characters caused problems with the wallet. Thanks in advance for the answers.

Where can I see the specification/specification/clear requirements for the password to be created?

I suspect the source code is the best guide.

the wallet wrote an error "invalid password".

That phrase doesn't occur in the source code of the current version (23.0).
The file qt\askpassphrasedialog.cpp contains the message "The passphrase entered for the wallet decryption was incorrect."
    case Unlock:
        try {
            if (!model->setWalletLocked(false, oldpass)) {
                QMessageBox::critical(this, tr("Wallet unlock failed"),
                                      tr("The passphrase entered for the wallet decryption was incorrect."));
            } else {
                QDialog::accept(); // Success
            }
        } catch (const std::runtime_error& e) {
            QMessageBox::critical(this, tr("Wallet unlock failed"), e.what());
        }
        break;

So far as I can see from a quick look, there's no special processing of the entered password (referred to as a passphrase in the code). So I'd certainly expect that normal punctuation like ., , and ; would not cause any issues.
When you set a password, the code does produce the ominous warning "Warning: If you encrypt your wallet and lose your passphrase, you will LOSE ALL OF YOUR BITCOINS!"
        QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"),
                 tr("Warning: If you encrypt your wallet and lose your passphrase, you will LOSE ALL OF YOUR BITCOINS!") + "

" + tr("Are you sure you wish to encrypt your wallet?"),
                 QMessageBox::Yes|QMessageBox::Cancel,
                 QMessageBox::Cancel);

There are other questions here that ask about password recovery for Bitcoin code based on partially known passwords. Answers to those questions may be helpful.

Are there Bitcoin password crackers I can use to recover forgotten passwords?


text:
The competitive practicality of Bitcoin
Bitcoin is to be trustless by the thousands of nodes, but is this no more trustless than the Federal Reserve system? An account size in 8b on each device is a feasible alternative with absolute consensus by nodes for each device.

What do you mean by "account size in 8b"? Do you mean just store a single number for an account's balance on the device that "owns" the account?

On all devices, 8b lines of all potential personally identifiable accounts, to reconcile for database consensus for all intents and purposes.

Bitcoin is to be trustless by the thousands of nodes, but is this no more trustless than the Federal Reserve system?

No. Bitcoin achieves trustlessness by having nodes which are all enforcing consensus rules that are also trustless. The node operator determines the rules that their node enforces, typically by running a particular software. The nodes that share the same consensus rules will converge on the same state, and this state is what "Bitcoin" is.
While, in theory, you could have everyone also be validating whatever rules the Federal Reserve operates under, it would not necessarily be trustless. The rules themselves also have to be trustless.
In the Federal Reserve system, part of the rules are that the Fed can introduce and remove currency from the system. They control the inflation rate and the supply. Even if enforced by all participants in the system, the rule allowing them to have such control require having trust in the Fed.
However in Bitcoin, the rules do not allow for this. The rules in Bitcoin state a fixed inflation rate and monetary supply. These cannot by changed by a single entity, and so is trustless.
Another rule is how double spends are dealt with. In Bitcoin, it is handled through the blockchain and essentially random change. But the blockchain allows for everyone to converge on the same "real" transaction in the event of a double spend attempt.
In the Federal Reserve system, handling double spends essentially amounts to asking the banks for who is correct. By delegating the resolution of double spends to specific entities, the system requires trust.
Lastly there is the isssue of how rules can be changed. In Bitcoin, the rules are set by the node operators via the software that they run (and how it is configured). In order to change the consensus rules, node operators need to update/change their software to one that enforces the new rules. Furthermore, node software have been written specifically without auto-update mechanisms to prevent developers from forcing a consensus rule change onto node operators.
In the Federal Reserve system, the Fed can change the rules as they wish. Their rules allow for them to change the rules, and so even if everyone validated all Federal Reserve transactions, the Fed could issue a rule change, and by the definitions of the rules in that system, every node would have to update to the new rules. This is not trustless.


text:
DB Structure for bitcoin blocks
https://github.com/blockchain-etl/bitcoin-etl#schema
I found a library to parse the block data in json format. I want to parse that json and put it into a db to then use that for calculating balances. Is there any smart approach you can recommend me? Im talking about the db tables and maybe if this makes sense? I dont know what the wait times are for queries when it has to check millions of lines

I can imagine that it would take a long time to check through a table with all transactions, make a where query with the wallet and then calculate the amount that was transfered in and out.


text:
How do Blockchain Explorers lookup wallets? [Balance]
How do Blockchain Explorers lookup wallet balances? Im trying to make my own explorer. For example Bitcoin-cli does not have a method (function) to lookup a wallets balance. listtransactions does not show balance.
Anyone with some know-how, can you link me anything? Im talking about Bitcoin but if you know how for other currencies, let me know please

There is no way for a block explorer to know which addresses belong to the same wallets, in fact no block explorer shows the balance of wallets but only by addresses.
The only way to know which addresses are from the same wallet is having generated that wallet or having it's seed.
Wallets are a client structure that collects all the addresses for which you have the private key needed to spend, in order to make it easier for the user to have the total balance, but from the blockchain standpoint wallets do not exist, there are only addresses and UTXOs.
If one could know which addresses belong to the same wallet, it would not make sense to use different address for each transaction.


text:
Bitcoin core balance won't show up!
I have bitcoin core wallet i havent use since 2013. i let it sync fully now but it won't show my bitcoin balance and this shows up.....
Warning: Unknown block versions being mined! It's possible unknown rules are in effect.
can someone tell me what do to do?

you need to upgrade your node by downloading the latest software. But that might not have anything to do with your balance being zero.


text:
Help about BitlyCore
Please I need help. I want to know if anyone knows about BitlyCore.com I have been running the full block for days now and it's just stuck at 87% please I need help.

It's a scam, it will never reach 100%. Your money is gone. You can report the theft to your local police but they won't be able to recover your money for you.
A safe website to find guidance on Bitcoin wallet software is https://bitcoin.org/en/choose-your-wallet
The correct website for downloading Bitcoin core is https://bitcoincore.org/en/download/
Ignore any other websites offering a wallet whose name ends with the word "core". There are many scammers who exploit the lack of knowledge of people new to Bitcoin.

See also

Bitly core website not loading
Please i need help about BitlyCore.com
Bitswallet core

It will help to also read

Can't spend Watch-Only coins, have I been scammed?
How can I get a private key for this address

but i can see there about 3 btc aviable. what cab i do now with the wallet?

The 3BTC is an illusion designed to trick you into paying fees and putting money in to achieve a minimum withdrawal threshold. All fake.

if i have tthe passphrase and password. can i use the 3 btc in other wallet?

(1) The people who tricked you, will have made sure you cant spend any money. Thieves usually don't leave $170,000 lying around where other people can take it. (2) a passphrase is not a seed-phrase. (3) Bitcoin-core doesn't use seed-phrases.

authors: Хамзат Бехтиев


text:
How can i trace a transaction where my bitcoin has been withdrawn from my paper wallet?
My bitcoin has been stolen from my paper wallet, can I track where its gone and is it possible to do so with my paper wallet?

See https://bitcoin.stackexchange.com/q/102213/13866 to understand why this almost certainly won't get you anywhere.

All transactions are publicly visible, you can trace it in a bitcoin explorer, e.g. at blockchain.com but you cannot revert the transactions.
Successful scammers usually have to manage more and more addresses and most of them earlier or later do mistakes in staying private. So most of them could be caught. In practise (as of 2021) this doesn't happen because most victims think it's not possible or the loss value is too low or the police has far too few experts to follow it. But no scammer can feel save because you cannot improve the privacy after the fact. So each old case can be picked up somewhere in future.
This is how the tracing works:
With help of heuristics ( https://en.bitcoin.it/wiki/Privacy#Blockchain_attacks_on_privacy ) a cluster of bitcoin addresses is built which likely belong to the scammer. Then one investigates if at least one of the addresses in the cluster sent bitcoin to one of the millions of known exchange addresses. If this is not the case then you need to be patient. If there are links then the police can follow up directly (or via their colleagues in the exchanges country) to get all available information about their client who is likely the scammer. This information could be the id, the bank account number, a bitcoin withdrawal address or an altcoin withdrawal address. The first two options might lead to the real id of the scammer to claim the bitcoin back.The last two options provide the data to do follow on analytics actions.
Of course scammers try to avoid this by moving the coins dozens of times around, by using mixers or by exchanging the bitcoin into e.g. Monero forth and back. This can theoretically break analysis but in the most cases it doesn't work over time. One little mistake and the house of cards breaks down. E.g. I saw scammers moving the coins more than 300 times and then they mixed it with old coins again. So the effort of moving 300 times was a waste of time. Or I saw people using Wasabi Coinjoin several times in a row and afterwards they mixed it again with coins from their earlier business. Then the Coinjoin isn't helping to stay private.
Bottom line the problem of a scammer is that they should avoid spending their coins together but that its a pain to do this with an increasing number of addresses and many scammers aren't aware how easy tracing is with the right analytical tools.
After investigating dozens of cases I know that in most cases there are traces to exchanges. I'm convinced that most scammers could be caught, but if this is successful the final success depends on the exchanges (not all support inquiries) and the cooperation of the involved jurisdictions of scammer, exchange and victim.
I wish you success in your case!

Technically you only need your bitcoin address from your paper wallet to track it.
But that would be tracking it on the bitcoin blockchain.
You can use any of the bitcoin blockchain explorers, just paste your paper bitcoin address into any of these and see which address it was sent to:
https://blockstream.info
https://mempool.space

However as you track your UTXO, you'll start seeing that it gets more difficult if it has been sent many times to different addresses.
And if you're looking to track it into real world (meat space) you have even fewer options. You can look into popular exchange addresses and see if someone deposited them there and reach out manually.


text:
boost propagation speed
Is there a way to boost propagation?
E.g if someone sent me an amount, he says that he sees the txid in blockchain because he is connected to faster nodes, and I search this txid and I see it doesn't exist, because I'm connected to slower nodes.
Is there a way that I will be connected to faster nodes? So I won't need to wait a few seconds/minutes to receive the data because I have slower nodes.

Are you running your own node? Or looking up the transaction using a blockchain explorer service? Transactions will propagate through the network very quickly, this "I'm connected to fast nodes, you're connected to slow nodes" explanation sounds like something a scammer might tell you.

@chytrik I'm running my own node, I'm asking if a case like I wrote may happen that the sender sees and the receiver doesn't see yet.


text:
What exactly is a "blockchain developer"?

Hello everyone. This isn't specifically a bitcoin thread but due to recent events I think it is important that people get an understanding of the real Elon Musk as I have no doubt he will try and reenter the cryptocurrency space again in the future as some kind of figurehead. This is of course despite the fact that he is not a blockchain developer and has made no real contributions to the space but he appears to find the need to attach himself to any kind of new technology and take credit for it. This is a familar pattern, he is neither an expert on artifical intelligence, neuroscience or infectious diseases such as Covid-19 but is able to convince people that his opinion is always worth listening to.

Source: https://old.reddit.com/r/Bitcoin/comments/nbq16s/the_real_elon_musk/
(Emphasis added by me.)
Every time I hear somebody mention "blockchain", it always comes off as if they have no idea what they are talking about. Have I missed something? Why is there such a focus on something they refer to as "blockchain", sometimes "Blockchain", as if this is some sort of "service" that magically exists somewhere on the Internet and which Bitcoin and other "cryptocurrencies" build on?
Isn't "blockchain" just a simple word to refer to the "chain of blocks" that make up the technical structure of Bitcoin? If so, why does this person and many others use it in such a strange manner? A "blockchain developer" makes as little sense as a "TCP/IP developer"; it's just a technical, non-tangible "infrastructure" of sorts. It sounds to me like referring to a plumber as a "pipe developer", even though they never touch or create any of the pipes in the ground, but merely fix clogged ones in individuals' homes.
But since I'm asking, I'm obviously doubting myself. Maybe I have actually missed something?

I'd assume it just has the natural meaning of "a developer with particular expertise in blockchains, their applications, and related algorithms and technologies".

For that matter, "TCP/IP developer" also seems perfectly natural for a developer with particular expertise in how the TCP/IP protocol works and how to implement or use it.

Voted to close as opinion-based, because it seems to be a question about the English language, and whether or not the popular use of "blockchain" as the moniker for some superset of the bitcoin industry is apt.


text:
If I buy a house for Bitcoin directly, do I owe the government taxes in Bitcoin or in fiat?
If Sue buys a house for 1 Bitcoin, that is, giving the 1 BTC directly to the person selling the house (no fiat involved), does she have to pay a % of that in Bitcoin to the government, or do they demand a fiat %?
If the latter, since Sue has no money on her bank account, she will face the situation of being unable to pay the taxes.
And to get more fiat money, she would have to sell Bitcoin to get fiat money to pay the first taxes, but then she owes more taxes on that!
Isn't this an impossible, eternal loop? Doesn't it prevent anyone from actually using their Bitcoin unless they also have tons of fiat money saved up which they are comfortable burning away for nothing just to pay taxes on their even more hard-earned Bitcoin?

I’m voting to close this question because it is asking about local taxation rules, which are better directed to an accountant or tax advisor.

Or you could help. I don't have any "accountant" or "tax advisor".

That's understandable, but then your only choice is to read the tax code yourself. Me, and the experts answering questions here about the technological aspect of Bitcoin, are not tax advisors, and almost certainly not familiar with your jurisdiction, so this is just the wrong place to ask.

This is not a question about Bitcoin; it is a question about trading one asset for another.  Instead of trading Bitcoin for a house, you could trade your your yacht, your shares in Tesla, or a year of hard work, and the question (plus the answer) would be exactly the same.

I am not expert in US law, but I have understading of taxes in my local country and general principles.
In general, transactions and taxes are made in local currency, unless it is external trade, financial (like currency exchange) or other operation allowed by local tax/economic laws. Even if transaction is made in foreign currency, it is treated for tax purposes in local currency (converting foreign currency to local at the day of transaction).
In your example there is 99,99% probability that you will pay taxes in fiat currency after buying home. The exact amount depends on the value of bitcoin in the day of transaction. For example, if you by a house at 1 June for 1 bitcoin in the US, then the price of that home is converted to USD, and that sum is later used in calculating taxes.
However, not all jurisdictions currently allow to contract (setting price) in bitcoin for all assets. For example, in your country you can buy bitcoin at local exchange, but you cannot buy a house with bitcoin. However, you can still write buying agreement quoting local currency, paying in bitcoins and signing additional document with the seller regarding that transaction occured in bitcoin in the amount equivalent to price in local currency (this document is equivalent for bank recepeit for local currency). Still, such agreement may not be recognized by local authorities and declared as void.
Regarding the demand for fiat currency. In your example Sue will have to sell some amount of bitcoin to pay taxes. Unless the tax rate is not 100% (which in nonsense) the loop is not eternal.


text:
Does the Taproot update benefit all bitcoin users? or is it for a selective amount of people
I came across a blog post where it mentions that the taproot update is promised to speed up BTC transactions, lower their fees, etc. but does this mean that literally, anyone sending or receiving BTC will benefit from it? will it require special software to operate?

Bitcoin transactions require a certain size and with taproot and tapscript we can decrease that size.
This means that effectively we will be able to store more transactions in one block allowing overall a slightly higher throughput of bitcoin transactions in the network.
So even if you continue to use legacy transaction formats you might still benefit from the fact that the blockchain might be less congested as it can fulfill a higher demand with the same space.
Of course if you want to use it you will need a wallet / software that supports the new format but as it seems it will be merged to bitcoin so modern wallets should be compatible and also implement it.
The only direct benefit that you get from switching to taproot is that your tx will be smaller in size allowing you to either save on fees or if you want to pay the same fees allow you to have a higher feerate. Though miners are not forced to mine transactions with highest fee rates first they are certainly economically incentivized to do so. Thus besides doing something good for the network your tx might also be confirmed faster.

In addition to what Rene wrote, the adoption of Taproot will provide many bitcoin user's with a higher degree of privacy.
The structure of a bitcoin transaction can contain clues about the nature of that transaction. By using certain heuristics, anyone watching the blockchain record can group together certain transactions and addresses, to attempt to identify users/wallets, and track the flow of funds through the network.
The adoption of taproot will allow some types of more complicated transactions to not leave such an obvious footprint on the chain. Instead, these transactions will just look like much more basic transactions, which don't leave as many clues behind. This is of benefit to the users who are creating those transactions, as it will now be less clear what the nature of their transactions are, in the view of third-party blockchain-spies.
Initially, pay-to-taproot outputs will be somewhat unique and obvious on the network, but as time passes and adoption increases, we might expect to see a larger 'anonymity set**' form for users of taproot.
This blog post seems to be a good in-depth discussion of the privacy implications of taproot: https://braiins.com/blog/explain-like-im-not-a-developer-taproot-privacy
**  you can think of an anonymity set like a measure of plausible deniability. If the anonymity set of your UTXO is 1, then that means there is no denying it is yours. If the transaction graph history can at best narrow down the ownership of an output to 100 different people, then your anonymity set would be 100 (ie, higher plausible deniability), etc


text:
How can I process bitcoin payments from a hidden service on Tor?
I had a very simple question for which I seem unable to find an answer. I want to set up a Tor hidden service and on it allow Bitcoin transactions. How can I make this happen? The server would be running Windows IIS and is mostly for personal use.
I had a look around at BitcoinD and Blockchain.info but somehow the information there does not resonate (or I am just too daft to grasp what they are saying)

My suggestion: Don't use windows AT ALL. Easiest way to get hacked.
also here's the answers you are looking for https://en.bitcoin.it/wiki/Tor
specifically this line:
"(after starting tor) Run bitcoind with -proxy=127.0.0.1:9050"

Hello and thanks. Can you perhaps elaborate on why using windows inside a VM that runs no other software and is kept up to date and has very strong passwords/usernames would be a serious risk? A part of me would prefer to use Linux, but tbh I am not that experienced with it, and could not be sure that the way I set up the Linux box would be done correctly.

There is an updated setup guide for running Bitcoin Core and Tor on Bitcoin.SE right here.


text:
Running BitCoin Wallet On USB
I'm trying to run a BitCoin wallet on a USB Drive. I've got that working, but I'm trying to make the block chain get downloaded and stored inside of the USB drive as well. This is the only thing I've been able to come up with and I've had no success.
H:\Bitcoin\bitcoin-qt.exe" -datadir=H:\Bitcoin\appdata

I get the error "Filename is incorrect". I know there is a portable BitCoin program, but I'm also wanting this to work for other coins such as LiteCoin, and I know there aren't portable versions for those.

Perhaps it's just an issue with the code block, but I only see one double quote. I assume that the other is before the entire code block, and is used to pass the program name.
The only other possible issues I can think of are to

make sure the directory specified in the datadir argument exists and is writable
make sure that the USB drive is mounted on H:\ on any other computers you use. Maybe it would be smarter to use a relative path instead.

Regarding portable Litecoin etc.
Any program is portable, as long as all of its dependencies can be met in a portable environment. Therefore, if you copy the entire C:\Program Files\Litecoin folder, you should, in theory, have a portable program, provided you copy your data directory also, or don't mind re-downloading the blockchain and don't mind losing all your Litecoins.

I would recommend you look at electrum. It offers the ability to have a portable wallet like your looking for.  It's a thin client modrl Bitcoin client utilising a random seed phrase which can be used you restore your wallet anywhere with or without ypur wallet file on a usb.  Electrum also allows you to have the same wallet open and in use multiple locations something which the standard client does not support.


text:
send payment from one address to another from my website
I want to send payment to bitcoin address weekly from my bitcoin address,I have tried blockchain api but can't seem to find an answer.Need help.

Any suggestion on what language or system to use? (javascript, node.js, wordpress, php, etc)

This question is little scarce on details. Would you like to eloborate more what kind of wallets and what kind of transactions you need to do?

Yeah,what I want is to send bitcoins to others,so I guess I need to send to their bitcoin address  and that too weekly,and I want to do it in PHP,

http://blockchain.info/api/blockchain_wallet_api
The api call to send is:
https://blockchain.info/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$address&amount=$amount&from=$from&shared=$shared&fee=$fee¬e=$note

In PHP, replace all the variables (they start with a $ in example up above) with your actual info. Some of the parameters in the url are optional so visit the page I linked to see which ones are optional. Keep the url as a string and feed it in to this:
$result = file_get_contents($the_url_you_just_made);

This should send a payment as soon as it runs, you may want to read the resulting string, it will contain the error message if anything goes wrong. The response is detailed on the link and you can try out URLs in browser as well, just type in GUID, amount, address, etc in the correct places.

Thanks boss,now that's what I wanted when asked for the question

How to make the API call in a dummy way i.e. in a sanbox manner just like PayPal ?


text:
Would pool mining within video games (to make them free) be profitable?
Say a big game company like steactivblizzard released the latest Call of Assasins Hitman for free. They could incorporate bitcoin mining within the menu/pause/loading screens as a sort of payment method. Just a small burst of bitcoin mining so as to not interrupt gameplay too much, much like how we used to have loading screens before SSD.
Would this be profitable? I'm thinking that people playing these games are most likely to have high-end GPUs. And these are big ticket games with a lot of players. Would they be able to successfully mine coins to the point of being profitable?

Bitcoin mining using generic consumer hardware has been non-profitable since about 2013, when the first ASICs appeared. These days, GPU mining won't even gain you enough to compensate for the wear & tear on your hardware, much less enough to pay for the added electricity usage.

Does this answer your question? How does one calculate the profitability of GPU mining? or Is Gpu mining still an option? whose answers mention pool mining.


text:
Does Bisq have built-in wallet support for anything other than Bitcoin and BSQ?
I've long wondered about this but been unable to find any answers.
In theory, one could use Bisq and not even have Bitcoin Core, or at least I believe such is the case. You could use it as your sole Bitcoin wallet, with local private keys and all. (But in practice, I don't trust it as much as I trust Bitcoin Core, so I transfer it out to my Bitcoin Core wallet.)
It also supports its own cryptocurrency, called "BSQ". That much I know for a fact, and it makes sense.
But what about all the other garbagecoins that it supports for trading? Does it actually allow you to hold those inside Bisq, with no extra software having to be installed? For example, if I buy an Ethereum (not that I would), can Bisq hold that or would it require me to have a separate "Ethereum wallet" installed to transfer to?
Are Bitcoin and BSQ just "special cases", or are any crypto currency that Bisq supports for trading actually supported within Bisq itself to hold and manage?


text:
Developing a Bitcoin POS (Payment Page) - How do I identify the transaction
This is probably a basic question but I can not find an answer.
We are developing a BTC payment process for a Point-of-Sale. We have managed to build this fine and can make requests (QR code) for a payment amount in BTC. for example 0.0001 BTC
We then check the blockchain for an equivalent transaction on our address of amount 0.0001 BTC.
This works.
But seems unreliable. What if there were to be multiple transactions at around the same time for the same amount. I really want to be able to insert a unique identifier/order number or memo into the QR code request which then gets passed onto the transaction. This would link the request to the payment with a unique id. Is there a way to do this? It seems odd if there is not? Or is there another obvious way that I am missing?
We are using https://api.blockcypher.com to get the transaction details. Which look like below. There does not appear to be any kind of a "memo" parameter, although wallets and QR generators allow you to add such.
{
      "tx_hash": "8bbe058b46f2f9a7e1709ca4a3ff731ba2227d23f2edf11eb8710dfcd6b1e502",
      "block_height": 685568,
      "tx_input_n": -1,
      "tx_output_n": 0,
      "value": 16692,
      "ref_balance": 3417334,
      "spent": false,
      "confirmations": 4,
      "confirmed": "2021-05-30T22:09:51Z",
      "double_spend": false
    },

The only right way of of doing this is generating a new address for every expected payment, and then waiting until you've received that amount on that address.

Came here to write that. Use a new address for each invoice.

Thanks... I guess thats a whole area we have missed out. At the moment assumption is that we store a fixed public address. Are there simple/free api's to generate multiple addesses on the fly for this purpose?

Most wallets software will even make it hard for you to reuse addresses. When you request an address, you get a new one. Integrated POS systems like BTCPayServer do the same.