text:
Can bitcoin exist without miners?
In the past year only, the bitcoin mining difficulty has increased fivefold. If in the coming years the difficulty increases so much that mining is no longer profitable (i.e. consumes more power than money is earned), can the bitcoin network exist without miners? Can bitcoin supporters or governments have data centers that handle transactions only and do not spend computational resources on mining new bitcoins?

FYI: coins that don't use a blockchain but a DAG (directed acyclic graph) can exist without miners (iota, byteball)

Whether or not it's profitable... Sometime in ~2140, due to Controlled Supply there will be no more coins to mine (or there abouts, depending on increases or decreases in mining capacity).

One newbie comment (from a newbie!)  When folks hear about bitcoin mining they assume it means, finding new bitcoins.  But, the other function of bitcoin "mining" is, proving transactions.

The main trick is that no one can not mine the treasures using his personal facilities.

What if a restaurant gets so crowded that nobody goes to it? Won't they go out of business?

if in the coming years the difficulty increases so much that mining is no longer profitable

That's not really possible. The mining power is set so that the miners need 10 minutes in average to mine a block. If 50% of the miners would disappear because it's not profitable any more, the difficulty would decrease so that it's profitable again.

Can the bitcoin network exist without miners?

Yes and no. There is still the decentralized blockchain, so you can still check who has how many bitcoins, and you can view the whole history of transactions (they do still exist), but you could not spend them if nobody would mine the transactions.

Can bitcoin supporters, or governments have data centers that handle transactions only and do not spend computational resources on mining new bitcoins?

Transactions can't be confirmed if nobody spends the necessary processing power to mine blocks. Confirming transactions requires mining.

I believe the question was whether transactions can be confirmed if nobody spends the necessary processing power to mine blocks. So the answer to the last part would be "no". But I think you have also adequately explained why that is a non-issue.

How can the difficulty decrease if miners disappear?

Perhaps mining transactions is confused with mining bitcoins? I think the question only meant the latter.

@DmitriZaitsev That's a question about something fundamental to how the Bitcoin protocol works. Ask it as a separate one if it hasn't already been asked.

The real risk is if something happens and 90% of the mining power disappears.  Ten minutes per block versus 20 minutes is no big deal; ten minutes versus 100 minutes is.  A 50% drop in mining power will be reflected in a difficulty change after no more than a month; a 90% drop will take almost half a year to recover.

If 90% of the miners decide it is not profitable, and they have 9 times mining power of the active miners, I think their better strategy is to collude and break this system. Especially if they are using dedicated hardware.

kasperd interpreted the last part of my question correctly. @Alpha if you would please edit the answer and add that confirming transactions cannot be done without mining, I will accept this answer.

Complete loss of mining would shut down transaction confirmation on Bitcoin. Transactions are confirmed by being included in a block of the blockchain.
As the mining reward is released to the successful miner by the Coinbase transaction in the block they authored, it is not possible to confirm transactions without the expending the work of mining for the block subsidy.
Luckily, the difficulty should never grossly exceed the available hashrate, as the difficulty is a self-regulating system that adjusts every 2016 blocks. At worst, a portion of the hashrate would leave the network, making block intervals longer for some period until the difficulty adjustment normalizes the block intervals.
Herenby, the readjustment scales the difficulty up or down to a limit of factor 4, such that the next 2016 blocks would take 14 days if the hashrate were to stay the same as in the past difficulty period.
As there were great advances in hashing hardware since Bitcoin emerged, so far the difficulty has been mostly adjusting upwards, and the average block interval is in average closer to nine minutes than ten.

Loss of mining for transactions or for new bitcoins? Even if no bitcoins are mined, why would this matter to support the transactions?

@DmitriZaitsev: The mining reward is paid out with a transaction. Mining for confirmations and mining for the block reward are one and the same thing.

So how is it related to new coins? The transactions can be separated from new coins, can't they?

@DmitriZaitsev: The block subsidy (new coins) are paid out in the Coinbase transactions of the block the successful miner authored. The Coinbase transaction also collects the transaction fees. The block may contain more transactions that get confirmed by the block. Without blocks there are no confirmations, nor new bitcoins.

@DmitriZaitsev no, pretty much the entire point of the system is that the two are inextricably linked, so that the coin reward creates an incentive for miners to do the work of confirming transactions.

@Murch If every transaction needs the increasingly expensive block creation, how can that work on scale in long terms? And how then Bitcoin can compete against newer currencies, which will do the same job easier and faster?

@DmitriZaitsev: Perhaps it would be better if you asked a new question. This is getting further and further away from the topic here.

In fact. https://bitcoin.stackexchange.com/questions/66663/as-transaction-mining-is-getting-increasingly-slow-and-expensive-how-can-bitcoi

Herenby? Hereby?

can the bitcoin network exist without miners?

Not really, the network may still exist reporting historical transactions and collecting unconfirmed transactions but without miners finding blocks transactions will never confirm.

Can bitcoin supporters or governments have data centers that handle transactions only and do not spend computational resources on mining new bitcoins?

No

In the past year only, the bitcoin mining difficulty has increased fivefold.
  If in the coming years the difficulty increases so much that mining is no longer profitable (i.e. consumes more power than money is earned)

Understand that difficulty is reactive to the amount of mining power aiming to keep the block rate roughly constant. Increased difficulty is driven by increased mining, similarly decreased mining would result in decreased difficulty. So as long as changes to mining capacity are gradual the number of miners should have little impact on transactions.
Mining in turn is driven by economics, if mining is profitable more mining equipment will be brought online. If mining loses money then mining equipment will be taken offline. An equilibrium should be reached where the cost of mining is comparable to the income (mining rewards and transaction fees) from mining.
However there is a catch, the difficulty only adjusts every 2016 blocks and it can only adjust by a factor of 4 each time. If there is a sudden crash in the value of bitcoin (or in the post-reward era a sudden crash in transaction fees) a large proportion of mining infrastructure may suddenly become unprofitable. If the unprofitable infrastructure is shut down too quickly it could cause major problems for bitcoin.

As long as someone has a copy of the blockchain, I guess Bitcoin "exists". However, if nobody mines blocks, there will be no new confirmed transactions, so generally nobody could spend their Bitcoin anymore.
However, the beauty of difficulty is that it also falls. If miners stop mining (e.g. because it is unprofitable), then the difficulty falls, and it becomes easier to mine. In an extreme case it could fall low enough that people could mine with a simple CPU again*. As long is someone is willing to pay the fee (which could be extraordinarily low if miners are able to use simple, efficient, low-cost hardware) it would almost certainly be profitable as long as people are willing to pay even a tiny transaction fee.

Back in the day many people mined Bitcoin with simple desktop CPUs. Today given that the two billion or so smartphones have high performance GPUs built into the chip, they could probably out perform  desktop CPUs and be more efficient. However, on a hash-per-watt basis, ASICs are dramatically more power-efficient than CPUs or GPUs. So after the zombies come, if difficulty falls low enough we'll probably just get an old ASIC out.

Difficulty only falls when blocks are mined.  If mining activity actually drops to zero, then the difficulty is stuck wherever it was when the last block was mined.  If mining activity falls too fast, difficulty can't adjust to keep up.

@Mark True, but my broader point, to the OP's question was that it is unlikely that difficulty will "increase so much that mining is no longer profitable", since as it becomes unprofitable people stop mining, thus reducing the difficulty and making it profitable again. Now your point that once it is literally zero, difficult is locked in is true. However, it is unlikely that mining will go from something meaningful (i.e. a point where mining is unprofitable) to zero in a single 2016-block period (i.e. two weeks).

Complete loss of mining is not possible I believe. Even if it is possible theoretically, it won't happen in practice unless bitcoin prices goes to zero.
Let's assume total mining power (hashrate) decreases in the network and people choose to not mine. Then difficulty will also decrease, which means total power needed to consume to mine a block will decrease as well. So, at some point mining will again become profitable, and people will choose to mine. It is the basic game theory behind the Bitcoin.
However, there is a way more severe consequence of decrease in total hashrate: Security vulnerability. If total hashrate decreases, it will require less resources to perform a %51 attack and will increase the probability of success of the attack. When people start to think that Bitcoin is no more secure, everybody start to move away, not only miners. Losing users leads bitcoin prices go down to zero. Just like a small snowball which becomes an avalanche.
To sum up, yes losing miners would possibly end up with slowly disappearing of whole Bitcoin ecosystem.
There is currently no way to handle transaction without mining process. If your suggestion of government acting a role in transaction verification happens, then bitcoin becomes non-decentralized and it loses whole point of being open, censorship-free, neutral and borderless.

What do you mean with "yes losing miners would end up with missing of Bitcoin"? If you have 51% of the hashing power, you can't regardless do anything. You can't let bitcoins disappear and you can also no initiate transactions as you don't have the private keys.

I meant "disappearing of whole Bitcoin ecosystem", not bitcoins as tokens/coins of users. I changed the expression though, thanks for the comment.

Let's assume mining power decreases rapidly (say, 0.6% per day), while bitcoin prices remain constant.  Because difficulty only changes every 2016 blocks, this is equivalent to a 10% increase in the cost of mining, which in turn will cause more miners to leave, which causes the cost of mining to go up, which turns into a self-sustaining loop: the difficulty can't fall fast enough to keep up with the loss of mining power, so the cost of mining rises exponentially, even though the price of bitcoin is constant.

@Mark Yes, if mining power constantly decreases (0,6%) then average time to mine a block increases %10 (from 10 to 11 minutes). However, after two adjustments, difficulty decreases about %20 as compared to our initial difficulty. Adding up the %10 mining time increase; after two adjustment cycles we would have new difficulty about %88 of our initial difficulty. Eventually, decrease in the mining power, causes  decrease in the overall difficulty. Then at some point, some miner who left may decide to mine back again since it would be more profitable with the difficulty of that time.

