Concept of Validating Transactions Trying to get my head around Bitcoin. Been watching tutorials, unsure if I still understand

Alice wants to send Bob 5 Bitcoins

Alice hashes the transaction with 5 Bitcoins and send's it to Bob's mailbox, i.e his Public Key

What is the job of the Miners?

Before the transaction get added to a public ledger (i.e blockchain) do the miners validates that Alice has 5 Bitcoins to give (based on info in public ledger) by recreating the hash.

And if validation is successful, the miners earn Bitcoins, the transaction is added to Blockchain, and Bob gets his 5 Bitcoins.

Is it true that validation takes about 10 minutes or so?

Really, I've been struggling with this concept.

Thanks!

First off, Alice doesn't hash the transaction as part of validation.  The hash Alice produces is simply a hash of the transaction, which is how transaction IDs are created.  In truth, anyone participating in the network could hash the transaction body and arrive at the same hash.  It is when the miners hash an entire block of transactions that hasing is part of the validation process.

Secondly, Bob doesn't have a "mailbox".  That's not what his public key is.  The blockchain is a public ledger, so Alice isn't sending the transaction to just Bob, she's announcing it to everyone.  Bob can see this transaction, just like everyone else, and now has to wait for a miner to include it in a block.

Miners create blocks of transactions, and they have to create them in such a way that the rest of the network will accept them.  One of the requirements is that the transactions in the block are all valid transactions.  So yes, miners will validate that Alice has 5 bitcoins to give before they add the transaction to a block.  If the miner cheats, and puts an invalid transaction into a block, then the rest of the network will reject that block, and the miner would have wasted their time doing the proof of work on that block.

The 10 minutes is a product of the proof of work algorithm.  It is retargeted every 2,016 blocks such that on average, it takes the entire network 10 minutes to construct a block whose hash is lower than the target value (starts with a certain number of zeros).  It is not a single transaction that takes 10 minutes to validate, but the construction of the entire block of transactions with the required proof of work.

Once a block with the proper proof of work has been found, it is broadcast to the network, which will accept it if the block meets all criteria.  After that, Bob can see that a transaction to the public key he supplied to Alice has been included in a block.  This is called a "confirmation".  Once another block is mined on top of that block, the transaction is said to have 2 confirmations, and a block later, 3 confirmations...and so on.

Here's some other answers you may want to read:

What exactly is Mining?

What is proof-of-work?


How is the PRIVATE KEY actually created in the first place? How is the "Private Key" created in the first place?

I understand that once you have your wallet, you will also gain access to your public key and private key...

But in order to have a wallet address, one first must have a public key and in order to have a public key, one must have a private key.

So back in the days when crypto wallets did NOT exist, how did it happen?

I am trying to understand what actually happens first. After all, a wallet simply provides a simple view into what is happening on the blockchain (allowing to send and receive), but there is actually no crypto in a wallet, since everything is attached onto the blockchain.

Actually, what is the data attached too? Is there some sort of account created on the blockchain, that then has private keys, public keys and wallet addresses associated with it?

Speaking of bitcoin (other cryptocurrencies may do things a bit differently but the principles will likely be similar) and simplifying slightly (i.e. not discussing stuff like segwit).

For ECDSA a private key is simply a large (psuedo)-random number. Depending on the particular wallet implementation the private key may be generated and stored, or it may be generated deterministically from a master secret.

The public key is then derived from the private key and the bitcoin address is derived from a hash of the public key.

Bitcoin transactions have "inputs" and "outputs", normally the total value of the outputs must be less than or equal to the total value of the inputs, but there is a special transaction called a "coinbase transaction" that can introduce a limited number of new bitcoins per block and also collect any transaction fees from other transactions in the block. An input of one transaction must satisfy the conditions set in the output from another transaction to spend the value represented by that output.

There are several types of output, but the normal one is/was "pay to pubkey hash". The output contains a hash of a public key (aka a bitcoin address) and the corresponding input must contain the corresponding public key and a digital signature made with the corresponding private key.


What prevent a smartphone wallet from downloading my keys Wallet software use variant technologies to protect and hide our private keys like mnemonic or simply using the private keys.

What would prevent them from making a patch to their software that will install a keylogger, making a screenshoot, or simply going into the memory and retrieving those private informations ?

Nothing.

A Bitcoin wallet that is online and connected in some way to the Internet is referred to as hot wallet.

That is why it is recommended to keep as much money as you would put in your pocket in a hot wallet.


Why have prices fallen so drastically around October 2011? Any idea why bitcoin prices have fallen so in September and October of 2011?  It seems like back in August, one bitcoin cost about US$17, whereas in late October, it's just somewhat over US$2.

One thing a lot of people fail to notice is the decreasing volume at the exchanges. If we look at the USD volume - and not at the bitcoin volume, which is misleading because bitcoins are now worth much less - we can see a spike in June and a decrease afterwards:

The news reports in June attracted lots of people who were curious about bitcoin. A part of these people left and the market size is now coming back to April/May levels. As a consequence, there is much less money being traded. However, we still have 5 new coins being produced every minute and lots of miners who want their invested money back.
The current price is a natural consequence of high supply and low demand.


How does Bitcoin protect against doublespends? I am trying to understand the blockchain and I have read a bunch of these explanations, but they all don't address some of the questions I am still wondering about. So first I'll explain what I know, and then list out some questions.

There is a ledger with everyone's transactions on it.
The ledger is duplicated on each node in the network.
Some nodes are miners. Nodes just store them and have other things read and update it. Miners create blocks and send to all nodes.

So say Alice has only $10 and gives $10 to Joe and $10 to Bob.

Two entries are sent to the network which is Alice->$10->Joe and Alice->$10->Bob.

Now every node will have pending transactions of either Alice->$10->Joe or Alice->$10->Bob.

A consensus happens to decide which of the two should be added first. (is it to figure out which happens first and second or which to accept and which to reject like not add to chain at all?)

The miners will keep hashing the Alice->$10->Joe or Alice->$10->Bob depending on which one the miner has. They keep doing it until a miner has a hash that is considered valid.

For the first valid hash of a miner, that miner sends that transactions to every node as a valid block, and all nodes just add it to their chain if it looks valid (they check too). Lets say Alice->$10->Bob got mined first, and added to all nodes.

Now the blockchain knows Alice has no money left.

Then Alice->$10->Joe gets mined, and sent to everyone, but they all reject it because Alice has no money left (this part I'm not sure about).

Or is it that both transactions get mined, but which ever the majority of miners are for a certain transaction after 10 minutes, that transaction is added and the other is rejected?

I'm still confused about how the consensus part works. How the majority part works and how things get mined. How does it work, if only 1 unique transaction goes in the network like Alice->$10->Joe and not Alice->$10->Bob?

No one on the network has a 'balance', they just have the keys to the outputs of previous transactions which they haven't spent yet. At the start, Alice holds the keys to some Unspent Transaction Outputs (UTXOs), totalling a value of $10 bitcoin. That's what you mean when you say she has $10.

When she makes a transaction to Bob or Joe, she uses those UTXOs as input for the new transaction. But because she only has $10 worth of UTXOs, if she uses the same UTXOs in both transactions, only one of them can be valid because you can't use the same UTXOs twice. So only one of the two transactions can be added to the chain, correct. The one which is added will just be the one which the miner of the block saw first usually. Some miners might see the transaction to Joe first, and try to mine that into a block, while others may see the one to Bob and try to mine that into a block.

The consensus is just whichever miner finds a valid block first, then the transaction that miner included (let's say Bob's) will be part of the longest valid blockchain and all the other nodes will accept it. Nodes trust the longest of the valid blockchains (note that it has to be valid, no honest node will accept invalid blocks or mine on top of an invalid chain to extend it), so if that longest chain contains the transaction to Bob, Alice's previously unspent outputs will now be deemed spent, and instead Bob will have the keys to the new outputs of the transaction (because Alice used his public key/bitcoin address). The nodes will then drop the transaction to Joe because it is now invalid, and Bob has his $10.

For an attacker to change which transaction was accepted after it has been mined into the block chain, he would have to mine an alternative chain containing the other transaction, and race against the rest of the network to make his chain the longest. He will be the only miner to extend the chain if it is shorter, other miners will focus on the longest chain, so he would have to have at least 51% of the mining power of the network to extend his chain faster than the honest miners extend the accepted chain.

It's the same behaviour as if only one unique transaction was sent to the network, in that case all the miners will be trying to include that one instead of some trying to include the different one, so there won't be any outcome uncertainty.


How can I read chainstate database? 1) What is the format of the LevelDB databases stored in the database directory?

I know there are some custom blockchain parsing libraries, such as this one, but I'm wondering if I can just do a read of the chainstate database to get some basic information about the UTXO set.

2) Is there some sort of a LevelDB database explorer GUI that I can use to see what's in this database?

3) Could I have a second program that just read from this database? Would it be safe or would I mess up the database if I tried this?

You can find how to read the blockchain leveldb (format and meaning of the keys) here: What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?

no idea (yet) for the UTXO :-)


Which command line software tools are required to mine litecoin I have compiled litecoin core and am currently running litecoind which is downloading the blockchain.

What other command-line tools do I need in order to mine litecoin without a GUI? And what are the other prerequesites (aside from a beefy rig with lots of graphics cards etc)? Can I just create a wallet and set the daemon running? Does the daemon mine coins or do I need to use litecoin-cli to instruct the daemon as to the location of my wallet etc?

I can't seem to find any decent command line guides - most seem to be for cgminer or litecoin-qt

You have miners on command line like sgminer or cgminer. You can use this with a GUI but it is not a requirement.

You can find usage guide on previous link.
Exemple for sgminer. After you build it and install it, you simply have to execute this command to lunch mining :

sgminer -o http://pool:port -u username -p password

Replace :

pool by adresse of your pool
port by the port of your mining pool
username and password by your pool login.

If you want more information check official github of these projects


