text:
Is the reference client of Bitcoin regularly audited?
I imagine that plenty of eyes have combed through the reference client's source code. But the code is still changing for a variety of reasons (features, patches, improvements, etc).
I didn't find that much information regarding security audits other than this post that says the Bitcoin Foundation hired Sergio Demian Lerner as a core security auditor.

As Core Security Auditor, Sergio will be dedicated to the ongoing
  security review of changes to the core code. Sergio has been
  volunteering his time and expertise since March 2012 and over the last
  couple of years, he has found, reported, and helped fix several
  vulnerabilities in the core code. Sergio has been an independent
  security researcher and consultant since 2011 and will continue to
  work with his other clients in addition to his role at the foundation.

Are security audits, whether internal or external, performed on the source code of Bitcoin Core? If so, by whom and how often?

The Bitcoin Foundation for all intents does not exist in 2017.


text:
Can transaction inputs reference outputs of pending transactions?
The inputs of a transaction reference outputs of previous transactions. These previous transactions

must already be present in the block chain, or
can also be pending transactions?

I don't know if the term pending transactions has some meaning I'm not aware of. In this context, I mean transactions that are not yet in the block chain, but are present in the block containing the new transaction.
Example: A particular block B contains multiple transactions including a transaction X and a transaction Y. The transaction X references the output(s) of transaction Y. Transaction Y is not yet in the block chain, but it is present in block B as well. Is this possible since transaction Y is not yet confirmed?
Note: I'm not using the term unconfirmed transaction because as I understand these are transactions not appearing in any block; and in this case transaction Y would be in a block, the same block as transaction X.

If transaction Y is in block B, then it is - for purposes of deciding whether X's inputs are valid - confirmed.
As far as consensus rules are concerned, a transaction X can spend outputs from a transaction Y that is anywhere in the block chain before X. That means either Y is in an earlier block as X, or in the same block but in an earlier position.
The P2P transaction relay also supports this. It will relay transactions that spend outputs of unconfirmed transactions under some conditions. Given two interdependent unconfirmed transactions, miners can decide to put both of them in the same block, or only include the first one in a block (leaving the other one in the memory pool for inclusion in a later block).

source: Stack Exchange

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

sort: votes


text:
How to uninstall Bitcoin Core?
I would like to know if you could help me, I downloaded the wallet of BITCOIN CORE and it occupied 25GB and filled my SSD i did not know that it takes more than 60GB, can you help me to uninstall the installed 25GB?
I would also like to install on my 1 TB hard drive, is it possible?

What operating system?

related: How can I run bitcoind in pruning mode?, How to move the blockchain data while still being able to use the wallet?

Just for understanding: You don't really want to uninstall Bitcoin Core, you just want to move its directory, right?

I could not install it all because my ssd only had 25GB available, so it took up space, it already deletes the wallet but the 25GB is still occupied ... my operating system is windows 7

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


text:
Sending bitcoins in regtest to client
I have bitcoind hosted on a local machine and I would like to set up a remote client to do some bitcoin URI testing on another local machine. I have Bitcoin-QT installed on the client and updated client bitcoin.conf as following
regtest=1
connect=0.0.0.0
rpc_connect = 192.168.0.252 #Address of host

In the client Bitcoin-QT, I copy the receiving address and try to have the host send regtest coins to the address with the command
bitcoin-cli -regtest sendtoaddress muteqiroK9LNRAUppnicQepBhPvaEuW8TG 1.00

This does not work. Can anyone give me some direction as to how I would get this working?
Thank you!

What error do you get?

Simple solution, here is what I did.
client bitcoin.conf
regtest=1
addnode=$ADDR_OF_HOST

then I opened port 18444 on host and all transactions synced on client.


text:
Retrieve private key for watch only address
When sending bitcoin for an ico the mycelium wallet automatically generated a watch only address and sent the btc from there. I need the private key for this watch only address to access my tokens. Is that possible? Thanks, Piers

the mycelium wallet automatically generated a watch only address and sent the btc from there

A watch-only address is one for which you do not have the private-key. It isn't possible to send bitcoin from a watch-only address.

I need the private key for this watch only address to access my tokens. Is that possible?

See Mycelium

'Watch only' accounts
An address stored in the wallet without the corresponding private key, allowing the wallet to watch for outputs but not spend them.

If the address is watch-only, your wallet doesn't have the private key.
How to manage my account says

To activate an archived account, press it to select it, and press «Activate» at the top.
To delete an account, press it to select it, open the pop-up menu, and press Delete. Note, you cannot delete your HD accounts, only single address accounts. When deleting an account, you are given the option to delete the account completely, or only delete its private key. Deleting only the private key will convert the account into a watch-only address, allowing you to monitor the balance and receive payments to the account, but not to spend from it.

(my emphasis)

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


text:
Getting Started With Script
I would like to manually write a few locking and unlocking scripts to get a deeper feel for that part of the network.  What is the simplest step-by-step set of instructions to set up everything needed to use Script in Windows, on regtest or some other testnet?  Is it possible to do this in Bitcoin-qt, or is working in the command-line a necessity?

You might want to check out btcdeb from kallewoof. It's a set of tools used to construct or debug bitcoin script.

There is astoundingly very few information on script and "getting started" on the net, though one can find a lot of scripts. When you want to assemble a script, just to play around with its features and implications, it gets quickly very difficult.
I had answered a similiar question here in detail, to show first steps and how to go.
I am generally using unixoide type systems, so I am not 100% sure on Windows. But if you have a (regtest) daemon running, using the command line and sending it some commands should do the trick.
Basically there are 5 steps:

prepare addresses & balances
create a tx
sign the tx
adjust the scriptsig
send the tx

The most critical part is in step 4, where you need to play with length of the script - and probably a lot of trial and error :-) Good luck!


text:
Question on Asymmetric Revocable Commitments
I'm trying to understand asymmetric revocable commitments from Andreas' book. In particular, I'm looking at page 295 (2nd edition).

Irene can confidently sign this transaction, since if transmitted it
  will immediately pay her what she is owed. Hitesh holds the
  transaction, but knows that if he transmits it in a unilateral channel
  closing, he will have to wait 1000 blocks to get paid. When the
  channel is advanced to the next state, Hitesh has to revoke this
  commitment transaction before Irene agrees to sign the next commitment
  transaction. To do that, all he has to do is send the revocation key
  to Irene. Once Irene has the revocation key for this commitment, she
  can sign the next commitment with confidence. She knows that if Hitesh
  tries to cheat by publishing the prior commitment, she can use the
  revocation key to redeem Hitesh’s delayed output. If Hitesh cheats,
  Irene gets BOTH outputs.

Output 0 <5 bitcoin>:
    <Irene's Public Key> CHECKSIG
Output 1 <5 bitcoin>:
IF
    # Revocation penalty output
    <Revocation Public Key>
ELSE
    <1000 blocks>
    CHECKSEQUENCEVERIFY
    DROP
    <Hitesh's Public Key>
ENDIF
CHECKSIG

The code example shows that there are two ways of redeeming Hitesh' 5 Bitcoin. Either by posting the "Revocation Public Key" or by waiting for a 1,000 blocks.
What I don't understand is the following. If Hitesh tries to cheat by publishing the prior commitment, why can't he also use his own revocation key (which he knows, since he created it) to redeem the output?
What prevents him from doing this?


text:
How to fetch incoming transaction in Ripple
Currently I have setup ripple mainnet server and provide availability of XRP trading, If any user submits the transaction in his account from the external wallet, How I know which transaction performed? Currently, I have used WebSocket socket and subscribe all account to the listener, So when any transaction comes in subscribed account then it will catch the transaction. But the issue is that when my xrp server is down or listeners missed any transaction then how we fetch incoming transaction later.

Probably the best way is to keep track of the last ledger index you have processed. So when you process all the transactions from ledger 30,000,000, track that you next need to process ledger 30,000,001. If you rejoin the network at ledger 30,000,500, you know that you need to query ledgers 30,000,001 through 30,000,500 before you are synced back up and can continue to process live ledgers.
Though not quite as good, you can be a bit lazier and just keep track of which transaction you saw last. This does require you to use the account_tx command (or similar) to query. If you see two or more transactions and the first one is the one you last processed, the server should guarantee that there are no gaps.

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


text:
Pay a wallet address in bitcoin
I don't trade in bitcoin, never have and I don't want to continue, but I have a problem I need to pay someone in bit coin, I have their wallet address but I don't know how to go about buying bit coin and paying them. I just need to make this one transaction and that is all. I need to send the equivalent of $351.00 in bit coin. Can anyone help?

So are you trying to buy bitcoin and then pay them?

"a recent report from the CyberEdge Group revealed that only 19% of ransomware victims who pay the ransom actually get their files back."  - Forbes.com

One way is to buy the bitcoin with fiat (cash) through localbitcoins.com (find a seller with at least a few transactions and 100% reputation). Have the bitcoin fraction you are buying delivered by the seller to the address you want. Just be very sure to get the address correct. You can verify that the funds reached the address by checking on any bitcoin block explorer, such as blockchain.info.  Once you verify the bitcoins are the address you want, you can pay the seller.

You are well to say that you need not act as the intermediate, only the agent to have the Bitcoins directly delivered to the address that must be paid.


text:
lot of bitcoinj clients have connected to me
Looking at my peers list in the debug window for my node, I can see that a lot of bitcoinj clients have connected to me. Is this any cause for concern?

If their IP addresses are all 52.*, then they're lying about being BitcoinJ and are really attacking you / the network. If so, ban them. If their IPs are all different, it's fine.

lots if them starting with 52, how can i ban them ?

52.* is a very large address space. Can you provide a source on why you believe they are all attackers?


text:
Lost bitcoins?? Help!
I transferred bitcoins from my Coinbase account to 3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa and now I cannot find it nor do I know how to get it back. Where is my bitcoins??   !

ask coinbase support

It seems to have gone through (at least, the amounts match up)