This is a fascinating question.  Of course, the first answer is rather boring: "the difficulty of mining is constantly changing, so the law of supply and demand will ensure there are always miners."  However, it we set this part of the answer aside, we get to dig deep into what a bitcoin really is, and that's what makes this question so much fun.
When you offer something of value, such as a good or service, in exchange for a bitcoin, you are making the assumption that everyone makes when they use a currency: that the buyer can give you something of value in return for your good or service.  In the case of cash, it may be nothing more than a piece of paper which you trust other people will find value in.  Bitcoin is the same way, but a bit more nuanced.
If you are receiving a bitcoin in exchange for your good or service, you start by creating a "private key" for a bitcoin account, which is basically a random number.  Now when you get "paid" in bitcoins, what actually happens is that the buyer publicly announces some information which makes your private key worth something.  This something is the body of the transaction, which includes the information that proves the buyer is in a position to transfer a bitcoin.
What makes this information valuable is that you have confidence that, with that public information in hand, your "private key" is now empowered to make you a buyer of someone else's goods and services.  It's a bit exotic sounding, if you ask me.  The buyer effectively blesses a random number that only you know to have some value by uttering a phrase, but if you really look at what happens when a buyer announces a transaction to be added to the block chain, that's what they're really doing!
Of course, the value of that information is only worth what the next seller of goods and services will accept its value as.  One of the fundamental assumptions which sellers use to determine if your private key for a bitcoin account is valuable is whether the previous transaction could ever be "double spent," meaning the person who bought your goods and services uses that bitcoin to "bless" two separate transactions when they were only supposed to use it once.  In cash terms, this would be the equivalent of photocopying a dollar bill and spending it twice.  And that's where mining and the block chain becomes important.
With bitcoin, there is a master ledger known as the "block chain."  If someone uses a coin to bless someone else's account (i.e. they spend the bitcoin), and that action appears on the master ledger, others are expected to recognize that that coin cannot be reused to bless a second account (i.e. double spent).  This ledger is consistent, containing no double-spent coins.
The miners maintain this master ledger.  They are paid to do so (by both the "freebie" coins that are minted for the miner with every block and by transaction fees paid on each transaction), and their services are to make it computationally infeasible for anyone to "cheat the system" by breaking down this one master ledger guarantee.
Without miners, there would be nobody to maintain this master ledger.  A coin would only be worth how much people trusted it would not be double spent.
There are solutions to this:

Your solution is that a government entity comes in and becomes the de-facto maintainer of the master ledger in the absence of miners.  This turns the currency into something more like a traditional currency backed on the faith of the nation issuing it.
You could have each individual player try to pitch in and help authenticate the web of transactions in the absence of a formal block chain.  This is the approach Iota is using.
You may find that your bitcoins are utterly worthless, as nobody values your ability to utter a key and unleash the bitcoins you earned.

Of course, none of these will come to pass.  In reality, the difficulty of mining a new block scales, as many of the other answers have put forth.  Eventually the difficulty will drop low enough that it will become profitable for miners to mine (just as it was profitable in the early days of BTC).  The tradeoff, of course, is that the easier it is to mine a new block, the easier it is for a hostile entity to apply enough hashing power to corrupt the block chain, forking it so they can double spend coins.  Bitcoin is resilient against such computational attacks because the difficulty of mining is high enough.

IMHO it is important for the businesses accepting bitcoin and the people using bitcoin (everyone :))  in the future to each maintain a certain level of hashpower thereby keeping it decentralized and secure.


text:
Was the time warp attack the only reason it was not safe to compare chains by length?
One of the weaknesses of bitcoin listed on that wiki is that it was once vulnerable to the time warp attack. This attack lets a miner with >50% of the hash power to solve many more blocks in a short amount of time, essentially gaining a higher than appropriate reward. It can also be used to create a chain that is extremely long very quickly while keeping the difficulty low.
Was the time warp attack the only reason it was not safe to compare chains by length? Asked a different way, if the time warp bug was fixed in bitcoin, would comparing chains by length always produce the same result as comparing by work done?
Relevant: Theymos suggests in this answer:

Satoshi didn't initially realize that choosing the correct chain by just counting blocks allows for some extremely easy attacks. Version 0.1 just counted blocks. That's why the paper just says "longest". The idea of "chain work" was added a little later.

I'm not entirely sure this is correct and I don't have time to research it right now, but I think the answer starts with "No, because difficulty can only increase 4x or decrease 1/4x in a single 2,016-block period.  This means an attacker who can start their fork back in time can create more blocks with less total proof of work than the honest chain."  Anyone who wants to do the math to verify that should feel free to write the answer. :-)

If the time warp bug was fixed in bitcoin, would comparing chains by length always produce the same result as comparing by work done?

No.  It's easy to create a chain with more chainwork but fewer blocks.  For example, lets say we have a chain with 2,016 difficulty 1 blocks.  This chain is created in 20,160 minutes so the difficulty doesn't change next period, meaning that by block 4,032 we have 4032diff chainwork:
  2016 *  diff1 == 2016diff
+ 2016 *  diff1 == 2016diff
--------------------------
  4032 blocks with 4032diff

Then somebody mines an alternative chain with mining equipment that's 4 times faster, producing the first 2,016 blocks in 5,040 minutes.  Difficulty increases to 4 and by block 2,521 this chain has more chain work but less blocks than the first-described chain.
  2016 *  diff1 == 2016diff
+  505 *  diff4 == 2020diff
--------------------------
  2521 blocks with 4036diff

I assume you're more interested in practical attacks against Bitcoin's mainnet chain if that chain still used longest-is-best logic.  Here's an easy one:

The Genesis Block is dated 3 January 2009.  If you mined only difficulty 1 blocks from then until now (144 blocks a day), you'd have about (144*365*6)+(30*144)==319680 blocks.
The "real" block chain has 342,908 blocks, a 23,228 block difference.
Because difficulty can only increase 4x in a single 2,016-block period, mining 23,228 blocks would only requiring going from difficulty 1 to difficulty 4**(23228 / 2016) == 4194304.
Although difficulty 4,194,304 sounds high.  Current mainnet difficulty is 44,455,415,962.  So, if I did my math right, you can create a chain longer than mainnet with roughly 0.001% of the current network hashrate.

Basically, you could mine most of the chain at the min difficulty and then ramp up the difficulty right at the end to get more blocks than there are on the chain. You might end up at the same difficulty, but it would be a lot easier to create the early part of the chain. You could also do something like this: https://gist.github.com/scmorse/ecd204f0a0974270ba90.

@David A. Harding: did you really mean to write "it's easy to create a chain with more chainwork but fewer blocks"? Because then you describe how with 0.001% of the hashpower you can create a longer chain (not one with more chainwork). You also write that "with mining equipment that's 4 times faster" you can create a chain with more chainwork. So if you need more hashrate to create a chain with more chainwork, it's hard, not easy to do right? It's creating a chain with fewer chainwork but more block that is easy (from what I understand of your explanation) no!?

@StephenM347: regarding ramping up the difficulty right at the end... You'd end up with more blocks, the same (or higher) diff at the end but the honest chain would still have more chainwork no!?

@CedricMartin that is what could happen if bitcoin had a less intelligent form of chain comparison. It's not actually possible with how bitcoin works.

@CedricMartin I apologize for the confusion.  I meant that it's 'easy to create a [demonstration] chain with more chainwork but fewer blocks'.  You are correct that it takes more proof of work to create a chain with more chainwork.

source: Stack Exchange

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

sort: votes


text:
Recent Bitcoin fork/why didnt I get credit?
I am new to this crypto currency thing and am soooo confused but learn more and more everyday! What I am trying to figure out now is:

I own a fraction of a Bitcoin on Coinbase. I look at coin base as my “ETrade”. I can just buy and sell there, is there a better place and if so why is the other place better?
Recently, in November, Bitcoin had a fork. I was under the impression during a fork it is just like a “split”. I thought I would get equal “shares” of Bitcoin under a different symbol and/or Blockchain. I do not see where I received anything. Why?
Should I hold my coins elsewhere to take advantage of forks? If so, where?

Thank you so much for trying to clear up my spinning head!

https://support.coinbase.com/customer/portal/articles/2853600-bitcoin-cash---frequently-asked-questions

If you had your coins in coinbase, you won't be credited as coinbase owns your private keys. To get your hard fork credits, you needed to have your funds in a external wallet with access to your private keys. After a fork happens, you can download a wallet that supports the new coin and import your private keys into it.

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


text:
How do I inherit bitcoins after the death of my relative?
My brother died, and I am the sole survivor.  I have death certificate.
I have no info from him, but how do I retreive bitcoins he told me he has?

I have no info..

Without information, you cannot get control of any Bitcoin your brother possessed.
You need some details of his wallet or of his account with a Bitcoin exchange.

How do I retreive

If he looked after his own money in a Bitcoin wallet on a computer or phone, you need to be able to log in to that device and run the wallet program and enter any password he set on the wallet. He may have kept a note of his wallet's "private key" or its 12, 18 or 24-word "recovery phrase" written down somewhere safe. E.g. on paper or stamped metal in a safe. If so, you can use this information on a different computer to create a new wallet that controls the same money.
If he had an account with a business that looked after his money for him, you'll need to find out the name of that business and his login details. It is possible you would find some details in his old email messages.

I have death certificate.

That might be of use if his money was in an exchange and you know his account name but not his account password. You or the executor of his estate would need to contact the exchange  directly about this.

You will be contacted by people offering to help you. 99% of these will be scammers intending to trick you into trusting them with any details you find, or who will trick you into paying invented recovery fees but who will never give you access to your brother's money. Be very very careful.

If you have the public address you can see how much it is currently holding, but there's some additional steps you'll need to review before transferring it somewhere else. I recommend looking into Cryptocurrencies and wallets like found on Coinbase's FAQ and Bitcoin.org's.

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


text:
GDAX C# example
https://github.com/dougdellolio/gdax-csharp
I'm trying to get this working but when I try to build it says a few thjings don't exist.

