What are the limits of the bitcoin protocol for making thousands of transactions, and what are the alternatives? What are the limits of the bitcoin protocol for microtransactions, and what are the alternatives?

I am contemplating an application that would require each user to spend fractions of bitcoins multiple times every second. I understand that there are limitations in the protocol to prevent such a thing from happening. How can I proceed thousands of microtransaction using bitcoins without having a central server?

There are systemic limits based on storage per block.  So the limit isn't the number of transactions, the limit is instead the amount of data all transactions for inclusion in a block consume all together.

The definition of a "microtransaction" varies.

Bitcoin might be used to send a transaction without a fee if it is not a microtransaction.  The Bitcoin-Qt/bitcoind client (and thus nearly all mining capacity) has special rules that if any outputs are under 0.01 BTC (currently about $5 USD), then it must include at least the minimum fee.

The minimum fee, when required, is 0.0005 BTC per KB of data.

In all likelihood then, all of your transactions would need to pay a fee.

However, simply paying a fee is no guarantee that a transaction will be included.   The blocks have a limit of 500KB but as storage climbs above 250KB the fees needed for each additional KB increase.  As space for blocks begin filling, those transactions with the higher fee will bump out those with a lower fee, which will need to wait to be included in a later block.

So to answer your question is not what the limits of the protocol, but what level of a fee in the future will be necessary for a transaction. That's something that is not known today, but most all will agree Bitcoin probably won't work well for transactions worth a fraction of a dollar especially if the value of the fee itself is in the "many cents" per transaction range.

Alternatives

Decentralized crypto currencies are decentralized to make them resistant to corruption.

But a decentralized currency can be used as the form of money on a centralized service.  Most online gambling sites using bitcoins deal in bitcoin denominated microtransactions, and only use the bitcoin network whan a customer adds funds or when a user withdraws their funds.  So that is an example of how Bitcoins can still be used for a service that deals in microtransactions.

Other methods:

Open Transactions is a technology that allows an issuer to receive bitcoins and issue bitcoin vouchers. Those vouchers can them be transacted on one or more Open Transactions servers.

Ripple is a distributed transaction system which might be able to handle your problem.  Bitcoins are one of the types of funds that can be transacted.


Anonymity of the spender with bitcoin I know an important feature for digital cash (in contrast to credit cards transaction) is anonymity of the users: when I spend a digital coin in exchange of goods or services, I would like not to disclose any identity information to the provider of such goods or services, just like when I go to a common shop and pay cash.

Now my questions are:

Does Bitcoin achieve this kind of property (anonymity of the Spender)?
If yes, how?

Actually there are "addresses" in bitcoin. You have an address and associated transactions (equivalent to the amount of satoshis you have). When you want to spend these bitcoins, you create a transaction where it says : "the destination address" to which you pay.
To have a bitcoin address, you do not need to give personal data, you only have one address (a hash) and the public and private key that make you owners of that address.
It is this procedure that offers you anonymity, but all these transactions are stored in plain text on all nodes in the network.


How can I programmatically know when someone sends me Bitcoins? I'm trying to set up a software system and part of it is knowing when someone sends Bitcoins to me automatically. I'm using node.js, if that matters to anyone.

BlockChain.info provides a push notification API:
 - http://blockchain.info/api_websocket


Running full node ( bitcoind ) without private key I want to run full Bitcoin node ( via bitcoind ) in a "secured listen-only" fashion, ie if anybody gets access to the server he gets nothing.

At the same time I want to be able to execute RPC calls such as:
- listtransactions  ( to get transactions for my specific wallet )
- gettransaction

Is it possible? If yes, how to achieve this?
No sending should be possible from my wallet, of course.

I assume that using a key -disablewallet won't allow me to use listtransactions rpc call.

Thanks

You can simply add your addresses as "watch only" addresses to the wallet, which means that the private keys are not stored on the server, but the transactions are still listed by the RPC calls. You can then keep your private keys elsewhere, for example on a hardware wallet.


In the blockchain split of March 2013, where should miners mine, 0.7 or 0.8? I want a clear cut answer + references so they is no confusion.

Today March 12 2013, on which fork should miners mine, 0.7 or 0.8?

You should go to 0.7, despite the fact that this is the version containing the error. This choice was made because it should be much easier to get the few who upgraded to bleeding-edge 0.8 to downgrade than to get everyone to upgrade all at once.

Sources:

https://bitcointalk.org/index.php?topic=152030
http://codinginmysleep.com/blockchain-all-forked-up/
http://bitcoin.org/chainfork.html


How to set up a private chain/local testnet : reverse engineering the blockchain code Long story short, I want to set up a private chain/a testnet blockchain that can run locally just to fiddle and play with it just to learn how it works. So I have a general understanding of how things work and thought that to really learn I would need to reverse engineer and play with it as much as I can.

So, how would I go about that?
What I am looking for is ideally a step by step clear, beginner friendly explanation because I am aiming at blockchains written in javascript (lisk, nimiq) or, in python(bismuth)

Let me first tell you what I thought of or, what I think concerning ways to do that. I imagine I would have to:

Decide which existing blockchain would resemble the most with what I have in mind regarding the consensus algorithm
Download it from GitHub
Establish a dev environment
Run different tests and let my brain do its magic

Now with regards to those steps, I have few questions:

Am I missing something like an intermediary step let’s say?
Regarding step 1 where should I look, what parts of a blockchain will be the deciding factors for me choosing one over the other say considering that I want to introduce a new consensus algorithm?
Regarding step 2, how would I download a blockchain but ignore the transaction history (this will be a new altcoin starting with genesis block) or is that more like something I change within the code not sure?
Regarding step 3, this is where I would appreciate a step by step response since I have no idea what to download and what steps to take to get from: "I have the code" stage to "I can play with it and test different things" stage.
Regarding step 4: except deleting part of the code, changing variables value, switch order or lines what else could help me to understand better how the code works?

Thank you

The question slightly exceeds capabilities of this q&a forum. Maybe better to search bitcointalk.org, there these type of requests get often discussed. Join one of the discussions there!

Anyhow, we need developers, and people with fresh minds.
Here my short shot at bitcoin, because we are in bitcoin q&a forum. You would probably want to create an altcoin of it. For sure the relevant info and link to the code is on bitcoin.org.

To accomplish your goals, you would have to have an idea and sometimes excessive knowledge on the following:

Information Security
Overview of current crypto coin technologies
Finite Fields
Elliptic Curves
Elliptic Curve Cryptography
Signing/Verifying Messages
Parsing Transactions
Signing Transactions
Creating Transactions
Script parsing and processing
Address construction/Private Key WIF Format Construction
Extended Keys (XPriv and XPub)
Parsing Blocks
Validating Proof-of-Work
Difficulty Calculations
Merkle Tree Construction
Merkle Proofs
Network Message Parsing

and maybe

Segwit
Lightning
Altcoin
...

The list can be for sure extended :-) So you choose to go for a steep learning curve. From what I read in your message, I think you are not (yet) there, but that's not an issue. You will probably want to read books like Andreas' "Mastering Bitcoin", and some more. They will bring you up to speed.

If you think of on the environments (like Ethereum or IOTA), I doubt that many devs are here to support.

  1) decide which existing blockchain would resemble the most with what
  i have in mind in terms of consensus algorithm

this is s.th. we can't help you with, as you haven't presented anything. Do you want to use the community's power & efforts to bring your project forward, but don't provide input to the community by hiding your logic and ideas? In general: we are very curious here for new ideas :-)

  2) download if from github

see the links on bitcoin.org

  3) establish a dev environment

You take a linux machine, and install the software, compile it, and see how you go. Alternativly you can try your luck in other OS, but support is way better on unixoide systems. Also the usage of virtual machines is very attractive.

  4) run different tests and let my brain do it’s magic

again, this is up to your mind howto. But there are testcases deliverd with the software, so you can find relevant code for it, adopt it to your requirements, and go.


Does variability of block solution time change as difficulty increases? We know that the expected average time to solve a block from any given point in time is 10 minutes when the network hash rate matches the current difficulty.

However, as difficulty increases are we going to see more or less variability, or does it stay the same?

ie If we compared a difficulty of 500,000,000 with 500,000, would we see more blocks taking over 60 minutes to be solved, or less blocks, or will there be no difference?

The variability is exactly the same no matter the difficulty. It is always an exponentially distributed random variable with mean 10 minutes (the mean could be slightly off if hashrate mismatches difficulty).