I transferred bitcoins from my Coinbase account to 3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa

Well that is how you'd typically transfer some bitcoins to someone else's wallet to buy something. Its also how you'd move your bitcoins to a second wallet that you own (or to another address in the same wallet that you sent from)
You must know what the address is for - you must have had a reason for making the transfer.

I’m new to transferring of coins can you help me figure out how to receive it back

Bitcoin transactions cannot be reversed, undone or cancelled.

can you help me figure out ... how to send it somewhere?

You already sent it somewhere.

I don’t understand! Confused newbie!

That's OK, we all find it confusing to start with. It's perhaps a bit foolish to put much money into something you find confusing - but many other people do that. Perhaps the following will help make things a little clearer.

Wallets don't contain bitcoins
Wallets contain private keys that allows you to control the movement of some bitcoins in the blockchain.
Private keys are not passwords or pass-phrases. Passwords are typically used to lock your wallet so that other people can't peek inside and see your private key. If your forget your password (it happens!) your wallet is useless. That doesn't matter if you follow the advice in the last point in this list.
The blockchain is a ledger of all bitcoin movements. All full-nodes (typically desktop wallets, mining pools, "exchanges", etc) keep a copy. The blockchain is not owned by anyone (For example it is not the same as blockchain.info and is not owned or controlled by them).
Your wallet has a private key. Some wallets can have several.
From a private key, an address can be derived.
You can send "bitcoins" from one address to another address.
When I wrote "bitcoin" there I meant the unspent outputs of one or more previous transactions (UTXOs)
When "bitcoins" are sent from one address to another, that is a transaction. The transaction details are added to (every copy of) the blockchain by miners (essentially).
If the other address is not derived from a private key you own, you no longer have any control over those bitcoin.
Your wallet should be able to show you all the private keys it knows of and all the addresses derived from those private keys and the total amount of "bitcoins" currently associated with those addresses.
Sometimes it takes time for your wallet to "catch up" with the latest transactions. If your wallet is offline or has a problem, it might not show the latest values.
If you don't write down the private keys (or a recovery phrase from which the private key can be created) and keep them somewhere safe, you, or your car-crash heirs, will eventually lose all your bitcoin forever (probably, OK possibly, it happens a lot). With only the private key (or recovery phrase) you (or a snoop) can re-create a wallet and gain control over the bitcoin associated with the addresses derived from the private key.

If you need more information to understand all this try

A gentle introduction to bitcoin
Ever wonder how Bitcoin (and other cryptocurrencies) actually work?

If after reading that, you still have questions,

Use the search box above to find existing answers
Ask one question at a time here, be specific, try to make your question easy to read, take time to create a good question.


text:
How can I generate the qrcode client-side that would be compatible with the Ardor Wallet qrcode
I'd like to generate a qrcode the same way the Ardor Wallet generates it, such that it would be compatible.
I found qrcode related javascript shipped with the Ardor node download in ardor/html/www/js/util and ardor/html/www/js/3rdparty, however I wasn't able to find any documentation.
Thanks for any hints or pointers.

The Ardor wallet uses the NRS.generateQRCode() function from nrs.server.js to generate a QR code based on string data into a target div. Both the data and the div reference are provided as parameters.
This function relies on the qrcode.js library from the 3rdparty folder.


text:
Ardor: How to decide if an asset can be send?
My (Javascript) frontend needs to decide whether the user can send an Ardor/Ignis asset in his account. My code checked for:
quantityQNT >= amount_to_send

But I realise that this doesn't work if the user has the asset offered on the asset exchange.
So just checking for unconfirmedQuantityQNT wouldnt be clever either, as it might want to send an asset which ownership never confirms (phasing or fork).
Would it be safe to check this way:
min(quantityQNT,unconfirmedQuantity) >= amount_to_send

Thanks for your opinions

In most cases you should use the unconfirmedBalanceNQT. Think about it as spendable balance i.e. your total balance minus coins/asset shares/currency units locked for various reasons such unfulfilled coin exchange orders.


text:
Ardor API: Not able to use POST requests with Axios due to CORS issues
I am having issues with POST requests to the Ardor API. This code:
<!DOCTYPE html>

Preflight request to CORS enabled Ardor Node fails

The result should appear here

<button type="button" onclick="myFunction()">Try it</button>

fails during preflight. Chrome:

Failed to load http://localhost:26876/nxt: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3000' is therefore not allowed access. The response had HTTP status code 403.

What I understand is that it is not me who needs to send the 'Access-Control-Allow-Origin' header but the Ardor/NXT node.
Likely its just me not getting it. There are options around, you can change the content type, is that possible with NXT API? Is that something anybody had to do?
Its just failing for POST, GET works fine.
Thanks for any pointers in the right direction.

I'm voting to close this question as off-topic because This question should be asked on StackOverflow.

Ardor versions prior to 2.1.0e rejected the OPTIONS Http method. This method is now enabled so the problem should be fixed.
It appears that Axios uses an OPTIONS Http request to check if CORS is enabled and since it was forbidden the response was a 403 response.

So it wasn't me! I assumed a different javascript module would work and tried with Jquery - that worked - Issue solved, thx


text:
What is the Design of Bitcoin storage?
How is bitcoin network stored and shared across the network? For instance, where is the data of UTXOs for each wallet is maintained?

What is the Design of Bitcoin storage?
where is the data of UTXOs for each wallet is maintained?

There's no need for every wallet to use the same storage format. The precise details of the storage format may be proprietary secrets or may be undocumented other than in the source code for that specific wallet.
This question could only be answered with some certainty for a specific version of a specific wallet.

How is [the blockchain] stored ... across the network?

Every full node keeps a complete separate copy.
Lightweight nodes (SPV etc nodes) each maintain a pruned copy of the blockchain that only contains blocks with unspent transaction outputs.

How is [the blockchain] ... shared across the network?

That is a rather separate question, there's probably an answer already here for that. Its probably described in Nakamoto's original whitepaper which is easy to find.
See also

How are transactions broadcast to the rest of the network?
https://en.bitcoin.it/wiki/Network
https://en.bitcoin.it/wiki/Protocol_documentation
which contains information of this sort:

The data is stored in the blockchain. Everything that you need comes from the blockchain. By scanning through the blockchain, a node can determine the UTXO set. If it is also a wallet, it can then find the transactions that pertain to it.

You misunderstood the question, I'm asking for the data storage of UTXOs, blocks and others like for UTXOs database is maintained and stored at the dir  $DATADIR/chainstate which is updated with a new block and in case of reorganization of block active state data is rollback.


text:
What is the significance of the version byte in front of RIPEMD-160 hash?
Public Address is generated from the private key following some steps. Please refer Bitcoin wiki to see the process.

The version byte is used to differentiate between MainNet and TestNet addresses as well as between P2PKH and P2SH addresses.

Can you tell me the version byte of MainNet and TestNet addresses?

@idk it is 0x00 for mainnet and 0x6f for testnet. You can find all the prefixes here : https://en.bitcoin.it/wiki/List_of_address_prefixes


text:
Sources to study Bitcoin source code, more specifically its UTXO model C++ code?
Can anyone suggest some sources to learn about the source code of bitcoin or similar tech which are using UTXO model for their transactions.

The best way to learn is simply to read it on https://github.com/bitcoin/bitcoin/

Is there something in particular that interests you about it?

I know the github source link but can't find out the source code of UTXO transaction model among the large pool of files.

Yes, I'm trying to learn as much as possible about the UTXO model.


text:
Bitcoin Code and Transaction Model
I'm Studying bitcoin from a while, focusing transaction model and I'm looking to extract transaction model only to try out some experiments to make the structure better from the current one. If anyone can guide me through, that will be very helpful.

What is your question? It's not clear what you  mean by a "transaction model" and how to extract it

See https://en.bitcoin.it/wiki/Transaction.
Transaction Format
Here's an example from my regtest network:
0200000000010111b6e0460bb810b05744f8d38262f95fbab02b168b070598a6f31fad438fced4000000001716001427c106013c0042da165c082b3870c31fb3ab4683feffffff0200ca9a3b0000000017a914d8b6fcc85a383261df05423ddf068a8987bf0287873067a3fa0100000017a914d5df0b9ca6c0e1ba60a9ff29359d2600d9c6659d870247304402203b85cb05b43cc68df72e2e54c6cb508aa324a5de0c53f1bbfe997cbd7509774d022041e1b1823bdaddcd6581d7cde6e6a4c4dbef483e42e59e04dbacbaf537c3e3e8012103fbbdb3b3fc3abbbd983b20a557445fb041d6f21cc5977d2121971cb1ce5298978c000000
From left to right:
Version: 02000000
Flag: 0001 (if present, indicates segwit)
Input Count: 01
Input 1 Previous Output Hash: 11b6e0460bb810b05744f8d38262f95fbab02b168b070598a6f31fad438fced4
Input 1 Previous Output Index: 00000000
Input 1 script length: 0x17 (23 bytes)
Input 1 signature script: 16001427c106013c0042da165c082b3870c31fb3ab4683
Input 1 sequence: feffffff
Output Count: 02
Output 1 Value: 00ca9a3b00000000 (1B satoshis / 10 BTC)
Output 1 public key script length: 0x17 (23 bytes)
Output 1 public key script: a914d8b6fcc85a383261df05423ddf068a8987bf028787
Output 2 Value: 3067a3fa01000000 (8499980080 sats / 84.9998008 BTC)
Output 2 public key script length: 0x17 (23 bytes)
Output 2 public key script: a914d5df0b9ca6c0e1ba60a9ff29359d2600d9c6659d87
Witness Count: 02
Witness 1 length: 0x47 (71 bytes)
Witness 1: 304402203b85cb05b43cc68df72e2e54c6cb508aa324a5de0c53f1bbfe997cbd7509774d022041e1b1823bdaddcd6581d7cde6e6a4c4dbef483e42e59e04dbacbaf537c3e3e801
Witness 2 length: 0x21 (33 bytes)
Witness 2: 03fbbdb3b3fc3abbbd983b20a557445fb041d6f21cc5977d2121971cb1ce529897
Locktime: 8c000000 (block 140)