Severity    Code    Description                 Project File    Line                                                                        Suppression State
Error       CS1003  Syntax error, ',' expected  GDAXClient      C:\Downloads\gdax-csharp-master\GDAXClient\Services\AbstractService.cs  70  Active

if (!httpResponseMessage.Headers.TryGetValues("cb-after", out var firstPageAfterCursorId))
{
    return pagedList;
}

var subsequentPages = await GetAllSubsequentPages<T>(uri, firstPageAfterCursorId.First());

pagedList.AddRange(subsequentPages);

return pagedList;

and:

Severity    Code    Description                                                     Project File    Line                                                                        Suppression State
Error       CS0103  The name 'cursorHeaders' does not exist in the current context  GDAXClient      C:\Downloads\gdax-csharp-master\GDAXClient\Services\AbstractService.cs  91  Active

if (!subsequentHttpResponseMessage.Headers.TryGetValues("cb-after", out var cursorHeaders))
{
    break;
}

subsequentPageAfterHeaderId = cursorHeaders.First();

I'm very confused...

Solved by using another Gdax C# wrapper. (https://github.com/sefbkn/gdax.netcore)
Got application connected, auth'd, and receiving data.
Cheers

This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

gotta love it. no one answers my question. i found answer to get it working and people here to vote it down.

This was auto-flagged as low quality, and it is.  Link only answers are petty awful.  At the very least summarize why this fixed things.  If you still don't know...maybe it's not worth posting an answer.


text:
What is a Miniscript fragment? And what should I call the underscore letter?
An example Miniscript is:
and_v(or_c(pk(B),or_c(pk(C),v:older(1000))),pk(A))
(Generated using this Miniscript site).
What would a fragment be here? What should I call the underscore letter (_v)? And the (v:)?

What would a fragment be defined as here?

The functions in Miniscript (e.g. and_v, older(1000)) are referred to as fragments.

What should I call the underscore letter (_v)?

and_v is the fragment and the _v part of it is the suffix.

And the (v:)?

The v: in v:older(1000) is a wrapper.
Some additional definitions may be of interest.
We use the term valid for any correctly typed Miniscript. And we use the term safe for any sane Miniscript, ie one whose satisfaction isn't malleable, which requires a key for any spending path, etc.
Thanks to individuals for answering this on IRC.

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


text:
Mining Bitcoin at 1000x Efficiency
Bitcoin secures its network by forcing miners to solve a cryptographic puzzle who's difficulty increases based on the total hashing power of the network. If someone were to develop an algorithm that enables them to solve this puzzle say 1,000 times more efficiently (faster) than anyone else on the network they would be able to mine most (or a good portion) of new Bitcoin for pennies on the dollar. Assuming the person only uses his knowledge to mine Bitcoin at a much greater speed/efficiency compared to other miners (and does not hack anything or attempt to double spend etc) would the network be able to detect that something like this is happening?
I suppose not, because the hashing power of the network is not something that is known explicitly. It is something that is implicitly calculated based on the assumption that there is no possible way for a single individual to solve the cryptographic puzzle more efficiently than anyone else.
Is my assessment accurate?
Thanks

Market laws suggest that if said person would use his 1000x more efficient miner in any non-trivial scale, he would push other miners out of the market. The difficulty would steadily increase and other miners would be operating at a loss.
So I guess the answer is yes, other people would notice if such thing happened.

thanks for your reply. How would the other miners conclude that in fact this person has succeeded in breaking some level of encryption as appose to simply assuming someone purchased (or manufactured) more mining equipment? That is the gist of the question. I agree that by mining at 1000x efficiency "he will push other miners out of the market" as their loss will now exceed their profit by a huge margin. But the question is how can other miners conclude that it is due to 1000xincrease in mining efficiency vs. a rapid increase in the natural uptick of hashing power we've seen over the years?

let's also assume the person is not a fool and increases his "share" of mining power over the course of months (and maybe years)

Because if everyone else is mining at a loss it means that someone must be mining with a profit (due to a more efficient miner)

Let me give an example. Say you run a mining farm with the most efficient miner on the market and you can turn 1000$ worth of electricity into 1200$ worth of bitcoin. Now say that your profits suddenly start to diminish significantly and are now to the point that you only get 200$ worth of btc for 1000$ of electricity. The only rational explanation is that you no longer have the most efficient miner out there.

I agree. However, since there are so many variables at play (cost of mining hardware, cost of electricity etc) the person mining at 1000x efficiency could use his knowledge to exclude all miners that are not running at 100% efficiency. Those miners will conclude that they simply need better hardware or cheaper electricity to compete. I think most of the network isn't mining with 100% efficiency because of the big fluctuation in electricity cost around the world.

Average interblock times is 10 minutes. Every 2016 blocks (2 weeks if the hashrate is constant) difficulty is readjusted. If you start mining much quicker, the interblock time of these two weeks will be less than 10 minutes and the difficulty will increase. The opposite is also true.
The total hashrate is estimated using the average interblock times in a time interval and the current difficulty.
The units of hashrate is hashes per second. Whether you found a more efficient mining method or added more computers to the network doesn't matter to the rest of the network.

thanks for your reply but I don't see how this addresses the question. The question is if something like this did occur are there ways for the network to prove it with a relatively high confidence level..


text:
Solo Mining with Diablo-D3 Miner and Stratum
I'm using Diablo-D3 Miner to solo mine for a personal project. I setup Diablo-D3 Miner on my machine but since I do not want to download the entire blockchain (currently, over 200 GB) I decided to go with a "solo mining pool" known as ckpool. The issue is that they use the new stratum+tcp protocol and as far as I can tell Diablo-D3 is using the old http protocol. If I try connecting with http I get error: Cannot connect to solo.ckpool.org: Unexpected end of file from server
To resolve this issue, I tried using stratum-proxy to bridge the gap between http and stratum+tcp however in Eclipse console I'm observing the following message:
ERROR: Cannot connect to 127.0.0.1: Unexpected end of file from server

I'm aware that Diablo-D3 is no longer being maintained and that there are other solutions available (such as cgminer) which are both faster and more up to date. However, I am using this for a personal project and I'm only proficient in Java so I need to get Diablo-D3 (or something equivalent written in Java) to work.
Thanks


text:
Lessons from the Mt. Gox Hack - 850,000 Bitcoins Stolen

Mt. Gox was a bitcoin exchange based in Shibuya, Tokyo, Japan.
Launched in July 2010, by 2013 and into 2014 it was handling over 70%
of all bitcoin (BTC) transactions worldwide, as the largest bitcoin
intermediary and the world's leading bitcoin exchange.

Mt. Gox announced that approximately 850,000 bitcoins belonging to
customers and the company were missing and likely stolen, an amount
valued at more than $450 million at the time

Today that amount of Bitcoin would be worth nearly $40 billion dollars (depending on the day of the week).
Reading the above makes me concerned. If the world's (once) largest exchange was unable to prevent a hack of this magnitude, how can any exchange (without a multi million dollar security budget) be reasonably certain that hack like this won't effect them?
Is there a consensus (or at least a plausible theory) as to what went wrong on the technical side that allowed such a large exchange to be hacked? What practical lessons can one learn from this story in terms of securing their users funds?

Today, most of the largest exchanges are multi-million dollar companies with large budgets, monitored by regulators, etc. There are security protocols in place, such as the majority of Bitcoin being held in cold storage and requiring multiple people to access, which limit the possible extent of a hack.
Meanwhile, the small exchanges do still get hacked and shut down. It is one of the reasons why people tend to recommend sticking to the larger exchanges.


text:
Restoring a hardware wallet
Sure this asked many times before and is available but I cannot find it!
I understand that all that is stored on a hardware wallet is private and public keys etc.
My lack of understanding arises when the need to recover a lost hardware wallet occurs. How is it that entering my seed words on a new device regenerates the essential data which was on the original. Is it encoded in the seed sequence? Seems like a simple question but I cannot see it anywhere explicitly stated. Been through Trezor manual and nothing!
Much obliged if you have been able to bear with my ignorance (stupidity) and can stand to reply

I am now aware that data reconstructed from seed. Where else? Sorry to have had to ask the obvious. Got this off your forum.

The 12, 18, or 24 word mnemonic that you have (colloquially referred to as the seed) is a BIP 39 mnemonic. This encodes a 256 bit number which is then used to derive the private keys in your wallet.
All of the private keys in your wallet are derived using the method described in BIP 32. This allows for private keys to be derived from a fixed seed (which is encoded by your BIP 39 mnemonic) and to be done so deterministically, i.e. the same keys are always derived.
So when you restore a hardware wallet or any other wallet that supports BIP 39 and BIP 32, you are really just setting a fixed seed which is then later used to derive all of your private keys.


text:
Where is the data folder for Bitcoin-Qt?
Where can I find the blockchain, wallet.dat, etc. on each of the operating systems Bitcoin-Qt supports?

I see questions which answer this for particular operating systems, but would like an answer to be able to point to that works for any supported OS.

http://bitcoin.stackexchange.com/q/1350/659 has the OSX path.

This is not an exact duplicate, but asking about how to change the default storage location has been posted many, many times. The future canonical question is probably Bitcoin-Qt setup: Change block-chain file location, settings? documentation?.

To be fair I asked this almost a year before that other question was asked.

Also the question you linked to doesn't have any information that answers my question. There's no mention on the MacOS path, for instance.

For Ubuntu or Linux installs with snap, it's at ~/snap/bitcoin-core/common/.bitcoin

It is the same data folder as the non-QT version of the standard client used to use:
Linux:
~/.bitcoin/
MacOS:
~/Library/Application Support/Bitcoin/
Windows:
%APPDATA%\Bitcoin
(This defaults to C:\Documents and Settings\YourUserName\Application data\Bitcoin on Windows XP and to C:\Users\YourUserName\Appdata\Roaming\Bitcoin on Windows Vista, 7, 8, and 10.)

On English versions of Windows I presume(?)

Also have English version and no Bitcoin folder there