What we may see in the future however is a reduction in variance due to decrease of the block reward. As transaction fees become a more significant part of the reward, the profitability of mining will increase the more time has passed since the last block; just after a block is found, mining is unprofitable so the hardware may idle/switch to a different task. So the network hashrate will increase with time, meaning that few blocks will be solved quickly (hashrate is too low) and few will take a long time (the hashrate will be high so it won't last long), meaning less variance.


Does the concept of a blockchain introduce a violation of privacy? Per my understanding, in a blockchain system, all transactions are recorded on an immutable ledger.
Given this, if you know your friend's public address, wouldn't it be possible to figure out the collective total of their holdings? Isn't that a violation of privacy?

Given this, if you know your friend's public address, wouldn't it be possible to figure out the collective total of their holdings?

I can look at the transactions associated with the address if I know the address which I assume my friend told me.

Isn't that a violation of privacy?

No if my friend told me the address it's not violation of privacy


Would it be profitable to manufacture and sell my new mining hardware? I am bit new with bitcoin. I run a electronics/software company in China and Australia. I would like to create new bitcoin mining hardware. The specs are as follows:

The miner is PCI-E installed, runs in a normal PC case or rack sized server around 200w, latest 28nm chip, around 200GHash/s, selling $99 (USD).

I will buy the chip from existing supplier. The design and manufacturing will be done myself.

Given I have a hardware team that have done many ARM Soc applications, and a reasonable experienced software people with Linux and software.

My question is it worthwhile the effort to do it? Is it profitable and what if any are the perceptive pitfalls?

Depends on whether you can bring something to market that's better than what's already out there. I'm not sure how quickly you can set up something like that, but 200GH/s for $99 right now would probably sell decently. 12 months from now, probably not so much.

This is really an economics question you have to answer, and we'd need a lot more information about your costs and market in order to assess the opportunity properly.


Lost my BTC, though my wallet is still available Recently I have reinstalled Bitcoin qt because my HDD crashed. Fortunately I had a backup of my wallet.dat, but there is still one problem.

After the installation I replaced the wallet.dat with my old wallet.dat. If I start Bitcoin qt now, I can not see any money in my wallet?!

What can I do now?

Are you also sure that you've let Bitcoin qt fully synchronise with the network? Very recently I moved across my wallet.dat to a new installation with no issues.


How can I run bitcoind in pruning mode? I read this comment:

  You could consider running a pruning node, which is practically the
  same as a full node (including security), except it throws away some
  of the old history. Version 0.11 will make that possible

But I can't find details of how to run bitcoind in pruning mode. Questions on this site seem not to be recent enough to yield answers, and I also don't see a pruning mode in the bitcoind parameters.

Any insights into this?

By setting the -prune option.

  -prune=
         Reduce storage requirements by enabling pruning (deleting) of old
         blocks. This allows the pruneblockchain RPC to be called to
         delete specific blocks, and enables automatic pruning of old
         blocks if a target size in MiB is provided. This mode is
         incompatible with -txindex and -rescan. Warning: Reverting this
         setting requires re-downloading the entire blockchain. (default:
         0 = disable pruning blocks, 1 = allow manual pruning via RPC,
  550 = automatically prune block files to stay under the
         specified target size in MiB)

The feature was originally introduced in Bitcoin Core 0.11 (see release notes).

As of version 0.12 pruning can be used while running a wallet. But note the -txindex and -rescan caveats.

Also note that the specified MiB will only include the block files and some undo space. Besides that you will also need some disk space for the chain state and block index databases.


How do other nodes know my balance with LN? Consider the following 3 nodes, A, B and C.

At time t=0, A has 10 bitcoins. A sends 6 bitcoins to B. Then, A attempts to send 6 bitcoins to C.

With on-chain transactions, the second transaction is prevented, because everyone knows A's balance at all times.

How is the second transaction prevented if the first transaction is made on the lightning network?

If we assume that A, B and C are all connected to the same LN hub, called D - and the payments all route through D - then I can see how the double-spend is prevented.

But what if there is no path through LN connecting B and C? Or, there is a path, but A chooses a different route for its second payment compared to the first payment?

Finally, what if the first payment is made via LN, but the second payment is on-chain?

The two channel owners have cooperatively locked up a sum of Bitcoin in a 2-of-2 multisig address.

The only thing that they can do, is to renegotiate how much each of their balance shares is. This is what happens when they send funds in Lightning: the sender offers to increase the balance share of the recipient and at the cost of reducing their own.

Likewise, when you attempt a multi-hop payment, you offer a conditional smart contract to your channel partner. Your channel partner gets to increase their channel balance share at your cost, when they prove to you that they have forwarded the sent sum to the recipient.

Since the sum of the two balance shares can never exceed the channel capacity, nobody can ever send more money than their balance share: Their channel partner would simply deny the payment attempt.


Array of individual transactions from blockchain.info As a little learning/hobby project i'm writing a little c++ program to extract a list of transactions from blockchain.info and show it visually.

I was hoping i could iterate through blocks, taking each TX and then extract into an array a list of transactions. i.e.
Block/transactionID/sending_address/amount/receiving_address etc

Ive connected to blockchain.info and can iterate through each block using jsoncpp. But if i look at an example like this:

https://blockchain.info/block-height/100001?format=json

...and specifically transactions like this:
https://blockchain.info/rawtx/8131ffb0a2c945ecaf9b9063e59558784f9c3a74741ce6ae2a18d0571dac15bb

Will the sum of inputs always match the sum of outputs?  How would i marry up which input sent what amount to each output when there is more than 1 in each?

Many Thanks.

nice - but I promise, it will not be a "little" project :-)

  Will the sum of inputs always match the sum of outputs?

no! There is a general rule, that whatever is the difference, will be miner fees. To be more precise, the miner is free to take it as fees. So this is a reason why you should have always "return" addresses in your transactions.

  How would i marry up which input sent what amount to each output when
  there is more than 1 in each?

The idea of bitcoin transactions is, that they are not linked directly to  addresses, but to previous transactions. And they are not "divisible", but more "additional". I try to explain: funds are transferred from a previous transaction to a new location. Your wallet software might easily handle several addresses. If you send from your wallet to a new target, the wallet might have to take 2 or 3 or 4 previous tx, to send to new address, cause the funds on the single tx where insufficient for the total amount. In this sense, you (your C++ code) can only "match" inputs to outputs (with the derived addresses). Many huge transactions have hundreds of inputs and/or outputs - imagine faucets or exchanges: they create 1 transaction, with many payouts to different owners/users (e.g. https://blockchain.info/de/tx/2062a2717ca2f77c6935ff685d33086aa5db2f554ecd4d5232432cf9cb6a4006).

Taking your example: one can see that 5 inputs were required, to spend 250BTC to 15xif4SjXiFi3NDEsmMZCfTdE9jvvVQrjU and 1mio Satoshis to 1NkKLMgbSjXrT7oHagnGmYFhXAWXjJsKCj. That's nearly all you can say, what happened in this tx. The analogy from Andreas (and his book "Mastering Bitcoin", online readable, highly recommended) is FIAT money. You have maybe 10, 20 and 50 Euro bills in your wallet, but don't know from whom. Now you want to pay 35 Euros. So you give 50, and receive maybe 3 times 5 Euros as change. You still don't know, from whom they came, but just the amount. These "three times 5 Euros" could then be used as 3 inputs for a new 15 Euros transaction.


Claim Bitcoin Gold from my paper wallet I have asked similar questions in the past, But I didn't get a clear answer yet. I have my bitcoins in a paper wallet, Everywhere I am reading that exchanges like yobit,hitbtc etc will support bitcoin gold if the bitcoins were in their wallet before the fork happened. Which in my case is still in my paper wallet. So now, to which wallet I should import/transfer so that I can claim bitcoin gold.

Regards,
Bince

You can't. The blockchain has just forked, but the clients are not ready. They still haven't added replay protection, so the "specs" is not ready  too. When they release the client, you'll be able to import your paper wallet private key and claim your Bitcoin Gold.

Now, just don't fall for "claim your bitcoin gold" scams.


What function does Mt. Gox's "Open Transaction" withdrawal option perform? When withdrawing bitcoins from Mt. Gox, there is an option with a checkbox next to it titled "Open Transaction (6 confirmations)".

What does this do to my withdrawal?

I'm thinking this is probably a mislabeling for an option that ensures that even if the receiving address is for another customer account at Mt. Gox that the transaction will be sent through the blockchain.  Otherwise, if those transactions are handled internally without appearing on the blockchain then it is difficult to prove that a bitcoin payment was sent.

I just asked on the #mtgox IRC channel, and was told:

06:36 < dooglus> what does the "Open Transaction (6 Confirmations)" option
                 do when withdrawing BTC?
06:48 < Cory> If the Bitcoin address you're withdrawing to is a MtGox address,
              it will use the network and blockchain anyway.
06:49 < Cory> Otherwise, if that option is not checked, they will only internally
              transfer the funds.
06:53 <@MagicalTux> and instantly

So there you have it.

I suggested they should label it differently:

07:13 < dooglus> it would be better to use some different text for that option -
                 like "use bitcoin network even for transfers to mtgox deposit
                 addresses" for instance
07:19 <@MagicalTux> dooglus: it use to be something like that, but people were
                    complaining it was not clear enough


Bitcoin transaction unconfirmed, while way past expected processing time I have started a transaction from "wallet A" at 2017-06-14 11:51:40 with

  Fees 0.00066328 BTC,
  Fee per byte 293.487 sat/B

Which is not yet confirmed over 8 hours later.
I have a second transaction from "wallet B" at 2017-06-14 18:08:25 with

  Fees 0.000599 BTC,
  Fee per byte 265.044 sat/B

Which was started almost 8 hours later than the first, with less Satoshi per byte and was confirmed within approx 1 hour.

How can the first transaction, with a higher fee not be processed, while the second one is? I know I didn't choose the highest fee, but the selected fee should have processed the transaction within 3 blocks, which was supposed to be within 60 minutes according to https://bitcoinfees.21.co/.

Edit:

I do have a past unconfirmed transaction, for which I put a way too low transaction fee, on that wallet. If there is a previous unconfirmed transaction, does that mean the next transactions will wait for the unconfirmed transaction to complete? This will never happen...

That's correct, a transaction cannot be confirmed until all its inputs (and all of their inputs, and so on) have confirmed.  (It is allowed for the transaction to go in the same block as its inputs, so that they confirm simultaneously.)

You may be able to remedy the situation by creating a third transaction that spends the second (7da9), with a large enough fee such that the overall average fee of all three transactions is at or above market rate.  Miners may be smart enough to realize that they can earn a good overall fee by confirming all three.  This is the idea of the child-pays-for-parent scheme, though it's usually used to have a transaction pay for its immediate inputs; I don't know whether the software used by most miners would detect longer chains like this one.

You can also wait for a while until other nodes have forgotten the low-fee a762 transaction, and then try to replace it with a higher-fee transaction (a double spend).  The details of doing this depend on your wallet; often it involves "zapping transactions" or "resetting blockchain" so that the wallet forgets what transactions it created, and scans the blockchain to find only those which are confirmed.  If other nodes have also forgotten the unconfirmed transaction, then it's as if they never happened and you can start again.


Passing a wallet to rpcwallet in bitcoind JSON RPC I want to set a wallet as default wallet in the commands that run with json-rpc calls. the -rpcwallet=blah sets the blah wallet as the wallet which command will run on it; how can I simulate the similar thing with sending a JSON-RPC request?

When I sending the request, for example curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/, but it run on default wallet. how can I pass the wallet as a parameter in my request?

To query a specific wallet, set the URL to be

http://127.0.0.1:8332/wallet/<wallet_name>


Huge price difference between mtgox and others - why? I know mtgox is imposing halts of withdrawals at the moment but i just cant understand this chart (see bellow - taken on 21.2.14 21:37 GMT), surely if i can buy btc on mtgox and

A) Then spend them

B) Keep them

When mtgox allows withdrawals they will be at c.$400-500, why are they listed at c.$100 on mtgox at the moment ? Am i missing something or is there a huge opportunity here (ie. why are people selling at $100 when elsewhere they are going for $500) ?

Or is the price artificial ie. its just a price but no coins are changing hands ?

Observations

Mt.Gox is currently offering neither fiat withdrawals, nor Bitcoin withdrawals.

No withdrawals means that the Mt.Gox price is completely decoupled from the Bitcoin market, as there can be no arbitrage to close the gap.