Note: all values are little endian. Here is a description of all of the fields:


text:
How to add Bitcoins to my wallet
I am new at this and I was given a bitcoin from a miner, how do I know what it is worth and how do I put it in my wallet?

I was given a bitcoin from a miner,

Are you sure you havent been tricked by a conman?
See

Bitcoin Mining as a Newbie (link wallet to another person's miner)
Reg: Watch only Address
How can I get a private key for this address
Unlocking a Private Key from watch status
Recovering the private key from a blockchain wallet address

how do I put it in my wallet?

One fairly good way is

download a wallet such as "bitcoin core" from bitcoin.org. Some other wallets are also available. Never accept wallet software that is given or sent to you by someone over the Internet.
keep the private-key written on paper somewhere very very safe and never give the private key to anyone who asks for it.
ask the miner to send bitcoins to the address of your wallet.
wait for at least 6 confirmations of the transfer.

how do I know what it is worth

If there is any mention of "testnet", it is worth nothing.
If you do not have the private keys, it is worth nothing to you.
If someone else also has the private keys, they can take the bitcoin and leave you nothing.
If its in a wallet that a miner created for you, its contents are probably worth nothing to you.
Note that "Bitcoin Cash" (BCH) is not Bitcoin (BTC) and may be worth less. The same applies to "Bitcoin Gold", "Bitcoin Diamond" and a huge number of other alternative cryptocurrencys (altcoins). Don't confuse them.
Otherwise you can find the exchange rate from BTC (bitcoin) to USD (or any other currency) using a search engine. For example google BTC USD exchange rate

I am new at this

Be very very careful. Lots of conmen prey on people who are new to this.


text:
How to make the commission for withdrawal of Bitcoin on the exchange consistent with the miner’s fee viewed on the blockchain browser
I transferred Bitcoin on the exchange and found that the fee charged for filling in is inconsistent with the miner’s fee viewed in the blockchain browser. How do I ensure consistency? Thank you!

The fee your exchange is charging you is the fee for their services, which includes the miner fee that they need to pay on your behalf.
It is normal that this number is higher than what you view on the block chain explorer.


text:
Has Lightning Network seen any fraud or major vulnerabilities?
I'm curious to know has LN faced any major issues so far?


text:
What type of smart contacts will be available on Lightning Network?
What kind of contacts will we be seeing eventually on LN? Will it be anything like what Ethereum has?

are you asking someone to predict the future?

Just want to know what is currently possible. For example in BTC this wouldn't be possible yet without a hard fork. Is it possible to do now in LN? are there big obstacles in it's way (like a hard fork)?

@Toodarday certain smart contracts are possible using BTC, but they are more limited in scope than an ETH smart contract (for example). It would help if you could specify what exactly you mean by smart contract. What functionality are you looking for?

(This is according to my understanding, so any comments are very welcome.)
Lightning Network Summary
Currently, the lightning network operates by first creating a transaction on the blockchain, this is called a channel. See LND Overview.
When someone does a transaction on the lightning network, they create a transaction that they sign, which could be signed by the recipient and "closed out" at any time, which broadcasts the final state of the channel to the blockchain.
The fact that either party can close the channel at any time by broadcasting it to the blockchain means there isn't any loss of trust. With this level of trust, this limits the transactions on the lightning network to the current Bitcoin Script System which is intentionally not turing-complete.
Possibilities
Theoretically, another layer could be built on Lightning network (or the Bitcoin network for that matter) that established it's own form of scripting (e.g. some turing-complete scripting like Ethereum), and then generated Bitcoin-compatible transaction scripts. But, then the user would have to trust the new scripting language to generate a valid transaction that is in their favor. However, that introduces a very large attack vector and possibilities for developer errors like we've seen on Ethereum smart contracts. This does not depend on the Lightning network, though some of the concepts of LN might be useful.

I agree - problem with these types of question: what is a smart contract? The lightning system itself is based on a HTLC, which is already a smart contract. IMHO somehow this question is not making too much sense, without specifying what is required, too much room for speculation.


text:
Is there a limit to how many blocks can be rolled back from a 51% attack?
I was wondering if we where to ever face a 51% attack is there some sort of limit as to when the longest chain doesn't matter? For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?

For example if I owned 51%+ of the network, mined 1000 blocks privately and the rest of the network was at block 990 and then I broadcast the data would everyone switch to my chain and would the last 990 blocks be orphaned?

This can certainly happen. There is no limit on how many blocks can be reorganized. However, while nodes will still perform the action to rollback those 900 blocks and replace them with the 1000 privately mined ones, there will be lots of warnings if this does happen as Bitcoin Core (the most commonly used node software) has checks for large work blockchain reorganizations. These checks will trigger warnings if there are reorgs of more than a few blocks so that the node operator can take action if necessary.

Can you explain more about what actions a node operator can take in such situations? (For example if it appears there is a 51% attack)

A node operator can explicitly mark a block as invalid using the invalidateblock command. This will mark that and all blocks that build on top of it to be invalid which then forces your node to use a different valid branch. In the situation posed in the question, node operators could use invalidateblock to mark the attacker's first block as invalid and thus they will continue to use the chain that they were on originally.


text:
Any Tutorial to send Bitcoin from Copay to Trezor?
I am using Copay wallet, and feel comfortable with it.
Now, the tricky part is to send my Bitcoins to my Trezor wallet.
Any feedback on the subject?
Regards

Can't you just get an address from your trezor wallet to send to?

Find (one of) your Trezor address(es). Open this menu on your computer:

You can read the details here: https://doc.satoshilabs.com/trezor-user/receivingpayments.html

Open CoPay wallet, press "Scan" at the bottom. Scan the QR code shown on your computer.

Choose "Send payment to this address"

It should be easy from now on.


text:
Creating a multisigaddress using public key from 2 different wallets or using public key from 1 wallet only? Which one is correct?
Given 2 scenarios,

I used the command [addmultisigaddress] to create a multisigaddress using public keys from walletA only. When I run this command [listaddressgroupings], I'm able to see that this address is one of the account in walletA. Running the [validateaddress] command will show that this multisigaddress belongs to walletA.
I used the command [addmultisigaddress] to create a multisigaddress using public keys from walletA and walletB. Let's say 2 public keys from walletA and 1 public key from walletB. When I run this command [listaddressgroupings] for both walletA or walletB, this address is not listed in either of the wallets. Running the [validateaddress] command for both walletA or walletB show that this multisigaddress doesn't belong to either one of them.

Can you show a set of example inputs and outputs?

This is (unfortunately) the correct behavior in Bitcoin Core. This is due to how the wallet is structured and what it determines to be part of the wallet.
In order to be able to have the multisig address be "part" of your wallet, you need to import it using importmulti or importaddres. That way it will be added as a watch only address so the wallet will track transactions to and from it.

I see. For the first scenario, the multisig address is part of my wallet and I can use sendfrom.
So which is the correct way to create a multisig address?


text:
Transaction with duplicate address in the output
I came across this transaction and noticed that there's duplicate address for the output part.
https://live.blockcypher.com/ltc/tx/ada86c7d6f46f712bfa04982f17ce9cd9d4c2560e3493de9c22f8b135ece6cb9/
When I tested the rpc command "createrawtransaction" to create a transaction that would send to duplicate address in the output, it gave me the error
error code: -8
error message:
Invalid parameter, duplicated address:
Which command to use if I want to send to duplicate address in the output?

There is no command that allows you to do that. While there is no network relay or consensus rule that prevents this, the wallet side has its own rules and will prevent you from doing this as it is largely pointless. If you really want to send to the same address multiple times, you will need to create the transaction bytes manually without the use of any of the RPC commands.


text:
Electrum receive tab
I have requested some bitcoin from my friend and gave him the adress that is displayed in the "receive" tab in the electrum client.
After he sent them, I made a request for that amount in electrum and it is apparently "paid", as you may see below.
However, it does not show up in my history as an incoming payment. How do i get it to show up there?

Always when in doubt, check online block explorers (at least two as all of them are buggy to some extend and might freeze for some hours/days):
blockchain.info
insight.bitpay.com
blocktrail.com/BTC
etc.
...is your transaction there (you can search for your receiving address)? Is it confirmed? When it is not there at all you know it is not problem with your local wallet. If the tx is there you have probably problem with synchronization of your wallet - you can try to select different server to connect to (in Electrum's settings). You can also try running Electrum with different directory ('-D' command line parameter) to force it to download its metadata again and recreate your wallet from seed. You can also try to install Electrum on different machine & restore your wallet there. Maybe check your firewall, too.

What color circle icon do you see in the bottom right of the electrum window? If it's not green or blue try switching servers.
Also what version of electrum are you using? Old versions had problems syncing so I suggest using the latest version.


text:
What is the marginal energy cost of a bitcoin transaction?
According to this web page: https://arstechnica.com/tech-policy/2017/12/bitcoins-insane-energy-consumption-explained/
...one bitcoin transaction consumes about 250 kWh of energy.
Is this the marginal energy cost of each additional transaction, or the average electricity cost of continuous mining (that would happen no matter whether there are transactions or not) divided by the relatively low transaction count?
What is the marginal energy cost of one additional bitcoin transaction? I.e. if the number of transactions would increase by one, by how much would the energy consumption of the bitcoin network increase?
Would the energy consumption of the bitcoin network double if the number of transactions doubled?
If each bitcoin transaction consumes 250 kWh, that would seem absurdly high. I do several hundred ordinary bank or card transactions per year, making the energy use about 75 000 kWh per year if I used bitcoin, which is 25 times higher than my current direct electricity use and probably still 10 times higher than my current direct and indirect electricity use combined.
Related: https://skeptics.stackexchange.com/questions/39910/does-one-transaction-on-bitcoin-require-215-kwh (I initially considered asking this on Skeptics, but they seem to have a habit of closing perfectly valid questions).

Related: https://bitcoin.stackexchange.com/questions/61883/what-is-the-average-amount-of-electrical-power-required-to-complete-one-bitcoin?rq=1

Yes, this number is the total energy consumption of mining, divided by the number of transactions confirmed.  The total energy consumption has basically nothing to do with the actual number of transactions, at least not directly.
There's an indirect relationship: since the total number of transactions (or rather, total size in bytes) that can be confirmed per block is limited by the protocol, then if there are more transactions, you would expect transaction fees to increase.  This in turn would increase the revenue of mining, and hence you would expect more miners to enter the network to compete for this revenue, increasing total energy consumption.  But since transaction fees are a relatively small fraction of total revenue (it's dominated by block reward), this relationship will be far from linear.
It's hard to say what the actual marginal energy cost of one transaction is.  One way to look at it is that, roughly speaking, every full node on the network will check the transaction for validity.  Looking at the logs from my own server as it synchronizes with the network, in one second it's able to validate blocks containing about 5000 transactions.  At full CPU, this machine draws about 15 watts, so that's about 3 mJ per transaction.  (Of course, much of this is overhead, since the machine is powered on regardless and used for other things.)  Now https://coin.dance/nodes estimates around 10000 full nodes currently on the network, so if we extrapolate from my machine, we have 30 J per transaction, or 8.3e-6 kWH.  If you make 1000 transactions, that's 30 kJ or 8.3e-3 kWH.
If you want to exclude overhead, you could suppose that if not for verifying transactions, my server would have been idling its CPU during that time, in which state it draws about 10 watts.  So the marginal CPU usage is about 5 watts, or about 1/3 of the values above.  This logic takes you to 10 kJ per transaction.  On the other hand, my computer is pretty low-power compared to most (it uses a mobile CPU), so you may instead want to increase those values.  But this should be on the right order of magnitude.


text:
How are block interval, block size and effective throughput related?
I have two questions:

Why does the effective throughput (as defined below) decreases when the block interval is decreased?
How does a reduction in the block size results in maintaining a high effective throughput?

The origin of these questions is as follows.
First, this paper about Scaling Decentralized Blockchains says:

To improve the system’s latency, we can in principle simply
  reduce the block interval. To do so while retaining high effective throughput,
  however, would also require a reduction in the block size.

which implies that the effective throughput decreases when the block interval is decreased. This results in my first question.
Second, they define effective throughput as follows:
X% effective throughput := (block size)/(X% block propagation delay)

This formula indicates a decrease in effective throughput when the block size is decreased, while their goal is the opposite, i.e. maintaining a high effective throughput (by decreasing the block size). This is what my second question is about.

First off, it is worth noting: this paper is not only talking about throughput in the 'transactions/second' sense, it is also addressing the effects of block size and interval on the network's latency (which is an important factor in scaling blockchain networks). The authors define 'effective throughput' as:

Our  results  hinge  on  the  key  metric  of effective  throughput in  the  overlay network,  which  we  define  here  as  which  blocks  propagate  within  an  average block interval period the percentage of nodes to.

I find this confusingly written, but understand it to mean "within the period of time defined by the average block interval, what percentage of the network's nodes will have received and validated the most recent block".
As a simple example of why this metric is important: if only 50% of nodes can download and validate blockheight X before blockheight X+1 is mined, then the other 50% of nodes will be continuously playing catch-up, and will not be able to meaningfully contribute to the network. This hurts network decentralization, as less users will be able to directly participate in the network.

Why does the effective throughput (as defined below) decreases when the block interval is decreased?

To understand this, consider an extreme example: a blockchain with 1GB blocks every 10 minutes. In order for nodes on the network to stay in sync with the chain, they will need to download and verify the validity of 1GB worth of blockdata every 10 mins. Any nodes which cannot do this, will decrease the 'effective throughput' of the network.
So now, consider what happens if you decrease the block interval to 1 min. Suddenly, a lot of nodes that could download and process that data within 10 mins will no longer be able to keep up with the rest of the network, since they now only have 1 min to do the same. Thus, our 'effective throughput' has decreased, since a much smaller percent of nodes will be able to engage and contribute to the network.

How does a reduction in the block size results in maintaining a high effective throughput?

I think your confusion here comes from thinking about throughput in terms of 'transactions/second'. Decreasing the blocksize would result in less transactions/second, but it would also mean a node would have to download and validate less data per block interval. In relation to the author's definition of 'effective throughput', we see that lowering the resource requirements for a node will allow more nodes to join the network.

Second, they define effective throughput as follows:
X% effective throughput := (block size)/(X% block propagation delay)
This formula indicates a decrease in effective throughput when the block size is decreased, while their goal is the opposite, i.e. maintaining a high effective throughput (by decreasing the block size).

Decreasing the block size variable would also affect the X% block propagation delay variable. So if a lower block size results in a higher throughput, we would expect that the X% block propagation delay would see a larger relative decrease than the decrease in block size.

Let's think of blocks as a basket. Each transaction is an apple weighing 0.1 kg. You are the network. Currently, let's say we have a basket large enough to carry 1000 apples (10kg). As the network, it takes you around 100 seconds to carry this from point A to B.
Our throughput is 10kg/100seconds = 0.1 kg per second.
Now, we want to increase this.
Our options are to either reduce the amount of time it takes to carry the basket, or increase the size of the basket.
Let's increase the size of the basket first. Now, we can fit 2000 apples (20 kg). However, because it is now heavier, it takes us longer than 100 seconds to carry it from point A to B. With a linear scale, we would expect it to now take twice as long, or 200 seconds. Thus, this doesn't actually increase throughput, since 20kg/200seconds = 0.1 kg per second
What if we try to change the time instead?
As we saw, the time increases when capacity (weight) increases. Thus it should decrease when capacity decreases, but that would essentially have the same effect as we saw with the capacity increase.
However, what if we simply reduced the distance from point A to B? If it's only half the distance, we can carry the same capacity in half the time. Thus, 10kg/50seconds = 0.2 kg per second. We doubled our throughput! Unfortunately, this comes at the cost that our network's reach has been halved.
In the case of Bitcoin and other cryptocurrencies, the same problem can be restated. The distance A to B is the peer-to-peer network. The capacity (or size) of the basket is the blocksize, and apples are transaction.
A good network is one where we have an optimal block size for containing as many transaction as possible, while still being able to broadcast that block efficiently to the rest of the network. Since mining depends on the miners being able to build on top of the latest block, it is very important that participants are notified of the latest block as soon as possible.
If we have 100 MB blocks, it would take a very long time to broadcast this to enough of the network. This would mean that we have to increase the blocktime sufficiently, so that mining can still take place fairly.
Similarly, going in reverse, if we were to reduce the block time, we would also need to reduce the block size so that blocks are still broadcasted quickly enough to work with the faster block time.
Bitcoin is not the best example of this, due to a relatively low block size with a relatively high block time. It would be feasible to increase the block limit without requiring adjustment on the other factors (indeed, this is essentially what segwit did in a slightly roundabout manner).
A better example may be Ethereum. There is no fixed block size in ethereum. Instead, miners vote on a parameter known as max gas, which is essentially a measure of the computation needed to verify a block. A higher max gas implies more transactions, and thus a larger block size.
This factor is constantly adjusted by ethereum miners based on how efficiently blocks are being propagated at the current size. If the network is too large for the current size, we would expect to see a lot of orphan blocks (or uncles, as ethereum calls them) since some miners on the network will still mine on an older block after a new one has already been found. If this is the case, we will see max gas reduce, and thus reduce the block size. If the opposite is true (where very few uncles are found), max gas may increase.
Eventually, the network will find an equilibrium between an acceptable orphan rate, and an optimal block size that allows to the maximum number of transactions in a block while still permitting propagation to take place efficiently.
You can see a chart of how this limit has changed over time over at etherscan.io's gaslimit chart. Essentially, as the network has developed better technologies to relay blocks quickly, we have seen the block size increase. However, it's not a very large increase, indicating that it is still bottlenecked by the network layer and block verification time.


text:
What could this Python Assertion error mean?
When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means.

The code:

Btw the address had only around 5000 satoshi left....
Link to api documentation
https://www.blockcypher.com/dev/bitcoin/#creating-transactions
Thanks

I'm voting to close this question as off-topic because it is about general programming, not bitcoin

This error means the checksum in your private key is incorrect.

This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid.  However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug.
(By the way, please don't reveal the private keys to real addresses!  It looks like all the coins were moved out of that address (1LLZQ...) a couple hours ago, hopefully by you, but any further coins sent to that address are likely to be stolen immediately.)


text:
how to achieve transaction info of all the blocks
I use https://chain.api.btc.com/v3/block/date/20151215 to achieve list of blocks and also use https://chain.api.btc.com/v3/tx/0eab89a271380b09987bcee5258fca91f28df4dadcedf892658b9bc261050d96?verbose=3 to get transaction info for a single transaction. Now I have a question. To access transaction info of all blocks what should I do?
when I copy the hash of any block from the list of the first link in the second link, it shows error.

That's because you're pasting a block hash into a field that expects a transaction hash.
It looks like btc.com doesn't support listing all transactions for a given block, it will only give a tx count: https://btc.com/api-doc#Block.
Blockchain.info does, however at the api endpoint:
https://blockchain.info/rawblock/$block_hash
So, you can copy the hash of any block from the list of the first link in your answer to the $block_hash field in https://blockchain.info/rawblock/$block_hash.


text:
Why are miners allowed to not announce their mined blocks to the network?
My question relates to a 51% Attack. As far as I understand, for this to work the miner must have a secret fork of the main blockchain, which he will later announce, whenever it becomes longer than the main blockchain, thus reverting a previous transaction and permitting double-spending.
So then, why not just force blocks into the main chain the moment they are mined? What is the rationale for these private forks?

How do you propose that works? No one else in the network knows that someone has mined a block until they broadcast it, so there is no way to force them to broadcast it

Couldn't we just force the broadcast once a block is mined?

@Erdös How would you force it exactly? What mechanism would you use to force me to advertise blocks that I mined?

"Why are miners allowed to not announce their mined blocks to the network?" you can not prohibit to mine blocks and not announce them. if you do some mining-calculations on your mining-hardware, you can do that offline. no one knows that until you publish your block(s).
"So then, why not just force blocks into the main chain the moment they are mined?" you can not know assuredly the timestamp when a block was mined because the miner can write an arbitrary timestamp in the block. furthermore all bitcoin-nodes/-miners should/will follow the longest block-chain by definition. the timestamps in the blocks does not really matter.
this "private mining" and resulting doublespend-attacks are absolutely possible. the bitcoin community trust that no one ever will have enough hashing-power to do this attack.


text:
double spending problem
Why is double spending a problem.
Suppose I have 1 bitcoin and I intend to send 1 btc to Alice and 1 btc to Bob.
Once I send 1 btc to Alice, UTXO of 1btc will be unlocked,transferred to Alice.No change is returned.Since Now when I try to send 1 btc to Bob, I have no UTXO to send it from. So the question of double spending is out of the question.
The double spending can be a problem when multiple transactions occur at the same time. If that is the case, why allow multiple transactions to occur at the same time?

Double spending commonly refers to the situation where you send 1 BTC to Alice but you privately create a fork and on that fork you send the 1 BTC to bob. If your privatefork mines enough blocks to surpass the main fork (i.e you have the majority of hashpower or you are really lucky) you publish it and all the nodes consider it valid since it is the longer chain. As a result Alice loses her 1 BTC.


text:
Is the Bitcoin whitepaper embedded in the Bitcoin blockchain?
The Bitcoin blockchain can store arbitrary data. Especially recently, with the ordinals inscriptions, I've seen claims that images up to 390 kB are stored on the chain. In light of this, I was wondering if the bitcoin whitepaper itself can be found somewhere on the chain?
Did Satoshi and his contemporary bitcoiners consider this – if not the full document, then at least it's hash, or a plain-text version of the document? Interestingly, the Bitcoin wiki entry from 2013 already recognizes the use case of putting messages on chain to prove document ownership:

Each bitcoin gives the holder the ability to embed a large number of short in-transaction messages in a globally distributed and timestamped permanent data store, namely the bitcoin blockchain. [..] This message embedding certainly has intrinsic value since it can be used to prove ownership of a document at a certain time, by including a one-way hash of that document in a transaction

The whitepaper was already embedded into the blockchain in mid-2013. Each node in the network has the capability to extract this whitepaper as a PDF document. Following post shows details how the document can be decoded from the blockchain: https://bitcoin.stackexchange.com/q/35959/87158

@deyw great, thanks! I was expecting something like this early. I'm not sure if my question is a complete duplicate of that one, it seems mostly it is, but maybe someone can add some info on who did it, and their stated motivations?

Since there's no substantially different new answers to this one, I'm accepting the duplicate suggestion.

This command line extracts the bitcoin.pdf from the blockchain:
bitcoin-cli getblock 00000000000000ecbbff6bafb7efa2f7df05b227d5c73dca8f2635af32a2e949 0 | tail -c+92167 | for ((o=0;o<946;++o)) ; do read -rN420 x ; echo -n ${x::130}${x:132:130}${x:264:130} ; done | xxd -r -p | tail -c+9 | head -c184292 > bitcoin.pdf


text:
How do I verify an address with GPG and Sign a bitcoin txid with a sending key as proof I sent bitcoin?
I was looking at donating Bitcoin to the Free Software Foundation and took a look at their PGP signed message here.
However, I have three questions regarding the signed message.
1.) While I was reading the message I saw the text below saying to "verify each address, line and signature." How would one go about verifying these?
The following lines containing each address, owner and date are signed
by their respective private keys, suggesting that they are valid,
controlled by the FSF and this GPG message signer attests that they
are to be used for donations. Please use each client software to
verify each address, line and signature.

1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN donate@fsf.org 20130802
pG+OoJaENOBvY2rPqB8s8Vssmb+/aw7SgE/2TLtZVmtVO8be5eYBXt4CTqbQo0YzcN97eGz8Fv8GpaqhdV2NgrfI=

2.) If I were to send some bitcoins to the Free Software Foundation and would like for them to know they came from me, I would have to provide some sort of proof. The following excerpt from the message says how to do this; however, I still do not quite understand how to execute this:
Request Receipt of Donation
===========================