It might be worth noting that it is also possible to specify a custom data directory, using the -datadir= option from command line.
This actually allows to have multiple running instances of bitcoin: you just need to run bitcoind/bitcoin-qt twice, specifying two different data folders.

On the new Mac OS X you can't see the Bitcoin folder in the library under /application support/. You have to use Finder and in the menu look for GO and then GO TO type ~/Library in the box. After that you can see the Bitcoin folder under /application support/.
Or you can hold down the Option key while selecting the Go menu and Library will become an option.

This works as of June 2018

On windows8, the data folder is here:
C:\Users\ ... your user name ...\AppData\Roaming\Bitcoin\

So exactly like Windows 7?

I also have Windows 7 and no Bitcoin folder there

@ThePiachu is right

Linux:
~/.bitcoin/
macOS:
~/Library/Application Support/Bitcoin/
Windows:
%APPDATA%\Bitcoin

But since there are no instructions, it may be hard for a user to find them, so I'm going to add instructions.
macOS
1) Click the Finder symbol

2) Press command (cmd) ⌘ + option (alt) ⌥ + G at the same time.
3) Paste this into the window that opens:
~/Library/Application Support/Bitcoin/

4) Press "Go"
5) That's your Bitcoin folder!
Windows
1) Choose one of your folders, and open it (we won't do anything with the folder, so it doesn't matter if it's very important for you).
2) Click the folder icon next to the file location.

3) Paste the following:
%APPDATA%\Bitcoin

4) Press Enter ⏎
5) That's your Bitcoin folder!


text:
Does BIP148 (UASF) offer any replay attack protection?
Is there any protection against replay attacks in BIP148?
Despite the popular name (UASF), it's effectively a hard fork (in the sense users with old nodes will be on a different chain), is there any protection against taking the transaction from the longer chain and putting it on "UASFCoin" chain, or vice versa?
Something like Ethereum with EIP155 / chain ID.

related: What is a soft fork?

As is stated there - "if less than 51% of the hashing power switches to the new version, it behaves like a hardfork" - which can very well happen in UASF

What I meant there when I wrote this two years ago was: A soft fork with minority hash support will lead to a persistent chain split as a hard fork would. It is still distinctly different from a hard fork as the software is forwards compatible, and this split could still self-mend if more hashrate converges on the soft fork chain.

Which applies to BIP148 too though. If it has minoritity - which it can, since it has a flag day and not a miner requirement. So it's something in between.

It's forwards compatible and therefore a soft fork.

It's not fully forwards compatible - if the segwit chain has less hashpower, the old nodes will be on a different chain, as you yourself noted in the answer :)

No. BIP 148 is a soft fork as the BIP 148 chain is valid to all non-BIP148 nodes and can wipe out the non-BIP 148 chain if it were to be longer than it. Because it is a soft fork, there cannot be any replay protection otherwise it would become a hard fork.

Hm. But it has a big chance of being shorter than the other chain (that's because it's "user activated" and not "miner activated"), so replay attacks are still possible, if both chains keep being mined and used. But it's true that replay attack protection is impossible in this case.


text:
How do I transfer bitcoins into a United Kingdom bank account?
Does anyone know the best way to change bitcoins into pounds (GBP), then do a bank transfer or paypal transfer? I've found some, but they take a week.

The factors that matter for any cash-out decision are:

Where are you located (country)? (you mention UK)
How much are you looking to trade?
What type of cash are you looking to receive? (you mention bank transfer or PayPal)
How soon do you need access to the proceeds?
Is privacy important?

Specifically for cash-out to PayPal, options include:

http://www.FastCash4Bitcoins.com (among the lowest fees, funds not always available though)
http://www.VirWoX.com (BTC --> SLL, SLL --> USD)

BitBargain is probably your best method:

https://bitbargain.co.uk

Or, of course, you have many local cash out methods:

https://localbitcoins.com/postal_code/uk/london/

And there are local traders who will buy your coins:

http://bitcointalk.org/index.php?action=profile;u=65105
http://bitcointalk.org/index.php?topic=130949.0

You might be able to find someone willing to trade over-the-counter (OTC) but you only want to do this with a trusted counterparty.  The #bitcoin-otc marketplace's Web of Trust (WoT) will help as it has a trust history.

http://www.Bitcoin-OTC.com
http://webchat.freenode.net/?channels=#bitcoin-otc-foyer
http://webchat.freenode.net/?channels=#bitcoin-otc-uk  <-- Specific to UK

Here are more cash-out options:

http://en.bitcoin.it/wiki/Selling_bitcoins

Where are you located (country)? (you mention UK) Yep UK
How much are you looking to trade? It will be small amounts to start till I get my mining rigs up
What type of cash are you looking to receive? (you mention bank transfer or PayPal) Either of those would be great
How soon do you need access to the proceeds? if it takes a week it would not bother me.
Is privacy important? meh 50/50 really. Also I live about 6 hours from london so sites like that don't work for me.

Sorry forgot to add this bit and the other comment looks horrible not worked out the proper spacing in comments on this site yet. I can't use http://www.fastcash4bitcoins.com/ because it is made for american transfers only.

not worked out the proper spacing in comments on this site yet I like to surround the part I'm quoting in tilde marks, like `this`

I would sell them on LocalBitcoins. The current link is http://localbitcoins.com That way, the buyer's money is transferred directly to your U.K. bank account.
Another site that does the same thing is BitBargain.  The link is http://bitbargain.co.uk.

Bitstamp allows international withdrawals as long as you have a bic and swift code. YOU CAN Withdraw a minimum of $10 usd


text:
Does the block reward get halved every 4 years regardless of hardware advancements?
Is the invention of a faster computer (let's say a quantum computer) or the lack of advancements in computing power (let's say it takes a decade to make any progress greater than incremental increases on currently technology) capable of affecting the amount of time it takes to halve the block reward?
In other words, does the block reward get halved every 4 years, regardless of how much the hardware available is or isn't progressing?

The block halving takes place every 210,000 blocks. The difficulty retargeting mechanism makes it so that 210,000 blocks take approximately 4 years, but this is not exact. If the hashrate is rapidly growing, it will take a little less than that.
For example, if the total network hashrate doubles every year, it will take about 1 month less. If it doubles every week (increases by a factor of 4.5 quadrillion every year), it will take only 2 years.

so the answer is yes, it will get halved approximately every four years, regardless of hardware advancements or lack thereof. do i have this right?

@Gaia: Correct.

hmm, just saw your edit: "if it doubles every week, it will take only 4 years". So the 4yrs can be affected only down, not up?

@Gaia: 2 years, not 4. Anyway, if hashrate is going up it will take less time, if hashrate is going down it will take more time.

Yes, I meant 2 not 4 yrs. So is the answer now "no, the halving period does vary according to advancements (or lack thereof) in hardware" ?

@Gaia: Not sure what you're asking. As I explained, the more rapidly the hashrate is increasing, the less time halving would take. The change is very small for any reasonable hardware progress. Note that to get to 2 years you need the hashrate to multiply by 4500000000000000 every year.

I think you do understand what I'm asking. I get that if HW progression is geometrical, we could eventually end up with 2 instead of 4 years. What if HW doesn't progress much, could the 4 become 5 or 6 years? This is the question "So the 4yrs can be affected only down, not up?"

@Gaia: If the hashrate is static, the time will be pretty much exactly 4 years. Only if the hashrate goes down it can take more than 4 years. Note that the network only sees the hashrate, it doesn't know if increases in hashrate come from technology advancement or more money poured into mining.

The short answer is yes, provided the difficulty factor feedback loop (adjusted after 2016 (14*24*6) block awards which nominally maps to every two weeks for whatever next generation hardware gets used) remains stable, which it should from basic control theory 101.
The reason has everything to do with mathematics and the convergence of the geometric series to limit the number of Bitcoins to 21M.
Go to http://www.basic-mathematics.com/geometric-sequence-calculator.html. Enter 10.5M (number of Bitcoins mined during the first four years 50*4*365*24*6) into the first field, 0.5 into the second field (number of Bitcoins awarded gets scaled back every 4 years), 8 into the third field for n (roughly the number of 4 year time constants between 2009 & 2040), and select Sn and hit calculate. As n approaches infinity, the geometric series converges to 21M.


text:
I have 2 transactions on electrum wallet still not confirmed
for 7 days now i have had 2 electrum transactions still not send next to both of them it says low fee is there any solution to make them send or cancel my transactions
Transaction ID 2: 7322490976f276b78c746d3208136d71fdfd35144170a591d63db3c68a8e93b4
Transaction ID 1:b48cdb255f29c6c2d7dfa0cc77f62be6dfb5e3443f910e0d9aa376010cd7486f

Does following this advice fix your problem? http://bitcoin.stackexchange.com/questions/50064/how-to-unstuck-a-low-fee-transaction-with-electrum


text:
I know my address but can't remember which site it's from
I signed up for a bunch of different wallets because I didn't know which one was the best. I have 2.5 bit coins in a wallet that I don't know how to get. I know my wallet address, but can't remember which site it's from. Can someone help me, please?

It isn't trivial to de-anonymize a bitcoin address. Your best hope is that the address has inputs or outputs to other addresses that have been deanonymized somehow (search online for those addresses). This is unlikely though. You would be better just checking all the wallet sites with your login(s). As @nate-eldredge mentions this carry's the risk that you might reveal your login/pass combinations at some exchanges that are not trustworthy.
One tool that seems to have some information about addresses is OXT. For example it determind this address to be associated with btc-e exchange

"Check all wallet sites with your login" has risks - if one of them is dishonest, and is able to guess what the correct site is before you do, they could use your login and steal all your coins.

Do you have ownership of the private keys ?