Precursors

Mt.Gox has handled the Malleable Transaction issue poorly, and squandered the trust of a lot of its users. Since shutting down withdrawals on February 10th, they have pointed fingers about an issue that was known since 2011, which they did not take into consideration when implementing their exchange software. They promised on Februar 17th that withdrawals would recommence "soon", which still hasn't happened yet, instead on Februar 20th they announced further delays. They have also not made any statements about how strongly they were affected by the issue and whether their customers money is safe. For comparison Bitstamp.net immediately communicated that all deposits were safe, and had their service fixed and secured against Transaction Malleability within a few days.

Idle Speculations (=ramblings, certainly not investment advice)

I am seeing two scenarios possible at the moment:

Mt.Gox is insolvent. This could have happened due to them unwittingly double-sending many withdrawals of a total immense amounts due to the Malleable Transaction issue.

They cannot recommence withdrawals, as the bank run would immediately take all their room for maneuvering. At the moment they can still earn a fee on every trade and enough trade just might lift them back to business.
First lawsuits are imminent. People holding fiat on the exchange might have better chances of getting some money back.

Mt.Gox actually is just communicating poorly and, being more strongly affected by the issue, requires more time to sort out all their transaction history.

Once withdrawals resume, the market will settle to somewhere between current market value and Mt.Gox value through arbitrage. Mt.Gox' market share would probably still drop significantly.

I'd be surprised if they were actually insolvent, as they would have to be making a good amount of money from exchange fees every day.


Why are existing distributed database technologies not applicable to cryptocurrencies Why are existing distribued database technologies such as mongodb not useful for hosting the blockchains of large cryptoapplications, after all they are just distributed key-value stores?

how does something like ethereum nodes actually store data? In some custom database? Why not use existing tech?

The security model of MongoDB assumes that all MongoDB nodes are run by the same entity, and trusts the servers in the cluster to not tamper with the data they're given. There are checksums and such, but those are intended to detect and correct accidental corruption of data, not intentional changes.

  How does something like ethereum nodes actually store data?

Bitcoin uses LevelDB to store blockchain data, though this is not sharded for the reasons mentioned above.

I don't know what backend Ethereum uses.


How cooperative or competitive is the mining process? As each miner works out which nonces it has tried, does it notify the network so that energy isn't wasted on re-processing the same thing by each node? Or is it totally competitive with everyone for themselves?

Miners that aren't cooperating will never replicate work because they each want to get a different block as the next official block. If nothing else, the account the mining fee is paid to will be different. (And this ripples up to the header.)

For miners that are cooperating, work units are assigned by the mining pool. The pool will typically embed a different coinbase in the work units it assigns to each miner. When a miner finishes processing a work unit, it requests a new work unit (with a new coinbase) from the mining pool.

So there should never be any replicated work.


If there were no transactions, would mining be possible? What would happen if suddenly everyone stops transferring bitcoins so that there is no work for miners (no transactions to be grouped into blocks)? Would mining be possible in that conditions? How exactly?

Of course, I realize this is impossible, I am interested in the theory behind it.

Yes.

Miners would just produce empty blocks. They would only be paid a subsidy (12.5 BTC per block, currently) and not any fees from transactions.

In its early history, Bitcoin had many empty blocks.


If the computer calculation rate becomes 100x faster, would the value of bitcoin drop to 1% of the previous value? This is my main concern, but are there any other design flaws with Bitcoin?

TL;DR: Change of computer calculation power doesn't affect the price at all.

Market Price of anything determined by supply and demand, bitcoin is not exception the only difference is that the supply side is constant, 50 BTC per ten minutes at the moment. Regardless of how much computer power used to generate bitcoins the rate of produced bitcoins will not change because Bitcoin network difficulty will adjust to make it harder or easier to find new bitcoins depending on total network computer power, bitcoin price change purely because of change of demand.

Also there is a controversy about certain aspects of Bitcoin, but there is no designing flaws that I know of.


Mining in one years time In about one years time, when mining is really difficult, what would be the incentive for people to mine?
And if there aren't enough miners, how would transactions succeed?

Won't happen because of pure greed, if people start leaving difficulty will drop and then it will become profitable again plus even if the normal person can't mine we will have some big company that will profit from mining and keep the network running. This poses other issues when big company's get involved but that's out of scope for this question.


How to find values of Prev_Hash and Tx_Root https://bitcoin.stackexchange.com/a/13347/27951

Based upon the answer here, it seems there's values per block with each Prev_Hash and also Tx_Root

There doesn't seem to be much documentation for how to access these. How can I find the Prev_Hash and the Tx_Root of the most recent block for example?

Thanks

Look at a block on a block explorer.

Here the Prev_Hash is called 'Previous Block' and the Tx_Root is called 'Merkle Root'.

For more technical info, take a look at the Protocol Documentation.


Bitcoin Mining on Office Network I'm a bitcoin novice and i've read a bit about mining. It got me thinking that I could setup our office network to min bitcoin (obviously with permission)

We have a centos linux server which is on 24/7/365 and we have 6 windows 7 machines which are on 8 hours a day during a working week when staff are in working.

Is it possible to setup the linux server to mine bitcoins continuously with very low effect to the server's load and the same with all the windows 7 machines? What sort of mining software would be idea for the setup.

CPU and GPU mining costs more in electricity than it rewards in BTC at the moment.
You need special equipment with ASIC chips to mine at a profit.
These chips are designed to perform many hashes at low power consumption.

I suggest you ask your boss if he agrees with the negative efficiency of your current setup.


How to add money to CoinPayments? I need to make a transaction of 0.00744000 BTC using the site CoinPayments.net. However, when I click on "Add new deposit address" in my wallet, I can see a 34-character long code.
Next to it, there is a button "Deposit with Bitcoin client", but when I click on it, an empty tab opens in Chrome. In Chrome's address bar, I can see the 34-character long code and the prefix bitcoin:.

However, I don't understand how am I supposed to make the transfer then? I need to convert $50 from my bank account to BTC.

"Deposit with Bitcoin client" does the opposite of what you need to do.

(Though I'd read this before making any transactions on that website.)


51% attack, miners, nodes or both If 51% of the hashrate was controlled by bad actors mining invalid blocks, this would become the longest chain. Where do nodes come into the 51% attack? The canonical chain is the longest chain. Is this true even if less than majority of the nodes accept it. I assume that the canonical chain is the one which majority of full nodes accept as the canonical chain, but how does this fut into block height. Would a 51% attack have to be 51% of hash power and nodes or just hash power? If so, why?

A 51% attack involves just 51% of the hashrate, no nodes are involved.
With a majority of the hashrate, miners can construct a new branch in the chain that overtakes the chain that was previously accepted.
It has to be an otherwise valid chain, as otherwise nodes would reject it. The attack doesn't let the 51% attackers make the network accept any invalid transactions - it can just roll them back.


Why are non-final transactions considered non-standard? In IsStandardTx within main.cpp, there is a comment:

// Treat non-final transactions as non-standard to prevent a specific type
// of double-spend attack, as well as DoS attacks. (if the transaction
// can't be mined, the attacker isn't expending resources broadcasting it)
// Basically we don't want to propagate transactions that can't included in
// the next block.

What are the specific type of double-spend attacks and the DoS attacks alluded to here?

The denial-of-service (DOS) attack is easy to explain: each time a transaction is updated by increasing the sequence number in an input, the whole transaction needs to be propagated through the network again.  So if a transaction is 1 KB and there are 10,000 full nodes, you can waste a minimum of 10 MB of network bandwidth each time you update the transaction at only 1 KB bandwidth cost to you---and you can do it an essentially unlimited number of times with an essentially unlimited number of transactions, none of them costing you any money besides the transaction fee.
I'm not absolutely sure what the double spend attack referred to here is, but my guess is that it's the basic zero-conf double spend but with the network helping the fraudster: the fraudster pays you with a non-final unconfirmed transaction, being a trusting person you provide goods immediately, the fraudster broadcasts a double spend with a higher sequence number, the network mines the double spend instead of the original transaction, and you don't get paid.

It would be easy to block this type of double spend by refusing to accept into your wallet any unconfirmed transaction with a non-final sequence number, but that could lead to user confusion: "he said he paid me, and BlockChain.info says he paid me, but the transaction doesn't appear in my wallet!"


Do any of the Bitcoin exchanges implement trading curbs? After the big hack of Mt Gox we all became aware that there is nothing in place to prevent "flash crashes." Most stock, FOREX and other exchanges have features like trading curbs or other market volatility procedures to prevent such crashes - so do any of the Bitcoin exchanges have such curbs in place?

Also, if one exchange were to implement such a procedure would it still be effective if other exchanges did not? In other words, if Mt Gox implemented a trading curb and TradeHill did not, would this non-universal curb be effective? Would the effectiveness hold if the scenario were reversed? (i.e. TH has a curb and Mt Gox does not)

Mt. Gox has stated that they now use "circuit breakers" to disable trading pending manual intervention if trading appears suspicious or unreasonable. They reported a few minor incidents where the breakers did trip in the initial implementation due to unusually high, but normal and innocuous, volatility.

My recollection is that TradeHill only has breakers on the movement of Bitcoins out of the exchange. So far as I know, they have no breakers on trading -- at least not that they've announced.


Wallet's dollar value of transaction is WILDLY off my actual dollar payment I was using Safepal Wallet and moved my funds to Trust Wallet.
I am currently tracking those original transactions for tax purposes next year.
I was simply using hash/txid provided in the transaction overview, but have an odd problem. The amount that shows up on my wallet is correct, but when I click to see the details, the hash/tax id links to a transaction where I received 5 BTC for around $250,000, but the original and true amount was around $30.
I have no idea what to do. I have checked on different searches and this is the same information. How on earth? Will this somehow screw me for taxes--be reported?
I have the correct number reflected on my wallet balance, but the "details" of this transaction are blatantly wrong. I have other coins and transactions with similar issues and some that are exactly correct. PLEASE HELP.

I was using Safepal Wallet and moved my funds to Trust Wallet

The outcome might be affected by the method you used to move the funds. Generally there are three methods for non-custodial wallets - using a recovery phrase, importing keys and sweeping.
I can imagine that sweeping funds might mean that the wallet records the sweep transaction as the transaction in which you acquired those funds. Any dollar value  might refer to an exchange rate at date of sweeping rather than at the date the previous wallet received the funds. This is speculation though.
It is also possible that the wallet uses todays exchange rate to show you the dollar value of the amount of Bitcoin in any transaction regardless of transaction date. This would be a problem created by the wallet's developers (and target audience) treating Bitcoin as a dollar payment system rather than a separate currency. In other words, selecting USD instead of BTC as the display units might be intended to give you an easily understood idea of current purchasing power, not of exact amounts of dollars exchanged (the dollar payment would be external to the Bitcoin network itself and not part of the Bitcoin transaction - which is only ever half of the real-world transaction)

the hash/[txid] links to a transaction where I received 5 BTC for around $250,000, but the original and true amount was around $30.

The Bitcoin blockchain and Bitcoin network carries no information about dollar exchange rates or about any other currency, goods or services being exchanged, purchased or sold in any transaction. You can't use blockchain records as receipts and not as tax-receipts. You probably shouldn't rely on your Bitcoin wallet to tell you anything about dollar values for IRS tax purposes unless the wallet was explicitly designed for that purpose and its developers warrants fitness for that specific purpose.


Receiving donation on a bitcoin address and security issues of reusing the same address I am running a blog and would like to receive donations from my followers. So I thought to add a bitcoin address on my "Support me"-page!

But on bitcoin.it, it is recommended to never reuse addresses, which is supported by citing not only Privacy concerns (not my concern here) but especially for security reasons.

So:

Is it safe to use (and thus reuse) the same address for all my donations?
If not, what are the best practices?

For a blog that only receives occasional small amounts you probably shouldn't worry too much about it.  However, if you plan to scale up, here are some things to consider:

One issue with using the same address for all transactions is that people can see the total amount received by that address and know how many bitcoins you have.  If the total is large enough, this might make you a target for attack, especially if you publish personal information along with the bitcoin address.

Another potential issue is that people can see who else is donating to you.  They only see the bitcoin addresses used, but this might be enough to draw some conclusions about who they are.

Best practice is to use new addresses for each donation.  This way there is no link among the transactions except in your wallet, which is only accessible by you.

If you plan to keep bitcoins (instead of just receiving them and cashing them in), you should look into creating an offline wallet.  You could generate a new address for each web page view, and then transfer funds from each of the addresses that received a donation to a different pre-computed offline wallet address.


Talking to bitcoind thru web browser returns empty JSON document I am attempting to access bitcoind's http-json-rpc api thru firefox. I enter the following URL

http://user:password@localhost:8332/getinfo

and it returns

There was an error parsing the JSON document. The document may not be well-formed.
Document contents:

So the document contents are empty, but when I inspect element and look at the response, I get

Status-code: 404 Not Found
Connection: Close
Content-Type: "application/json"
Server: "bitcoin-json-rpc/v0.8.2-815-g5f083af-beta"

So the server is replying, but doesn't recognize the request or something.

My bitcoin.conf file reads

rpcuser=user
rpcpassword=password
rpcport=8332

If I do

 http://user:password@localhost:8332/

instead, it gives me a 500 Internal Server Error

Any idea what is missing?

You need to POST the request according to the JSON RPC specifications. So this will not work using Firefox without any special extension that lets you set POST information. You cannot simply request the page http://user:password@localhost:8332/getinfo and expect bitcoind to return the getinfo. There is no page system, it's not a normal www-server (i.e. pages hyperlinked together), it just uses the HTTP protocol to transport JSON. As long as you make that POST request correctly, I don't think it mattes what page you call.


Homework problem on Blockchain and Merkle trees This is a question from a stanford course(http://cs251crypto.stanford.edu/18au-cs251/hw/hw1.pdf).

I think that Alice needs to send all the k blocks (containing the transactions) to Bob so that Bob can hash them one by one to ensure that next block is in chain. As the block Bob has, contains last transaction's hash, he can verify with that. But in that case, he can simply see the transaction, and merkle tree don't come into picture, so k data is not used and size of 1 block is also not provided in question. Am I missing something. Also, Alice can send the Merkle proof (the log(n) number of extra hashes along with hash of the transaction) to prove that the transaction is present in a block (comparing the net hash with Merkle root). But, the problem is that Bob contains only current block header, but the original transaction is in the chain n blocks back. Now if Alice provides only the header, bob can't know that they are not edited. Is there any other way, he can send some information which will ensure that Alice has not tampered with the info?

The question parameters restated:

Bob only has latest header stored locally
Alice's payment is k blocks before current head
n tx's per block

Alice needs to prove two things:

1) Her payment is committed to header chain_height-k
2) Current header at chain_height builds on chain linked to header at chain_height-k

