C++ source code for bitcoin miner software? Does anyone know where to get the C++ source code of one workable bitcoin miner?

Two popular Bitcoin miners, BFGMiner and CGMiner are open source and written in C++. The source code repositories for both are linked.


Sending regtest Bitcoin fails with an error message. How do I resolve this error? When I try to send regtest Bitcoin using bitcoin-cli:
./bitcoin-cli -regtest sendtoaddress bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl 0.1

I get the error message:
error code: -6
error message:
Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.

How do I resolve this so I can send regtest Bitcoin?

You could enable -fallbackfee as it says in the error message but the easiest or quickest way to resolve this is to set a fee. In this example we are setting a fee of 1 satoshis per byte.
./bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "" "" false true 1 sat/B

If you do
./bitcoin-cli -regtest help sendtoaddress

you will see what those arguments after the regtest address represent.
Alternatively if you want to set the fallback fee see this StackExchange question.
This PR 16524 merged in October 2019 disabled -fallbackfee across all chains (mainnet, testnet, regtest) by default.


How does crypto exchange secure private keys? I'm wondering on what is the current common apporach that is used by centralized crypto exchange to secure the private keys of the bitcoin wallets

Exchanges typically have a split storage setup. They have a hot wallet and a cold wallet. The hot wallet holds private keys on an online server that can quickly send and receive Bitcoin for when people deposit and withdraw Bitcoin to the exchange. The hot wallet usually contains a small amount of Bitcoin, whatever the exchange operator things will be necessary in typical usage.

The majority of an exchange's coins will be held in a cold wallet. The cold wallet is a machine that is not connected to the Internet and holds the cold wallet private keys. Typically exchanges will send funds from the hot wallet to the cold wallet when the hot wallet has too many coins and send from the cold wallet to the hot wallet when the hot wallet does not have enough coins.

Note that the private keys may not actually be held on general purpose servers. The private keys may be contained in Hardware Security Modules which are connected to the servers. These HSMs are designed to store private keys and hold them securely. So while they are connected to online machines, the private keys are unlikely to be leaked even if the server is compromised.


If SHA256 were compromised tomorrow, would Bitcoin collapse, or is there some contingency plan to move the network to a new hashing algorithm? Hashing algorithms have a long history of becoming widespread and then declared insecure - MD5 is a good example. As Bitcoin increases ever more in popularity, and cryptanalysis becomes ever more sophisticated, there's sure to be a lot of interest in finding holes in SHA256.

Should this happen in, say, the next 10 years, will the network be ruined? Or is there a way that the network would be able to adjust, i.e. by slowly phasing in a new type of block and phasing out SHA256?

As Meni mentions, there are ways to change the hashing algorithm used for Bitcoin. For this change to be made, all clients would have to be updated and the blockchain would look very weird as it would still contain all historic data that used SHA256.

However, when some party from one day to the other can manually create collisions, as I think you suggest with "compromised", they will only be able to send bitcoins from all existing addresses if also RIPEMD-160 and ECDSA will be compromised. These three algorithms are used to create the address from a private key.

SHA256 has more significance in mining. But still, I think the ability to manually create SHA256 collisions won't help you much with mining. When mining, you hash a bock that has a certain formatting. This hash must satisfy certain conditions in order to be accepted. So what you would be able to do when you compromised SHA256 is take a valid hash and look for different plaintexts that result in this hash. However, the chance that this plaintext has a valid block format is very low. I'd guess myself it is even smaller than the chance to find a valid block in the regular way of mining.

(Can anyone please verify this conclusion?)

Concerning address generation and generating address collisions, I once read (sorry I forgot where), that it is indeed the plan to change the hashing algorithm if the mining ecosystem evolves to a certain point. Currently searching for hash collisions is far less profitable than mining. But finding a collision can earn you more than one block reward. So what I read was that as soon as collision finding is no longer discouraged enough by being so much less profitable than mining, a change of hashing algorithm will be necessary. This change will probably make address generation harder.


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

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


where is default Bitcoin-Qt data directory? I want to make portable client so I found with start bitcoin-qt.exe -datadir=data

But where is default data dir so I can move it there?

It depends on your operating system.  Read about it here.

Linux

~/.bitcoin/

Mac

~/Library/Application Support/Bitcoin/

Windows

C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)

C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)


Bitoin payment sent and confirmed, but not received I have sent and received a number of payments via the request function without problem. However, when I sent two payments directly from one bitcoin wallet address to another (from a business account to a personal account, public addresses), they are yet to arrive at the target! Is there an extra step I need to complete? I can't see that there is.
Thank you
 D

Transaction IDs
 e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187 /
0e5fcac8b0618eabff747a0dea4cf4ff7dddf4b323e52f3473cd7581a88c425c

UPDATE: Payment/transaction didn't disappear. After looking into this it turns out the PASTED VALUE of e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187 has invisible ASCII characters in here. Looks like a color code or some conversion of the Byte array. The transaction IS valid, but copy/pasting from the question in this topic will result in invisible ASCII.

Example:

Bad: e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187
Clean: e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187

They look the same, but they are not the same. You can test this by putting your cursor just after the final 'e' (4th to last character in string) then hitting the left arrow (be sure to use the "bad" or original example above). You have to hit the left arrow twice between the '2' and 'e'. The cursor is navigating the invisible character.

Here is a C# example of how to find this:

static void Main(string[] args)
        {
            var x = Encoding.Default.GetBytes("e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187");

            foreach (byte item in x)
            {
                Console.Write(item);
            }

            var a = Encoding.UTF8.GetString(x);
            var b = Encoding.ASCII.GetString(x);

            Console.WriteLine(a);
            Console.WriteLine(b);
        }

The result is:

1015749485252495097979953515055101531019797100514952565351515310056505010053101559750501024848995155481005610248535350565410110048506363101495655e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02??e187

e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02??e187

-------------------------END OF UPDATE-----------------------

It LOOKS like somehow the transaction ID is messed up. It's a transaction on the blockchain but at the same time it looks abnormal. All of these show and contain the transaction:

Longhorn.Bullpay.com - https://longhorn.bullpay.com/?gateway=2&data=e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187
BlockCypher.com - https://live.blockcypher.com/btc/tx/e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187/
Blockchain.info - https://www.blockchain.com/btc/tx/e9104412aac5327e5eaad31485335d822d5e7a22f00c370d8f055286ed02e187

However, they "search" function in 2 of them fails to see it as a valid transaction (reported it to both). Was able to get to them by going to the wallet itself and finding the transaction. So while it is being consumed by looking at a raw block, the transaction ID itself is jacked up in some way.

This MAY mean, that your wallet program is also having a hard time seeing that transaction (even though it submitted the transaction to whatever node generated that transaction ID). It does exist and an expert should be able to form and submit a valid transaction to the blockchain using the UTXO's from it.

Without knowing more like what wallet is being used, the functionality of that wallet, in a general sense i would import that address into a more flexible more advanced wallet to see if it picks up the transaction. If it does, spend the UTXO's and stop using whatever wallet resulted in the malformed transaction ID. The node would have provided the transaction ID when it was submitted. So this is dependent on the wallet setup and what node setup the wallet used to cut out the "messed up" aspect.

Beyond that an expert in recovering this type of thing (assuming you still have ownership of it) should have no problem if you have access to the wallet and are willing to provide the information.

Note: This is not an endorsement of any particular recovery service (i listed none) or action you should or should not take. I've listed here some possible options to recover the coins from a wallet program that fails to see a particular transaction.


Bitcoin transaction priority calculation From the Bitcoin wiki page on transaction fees:

  Transaction priority is calculated as a value-weighted sum of input
  age, divided by transaction size in bytes:

  priority = sum(input_value_in_base_units * input_age)/size_in_bytes
  Transactions need to have a priority above 57,600,000 to avoid the
  enforced limit

Can somebody clarify what input_value_in_base_units or input_age is?

input_value_in_base_units is the number of satoshis that the input is worth. One Bitcoin is worth 100,000,000 satoshis.

input_age is how many blocks the input has been present for. An unconfirmed transaction has an age of 0, and one that has 100 confirmations has an age of 100.


Remotely call getinfo from bitcoin server doing a bit of research on what versions of bitcoin client nodes are using, i have a long list of clients connected to the network, i was wondering what is the best way to get the version - is there a way / script where i can connect to the nodes and request the getinfo packet from ?

Thanks

I think your best bet is to run your own node, and then call getpeerinfo on it.  This will give you a list of all the connected peers, including information like the reported version.  You can also use the addnode option to ensure that you attempt to connect to all the nodes in your list.


Can we decouple tx fee from the txs themselves? We know that, in general, miners prefer putting txs with higher fees into blocks. In particular, this is bad for users who do microtransactions as it doesn't make much sense to put a lot of fee if you're only sending a small amount. I've been thinking whether it is possible to overcome this.

Basically, if we somehow find a way to decouple fees from the txs themselves then every tx will look equal to the miners. When this is the case, there's no incentive to prefer one tx over another. I believe this would make the Bitcoin more "fair" to the users.

However, I can't tell whether it is possible to come up with such a protocol while maintaining the properties of the Bitcoin. What I have in my mind is basically as follows:

Users first send some "participation tax" to an adress/adresses
which is collectively maintaned by the miners.
Miners in turn collectively sign a token and send back the token to users.
Users then include this token in their txs to prove their validity. Txs without tokens can be either be discarded or might have less priority.
The total tax sum in the pool is distributed to miners according their fraction of hash power.
The process repeats over time periods.

The key point in here is, every tx with a valid token would look the same for miners. So, there's no reason to choose one over another.
Of course, as it is, it probably has many flaws. For example, a user can pay participation fee and his txs might still not make it to the block. In this case, he basically pays the participation fee for nothing. Maybe we can overcome this with a "decentralized escrow" mechanism (not sure if this even exists) but anyway, this needs to be worked on.

What do you think ? Might such a system help the Bitcoin in a way ?