Lightning - why are commitment transactions supposed to use different keys In the paper BIP32 and deterministic key derivation are mentioned. But why given that two peers directly exchange messages (i.e., there is no need to obscure anything)? Alice always exchanges state with Bob and that commitment transactions usually don't land on the blockchain.

Punishments for transmitting an old state can be done by attaching to the previous "breach-remedy" transaction using a valid preimage (that was exchanged while getting the new "commitment"). This means the script has to check the signature and invoke the hash function. An optimization is to use elliptic curve trickery and thus construct something similar to pay2contract scheme. I believe this way you still have to store all old values or am I mistaken? I've heard about ELKREM and optimizations in that part. But my question here is more basic, why did Poon and Dryja even consider BIP32? I understand the need for different settlement keys in Eltoo or the additional privacy for on-chain transactions, but what about Lightning?

An optimization is to use elliptic curve trickery and thus construct something similar to pay2contract scheme. I believe this way you still have to store all old values or am I mistaken?

The elliptic curve trickery you mentioned is elliptic-curve multiplication. And yes, you need to store all old values.

In BOLT-03, under Key Derivation, it gives three reasons why the keys are changed(localpubkey, remotepubkey, local_delayedpubkey and revocationpubkey), and one of them is related to your question,

  Changing the localpubkey every time ensures that commitment transaction ID cannot be guessed except in the trivial case where there is no to_local output, as every commitment transaction uses an ID in its output script.


Why are companies selling mining hardware instead of using it themselves? I'm not (yet) using Bitcoin, and I'm just approaching this world as of now.

I stumbled upon some merchants that sell mining hardware (with some GH/s). But I've yet to understand what they gain, apart from the upfront cash.

The reason one should buy mining hardware is, if i'm not mistaken, to "generate bitcoins", i.e. "generate money"; so, one expects to be able to have a return of the investment sometime in the future, so I guess that in some way my claim is correct (about "generating money").

But then, why don't the companies simply use their own hardware?

Companies that manufacture mining equipment don't just mine with their own hardware for a variety of reasons:

They may not be able to obtain low prices on electricity, making it more profitable for others to mine than for them to mine.
They may not be able to make use of the heat generated, making it more profitable for others to mine than for them to mine.
It's easier to get financing if you're going to make something you can sell.
They may prefer not to take the risk that mining will remain profitable.
The value of mining equipment depends on the value of bitcoins, which would be negatively affected by mining becoming too consolidated. So mining is more profitable if it's distributed.
It may be virtually impossible to mine profitably and they may be too smart to think otherwise.


Cannot connect to php-mpos with CgMiner: Pool 0 slow/down or URL or credentials invalid I'm trying set up a local pool, using the php-mpos and the zetacoin-qt executable file, but for some reason, when I attempt to connect using cgminer, I get this error: Pool 0 slow/down or URL or credentials invalid, this happens even though I've created a worker in php-mpos, I am running all of this on a windows machine. My batch file running the program is this:

cgminer-nogpu.exe -o "stratum+tcp://localhost:9332" -O admin.user:password

My Zetacoin config is this:

rpcuser=username
rpcpassword=password
rpcport=9332
daemon=1
server=1
gen=1

block_nTime=1317972665
block_nNonce=2084524493

Oops, It turns out I didn't use stratum mining server properly, instead I used stratum alone.  There's an important distinction between the two.


What do the classes ChainstateManager, CChainState, CChain and BlockManager do in Bitcoin Core? What do the classes ChainstateManager, CChainState, CChain and BlockManager do in Bitcoin Core?
Why do CChainState and CChain have a leading 'C', but ChainstateManager and BlockManager don't?
These questions were asked during the May 12th 2021 Bitcoin Core PR review club hosted by John Newbery on a Carl Dong PR to de-globalize ChainstateManager.

What do the classes ChainstateManager, CChainState, CChain and BlockManager do?

A graphic from Doxygen showing how the classes interact:

ChainstateManager: Provides an interface for creating and interacting with one or two chainstates
CChainState: Stores and provides an API to update our local knowledge of the current best chain.
CChain: An in-memory indexed chain of blocks. It was introduced in PR 3077.
BlockManager: Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most-work tip is.

Why do CChainState and CChain have a leading 'C', but ChainstateManager and BlockManager don't?

C stands for class using Hungarian style naming.
The current style in Bitcoin Core is not to use Hungarian notation. Bitcoin Core uses m_ to represent member variables, g_ to represent globals, and no prefix to represent local variables/parameters. CChainState and CChain were named prior to these style guidelines being implemented in Bitcoin Core.
These were answered by John Newbery and other participants of the May 12th 2021 Bitcoin Core PR review club.


Bitcoin value as int64_t or as double I want to do program that doing some calculations with bitcoin values.

I know bitcoin have 8 digits after decimal point (please correct me).

If I store the value as double I worry that I might lose precision when I do the calculations.

Shall I use int64_t instead? It generally can store 18 digit number, so if I multiply by 100,000,000, I will be able to work in satoshi units and never lose precision.

After that I will need to divide by 100,000,000 so I can print it.

And what about gcc quadruple precision?

Or shall I use GNU MP library instead?

I want to do program that doing some calculations with bitcoin values.
I know bitcoin have 8 digits after decimal point (please correct me).

There is no decimal in bitcoin at code level. There is no "bitcoin" unit either. There is only satoshi. And it is best to always stick to integer types instead of floating point types for calculations.

Shall I use int64_t instead? It generally can store 18 digit number, so if I multiply by 100,000,000, I will be able to work in satoshi units and never lose precision.

The number of digits doesn't matter, the size of the number in binary matters.
Since the maximum value you can have as "amount" for bitcoin is 2100000000000000 (21 million bitcoin or 21 million * 10^8 satoshi) and this value is 7 bytes (0x0775f05a074000), you need an 8 byte (64 bit) integer. So your options are a signed or unsigned 64-bit integer value type. The sign doesn't matter because the most significant bit is never set due to the size of the max value.
By the way a 64-bit signed integer has a max value of 9,223,372,036,854,775,807 which is 19 digits.


Raw Block data in Hexadecimals Is there any Web API available for us to query Blockchain data in hex format?