Merkle-Proof

You need to construct the payment TX merkle-proof (merkle path only) for the header block at height-k. This proves your transaction was confirmed in a block.

  The merkle tree has a height of log2(256)=8. The size of this proof is
  (8*2+1)*32 Bytes.

Strong-Chain Proof

You also need to prove that miners performed POW on top of the block which contained your transaction. This can be proven by providing headers which are linked together, although the problem does not give you any figures on those header sizes.

  You could assume Bitcoin headers of fixed size 80B, so (k+1)*80 Bytes.

Note that only the headers are required for this POW proof, because the light client cannot verify whether the TX's committed to these headers are valid or not.

This chain provides the proof that the strong-chain builds on the block which includes your transaction.


Why does Crypto Street have backwards pairs? I'm looking at the crypto street home page and the pairs are backwards when compared to other exchanges. It doesn't appear to be a mistake because the prices are inverted compared to other exchanges - it just seems odd.

The problem is the notation is inconsistent with, well, math. If you say 98 USD/JPY, it looks like 98 USD per 1 JPY.

That said, this is also an issue on Bloomberg or Yahoo or any financial reporting site that I know of.


My wallet hasn't synchronized, can I make a transfer? My wallet hasn't synchronized, can I make a transfer?

I'm assuming that the transaction will not come up on my wallet but im guessing it would come up on the person I send too?

Yes, making a transfer works pretty fine with the Bitcoin-Qt wallet.
However, the transfer won't be submitted to the network until your local client is up to date. Up to this point, the transaction is shown in your local wallet but not in the global network.