text:
Why does unspent address index differ between APIs?
I've been using Blocktrail's API:
https://www.blocktrail.com/api/docs/lang/nodejs#data_overview
to get data for the following unspent address on the testnet:
2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j.
Blocktrail's API returns the index as 4, whereas blockexplorer's:
https://testnet.blockexplorer.com/api/addr/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/utxo
and smartbit's APIs:
https://testnet-api.smartbit.com.au/v1/blockchain/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/unspent
both return an index of 0. Am I missing something here?

both return an index of 0.

0 is the correct answer here.

Am I missing something here?

Not sure.
I can't reproduce your problem. I'm querying blocktrail like this:
curl https://api.blocktrail.com/v1/tbtc/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/transactions?api_key=MY_APIKEY

and that returns all of the transactions for the address, none of which have an index of 4.
Can you post the line of code that calls their API?

Thanks for taking the time to look into this! It turns out that I was querying for address instead of transaction (js):
blocktrailClient.address((2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j), (err, address) => {console.log(address)})


text:
How to watch for the transactions over blockchain via nodejs?
I am using this bitcore npm package.
https://bitcore.io/api/lib
And i want to monitor all the transactions over the blockchain, and read the input address, output address and amount associated with that transaction.
But i am unable to find the javascript method to invoke to accomplish this.
Even i am not able to find a example for this.
I am looking for as short as something like
var someLib = require('some-bitcore-lib')

someLib.on('block-recieved', function(){
   // print everything
   console.log(arguments);
   // do something else;
})

Any help?
Where can i find that some-bitcore-lib or how can i create that in nodejs?

I'm voting to close this question as off-topic because belongs on stackoverflow

Have you tried reading https://bitcore.io/guides/satoshi-fire-alarm

@codeofnode: have found any solution for the same?

Consider using bcoin.js which is in pure JS. It fires events when a transaction takes place. Quite simply you can do:
node.on("tx", (tx) => {
   console.log(tx.outputs, tx.inputs)
})

Note that, in bitcoin, each transaction can have multiple outputs and inputs, so these are arrays of inputs and outputs. You can obtain the total output amount by summing across all output amounts. Additionally, in this case you wouldn't concern yourself with blocks - just transactions.


text:
The cryptocurrency I stored on a Ledger Nano S was stolen
My Ledger Nano S was drained yesterday. I lost .83 BTC and 4.11 LTC.
While searching for a way to claim SBTC from BTC, I went to an SBTC website and was instructed to enter BTC address and word phrases.
I entered my Ledger Nano S 24 word phrase for just a moment and it was rejected.
This morning I checked my crypto balance on my Nano S and the BTC and LTC had been sent out to another address.  The BCH I have on the Nano S is still there.
I tried to send the BCH off to an external wallet but only get error messages.
Is the BCH data on my Nano S corrupted? Can you offer any hope?

Unfortunately you are out of luck. Never share your word phrase with anyone. If you do, you effectively give access to your money to someone else. If someone asks you about your word phrase (or anything related to private keys) you can be pretty sure that it’s a scam.

@MichałZabielski: OP is out of luck with the BTC and LTC.  If the BCH has not been spent there is still time to save it.  I don't know how to do that, but maybe someone else does.

OP: Please tell us what error messages you got.  People here are not psychic and cannot help you with an error if they don't know what it is.  Please use the edit button to add details to your question; be as specific as you can.

By the way, it's misleading to call this a "hack" since that would imply that the device's security was breached.  In this case the device worked just fine.  Unfortunately you shared information which you were required to keep secret.

My thanks to you folks that responded to my post. I was able to move the BCH from one account to another account I added on the Ledger Nano s. From there I was able to sent the BCH to external wallet. I did put my 24 word recovery phrase out there just for a second . From that a bad guy was able to search for, locate, send the cryptos stored on my Nano S to another address. An email trade approval conformation would be a great addition to security here. Although what was lost was  profit ($12790.) from my initial investment. I do feel like a complete idiot.  I am earning the hard way.

As long as you are learning, that is the main thing :) Sorry for your loss. I will write the main points in an answer to this question so the question doesn't remain unanswered, because it looks like it has been answered in comments

@JEGRISSOM An email trade approval from who to who? If you think it through, there's nobody to send such a request for approval and nothing anyone could do with an approval if it was approved.

From Michał Zabielski's comment:

Unfortunately you are out of luck. Never share your word phrase with anyone. If you do, you effectively give access to your money to someone else. If someone asks you about your word phrase (or anything related to private keys) you can be pretty sure that it’s a scam.

To clarify, the device's security was not breached. In this case the device worked just fine. Unfortunately you shared information which you were required to keep secret. (From Nate Eldredge's comment).
Luckily the BCH was not taken, because it was still in your wallet, you had time to retrieve it which it sounds like you did:

I was able to move the BCH from one account to another account I added on the Ledger Nano s. From there I was able to sent the BCH to external wallet. I did put my 24 word recovery phrase out there just for a second . From that a bad guy was able to search for, locate, send the cryptos stored on my Nano S to another address.
An email trade approval conformation would be a great addition to security here.

Unfortunately your seed words directly create your private keys, which are all that is needed to spend funds in the bitcoin network. Bitcoin only understands signatures from private keys, there is no room for email verification or anything, because of how the network works. So I'm afraid something like that wouldn't be possible. That is why sharing your seed words or private keys is so dangerous.
Sorry for your loss.

Right. The purpose of a hardware wallet is to keep your seed secure. It won't do you any good if you tell someone your seed.

I went to an SBTC website and was instructed to enter BTC address and word phrases.

This mistake (falling for a scam) seems like it might stem from a misunderstanding about how Bitcoin works
What do wallets contain?
A leather wallet in your back pocket contains money (e.g. in the form of dollar bills)
A bitcoin wallet does not contain money.
The only important thing stored in a Bitcoin wallet is a private-key. This private-key is a large number that allows the holder to control movements of money in the public blockchain. The private key is calculated from the word-phrase. If you give that word phrase to someone, you are giving them your private key. If they have your private key they have control over all your money.
How do "airdrops" of forked altcoins work?
When someone forks an altcoin from Bitcoin, they sometimes give the owners of Bitcoin a proportionate amount of the new coin. This is essentially done by putting an amount of the new coin under the control of the same private key -- but they don't need to know the private key to do this. They often just base their altcoin's blockchain on the Bitcoin blockchain up to a certain date. This means that Bitcoin keys automatically become valid altcoin keys without any process involving knowledge of the private keys. If you think about it, people can give you Bitcoin without needing your private key, so why shouldn't they be able to give you altcoin without knowing your private key?
To exercise control over that amount of "free" altcoin you may need to install an altcoin wallet, or signup to an online wallet (the least safe sort of wallet) and enter your word-phrase / private-keys into that altcoin wallet. To be safe, you should only ever do so after moving (control over) your Bitcoin to another wallet with a separate new private-key derived from a separate new word-phrase.
Super Bitcoin - what you need to know - covers how to safely claim forked altcoins


text:
Ubuntu Bitcoin Core Node Upgrade - Keeps starting v0.16.0
I have done this:
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoin-qt

But whenever I start bitcoin-qt from my console, it starts up 0.16.0. How can I fix this?

Try sudo apt upgrade

Thanks for the post edit btw, looks a lot better. Sudo apt upgrade didn't help either.


text:
Are Hardware Wallets (i.e, Ledger Nano X) Safer than Software-Based Cold Storage Wallets?
I'm looking into purchasing Ledger Nano X as a cold storage hardware solution.
What benefits does Nano X (or other hardware wallets) provide over software based cold storage solutions? Why not install a wallet such as Electrum on a device that is not connected to the internet and use it as a cold storage?
I looked at reviews of the Nano X and see people mention that it's sleek, sturdy, has improved display, Bluetooth connectivity and a "killer feel in the hand". All of this is nice but a cheap laptop with software that supports cold storage will have most of these features, and many others that Nano X is missing.
What kind of benefits does Nano X offer when it comes to the most important functionality - securing + storing your Bitcoin in cold storage?
I did see this answer which points to the fact that with hardware wallets the private key is embedded in the device itself and is therefore less prone to malware attacks.

What this means is that if your computer is compromised with malware,
with a software wallet, that malware can steal your private keys. With
a hardware wallet, because the private keys cannot be retrieved from
the hardware wallet and because the keys are stored on the hardware
wallet, the malware cannot steal your private keys. In this way, your
funds will be safe.

However, doesn't this mean that:
1) If the hardware device is lost or stolen (don't forget it's "sleek and small") it would impossible to retrieve the wallet as the PK is only be stored on the device itself? (If it can be stored anywhere else you are no longer resistant to malware attacks)
2) Can't a malicious program siphon funds from the hardware wallet while the device is connected to a computer without ever stealing the PK? Similarly, since every hardware wallet runs some OS, why can't it be infected when it connects to a computer? Perhaps the PK can't be stolen but the funds can.
3) If a laptop is always in offline mode (not connected to the internet) won't this prevent it from being infected in the first place?
4) Also it seems that a device that is specifically designed to store cryptocurrency is the perfect candidate to be tampered with during manufacturing and/or delivery. After all, it's pretty clear what the device is going to be used for (unlike regular laptops which have other use cases)
Thanks

Any device that has ANY form of active networking (i.e. bluetooth) doesn't even count as cold storage in my book. Far better to use your derelict laptop method (so long as you never, EVER connect it to the internet), or buy a real hardware wallet that only sends or receives data through QR codes. (all my own opinion, of course).

If the hardware device is lost or stolen (don't forget it's "sleek and small") it would impossible to retrieve the wallet as the PK is only be stored on the device itself? (If it can be stored anywhere else you are no longer resistant to malware attacks)

All current hardware wallets use BIP 39 mnemonics. This is a sequence of 12 or 24 words which you can memorize and/or write down on paper which can be used to re-generate all of the private keys in your wallet. This is allows for your private keys to be stored elsewhere while not exposing them to any malware.

Can't a malicious program siphon funds from the hardware wallet while the device is connected to a computer without ever stealing the PK? Similarly, since every hardware wallet runs some OS, why can't it be infected when it connects to a computer? Perhaps the PK can't be stolen but the funds can.