If you would like for us to know who the contribution came from, and
to be able to acknowledge receipt of your donation, then please email
<donate@fsf.org> with your name, mailing address, and contribution
info including your txid. Signing your txid with one of the sending
keys as visible in the block explorer is optional but it can serve as
proof that your contribution really came from you.

We are a 501(c)(3) charity.

I know that the txid is a unique id of the transaction and hash, but how what would a "sending key" be? How would I then proceed to sign the txid with the sending key?
3.) I used Gpg4win to verify the whole message by importing John Sullivan's GPG public key from here and clicking the "Verify" button. But how does this work and what purpose does the PGP signature at the bottom of the message serve?

1.) While I was reading the message I saw the text below saying to "verify each address, line and signature." How would one go about verifying these?

Your Bitcoin wallet software should have an option to verify a message. For example, in Bitcoin Core, you go to File > Verify Message and a dialog appears where you can enter the address, message and signature. In whatever verify message window, enter the address, message (the line containing the address, email, and date), and signature (the line after the address). Then click "Verify". The software will then check whether the signature verifies.
If the signature does verify, this means that the owner of the private key for that address actually made the statement that is the message AND that the message was not tampered with in any way.

2.) If I were to send some bitcoins to the Free Software Foundation and would like for them to know they came from me, I would have to provide some sort of proof. The following excerpt from the message says how to do this; however, I still do not quite understand how to execute this:

When you send Bitcoin to someone, your transaction will "send from" some addresses (it doesn't actually send from any addresses, that's now how Bitcoin work). If you look at the transaction details in a block explorer, you will see something labeled as the inputs and a list of addresses. Those addresses are what are referred to on the website as "sending keys". Those addresses should all be from your wallet.
So what you should do is get the transaction ID of the transaction, find an address that is listed as one of the inputs of the transaction, and then use your wallet software to sign a message (the txid) with that address. You then email that message, the address you signed it with, and the signature, to the FSF. Your signed message can be more than just the txid, it can have any text that you want so you can include things like your name, mailing address, and contribution info.

3.) I used Gpg4win to verify the whole message by importing John Sullivan's GPG public key from here and clicking the "Verify" button. But how does this work and what purpose does the PGP signature at the bottom of the message serve?

The PGP signature does two things: it proves that the owner ofthe PGP key (John Sullivan) actually made that statement (or at least knows of its existence) and it verifies that the statement itself was not tampered with.
This verification, combined with verifying the address and it's signature earlier, prove that John Sullivan has control over those addresses (because he provided a signature with those addresses and he signed both the addresses and their signatures with his own PGP key). Thus if you send Bitcoin to that address, John will receive the Bitcoin.

For more and better info on what a signature means, I suggest you read the wikipedia page on Digital Signatures.


text:
CHECKSEQUENCEVERIFY After x time of last transaction
Is there a way where i can have a multi-sig address which will allow one of the signers to use only their single key after a set amount of time after each transaction/update on the address?
I want to have an address that requires 2 people to sign for outgoing transactions. But if after 30 days nothing has been done with the address at all a single signer can sign a transaction. But if there is ever anything such as an incoming or outgoing transaction the 30 days is reset.

Whereas it seems, that this is not directly possible, cause bitcoin script does not allow to reference a transaction "within last 30 days", one could think about a "workaround" with a business logic watching the P2SH address. An approach could be the nested "if", which is allowed in bitcoin script. If ever within last 30 days there was a payment, the 30 days need to get "reset" - maybe you would need to play with two P2SH addresses, and shift the funds to a second addresses (and vice versa). If your business logic discovers a transaction in the last 30 days, the funds are transferred to a second address, and then again to the first address. For this second address you'd have the same set of rules, just the tx output script (for it's address) changes. The business logic could have a "known secret", that noone else knows, and then shift the funds between the addresses, just as an idea, like this:
IF
  OP_HASH160  <length 0x14> <SECRET> OP_EQUAL
  <business pubkey> CHECKSIG
ELSE
  IF
    2 <Alice's pubkey> <Bob's pubkey> <Escrow's pubkey> 3 CHECKMULTISIG
  ELSE
    30d CHECKSEQUENCEVERIFY DROP
    <Alice's pubkey> CHECKSIG
  ENDIF
ENDIF

Obviously it becomes clear, that there are fees involved in such a scenario. It depends on the frequency of transactions within last 30 days, and the value of the funds, that are shifted around. The fees should not eat up your funds... And then again, maybe one might look into using Lightning as "transport mechanism" to shift values around?

One workaround if the multi-sig address is not in cold storage and your usecase allows for it, would be to spend all the coins in the multi-sig address every time you make a new deposit to this address, thereby resetting the timer by "overwriting" it.
So if you have X coins in the multi-sig and want to deposit Y new coins, you make a transaction that also spends those X coins (requiring both signers to sign it) and make a new output of X+Y coins.
The output-script would then always be of the form:
IF
    2
ELSE
    30d CHECKSEQUENCEVERIFY DROP
    1
ENDIF
<Alice's pubkey> <Bob's pubkey> 2 CHECKMULTISIG

This would result in always exactly one unspent output in the multi-sig address with the current timer running.

...to use only their single key after a set amount of time after each transaction/update on the address?

This is not possible as there is no provision in bitcoin script to query past transactions within another transaction, so you cannot check the time of the last transaction to that address.