As an alternative you could use another wallet, for instance Electrum (http://electrum.org):
Electrum is a wallet that connects to servers that are already synchronized and thus will give you immediate results as well.


How DNS Seeds node maintain the list of addresses? On bitcoin peer node discovery, the client issues DNS requests to learn about the addresses of other peer nodes. My question is how does this DNS directed service provider learn about all the addresses in the first place?

Each normal node should connect to the seeder, this connection is detected by seeder service, that will test the node and add it to the list if some basic verification pass.

Exist other additional features, like for example fetch node list from main know seeder DNS into new seeders services.


My balance says 100. mBTC. How many bitcoins is this, and what is the value in British pounds? Cant find an easy answer anywhere? I would like to know what this means and the value etc

Is it 0.100 bitcoin or 0.0100 bitcoin?

mBTC stands for the SI unit Millibit which is 1 thousandth of a bitcoin, or 0.001. So you have 100 mBTC * 0.001 BTC, or 0.1 BTC. The price of 1 BTC at the time of this writing on Coinbase in GBP is £5,485.21 to 1 BTC. Your 100 mBTC would then be valued around £548.


What is the trend in Mining Pools? According to Greg Maxwell mining pool consolidation had reached the point of 22 large pools, as of the Bitcoin FDTN. conf. Nov. 2015.

What is the state of the current situation?  Has there been a further worrisome decline in this metric?

https://blockchain.info/pools gives you all the info you need, we're not as bad as in the ghash.io days (>51%). I count 17 pools with >1% hash rate, however the four biggest pools have a combined total of >50%.

Another thing to bear in mind, is that people with substantial hashing power (such as Antpool), could just be hiding their actual hashrate in other pools, we've seen  some pop up with some pretty large amounts of power in short order, and hundreds of petahashes swapping between pools.


Meaning/Derivation of 32 byte TxID hash A largely abstract question (set) I've tried to answer for awhile is the nature of a TxID (32 byte hex Transaction ID hash).

First and foremost, I certainly understand the main function if this value(?) is to uniquely identify a Transaction (primarily to tracks unspent outputs, AKA UTXOs).

But let's take a random TxID, say e151de4f5a339ed545e24ecfc8f811f9143fefc10574af40721a156ff2d3a389.

How is a TxID assigned to a Transaction?
Are 2 identical Txs that: double spend, have identical k PRNG-signed (so not a RNG!) sigs, identical inputs/outputs (a lot of assumptions here) given identical hashes?
Tangentially: are the Big/Little Endian expressions of TxIDs (by BCI and bitcoincore respectively) suggesting two different usages (ie TxIDs are values in one sense but akin to URIs in another: is this normal?)

I know the questions seem somewhat disparate but I think the best summation is what exactly are TxIDs?

How is a TxID assigned to a Transaction?

It's a hash of key transaction information -- inputs, outputs, scripts, signatures.

  Are 2 identical Txs that: double spend, have identical k PRNG-signed (so not a RNG!) sigs, identical inputs/outputs (a lot of assumptions here) given identical hashes?

This question is ill-formed. Unless there's some difference between them, they're not 2 transactions, they're one transaction. It's like talking about "two identical integers" -- that would just be one integer.


Ruby bitcoind JSON RPCCall I am trying the JSON-RPC call from https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Ruby

require 'net/http'
require 'uri'
require 'json'

class BitcoinRPC
  def initialize(service_url)
    @uri = URI.parse(service_url)
  end

  def method_missing(name, *args)
    post_body = { 'method' => name, 'params' => args, 'id' => 'jsonrpc' }.to_json
    resp = JSON.parse( http_post_request(post_body) )
    raise JSONRPCError, resp['error'] if resp['error']
    resp['result']
  end

  def http_post_request(post_body)
    http    = Net::HTTP.new(@uri.host, @uri.port)
    request = Net::HTTP::Post.new(@uri.request_uri)
    request.basic_auth @uri.user, @uri.password
    request.content_type = 'application/json'
    request.body = post_body
    http.request(request).body
  end

  class JSONRPCError < RuntimeError; end
end

if $0 == __FILE__
  h = BitcoinRPC.new('http://rpcuser:rpcpassword@127.0.0.1:8332')
  p h.getbalance
  p h.getinfo
  p h.getnewaddress
  p h.dumpprivkey( h.getnewaddress )
end

But when I try running the file, I get a RPC.rb: end of file reached (EOFError)

I have the bitcoind running, I can run various commands, but I an not seem to get this script running.

The code is free of syntax errors, but it looks like you need to replace the rpcuser and rpcpassword in this line:

h = BitcoinRPC.new('http://rpcuser:rpcpassword@127.0.0.1:8332')

To the actual rpcuser and rpcpassword values that are set in your bitcoin.conf file.

If that doesn't work, I'd suggest doing some debugging by opening an irb session and running this code to see the result of the HTTP request to the RPC service:

require 'net/http'
require 'json'

post_body = { method: 'getblockchaininfo', params: [], id: 'jsonrpc' }.to_json

uri = URI.parse "http://rpcuser:rpcpassword@127.0.0.1:8332"

def http_post_request(uri, post_body)
  http    = Net::HTTP.new(uri.host, uri.port)
  request = Net::HTTP::Post.new(uri.request_uri)
  request.basic_auth uri.user, uri.password
  request.content_type = 'application/json'
  request.body = post_body
  http.request(request).body
end

http_post_request(uri, post_body)


Are the outputs of an unconfirmed transaction part of the global UTXO pool? Well basically that. If a transaction is in the memory pool, that is, it is not yet in a block but nodes and miners know about it and validated it, Can I send another transaction that double-spends the outputs? that is, are the outputs considered unspent?

The transactions are considered spent from the nodes that already have the transaction in the mempool, that is, if you try to double-spend the transaction, they will reject the new one. However, if the transaction ends up not being included in a block, they will be dropped from the mempool after a certain time. After that, you will be able to create a new transaction that spends the same UTXOs, since from that point on it won't be considered double-spending.


agregate bitcoin addresses with tiny amounts into single wallet I've got a dozen of addresses (+private keys) with very small amounts on them (0.001 to 0.01 btc). I found many hints and suggestion like this one but I cannot realize how to implement this.
Can anybody tell which way I can aggregate those addresses in order to send their total to an exchange?

The only way to "aggregate addresses" is to create a Bitcoin transaction which spends all of the coins from those addresses to another one. Of course if you just want to send to an exchange, just send all of your coins to an exchange as aggregating will incur an additional transaction and thus transaction fees. Most wallets have some function which allows you to send all of your coins, so just use that to create a transaction which sends all of your coins to the exchange.


How do SPV clients acquire transactions from other nodes and verify that they are part of the blockchain? I explored SPV clients as a subject from a lot of different resources, but there are a few of things that are keeping me confused:

I found out that SPV clients have no mempool even though SPV clients are participating in transaction verification. So, what happens when the node verifies a transaction? Is a SPV client checking only its own outgoing transactions?
Does a transaction that a SPV client is trying to verify have a block hash as a reference where the transaction came from? Is that how a SPV client knows in which block to search for the target transaction when the SPV asks a full node for part of Merkle tree?
A SPV client asks a full node for hashes inside the Merkle tree, so it can reconstruct the part of the tree it is interested in and checks that way if a transaction is really in the block that the transaction is referring to. Is this correct? And if it is, is there anything more these two clients share?
If I'm on the right path, how do bloom filters help in increasing of level of privacy since SPV clients still needs to ask a full node for a transaction by its hash?

Thank you.

I found out that SPV has no mempool, but although SPV client is participating in transaction verification. So, what happens when node verifies transaction? Is SPV client checking only owner's outgoing transactions?

That depends on what you mean by "verification". SPV clients cannot and do not verify the validity of transactions themselves; they can only verify that they were included in a block, relying on the assumption that miners would not waste their energy on creating a block with invalid transactions in it.

Transaction that SPV client is trying to verify has block hash as a reference where did a transaction came from? That's how SPV client knows in which block to search for target transaction when SPV asks full node for part of Markle tree. Is this correct?

Transactions do not (and cannot) contain a hash of the block they're contained it; that would be a cyclic dependency. I don't understand the rest of this question.

SPV client asks full node client for hashes inside Merkle Tree, so he can reconstruct the part of the tree of his interest and that way check if transaction is really in the block that transaction is referring to.

When using BIP37, the client sends a Bloom filter of which scripts/addresses/utxos they're interested in, and then requests blocks. The server responds with filtered blocks, containing only the matching transactions, plus efficient Merkle proofs that those transactions are actually in a block with the claimed hash.

If I'm on a right path, how does bloom filters help in increasing of level of privacy since SPV client still needs to ask full node client for a transaction by its hash?

BIP37 bloom filters are primarily a way to improve efficiency - it means that with little bandwidth overhead, the server knows what to not send to the client. It was intended to optionally offer some moderate level of privacy, because a client can choose to send an overly broad filter, resulting in false positives. It has since been discovered that this basically offers no privacy at all, due to correlation the server can still observe between requested things.


What are midstate and hash1 used for in mining? The first answer here does a good job explaining how the SHA-256 function requires more than one input (an initial one is specified by to the SHA-256 specs). As far as I understand it, the "midstate" value is the initial hash of the first half of the data, used to later serve as an input into the double-hash of the second half of the data.

Is this correct?

And here is an explanation of what the "hash1" value actually is and means, but what is it used for?

1) Yes, it is correct.

2) It is deprecated. Generally, it is used to write the result of the mining over to be sent to the pool. This is to ensure the result is of correct length and adheres to some rules. In practice, it is always the same trailing string of numbers.


spam: Bitcoin address Someone deposited money into my blockchain wallet but says I must check on my Bitcoin address spam. Where is that on Blockchain because it does not appear on my transactions.

Bit unclear, but sounds like nonsense. Put your address into a bitcoin explorer (like blocktrail.com) and have a look at all the transacions (hopefully 1 or none). Make sure there are a few confirmations before assuming it's your money. If you're being scammed they might be sending you something with a too low fee, which might never confirm.


Fail to encrypt scriptPubKey in testnet I have the following testnet wallet address:

2MsQEtPJ6JJZszMYrD6udjUyTDFLczWQrv9

Which I am trying to encode as pubkeyhash to the coinbase TX in testnet.
When i run decode58, I get this

C401B47E5722F808856A308FA043CCF28323F51711E8165536

I strip it off the version byte prefix and the checksum postfix, and I get:

01B47E5722F808856A308FA043CCF28323F51711

So the scriptPubKey should be

76a91401b47e5722f808856a308fa043ccf28323f5171188ac which is OP_DUP OP_HASH160 01b47e5722f808856a308fa043ccf28323f51711 OP_EQUALVERIFY OP_CHECKSIG

But as a sanity unit test, i verify it Vs. the debug console

decodescript 76a91401b47e5722f808856a308fa043ccf28323f5171188ac

But the debug console gives me this:

  "asm": "OP_DUP OP_HASH160 01b47e5722f808856a308fa043ccf28323f51711 OP_EQUALVERIFY OP_CHECKSIG",
  "reqSigs": 1,
  "type": "pubkeyhash",
  "addresses": [
    "mffyC9xbwyBQUWhV8SbYWpqaiNSSWR2vpo"
  ],
  "p2sh": "2ND12E9b9oa9hvTTckXwNaSJiRZ39eRFWSJ"

So why do I get address "mffyC9xbwyBQUWhV8SbYWpqaiNSSWR2vpo" and not "2MsQEtPJ6JJZszMYrD6udjUyTDFLczWQrv9" as I expect?

First of all, scriptPubKeys are not encrypted and what you are doing is not encryption. This is encoding.

The problem is that you are trying to encode a P2SH address as a P2PKH scriptPubKey. P2SH addresses are different from P2PKH addresses and have different opcodes. You can identify them by looking at the version number of the address which you are not doing. The version number actually has a meaning, it is not ignorable. Your scriptPubKey should actually be

OP_HASH160 01b47e5722f808856a308fa043ccf28323f51711 OP_EQUAL


Unconfirmed. Sent to Bitcoins were sent to the correct address, but did not arrive, and Bitcoin Core wallet, information is: Unconfirmed. Sent to - How do I solve this problem? Thank you?

You wait.

In the Bitcoin network, transactions are confirmed by including them into blocks, which are then permanently stored in the blockchain.

Blocks are mined, on average, every 10 minutes, but this is actually a random Poisson process, just as you can say a given piece of uranium will emit an alpha particle every 10 seconds on average. Sometimes, blocks will be found within the same minute, sometimes it may take an hour.

Blocks also have a maximum size, which is now pretty close to the transaction volume of Bitcoin at the moment. Rational miners who receive more transactions than will fit in their block, will mine higher fee transactions before lower fee transactions. If the transaction fee you paid was very small, your transaction will eventually confirm, it will just take much longer (up to a few hours).


How can I sign a message with a multi signature address? I want to use message signing to prove control of a multi signature Bitcoin address. Is it possible? In theory it must be. In practice, are there any Bitcoin wallets that allow this? Specifically, how can I do this with Armory Lockboxes?

Signing message is proof of ownership of private key

Multisignature/P2SH address is hash of several (including zero) public keys

So, signing message with M private keys and disclosing the "contents" of msig address M-of-N is proof of control on address.

I do not know are there existing services to sign/verify p2sh addresses, but it is possible. Do not know about Armory/others.


How do different implementations of the Bitcoin Cash client know which type of coin they're processing? TL;DR: Where in this code does the SV client figure out that it's not processing an ABC blockchain?

This image prompted my question.

There are a couple different mutually incompatible (I am assuming anyway) implementations of the Bitcoin Cash cryptocurrency client software...

Bitcoin Cash ABC
Bitcon Cash SV

My question assumes that each implementation processes their respective transactions using similar but mutually-incompatible blockchain processing rules.

Is it normal to run a Bitcoin Cash SV client implementation in a Bitcoin Cash ABC network? And vise versa? How, then, does one implementation know that the network it is running in, is (in)compatible with its particular processing rules?

They don't.

They have different, but sometimes common, consensus rules. There are two competing fork blocks with different transaction ordering rules and some transactions with either OP_MUL or OP_DATASIGVERIFY. One of the blocks are valid for that client, followed by many valid blocks. Sometimes, they process transactions of both network, as the replay protection is optional. They simply process if something is valid, or not if it's not.


bitcoind JSON-RPC interface timeouts under unit tests I am running unit tests against bitcoind which do JSON-RPC requests in high rate. Random failures are an issue. E.g. if you have something like this in printconsole logs:

ThreadRPCServer method=gettransaction
ThreadRPCServer method=gettransaction
ThreadRPCServer method=gettransaction
ThreadRPCServer method=gettransaction
....
ThreadRPCServer method=gettransaction
ThreadRPCServer method=gettransaction
sending: inv (37 bytes)
ThreadRPCServer method=gettransaction
ThreadRPCServer method=listtransactions
sending: inv (37 bytes)