No. The hardware wallet has buttons and screens so that it can show the user what it is going to sign, and allow the user to accept or reject the transaction before signing. Hardware wallets are not just dumb storage devices, they have mini operating systems and will do their own checks of the transaction and ask for user input before private keys are retrieved and used for signing.
The mini OS that they run is not like an OS on your computer. They are highly specific to the device and, in general, can't be infected by malware on your computer. Hardware wallets have a limited communication protocol with the computer. While there could be a vulnerability in the firmware that does allow it to run malware, the attack surface is very small and far more easily auditable than the software that runs on a laptop.

If a laptop is always in offline mode (not connected to the internet) won't this prevent it from being infected in the first place?

Airgapped devices can still get malware through USB drives and other devices you plug into. Famously, the Stuxnet virus successfully jumped an airgap in this way. Furthermore a laptop could be accidentally connected to a network. You cannot assume there won't be any human error.

Also it seems that a device that is specifically designed to store cryptocurrency is the perfect candidate to be tampered with during manufacturing and/or delivery. After all, it's pretty clear what the device is going to be used for (unlike regular laptops which have other use cases)

That is possible, and different hardware wallet manufacturers address this in different ways. Trezors are shipped in boxes that have tamper evident seals. Coldcards are shipped in sealed, tamper evident bags. The Coldcard, Ledger Nano S and X can be visually inspected to see if any of the hardware is not what it should be. Coldcard and Ledger have high quality images of the device's circuit boards online and you can look at your devices circuit board and compare them to the pictures.
Additionally, most hardware wallets have open source firmware so you can compile the firmware yourself and run that on your device instead of trusting the firmware that it shipped with.
Of course there is still the element of trust. You still have to trust the hardware wallet manufacturer and their factories. But it is reduced with these methods.


text:
Are ASICs Resistant to Malware Attacks?
One of the arguments made in favor of relying on ASIC mining hardware to secure the Bitcoin blockchain is that commodity hardware is more prone to a 51% attack since an attacker could easily infect millions of computers through a malware attack and use the computer's resources to execute a 51% attack against the network.

It's very hard to.. hack into someone's SHA256d ASICs

Are ASICs really resistant to malware attacks? If so, why?

Resistance to malware really just comes down to the security practices of the hardware's operator.
Simply put, we might expect that the admin of a mining farm would be quite vigilant in terms of security, compared to your average person with a PC at home. Thus, we could expect that it is easier to infect and control the average PC, compared to a mining farm.

I think you're misinterpreting the argument.
It is this: in an ASIC-mining ecosystem, where mining with commodity hardware is ridiculously unprofitable, there is little incentive for attackers to go infect non-miner's computers with mining code. This is about the millions of end-user PCs on the internet that are under control of botnets. If it was remotely profitable, people would pay botnet operators to let the victim computers do mining for them. In an ASIC-dominated world this is just too unprofitable to bother with.
It isn't about infecting ASICs, or conversely about infecting computers of actual CPU miners (in a world where all mining is done using generic purpose CPUs). People who want to participate in mining intentionally as a form of income would notice if their system was infected regardless, as they'd see their income fall.
Of course, at the same time, it is probably true that infecting ASIC-based infrastructure is harder, as ASICs tend to come in pre-packaged devices with their own embedded controller that does the network/pool interaction, rather than on end user's home systems. I think this is a distraction from the point though, because if CPU mining had continued and risen to the level of professional effort that ASIC mining is now, solutions to this would have been found to it.

Per definition, ASIC are never affected by malware that is loaded onto them - much as a pizza box can not be taken over by malware. ASIC do not execute a program you can load - they have no "code". ASIC are specialized chips, and the wiring is determined by the factory. They are VERY specialized. They also lack any higher function, so any ASIC miner will combine ASIC with controlling computers. But the ASIC itself can not be affected by loading malware on it because the ASIC can not be changed. It is simple like that. As comparison, open the engine compartment of your car and turn your car engine (not the computer, the engine block) into a TV - by loading malware on it, not by starting installing hardware.
When you make an ASIC, you technically write a program, but the compiler then does not generate machine code, it generates the layout of the chip to execute the program. And the chip factory creates this chip. The "wiring" is hardwired. It is not a general chip running a program that is loaded later (as is any regular computer).
Commodity hardware is more easy to take over because millions of computers on the internet are run by people that are not smart enough to run even the most basic security on them, and millions are taken over already. So, it is easy to install minders on them.
The main point, though, is not to take them over - it is that ASIC are BRUTALLY more efficient than computers at mining bitcoin. At the moment you could take over half all infected computers and I doubt you could do a 51% attack with them because yes, ASIC run the show and are that much more efficient.

I considered answering something in this direction myself, but while correct, I don't think it actually addresses OP's question. After all, CPUs are also not affected by malware. In both cases it's the software controlling them that it's in question here.

Mining ASICs are controlled by ordinary computers, so all someone needs to do is gain control of the computer sending the ASICs their commands and they will be able to control the ASICs.
While you might expect the companies running these computers to have higher-end security practices than a home user would, it also means that there is a single point of failure: take out a small handful of these controllers and you control a significant number of ASICs.

@_ieatpizza thanks! So unlike the majority of answer here you disagree with the notion that ASICs are unequivocally less likely to be infected by malware compared to ordinary computers.. as each one has it's own weaknesses and point of exploitability. Did I understand you correctly?

Yeah, well, an ASIC is controlled by an ordinary computer. However, also re-reading your question, 1 more thing to add: it's probably easier for an attacker to exploit 100,000 random computers and install a Monero miner, and make a good profit. It would probably be more challenging for the attacker to target the few specific computers that are controlling Bitcoin ASICs.

An ASIC can per definition not be infected. It is a CHIP, it does not run "code that is loaded", it runs code that is burned into it at the factory. This "code" can not be changed - it would require changing the physical layout of the chip. What you can infect (only) are the machines CONTROLLING the ASICs.

@TomTom That's what I said. But considering how the controlling computers are not optional (even the control card built into each ASIC miner counts as a computer that can run malware), it's kind of pointless and pedantic IMO to focus on that distinction.

Except that the question is pretty specific and words have specific meaning.


text:
Can an exchange or marketplace benefit from private key encryption?
A powerful security technique to prevent theft of Bitcoins from a user's online wallet is to encrypt the user's private key with his password without ever stroring the PK directly in the database. Even if a hacker compromises the server they still won't be able to access the user's wallet without his password.
In case a website needs to have custodial control over a user's funds (for example, an exchange or escrow service in a marketplace) this solution isn't viable as the exchange needs to have complete control over the user's funds to move funds from one party to another (say from the buyer to the merchant or to a trader in an exchange). So it cannot be expected that the exchange must ask one party "permission" to transfer funds to the other party. Of course, the exchange or marketplace can encrypt the PK but since it would also need to host the decryption key somewhere on the server there's little benefit in encrypting the PK in the first place.
Is there a variation of this technique that might work even in a marketplace or exchange environment which requires that the owner (of the marketplace or exchange) maintain full control over a user's deposit?
Thanks

It depends what your goal is. Normally when sites have a user's key encrypted as to be unreadable to the site, it's to have a system where users don't have to trust the site not to steal the key. In that case, then no, because the whole point of a technique like that is to have it so the service provider doesn't have control of the user's keys at all. Any workaround to that would defeat the purpose.
If your goal is to protect the keys from outside hackers, then the site can (and most do) employ cold storage or hardware security modules (basically a fancy hardware wallet) that store the keys. In this case, the site owners still have full control of the keys, and the users have to trust the site owners to be honest. However, the scope of a potential hack is limited, as the keys are stored either on dedicated hardware, or if in cold storage, large withdrawals are performed manually by site staff after review.

@_ieatpizza My goal is to protect the keys from outside hackers. I'm aware of the option of using  "hardware security" to protect the PK but I fail to understand why a malicious user can't seize control of the server and send (unlimited) withdrawal requests to the hardware module (while pretending to be legitimate requests) and siphon all funds from the wallet without every comprising the actual PK. Does the hardware module somehow "validate" a request before "approving" it to limit scope of damage?