text:
Custom bitcoin confirmation process
I am implementing a payment module for bitcoins.
I have the following case. I need customers to be able to pay in bitcoins. But for some reasons I cannot use existing solutions like Bitpay.
Therefore I have thought and ended up with the following solution.

We have a private key wallet of HD type, so we can generate child addresses from our master key.
When a user tries to pay in Bitcoins we are generating a new address and display it to the user.
We associate an address with an order id
A daemon running in background is checking pending orders requesting information from Blockchain for a concrete address and checking whether this address received amount equal to an order total sum.
In case there are more than X confirmations we are setting a status of an order to PAID

I wonder whether this is acceptable solutions or maybe there are some better ways to implement custom bitcoin payments ?
I would be great for any suggestions and help.
Thanks

There are existing solutions that handle payment processing for you. You can use BTCPayServer which has an API that is similar to BitPay's API.

Thank you so much for the answer could you provide any other solutions ?


text:
Currency exchange process
I'm trying to understand all the logical steps that occur when a buy or sell order is submitted to an exchange such as Coinbase.
From what I understand currently, this is the general process. Am I on the right track here?

Where I think I'm wrong is step 3 and 7. I'm not sure if the tokens actually go to Coinbase for holding while the sale is "pending" or not.

The exchange needs to have custody of the assets (tokens for a sell, money for a buy) before an order can be placed.  That's the only way they can guarantee that the order will execute as soon as it is matched, and that both parties will receive their assets, without the ability to back out.
So the correct order of your steps is:

3, 4, 1, 2, 5, 9, 6, 7, 8, 10.

Of course, variations are possible: 9 could happen earlier, for instance.  The buy order could be placed before the sell.  Or the buyer could wait to withdraw the token they bought.
This doesn't account for the possibility of things like margin orders, where the exchange might allow someone to buy using money that's borrowed instead of deposited.


text:
Bitcoin to Bank
I have a bill due tomorrow and need money in my account immediately. I usually sell crypto and wait days for the money to show up in my account but I was wondering if anyone knew of a way to do same day transfers?

It depends on the exchange that you are using. They may have an option for some very fast bank transfers but usually at a high fee. Unfortunately most exchanges don't offer such an option and the fastest ones take at least 1 business day.
However the fastest way may be to sell Bitcoin directly to another person in cash and then deposit the cash into your bank account. You can check https://localbitcoins.com/ to see if there is anyone near your location who you can sell Bitcoin to for cash in person.


text:
How accounts, wallets and addresses are related
I have downloaded litecoin code (version of 14 september,2014) and built it. so right now I have a wallet. i have account which's name is just "". then i connected my miner to my node. It solved the block and now I have a balance. ./litecoin-cli getbalance "" returns 150LTC , but as I can see, there're 3 addresses which belong to this account (""); why all of these 3 addresses have balance 0.000? how is it possible that account has a balance and not the addresses? Even if i type ./litecoin-cli getinfo it tells me that my balance is 0.0000 , but if i type ./litecoin-cli getbalance "" why does it return 150?

When you mine a block and get the block reward (50 LTC in your case), the coins are not spendable immediately. There is a maturity period of 100 blocks before you can spend them. I believe this is why they don't show up.

I'll explain the situation. I had built litecoin source code then run the daemon. Miner was solving the blocks, but balance was actually always 0.000 when writing ./litecoin-cli getinfo , but always 1600 as I have 32 blocks and each reward is 50 - when writing ./litecoin-cli getbalance "".  That was it before I decided to trust you. so By trusting you, I changed Maturity from 100 to 2. And run the daemon again. when that happened, i write ./litecoin-cli getinfo and it showed the balance like 800, and didn't show the whole balance(1600) at all. Why do you think this could happen? Thanks

@GiorgiLagidze I can't think of anything else that might affect it.


text:
Difference between wallet,accounts and addresses
I know this question has been asked several times, But it never made any sense reading each of them. Can Anyone really explain deeply by using technical language so that I could really understand pros and cons and everything ? Thank you.

Wallets
A wallet is an application that manages your keys and can create transactions. There are many open source and closed source wallet applications for different platforms (Desktop, Mobile, custom Hardware Wallets). Bitcoin-core has an implementation that runs on a full node. See Bitcoin Wiki - Wallet.
Accounts
An account can have different meanings depending on the wallet application you are using, but in bitcoin core it is a way to give a readable name to an address and keep track of your balance. In bitcoin core, an account can include multiple receiving addresses. See Bitcoin Wiki - Accounts explained. Note: See @Pieter Wuille's comment below that this will be deprecated from bitcoin-core.
Addresses
An address can be a form of your public key (or a script), to which people can send bitcoin, and which can only be spent by the corresponding private key (or by satisfying the script). There are many forms your address can take, because it can be derived from any valid script. A simple P2PKH (Pay to public key hash) address is the RIPEMD160(SHA256(public key)) encoded using Base58 checksum. A P2SH is a hash of a script. Basically, in order to spend coins sent to any address, one must satisfy the script that address represents, which usually includes providing the script (P2SH) that the address was hashed from, and any required signatures. See Bitcoin Wiki - Address

RIPEMD160, not 140.

Thanks JBaczuk, But here is the thing I'm really interested in. So wallet can have many accounts and those many accounts (each of them) can have many addresses? So Is it 100% right that wallet also saves private/public key for each address? Why was account even invented? so that to unite some addresses into one name and some others into another name? How can an account balance be negative? I'd really appreciate it if you could just answer all these questions. Thank you again.

@Giorgi Read the "How accounts work" link if you're really interested, but accounts are almost certainly not what you assume they are. They're deprecated and are expected to be removed from Core in an upcoming version even due to confusion and other reasons.

Depends on what "account" means for that wallet application. Also, there are watch-only addresses that your wallet can keep track of (balance, txs, etc.) but that it does not have the private key for. Also see https://stackoverflow.com/questions/22237621/bitcoind-account-negative-balance. Maybe you should open separate questions.

Also, a wallet does not necessarily store private and public key for every address. For example hardware wallets or watch-only wallets don't.

@JBaczuk - Bitcoin accounts are not centrally controlled, and thus don't require the exposure of one's identity. Such accounts can provide a degree of privacy.
BIP 39 accounts can be given names by users. BIP 39 accounts provides a means for wallet apps to supply substantial assurances that account sets of billions private keys and associated addresses will have no overlap. Deterministic mathematical virtual address spaces are used to firewall balancing between accounts; unless, explicit transaction confirmations occur, i.e. when funds are explicitly sent form one account to another.

@skaht are you referring to BIP32?

@JBaczuk - Brain fart!  Really meant BIP 32/44/49 accounts.


text:
What are the ways to secure bitcoin daemon on linux?
I just integreated mining pool on my server. which means miners connect to my pool and get paid. before they get paid, it goes to my address and that address is located in bitcoin daemon. What are the ways to secure coin daemon? so that no one can access it ever? if accessed , they can steal money.

Ideally, you should not be storing the wallet receiving the mining payouts on the same server that hosts your pool software.
In general, when dealing with security, you want to minimize the attack surface. Any additional software you run increases the attack surface, since any vulnerabilities in non-daemon software might allow someone to exfiltrate the wallet or to pass commands to the wallet.
Once you have the wallet on a separate, isolated server, you should follow common best practices such as not having a public RPC interface, IP whitelisting for incoming connections, change all default passwords, disable password and root ssh login, have a strong password on the wallet itself.


text:
Is there any way to access my btc without my bitcoin core wallet?
I recently bought some bitcoins and got them transferred to my bitcoin core wallet. My fault is that I did not do any research on bitcoin core and found out that it synchronizes with the bitcoin network first before you can actually use your wallet. The synchronization is taking a lot of time. Is there any other way I can access my coins? Thanks!

To do this, you'd have to parse the .bitcoin/wallet.dat file (possibly using a script like this python script) to recover the private keys, convert them to a WIF (Wallet Import Format) and find another application that will let you import private keys. You might be better off just waiting for it to sync.


text:
api doc for bitcoin gold on testnet
I'm looking for an api doc for bitcoin gold on testnet to create, receive and list transactions and accounts. so far I've found this https://bitcoingold.org/testnet-v3/. I'd be thankful if someone shed some light

The rpc should be identical to the regular Bitcoind, so any library or tools that interface with that should work

The project Wiki on GitHub probably has the info you're looking for:
Technical Spec: https://github.com/BTCGPU/BTCGPU/wiki/Technical-Spec
Testnet v3: https://github.com/BTCGPU/BTCGPU/wiki/Testnet-v3


text:
Extracting Bitcoin historical ticker data by setting up Bitcoin Node?
How do I extract the ticker data (historical values such as day price, day open, day close etc) by setting up a Bitcoin Node?
Bitcoin Node is setup using Bitcore.io
All blocks are syncing right now, but I don't really know how to get data?
Stack I use is Node.js with MongoDB
Thanks in advance!

The Bitcoin Node is part of the blockchain network. It has nothing to do with markets and trading, and has no concept of a price. As far as the node is concerned, 1 Bitcoin = 1 Bitcoin, and that's it.
If you want historical market prices, you will have to either scrape them from various exchanges yourself, or use a service such as this (I have no affiliation with them, and just found them through Google - I cannot vouch for their data, and better options may exist).