You start getting:

synced with network?".format(name)) from e
cryptoassets.core.backend.bitcoind.BitcoindJSONError: Got timeout when doing bitcoin RPC call listtransactions.

I have tried with both reusing HTTP connection and not reusing HTTP connection with various results.

Are there any low hanging fruits to make bitcoind RPC interface more stable (increase threads, concurrency, etc.?)

I am using the following Python JSON-RPC implementation:

https://github.com/jgarzik/python-bitcoinrpc/blob/master/bitcoinrpc/authproxy.py

UPDATE: Looks like the problematic call might be listtransactions. When called at the same the time from command line using curl there is no response either:

[~]% curl --user foo:bar --data-binary '{"id":"t0", "method": "listtransactions", "params": ["cryptoassets"] }' http://127.0.0.1:8332/ |python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:--100    70    0     0  100    70      0     58

I used BitcoinLib to perform 15,000 consecutive listtransactions calls and the result was:

0 timeouts
Fastest response: 0.1133479 sec
Slowest response: 0.6475277 sec

bitcoind was started with the default parameters and was receiving blocks during the test.


ScriptSig in P2SH-P2WPKH BIP16 I have some doubts about P2SH-P2WPKH BIP16.
I can read the witness program and I understand that a node is triggered when find 0 and 20 o 32 bytes in scriptSig or ScriptpubKey, more precisely:

If is P2WPKH nested in BIP16 P2SH node check inside scriptSig and search 0-20 bytes (witness program). the witness program must be uguale to redeem script. (address start with 3)

If is P2WPKH scriptSig must be empty. and the witness program is inside scriptPubKey (address start with bc1)

Here I have a P2WPKH nested in BIP16 P2SH transaction output. I can see 160014fdda5544c22213f51080d48da9521b452b99a92c in scriptsig.

  the question is:

For node > 0.13
is it a trigger the say to node, Hey, I'm a segwit transaction! check in Txinwitness!

For node < 0.13
Push ScriptSig inside and that's it, the transaction is ANYONE_CAN_SPEND

    {
  "txid": "1fef9c4f076c7dcd92b623bd68136938da4cac6f20fe5384e05c2856e6ec96cc",
  "hash": "df766b607caec934ce35fb0fad6d9caecdc376766135d6f76f5e5c0fad907815",
  "version": 2,
  "size": 215,
  "vsize": 134,
  "weight": 533,
  "locktime": 0,
  "vin": [
    {
      "txid": "5b263a77d64d1aa9d71335f31a46fa6e29212f164d14faea6e7340ae45f5efe6",
      "vout": 0,
      "scriptSig": {
        "asm": "0014fdda5544c22213f51080d48da9521b452b99a92c",
        "hex": "160014fdda5544c22213f51080d48da9521b452b99a92c"
      },
      "txinwitness": [
        "30440220341fd51d549c0ac8269e3711012c91dc4795bc70944ae4fbe77e0bb163977987022076150a459ec655082cae691833d205bb512e926b16511ec7ccf1785ca08476b001",
        "023bbedf4ba488bc1c0c422d14e8f5a151feeb14dae93e891d17489ec007b654ce"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 49.991,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 09731285fcf96b502243a34e2447ee9a9ffac839 OP_EQUAL",
        "hex": "a91409731285fcf96b502243a34e2447ee9a9ffac83987",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2Mt7BvNshtjdEHRysNdaBi7T82nUCEVZjoW"
        ]
      }
    }
  ]
}

For node > 0.13 is it a trigger the say to node, Hey, I'm a segwit transaction! check in Txinwitness!
For node < 0.13 Push ScriptSig inside and that's it, the transaction is ANYONE_CAN_SPEND

Almost exactly right.
Segwit validation code was added in Bitcoin Core 0.13.0, but mainnet activation logic was only added in 0.13.1. That means that 0.13.0 will not enforce these things on mainnet yet (and 0.13.1 will only do it for the part of the blockchain after block 477120).


How to download Bitcoin block headers from Blockchain.info and save to file? I am just developing and testing Bitcoin mining application in plain Javascript
(slow but can be run off-line).

To test it to work correctly I need to download Bitcoin block headers
from Blockchain.info , 6 input parameters .

Are you aware how to call Blockchain API
https://blockchain.info/api/blockchain_api

I don't use Bitcoin address, no other mining app, just need to download
a number block headers from hashed blocks.

Any idea, demo, example or csv file coming with 6 input parameters
as described in Bitcoin hashing algorithm

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

You can download the blockchain headers from here. The data is binary packed, but can be deserialized easily enough. You seem to be trying to solo mine, which is a bad idea at the best of times, let alone with JavaScript. You also seems to be trying to build a SPV client. An easier way would just be to use https://blockchain.info/latestblock to get the lastblock hash and use that.


Is the current number of confirmations visible somewhere in the raw block? Is the current number of confirmations visible somewhere in the raw block output created by blockexplorer or blockhain.info?

Is this information available in the raw stream or is the number of confirmations always "live" calculated by counting the confirmations and not "saved" in the raw stream?

The number of confirmations is (height of most recent block - height of the block containing the transaction + 1). The contents of the specific block containing the transaction are fixed, while the number of confirmations keeps increasing, so the number of confirmations cannot be in the raw block data.


Public key cryptography question - Is Private or Public key used to sign? Confusion between which key is used to sign and which is used to encrypt I am relatively new to cryptography and blockchain and am learning about how public key cryptography works, and its application in Bitcoin's environment.

I read two different articles , the 1st which made sense, but the 2nd confused me.