The format should follow the standard (https://en.bitcoin.it/wiki/Block#Block_structure) structure rather than JSON.

What kind of API do you want? Do you mean API with your local Bitcoin Core or do you need web-API?

Have a look to http://webbtc.com/block/000000000000000001f942eb4bfa0aeccb6a14c268f4c72d5fff17270da771b9 (this is an example)

It is possible to download block as [json] / [hex] / [binary] there if you know the hash of the block

UPDATE (december'17):
block in raw hex example : https://blockchain.info/block/000000000000000000a7b4999c723ed9f308425708577c76827ade51062e135a?format=hex


Why bitcoin faucets pay different amount depending on user's location? I have noticed that faucets like moon faucets, bonusbitcoin and bitfun pay a lot more satoshi for the same amount of time and bonus depending on location.
A person in US earns around 7 times more than a person in India.
Any reason for such a huge difference?

Some faucets may pay based upon the ad revenue that they will earn from the user. A site may earn more ad revenue from someone visiting from the US because their advertisers are willing to pay more for US traffic than Indian traffic. Thus the faucet owner may opt to pay US visitors more in proportion to the additional ad revenue which they are bringing.


Will old accepted blocks ever be removed? Or are they kept forever such that the chain from the Generation Block will always remain verifiable?

Reaching consensus on which old blocks should be removed is very complicated. Bitcoin, being decentralized, requires you to check for yourself and add-up all the transactions from the very beginning.

If you keep a partial version of the blockchain, how do you verify that it is consistent with the entire blockchain? If you keep a partial blockchain someone could easily broadcast to you a blockchain with incorrect values, and there would be no way for you to understand whether those transactions are valid without checking the entire blockchain for yourself.

Fortunately however, the size of the blockchain isn't really an issue if you use a  Simplified Payment Verification (SPV) client such as MultiBit, as it's able to verify the integrity of the blockchain with just the block headers. This reduces drastically the size of the blockchain.

To answer your question, for bitcoin to work, old accepted blocks cannot be removed.


Hardware Wallet security vs. software if you have a nano ledger, you can access your coins with the ledger live app. Even if the device is not plugged in, I can still see my currency from the app. You are given a 24 word recovery phrase when setting up the nano ledger.
What makes this any different from a software wallet like Electrum? The electrum wallet has a seed phrase just like the hardware wallet, no? If I can access ledger live from either my PC or phone, I don't understand what makes the two any different? Is it the case that you can not trade or transfer coins unless the physical device is plugged into the PC or phone with the app open?
What is the differentiator between the two that I am missing?

The difference is that the private keys that allow you to move your Bitcoin are stored on the hardware wallet itself.
Bitcoin uses asymmetric cryptography. This means that a "key" has two components: the private key, and the public key. The public key is computed from the private key and can be shared publicly. The private key is randomly generated and needs to be kept private.
Hardware wallets store the private keys and provide a way for software to communicate with the device. Software will create transactions (and other data) and ask the hardware wallet to sign it with its private keys. Furthermore, those hardware wallets also allow the software to ask for its public keys.
So your software wallet on your computer (like ledger live) asks the hardware wallet for a public key. It then saves that public key on your computer and generates the address for it. Then it can search the blockchain for your transactions and be able to see your balance. In order to spend your Bitcoin, you need to plug in your hardware wallet so that the software can request it to sign transactions.
Software only wallets (such as a default Electrum wallet. Note that Electrum can work with hardware wallets.) save the private keys on your computer. You don't need a separate device to sign transactions; the private keys are stored on your computer and everything happens on your computer.
What this means is that if your computer is compromised with malware, with a software wallet, that malware can steal your private keys. With a hardware wallet, because the private keys cannot be retrieved from the hardware wallet and because the keys are stored on the hardware wallet, the malware cannot steal your private keys. In this way, your funds will be safe.

The 24 word recovery phrase is a BIP 39 mnemonic. It is a representation of the private keys in your wallet. Modern wallets use this and BIP 32 Hierarchical Deterministic wallets. BIP 32 allows for many private keys to be deterministically generated from a single randomly generated seed. So BIP 39 provides the seed and BIP 32 generates the actual private keys that you use.
In this way a wallet can store generate and store a single random seed and derive the actual private keys and public keys on the fly. BIP 32 also allows public keys to be derived from public keys. So for hardware wallets, they will export a single public key and the software can derive further public keys from that.
Both software and hardware wallets use things like BIP 39 and BIP 32 (Electrum has an alternative mnemonic scheme, but they still use BIP 32). The difference is where the seed is actually stored.


Why does this code keeping giving me this error? I am just trying to understand the raw bitcoin protocol import random

def privateCeiToWif(Cei_hex) :
     return utils.base58CheckEncode(0x80, Cei_hex.decode('hex'))

def privateCeiTopublicCei(s) :
# secp256k1 : Standards for Efficient Cryptography (SEC)(Certicom Research) refers to the parameters of the ECDSA curve
    Signature = ecdsa.SigningCei.from_string(s.decode('hex'), curve = ecdsa.SECP256k1)
    verification = Signature.verifying_Cei
    return ('\04' + Signature.verifying_Cei.to_string()) .encode('hex')

def pubCeiToaddr(s) :
    ripemd160 = hashlib.new('ripemd160')
    ripemd160.update(hashlib.sha256(s.decode('hex')).digest())
    return utils.base58CheckEncode(0, ripemd160.digest())

def CeiToaddr (s) :
    return pubCeiToaddr(privateCeiTopublicCei(s))

#WARNING :  This random function is not secure
private_Cei = ' '.join(['%x ' %random.randrange(16) for x  in range(0, 64)])
print CeiUtils.privateCeiToWif(private_Cei)
print CeiUtils.CeiToaddr(private_Cei)

In python, you don't need to prefix a call to a function in the same module with the module's name. You can call it like print privateCeiToWif(private_Cei)


How can I prove control of HD wallet through message signing? If I sign a message with one of the address from an HD wallet, does that prove control over the rest of the addresses created and will be created inside that HD wallet?

It proves that you control all children of that address (i.e. the ones further down the chain). It does not prove that you own the parents of that address (i.e. the ones further up the chain), since it's not possible (AFAIK) to go from a child to a parent key.


Which altcoins have testnets? Bitcoin can be run on a public testnet (by using a different port than the real Bitcoin network). This is very useful for development, because you can test software handling Bitcoin without handling actual value.

What is the situation for Bitcoin alternatives? Is there a testnet for most (or all) altcoins? Which altcoins have such a testnet feature?

Most mine-able coins are essentially clones of the bitcoin code and therefore have testnet. Many alt-coins do not have very active testnets so finding another peer on this network can take time, but given enough patience, your alt-coin testnet node will find another connection.

If you are impatient you can google for "testnet addnode" and include the coin you are looking for; this will (hopefully) find forum posts of people who have setup/found the IP address of a testnet in your desired coin, adding this to your configuration file will make your client attempt to connect to this IP on startup. If you need help with a particular coin, let me know :)


Is it possible to check if a bitcoin address "belongs to" a master public key from a deterministic wallet? Let's say I have a Master Public Key (MPK) and have a derived some addresses from it.

How can I check later if a given address was derived from my MPK?

No, except by exhaustively iterating the whole derivation tree below the master.


Sending my Bitcoin cash using my private key This question has probably been answered many times but despite my efforts I cannot find a solution. I have several Bitcoin (BTC) addresses for which I hold all private keys. These addresses now also hold Bitcoin Cash (BCC) and so my question: how get I can hold of the BCC?
I have tried several BCC wallets but none allow me to import a private key...
I just want to make a transfer (to an exchange to get BTC instead) so I dont want a wallet that forces me to sync the complete chain.

Note:

Coinomi on Android apparently allows me to import private keys, but for some reason it wont display my BCC after I try importing the key (no error message, nothing)
To do the same with BTC I use blockchain.info, deleting all addresses after the transfer is sent

After trying a few more wallets I got one to do what I want :): http://electroncash.org/

Of course it had to wait until I had already posted my question...


Java: Base58-encode String I would like to Base58-encode this String:

    56379c7bcd6b41188854e74169f844e8676cf8b8

My current Java code looks like this:

    String test9 = "56379c7bcd6b41188854e74169f844e8676cf8b8";
    byte[] b2 = new BigInteger(test9,16).toByteArray();
    String test8 = Base58.encode(b2);
    System.out.println(test8);

As result I get:

    2CffxtJsCdzJEaHXHjSkvb12p12P

but I should get:

    39YteymR86cG7V3Kijg8Gm2ST1r4nTeM1b

Can someone help me, please?

Your output is correct given the input that you used.

However, If you are expecting to get an output address of 39YteymR86cG7V3Kijg8Gm2ST1r4nTeM1b, it looks like your input is incorrect. It's missing the first byte and the last 4 bytes (encoded as hex):

  Your Input: --56379c7bcd6b41188854e74169f844e8676cf8b8--------
Proper Input: 0556379c7bcd6b41188854e74169f844e8676cf8b86e1b34ba

Try this tool for validating your expectations:


What are the arguments for and against deprecating transaction priority? A recent pull request moves ahead to deprecate the concept of transaction priority by changing the block priority space to zero. This has enraged some users who believe that deprecating transaction priority means that it will no longer be possible to create zero fee transactions.

So what are the arguments for and against deprecating transaction priority?

Since transaction priority has never really been a consensus based "protocol", it was never really that valuable to have it in the core code. Miners can and DO change the priority how they see fit. I see it as less code to maintain in the end and since Bitcoin is meant to be a free market network, the fees paid will prevail


How do I restore use of my wallet.dat file, last used in 2013? I found a wallet.dat file in my backup folder, which I recall last using in 2013. I'm curious to see what the BTC contents are, which I recall being a really small fraction of BTC.

In any case, is there anything preventing me from just installing Bitcoin Core and replacing the default wallet.dat to recover my backed-up wallet? What is the recommended way to recover such an old wallet.dat file?

In any case, is there anything preventing me from just installing Bitcoin Core and replacing the default wallet.dat to recover my backed-up wallet? What is the recommended way to recover such an old wallet.dat file?

You can do just that. In fact, that's exactly the way to restore a backup.


Handling change addresses without using rawtransactions? Since I'm using the wonderful accounts feature which is soon to be deprecated (shame on me, i know - but i simply didn't have resources and time as a single person to do an internal accounting system in a few weeks alongside everything else the project contains, this is a school project and will not be deployed), i was wondering how to handle sending transactions & change addresses, without using raw transactions.

Would the following work

SendMany(fromacc, toaddress: amount, 1, "comment", subtractfee)

(I'm planning to use SendMany for single transactions, because it has the subtractfee parameter compared to SendFrom).

Use the resulting TXID to query Blockcypher API (https://api.blockcypher.com/v1/btc/main/txs/b7bf53a74a4e4cb61ab523cc002fc4cea83fb359471d02b212d947cf86fe6077) and "grab" the change address from there (Since Bitcoin Core doesn't allow this wihout using rawtransactions?)

VerifyAddress(changeaddress)
SetAccount(account, changeaddress)

Which means that GetBalance(account) should show the correct balance of the account and not 0?

Or should i really not do that and use rawtransactions instead? :-)

edit:

So i just realised that i confused the subtractfee parameter in SendMany from the one in SendToAddress (which is what i need), so i suppose i need to use that instead.

would using:

$balance = getBalance($myaccount)
move("", $myaccount, $sendingamount, "", "comment")
SendToAddress($receiveaddr, $sendingamount, "comment", "commentto", 1, 0, 6)

do the the blockcypher grab TX id, verifyaddress and set account here

OR

$newBalance = getBalance($myaccount)
$change = $balance - $sendingamount
move("", $myaccount, $change, "", "comment")

Work in this case and would listunspent show the amount under the right account (not "")?

Also here is what I'm trying to do from a user perspective: https://imgur.com/a/IHrF4vI

It sounds like there is a misunderstanding of how accounts work (which is not surprising given that the accounts system is very unintuitive).

First of all, addresses are only tied to accounts for receiving, not sending. So when you send from an account, any input associated with any address in the wallet can be selected for the transaction. During that send, the account's balance is deducted by exactly the amount that was sent. Change goes back into the wallet and has no effect on the balance as it was not sent from the account.

The account field in listunspent is slightly misleading as outputs are really not associated with accounts at all. When you send from an account, ANY output can be chosen as inputs for the transaction, not just ones that are part of the account.

When sending, because you know the recipients address, you can use the subtractFeeFrom parameters of sendmany or sendtoaddress to specify that the fee will be subtracted from the specified addresses (i.e. the recipients). This should still deduct from the account balance.


Is there a way to tell if a specific Bitcoin node is on the network? I have a bunch of Bitcoin nodes supporting the Bitcoin network. Is there a way to tell if one of my servers is in fact running without installing a 3rd party software. Say I wanted to pay one of my users that hosts a Bitcoin server, but I don't want to pay him unless I can detect his Bitcoin server is indeed running. Is there some type of unique identifier to tell if one of my nodes is running?

Bitcoin nodes do not have a unique identifier, and this is by design.

In fact, any property that allows someone on the network to verify whether two connections (even separated in time) are to the same node, is something we'd call a fingerprinting attack.

As such identification could be used to link transactions coming from the same node together, they are a potential privacy leak.


What reasons are there to mine and support Litecoin? There are many examples of Bitcoin being accepted as a means of exchange in online transactions.
I haven't found any such examples for Litecoin.

So, what is the value in LTC mining? What is LTC's purpose if you can't buy anything with it? Do people believe that LTC is in the process of becoming a currency that will one day be accepted in the same online transactions as Bitcoin?

This is simply my opinion on why I get into altcoins. I like to diversify my portfolio. In my eyes any one currency could overthrow another currency.

What I usually do is mine a decent currency, then use that currency to invest in certain things. For example and this is simply an example and I'm not using it to spam. I would mine litecoin then spend my litecoins on hashing on CEX or BleuShares or something else. This starts to make me stronger and gives me more.

I also sometimes buy metals such as gold and silver with my crypto currencies. But I'm a firm believer of diversification.

There was a twilight zone episode where theives steal gold and sleep for 100 years to find out gold can be manufactured in the future and the gold was worthless. I don't see such things happenning anytime soon, but it is nice to not put all your golden nuggets in the same basket.


How to split BTG in electrum and send to new ledger nano s wallet I currently have all my BTC on my electrum wallet, and I had them before the BTG fork. I haven't done anything regarding splitting since the fork, but now that I have the ledger nano s, I want to move my BTC from electrum to the ledger.

Now I am in no way familiar with a) splitting BTC/BTG and b) replay attacks, but I am afraid of losing any coins in the process. As I understand, I shall do the following:

Make a regular BTC transaction to move all BTC from electrum to the ledger nano s BTC address
Get a BTG wallet, and import electrum's private keys in it. Then, I have 'claimed' the BTG
Make a regular BTG transaction and move the BTG from the BTG wallet to the ledger nano s BTG address

Is this correct? Is there any chance of losing anything with this process?

The steps you stated look good to me. It would be prudent to wait for a few confirmations of your BTC transactions, to make sure your BTC are safe, before exporting your private keys from electrum.


When is the earliest we will see SegWit transactions on main net I am assuming that only after SegWit activation SegWit txs will be on mainnet, what i cannot determine is the date for that event.
Can anyone help?
So far i have seen references to late August.

Nobody can determine the date for that event.

SegWit, like every soft fork, requires a majority of miners to enforce the new rules in addition to economically relevant nodes.

The initial BIP that proposes segWit, BIP 141, requires 95% of miners to signal they are ready for 2 weeks, before starting to enforce the new rules. This threshold is set so that at most a small percentage of miners (5%) would end up on another chain, making it unlikely that the minority chain would accidentally being longer, and thus confuse light clients.

Due to various political reasons, this signalling for BIP 141 readiness has not happened. Various new proposals have been made to help move this process forward, including BIP 148, BIP 149, and BIP 91. BIP 148 and BIP 91 are meta-approaches that make certain demands on signalling for the original BIP 141. BIP 149 proposal a completely new SegWit deployment, independent from BIP 141.

At the time of writing, the earliest time at which 95% for BIP 141 could be reached is around August 10th 2017. BIP 141 specifies another safety period of two weeks after that before the new rules take effect, which would be around August 24th 2017. BIP 91 and BIP 148 do not change this, as all they do is force signalling for BIP 141.


What did I do wrong that caused me to lose bitcoin? I've been accumulating bitcoin into a paper wallet for a couple weeks. It's all been stolen. I'm trying to figure out what I did wrong:
https://www.blockchain.com/btc/address/193jdrxMKoUjWLyKm2UCGNXLGGvK1x3FDV

I've been very careful with this wallet. I purchased bitcoin on Bisq. Over time I was sending them to a paper wallet that I generated on bitcoinpaperwallet .com. I printed this paper wallet on a piece of paper hidden inside my house. I never saved the private key anywhere on my computer.

As I transferred funds into the wallet, I would verify they arrived by checking blockchain .com. They always did.

A week ago I transferred a lot more bitcoin to this same paper wallet. Today I checked and the wallet was completely drained, hours after the last transfer and soon after I verified they arrived (using blockchain .com). The bitcoins seem to have been instantly transferred to a bunch of wallets downstream and scrambled.

I'm completely baffled as to what I've done wrong. I searched my computer to make sure I didn't accidentally save the private key somewhere, it's nowhere to be found. But I knew that I didn't do this. I was very careful when generating the paper wallet. The only place the private key is on this piece of paper.

No one in my house knows anything about bitcoin, and anyway, this paper has been kept concealed.

What did I do wrong? Any clues?

P.S. Since I know someone will ask, the reason I didn't use a hardware wallet is that I was going to save this paper wallet on multiple encrypted USB sticks. I don't trust the hardware wallets to be secure and recoverable ~10 years from now when those companies may be gone and their software may be outdated.

1) If you generate your paper wallet on your computer, you have to fully trust your computer

2) If you use a website for generating your paper wallet, a) you need to trust that website (hopefully its local javascript) b) your browser and its random number generator and c) eventually your network provider(s) (depending on the transport layer security)

3) If you generate your paper wallet on your computer and it was compromised, the generated paper wallet was accessible at least during the time of your generation.

My recommendation

1. Never ever use a online paperwallet generator

2. Hardware wallets are eventually not super secure, but they offer great security, maybe use them instead of a paperwallet

3. The BIP39 24 word seed can be restored even if the vendor of your HWW disappears

Conclusion:

Use an old offline computer with Bitcoin Core or any other semi-trusted software to generate your private keys or seeds, keep it offline all the time!

Or... use multiple hardware wallets from different vendors in a multisig setup if you want maximal security (but comes with minimal user experience)


Why proof of work rather than posting to a public forum? I understand that proof-of-work plus a block chain is one way of creating a trustworthy public ledger of transactions.  But holy hell, the cost to society in terms of energy consumption is VERY high per transaction.  I participate in conversations online all the time where I implicitly trust that I am seeing the full discussion and that everyone can see my input.  Usenet, for example, does this in a decentralized way.  Couldn't we just post our transactions to usenet save some resources?

I participate in conversations online all the time where I implicitly trust that I am seeing the full discussion

Proof-of-work is one part of what allows bitcoin to be trustless, which is a very important property for any decentralized system of value. If transactions were just posted to a forum, then what is to stop a forum admin from editing, censoring, or deleting transactions?

Creating a trustless financial network is not a trivial task, the large amount of energy being spent to secure the network is a testament to the value users see in maintaining and participating in the network.


List of Bitcoin forks or spinoffs I've just heard about another digital currency called Litecoin, which I believe to be based on Bitcoin, are there any more alternatives to Bitcoin & Litecoin?

Any one got a list?
A reason why the alternatives are better and/or worse?
With what intentions where they created.

Forum user xorxor maintains a list:

http://bitcointalk.org/index.php?topic=134179.0

  A reason why the alternatives are better and/or worse?

The secret sauce for Bitcoin is how the proof of work approach allowed it to be a decentralized digital currency.  This approach allows "truth" to be determined by consensus of the network.  This also makes it vulnerable should the majority of the network not be honest.

Keep that in mind first and foremost when considering any alternatives.


Do faucets actually work? Doing a simple Google search shows that there are many places on the Internet that say that they give out free bitcoins. All you need to do is give them your deposit address and confirm that you're not a robot, and boom, free bitcoins!

Do "faucets" like this really work, or are they scammers?

Can a faucet do anything with your deposit address (other than deposit coins in it)?

There is no danger in providing your Bitcoin address.

For sites that use inputs.io, certainly you have to provide some way for them to know which account to credit. The security of that account depends on the strength of your password, and how much you trust inputs.io.

A more fundamental problem with these faucets is that they are a complete waste of time. The ones I've seen offer .00001 BTC for looking at an ad, solving a captcha, and entering your account info. This takes 30 to 60 seconds. At current exchange rates that is roughly 10 US cents per hour, about 2 percent of minimum wage, for perhaps the most boring work I can imagine.

It's also not a good way to just pick up a few satoshis to start playing with the system, because thanks to aggregators like inputs.io, you typically cannot get your coins until you have earned BTC .0005 or so, which would take about an hour. Totally not worth it.

In short, I think if it were a scam, they should be offering much better bait.


Recovery after losing wallet.dat and formatting hard disk I have received the bitcoin way back in 2013 in Bitcoin Core. At that time I don't know about the importance of wallet.dat - I have formatted my hard disk and install Bitcoin Core again in 2017 but there it didn't show my Bitcoin in my balance. I have my Bitcoin Key.
I meant "Bitcoin Key" is my Public Key on which I got my bitcoin. Is there any other way to get my Bitcoin back if I didn't get my original wallet.dat of Bitcoin Core?
How can I get my bitcoin back?
How can I get to know my Private Key?

Your money is lost without at least one of

a backup of important data from the hard disk before it was formatted
a backup of the wallet.dat file
a note of the private key

There is no way to recover the private key from other information. If there was, Bitcoin would be completely unsafe and unusable.


how does node create UTXO from blockchain for the first time? Let's say I am a new node.
I try to synch with the full node to grab the whole blockchain. Now, I synced with it .It's time for my node to create UTXO database ..
How does it do this exactly so that it knows which one to put in UTXO database ? since it will need to know which one is unspent. By looking at the blockchain, it can't quickly figure out which one is unspent for the following Reason: 1st height block contains output which has 5btc sent to me. I only spend this in the 400,000th block. This kind of thing happens for every other output. So how does bitcoin build UTXO in an effective way ?
It would also be great if there could be any code from bitcoind or something so i can take a look. Couldn't find it myself.

The UTXO set is updated every time a block is connected to the chain. So if you imagine during initial sync, you download block #1 and verify it, then add one UTXO to the database (the coinbase output). Block #2 gets downloaded and verified, and you add one more UTXO to the set and so on. Eventually you download block #1000 which contains a transaction that spends the coinbase output from block #1. If everything is valid, you delete that block #1 coinbase output from the UTXO set and replace it with whatever new coins are created by the transaction in block #1000.
So your assumption that "Now, I synced with it. It's time for my node to create UTXO database" is incorrect - the UTXO database is always under constant maintenance from the moment you launch bitcoind.
To start digging through the code, note this call to UpdateCoins() in the function ConnectBlock(). This will eventually call AddCoins() and you can see the UTXO are actually added to a cache first (which is eventually flushed to disk). But this is the mechanism you are looking for.
You can see where coins are removed from the UTXO cache in SpendCoin()