Additionally, in the first example (encrypting the PK so users won't have to trust the site) users would still need to trust the site that they are in fact encrypting the PK. So there would still be a big element of trust between the site and user.

@S.O.S For your first comment, refer to your other question: https://bitcoin.stackexchange.com/questions/101986 For your second comment: No, not necessarily, the sites that are encrypting the user's private key are generally doing the encryption on the user's browser in Javascript and sending only the encrypted text back to the service. Technically savvy users can review that Javascript and make sure that it's really doing what it claims to be doing.


text:
Is there an easy way to purchase Bitcoins?
I decided to check out bitcoin 3 weeks ago. And I have yet to buy my first bitcoin. It took a week to get a Dwolla account. Now when I go to MtGox to buy I find I need to go through even more hoops. I am starting to think that Bitcoin is just some kind of myth. A great idea but if you can not get the they are useless.

possible duplicate of How do you obtain bitcoins?

Dwolla imposed a 30-day probationary period for new accounts.  After your first funds have been added to Dwolla from your bank account, you then cannot trade those funds with a Bitcoin exchange for 30 days.
Dwolla did that to prevent hackers or other scammers from getting cash out of an innocent person's bank account before there is time for the individual to notice.
There are a lot of individuals who are not considered bitcoin exchanges who will gladly trade their Mt. Gox USD funds for your Dwolla USD funds:

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

If you want an alternate method, there are numerous.  Since you are using Dwolla, then presumably you are in the U.S.
BitMe accepts cash deposited through Chase:

http://www.BitMe.com

The next fastest and convenient method is BitInstant:

http://www.BitInstant.com

But once you are through the 30-day Dwolla probationary period, then Dwolla works pretty well for moving funds to and from the exchanges.  Camp BX, Intersango, and Mt. Gox all accept Dwolla USDs for their market exhanges.   Bit-Instant accepts Dwolla for direct purchases of bitcoins.

http://en.bitcoin.it/wiki/Buying_bitcoins

If none of those options work well for you, you can also try doing an in-person trade:

http://www.LocalBitcoins.com

http://coinbase.com
Great for buying directly from bank account, very cheap fees, but only allows 100$ worth/day at this point I believe.

I just wanted to update this post, having just been through the arduous process of getting money into my bitcoin wallet. I didn't have to wait 30 days to send from Dwolla to bitcoin, but the process was no cakewalk:

Signed up at Dwolla
Linked bank account and verified (took almost a week!)
3.Transferred money from my approved account to Dwolla (took almost another week!)
Set up a bitcoin wallet at blockchain.info
Went to bitinstant and selected to send from Dwolla to my bitcoin wallet address.
Was prompted by a Dwolla plugin to scan and upload a photo ID.
Called Dwolla and pleaded with them to approve my photo immediately and not make me wait more "business days" for this process.
Dwolla called me back in an hour to say they had approved my photo.

I was then finally able to send money from Dwolla to my bit coin wallet via bitinstant. In fact, Dwolla/bitinstant will now allow me to send directly from my approved bank accounts to my wallet.
Long story short, 30-day waiting period is either no longer in effect, or bypassed by this method. But it's still a slog.

BitInstant does not appear to accept Dwolla (anymore).

If you're in the US (which AFAIK you must be if you could open a Dwolla account), I'd say your best bet is to use the services of BitInstant.
You can also wire funds directly to Mt. Gox, but that could be more expensive for small amounts.

If you live in the Netherlands, you can get Bitcoins very easily via Bitonic. You pay via iDEAL.

Another option: Aurumxchange.com
I have used them for SEPA transfers and it worked like a charm.

Aurumxchange has discontinued all operations.


text:
Coinbase price discrepancy?
At the moment the price of a bitcoin on the Coinbase dashboard is $8247 EUR, however in the buy section it's $8840 EUR.  I know they have some commissions and spreads, but that's 7%... Is this a bug or a feature?
Moreover, the sell price is $8755 EUR! Much higher than the market price! I even bought some for 10 dollars to make sure. In GDAX, which is Coinbase's exchange the price is $8244.  Why does Coinbase sell/buy for so high?

When you buy from Coinbase, you are buying from a service provider, not from a person who is selling....so, yes, you will be paying more.
Don't ever actually buy from Coinbase (or sell); they mark up the price that is set on THEIR OWN exchange, GDAX. It literally only takes you seconds and zero cost to transfer your funds from Coinbase over to GDAX to trade yourself at a better rate, so there's no reason to take the Coinbase markup.


text:
attack bitcoin through writing data directly into output's scriptPubKeys
In this post, Steve Ellis wrote :

"[...]Writing data directly into a output's scriptPubKey is not prunable[...]where as non-prunable outputs will forever create bloat and slowdown the set traversal(e.g. during block verification).[...]

Wouldn't this be a relatively cost effective way to slow down bitcoin by writing the maximum possible data into into scriptPubKey?

No. This is very fast way to spend your money for nothing. You can not put arbitrary data into to scriptPubKey because there is limited number of standard scripts.
The best thing you can do nowadays is sending 550 satoshi (0.00000550 btc) for bare-multisig outputs m-of-3 created from uncompressed public keys. This will enlarge the UTxO database ( look at https://statoshi.info/dashboard/db/unspent-transaction-output-set ) but will not slow down network itself


text:
Why do some blocks not have Miner's name/identity?
I was going through blocks on Block explorer and I saw that some of the blocks were containing the miner's name and some were not. What is the reason behind this?
See this sample block for an example.

Blockchain.info has an interesting pie-chart showing the origin of blocks.  On that page, they specifically note:

A large portion of Unknown blocks does not mean an attack on the network, it simply means we have been unable to determine the origin.

Blocks do not need to contain any identifying factors.  The miner can choose to provide a script in the coinbase of a new block that can be used to identify the source of the block, however they are not required to do so.  Another method that can be used to identify the source of a new block would be the target address for outputs of the new coins included in the block; if the address is well-known, then you can be almost certain the owner of that address mined the block in question.
"Anonymous" blocks are simply that, anonymous, in that they have no identifying characteristics.
This question and the answers have some interesting details as a side-effect of trying to identify who mined a specific block.


text:
getblocktemplate times out after being called many times
I am writing a program about bitcoin mining. It calls the RPC method getblocktemplate every second. Sometimes bitcoind doesn't reply to my RPC getblocktemplate request, but bitcoind still accepted new transactions and downloaded new blocks, but RPC calls didn't work.
I checked the CPU and memory usage; both are fine. I am sure it is not the problem of my computer system, because I tried connecting to some other bitcoind. At first, they worked fine, but after running a long time, this problem would come again.
I did not find a good way to solve it. When the RPC request does not reply, I've tried restarting bitcoind, and then it worked again. My bitcoind version is 0.9.3. Any ideas?


text:
where is the code about sending command getblocks in bitcoin source code
I am reading the protocol part. One silly question. I found the part processing getblocks part, but i did not find when and where to send the getblocks command.Or it is deleted in the new bitcoin edition.  Any idea, I will appreciate it very much.

You're correct: the Bitcoin Core master branch no longer sends the getblocks message because it uses headers-first synchronization to get all the headers (with the getheaders message), allowing it to hash the headers itself, verify their proof-of-work, and request the corresponding blocks in parallel from multiple peers with getdata messages.  I believe the upcoming version 0.10 branch is supposed to be forked off of the master branch later today.  (Will update answer with link when that happens.)
Here are some direct code links:

Bitcoin Core 0.9.3 sends the getblocks message with this line.  That function is defined here.
In the master branch, this is the patch that replaced the line above

Bitcoin Core version 0.10 will continue to process the getblocks message from remote peers, as you note.

I really appreciate your answer. Thank you very much, David.

Hi David,one point confused me. Is it in parallel that requesting the corresponding blocks with getdata messages. I think it is in a single thread. We can get at most 16 blocks from one peer and then iterate another peer. Is it right?  Thank you

@Eleven The headers-first pull linked in the answer says, "Blocks are fetched in parallel from all available outbound peers, using a limited moving window. When one peer stalls the movement of the window, it is disconnected."  I haven't reviewed that code yet, but if you find something that contradicts that statement, let me know and I'll update the answer.  Thanks!


text:
Can two outputs from the same transaction be spent separately?
I am reading the transaction part. I don't know how to get the transaction hash. Does the whole transaction (include its vins and vouts) get hashed?
If a transaction has two vouts (spent by different transaction tx2 and t3), when t2 and t3 spent the vout, they will get the same prevout hash. Is that correct?
For example:
tx1:  tx1_out1  --------> node_A ----tx2(using tx1_out1)--->
      tx1_out2  --------> node_B ----tx3(using tx1_out2)--->

Will tx2 and tx3 have conflicts, since tx1_out1 and tx1_out2 are spending the same hash?

Short answer
Your questions, in order: Yes. Yes. No.
Long answer
When spending the output of a transaction, it is not enough to know the txid. You also need to know the index of the output. (In other words, whether it is the first, second, third, etc. output.)
The hash of the transaction you're spending and the index of the output you're spending is collectively known as an outpoint.
Quoting the Bitcoin wiki:

The OutPoint structure consists of the following fields:

Field Size: 32
Description: hash
Data Type: char[32]
The hash of the referenced transaction.
Field Size: 4 bytes
Description: index
Data Type: uint32_t
The index of the specific output in the transaction. The first output is 0, etc.

See also the bitcoin.org docs.

Thank you very much, Nick. Also thank you for correcting my English. I consume a node first got tx2 and then got tx3. When the node check tx3 is valid or not, it found it already had a trasanction tx2, which already used tx1.hash. would it continue to check the index of output ? If it found also t3 and t2 use the same index of output. It mark the tx3 as invalid? Am I correct?

@Eleven Yes. Two transactions that spend the same outpoint cannot both be valid. The first one is valid, and the second is invalid. (However, if the second one got into the blockchain, it would be valid and the first would be invalid. This could happen if another node saw the second one before the first one.)


text:
Does each peer prioritize inv(type=block) over inv(type=tx)?
I found that when a peer receives an inv message with type=block, it will immediately request that block or that block's headers with a getdata message or getheaders message. But if the peer receives an inv message with type=tx, it won't respond immediately.  For example:
Node A  inv(tx)      Node B  |  Node A  inv(block)  Node B
        <-----------         |          <---------
                             |
        [delay]              |          [no delay]
                             |
        getdata(tx)          |          getdata(block)
        ----------->         |          --------->

Why is there a delay in requesting transactions but not a delay in requesting blocks? I'm guessing that relaying a transaction is less important than getting the most recent block to ensure the node is on the consensus best block chain.

There are too many pronouns in your question; I don't know which "it" is doing what.  Maybe use something like "node A" for one node and "node B" for the other node.  In particular, I'm having great difficulty understanding this part: "if it is inv.tx, it won't respond it until it will send messages using getdata."  If you can clarify, I'd be happy to answer.  Thanks!

sorry for my english,David. I mean: node A got an inv message, which inv.type is tx, node A won't respond this inv message immediately. But if the inv.type is block, node A would respond it immediately for requesting this block,using getdata message. Later, in node A's processing of sendmessage, it would respond the inv(type is tx) before it kept the inv in its processing of receiving messages. I am not sure my question is clear?

I don't see any delay here.  Looking at Bitcoin Core 0.9.3's code, I also don't see any code which would cause a delay as long as the node sending the inv responded to a getdata message immediately.
Transactions and blocks are placed into to separate queues in this code:
if (!fAlreadyHave) {
    if (!fImporting && !fReindex) {
        if (inv.type == MSG_BLOCK)
            AddBlockToQueue(pfrom->GetId(), inv.hash);
        else
            pfrom->AskFor(inv);

Transactions and blocks are requested in this long piece of code, which I won't paste here.
I don't see any delays here for transaction requests.  I also tested this locally, and my node always immediately replied to a new inv message (type=tx) with a getdata message requesting that transaction.
There can be a delay in relaying transactions.  For example: node A sends an inv message for a new transaction to node B.  Node B gets the transaction, but then waits before sending an inv message to node C announcing that transaction.  You can see that in this code which includes the comment, "trickle out tx inv to protect privacy".


text:
Multibit crashes on startup with PCA2 error (Program Compatibility Assistant)
I double clicked on the Multibit Icon which I normally do but this time the program does not launch.  I don't even see in in the task manager.  I went to the file location folder and double clicked it from there but nothing.  I even tried to run it as an administrator, still no luck.  Error reporting gives me this but I have no idea what any of this means.
Fault bucket , type 0
Event Name: PCA2
Response: Not available
Cab Id: 0

Problem signature:
P1: multibit.exe
P2: 0.0.0.0
P3: multibit.exe
P4: unknown
P5: unknown
P6: 200
P7: -1
P8:
P9:
P10:

Attached files:
C:\Users\Corry\AppData\Local\Temp\{2e873e3e-224a-4e49-a645-3085d257487a}\appcompat.txt
C:\Users\Corry\AppData\Local\Temp\Tab6C87.tmp

These files may be available here:

Analysis symbol:
Rechecking for solution: 0
Report Id: 9b901d74-78d6-11e4-8e09-c8600014cfa9
Report Status: 0

What operating system are you using?

P.S. Does rebooting fix the issue?


text:
What are the differences between Bitcoin and Litecoin?
What are the differences between the Bitcoin and Litecoin algorithms and protocol?

Litecoin is exactly like Bitcoin, but:

The hashing algorithm is CPU-friendly, meaning that having powerful GPU doesn't let you mine fast.
The difficulty of the blocks is set so they would be mined about every 2,5 minutes, instead of 10.

Other differences are cosmetic, like aiming to generate more Litecoins than there will be Bitcoins, using different port, etc.

What is the advantage of the "faster" blocks? Is the generally accepted confirmation interval now 24 blocks (or still only six)?

Faster blocks mainly generate faster, but one should be careful, since it is easier to manipulate them to harm the users. As for how many confirmations is accepted, it all depends on the client implementation and the users, not necessary the algorithm itself. Interesting question though.

One advantage is that if you only care about 1 confirmation, you have to wait an average of 2.5 minutes, instead of 10. You'll get less security in these 2.5 minutes, but more security than if you don't wait to any confirmations.

If you just care for faster blocks, you should check out answer to this question: http://bitcoin.stackexchange.com/questions/1557/speed-of-operations-in-the-bitcoin-network . Apparently Geist Gelt tries to keep their block generation at about 1 block per 15 seconds.

ThePiachu Good link with lots of interesting references. @Thilo You are correct: if you want to have the same level of security you need to wait for 24 blocks. What matters here is time (1 hour) and not the number of blocks. This question may also interest you.

@nmat for >0 confirms you no need to wait an equivelent amount of time.  The one (and small IMHO) advantage of faster block is that any confirmations are better than 0 confirmation and the confirmation window is reduced in smaller blocks.  That small advantage doesn't in my opinion outweigh the other costs of faster block time.

@theUnhandledException To minimize probability of successful double-spend by an agent with <50% of the hashrate for an unlimited amount of time, what matters it the number of blocks, not the amount of time.

Litecoin is no longer CPU only.

As far as I understand litecoin is less about denying GPU mining over CPU, but making stuff like ASICs not really viable. A by product of that is that GPUs don't have much advantage over CPUs.

More like making ASICs more expensive.  There's no way to make them not viable and still have an algorithm runnable on standard PCs.


text:
Does the BerkeleyDB-based wallet.dat implementation leak private key data?
I read this little nugget on the bitcoin client bug tracker:

the bdb binary log files can also contain sensitive data such as private keys

Is that true? Does this mean that even with an encrypted wallet.dat, there might be a way that the private keys are written to disk unprotected? If so, what can I do about it?

If you are using an encrypted wallet, private keys are never written unencrypted to disk.
However, the 0.4.0 release (the first to feature wallet encryption) had a bug where - upon upgrading a wallet from unencrypted to encrypted - parts of the unencrypted where not necessarily overwritten, leaving them accessible for a while.
0.4.1 and 0.5.0 fix this by first rewriting the entire wallet file upon encryption (or the first start afterwards), and invalidating the entire pool of reserve keys that was present before. This means (and has been tested), that if you start with an empty wallet, and immediately encrypt it, it will not ever use any key that was ever written to disk in unencrypted form.
Note that wallet encryption is not a silver bullet, and an attacker may have other ways of extracting the private key, such as keyloggers.
EDIT: only now I read your question correctly. The log files may contain anything that was attempted to be written to the database files themselves, and if you are using (or were using) an unencrypted wallet, that may indeed mean private keys as well. Again, if you start with an encrypted wallet in 0.5.0, no keys will be used that ever touched disk unencrypted.

So how does this encrypted wallet work? Is it still a BerkeleyDB file (unencrypted) that contains private keys that are now individually encrypted before BerkeleyDB sees them? Or does the encryption happen below the BerkeleyDB layer?

What do you mean "start with an encrypted wallet"? If you start with a fresh wallet, it's not encrypted. You can encrypt it immediately, but it generates some keys before being encrypted ... won't be in the log files?

Yes, those may end up in the log file. However, as soon as you encrypt it, the keypool is flushed, and 100 new reserve keys are generated. Thus, if you start with a new wallet, and encrypt it before doing anything else with it, those 100 new keys will never touch disk in unencrypted form.

Thilo: it's a bdb file as before, only the key material itself is encrypted (at the application level).

So, since I am not using Bitcoin encryption, but rather place my wallet.dat (only) on an encrypted disk, my private keys may have ended up in the log files. Any way to purge the logs going forward?

Also, I was also hoping that placing wallet.dat on an encrypted disk would also protect my public keys (plausible denyability of owning them), which I understand are not encrypted using Bitcoin wallet encryption. Those also end up in the logs, right? Even with encryption turned on?

Encryption only protects the private keys, public keys are available without passphrase. And if you do a clean shutdown, you can safely remove the log files and files in the database directory.


text:
Checking pending (not yet in the blockchain) transactions
Is there a service (like Blockexplorer) that shows pending transactions that have not (yet?) been included in the block chain?

Even transactions with no confirmations will show in the results (unless the transaction has been sitting unconfirmed for some time and then the service stops tracking it):

http://www.BlockChain.info

I couldn't find a way to search for unconfirmed transactions on BlockChain and the 2nd link is broken.

Any search for a bitcoin address on Blockchain.info will yield any transaction it has seen regardless of the confirmations.  The only exception is if the transaction didn't confirm and the service no longer tracks it ... which happens after about a day when no confirmation ever occurs.


text:
Securing the "weakest link" of a chain through Sharding
In this question I discussed how sharding a private key with Shamir's Secret Sharing Scheme maybe a good alternative to MultiSig as a means of reducing excessive fees associated with MultiSig transactions. @Pieter Wuille provided an excellent analysis of the pros and cons of using Sharding vs. MultiSig and revealed some of the work in progress aiming to address the main concern with sharding (the "A Chain Only as Strong as Its Weakest Link" problem).
As mentioned, the main problem with employing SSS as an alternative to MultiSig is that it is necessary to reconstruct the actual secret key on a single machine before signing a transaction - once again making it vulnerable to a single point of failure (attack). As the saying goes "a chain is only as strong as its weakest link".
While Taproot and Schnorr signatures were proposed as potential alternatives to SSS, these two solutions are for the time being just "proposals" and they will need to be accepted by the entire Bitcoin community (which could take forever) before they become viable alternatives.
Are there any alternatives to SSS, which can be used right now, where a transaction can be signed by two (or more) parties without needing the secret key to convene on one machine? Are there any alternatives to "Shamir's Secret Sharing" that might allow this functionality?
In case it makes a difference, all I need is n-of-n (i.e, 3-out-of-3) rather than k-of-n (i.e, 3-out-of-4 or 2-out-of-3).
Thanks

Yes, multiparty ECDSA exists. But it's many times more complicated than normal ECDSA.

If you need to ask "how to implement multiparty ECDSA", the answer is that you absolutely shouldn't. This sort of stuff should be done by people who know what they're doing.

@S.O.S You really shouldn't try to build your own crypto tools if you need to ask this kind of question here unless you really want to lose your money. It looks like people are working on it though so I would just wait it out.

Is there something wrong with the question that it was downvoted? I don't think it violates any rules on this site.. Please enlighten me.

I didn't downvote, but note that downvoting does not mean any rules are violated (there are close votes and moderator flagging for that). It just means people think it's not a good question.

Right now, the top two alternatives to Taproot & Schnorr Signatures rely on multiparty ECDSA (elliptic curve digital signature algorithm) also known as threashold ECDSA.
Threshold ECDSA has two main functions: The first function is to spread out key generation across multiple machines. This makes it so that no single party is ever made aware of the full key. The second function is to sign a transaction with the key shares (generated in step 1) without needing to combine them in a single place. This allows a set of distinct parties (that do not trust each other and do not wish to reveal their PK to each other), to jointly compute a function over their inputs while keeping those inputs private.
ZenGo, is a Multi-party ECDSA written in Rust. It comes with two key features:

Key Generation for creating secret shares.
Signing for using the secret shares to generate a signature.

Binance Chain, is a Multi-party threshold signature scheme that supports the first two features but also allows for Dynamic Regrouping of shares:

Key Generation for creating secret shares with no trusted dealer ("keygen").
Signing for using the secret shares to generate a signature ("signing").
Dynamic Groups to change the group of participants while keeping the secret ("resharing").

Both libraries have been audited by Kudelski Security. Be warned, however, that both of these technologies are relatively "new" and may suffer from unknown bugs/security flaws. Use them at your own peril.