From the 1st article (https://www.blockchain-council.org/blockchain/how-does-blockchain-use-public-key-cryptography/), I understand that the sender's private key is used to sign the digital transaction and the sender's public key is used by the miner/receiver to verify the senders signature.

However,a 2nd article I read (https://www.ibm.com/support/knowledgecenter/en/SSB23S_1.1.0.14/gtps7/s7pkey.html) about public key cryptography has it the other way around; using Public key first then the private key after. I have attached the picture from the 2nd link:

What am I understanding wrongly? Why is the use of keys in opposite order?

Thank you in advance for your input...

What am I understanding wrongly?

You are mixing up several distinct uses of cryptography, several different purposes:

authentication
non-repudiation
privacy
proof of integrity

Cryptography in General
Purposes
Privacy
If you want to send a private message to someone, in a way that no-one intercepting the message can read it, you typically encrypt the message using a symmetric (secret-key) algorithm and a newly created secret-key. You then encrypt the secret-key using the intended recipient's public key. This ensures that only the intended recipient can decrypt the secret-key for the message by using their private key (which no one else knows). After decrypting the secret key, the intended recipient is able to decrypt the message using the symmetric algorithm.
Note that you only use a symmetric algorithm to encrypt the message because such algorithms are far far faster than asymmetric (public-key) algorithms. It is primarily for efficiency, not for any other reason.
Authentication
If you want to send a message to someone and provide proof that you sent the message, you use a different procedure. You create a cryptographic hash of the message using a hashing algorithm. You then encrypt that hash with your private key (that only you know). The encrypted hash is sent with the message. This encrypted hash is known as a digital-signature. The recipient of the message can use your public key to extract the hash and compare that with a freshly computed hash of the message, if the hashes match it is proof that you sent the message.
Types of Encryption
Assymetric
Asymmertic means you use different keys for encrypting and decrypting. There is both a private key and a public key. hence the name "public-key cryptography".
Symmetric
By contrast, an example of a symmetric (not asymmetric) algorithm is DES which is a symmetric encryption algorithm because there is only one key, the same key is used for both encrypting and decrypting. The key is a shared "secret-key" - hence the names "secret-key cryptography" or "shared-key cryptography".

Cryptography in Bitcoin
From what I've read, Bitcoin uses

Hash algorithms

SHA-256 for proof of work

Digital signatures

ECDSA for signatures on transactions

Note that ECDSA is asymmetric
Note also that Bitcoin cares about anonymity and not about privacy (the blockchain is public not private). Therefore Bitcoin does not use encryption for privacy purposes. Your Wallet software might use encryption to hide your secret keys behind a password - but that is not part of the BitCoin spec.

References

Satoshi Nakamoto, Bitcoin Whitepaper. Sections 2 and 4.
Bitcoin Wiki, ECDSA


Cpuminer problem: empty reply from server When I run the following command:

minerd.exe -o http://eu-stratum.btcguild.com:3333 -u username_1 -p password -a sha256d -R 2

I get this:

2 miner threads started, using 'sha256d' algorithm.
Binding thread 0 to cpu 0
Binding thread 1 to cpu 1
HTTP request failed: Empty reply from server
json_rpc_call failed, retry after 2 seconds

How can I solve this problem?

The miner you are using does not support the stratum protocol. Instead you must use a pool that uses the old and now obsolete getwork protocol

If I see it correctly BTCGuild still offers the getwork access with the following URL:

minerd.exe -o http://btcguild.com:8332 -u username_1 -p password -a sha256d -R 2


Why do block explorer APIs say the nonce in the block header is 0? Several block explorers are reporting that the nonce value in many block headers is 0. For example, blockcypher,

Why does this happen?

Where can I get the actual block headers?

This appears to be a bug in their software (i.e. it occurs for no reason other than it's a mistake) so you should report this to Blockcypher.


list of blocks as text file Is there a reliable source where I can download the blockchain as a text file?  Or perhaps is it included in my bitcoin-qt folder after it synchronizes with the network?

You can certainly request it incrementally from bitcoind/Bitcoin-Qt using the getblock and getblockhash RPCs, but there is no file maintained with the actual full list.


Derive private keys from a HD key HD (hierarchical deterministic) wallets contain master private key, from which all the private keys can be derived.

Is there a CLI tool that calculates the private keys out of a HD key?

You can use ku  utility provided in pycoin library.

example:

ku -s 0/0-2 xprv9xWkBDfyBXmZsA85GyWj9uYPyoQv826YAadKWMaaEosNrFBKgj2TqWuiWY3zuqxYGpHfv9cnGj5P7e8EskpzKL1Y8Gk9aX6QbryA5raK73p

will generate keys from index 0-2 on derivation path 0/x


How transaction fees differ between different wallets? In particular, I'm wondering what is the difference (if any) of transaction fees between Bitcoine-core, MultiBit and blockchain.info?

Bitcoin-Core is a full node and can therefore build up a mempool and estimate fees. This is probably the most secure way how one can estimate fees. You can verify the source code and make your own improvements. The fee estimator allows you to estimate the fees for different confirmations targets (2-25 blocks).

MultiBit does either use a web-api and/or static fallback fees. You depend on third-parties, estimating fees for you. All SPV wallets cannot reasonable estimate fees.

Blockchain.info run its own full-nodes and use it's own fee estimation logic. You need to trust the estimations produced by blockchain.infos logic.


What are the political and environmental implications of growing Bitcoin electricity consumption? I have found lots of articles talking about how bitcoin works, and quite a few that analyze the growing industry around it. Relatively little though speaks to the potential political implications of Bitcoin's growing electricity consumption.

It seems to me that since block reward and mining industry gross margins are reasonably steady in the short term, that if Bitcoin were to (say) rise ten fold in price similar to previous rises eg. at the end of 2013, this would encourage a near-proportionate rise in the hash rate and electricity consumption.

Already I read that Bitcoin consumes as much electricity as a small country. Can the world cope with the environmental consequences of a short-term 10x or 100x jump in the Bitcoin price? What might the reaction of major powers (especially China) be?

Am I wrong in concluding that a massive short term jump in the price simply won't be politically or environmentally feasible?

It seems to me that since block reward and mining industry gross margins are reasonably steady in the short term, that if Bitcoin were to (say) rise ten fold in price similar to previous rises eg. at the end of 2013, this would encourage a near-proportionate rise in the hash rate and electricity consumption.

Essentially. However, that rise wouldn't happen immediately. There would probably be an immediate rise of ten to twenty percent, as previously marginal or unprofitable mining devices get switched on. A rise higher than that would have to wait for new mining chips to be fabricated, unless someone happens to be sitting on a hoard of mining ASICs.

  Am I wrong in concluding that a massive short term jump in the price simply won't be politically or environmentally feasible?

I don't think that's true. Let's say that the price rises. The various governments agree to limit Bitcoin mining, either by preventing any new miners from being switched on, or by implementing a cap-and-trade system for electricity used for Bitcoin mining. That doesn't reduce the price - it just means that there's less mining capacity securing the system, in terms of hashes per second per unit of total value. A change in hashrate doesn't cause a change in price - it's the other way around.


What is structured fuzzing and is the fuzzing that Bitcoin Core does currently considered structured? Can you define what structured fuzzing is and the benefits it brings over plain vanilla fuzzing?
Is some of the fuzzing that Bitcoin Core does currently considered "structured"?

I'll use the definitions used in this presentation from Jonathan Metzman at Black Hat 2019 but obviously this is a relatively new field and so there may well be disagreement amongst researchers and academia on formal definitions.
In this presentation Metzman explained how the first rudmimentary fuzzers were completely black box meaning they knew nothing about the target they were fuzzing. They were also structure unaware meaning they knew nothing about the format that they were supposed to be mutating or generating and were just piping bytes from /dev/urandom etc.
The next generation of fuzzers were still black box but they were now structure aware as in when fuzzing for example HTML, they provided inputs that looked like HTML rather than just random nonsense.
Metzman believes current day fuzzers (e.g. AFL) are coverage guided, structure aware but they are unstructured. This is where Bitcoin Core is now in terms of fuzzing. I don't think there has been any experimentation with structured fuzzing (I will update if wrong).

The reason why AFL has had such a large effect and this technique as well, is because unstructured fuzzing allows people to use it without actually understanding much about the format that they are actually fuzzing. But because it is coverage guided the fuzzer generates progressively more interesting inputs and that’s why it is actually fairly good at finding bugs.

Metzman believes the next generation of fuzzers will be structured. They won’t just do the general purpose mutations that AFL does on inputs. They will do format specific ones like deleting expressions from programs rather than just flipping bits. They will also allow you to fuzz where you think the bugs are going to be.

With structured fuzzing you are almost becoming part of the fuzzer
where you see code that isn’t being covered and you make a decision
whether you think it is worth covering that code. Then you make the
fuzzer cover that code.

You will be able to do this by writing custom mutators where you define the function that will be called to mutate test cases rather than the default mutator. Currently you can write custom mutators with libFuzzer.


How can you sign a transaction without that signature being forged in the future? So thinking here about an offline transaction. Both myself and the receiver sign it, and then at a later time that transaction is broadcast to the network in the block.

What is stopping me from taking your "signature" and signing another transaction with it in the future? How does this signature prevent itself from being forged by a malicious actor.

I'm assuming this has something to do with hashing / encryption or something alike. Somehow, I have to know that your signature is authentic without knowing the exact phrase or seed used to sign it, but a little confused on how that works.

Thanks!

In bitcoin(and most other altcoins) uses Asymmetric signature scheme where every user has a pair of (public key, private key) pair where the public key is known to everyone(including the attacker) but the private key is only known to the account holder. To this signature scheme, the catch is only the person having the private key will be able to sign a message on behalf of the public key, but everybody having the public key will be able to verify that the signature is correct.

  What is stopping me from taking your "signature" and signing another transaction with it in the future? How does this signature prevent itself from being forged by a malicious actor?

A transaction say from Alice to Bob in bitcoin is of the form
I Alice pay x amount of coin to B which I got from Carol in block number i. Alice signs this message with its private key and sends it to the blockchain. Observe that each signature is unique to the message signing it.

Since each signature is unique the if the attacker retransmits the same signature again the miners will get to know about it due to the invalidation of UTXO at the first trial and reject the transaction immediately.


Why does poclbm acquire 100% CPU? I recently switched from WinXP32bit to Windows7. While under XP poclbm took about 5% CPU Time of one core, now it uses one core with 100%. Is there a specific reason for that?

I now use AMD/ATI OpenCL1.1 and poclbm with poclbm.exe -device=0 -v -w128 -f 60. MHash/s is about the same I had with XP.

This is a common problem whose cause is not well known. You can try switching miners, switching flags, or switching OpenCL versions. Usually you can find a combination that resolves the problem. I've seen this question asked several times and I've not yet seen a solid answer.


What is the exact moment when a miner gets rewarded? I know that a miner rewards self through a coinbase transaction in the newly created block. But the block has to be accepted by 51% of the network to be considered mined.

1). Does the miner get rewarded once 51% nodes accept the block? If so, how is that acceptance information propagated to his/her own node - is it done as and when each node in the network accepts it?

2). Or does the miner get rewarded the moment he/she creates a block and broadcasts to peers?  If so, how is the reward reverted if the block is found to be invalid?

A coinbase transaction it not spendable until it is 100 blocks deep in the blockchain. Since a block is produced every 10 minutes, it will typically take 1,000 minutes (just under 17 hours) before a miner can spend the reward.

  1). Does the miner get rewarded once 51% nodes accept the block? If so, how is that acceptance information propagated to his/her own node - is it done as and when each node in the network accepts it?

It's 51% of mining power, not nodes. Once 51% of mining power is mining on top of the block, it will continue to get longer at a faster rate than any other blockchain, ensuring it is eventually 100 blocks deep. (This is not really 100% guaranteed, but it works this way the vast majority of the time.)

  2). Or does the miner get rewarded the moment he/she creates a block and broadcasts to peers? If so, how is the reward reverted if the block is found to be invalid?

The reward is reverted if the block is found to be invalid because the reward was in that block. So any node that doesn't consider that block valid won't consider a transaction to spend the reward valid. In order for a transaction that spends the reward to be considered valid, the reward itself must be considered valid and the block in which the reward was rewarded must be 100 blocks (or more) deep.


What would be the easiest way to make my bitcoins into real us money? I have zero knowledge on this subject, I did not buy into bitcoins I only played poker on a website that provided them for free and ended up gathering some bitcoins. What is the difference between different websites that allow you to convert them to us currency, what is the most safest way to do this? I need all the details.

https://localbitcoins.com/ will show real people to trade with (online or by cash). It has Feedback system so you can check the person you will trading with.


How complex can bitcoin multi-signature addresses be? From what I've read, M-of-N multisig addresses are possible in bitcoin. But nothing I've read talks about the limits of that (eg I'm not sure if there are limits to M and N) nor whether there are more complex forms of multisig.

For example, something I think I would like to do is have an address that can be spent on in the following conditions:

Address A signs it, or
At least 3 of B,C,D,E,F and G sign it and H also signs it

This would allow me to have an address I can use normally that also can be accessed by a number of trusted 3rd parties in the case that Address A gets lost or destroyed. This would be useful to back up your bitcoins by distributing some keys to a number of friends (B,C,D,E,F,G) with an explanatory note and final key in your will (H).

Is this kind of thing at all possible in Bitcoin?

The limits of such constructs are the 520 bytes of the redeem script (its opcodes). A signature is roughly 70 Bytes (length code, r-key, s-key ...), so you can calculate what n-of-m versions fit into 520 bytes.
All your ideas are possible with bitcoin.

E.g. you can create a 2 out of 6 multisig for B,C,D,E,F and G.

When you say "A" can sign it, I believe it is the same as "H".
Then you run into 8 keys (8x70=560 bam...), so you are beyond the limits.
You might circumvent this when creating a simple "smart contract":

if <pubkey A> OR <pubkey B> else <2-of-6 msig>

then you are again in the limits. These type of ideas are explained e.g. in Andreas' book "Mastering Bitcoin, 2nd edition", chapter 7 "Advanced Transactions and Scripting".


Creating your own Bitcoin price ticker Say that you wanted to build your own Bitcoin price ticker from scratch, and not rely on other tickers; how would you go about that?

What variables would come in to play? How would you gauge the price of the coin? Would you add multiple tickers together to get an average, or would it be standalone?

I was always interested in this but could never get my head around how websites do their own price tickers.

There are two possible actors that may build a ticker: exchanges and observers.

Exchanges actually perform trades on their platform so they'll likely be using the last price a trade was performed as the current price.

Observers do not trade themselves and will have to rely on exchanges to get the raw data on trades. They'd then pick the last trade price for each exchange and combine them into a single value. A wide range of schemes is available to merge the values. CoinDesk for example uses an average weighted by an exchanges daily volume.


Unable to get transaction with json-rpc command I am trying this command to get transaction from bitvoin testnet:

curl  --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["txId"] }' -H 'content-type: text/plain;' http://username:password@IP:PORT/

And i am getting following error

{ "result":null, "error":{"code" :-32601, "message" : "Method not found"}, id:curltext}

Please help.

You're trying to run code from example, dont do it, try with real transaction id, not from examples.

Examples:
> bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
> bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