Whats the difference in way you installing full nodes I'm newbie in blockchain world, so I'm curious what is the difference between installing full node by using libs such as bitcore-lib (using node.js) and installing it through the daemon (mentioned here https://bitcoin.org/en/full-node#ubuntu-1604) (sudo apt-add-repository ppa:bitcoin/bitcoin etc..)

The Bitcoin Core daemon is better-reviewed and faster (because of C++). Bitcore lib is a Javascript library and not a node, the node version is Bitcore Node. You should ask yourself what you're going to do with a node. If you're a miner, the you shouldn't take risk and choose Core. If you want to use Javascript API, use Bitcore.


Getwork - can the miner increment timestamp? When requesting getwork from bitcoind or a pool, the miner is expected to be incrementing the nonce value of the block, but can it also increment the timestamp value, or would such tempering cause a submitted work to be rejected by bitcoind or a given pool?

Yes, the miner can increment the time stamp by a limited amount, but only if the pool advertises X-Roll-NTime as a feature. DiabloMiner and CGMiner both support this.

See the official spec for more information.


Why don't bitcoin escrow transactions require a third party? I've read this article: What are "routine escrow mechanisms"?

But I don't understand the bitcoin escrow system.

Can anyone explain me how this escrow system doesn't need a third party ?

Edit : How is solving problems the third party solve in online exchange ?

Bitcoin escrow schemes that don't require a third party typically don't require a third party because that is one of their design requirements. It's obviously much easier to design an escrow system that does require a third party, so typically you would only design one that didn't if you had no choice.


How does longest chain propagation take place in bitcoin? Let's say the valid blockchain that Node A has is: B1->B2->B3
Now, I am gonna cheat since I have lots of  computing power. What I do is I download the above blockchain that Node A has and start cheating. Before I do that, I make a transaction to buy a motorbike. so,
valid blockchain now looks like this (B1->B2->B3->B4). B4 has my bike transactions. In my local copy, I didn't put that transaction . Now, because I want to have a longest chain, I work so fast and let's say after a while Node A's chain and mine looks like this:
Node A - B1->B2->B3->B4->B5
Mine - B1->B2->B3->O1->O2->O3->O4
Now, I want to broadcast my chain.
What do I broadcast? The whole chain (B1->B2->B3->O1->O2->O3->O4) or only O1->O2->O3->O4?
A) If I broadcast only O1->O2->O3->O4, how does node A figure out that it has to remove B4->B5 only from its chain and append O1->O2->O3->O4 to B3? Does it first get O1's prev hash and then in its local blockchain, it searches the block with that hash and if it finds that hash, it removes every block after it and appends the newly copied O1->O2->O3->O4 from my chain? If so, it would also account for if the new one is the longest one (so the count of the removals of the blocks should be less than the count of new copied blocks). Am I right ?
B) of course, broadcasting the whole chain is out of question since it's so huge.

An attack that attempts to outpace the mining power of the whole network by itself is called a majority-attack or "51%-attack". Concretely, your example is a doublespend attack by means of a majority attack. When the attacker publishes their chain-tip, each node performs a chain-reorganization to switch to the best chain.
Concretely, the blocks B4 and O1 both share the hash of B3 as their prevHash. Once the attacker announces the blocks O1->O2->O3->O4, other nodes will notice that this chain-tip has more total work, find the last shared ancestor in the blockchain (B3), revert all blocks up to the shared ancestor, and then apply the new blocks to converge on the best chain-tip.
A blockchain-fork and chain reorganization can also happen benignly when two miners happen to find a block at the same moment. At that point the network's nodes are split in opinion what the best chain is, since each node considers the block it first saw to be the correct one. Once another block extends one of the two chain-tips, the network converges on the best chain as the nodes hear about the new block.


Code modification could lower mining-difficulty requirements, why isn't this a vulnerability? What prevents a bitcoin miner from modifying the code to make mining easier instead of more difficult ?

Nothing (as long as nobody else changes that code as well). I could easily mine hundreds of blocks a second using modified code.

However, as none of those blocks would be accepted by the rest of the network, it's pointless to 'cheat' the system. Which is how Bitcoin basically works: because every node on the network has to store the complete block chain, it can verify every single transaction and block there has ever been, and changes to the mining code aren't dangerous.


why is bitcoind is missing from /usr/local/bin? i just followed the instructions from degreesof zero built, made and installed bitcoind, but bitcoind was missing from the location above. What's wrong with the procedures please? thanks

https://degreesofzero.com/article/building-bitcoind-from-source-on-ubuntu.html
https://degreesofzero.com/article/installing-bitcoind-on-ubuntu.html

If you've followed the first link, you will also need to sudo make install, this will take the relevant binary files and place them in the /usr/local/bin directory.


How does a node find the active chain? Let's say a user joins the Bitcoin network and downloads the latest state of the blockchain (all blocks, which includes the forks/uncles). How does this user find/determine the active blockchain on which they should build upon? I'm not asking about difficulty levels or the amount of work that gets put into the chain, but as to how this one user finds that longest chain and is sure that there are no more longer chains.

I imagine the simple (and only?) way to do this would be to check every single block the user has, and then start building upon the one which has the most work put into it. However, since nodes also store the numerous forks, evaluating every single block and its "path" throughout Bitcoin's existence is likely to take a while (and continue to take longer as time goes on).

A potential 'shortcut' would be to simply look up recent blocks, eg. search for blocks that were submitted in the last 48 hours, and then just take the longest valid chain from there, but then how would one decide on a particular timeframe? (24h? 48? last week? last month?) It would still in theory be possible that the current longest chain has been published a long time ago and other nodes are acting maliciously by trying to ignore it, so this approach doesn't seem valid in my opinion.

I know Bitcoin uses LevelDB to store metadata about blocks for quick look up, which would help speed up the evaluation of all the blocks, but is there are more pragmatic approach that Bitcoin's code takes?

Also, is this evaluation done from scratch (ie. from the genesis block) each time the user boots up, or is the information about the longest chain stored somewhere on disk for quick future retrieval when the user rejoins?

When a new node joins the network, it will look up nodes from the DNS seeds. It'll reach out to multiple nodes it hears about and ask them for more peers in turn.
The new node asks each of their peers for their best chaintip and then starts sychronizing the headers of the best chaintip it hears about first. A block header is only 80 bytes (tiny in comparison to complete blocks) but already allows checking that all the blocks on that chain are connected and that the blocks are meeting the difficulty criteria.

From then on, the node verifies each block in order to validate that the consensus rules were followed. If the best chaintip they were following is found to be injuring any consensus rules, the first block to be invalid is discarded and the peers that follow this chain disconnected. The best chaintip from that point on is found instead is found by querying the remaining (rule-compliant) peers. Finally, the node will discover the valid chain with the most accumulated difficulty.

Each release of Bitcoin Core sets a default value for the assumevalid parameter to a block that recently preceded the release. When synchronizing up to that block, nodes using assumevalid will assume that the history up to that block is valid. They will still calculate all the UTXO set transitions and check difficulty everywhere, but will not check signatures on transactions up to that block.


Is my wallet effected by the Meltdown and Spectre vulnerabtilies? Recently two new vulnerabilities, Meltdown and Spectre were published which lets someone read more memory than they are supposed to be able to. How does this effect my wallets and what can I do to secure my Bitcoin?

If you use a modern computer (i.e. one that has a processor that came out in at least the past 10 years), you are effected by the Meltdown and Spectre vulnerabilities. In fact, even if you use an older computer, you may still be effected as it is theorized that Intel CPUs dating back to 1995 may still be vulnerable. However CPUs that old were not tested. Meltdown primarily effects Intel CPUs while Spectre affects a wide range of CPUs, including Intel, AMD (including Ryzen), and ARM (used in smartphones) processors.

Meltdown

All wallet software are effected by the Meltdown vulnerability. Meltdown allows a malicious software to read any bit of memory that it knows the location of. It is capable of dumping the entire contents of the physical RAM in your computer. This means that any wallet which is currently running and has private keys loaded into memory is at risk of having the private keys stolen. Wallet encryption does not help here as the private keys will need to be unencrypted in memory in order for you to be able to sign transactions. Thus any malware exploiting Meltdown will be able to read those private keys.

Mitigations

Meltdown requires that code exploiting the vulnerability be run on your machine, so the usual explanations of due dilligence and avoiding malware apply. However it may be possible for the attack to be performed through malicious JavaScript that is loaded from a webpage. Thus, as usual, you should avoid visiting suspicious websites and disabling JavaScript entirely would not be a bad idea.

Furthermore, there are operating system upgrades that can mitigate Meltdown and make exploiting the attack almost useless. There are also browser changes planned that will make it much more difficult for JavaScript code to retrieve data from your computer's memory. You should expect to see these patches coming out soon for your browsers and operating systems if they are not already available.

Lastly, Meltdown appears to only effect Intel CPUs, so if you have an AMD CPU, you shouldn't be effected by this vulnerability

Spectre

Spectre is more limited in scope than Meltdown is and targets specific processes. It also requires that specific knowledge of the software that is being attacked which does make the attack much harder to pull off. Spectre effects every piece of software which receives an input from somewhere, so all wallet software will be vulnerable.