Bitcoin mining is business. It incurs significant hardware and energy costs. So it's absolutely understandable and legitimate that the commercial miners choose those transactions that give the biggest overall fee. And a 10-Satoshi transaction occupies the same space in the block as a 100-Bitcoin one. It's a bit like in real life: some countries in the Euro region don't circulate 1- or 2-cent coins because their production costs more than their nominal value. And everybody there accepts that a change of 1 or 2 cents is lost.

Your suggestion is implementable within the current bitcoin consensus if you can convince a significant portion of the miners to follow that scheme. Every miner is free to implement his own priority scheme for transactions, not necessarily based only on transaction-internal data.

But I doubt that you'll be able to convince enough miners and users to switch to that scheme. Miners will lose fees, and users will have to pay in advance to get a token that's only accepted by a (small?) portion of the miners.

If you want to help with low-volume transactions, start your own miner with a priority scheme that prefers low-volume transactions. You'll lose money running your mining hardware, but some users will benefit.


How companies are accepting bitcoin for their products or services? I am new to the crypto currency world and fascinated by its growth. I looked at some of the companies that accept bitcoins for their products. companies accepting bitcoin

Lets say i buy an Xbox from Microsoft for x bitcoins. On the date of buying the x bitcoins correspond to z dollars. After few hours, the bitcoin cost reduced from x to y. (The price is volatile right) How Microsoft will handle this situation? They are ready to take the risk? Or they exchange to dollars or any currency as soon as I buy the product in bitcoin?

Many companies will instantly convert bitcoins to fiat upon receiving. This is done by the payment gateways themselves like Bitpay, coinify.

However, these days you see several website keeping the bitcoins without converting them. You can use payment gateways like blockonomics, blockchain.info, coinsimple etc. This is due to several reasons:

Extra fee in converting
Regulations/KYC in accepting fiat
Bitcoins are scarce
Adoption has increased. Employees are taking wages in BTC, and business can buy stuff like airline tickets and other required goods directly using bitcoins

If you hold bitcoins over a long enough period (say 1year+) you will see that the value has always increased https://www.reddit.com/r/Bitcoin/comments/5vuox8/i_dont_mean_to_brag_but_i_bought_bitcoin_at_the/


How big is the Ripple network? The size of the Bitcoin network is available here:

http://bitcoinstatus.rowit.co.uk/

As the page says, they do this by listening for Address messages that are broadcast over the network.

Since the Ripple server is now open-source, we can expect a number of individuals and companies to start running their own nodes. Is there a way to estimate the size of the network, either using an RPC command on the server, or by modifying the server code itself to collect some information about the peers?

I would be interested in the following numbers:

Number of public servers
Number of validators

I imagine the first one could be obtained by querying peers recursively. Unfortunately the RPC interface is only available to 127.0.0.1 by default. As for the second metric, I'm guessing we can get this by looking at the ledger.

I would estimate that there are 30 public servers and 11 validators as I'm typing this answer.

I estimated the number of public servers by connecting to a number of servers and collecting the node keys of every server connected to them. While node keys are free to change, each server has a unique node key while it is connected. This is used to drop duplicate connections. So this should count each public server once.

I estimated the number of validators by collecting the validator public keys of every validation I saw published over a five minute period. I counted the number of unique validation keys.

I can't see any reason these counts could be too high, but they certainly could be missing some.


Does the estimated transaction volume on Blockchain.info exclude exchanges? Does the estimate of transaction volume provided on Blockchain.info exclude the major Bitcoin exchanges? According to this paper: https://siepr.stanford.edu/sites/default/files/publications/17-033_1.pdf
(see pg. 17) it does but I do not see this information written anywhere on blockchain.info's website (or anywhere else).

The paper uses Blockchain.info's estimated transaction volume as input data. This data would not include off-chain transactions, it is only the transactions made public on the blockchain.

Centralized bitcoin exchanges make use of off-chain transactions, to execute trade orders between their users, etc. This off-chain data may be made public by the exchange, but from my skim through this paper it appears that data is outside the scope of the paper.

Quote from page 17 of the paper:

  We rely on Blockchain.info because this site provides an estimate of transaction volume excluding the major Bitcoin exchanges, and we believe their list of addresses associated with Bitcoin exchanges is more complete and accurate than ours. Blockchain.info also makes use of heuristics to remove change.

I'm actually a little confused by this, as it seems to imply that any data relating to a bitcoin exchange's addresses has been excluded, but I see no such mention of that on blockchain.info's website. Whether this is a typo on the authors' part, or the authors misinterpreted the dataset as actually excluding exchange addresses, I am unsure (ie. not just the off-chain tx data is exlcuded, but the on-chain txs to/from the exchanges themselves, as well as internal on-chain txs completed by the exchange).

As the authors mention, the blockchain.info site also removes change addresses from their reporting. I think it is worth mentioning that blockchain.info can only guess at which output is a change address, there is no way to be certain about this measure.


Best way to send Dogecoins and view wallet balance with Python? I want to get a Dogecoin service up that holds, sends, and checks the balances of Dogecoin wallets. I plan on running this service via the Django Web framework so I need Python libraries for dealing with Dogecoin.

I've already found a Python wallet generator for all the top Crypto-currencies:
https://github.com/onenameio/coinkit

now I need to find a way to send money using any public and private key for Dogecoin. I've found this Python library that seems to have the ability to connect to a Dogecoin-Qt:

http://jcsaaddupuy.github.io/dogecoin-python/doc/usage.html

But this documentation is completely leaves out the wallet itself. Right away it tells you to run this line of Python code:

>>> conn = dogecoinrpc.connect_to_local()

But what local dogecoin exactly is this thing connecting to?? Is it connecting to the Dogecoin-Qt app which is already installed on my OS X computer?

So if I enter that line of Python code in the Python shell interpreter, it seems to go through without any problems. And so immediately in the documentation the very next step involves getting the balance already, this is where I'm lost:

>>> print "Your balance is %f" % (conn.getbalance(),)

The guide never got into any specifics of what wallet or key pair we're working with, and so here's how the entire guide pans out:

>>> import dogecoinrpc
>>> conn = dogecoinrpc.connect_to_local()
>>> print "Your balance is %f" % (conn.getbalance(),)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.9-intel/egg/dogecoinrpc/connection.py", line 444, in getbalance
  File "build/bdist.macosx-10.9-intel/egg/dogecoinrpc/proxy.py", line 121, in __call__
  File "build/bdist.macosx-10.9-intel/egg/dogecoinrpc/proxy.py", line 72, in request
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 973, in request
    self._send_request(method, url, body, headers)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1007, in _send_request
    self.endheaders(body)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 969, in endheaders
    self._send_output(message_body)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 829, in _send_output
    self.send(msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 791, in send
    self.connect()

What wallet are we trying to get the balance from in this guide?

Is there a better way to perform Dogecoin transactions via pure Python?

I actually wrote a program that does this for an IRC tipbot.

Essentially you need to do the following:

Start the command-line dogecoin server by doing ./dogecoind -server. I'm not sure if the dogecoind file is available for OS X. See here
Import the library: import dogecoinrpc
Open a connection in your python program: conn = dogecoinrpc.connect_to_local()

Now you can do the following:

Get account balance with conn.getbalance('joe', minconf=4)
Get total balance with conn.getbalance('',minconf=4)

In these examples, minconf=4 tell it it only return the balance that has 4 or more confirmations

Full list of API calls here. I know it says Bitcoin, but the API is the same


Can contracts programmed in bitcoins be used to scam merchants? I've been learning a lot about bitcoin over the past couple of weeks because I have some interesting ideas for websites and I would like to accept bitcoin as payment.

One of my concerns centers around a somewhat more advanced topic that so far I've only skimmed the surface of. And I cannot find an adequate answer to my question online.

I was reading that it is possible to program simple contracts into bitcoins to ensure that the recipient must spend the coin in a specific way, or within a specific time-frame. Here is simplified video that discusses this as a feature but does not go into the security implications of it.

Could this possibly be used to scam merchants, for instance, by returning the bit coin to the sender after a period of time, or to hold the bitcoins hostage? What tools do merchants have available to protect themselves from this type of abuse?

Simple answer, no. What you're most likely talking about are interesting ways to use script to pay to a m-of-n multisig, for example. Generally, when you get paid in bitcoin, you, as the merchant, get to choose where the customer sends the bitcoin. This can be 2-of-3 multisig, which would mean 2 of the 3 people you choose have to agree in order to move the bitcoins or something much more complicated. But the address that the user sends the money to is entirely up to you, the merchant.

A more complex answer is maybe. It is possible if you're using some complicated escrow system that a customer may be able to hold the bitcoins hostage, but that's not something you have to worry about unless you specifically choose that sort of payment system. The vast majority of merchants that take bitcoin don't do business this way, they simply take payment into a standard bitcoin address.


Do Bitcoins still need users to trust each other to feel confident? So we know that bitcoin is secure up to the point of basically proving P=NP. (Its an open question)

So bitcoin is secure. But I feel it still suffers one problem, as with all transactions(not just bitcoin). One person must either send their stake in the barter first or receive the others and be trusted to return the payment if no escrow is involved.

I am paraphrasing and hopefully not destroying the idea, but when I read the bitcoin whitepaper it seemed like it was aimed so that no escrow needs to be involved to transfer funds online.

So no escrow means we all must trust one another if we want to do transactions with one another? Because one person must receive or send the goods first, and must do so on good faith that they will receive the compensation.

I will add Lohoris's comment as an answer, because it really is the answer to the question. Bitcoin does not directly try to address the issue of trust in a transaction.

Therefore, yes, some trust is needed because one party still has to be the first to hand over goods and/or cash. I just read a post on the bitcoin subreddit that relayed a story of getting ripped off after handing over BTC.

Now, Bitcoin does make some aspects that make fraud harder, most specifically a transaction log. If the recipient address is either well known, displayed on an invoice, or recorded in an email, it is trivial to prove that you sent BTC to that address. (Of course if you obfuscate the transaction through a mixer, that removes this benefit.) But, even then, that is just providing tools to law enforcement/court or some other sort of after-transaction dispute process. And, given law enforcement's lack of experience with Bitcoin, and the irreversibility of Bitcoin transactions, if you don't trust the party you are trading with then you may have to engage some sort of escrow service.

Update: Per request, this is the reddit post I mentioned.


Where can I find market volume data with greater resolution than 24hr periods? I have scraper that pulls data from coinmarketcap for all coins for all historic periods (down to 15min intervals) however, the only volume info available is 24hr volume. Does anyone know if it's possible to get 15m/1hr volume data (historic) from coinmarketcap? Failing that, any reasonable approach for converting the 24hr data to 1hr/15m? It would only be a rough estimate, I know. I don't know why they don't provide hourly volume data as well.

You could do your own price comparison.

So if you scrape every 15 minutes. Store that 15 minute price data and create your own percentage based on the history of the data you collected.

If you have the data every 15 minutes you could even do the difference in 15 minutes intervals.

Example:
Price now is $1.00.
Our database says the price 1 hour ago was $1.15
Change of -13% over the past hour.

Again, store all the 15 minute scraping price data in your database and then use that data to make the percent based on whatever time frame you want.


Is Bitcoin anonymous? Bitcoin transaction's anonymity depends on public-private keys. The digital tie between a public and a private key is stronger than the tie between a person and his DNA.
If you committed a crime but the police had your DNA you would hardly consider yourself safe.
Furthermore there is a necessarily public list of transactions involving your public key and therefore connecting you to others by their public key.
To call this anonymous seems a stretch!

Bitcoin is pseudonymous, not anonymous. Sure public keys and private keys are tied and all transactions are public, but unless you have revealed your real identity and connected it to your public key, people do not know who you actually are when you make a transaction.

Furthermore, you can generate as many public-private key pairs as you want and those are not actually tied to your identity.

So with Bitcoin, what you really have are pseudonyms, the public keys. You can have as many pseudonyms as you want and said pseudonyms are not necessarily tied to each other or tied to your real identity. Thus you are pseudonymous, not anonymous.


When do I get paid when mining with eligius? So, i'm trying out mining with a mac and i'm not asking whether mining is possible, my question is is it actually even possible to make a minimal amount of bitcoins. I hear people saying that mining with bitcoin has now become "competitive" and I wonder if that means if we are fighting over who completes a block? I'm using eligius because they are one of the few pools that let people mine with gpu. When will I get paid? Do I need to keep mining for a few hours? Any help will be appreciated. thx. BTW: here is a my console log, is this correct?

[2017-05-24 13:58:39] API running in IP access mode on port 4052

 [2017-05-24 13:58:39] API running in IP access mode on port 4052
 [2017-05-24 13:58:39] Selecting poclbm kernel
 [2017-05-24 13:58:39] Error -30: Clearing output buffer for goffset test kernel (clEnqueueWriteBuffer)

 [2017-05-24 13:58:39] Error -30: Clearing output buffer for goffset test kernel (clEnqueueWriteBuffer)
 [2017-05-24 13:58:39] Initialising kernel poclbm.cl without bitalign, 1 vectors and worksize 256

20s:15.38 avg:39.71 u: 0.00 Mh/s | A:0 R:0+0(none) HW:0/none
20s:24.76 avg:39.65 u: 0.00 Mh/s | A:0 R:0+0(none) HW:0/none
20s:29.70 avg:38.93 u: 0.00 Mh/s | A:0 R:0+0(none) HW:0/none
20s:33.60 avg:39.14 u: 0.00 Mh/s | A:0 R:0+0(none) HW:0/none
20s:35.92 avg:39.23 u: 0.00 Mh/s | A:0 R:0+0(none) HW:0/none
 [2017-05-24 14:00:29] New best share: 2
20s:36.92 avg:39.11 u:71.49 Mh/s | A:0 R:0+0(none) HW:0/none
20s:38.17 avg:39.26 u:91.92 Mh/s | A:0 R:0+0(none) HW:0/none
20s:38.54 avg:39.24 u:80.43 Mh/s | A:0 R:0+0(none) HW:0/none
20s:39.22 avg:39.36 u:71.49 Mh/s | A:0 R:0+0(none) HW:0/none
20s:39.15 avg:39.32 u:64.34 Mh/s | A:0 R:0+0(none) HW:0/none
20s:39.01 avg:39.28 u:58.49 Mh/s | A:0 R:0+0(none) HW:0/none
 [2017-05-24 14:02:33] New best share: 2
20s:39.55 avg:39.37 u:71.49 Mh/s | A:0 R:0+0(none) HW:0/none
20s:39.51 avg:39.38 u:82.48 Mh/s | A:0 R:0+0(none) HW:0/none
20s:38.38 avg:39.18 u:76.60 Mh/s | A:0 R:0+0(none) HW:0/none
20s:35.81 avg:38.68 u:71.49 Mh/s | A:0 R:0+0(none) HW:0/none
20s:36.02 avg:38.54 u:67.02 Mh/s | A:0 R:0+0(none) HW:0/none
20s:36.92 avg:38.53 u:63.08 Mh/s | A:0 R:0+0(none) HW:0/none
20s:37.48 avg:38.52 u:59.57 Mh/s | A:0 R:0+0(none) HW:0/none

You will never get paid, because your miner is too slow to provide useful work to the mining pool.


What happens if I receive a payment after deleting the payment request I just started with Bitcoin using Multibit HD. I clicked request payment and sent the address to someone. I then deleted the request. What happens if bitcoin is sent to this address? Will it just appear in the payments window?

You still own the address, so the payment would be received fine, you would just lose the additional notes you may have added to the payment request.


Is it possible to get rid of mining pools and therefore get a truly decentralized bitcoin? There are some criticism that PoW of bitcoin and ethereum protocol suffers from the centralization of mining pools, and dPos such as EOS claimed to be more decentralized in practice than bitcoin and ethereum even it only has 21 block producers.

My question is, is there any possibility to get rid of large mining pools centralization? Ethereum tried to make the hashing algorithms ASIC hard, but it seems that it doesn't do any better.

There's a group of us working on a new iteration of p2pool based on braids (a DAG-chain) and mining into payment (Lightning) channels.  Like p2pool, each miner would construct his own block, and provide commitments/proof that payouts from the share-chain will be made to the appropriate Lightning channels (probably using "channel factories").  Braids solve incentive problems due to latency, and payment channels allow for small payments to a large number of miners without having those payouts compete for block space. p2pool is all but dead for a number of unfortunate reasons...among them is that it actually punishes latency more harshly than the underlying blockchain, and a widespread (incorrect) perception that people were making less money on p2pool.

To answer your question, yes it's most definitely possible to get rid of centralized mining pools, but there's lots of work to be done.  Such a pool could in principle execute the selfish mining strategy for pool members if it had enough hashpower (without reducing the security of the chain).  This would cause centralized pools to be less profitable than the decentralized pool, and economically encourage everyone to join the decentralized pool.

There's also a concept of pooled-solo mining which as far as I know has never been implemented, though the idea is from 2013.

Join us on irc.freenode.net in the channel #braidpool if you're interested in working on this.


Lost bitcoins - Multibit I have tried to pay an invoice via BitPay, the transaction was stuck at 'seen by one peer' and the BitPay invoice expired.

After closing and reopening multibit a few times, I decided to reset blockchain info as suggested in the multibit faq.

Well, this is what happened:

The transaction to BitPay doesn't even show anymore, but my coins are gone, how do I get them back ?

Exporting the private key, then importing it into a new wallet (still in MultiBit) recovered the missing bitcoins for me.


Bitcoin block hashing algorithm. nonce Referencing the Bitcoin wiki, what is the auhoritative source for providing a hash of the previous block? Or do miners keep listening to latest blocks?

How is hash of the Merkle root generated?

Can a miner generate a block with no transactions? That means generating block by keeping hash Merkle root as all 0s.

One more question:
nonce size is only four bytes (32 bits). Given version, previousBlockHash, hashMerkleRoot, bits are constant, would it not be very easy to iterate through all possible nonces?

2^32 = 4 G = 4 G hash machine can finish this task in one second.

What is the auhoritative source for providing hash of previous block?
  or do miners keep listening to latest blocks?

There's no authoritative source, that's the whole point of Bitcoin. Miners keep listening for latest blocks, yes. They decide for themselves which block to accept. And since all miners (and clients) are programmed to accept only valid blocks (where its header hash is equal or below than the current target) they soon reach consensus upon which blocks are valid.

  One more question: nonce size is only 4 bytes(32 bits). Given version,
  previousBlockHash, hashMerkleRoot, bits are constant, would not it be
  very easy to iterate through all possible nonces? 2^32 = 4 gigs = 4
  gig hash machine can finish this task in one second.

More often than not, just that 4 byte nonce is not enough randomness to find a block. Miners constantly add new transactions - therefore the hashMerkleRoot isn't really constant.

Also I think there's an extranonce field which adds more space.


Who will verify any transaction when the upper bound to total number of bitcoins is reached? I've read that there will be around 21 million BTCs. (How many bitcoins will there eventually be?)

Also, to my beginner understanding, it seems that miners verify the active transactions. (What are bitcoin miners really solving?)

To my understanding this means that if the upper bound of 21 million bitcoins is reached, no new transactions can be made, because noone will verify them. But this would render the already available bitcoins useless... Am I wrong? How?

Please see here https://en.bitcoin.it/wiki/Transaction_fees .

  It is envisioned that over time the cumulative effect of collecting transaction fees will allow somebody creating new blocks to "earn" more bitcoins than will be mined from new bitcoins created by the new block itself. This is also an incentive to keep trying to create new blocks even if the value of the newly created block from the mining activity is zero in the far future.


Is it accurate to refer to Bitcoin as "money"? For example, would it be considered right if I said "I already gave you the money, Bob!" when I gave him Bitcoin?

Money is something that is used as

a medium of exchange
a unit of account
a store of value

in a given socio-economic context.

In the context of the Bitcoin community, Bitcoin is being used as a medium of exchange (payment vehicle) and – as the existence of "hodlers" shows – as a store of value.

You apparently agreed with Bob that some specific amount of Bitcoin would be sufficient to repay your debt to him. Therefore, you are denominating your debt in Bitcoin, i.e. using it as a Unit of Account.

Under these circumstances, both Bob and you should consider "I already gave you the money, Bob!" an accurate usage of the term money.

In other circles, there is discussion especially about whether Bitcoin fulfills the "Unit of Account" property. Hence, others may disagree that Bitcoin is money.


How i get callback notification while BTC received to wallet i installed bit coin core in my Windows machine [test-net] .i implemented a C#.net application using Bitcoin RPC command like generate address , transfer BTC to one address to another address. It working great.

My question is, how can I get a notification once an address that I generated receives a payment? How can I get a notification when the payment is confirmed?

Any help / guidance would be helpful.

you have to use ZeroMQ for that purpose see Bitcoin/zmq once you receive a transaction you can get a notification.

Bitcoin/zmq doesn't tell you if some transaction confirmations changed, so you can check transaction confirmations manually by calling getrawtransaction

You can use walletnotfiy as well

walletnotify=/bin/curl http://127.0.0.1/receive.php?trx=%s


Input and Output of all funds in the same block? Hope, someone can clarify this problem to me.
Please have a look at the btc address: 1CRTSXJXa3LsaHwjTA5yTbqbyi6QituztX
There have been 2 transactions so far. 1 input and 1 output.
BUT: According to the blocktime and height, these transactions happend at the same time. How is this possible, as I can't transfer funds, that I haven't received in advance?

There are two transactions associated with the address: 1CRTSXJXa3LsaHwjTA5yTbqbyi6QituztX
Tx 1: e53cfb481ea8c2e2ff2827c7148393fbd617d7fc545c4a1a475221839344ca48
Fee: 0.00009072BTC
Fee rate: 3.02 satoshi/vByte
Tx 2: 9fa21b4ed7b242f0ddf1962c8f942109ae8f48ec5b03fff8e00a03e116c6bd44
Fee: 0.00002724BTC
Fee rate: 12.16 satoshi/vByte
Both were included in block 598408
This is possible and you can always spend unconfirmed UTXO. Child tx will use higher fee rate, this is dependent on parent tx so both are included in same block. If the fee rate for both transactions combined is higher than most of the transactions in mempool, miners will prioritize such transactions.
Child pays for parent: How would you create child pay for parent in bitcoind-cli


Why number of zeroes in bitcoin hash is increasing? I know currently to mine a block there needs to be 19 leading zeroes in the hash, but why is this number increasing?

To find a valid block the hash of the blockheader must be below the target, the hash is Hex  number, everytime the difficulty is higher, the target is lower, so the number of zeroes will increase
For exemple this 32 bit number 0x00000100 contains five zeroes, if i want a number lower then this, it will contain 6 zeroes in this case: 0x000000ff
So the number of zeroes increase everytime the target is lower


How can you estimate the net amount of transactions? (deducting change) The change is usually to a different address, and it could be more or less than the amount sent to the recipient.  It seems like a crude estimate would be to just randomly remove one output (assuming num outputs >= 2), and hope it worked out on average but I was curious if anyone had better ideas.  Thanks!

The satoshi client always sends change to an address that has never been used before.

Often the amount being sent has less significant decimal digits than the change.  If you see 2 outputs, one for 1.235 and one for 1.19403995 then the change is probably the 2nd one.

The satoshi client will try to minimise the change.  Usually the change will be relatively small, and is often smaller than any of the inputs.


With Ripple, how is base fee (transaction fee) calculated? The Ripple wiki says (emphasis added):

  If the reference transaction should cost 10 millionths of a ripple, the "base fee" should be set to 10. This is the current value. This makes it very simple to adjust fees to keep them sensible -- just figure out how many millionths of a Ripple the reference transaction should cost and set that as the base fee.

Yes, and how does the system figure out what a reference transaction would cost?

It would be great to know how the transaction fee is determined and how it is adjusted in response to deflation (rising value of XRP or falling supply of the units).

The base fee is contained in the ledger and can only be changed by a pseudo-transaction that gets into the consensus set. It's managed by consensus the same way the reserve levels are.


Getting sender address, python Getting senders account

Say we got txid by listtransactions:

"txid" : "2ca54b92338e52bbb16562dd7a91e8670d9362bb255e21fb568acc13e732b6b7"

then

getrawtransaction 2ca54b92338e52bbb16562dd7a91e8670d9362bb255e21fb568acc13e732b6b7

and

decoderawtransaction 0100000001b2314a1f3d2552d781836cbf266b558eea31fb9f6b0e6da9340ab12e8760df0b000000006b483045022100dab5b2ef5e5be67fc0421c637c60a3d21064bcc7afe69f86909d0a7f91ae99440220762ad9a1d9c20a22378136e5653c2e7134499d1ac0ed86aba883faa7fbf6753f012102f342968588796d7214e189a6fef024bad4f29e7a155c93182a8b6f579b2c1fb2ffffffff02172e0100000000001976a914dc05a2f50f5ae09df42f584f5a5582891a41665088ac2e2f4100000000001976a914380e50d59602e9f9960f893f6f2c0f6eb7791b6088ac00000000

out of which we finally receive:

"asm" : "3045022100dab5b2ef5e5be67fc0421c637c60a3d21064bcc7afe69f86909d0a7f91ae99440220762ad9a1d9c20a22378136e5653c2e7134499d1ac0ed86aba883faa7fbf6753f01 02f342968588796d7214e189a6fef024bad4f29e7a155c93182a8b6f579b2c1fb2"

So far so good. Last part is publickey, if understand correctly:02f342968588796d7214e189a6fef024bad4f29e7a155c93182a8b6f579b2c1fb2, which can be translated to address

Then I do following in python to get senders address:
    import hashlib

pkey="02f342968588796d7214e189a6fef024bad4f29e7a155c93182a8b6f579b2c1fb2"

ripemd160 = hashlib.new('ripemd160')

ripemd160.update(hashlib.sha256(pkey.decode('hex')).digest())

but ripemd160.hexdigest() returns 8cdd1b71d32e53a9fe326212281a4a99a1c093a8, and thats not what i want.

It should return valid address, and result seems a bit off to me. I think .hexdigest is wrong way to do it, should be converted to base58.

How properly convert ripemd160.digest into account address?

Thanks a lot

The bitcoin protocol doesn't really support the concept of a transaction sender.

All you can come up with is an address owned by someone who previously controlled the transaction's outputs, which however might not actually be the sender (e.g. for e-wallets) and who may not actually intend to receive anything there in the first place.

Take some time to see a sample implementation written in C# (GetTransactionSenderAddress()).


Bitcoind (linux) CPU usage through the roof Basically I'm trying to keep a wallet on linux along with the RPC service so I can receive coins and poll the server periodically for transactions.

I'm trying with both 0.8.1 and 0.8.5 and CPU usage is at 100%, running this on amazon and I get the same even with the xlarge EC2 instance. This has been going on for over 24 hours, had to force reboot the instance to be able to reconnect.

It's not even set to generate coins. gen=0

I guess I'd like to know if this is permanent, or a bug, or something I'm doing wrong? Or maybe it just takes a while to "sync" or whatever its doing then it will go back to "normal" and by normal I mean any level of CPU usage that isn't in the range of WTF and OMG.

Also tried sending myself some 0.01-0.05 btcs and they never made it. Maybe it takes a while to show up? Although blockchain says said transactions have over 100 confirmations.

TIA

From the description you are giving it sounds like you haven't yet synchronized with the network. Before you can start doing anything useful, e.g., see your current balance, the bitcoind client downloads the entire blockchain and verifies it. This may take quite some time and will likely keep your CPU busy until its done. You can check the progress of the synchronization by issuing a bitcoind getinfo and checking the blockchain height with blockchain.info or similar site.


Tainting with HD wallets I'm having trouble understanding HD wallet privacy... for one thing, what if I want to send more money than I have in any of my individual derived addresses? Then I would have to use more than one, right? Which would compromise privacy, because it would show that at least two of my addresses are connected, exposing information about me, right? Like if I get money from A and money from B, then when I send C a payment she would know I was involved with both A and B. Can someone explain me exactly how much privacy HD wallets give compared to using the same address for everything?

HD wallets help avoid reusing addresses when receiving payments because you can generate a new address each time. HD wallets also make backup of many addresses much easier:

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

You are correct that when you send a payment from an HD wallet that needs to combine Bitcoin from several addresses (because no single address you control has sufficient Bitcoin to fund the payment by itself) previously unconnected addresses can become linked together.

There are multiple ways you can deal with this scenario to greatly improve privacy. Coin control and careful planning of payment sizing can minimize the frequency and privacy impact when this needs to happen. You can send Bitcoin from only one address when you desire the most privacy and combine Bitcoin from multiple addresses when privacy is less important to you.

Another solution would be this idea from Peter Todd:

"For me personally shapeshift adds a lot of value to Bitcoin, as it gives me much stronger privacy by using Monero as an anonymous intermediary point. Specifically, I buy Monero on shapeshift, then sell it to xmr.to, which in turn sends bitcoins to the Bitcoin address of my choice."

"https://www.reddit.com/r/Bitcoin/comments/3s085o/why_the_altcoin_takeover_scenario_has_become_a/cwt2prf"


Privacy. How to prevent transaction recipient tracing prior transactions of mine I am thinking of sending some BTC to a new BTC address, but do not have complete trust in that new one.

I'm sending to someone else, but want to be sure that if I do, they can't access other people I have used the same BTC wallet to send BTC

You might want to consider finding a reliable Bitcoin Tumbler (Bitcoin Mixer).

But be aware that you are placing trust in a third party, especially for custodial mixers. Some people have lost money to fraudulent mixers. I would do my research into a company very carefully before risking using them.

Some wallets have mixing capabilities built in to them. These may be a better option.

One example of an article on the subject is How to Mix Your Bitcoins Using Coinjoin for Greater Privacy -- but I can't vouch for the correctness of this article. I suggest taking the time to do your own research.


How can I find out where to buy Ripple? Hi I just heard about a new alt coin called "Ripple". How can I find out where to buy Ripple?

Ripple is actually not really new but still an interesting coin.

Their website lists several possible exchanges (https://ripple.com/xrp-portal/how-to-buy-xrp/). I have no strong opinion about which of these is most reliable. There are others (https://poloniex.com for example) where you can trade XRP/BTC, too, so if you already have an account at an exchange that you trust that might be the easiest way.


Is there a service that let's me "send" bitcoins via email and doesn't require any account creation/login? I'm familiar with the Coinbase and Blockchain.info approaches to this, but both these require registration/login (correct me if I'm wrong). I heard about something called Coinapult, but on visiting their website I don't see much about sending coins, and it says "not available in your country", and I'm in the U.S. I'm pretty sure I saw something for Dogecoin that does this, but not bitcoin.

Wouldn't there be some demand for a simple service that:

Lets you visit it on desktop/mobile web
Has no login or account needed to send or receive coins
Lets you specify a timeout and return to address if the recipient doesn't retrieve the coins in time
Generates and displays a recipient bitcoin address, QR, hyperlink for you to copy/paste, scan or click so that your bitcoin wallet gets the address or payment request.
Saves the private keys for the generated addresses in their own system, but with the idea that recipients of coins will be prompted to transfer funds to their own wallet.
Sends an email to the recipient with a hyperlink to gain access to a web form that lets them transfer the coins to any bitcoin address they choose.
Does not charge fees (maybe ad supported or maybe offers opportunity to download a wallet application) or maybe charges a very minimal transaction fee.

Anyway, does this exist for Bitcoin yet? Or what features above are missing or should get changed?

This is technically possible and can be easily implemented, but I see two problems, which may be stopping people from creating such a service:

Trust: how can the service ensure its clients that it will not
steal their money?
Security: email is not secure, a man in the middle can access the
email message on its way before the recipient, and steal the money.

If there is a solution to these two problems, there will be demand and implementations of such service.


Is there a way to parse raw transactions offline? I have found a few ways to create signed transactions offline, one is at http://brainwallet.org, and another is at https://www.strongcoin.com/blog/the_easiest_way_to_create_secure_offline_bitcoin_transactions

after i have created a transaction, is there a way check and see what data is included in it before submitting it to the network? i ask because when a transaction is created, all i see is a long hex string, and (tinfoil hat time) for all i know this could just be an encoded version of my private key that someone could be trying to steal. is there a service that allows you to decrypt/parse that raw string?

You can run bitcoind or bitcoinqt in offline mode (disconnected from the Internet). The client does not need to be synced. Then you can use the console to view transactions using the command.

decoderawtransaction <hex string>

To check if the signatures are correct, you need to do a

signrawtransaction <hex string> without any other arguments. It will output a {complete:true} result if the signature verifies.

Edit: I should mention that the signatures cannot be verified if the inputs are not known to bitcoind. In that case you will have to supply the inputs as discussed here.


Sending bitcoins to same address I am using the BitcoinJ API to create my wallet.
When I create a transaction, I provide the change address to which change should be sent.
For example: let there be 1 bitcoin at address A;
then I create a transaction to send 0.1 bitcoins to address B and the change (0.9 bitcoins) back to address A.

In the BitcoinJ wallet, I see that the change (0.9 bitcoins) is not received back. To try to fix that, I created a custom coin selector to explicitly select unconfirmed transactions which are generated by myself---but still I do not see the change (0.9 bitcoins) in my wallet.

This is the transaction view https://www.biteasy.com/testnet/transactions/db66d5058e5773f353447ffa2174a417867e9aa134113f01359576f5e6f2b4c6

And this is my wallet https://www.biteasy.com/testnet/addresses/mnj3589DHMoCyhxDSvWKubjkUoTenmrGkE.

According to my address on Biteasy, there is a balance of 4BTC,
but my BitcoinJ wallet shows only 0.069BTC

Now my question is: Why can't I send return change to same address it is being sent from?

You can send bitcoins to the same address you are sending from, if you create a raw transaction manually, or if you use a wallet that does not create a new change address each time a transaction is made.

One reason why this new address process exists is to protect privacy. If you consider that the outputs of a transaction with change, where one of the outputs points back to itself, you will immediately be able to determine how much you paid, and factually, that you paid that amount to someone else, keeping the change.

If on the other had a different address is used for change, an independent observer cannot determine which of the two amounts was change and which was the payment.

However what I suspect you are doing is the classic mistake of thinking that the difference between what you are paying to the other address and what was in the originating address is automatically sent back to you.

I cannot emphasize this enough - the difference is sent to the miner as a mining fee. You have in effect not explicitly told the transaction what to do with the difference and it is therefore assumed that this is a fee that you are paying, and is collected by the miner who mines the block containing your transaction.

In order to avoid this, each transaction must have a minimum of two explicit payments, and one implicit payment:

Input amount
Payment to address 1 (must be less than input)
Payment to address 2 (must be change minus the fee that you want to pay)

The input must be explicitly greater than the sum of payment 1 and 2, and anything left over is implicitly the miners fee


What happens if an ISP isolates a portion of nodes? I came to believe that an ISP can easily detect full nodes, BTC connections and isolate them from reaching any other nodes.

When and if an ISP decided to do so, could they easily perform a 51% attack and do everything they want?

Yes, but this would only work if said ISP would host more than 50% of all the full nodes in the network. This is simply not the case, the nodes in the network are too widely distributed for that.


Will bitcoin unlimited affect BTC? I am hearing about a new crypto currency BTU with another block chain. If BTU comes up,

What will happen to our existing BTC? Can we still use those? Will those be of no use?
Will the price of BTC rise or fall?
Will the price of BTU be same as BTC?
Can we convert BTC into BTU?

Appreciate your quick response.

What will happen to our existing BTC? Can we still use those? Will those be of no use?

At this point it seems likely to me that the BTC chain will survive a hard forking attempt by BTU. Really, except for an impressive hash rate it seems to have almost no other support.

  Will the price of BTC rise or fall?

Both. Probably not at the same time. Who knows really.

  Will the price of BTU be same as BTC?

No. Most likely they will be freely traded against each other.

  Can we convert BTC into BTU?

After the split, the same coins will exist on both chains at first. After disintermediating them, you should be able to sell one for the other, if both have sufficient buyers to maintain any sort of price greater than zero.


Can a miner steal another one's block? Say we have two miners, Alice (an honest miner), and Eve (an evil miner).

My understanding is that when Alice mines a block she advertises it to the network, and once it's part of the longest block chain Alice earns mining reward + eventual transactions fees.

But could Eve steal this block (and the associated reward + fees)? When Alice publishes the block to the network, what happens if Eve republishes it as its own block? What if Eve is able to propagate the news that she mined the block herself in the network than Alice can?

I'm pretty sure Bitcoin has some mechanism around this issue and I'm curious to see how it works.

No.

The block that Alice mined includes the mining rewards going to Alice's address. If Eve alters the block data to output the rewards to her own receiving address, then the nonce (and other variable values, I think "extranonce" and timestamp) that Alice used to solve the block will almost certainly no longer solve the block.


Bitcoin - differences between address, account and wallet I've been reading official BTC documentation and now I'm completely lost. Documentations is too tangled and written in unnecessary many words.
They have:

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

https://en.bitcoin.it/wiki/Accounts_explained (no, actually not explained)

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

Please, somebody tell me the difference between them in a simple manner. What's an address, an account, a wallet, and how does the keys fit in.

"Accounts" are a concept limited to bitcoin-qt, and it's probably better to forget about them entirely.

Each address has a corresponding private key, that you use to move bitcoin out of that address. A wallet is simply a collection of (address, address_key) pairs.

Some people also use the term "wallet" to refer to the software that implements the wallet functionality.

Obviously, this is a grossly simplified answer, and not strictly true, but useful if you just want to understand bitcoin superficially.


How to get pending balance using bitcoin client/ bitcoin-cli? I want to get the pending balance for my bitcoin client but I don't see any RPC call for it.

Apologies for answering my own question, but I just found the answer.

The RPC command to get pending/unconfirmed balance is getunconfirmedbalance


It points to the output 'n' in the transaction which that input spends from, not the spending one.


Can a hard fork effectively double the value held in bitcoin? A hard fork necessarily means that two versions of the block-chain exist and value is held in both. Now realistically one of them should probably go down in value and the other increase or hold steady such that the total value held in them is roughly the same at the end of the day ( assuming a rational crypto-currency market). However assume that the market is undervalued and somehow the market decides that both the blockchains have the same value or that the new one is way more valuable than the older one, with the latter holding its value; isnt that equivalent to something like 4 billion dollars of value being created out of thin air? And also, how likely is that scenario, especially in the context of bitcoin classic....

I'm not an economist, but…

No, that's very unlikely.
Starting from your assumption that the network splits into two persisting blockchains*:

The number of active participants of each network is reduced. This reduces the utility of the network. → Negative effect on the value.
The amount of transactions that can be sent increases. This improves the utility of the network. → Positive effect on the value.
The shortterm security of both chains is reduced as hash power is spread to two chains. → Negative effect on the value.
The longterm security of both networks is reduced, as one or both of them become more likely to cease existing. → Negative effect on the value.
Unforeseeable reactions of various invested parties. → Unknown effects.

Shortterm:
I'm fairly confident that a project fork would throw the community into turmoil. Some developers might leave, some companies may be bankrupted, lots of users would lose money. The community would have to reorganize, work on governance, work out new goals, and rebuild teams. Blocks will slow down due to hash power splitting to two chains. The underdog may use this opportunity to completely redefine themselves, thus bringing their project back into the game. Development would slow down significantly for a while. I would expect each chain to have a lower value than the original chain, most likely the sum of both would fall well below the original chain's value.

Longterm:
I'm convinced that cryptocurrencies benefit so strongly from the network effect, that only a small number of them will be able to coexist, i.e. both blockchains would be competing for the same market share. Either they diversify to an extent where they appeal to vastly different userbases, or balance will at some point tilt, causing one side to take the lion's share. Even if the projects significantly diverge, one should end up much more widespread than the other. Should this schism have a clear victor quick enough, the winner, now improved in comparison to the original blockchain, could attract the bulk of the community, and rally. If they split without a clear majority and the schism drags on, it might become so ugly that both bleed support and go extinct.

*It's not clear that two chains would persist after a hardfork. The game theory seems to work out in a way that one chain would very quickly be abolished.


Is there an application or a site grouping addresses by user graphically? Addresses can be grouped as belonging to the same user (or, better, same "account") by grouping together the addresses that participate as inputs to a single transaction, and doing it transitively. This has been done in the recent paper by Shamir and Ron, by some previous researchers and can be done by znort's parser. I know this is not 100 % accurate but I'm fine with it.

What I'm looking for is a site that displays the results of such grouping graphically, possibly with transactions between accounts as well.

I've read about such a site on bitcointalk.org, but I can't find the topic any more. I'm looking for the url of the (now possibly defunct) site or the bitcointalk topic describing it.

The tool is called Blockviewer.  The website, blockviewer.com, no longer exists.  However, the source code is available on Github: https://github.com/thallium205/BitcoinVisualizer.  Thus, you might be able to download the source code, compile it, and run it on your own machine.

You can also read the original blog post introducing some of the ideas behind it.


What value stores can be exchanged for bitcoin purely pseudonymously? What can I trade with bitcoin without having to give out private details like name and address? (Imagine I don't even have a name or address.) I'm looking for stores of value like gold or stocks. Naturally litecoin and other cryptocurrencies fit, but I'm looking for more than that. And alpaca socks, though they may be durable and resalable, may lose value after a perception of being "used", and therefore are not a good store of value.

Over a reputable, lisenced exchange? Nothing. They all require KYC (know your customer) laws to put friction in money laundering, with the exemption of Swiss based Vaultoro.

What you want is to find someone on localbitcoins.com who will meet you in a cafe or restaurant or somewhere and swap bitcoin for whatever you want, dollars, gold bars, diamonds, art, or whatever else. You call ask to meet at a place that can verify the transaction ( for example, if you wanted to anonymously buy art with bitcoin, you could ask to meet at an art gallery).

No reputable online exchange will provide this service, except vaultoro will give you gold anonymously (since they are based in Switzerland which does not have strong KYC laws.)


Is writing unit tests a good way to start contributing to Bitcoin core? I'm considering writing unit tests to Bitcoin core as a first step to C++ development and Bitcoin contribution. Anyone have any suggestions about the journey I'm about to begin and possible files that are needing tests?

Jumping straight to writing unit test can be hard, I suggest You check the official github page for how to contribute to the bitcoin core:

https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md

If I wanted to contribute I would personally start by trying to solve some of the problems on their issues page because it is fresh, there is a lot of work, some can be easy and help is always needed:

https://github.com/bitcoin/bitcoin/issues


How to avoid "single point of trust" in online bitcoin exchange sites How do an online service such as a Bitcoin exchange prevent some sysadmin from transferring assets from its users to him self (like in the bitcoin case, a secret wallet of his own) and take off to Bahamas?

I mean if I'm able to log in to their site, transfer or withdraw my assets at any time, it seems to me like someone on the inside could do the same for large amount of users with little effort? I'm thinking for instance of a DB admin or someone responsible for authentication.

If there's no satisfying answer to this (like a mechanism that requires cooperation of N people for such attack to succeed), I think I've reached my limit on how much of my money I can trust an online company with.

The Bitcoin Wiki (in the linked article for multisig) cites a post on BitcoinTalk describing nearly the same problem that you did:

Suppose I am working with a company that wants to accept Bitcoin for international trades.
The company, for security reasons, would not want a single one of its employees to have access to the company BTC wallet's password. Any transaction would have to meet the approval of more than one employee.
Is this possible already? If not, how could it be implemented with public-key cryptography?

One common solution to this problem is multisignature (commonly abbreviated as multisig).
Most Bitcoin transactions (the ones created by users like you and me) require only one signature — that of the owner of the private key that corresponds to the Bitcoin address. Multisig comes into play by requiring a certain number of signatures for a transaction to be verified. The Bitcoin Wiki gives a few examples of this. The following examples use M-of-N transactions, meaning that M users (out of N users who are able to sign the transaction) must sign the transaction for it to be verified:

1-of-2: Husband and wife petty cash account — the signature of either spouse is sufficient to spend the funds.
2-of-2: Husband and wife savings account — both signatures are required to spend the funds, preventing one spouse from spending the money without the approval of the other
2-of-3: Parents’ savings account for child — the kid can spend the money with the approval of either parent, and money cannot be taken away from the child unless both parents agree

Specifically in regards to your question, 10 executives or employees of a Bitcoin exchange may have the private keys associated with a multisignature address; a combination of any 5 of those private keys may be required to send bitcoins from this address (this is a 5-of-10 transaction in the M-of-N transaction format).
This doesn't guarantee the bitcoins won't be stolen. 5 "evil" employees could collude to steal the bitcoins without the other 5 "good" employees knowing. However, this is a much more trustworthy system than a single employee being able to steal all the bitcoins (as could happen with a "standard" bitcoin address if an "evil" employee had access to the private key).
However, you might notice some flaws with this in regards to a Bitcoin exchange. Wouldn't it get tiresome for the 5 employees to constantly sign a transaction to provide withdrawals to users? The answer is yes, which is why companies implement a "hot wallet" — a wallet that holds a fraction of the bitcoins the company actually owns (the rest of the bitcoins are in a "cold wallet", which would probably be the multisig address). I'm not sure of the exact process exchanges use to send bitcoin from the cold wallet to the hot wallet (and I'm sure it differs from company to company), but I would guess that every once in a while, if the hot wallet is running low on bitcoin, M employees would verify a transaction from the multisig wallet to the hot wallet.
The hot wallet is totally susceptible to being stolen by a single "evil" employee (since it's most likely not a multisig wallet for efficiency, and thus has only one private key), or to being stolen by a thief, but companies would much rather only lose a fraction of their bitcoins (a hot wallet) than all of their bitcoins (a cold wallet).


Help a newbie: How to buy Bitcoin without giving bank account info? I understand that Coinbase requires either a bank account connection or a 3% fee for depositing using credit card (I think so, anyway?). But could I buy my first bitcoin from someplace that doesn't require bank account information and does not charge more than a 1% fee to buy bitcoin? I have looked at localbitcoins but the fees are too high. FWIW, I am in the United States.

Any thoughts would be appreciated, thanks!

Edit: CampBX is shutting down so this is no longer applicable.

CampBX will accept deposits via mailed money order.  A money order from the US Postal Service costs about $1.50, up to an amount of $1000, plus the postage to mail it to the exchange.  You can buy a money order with cash, in which case no bank information is ever needed. The exchange then charges a commission of 0.55% on each trade.

You're unlikely to find lower fees for buying with credit card.  The fees charged to the exchange by the credit card companies are substantial and have to be covered somehow.  Moreover, credit cards present a substantial risk of fraud to the exchange.


How does the receiver of a transaction check the whole chain of ownership? While reading Satoshi Nakamoto's paper on how bitcoin works, I got stuck on #2. In a chain of transactions, how can someone who has received the coin check the whole chain with just a signed hash of the previous one?

Either

The person sending the coin would have to include the whole ownership chain, which would start increasing more and more in size
There would have to be a public hash-to-transaction mapping somewhere.
There would have to be a list of valid coins somewhere, making checking only the most recent transaction necessary

I don't see Satoshi Nakamoto talking about any of these.

There would have to be a public hash-to-transaction mapping somewhere.

Yes. There is a database of utxo - unspent transaction outputs. To be correct - it is an index of blockchain file.


How can I use Bitcoin Core with the anonymous network protocol I2P? How can I use Bitcoin Core with the I2P anonymous network protocol?

Jon Atack answered this on Twitter. First install and start I2P (version 2.35 or above).
$ apt install i2pd
$ systemctl enable i2pd.service
$ systemctl start i2pd.service

In your bitcoin.conf file add (I will assume you run Bitcoin Core v22+ and want to use both Tor and I2P but remove debug=tor and onlynet=onion if not interested in Tor):
debug=tor
debug=i2p
onlynet=onion
onlynet=i2p
i2psam=127.0.0.1:7656

There are 2 config options for I2P. Only the second one is required to be set for I2P to work.
  -i2pacceptincoming
       If set and -i2psam is also set then incoming I2P connections are
       accepted via the SAM proxy. If this is not set but -i2psam is set
       then only outgoing connections will be made to the I2P network.
       Ignored if -i2psam is not set. Listening for incoming I2P
       connections is done through the SAM proxy, not by binding to a
       local address and port (default: 1)

  -i2psam=<ip:port>
       I2P SAM proxy to reach I2P peers and accept I2P connections (default:
       none)

Then to view your I2P peers:
watch -t ./src/bitcoin-cli -netinfo 4
(For more information on -netinfo see the help documentation using bitcoin-cli -netinfo help or this StackExchange question)

This was enabled by Vasil Dimov's Bitcoin Core PR 20685 merged in March 2021 and BIP 155 for addrv2 messages
Historical discussion of supporting I2P back in 2012 is here. (Thanks to Adam Jonas for finding this)


Can I use Bitcoin so that my non-bitcoin friend finally receives CNY? Can I send money to my friend's Chinese Bank account using Bitcoin? How easy and safe are the resources for a Chinese person to convert Bitcoin to cash?

There are services that allow you to withdraw bitcoins to a third person's bank account. In that case your friend will not need to convert bitcoin to cash. I believe it will be quite easier - there also are bitcoin to bank/cash exchanges in China, but due to their regulations, such exchanges are operating using personal accounts or some schemes that are rather risky and hard to understand for the newbie.


What are the safe ways to connect to bitcoin network using tor? One case that I remember when someone was unable to connect his bitcoin full node to the network because of censorship: https://twitter.com/TheBlueMatt/status/1161291626553270272
Matt suggested using TOR bridges for people who are unable to connect (directly/vpn/tor without bridges)
What are safer ways to connect to the Tor network so that you can use Bitcoin?

Recently read one blog post which highlights the issues involved in using tor bridges and I will summarize few things that I found interesting:

The author asks not to use unlisted or private bridges which is contrary to what Matt said in the above mentioned tweet in question.

Harvesting the unlisted bridges: http://hackerfactor.com/blog/index.php?/archives/892-Tor-0day-Finding-Bridges.html

Public bridges: Your Tor connection looks like thousands or millions of other users. This provides safety in numbers. In the worst case, an adversary can see that you are using Tor, but not what you are doing over the Tor network. Moreover, if you disconnect and then reconnect later from a different location, there is nothing linking your new connection to your previous connection; this mitigates the risk from tracking based on the connection method.

Using Tor places you at risk sometimes: China India

If Tor's use can be uniquely associated with you, then you are identifiable. Being identifiable means you may be monitored. How you connect to Tor allows you to be identified. In high-risk areas, using Tor makes you a suspect, and unlisted bridges make you easy to track. However, if you are arrested, then the official charge will probably on a non-Tor related topic (circumventing censorship, spreading unrest, etc.).

Unlisted and Private bridge users are also the most at-risk because they are in censored areas that forbid direct and public bridge connections

If they are blocking, then they are explicitly looking for Tor user.

Internet disruptions in Belarus Internet shutdowns in India

Unlisted bridge set is very distinct and effectively unique

If you configured the Tor Browser to use bridges, then during the startup, it immediately connects to all of the configured bridges. An observer on the network will see connection requests from your current real IP address to the "very distinct and effectively unique" set of bridges. This allows an adversary that is tracking you to know that the IP address making the connection is explicitly you. Combined with historical sightings, they can determine when you first requested the set of bridges, where you were each time you accessed Tor, and where you are currently located.

It doesn't disconnect from an established bridge connection until the browser shuts down. An adversary can see exactly which bridge set you had and to which set you switched.

If all of your bridges match a set of bridges that I collected, then I know exactly which Tor exit node you were using and a timeframe when you were using it. While you are not unique, you are very distinct. This allows me to associate your real IP address with traffic from a known Tor exit node.

Your set of unlisted (or private) bridges is stored to disk. If you use a system that never saves to disk, such as Tails, then you're fine. Just don't re-use bridge sets. But if you use the Tor Browser for the desktop or for mobile devices, then you are unique enough for tracking.

The adversary has placed users in a corner: use Tor with unique tracking attributes, or don't use Tor. (Why are they not blocking all unlisted bridges? Maybe they don't have a LUB yet. Or maybe it is better to track and identify internal dissidents than it is to stop their connectivity. They may be intentionally blocking the safe and anonymous ways to connect to the Tor network in order to flush you out.)

From a practical viewpoint, Tor users should consider the trade-off between discovery and connectivity. If you are in an environment that does not permit direct connections, and does not permit the public bridges, then it probably isn't safe enough to use the Tor network.

The blog post mentions usage of Tor browser which may not be the case when you are using Bitcoin full node with tor proxy on your machine. However lot of things mentioned are important if you are living in an area which has network censored by government regularly.
Source: http://hackerfactor.com/blog/index.php?/archives/893-Tor-0day-Tracking-Bridge-Users.html
Bridges can be configured using Tor browser in Windows or Ubuntu:

Tails OS and few other Linux distros may have different settings to configure bridges: https://tails.boum.org/doc/first_steps/welcome_screen/bridge_mode/index.en.html
If you want to use bridges with torproxy, will have to add few things in /etc/tor/torrc file and you can compare the changes with a torrc file for Tor browser bundle:

Orbot on Android has the option to configure bridges:

Setup docs related to TOR when using Bitcoin Core: https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md


Are bitcoin wallets money service businesses (MSB)? Do hosted wallet services located in the USA need to register with the fenCEN as a MSB?

If the business is based in the US, yes.

Edit: IANAL, but in my opinion a wallet service clearly falls into the category of money transmitter according to FinCEN's virtual currency regulations.


how make an membership app Suppose I want to write a membership payment app. In this program, I want to give an address and members should send their membership fee to this address:

How can members prove that they paid the fee ?
What do I have to get from members to prove it?
how app should check and verify the owner of transaction ?

I know there is software for this, but I want to know how this system works.

If you are using WordPress to create, manage the website and something like Woocommerce plugin to manage the subscriptions/memberships, BTCPay will help you accept bitcoin payments: https://docs.btcpayserver.org/WooCommerce/
There will be no address reuse and all your issues will be resolved.

How can members prove that they paid the fee ?

Transaction details, Invoice etc.

What do I have to get from members to prove it?

Reusing address is not a good practice. Membership websites can manage things differently and use new address for each membership payment. Once the transaction is confirmed it is updated in the database for the user automatically.

how app should check and verify the owner of transaction ?

Owner of transaction should have credentials to login and use the membership options. App will check the database and know if user has paid for membership or not.
If you are using something else to create the website and manage subscriptions/memberships, I would suggest creating an issue in BTCPay GitHub repository and share relevant details.


TransactionId Not working Second Time in NBitcoin and QBitNinja? I am trying to send bitcon from my address to another address. i had 0.0024BTC in my wallet and then i performed a transfer using this article:
https://programmingblockchain.gitbook.io/programmingblockchain/bitcoin_transfer/spend_your_coin#sign-your-transaction
The Transfer was success. I was happy. Now i again tried to perform another transaction. Since i still have unspent amount in that transactionId so i used the same TransactionId this time as well. I got success response along with hash in the code but when i went to explorer i cannot find another transaction there is only one transaction. Should i use different transactionId or is this anything i missed. Please help !
Thanks in advance

Since i still have unspent amount in that transactionId so i used the same TransactionId this time as well.

This is incorrect. You cannot use the same transaction ID. You have to use the new transaction ID to spend new UTXO. The input was also used as change address in the transaction so you have a new UTXO associated with the same address. I will share one example below:
I create a new address in Bitcoin Core with getnewaddress command: tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
I send 0.01 testnet BTC to it from my Electrum Wallet in transaction: 9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532
There is only one UTXO (Unspent Transaction Output) associated with address tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj right now.
I can use this transaction ID to create a new transaction in which I try to spend this 0.0005 BTC from 0.01 BTC I received.
I create a new transaction to send 0.0005 BTC to a random address with createrawtransaction command:
createrawtransaction "[{\"txid\":\"9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532\",\"vout\":1}]" "[{\"tb1q03dvss952khelxea5tpjwf6upv8fshnk95sj6y\":0.0005}]"

I add change address in it to receive (0.01-0.0005-Tx_Fee) and use the same address associated with the UTXO being spent (Although a new address should be used for change):
fundrawtransaction "02000000013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff0150c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e7600000000" '{"changeAddress" : "tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj"}'

Sign the transaction:
signrawtransactionwithwallet 02000000013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff02637e0e00000000001600143a7f8a3edcdd64e4b138ab0401b699f59bbc1e7b50c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e7600000000

Broadcast the transaction:
sendrawtransaction 020000000001013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff02637e0e00000000001600143a7f8a3edcdd64e4b138ab0401b699f59bbc1e7b50c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e760247304402203dffb9e827b95ab91cb1b42df88629b0a9222c64d277596707ec97b78392cf4b02205390bc9844e157fa9c3c8dbcce69c71c0db84af9cbdb79811ca0b8f68562bff4012102bdce2c0d9dd8337d0d18dafe145848406eaee5d024382dcae086e52868d86d7200000000

I understand the steps are not exactly the same as used in NBitcoin but the basic concepts of creating, signing and broadcasting transactions remains the same.
Let me share a rough diagram to show the things I did above:

Tx1: https://tbtc.bitaps.com/9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532/tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
Tx2: https://tbtc.bitaps.com/399375484659b8b1015edd752afa2ef3765adc331e8439acf14c017716d4b842/tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
We used Tx1 to spend UTXO which cannot be done twice. We received more BTC in Tx2 which can be spent using Tx2. An address can have many UTXOs associated with it.


Why dont' nodes change the block version number when the nonce overflows? After computing 4 billion nonces, the miner is supposed to update the merkle root.

Why don't they choose a new nonce and assign it to the block version number and begin again?

It would save time and improve an ASIC.

Block versions are modified as part of other use cases, such as BIP 9, which use specific bits in the block version to signal for specific proposed updates to the protocol. Incrementing the block version and treating it as a nonce would prevent this kind of use.

Moreover, using a version field as a source of randomness (not really, but similar enough when talking about nonces) is generally a bad idea - version fields serve an important role in helping other nodes on the network determine how to decode and process a block, or other entity within the blockchain. Turning this into an effectively random number for the sake of saving a handful of cycles would just be a plain bad design choice.

Recomputing the merkle tree by just modifying a single tx within is a relatively fast operation regardless, since you only have to recompute the nodes affected by that tx.


Which method/programme can create a wallet using the least amount of space? On a first attempt to create a wallet with bitcoind, the process failed after filling the 160 Gb available in my home disk.

Which method or programme would allow me to create a wallet using the least space possible?

Update: I removed bitcoind and am now using Electrum. However, this freed up hardly any space on disk. How can I delete whatever files bitcoind created?

You may not need to have its entire blockchain on your machine, depending on your situation:

You should clarify / update your question to include why you are running bitcoind from a command-line in the first place.

If you JUST want a wallet/Bitcoin-address, there are plenty of options.

I personally use "Electrum Bitcoin Wallet" GUI and find it easy to use - again your question is unclear so this may not be your complete answer but should provide a start.


Bitcoin QT error. How can I prevent corruption of database? So I turn on my computer this morning, and I find Bitcoin QT has quit of its own accord.
I try to turn it back on and I get this message.

"Bitcoin - Error System error: Database corrupted"

I'm fairly sure Windows 7 restarted itself to install updates. Is this what caused the corruption?

Luckily, I have zero bitcoins, and I've reinstalled Bitcoin QT without any problems, but this will stress me out if I want to mine bitcoins while out of town.

Apparently, if the database is corrupted, you may have lost your wallet and all your money!

My question is, is this true, and how can I prevent this error from appearing again? What can cause it? I've turned off windows automatic update, so that should mean we're okay? What happens in a powercut? Wish Bitcoin QT was more robust :(

update Even weirder, I gave the corrupted Bitcoin QT a try and for no reason at all, it started and didn't give me the error. Really scared of loosing all my money. Can someone explain what's happening? Thanks a lot guys.

update Nope. Dispite working, it is still corrupted. It gets stuck on 86 weeks forever.

Tried to get in via bitcoind to reindex the database:

Tried uninstalling everything and reeboting my computer and resinstalling bitcoin-qt:

Thought it was working, but the second it got onto 85 weeks remaining:

Gentlemen, please help. Logically thinking about it, it must be the same database it's using, that somehow survived the reinstall. Maybe if someone could point me towards where this database is stored so I can delete it manually?

Brand new computer, 64 bit genuine windows 7. Barely any programs installed. Can't believe how flaky this open source software is.

I think the error is hardware based. Ran memtest86 and found multiple errors in my RAM. Also got a blue screen for the first time last night. Makes sense, sometimes bitcoin qt would run for minutes, other times days. I think it was hitting a bad address at different times.

If anyone else is getting this error, test your RAM with memtest86. Probably should have done this first thing. Prime 95 could also be used to test your processor (let Prime 95 run overnight, if there are no errors in the morning you can be 95% sure your processor is in pefect condition. Run it longer, say 48 hours, to be more sure).
Test your hhd/ssd with CrystalDiskInfo; it should display your drive's health instantly. (hdd/ssd shouldn't cause this error, as your controller detects and automatically doesn't use bad sectors.)

Prime95:
http://files.extremeoverclocking.com/file.php?f=205

Memtest86:
http://www.memtest86.com

CrystalDiskInfo:
http://crystalmark.info/software/CrystalDiskInfo/index-e.html


Newly generated coins New to BTC world so my question is how and what can I do with newly generated coins what's the process and how to see balance of that in wallet? Can I send those to paper wallet

New to BTC world

Be very very careful about who you trust. Do your own independent research. Reading old questions on this website is a good start.

  what can I do with newly generated coins

People often ask this sort of question after downloading a mining game to their phone and "mining Bitcoin" on their phone. Unfortunately those are not real.

If you have real Bitcoin you already have a wallet, your wallet will show how many bitcoin you control.

Beware of watch-only addresses that let you see bitcoin amounts that you do not own and have no control over.

Beware of "testnet" bitcoins that are worthless.

Newly mined bitcoins are generally associated with a bitcoin-address that is controlled by the miner or mining pool. That address was derived from private keys which will be held in a wallet.

Mining bitcoin isn't something you can do casually.


Is block height always sequential? Is block height always sequential? Can it serve as a 100% reliable block counter in case if I want to check whether I missed a block or I need to account for any corner cases?

Block height is by definition sequential in the sense that adjacent blocks will always have heights that differ by 1.  But there is a chicken-and-egg problem: in order to compute the height, you have to have access to all the blocks in between the genesis block and the current one.  (The height is not recorded in the block itself.)

There's also the issue that multiple blocks can have the same height, if they are on different branches of the chain.  So just because you have one block at every height, doesn't mean you have all the blocks on the main chain; some of them might be on orphan branches.


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

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

Thanks in advance, bark

I agree that you really don't want to be mining with your cpu.  If this was with your gpu and this was happening, your debug output would probably involve a "check your hardware" error like the one many people got from the newest AMD SDK.  That is fixed by rolling back drivers to the best compatible set.

You should look at the console by going to the menu bar: View > Show Console.  Click the tab that pops up named Console and perhaps post a screenshot of that.


The role of timestamp In Satoshi’s original paper, it is written that “we need timestamp to prevent double-spending”.

However, I think timestamp is unnecessary, because every block has a previous block hash and merkle tree root and these are enough to check if a transaction contained in a block is double-spending or not.

I think timestamp is just used to gurantee the current ‘difficulty target’, and I found posts here that it is even possible that a successor of a block can contain a timestamp which is earlier than that of the predecessor.

Am I correct? What’s actually the role of timestamp?

The timestamp is used primarily for establishing the difficulty. Without a timestamp, new nodes would not be able to determine the correct difficulty to be used for each 2016 block period as they wouldn't know how long it took to mine those blocks. So that everyone calculates the difficulty correctly, the block timestamps are used instead of real time.

This of course means that the difficulty can be manipulated by miners messing with the timestamp, but nodes do still check them against real time and will ignore blocks that are outside of a certain range of times based on its own internal clock time.


ScriptSig in bip65 escrow example In the bip65 there is an example how it can be used for escrow in combination with a multisig. See: https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki#Escrow

There it claims that the funds can be spent with the following scriptSig:
0 <Alice's signature> <Bob's signature> 0 but when working through the example it always seems like the is one 0 to many. I am aware of the bug where one item too many is popped of the stack, and that is why a multisig script usually has a 0 first, but why does this one also have on at the end?

The scriptSig part is first on stack, so there would be:

0 <Alice's signature> <Bob's signature> 0

and this for the payout into the CLTV branch:

0 <Alice/Bob's signature> <Lenny's signature> 1

After the sig part follows the pubkey script, with the first Opcode "IF". This "IF" verifies the value befor on the stack (which is "0" or "1" from the sciptSig before), and branches accordingly:

IF
   <now + 3 months> CHECKLOCKTIMEVERIFY DROP
   <Lenny's pubkey> CHECKSIGVERIFY
   1
ELSE
   2
ENDIF
<Alice's pubkey> <Bob's pubkey> 2 CHECKMULTISIG

Assuming the first branch is chosen, then the last item in the if clause is a "1", followed by the line after "ENDIF", so this becomes a 1-of-2 multisig, where only one person needs to sign. But this person has then to wait for the time lock (via CSV parameter). Here in the example: Lenny can spend after timeout is reached.

If there is a "0" on the stack before the IF clause, then the second part is executed, and this becomes a "2-of-2" multisig, which means, Alice and Bob can spend anytime.

Et voilà - smart contracts easy :-)


How can I reclaim my Bitcoin Cash from my Greenaddress wallet? I'm new to cryptocurrency in general, and I'm still learning.

Let's say someone moves BTC to a multi-signature wallet with a trusted provider, i.e. Greenaddress, before the split from an exchange.

This now does not provide him with Bitcoin Cash too.

Can someone please explain the process of obtaining the Bitcoin Cash that goes with his wallet's Bitcoin?

It seems that one can move to a wallet that does support Bitcoin Cash.

But I'm not clear on the concept of the transfer of private keys/addresses from a wallet that does not support Bitcoin Cash to a wallet that supports Bitcoin Cash.

Is this possible, and how does it work?

Would this transfer happen by simply converting Bitcoin to BCC, or would the BTC holder keep the BTC balance and gain a BCC balance in addition?

Unfortunately, if your wallet/exchange does not support BCC, then you have probably forfeited it i.e. left it to their disposal. The only way to find out would be to message their support and see if it is supported. If it is, you will automatically have a balance of both. There are a few exchanges supporting BCC trade including bitrex.com (or have a look at coinmarketcap.com →     Bitcoin Cash →     Markets)


Why would I trust a cryptocurrency that allow only 3 transactions/s? I noticed that the recent blocks usually includes about 2k transactions with is almost the upper limit (max. 1 MB per block). From this I can see that bitcoin would never allow more than 2000 / 10 * 60 = 3.5 transactions per second which is far below other money services such as PayPal or any credit card company.

Because the 1 Mb limit is already reached in most blocks (in 2017), I can conclude the bitcoin ecosystem is already fully saturated in terms of transactions per minutes so it cannot expand further more.

Why should I trust bitcoins and invest my money on it with such considerations? Lots of people believe in bitcoins and put their money on it despite what I mentioned above.

I know bitcoin is a living ecosystem and the question of increasing the block size to 10 Mb has already emerged. Unfortunately performing any change to such fundamental build block of the system would have an enormous impact on its economy so may be never accepted by the community to make any change to the core code.

You are equating the value of a currency with the performance of just one way to exchange that currency. There are poor ways to exchange dollars as well.

Also, I'm not sure what you mean by "invest in such service". You can invest in bitcoin-related businesses and you can invest in bitcoin, the currency. But I don't see how you can invest in the bitcoin generation and transfer service provided by the blockchain.


Are there any resources for creating your own coin? I have some experiments I want to do for creating my own coin. I've seen stuff like coingen.io but I want to do it myself. I also will be messing with other things like the hashing algorithm. Are there any resources out there that gives a bit of guidance through this process? The best I've got so far is taking the dogecoin(or any other altcoin) first commit and comparing to the litecoin source. But this didn't produce very good results for me

I recently heard of www.coingen.io which enables to create your own crypto currency within minutes for minimum fee. (For minimum fee regarding the the you will be spending creating your own coin c. 50 USD)

I would like also to inform you that if you are seeing any investment/profit potential that we already have more than 100 so called altcoins which are all almost the same with minumum differences.

If you are a bit programming skilled the complete guide is on bitcointalk forum.

Commit this code on GitHub


I'm not able to mine as much Bitcoin as I was able to a couple of months ago I’ve been using two AntMiner S5 ~1155Gh/s and was able to mine about 0.02 Bitcoin.
 However, recently I’m just able to about 0.01 Bitcoin.

I use F2Pool for mining. I thought first the other one isn’t working but it does.
Does anyone know what is going on here?

As more people contribute to mining, Bitcoin automatically adjusts the "difficulty" so that the number of new bitcoins created by mining is roughly the same over time. The difficulty has increased rapidly in the last few months, and in fact it has nearly doubled since November 2015. This matches with your performance numbers. Your existing hardware will become less useful over time.