Can I receive bitcoin to a cold storage device without an exchange being involved? Do I have to use for example "coinbase" or another exchange to receive bitcoin to a "Ledger" device?

Answer to the title question

Can I receive bitcoin to a cold storage device without an exchange being involved?

Yes, you can.

Do I have to use for example "coinbase" or another exchange to receive bitcoin to a "Ledger" device?

No, there is no requirement of using any centralized exchange. If you want to acquire bitcoin you can do it in P2P fashion. You can buy it on P2P exchange (bisq, hodlhodl) or at your local bitcoin community meetings. Or you can ask friend who already have bitcoin to either gift you some or sell it to you. Or you can earn it. So no, you don't have to use exchange, but it's the most frictionless option for most people, due to KYC process that you have to go through, stamping your identity on the coins you want to acquire.
It doesn't matter if the address is in cold storage or "hot" storage to be able to receive bitcoin into it. Addresses don't have to be "hosted" to be able to receive bitcoin.


Getting an online Litecoin wallet I want a litecoin wallet to store the litecoins that I am going to buy with my bank account. I wanted to use ltc-wallet.com but when I try to go the site, it doesn't load. Also, when I went to sign up for btc-e I find many, many, MANY sites that say that Btc-e is a scam. Finally I found coinbase.com ...which also came with a plethora of horror stories. Is there a LEGITIMATE site that I could use in order to store my litecoins?

It's been reported that ltc wallet is DOWN and people have been scammed. Unfortunately there isn't a reputable online ltc wallet at the moment that I'd trust with a 10 foot pole. The ones that have come are just as quickly gone run by fly by night scammers. You're best off encrypting your wallet with a very secure password and making multiple copies of your wallet file that you store in remote, secure locations if you want to protect yourself from loss should your drive ever die on you.

The other option would be to start an account at an exchange that trades in litecoin and use it as your online wallet. Just be sure to use a well established exchange, of which I'm only aware of btc-e.com


Alt currencys blockchain viewer I know we have blockchain.info for bitcoin

I am trying to track a missing FTC transaction going to btc-e (seems a very common thing money going missing with these jokers)

Are there any similar tools for both Litecoin and Feathercoin FTC so I can hold these guiys to account or confirm that my funds where sent etc ?

Litecoin Block Explorer: http://explorer.litecoin.net/

Feathercoin Block Explorer: http://ftc.cryptocoinexplorer.com/

You can find all the "lesser" Altcoins on http://cryptocoinexplorer.com


What effect will the halt of the use of cpu-gpu miners have in the difficulty? Do u have an estimate about what will happen when more powerful machines make the simple gpu use unaffordable?

This would practically mean that significant part of the mining will halt. You think that the new machines' impact on difficulty will be reduced by this or this phenomenon will be not an important factor?

It won't matter. The difficulty will rise until the most efficient miners can't make a significant profit. What inefficient miners do has no effect because their actions are balanced out by efficient miners.

Essentially, take the most efficient mining setup widely available and compute the difficulty at which it just breaks even. Market forces will, over time, push the difficulty to be a bit less than that. If the difficulty is more than that, efficient miners will leave, reducing the difficulty. If the difficulty is less than that, efficient miners will enter, raising it.


Errors with `walletcreatefundedpsbt` & non-solvable UTXOs I'm attempting to use walletcreatefundedpsbt with a watch-only wallet.

With 2.0 BTC in the watch-only wallet, I attempt to create a psbt sending 0.2 BTC without specifying inputs and receive an "Insufficient funds" error:

$ bitcoin-cli -regtest -rpcwallet=watchonly getbalance "*" 0 true
2.00000000

$ bitcoin-cli -regtest -rpcwallet=watchonly walletcreatefundedpsbt '[]' '[{"bcrt1qnv3tl3z9cll9faqf79ppfn3rrp7pn9wwmq04p5gqgqtxg55xfxuslkyk94": "0.20000000"}]' 0 '{"includeWatching": true, "changeAddress": "bcrt1qa4h6amsgyc878k094grqh6ktmgvp97dt6et9cy5hjmyxlgd9q63q3p6hch"}' true
error code: -4
error message:
Insufficient funds

When I specify inputs to the same RPC call, I get a (confusing) "Signing transaction failed" error:

$ bitcoin-cli -regtest -rpcwallet=watchonly walletcreatefundedpsbt '[{"txid": "1d76879500aecafde541770b5d44ccec5955b4c1a455fae446bf1df7b5ea43e9", "vout": 0}, {"txid": "e5a8dfa9459ac154fe62652e1d43049dae13f11815da36cc32881e27917a0dff", "vout": 1}]' '[{"bcrt1qnv3tl3z9cll9faqf79ppfn3rrp7pn9wwmq04p5gqgqtxg55xfxuslkyk94": "0.20000000"}]' 0 '{"includeWatching": true, "changeAddress": "bcrt1qa4h6amsgyc878k094grqh6ktmgvp97dt6et9cy5hjmyxlgd9q63q3p6hch"}' true
error code: -4
error message:
Signing transaction failed

These inputs are visible in listunspent, but they are not "solvable".

$ bitcoin-cli -regtest -rpcwallet=watchonly listunspent
[
  {
    "txid": "1d76879500aecafde541770b5d44ccec5955b4c1a455fae446bf1df7b5ea43e9",
    "vout": 0,
    "address": "bcrt1qupu3f9ekx2jpu9adgnrckkuh60d0x5zunmrxla34cwc5z79lajrs52gcpu",
    "label": "",
    "scriptPubKey": "0020e07914973632a41e17ad44c78b5b97d3daf3505c9ec66ff635c3b14178bfec87",
    "amount": 1.00000000,
    "confirmations": 205,
    "spendable": false,
    "solvable": false,
    "safe": true
  },
  {
    "txid": "e5a8dfa9459ac154fe62652e1d43049dae13f11815da36cc32881e27917a0dff",
    "vout": 1,
    "address": "bcrt1qz9xlsapracexvk7gwjd8ytf9c5ckyeg6v64lmuun8j9x6l2770cs42f7kl",
    "label": "",
    "scriptPubKey": "0020114df87423ee32665bc8749a722d25c53162651a66abfdf3933c8a6d7d5ef3f1",
    "amount": 1.00000000,
    "confirmations": 103,
    "spendable": false,
    "solvable": false,
    "safe": true
  }
]

These UTXOs correspond to exotic scripts that cannot be expressed in the descriptor language, and were imported with the importmulti RPC. During the import, the following warning was displayed:

$ bitcoin-cli -regtest -rpcwallet=watchonly importmulti '[{"scriptPubKey": "0020e07914973632a41e17ad44c78b5b97d3daf3505c9ec66ff635c3b14178bfec87", "witnessscript": "63522102a7451395735369f2ecdfc829c0f774e88ef1303dfe5b2f04dbaab30a535dfdd62102303cc8dc4e50bb574899b4715c0ddcd63268137b2d95011ff0e71db0968d819d2103d9dcfae4253ef1dd7b2401f82f79b1e739e76ad22ad30cd6a58a04076a033e5a53ae6702f401b1755221033defb46605b0bf90e99821150926daabc0a909ae4d7e09ddd9cc691735896709210245449f5d5cb7cd0d299fcbfd7a3bf2e46a5ae43bdc75289f5ab1e0c7654cc057210299f94c03fc71ae8ced4d3a4f739cc2f227687885b8d1a5184ad1de14faa6c71c53ae68", "internal": false, "keypool": false, "timestamp": "now", "watchonly": true}]'
[
  {
    "success": true,
    "warnings": [
      "All private keys are provided, outputs will be considered spendable. If this is intentional, do not specify the watchonly flag.",
      "Importing as non-solvable: unrecognized script. If this is intentional, don't provide any keys, pubkeys, witnessscript, or redeemscript."
    ]
  }
]

Are both of these errors caused by the same problem -- the absence of "solvable" utxos?

Yes. Bitcoin Core will not be able to select for coins that are not solvable. This is because, for fee estimation, it must know how large the final transaction will be, but it cannot do this without knowing everything needed to construct the final transaction.

The outputs don't need to be spendable (i.e. you don't need to have the private keys for them) because Core knows how large a signature will be so it creates a dummy signature. But it needs to have everything else such as scripts and public keys. Without those, the output is not solvable and cannot be used in coin selection.


Bitcoin Mining Pool setup - Pool does not own wallet address I have setup multiple pools in the past for different Algo using NOMP, UNOMP, MPOS, YIIMP, etc open source solution. But it is first time I am setting a pool for Bitcoin - Tried UNOMP, NOMP, and NiceNOMP already. Mining works perfectly fine. Blocks are found, submitted, and balance is also visible in the node.
However, the payouts doesn't work. On checking the logs, I see an error
Daemon does not own pool address - payment processing can not be done with this daemon, {"isvalid":true,"address":"<wallet-address","scriptPubKey":"<script-publickey>","isscript":false,"iswitness":false}

I have triple checked wallet address with.
bitcoin-cli getaddressesbylabel ""

It belongs to the node. Just to be 100% sure, I also tried
bitcoin-cli dumpprivkey <wallet-address>

I did receive the private key for the wallet address specified. Further, I also updated the conf file to use legacy address only:
 addresstype=legacy

Node and pool are hosted on the same server connecting through 127.0.0.1
Below is the config file removing the obvious security details:
rpcuser=
rpcpassword=
txindex=1
server=1
addresstype=legacy
fallbackfee=0.00001

To all the future folks coming to this page from Google. The solution is simple.
The solution is for UNOMP, but it should be same for other pools as well.
Open:
paymentProcessors.js

go to line 84 and change
isMine to isValid

restart the pool and payment processor will load without error. I just realized that validateAddress response has changed but pool libs are not updated.


Is the target the source of the difficulty? After every 2016 blocks, the target moves up or down to try and create an average of 10 minutes between blocks.

Up until now, I've believed that it's the difficulty that drives this change, as though the difficulty is stored on disk somewhere, and the target is calculated from this key metric.

However, the only changes I see being stored on disk and shared between nodes is the target (via the bits field in the block header). This leads me to believe that the difficulty is merely a representation of the changing targets, and it's not the actual source of the target values.

So basically, am I right in saying that the difficulty is calculated from the target, and not the other way around?

e.g: bits -> target -> difficulty?

So basically, am I right in saying that the difficulty is calculated from the target, and not the other way around?

That is correct. Difficulty is just a concept introduced to make the target value easy to represent for humans.  It has no meaning internally.