Furthermore, the Spectre example attacks have been focused primarily on Virtual Machines and browsers. It allows for malicious applications to break out of the sandboxing that VMs and browsers provide. This is particularly bad for web wallets as malicious JavaScript executed in your browser can result in your private keys (which are held in the browser's memory) to be leaked to the attacker.

Mitigations

Spectre effects a wide range of CPUs and it has no known software patches.  It effects all modern Intel, AMD, and some ARM CPUs. This means that both computers and smartphones are vulnerable. Some variants may be mitigated but other variants may still be exploitable. As usual, you should avoid visiting suspicious websites and downloading suspicious files to your computer. The usual due diligence applies.

Since JavaScript can exploit Spectre, patches will become available from browser vendors to reduce the effectiveness of using JavaScript to exploit Spectre. There will also be other operating system and other software updates which will reduce the effectiveness of Spectre. Unfortunately it cannot go away entirely unless hardware is upgraded. As usual, you should ensure that all of your software is up to date in order to avoid the exploitation of these vulnerabilities.

Patching the vulnerabilities

Unfortunately there are no known ways to patch the vulnerabilities entirely through software. The current proposals are stop-gap measures which only reduce their effectiveness but also at the cost of performance. Because these vulnerabilities are based in the CPU hardware, the only way that they can be patched is through new hardware that is not vulnerable. It is not known whether a microcode update (aka the CPU firmware) will fix the vulnerabilities or not.

Keeping your coins safe

The only way to ensure that you are not effected by these vulnerabilities is to use hardware that is effected by the vulnerabilities or use hardware where even if they are effected, the data cannot leave the device. There are really only two options for this: use a hardware wallet, or use an offline computer solely for your wallet.

Hardware wallets

Hardware wallets do not have these vulnerabilities because they use processors that are not vulnerable. The processors do not feature Out-of-Order-Execution which is what both Meltdown and Spectre exploit in order to read data. Furthermore, even if they were vulnerable, software that runs on the hardware wallet must either be flashed as new firmware or be manually installed by the user. This makes it much more difficult (basically impossible to do without the user noticing) to get malicious software onto the device that could exploit these vulnerabilities. But as said earlier, they are not vulnerable so such software would be useless.

Hardware wallets also do not transmit any secret information (i.e. private keys) to the computer so the private keys are never exposed and thus cannot be stolen.

Offline cold storage devices

Offline cold storage devices that are not hardware wallets typically consist of older, low powered general purpose computers. Such computers are likely to be vulnerable to Meltdown and Spectre. But because they are offline, it is much more difficult for a piece of malware to both get onto the machine and get data off of it.

Although it is harder to infect and exfiltrate data from offline devices, sophisticated malware does exist and can do so. They do so by hiding on the USB drives that are typically used in such setups. By hiding on a USB drive, the malware can go from an infected online computer to the offline computer, infect the offline computer, and transmit data from the infected offline computer to the infected online computer via the USB drive. This would allow an attacker to steal private information (which may be read by exploiting Meltdown or Spectre) from an offline cold storage device.

The only secure way to send data between an offline device and an online device would be something which allows you to inspect the data before it reaches the online machine. Unfortunately this is rather difficult to do.

Conclusion

Meltdown and Spectre are two vulnerabilities that are based in the hardware and are difficult to fix through software patches. They have the potential to leak private keys and other secret information from a computer to an attacker whilst leaving little to no trace of it ever happening. The vulnerabilities effect all software wallets (including web wallets) which run on a computer or smartphone. The only way to secure your coins is to have the private keys stored on a device which cannot leak the private keys without the user noticed. It is thus my recommendation that you use a hardware wallet.


Why does bitstamp have two addresses for Ripple? The bitstamp address "to trust" is rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B, however when you withdraw money, it you get it from rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1 instead. Why?

With weexchange I got the money from the same address I trusted.

They use hot and cold wallets for security reasons. The address you trust can create an infinite number of IOUs and so its key must be carefully secured. The address they transferred to you from must be able to perform transactions easily and quickly and so cannot be fully secured.


For a transaction with a single input and output, is there a difference between SIGHASH_ALL and SIGHASH_SINGLE|SIGHASH_ANYONECANPAY I have an signing implementation that already works for SIGHASH_ALL, and I'm trying to also support SIGHASH_SINGLE|SIGHASH_ANYONECANPAY.

I'm referencing https://en.bitcoin.it/wiki/OP_CHECKSIG for the behaviors of different SIGHASH types. From my reading, I assumed that there should be no difference between SIGHASH_ALL and SIGHASH_SINGLE|SIGHASH_ANYONECANPAY (aside from the hashtype appended to the end of the transaction being hashed) if the transaction involved only has one input and one output, but from my testing using other tools this does not seem to be the case.

Am I wrong with my interpretation? What modifications would the signing need if it's SIGHASH_SINGLE|SIGHASH_ANYONECANPAY instead of SIGHASH_ALL, assuming there's only a single input and output?

A one input/one output tx signed with SIGHASH_SINGLE|SIGHASH_ANYONECANPAY can still be modified to include more inputs and outputs, as long as the original input and output are not modified.

A tx signed with SIGHASH_ALL cannot be modified at all, and no new inputs or outputs can be added.


BitMinter gpu mining error I have recently gotten BitMinter on Linux, and was hoping to try GPU mining. However, as soon as BitMinter starts, it gives the following messages:

BitMinter Client v1.6.1 started
No OpenCl-compatible GPUs detected
Probing all ports for external devices
Probe failed: No serial ports found
No external devices detected.

If I then click the play button to run, it tells me:

Error: null
scala.runtime.NonLocalReturnControl$mcV$sp

As well, the engine start button is not showing now, however the previous issues existed before this

You have no ASICs and no OpenCL-compatible GPU. Note that noone mines on GPU anymore anyway, it's completely useless.

Buy an ASIC miner, 1 TH/s (1000 GH/s) or faster. It will be a stand-alone machine, and you don't need to use your PC at all.


Being paid in Bitcoin from another country If I sold property in another country, could I be paid in bitcoin in a basic wallet to wallet transaction if the value is 500k+?

Sure, as long as it's a legal transaction in your country.


How to make data inside blockchain immutable I want to do simple blockchain implementation on golang, i have mongodb database with user info (Name, cardID, etc.) i want to store several information inside blockchain, and to put it inside another database BoltDB. But idk how to make this data immutable I mean how to make changes visible, for example I insert one user with (Name: Jhon, CardId: '777845') inside blockchain and after some time another guy will change this User's fileds (Name: 'Jhon', CardId: '1111'), and inside my blockchain it still will be (Name: Jhon, CardId: '777845')

A blockchain is not intrinsically immutable. What prevents malicious people propagating altered data in the blockchain is that all nodes validate received blocks.

In particular they check the checksums and they check the signatures match the public keys. They check the references (hashes of prior blocks) and they examine the length of competing branches to decide which blocks to trust.

The integrity depends on there being a large number of nodes with no central trusted authority and with no one person or organisation controlling a majority of the computing power.

If you only have a handful of nodes, the blockchain may not be inherently trustworthy.


Finding IP addresses of all bitcoin miners I understand that the transactions don't have any IP info in them but I am curious to know if it is possible to enumerate over list of all the IP addresses involved in mining?

No, it is not possible. IP addresses are not part of the Bitcoin blockchain in any way whatsoever so this data is simply unavailable.


Why don't bitcoin nodes invalidate new blockchains that don't contain all the data of the old blockchain? If nodes only accepted new valid blockchains that contained all the data of the old blockchain, then miners will still be able to add blocks to the current blockchain because their blockchain will contain all the data of the old blockchain and the additional data of the new block.
However, double spending will become virtually impossible because if a malicious miner rewrote the blockchain and completed the proof-of-work so they can double-spend, they will be unsuccessful because nodes will only accept blockchains that contain all the data of the old blockchain. A blockchain with a double spend in it will not contain all the data of the old blockchain as it will not contain the double-spenders transaction, so why was this not programmed into the bitcoin protocol?

The problem with this proposal is that it relies on data that is external to the blockchain (namely, data that is in another branch of the chain).
The validity of a block should be a function only of its contents, and the contents of anything the block commits to through hashes. Specifically, that includes all ancestors of the block, as the block header contains the hash of the parent block, and so on. This means that nodes can independently determine validity, without needing assumptions about what data is available to whom.
More concretely, your proposal has the following problem: there is no "initial" chain, and "replacement" chain. Some nodes will see one first, and others will see the other first. This happens normally, when a single-block fork appears due to two blocks at the same height being found approximately simultaneously. It also happens during initial synchronization with the network: a node could be connected to an attacker who provides a rewritten chain first, and only later connects to an honest node that gives the "real" chain.
In both these cases, the rules must be so that eventually all nodes agree on which chain is the real one, or at least the probability for disagreements to remain should decrease over time.
If you require that a replacement chain contains all transactions the original chain has, then nodes who saw "the other" chain first will always reject the real one, as from their perspective, it is the real chain that is trying to replace the chain they already had.
And as forks occur naturally, this would be a disaster: if two blocks are created at the same height, with different transactions (as there cannot be any guarantee that two miners in different geographical locations have identical mempools; this is simply a result of the finite speed of light), nodes that see block A first will reject B as an invalid replacement, and nodes that see block B first will reject A as an invalid replacement. The result would simply mean that any network fork becomes permanent, and the network no longer converges.


How does the Blockchain detect a cheater, who manipulates the blockchain? Let's assume we have 100 blocks. One miner x has the intention to manipulate block 90. So he has to recalculate the hash for block 90. Following he also has to recalculate the hashes for block 91-100.
Correct me, if I'm talking non-sense here.

So how do all the other miners figure out that miner x is cheating? And what happens to miner x, if he gets caught?

What you are describing is a textbook example of a 51% attack. Bitcoin protocol is designed to accept the chain that has the most proof of work (most often this is same as the longest chain). If a miner needs to change block 90, he will have to recalculate hashes starting from block 90-100. To make his attack successful, the miner will have to mine blocks faster than the rest of the network so that he can broadcast the longest chain which then gets accepted by the network. So, probabilistically this would mean the miner should be in control of >50% of the total hashing power, so that he can mine blocks faster than rest of the network combined.


blockchain transactions dump file I am looking for hourly, daily, weekly, monthly and yearly blockchain transactions dump in csv or other formats. Any pointers would be really appreciated.


How to recover Bitcoin mistakenly sent to a bch address A few days ago I could not open my btc.com wallet so I went to Google play and downloaded a bch wallet after the search for Bitcoin showed me this. So naturally I thought this to be a btc wallet. It gave me a receive address that I gave to CoinMama for a purchase of Bitcoin. The funds didn't show up in my wallet. How do I access these funds now?

bch and btc use the same type addresses. try importing the private key into the wallet


How often do double spends happen successfully? Judging from this list, not very often:

https://blockchain.info/double-spends

Why is this the case? I would have guessed they would have been more frequent.

Is it OK to always accept (small-to-medium) transactions as valid then?

The wiki explains it better than I can:

But the short answer is that's the reason most participants wait for at least 6 confirmations before accepting a transaction as valid.  The likelihood of hash collisions or other potential attacks having any success going undetected drops with each confirmation, and 6 confirmations is usually chosen as an "overkill" number.

To answer your question from the post title, though, refer to this question's answers:

Has there ever been a successful double spend attack on the Bitcoin network? If not, is it really necessary to wait for confirmations?

If what they say is correct, it seems we really don't know if and when (or how often) any double-spends have actually been successful.


Can you make altcoin vanity addresses out of those of Bitcoin? I generated a Bitcoin vanity address having a string “TEST” in it.

> vanitygen -v -1 -F pubkey -C BTC 1TEST
Generating BTC Address
Prefix difficulty:            264104224 1TEST
Difficulty: 264104224
Using 16 worker thread(s)
BTC Pattern: 1TEST
Pubkey (hex): 0488ee6eb5f11979685086810a148f3cc25573e6b86572e8e79fc22ec7d9dc9d561e490b7f61d438eef870343e524d1f44518ed3cc86922b2ba3cff74e69e6c7b3
Privkey (hex): F0EFC073E94C15DFAF10660005B5DF0E9654636A7A9E97738524C0896092D871
BTC Address: 1TESTUYn69qjvxwmHAXWCdDL7vRDJxAo8
BTC Privkey: 5KePyu3mmr9TJxmFsqGxDR1kS8W28PKgfs4SCALi2Yf5D4UFyF8
[2.54 Mkey/s][total 184456984][Prob 7.4%][50% in 1.1min][Found 1/1]

I want to make such ones for other coins, too. If I could make altcoin vanity addresses of the same key pair preserving the “TEST,” that would save some computational resources for me.

Some altcoins seem to have similar address generation steps with Bitcoin, but not sure if there’re any cases where this idea works.

Are there any? If so, which coins, for example? If never, why is it?

I want to make such ones for other coins, too. If I could make altcoin vanity addresses of the same key pair preserving the “TEST,” that would save some computational resources for me.

This would work for other coins with the exact same address alphabet as Bitcoin (which is most bitcoin clones), and the exact same version byte.

Addresses in bitcoin are derived by:

Taking the payload (which is the HASH160 of the pubkey or redeem script for p2pkh and p2sh addresses) and concatenate it with the version byte (0x00 for p2pkh, 0x05 for p2sh)
Sha256d(step 1) to get a hash of the payload and, taking the first four bytes as a checksum
Base 58 encoding the results of 1 and 2

While this is a simplified explanation (more details can be found here), it is immediately obvious that attempting to change the version byte will result in a different value for the checksum, which will lead to a completely different base58 encoding. Therefore, if your altcoin does not use the exact same version bytes for the same address type, it will not be able to encode the same vanity phrase for a given key.

Moreover, coins which don't follow Bitcoin's address schemes will also encode differently - for example, Ethereum takes the keccak256 hash of the pubkey, and selects the last 20 bytes as the address - this is also going to lead to a total loss of the vanity phrase (especially since the alphabet is now just 0-9A-F, so TEST is never possible in anycase).


Fees from portals like coinbase or bitestamp to Bank/Credit Card there is something not really clear to me in the buy/sell process.

When I sell bitcoin on sites like coinbase I am requested to pay a 1% fee. What about the fees to transfer the money back to my bank account (or Credit Card)? Are they included in the 1%?

Thank you

Coinbase has a separate bank fee (currently $0.15) in addition to their transaction fee.


What is the most reliable way to calculate the amount of fiat value that has been transferred into the bitcoin economy? I would like to know what are the most sophisticated ways to estimate the amount of bitcoin that has been bought globally with various fiat currencies. Exchange data is only one source, and may well cover a large percentage of value that has been transferred but I can't help thinking there must be a lot of "off exchange" trades going on which may well account for a lot of value. I would also consider fiat money spent on mining investments including implied energy costs as a transfer of value.

I'm wondering what is the opinion of the community on the best way to measure how quickly fiat value is being transferred into bitcoin?

To put it another way, what is the shared "stake" in bitcoin?

I'm pretty sure you'll never get an accurate number. I'm not even clear what you mean by transferred into the bitcoin economy.

If I bought $100 worth of bitcoins 3 years ago, do we count that as $100 or the value of the BTC now?
If I buy a bitcoin for $100 cash (using localbitcoins), send it to my friend (who immediately converts it to $100 USD), how do we account for that? If I do that transfer millions of times, can we say that BTC has "Millions in cash invested" even though there was only ever $100 at a time?

Your best bet is to just add up the aggregate transfers on all the exchanges, and call that "GDP" (and you may never be able to account for non-public transactions like localbitcoin or private exchanges). Just like GDP, you will necessarily over-count what's really happening. (For example, my transaction "I buy shoes" is actually counted as "I buy shoes, the shoe seller buys the shoes, the shoe maker buys leather, the leather maker buys a cow, the farmer buys cow food, etc."


How does peer banning work for onion peers? If I start bitcoind with settings proxy=127.0.0.1:9050 to talk to the Tor daemon's SOCKS5 proxy, turn on listenonion=1 and set onlynet=onion, my understanding is that bitcoind will coordinate with the Tor daemon to find a randomized onion public key/identifier and begin operating with other .onion peers.

However, what is stopping a Tor-connected onion node from behaving badly in a way that would 'normally' get the IPV4/V6 address banned had it been doing the same thing via that connection type?

It seems to me like a malicious node could just re-randomize the credentials on Tor to evade any ban. Does this mean that Tor nodes are less robust than the IPV4/V6 and more susceptible to DDoS and other attacks? or has this been accounted for somehow?

An explanation would be helpful. Thank you!

There's no handling of this really. The incoming connection just appears to be from localhost, bitcoind has absolutely no way of even identifying what circuit they came from. Banning them becomes a nothing or everything affair. It would be extremely unwise to act in the way that you have defined, especially given that at this time there are less than 50 connectable peers, and there's no guarantee they aren't all run by the same operator.

Realistically Bitcoin has very little defense against any meaningful denial of service attacks. It is very vulnerable to volumetric, protocol level (especially prior to the removal of BIP37), and resource exhaustion attacks by even a relatively unfunded attacker, regardless of the network being used as a transport.


Where to find the sighash type? Where can I find the sighash type specified in a script?
Is it included in the scriptsig?

Yes, it's generally part of the scriptSig.

More specifically, it's part of the signature pushed by the script.

Most specifically, it's the last byte of the signature.


Would a reduced block generation time make the Finney attack more difficult? Related Question:
  What can be done to mitigate the risk of a Finney attack?

The Finney attack is a form of double-spending attack where the attacker pre-mines a block containing a conflicting transaction and then publishes a transaction. A merchant relies on the published transaction to do something irreversible. The attacker then succeeds if he can publish the pre-mined block after the merchant has committed and before the network can find a different block. (The merchant must act irrevocably on a published, but unconfirmed, transaction.)

It has been suggested (by David Perry) that reducing the block generation time will make the network more resistant to this kind of attack. The reasoning is (I assume) that the window in which the attacker can launch the attack, the time after he publishes the transaction and before that transaction gets into a block, would be smaller. However, I don't find this argument convincing.

First, the attacker can stretch the interval by creating a burst of meaningless transactions using older coins or with small transaction fees. He can gather lots of new inputs into his transaction to reduce its priority. Thus, he can make it very unlikely that his published transaction will get in the next block found by the network anyway.

Second, with a faster block generation time, the difficulty will be lower. The attacker has to wait until he's lucky anyway. So maybe he can just wait until he mines two blocks ahead of the network. Then while it's more likely the network will find a block before he can complete his attack, the network has to find two blocks, not just one. And meanwhile, he can keep looking for even more blocks. (Imagine he is conspiring with a mining pool that has, say, 30% of the network's hashing power.)

So what is the correct analysis? Would a faster block generation time really make any difference to the effectiveness of Finney attacks?

Assuming all else is equal (same network hashrate, etc) then the attacker still represents the same percentage of the overall hashrate and therefore may claim the same percent of the blocks for his/her attack. While it's true that faster block time increases the total number of blocks, reduces the difficulty and makes it so that the attacker has more opportunities to land an attack with the same hashrate it also lowers the detection time for such an attack and narrows the window.

In the standard Bitcoin network, a block is found roughly every 10 minutes, but realistically they are found along normal distributions with their peaks at 10 minute intervals. A block may be found immediately after another block or it may take 20 minutes to find the next block, but these are not typical cases. I don't have data to show what one standard deviation from the 10 minute mark would be, but I can say that if block time were reduced such that the region of +/- 1 standard deviation overlapped slightly, an attacker would face a statistically significant risk of a block being found before he or she could execute the Finney attack. I have no idea what other effects this might have on the network, and it would require significant testing to confirm its feasibility.

Even if the +/- 1 SD region did not overlap, the distance between their boundaries is effectively the period of time an attacker has to execute an attack, so anything which narrows this gap reduces the effectiveness of a Finney attack.

The active question which I've still not found an answer to, is this: Does the value of σ² for the distribution of block finds change along with average block time or is it somewhat static? If σ² remains the same then decreasing the block time will drastically effect the ability of an attacker to utilize this method, but if it decreases proportionally to block time then the only effect block time has on such an attack is the added requirement of greater precision in timing.

Edit: I've received confirmation that block generation isn't a normal distribution but rather a Poisson distribution and that the time window for a Finney attack does scale linearly with block time. To this end, reduced block time provides no statistical advantages over normal block time, but it does still require an increase in precision on the part of the attacker. As I've not heard of anyone executing a Finney attack, even as a proof-of-concept it's questionable how much the precision requirement would help in preventing attacks, though the effectiveness of such is probably more dependent on the merchant/business model than on the network itself.


Where can I look to see a revealed public key? I've read that pub keys aren't exposed until they're spent from.  Can someone show me an example of a transaction prior to the pub key being exposed and then after?  Where do i look?

Just go to any typical, normal transaction on blockexplorer. Here's a link to one I picked at random. The input(s) are scripts where the public key and signature are provided to claim the outputs of previous transactions in the ScriptSig field. The output(s) are scripts where the public key has not yet been provided and contain only a hash of the public key in the ScriptPubKey field.


Finding paths NOT originating from you with lnd I'm interested in finding paths from senders whose node you don't run to potential receivers. According to https://api.lightning.community/?python#queryroutes , you can do that by specifying the parameter source_pub_key to be any public key you wish and not just yours. In reality, this does not work as the querryroutes command does not support any other parameters than:

OPTIONS:

dest value: the 33-byte hex-encoded public key for the payment destination

amt value: the amount to send expressed in satoshis

fee_limit value: maximum fee allowed in satoshis when sending the payment

fee_limit_percent value: percentage of the payment’s amount used as the maximum fee allowed when sending the payment

final_cltv_delta value: number of blocks the last hop has to reveal the preimage

use_mc: use mission control probabilities

Does anyone know if there used to be a possibility of adding source_pub_key and it was removed or it never existed in the first place? More importantly, is there a way to construct paths from a source to a destination, when you don't actually run the node of the source and you don't care about actually forwarding payments and packets but rather just constructing paths according to the shortest paths algorithm of lnd.

I don't know if that possibility ever existed as an api call 8n lnd. but you can certainly call the describegraph api call to get all nodes and channels that are publically known. This json blob can easily be imported with a few lines of code as a graph in any graph library such as neo4j  or networkx once the network is there you can run any pathfinding algorithm from any source to any destination. Note that due to routing fees the shortest paths should be searched from destination to sender as the feerate is dynamic and depends on the fees that will have to be paid by future nodes and not only on the payment amount


What is the worst an attacker could do with full control over the blockchain? Let's assume somebody gains control over 100% of the hashing power and is now free to mine and control as many new blocks as he wants. What would happen?

The attacker still could not include any fake transactions into his blocks, because other nodes could easily detect that the transaction wasn't signed by the wallet owner.

The attacker could include some double spends from his own wallets, but again, this could easily be detected.

So, the other nodes would simply ignore his blocks as invalid. Maybe they would crash and require a fork, or they would recover and wait for the next valid block to be mined and broadcast.

It seems to me that there isn't really anything to gain from controlling the hashing power. Am I msising something?

You're correct that a miner with 100% control could not forge transactions, the nodes would just ignore them. They could perform a '51% attack' though, trading coins for another asset (confirmed in 'block x'), and then going back to re-mine a new 'block x' that does not include their transaction (so now they control the asset they traded for, and have their coins back. The network could catch on to this, but nothing 'invalid' will have happened).

A miner can censor transactions though, so they could just mine empty blocks endlessly, effectively stalling out the network.

Perhaps more profitably, they could set a very high minimum fee for a tx to be mined, essentially using their monopoly to extort users for higher fees. This could be done covertly so as not to raise suspicion: the miner could generate their own high-fee transactions to fill up a portion of the block, forcing other users to pay higher, or be excluded. The miner would receive 100% of their fees back since they control 100% of the hash power, but it would be tough to tell this is happening from the outside.


Is there a way to verify how many Liquid Bitcoins are in existence? Is there a way to recognize peginaddresses where bitcoins are locked up for use on the Liquid sidechain, and therefore a way to sum up the total bitcoins currently circulating on Liquid?

You can easily verify the liquid circulation, in fact any liquid node can do this in realtime as part of its operation if you run a Bitcoin node along side it.

Pegins can't, however, be reconized until after they're claimed on the sidechain.  Before then the addresses are cryptographically indistinguishable from other similar multisig transactions on Bitcoin. But when they are released into the sidechain the party that generated the address publishes the information needed for everyone to find them.

https://liquid.horse/ is a website that runs a liquid node and reports this sort of data.


Do USA-based miners need to register with FinCEN? As seen in recent news, FinCEN has issued a statement on its classification of virtual currencies: http://www.fincen.gov/statutes_regs/guidance/html/FIN-2013-G001.html

Hypothetically suppose I mine BTC and sell it on MtGox for USD. Do I need to register with FinCEN as a Money Transmitter(MT)? My interpretation of the above document indicates yes, I do; but I could also see MtGox (which is registered with FinCEN) maintaining my regulatory compliance, via proxy.

No, the fincen guidance you posted has it in plain english that you do not. A miner is simply a user.

 c. De-Centralized Virtual Currencies

        A final type of convertible virtual currency activity involves a
de-centralized convertible virtual currency (1) that has no central
repository and no single administrator, and (2) that persons may obtain
by their own computing or manufacturing effort.

        A person that creates units of this convertible virtual currency and
uses it to purchase real or virtual goods and services is a user of the
convertible virtual currency and not subject to regulation as a money transmitter.
By contrast, a person that creates units of convertible virtual currency and sells
those units to another person for real currency or its equivalent is
engaged in transmission to another location and is a money transmitter....

On the exchange you are buying/selling bitcoins. The exchange carries the burden of giving you legal tender or a different cryptocurrency. The exchange carries the burden of regulation, according to the FinCen regulations. In the US, the equivalent of real currency is only treasury bonds.

Also, Fincen regulations only take affect at certain dollar amounts, if you feel you need to be concerned about them.

You can also try to get even further clarification from the Treasury yourself, because on this matter it doesn't matter what kind of legal counsel you ask, nobody knows all the semantics until an issue comes up that is actually decided in the courts.


What's a good way to receive donations? We're a Foundation with board members across various countries. We have some difficulty setting up a bank account. It's definitely easier to create a Bitcoin wallet, but we want more than that.

Here are some conditions:

We want to keep track and control funds without too much overhead.
We want unique addresses for each donation, so a e.g. multisig electrum wallet wouldn't be ideal.
We don't mind relying on a 3rd party service.
We don't have a bank account yet (so BitPay might not work for us).

What would be a good solution for us?

Coinbase.com has merchant tools that allow non-profits et al. to accept donations.


Which Bitcoin thin client that can execute on restricted IoT devices? I am trying to find a suitable Bitcoin thin client for IoT devices with Linux OSs. IoT devices will act as peers as thin clients, and the selection criteria for the thin client is least CPU, memory and storage requirements. Which Bitcoin thin client protocol would be the best choice for such system?

you could use a SVP  Client/wallet like discussed here : What is an SPV client?

IOT is a wide space, you could specify the technical features of your IOT to get the right help, a raspberry pi for example could be considered as an IOT and it could host a full or a light node.


What are multi-signature transactions? What are multi-signature transactions, and why might they be used?

Also see:

How does one make multisignature transactions with the bitcoin client?
How can I create a multi signature 2-of-3 transaction?

A multi-signature address is an address that is associated with more than one ECDSA private key. The simplest type is an m-of-n address - it is associated with n private keys, and sending bitcoins from this address requires signatures from at least m keys. A multi-signature transaction is one that sends funds from a multi-signature address.

The primary use case is to greatly increase the difficulty of stealing the coins. With a 2-of-2 address, you can keep the two keys on separate machines, and then theft will require compromising both, which is very difficult - especially if the machines are as different as possible (e.g., one pc and one dedicated device, or two hosted machines with a different host and OS).

It can also be used for redundancy to protect against loss - with a 2-of-3 address, not only does theft require obtaining 2 different keys, but you can still use the coins if you forget any single key. This allows for more flexible options than just backups.

It can also be used for more advanced scenarios such as an address shared by multiple people, where a majority vote is required to use the funds.

Multi-signature transactions are often conflated with BIP 16 and 17. In fact they are not directly related. Multi-signature transactions have been supported by the protocol for a long time; but implementing them would require a special output script.

What BIP 16/17 do is offer a standard way to encapsulate a script within an address; this makes it easier to use advanced scripts, with the most prominent example being multi-signature transactions.


What drives the price of bitcoin, in other words, what makes it go up or down? I am interested in knowing what kind of events and news have a direct impact on the bitcoin prices besides the raw supply and demand.

"The price" is established through supply and demand, by definition.

Speculators might temporarily skew supply or demand after reading some news or predicting/anticipating some event. Or simply by rumours and herd mentality (more often than not).

What those speculators react to you'd have to ask them and doesn't sound like an on topic question here. It's not related to Bitcoin anyway, as it's the same for any other market.

One likely upcoming drop in supply is coming around 2016-07-26 when the block reward is going to halve again.


Transfer bitcoins from an address to another I want to transfer the bitcoins I have from one address to another one, however I can't acces the account but I only know the address. I made this once but I forgot how, it was some sort of program which I selected from what address I wanted to transfer the bitcoins and it was done easily. I tried some programs now and I can't do that anymore. It was something like "add bitcoins" and I just typed the address from which I had bitcoins on and the bitcoins transfered automatically.

It sounds like you used a Bitcoin wallet to move money before. You need to know more about the account than just the address, in order to move the money out of that address. With the address, you can look at how much money the address has, and add more money to it, but you can't take money out.

If you had the private key, which should be kept by the Bitcoin wallet, or written down somewhere, you could spend this. A private key looks like 5SD8ak... .

Unfortunately, I don't know which program you used, so I can't tell you anything more specific. I can point you to this list of Bitcoin wallets. Maybe you used one from there.


I mistakely pasted my own blockchain recieving address in the send slot I mistakely pasted my own blocchain receiving address in my Send slot to send BTC to friend.  I usually recieve a Either send or recieve responds in my record, but this time I got a TRANSFERRED respond.  Even it was my own receiving address and took 100 confirmation blockhain never returned those BTC back to my own wallet.  You think that even if I used my own receiving address will i get back those BTC?
Thanks,
Albert

You wont get the transaction fee back.

As you did make a new transaction which requires a miner fee.