Can you help with some exchanges that provide historical prices since the initial times of bitcoin?
Most of the services, like CoinMarketCap (https://pro.coinmarketcap.com/api/v1#operation/getV1CryptocurrencyListingsHistorical) are paid or provide history for a period of max 1 year!
Thanks! You really clarified most of the doubts!

@Harish : Service or product recommendations don't fit well with the design and purpose of this Q&A website and so are off-topic.

@HarishGupta I've never gone looking for historical data, so I can't make any recommendations, but it is my understanding that you either scrape it yourself, or pay for high quality data. No one really offers good datasets that large for free.

@RedGrittyBrick No problem! I understand!

@RaghavSood Ok! Any method to scrape it?


text:
Explain blockexplorer UTXO
Bitcoin testnet
I used the following code to obtain info about unspent outputs:
const blockchainInfo = require('blockchain.info')

const blockexplorer = blockchainInfo.blockexplorer.usingNetwork(3)
blockexplorer.getUnspentOutputs(address).then((resp) => {
  console.log(resp.unspent_outputs);
})

Response:
   [ { tx_hash: '9c5a...f31b',
       tx_hash_big_endian: '1bf3....5a9c',
       tx_index: 249487365,
       tx_output_n: 0,
       script: '76a9...88ac',
       value: 200000000,
       value_hex: '0bebc200',
       confirmations: 2262 },
     { tx_hash: '708e...ec103',
       tx_hash_big_endian: '03c1...8e70',
       tx_index: 250637325,
       tx_output_n: 0,
       script: '76a9...88ac',
       value: 20000,
       value_hex: '4e20',
       confirmations: 1845 },
     { tx_hash: '803a...901d',
       tx_hash_big_endian: '1d90...3a80',
       tx_index: 256201920,
       tx_output_n: 0,
       script: '76a9...88ac',
       value: 20000,
       value_hex: '4e20',
       confirmations: 262 },
     { tx_hash: '255d...cfde',
       tx_hash_big_endian: 'decf...5d25',
       tx_index: 256264533,
       tx_output_n: 0,
       script: '76a9....88ac',
       value: 20000,
       value_hex: '4e20',
       confirmations: 252 } ]

And I got some questions.

Why do we have both tx_hash and tx_hash_big_endian? Because some wallets prefer big-endian and others little-endian hash?
What is the tx_index? Index of a transaction in entire blockchain?
What is the tx_output_n?
What is the script?

tx_hash and tx_hash_big_endian are the little endian and big endian representations of the transactions hash. Bitcoin uses little endian hashes internally, but explorers normally show such information in big endian, you can read more about such topic here.
Regarding tx_index, that field is an internal id for blockchain.info database. It has nothing to do with the Bitcoin blockchain.
tx_output_n is the index of the output in the transaction. utxos are identified by tx_id and tx_index.
Finally, the script is the scriptPubKey or outputScript defined in the utxo. Basically it sets the conditions to be met in order to claim such an output in a new transaction.

I have a question about script. What is the list of conditions to claim the output in a transaction?

It depends. Usually it is a digital signature performed with a specific private key. However, it can be set to several other things, like multisigs or even custom scripts.


text:
ripple transaction max amount
If I send a query
{"method":"sign","params":[{"secret":"shU9DWXZ1bhtaZRipiCedMUn1B2Gg","tx_json":{"Amount":9000000000,"Account":"rPa8RMPnEJxW4dpkJhnqj7GQYUB9PQ5gEW","Destination":"rH7k1edohG2XCBuTiB8RrMaKRgi2wNkXYg","DestinationTag":100008276,"TransactionType":"Payment"}}]}

The testnet Ripple server (https://s.altnet.rippletest.net:51234) give me
Unable to parse request: * Line 1, Column 90 '9000000000' exceeds the allowable range.

How can I send more than 9000 XRP at one transaction?

For some reason questions about Ripple are being voted down. The welcome text states clearly that this Stack Exchange Site is also for Ripple
"Bitcoin and Cryptocurrencies is a question and answer site for cryptocurrency enthusiasts. It's built and run by you as part of the Stack Exchange network of Q&A sites. With your help, we're working together to build a library of detailed answers to every question about Cryptocurrencies such as Bitcoin, Namecoin, Litecoin, Ripple, ZCash, Dogecoin, and NXT.
Please note that Ethereum and Monero have launched their own Stack Exchange sites."

I don't know if this issue still a problem? But Sending the amount property as a string worked for me.

In the question the amount was passed without quotation marks, which may be interpreted as a number instead of a string. This answer should probably be a little more elaborate, but I think it's actually an attempt to answer.

9000000000 is not a legal amount. Getting your amounts correct is extremely important and you definitely don't want to even think about using JSON integers because their representation range is unspecified.
As the documentation for specifying currency amounts says, amounts of XRP are represented as strings, not integers. The number of integer drops is specified as a string, with each drop being one millionth of an XRP. So you probably wanted "9000000000" to specify 9,000,000,000 drops or 9,000 XRP.


text:
How can I use messengers for crypto transactions?
Is it possible to use Signal or Telegram for crypto transactions?
I heard CryptoCat messenger is for such needs, but interested in using those two mentioned above.

You can communicate transaction details to your counterparty using the app, but afaik neither of the messenger apps you mentioned have a cryptocurrency transfer system built into them.
So you'll need a wallet app, but otherwise you can communicate with your counterparty through the messenger app (agree on the amount to be transacted, send a payment address, etc)

For Telegram, there are bots that help do transactions and other crypto-related actions: https://news.bitcoin.com/six-of-the-best-telegram-cryptocurrency-bots/
However, I'd be cautious with these since not all bots are made by good people and I'd check up on them before trusting a bot with any transactional info.
For Signal, there are no options for now but the app's founder is very enthusiastic about crypto: https://bitcoinist.com/the-signal-founder-has-a-plan-to-fix-cryptocurrency/
https://techcrunch.com/2018/04/24/mobilecoin-moxie-marlinspike-binance-labs/
With enough time, they'll likely either to their own venture into the industry or add crypto transaction support in the app.


text:
Is freebitco.in legit site?
Is freebitco.in a legit site? This is faucet.  What is the use of faucets in bitcoin. Is it also a mining business?Please tell me more about faucets.

concerning the mentioned website i advise you to read this extended discussion about : https://bitcointalk.org/index.php?topic=341659.0
concerning the faucets systems

Bitcoin faucets are a reward system, in the form of a website or app,
  that dispenses rewards in the form of a satoshi, which is a hundredth
  of a millionth BTC, for visitors to claim in exchange for completing a
  captcha or task as described by the website.

purpose :

To introduce users to bitcoin
To get traffic
To make money

Besides, in the testnet the faucets are worthless bitcoins distributed for test purposes.

This answer could be improved by summarizing the takeaway from the linked thread.

Faucets are services which give away free Bitcoin. However the amount of Bitcoin given away by faucets is so small such that the amounts are basically negligible and worthless.
Faucets are not miners nor are they related to miners(although miners could run faucets if they so choose). Rather they serve as websites where the faucet owners can place a large number of advertisements and still get people to visit their site and view those ads. In this way, the site owner can earn a significant amount of money from ad revenue while spending very little by giving away money via the faucet.


text:
Discrepancy between blockchain.info live unconfirmed transactions page and chart
I'm looking at the live unconfirmed transaction page at blockchain.info, https://blockchain.info/unconfirmed-transactions which currently as I write this is running at around 166,000 transactions.
When I look at the chart labeled Mempool Transaction chart https://blockchain.info/charts/mempool-count with a description of "The number of transactions waiting to be confirmed", I see nothing that goes over 50,000 and for the current time shows only 22,066 transactions.
Seems like they should be the same. One is current unconfirmed transactions and the other is the number of transactions waiting to be confirmed.  What am I missing?

You're not missing anything. If the two where sourced from the same full node, they should show the same data. It appears that there are two distinct sources used for the graphs.

By the way, the mempool chart indicates that the full node sourcing the chart was uncleanly shut down today, which is not reflected in the other unconfirmed transaction count. On a clean restart, the node should have simply reloaded the persisted mempool state, but instead the graph indicates that it took hours to build up transactions in the mempool. (Alternatively that full node predates Bitcoin Core 0.14.0 when the feature was introduced.)


text:
Limit of Proof of Work
I do not have a complete understanding of bitcoin, but I feel that the PoW concept will not do it in the long run, so I need you to explain to me if I'm wrong.

First of all, all this work force is crazy, one day it is possible that it is totally unprofitable for mining and the only able to lead is a very large society, so that decentralization Is broken (I feel we are close to this situation)
It is a significant waste of energy, can we sustain this in the long term.
Does anyone look for another way to create a block? I've heard about proof of stake, but I'm also not convinced (I think it's worse in terms of centralization)

Thank you


text:
How miners validate each transaction?
There is a locking to each transaction? and sender also attach his digital signature to that transaction?
When this transaction comes to miners then how they validate this transaction is valid.
What I understand is they check locking and digital signature. but locking contains receiver address. Then how digital signature of a sender will work with locking (which contains receiver address)?

How miners validate each transaction?

Miners do not validate transactions. The nodes validate transactions, see Node Operation under Bitcoin Mining. The miners get a block template from the node, which includes the block header that they will try to hash until the hash value is less than the target. See Bitcoin Hashing Algorithm.
Nodes will make sure that the transactions are valid by checking the following:

The outputs signatures satisfy the input locking script. (The spender has access to spend the funds).
The output values are less than the inputs.
The values and the format is valid.

There is a locking to each transaction? and sender also attach his
  digital signature to that transaction?

Yes, transaction outputs have a locking script that the next spender must be able to satisfy with a digital signature. See the verification section in Transaction.

What I understand is they check locking and digital signature. but
  locking contains receiver address. Then how digital signature of a
  sender will work with locking (which contains receiver address)?

"A Bitcoin address is only a hash, so the sender can't provide a full public key in scriptPubKey. When redeeming coins that have been sent to a Bitcoin address, the recipient provides both the signature and the public key. The script verifies that the provided public key does hash to the hash in scriptPubKey, and then it also checks the signature against the public key," see Transaction Verification.


text:
What they stored in cold wallet? All bitcoins anyone owned is already in blockchain
I just want to understand what actually they store in the cold wallet because all bitcoins anyone owned is already in the blockchain.
Do they store the private key of users in cold wallet?

Do they store the private key of users in cold wallet?

In short, yes. (Some) private keys are stored in cold wallets.
The record of all bitcoins (UTXOs) exist as a public database, which is stored in full nodes all around the world.
To spend a UTXO (ie, some amount of bitcoin), the user must be able to produce a valid signature, by using the appropriate private key for that bitcoin address/script.
Those private keys are stored in various ways. One such way is a 'cold wallet'. Generally, a cold wallet describes a way of storing a bitcoin private key, such that the device storing the private key has not, and will not, connect to the internet. Conversely, a wallet that exists on an online machine is usually referred to as a 'hot wallet'.
There are also different types of hot wallets, and cold wallets. But the online/offline distinction is the main distinguishing factor.

I think there's some confusion about what "in the blockchain" means.
The blockchain contains information about how many coins belong to which addresses.  But if you want to actually spend the coins from a particular address, you have to sign a transaction using the private key for that address.  So yes, what's stored in a wallet (hot or cold) are private keys.
If the private key is lost, the blockchain will continue to remember about the coins that belong to that address.  But nobody will ever be able to spend those coins anymore, so they're effectively lost.

Do they store the private key of users in cold wallet?

Usually, no.
As you mentioned, the actual bitcoin balances are evaluated from data stored on the blockchain.
A common system is a user wallet, hot wallet, and cold wallet system. For personal use, the user wallet is omitted.
Companies will store the keys to all the user wallets on a secure server. When someone deposits BTC to their user deposit address, it will be moved to a cold wallet address.
A hot wallet is used to process withdrawals, and usually contains a small % of the company's total BTC holdings. They keys to this wallet are also on some secure, but online server. In an ideal set up, user and hot wallet keys are stored inside an HSM device.
A cold wallet is simply a collection of addresses for which the private keys are not on an online or easily accessible device. This can be a paper wallet in a safe, a hardware wallet, or an air gapped machine. The general idea is to prevent key exfiltration or arbitrary signing of transactions.
A cold wallet will contain the majority of the funds. By doing so, a company can limit their loss to the contents of the hot wallet + user wallets in the event of their online systems being compromised. Compromising a cold wallet will usually require physical access to the keys in some form, along with some additional knowledge to decrypt then (a hardware wallet PIN, safe combination, full disk encryption password, etc.)


text:
When are Bitcoin transaction outputs generated more than two?
When are Bitcoin transaction outputs generated more than two?
In my understanding, if my wallet has only UTXOs that have more values than i wanted to spend(send), then two outputs are generated which one is for sending my BTC to someone and another is for change to my wallet back. But I saw several transactions in bitcoin explorer that has more than 3 outputs. What are they?

Bitcoin inputs and outputs are only limited by transaction size. There are  scenarios when you may see a few inputs with many outputs, such as an exchange performing many user withdrawals in a single transaction.
Conversely, you often see transactions with hundreds of inputs, and very few outputs. These are also usually exchanges, or people/companies with lots of receiving addresses, combining the utxos into a handful or large utxos (usually to a cold wallet).

I did't understand what you comment exactly, what does mean 'exchange performing many user withdrawals in a single transaction'? Is that withdrawals from child wallet or transferring to multiple wallets simultaneously?

It's usually an exchange sending withdrawals for multiple users to each of their addresses in a single transaction


text:
Looking for old bitcoin
I briefly ran a node on my Mac in mid to late 2012/early 2013, but didn't understand it at the time and let it go. Is it possible that I still have bitcoin on my computer from that installation, if so, where would I look?

Hello, welcome to bitcoin.SE! Did you mine or purchase bitcoin at that time? Simply running a node wouldn’t net you any coins.


text:
UTXO transaction consolidation?
As a relatively new user, I have only generated a handful of public addresses. Usually, to move to a newly discovered and preferred wallet.
I’ve only recently learned that a single seed phrase can generate multiple key pairs, And each private key can generate multiple public addresses.
Nonetheless, I’ve heard the old wisdom of generating a new address for each transaction, but have no idea how to sensibly put this into practice, or why.
As new users, should we be learning about utilizing many public addresses for our transactions, or is it just fine to use one?

You should avoid reusing addresses. Bitcoin works on a UTXO model where each payment is one UTXO. 100 payments to 100 different addresses produces 100 UTXOs, as does 100 payments to 1 address. There is no different in UTXO consolidation with reusing the same address.
Using different addresses provides more privacy, and potentially, more security. You should not be reusing addresses and instead generating a new one for each and every payment that you receive. Modern wallets will give you a new address when you click "receive" in whatever wallet (there's usually a receive button) so just use the addresses it gives you instead of reusing the same one.


text:
Digital hard cap boundaries
In terms of the bitcoin code, I believe I well understand the asymptotic 21 million hard cap on the upper limit of the protocol.
I have heard rumors that it is possible to transfer less than one Satoshi (1/100000000).
Is this true? If so, is there a hardcoded lower limit to the divisional capacities of units of bitcoin?
If no lower limit in the protocol, do we run into an issue of infinite supply on the lower side?
Example: if I have an ounce of gold and it gets so valuable that I need to cut it down to a single atom in order to pay for a sandwich, that is a physically hardcoded lower limit. If I cut that atom I no longer have gold.
Bitcoin does not have this physical boundary. If a single bitcoin were to become so valuable that I wanted to cut the smallest unit in half, might I risk increasing the supply infinitely?
Of course this may be a moot example already addressed in the code as it stands.
Anyone please clarify. Thank you in advance!

The premise of this question is false in the first place, dividing something into smaller parts dos not increase the supply of that thing!

Please see the answer from Anonymous, below which clarifies the question quite elegantly.

There is absolutely no ability in Bitcoin for higher resolution than 1 Satoshi, as all values are internally represented in this unit. You can do this on second layer systems like Lightning which can allow arbitrary small amounts of BTC to be interacted with using that network, but the precision within Bitcoin itself is unlikely to change, if for no other reason than it is technically challenging.

The main limit is not technical, but economical. Since transactions are paid for in satoshis per weight unit, it is completely uneconomical to transfer anything smaller than what is considered "dust", as you must pay more to spend those outputs than the outputs contain in satoshis. Thus, the smallest unit of transferable bitcoin is really the dust limit, not the individual satoshi. Even with a technological solution to transfer sub-satoshi amounts, you would be losing money by doing so.


text:
Why does bitcoin not have live support
I have at least to wallets never spent from that were recently restored 1 has 50 bitcoin the other I believe at least a thousand started in 2009 my question is who has access to remotely upgrade my wallets and then deny me access to the contents

No one has access to remotely update wallets or revoke your access. If you are using an actual, non-scam wallet, you will have your private keys locally on your machine. As long as you have those keys, no one can deny you access to your coins

Why does bitcoin not have live support

Because bitcoin is not a business or any sort of organisation. It is not controlled by anyone, it is controlled by you and thousands of people like you. Bitcoin is essentially no more than a definition and the people who run software that implement the definition. The person who wrote the original definition is no longer involved.
There are anciliary (some might say parasitic or predatory) businesses that offer bitcoin services. E.g. holding your wallet for you or providing for the exchange of currencies. But these businesses do not control Bitcoin. These businesses are not strictly a necessary part of Bitcoin.
There are mining consortia who exert considerable influence over the integrity and operation of the bitcoin blockchain, but you don't have any direct relationship with those people or businesses, they don't work for you or depend on you individually and have no need to communicate with you as a person, they could gain nothing by helping you.
In short - Bitcoin is a peer-to-peer system. There is no Bitcoin.
You might as well ask why the English language has no live support. Who would run it? Why would they run it? Why would you trust them?
If your wallet software was purchased - the business that sold you the wallet might offer you live support. Most wallet software is given away free with no support other than "community support" and the opportunity to report bugs to a system used by the developers (who are often just volunteers)

who has access to remotely upgrade my wallets

Since the wallets are just software running on your computer, anyone who has access to your computer can upgrade the software on it. They may need to obtain your computer account credentials or obtain administrator access - but this is easy if they have physical access to the computer.
If the computer is connected to a network and has remote-control software installed on it then these actions can be done remotely. If the computer's operating system or any installed applications have un-patched security flaws then these can often be exploited remotely to obtain control over the software.
In short, never keep significant amounts of money in a wallet in a computer that is connected to a network. Never give anyone else access to the computer containing your wallet. Never share your private keys, login credentials or any other sensitive information.

and then deny me access to the contents

You mention the wallets "were recently restored". Your choice of words suggests that you may have had help or someone else did this for you.
Such a person would have been able to "restore" the wallets in a way that denied you the ability to spend the contents. For example by setting up "watch-only" addresses and by copying the private keys or keeping them to themselves.

If I had 50 bitcoin ($320,644 at todays exchange rate) I would not trust anyone to help me with it. I would particularly not trust anyone I hadn't know personally for at least five years pretty closely. That's a decent annual wage - I would be prepared to spend a year working full-time to work out how to recover it myself and, if successful, I would consider that years's effort well-spent.


text:
How to differentiate between mining node and non mining node in bitcoin
I am trying to understand how does mining traffic looks from non mining ones?
If I try to discover mining node I believe I can look for nodes which broadcast blocks. Is there someway to know which Peer mined and broadcast the block ?
Thanks for help

Not really.  When a node sends out a block, it doesn't indicate whether it mined the block itself, or whether it's relaying a block received from another node.  The intention is that mining, like other aspects of Bitcoin, can be done anonymously, so the miner has plausible deniability.
If you have a large number of nodes on the network, then you could see which of them received the block first, and the peer who sent it is somewhat more likely to be the actual miner.  Some block explorers do this and report that peer's IP address, marked something like "relayed by".

Unless you have a connection to every single node on the Bitcoin network, it is impossible to distinguish between mining and non-mining nodes. Having a connection to all nodes means that you can see which node is the first to relay a block to you. However, this is not a guaranteed way to determine whether a node is mining. Due to network latencies and other block relay networks (e.g. FIBRE), you could still be relayed a block by someone who had not mined it.
Furthermore, nodes do not advertise that they are the one who mined it. This information is not stored in blocks nor is it announced by nodes that they are mining. Thus it is impossible to know which nodes are mining and which node created a block.