How does blockchain.info api works? Calling

https://blockchain.info/multiaddr?cors=true&active=15PFsB56YYXwXSW6byaxHXfgGz2ySWnDzN

I get a json response which I can not figure out if it has some sort of error or that I'm mistaken.

The response show results in transaction 1206412 = 0.01206412BTC added to balance 0BTC should get 1206412 = 0.01206412BTC, however we get balance = 1201206412 = 12.01206412BTC, I think it's error in blockchain.info api or could you explain how the balance is calculated.

The issue was with how the transactions are sorted. The balance was being calculated with 9c8f1b918e6a6a2 being sorted before 46d529d722d1 (which is incorrect) despite them being ordered correctly in the json. Regardless it should be fixed now.


How many signatures are there in one non-multisig transaction I checked this How is a transaction's output signed?.

I need clarification for:

For each input there is one signature, so there are as many signatures as there are inputs?

Why is that so and not use just one master signature per transaction, is it because sender of transaction can use funds from more than one address he controls?

Is there also a master signature that signs entire transaction or just the per  input signatures mentioned before?

1.: For typical P2PKH/P2PK you will always need to provide one signature. If all inputs spend outpoints of this form, then each one of them must provide one signature.

2.: They must sign a "special" transaction structure, see here: Redeeming a raw transaction step by step example required


Most important spec to look for on a GPU for scrypt mining (e.g. Litecoin) By taking a look at all the current AMD cards comparison:

http://en.wikipedia.org/w/index.php?title=Comparison_of_AMD_graphics_processing_units

I was wondering if GFLOPS would be the best way to compare the raw power those cards would have for Litecoin mining.
In that case is single or double precision more important for the current mining software?

Also I'm aware that power consumption is another key factor.

Edit:

No answers so far...
A friend of mine who has been mining for a while thinks the number of shaders is the most important one. Still in the comparison chart above there are more specs that could be important I guess:

Pixel pipelines
Vertex shaders
Texture mapping units
Render output units

Still I think that they should all be reflected into the Processing Power GFLOPs, either single or double precision.

I think the important factors for scrypt in OpenCL are as follows

GPU core clock rate
Memory clock rate / memory bandwidth
Memory bus width / channel
Computation Units
Processing Elements

You can check out in Programming Guide of AMD Accelerated Parallel Processing.

single or double precision of floating number does not matter. Either SHA-256 or scrypt is doing integer arithmetic operations.


Ramifications of illegal content in transaction messages? Would it be possible to make using Bitcoin illegal by posting child porn or similar highly illegal content in the message of a transaction? There are methods for having 'thin clients' that don't download the entire transaction history - would these be immune to an attack like this? How difficult would it be to track the sender of such material?

Would it be possible to make using Bitcoin illegal by posting child porn or similar highly illegal content in the message of a transaction?

Bitcoin, as a decentralised provision network of sorts, may have the same protections as given to ISPs and content providers. So unless the government is gunning for Bitcoin anyway - I'd say no, Bitcoin can not be rendered illegal this way.

  There are methods for having 'thin clients' that don't download the entire transaction history - would these be immune to an attack like this?

Obviously if you don't download the illegal content nor upload any intent to download specifically that type of content - you should be safe with a thin-client. But it limits the security of Bitcoin network considerably if only thin-clients were possible.

  How difficult would it be to track the sender of such material?

Not very difficult. Bitcoin is not an inherently anonymous protocol. If the communication between nodes is not encrypted with ephemeral TLS sessions, a mix service wouldn't provide any meaningful anonymity either.


Why does Bisq claim that my earliest receive address has been used in 10 transactions? In the "Funds" tab, in the "Receive funds" sub-tab, there's a long list of unused receive addresses (as expected). In the bottom, there's a bunch of ones saying "Used in 1 transaction(s)", again as expected...
But in the very bottom, there's one that stands out by saying "Used in 10 transaction(s)".
This makes me worried and anxious. Why was this not only reused, but reused nine times? I never did anything differently from how I trade/use Bisq today. That receive address must have been created when I created my Bisq wallet in early 2018.
Can somebody explain what the deal is with this? Has Bisq for some reason reused the same address and thus broken my blockchain privacy? Was it some kind of bug? Misunderstanding by me somehow?

Was it some kind of bug?

Yes, so it seems.

See https://bisq.community/t/privacy-address-reuse/5899

torte
1 Aug '18
When looking into my bisq account under
funds --> Receive funds
I see that usually new addresses are used. But on the bottom there is one address 1A… used already more than a dozen times and I wonder why

...

ManfredKarrer
Founder
Aug '18
Do you have the latest version? If there is a reuse of old addresses it is a bug. In older versions there was a bug with that but it should have been fixed a while back.

...

torte
Aug '18
Upgraded to version 7.1 and did the same type of transaction where I saw the address reuse before. This time no address was reused, so everything worked fine.
Great job, thanks to the team!
As well I’m pleased that I can manage the addresses in the wallet one by one (as far as I know not a new feature but a good one for privacy reasons).

The release notes for version 0.7.1 on  4 Jul 2018  say

Fix reuse of change addresses

Which refers to Issue 1540

the first address generated by the HD wallet gets reused repeatedly, other addresses were used, only once per address, but these are clustered around the first address (e.g. with oxt.me) , allowing transactions to be linked. this also discloses disclosing balances etc to counterparties who may have personally identifying information due to the nature of the transfers


Can TREZOR sign transaction with input address beyond gap limit? Suppose I use TREZOR with Electrum or Bitcoin Core HWI and significantly change the gap limit to, let's say, 100 000 addresses. I then receive BTC to my 999 999-th address and want to send them somewhere else. Will I be able to sign such transaction in TREZOR?

The question is, basically, does changing gap limit in Electrum or getting addresses beyond gap limit in Bitcoin Core HWI "getkeypool" generates extra private keys on TREZOR itself? And is such behaviour the same with all hardware wallets?

Yes, you can sign with that. Hardware wallets don't care about your gap limit, they aren't deriving individual keys when you setup the wallet. Rather they just store the master private key (or the seed used to derive the master private key) and then derive the individual keys needed on-the-fly. So if you tell it to sign with the 999,999th key, by giving it the correct derivation path, it will do so without complaint.


Which wallets can send to native segregated witness output addresses today? Which wallets today are able to send to P2WPKH addresses starting with bc1qf…?

Electrum 3.0+ allows user to create a segwit wallet with native P2WPKH (Bech32 encoded) addresses starting with bc1q.. for Bitcoin mainnet.
When creating the wallet, select first "Standard Wallet" (as opposed to multisig) then "Segwit Wallet".


Is it possible to link one single LN node to Bitcoin addresses? In René Pickhardt's presentation (slide 166) (here is the interesting talk), it's written that on-chain funds and addresses can be linked to LN nodes. How can this be achieved?

From my understanding, it is possible to link funds of a channel to two LN nodes, but it's not possible to tell which node funded the channel and how the funds get split among nodes in the settlement transaction.

If a channel is announced a multisig output - which encodes the capacity of a channel - is linked to two nodes on the lightning network. This mutltisig output is obviously onchain and can be seen as onchain funds.

This does not mean that we know directly who funded the channel and how the funds are split between nodes in the commitment / settlement transaction.

However the funding transaction was consuming some other outputs. They might have come from the settlement transaction of another channel. This links two funding transactions. The node that takes part in both payment channels is the one who funded the second channel. Currently lightning nodes reuse outputs and do not mix / coinjoin them. Thus the analysis is rather straight forward.

However it seems that if nodes never reuse outputs and if channels never close it will be much harder to link funds to a single node.


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

I transferred bitcoins from my Coinbase account to 3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa

Well that is how you'd typically transfer some bitcoins to someone else's wallet to buy something. Its also how you'd move your bitcoins to a second wallet that you own (or to another address in the same wallet that you sent from)

You must know what the address is for - you must have had a reason for making the transfer.

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

Bitcoin transactions cannot be reversed, undone or cancelled.

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

You already sent it somewhere.

  I don’t understand! Confused newbie!

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

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

If you need more information to understand all this try

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

If after reading that, you still have questions,

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


What's difference between Multichain, Chain, Hyperledger, Ethereum etc I stumbled upon multiple Blockchain protocols framework. For example Multichain http://www.multichain.com/

What's difference between this one and the others ?

Multichain is directly built from Bitcoin Core which power the bitcoins. Of course there are modifications to it. Multichain provides direct interface with many parameters and is basically used to make permissioned networks.  And the major difference between multichain and other blockchain technologies is no use of smart contracts in multichain.

Also, Bitcoin is open network, Ethereum allows public network apps, hyperledger is used for building private blockchains and multichain for permissioned blockchains.


How To Buy Bitcoins Within Wallet? I recently downloaded the Armory Wallet for my Mac. It appears to work great, but is there any way I can purchase Bitcoins via an exchange on the wallet interface itself? If not, what should I do?

No, in general wallets are just tools to manage bitcoins already in your possession. The only exception I can think of is Mycelium, which includes a functionality to find buyers and sellers nearby.

To find out how to get bitcoins, check out How do you obtain bitcoins?.


How to check version number of lnd? New lnd version came out recently, but I'm not sure which version I'm running. How can you check?

$ lnd --version did the trick.

Output should contain the version plus commit hash

lnd version 0.5.0-beta commit=f4305097e1638f6f8958dfa9eec941d8bf80246e


Is it normal not to see my sending/receiving addresses while the bitcoin client is syncing? I am using bitcoin core on windows 7, it takes forever to sync and during this time I cannot see any sending/receiving addresses in my interface, I only see "balances" (empty), "recent transactions" (also empty).

Will addresses show up only after it is done syncing ?
a bit off-topic: Is it safe to just copy/paste the wallet.dat around or is it any risk if the sync is at a certain state while I copy/paste the wallet to/from the bitcoin data folder ?

1)

No.

Receiving addresses are not shown because they are intended to be used only for a single payment. The practice of reusing addresses weakens your privacy, but also that of others in the system who you interact with.

It is possible to see the receive addresses that were created in the past, but you need to explicitly check the address reuse box in the receive payment tab.

2)

You can move the wallet.dat file when Bitcoin Core is not running. You can also copy to make a backup, but realize that the backup will need to be recreated every 100 incoming payments (this will change in 0.13, where a backup will be permanently valid). Do not actually use copies of a wallet from multiple locations at once.


Is there any way to buy bitcoins online without a fee? I'm new to bitcoins, and my experience is from something like E*Trade buying on the NASDAQ, so that's my frame of reference. I paid a small broker fee for every buy or sell, and I trusted the exchange and the software 100%.

But I thought the big advantage of bitcoin was no middle man. Hence I assumed no fees.

But perhaps contrary to that first assumption, in my second assumption I thought there would be this big trusted website where you go and buy / sell anonymously without having to trust the other party. You would just need to trust the exchange itself.

Can I buy bitcoins anywhere without a fee?

Can I buy bitcoins anywhere with 0 risk of getting ripped off, as in a flea market?

Can I get both positive things in one place (ideal)?

Thanks.

EDIT

Coinbase Pro allows me to do limit buys for free. The trick there is to set the limit price to the current price and keep changing the price if necessary to get the desired quantity purchased.

Coinbase had been charging me 1% on large buys. So for small buys ok; large buys, it adds up!

CEX.IO on the other hand, gave me large limits and they charge a flat fee of $10. So for a buy of $3000 this is only .33 percent; much better!

Also, something I need to watch out for is the buy price. The exchanges mess with that to make extra margin I think. So I need to shop for best price before committing to buy. Compare the total price including fee based on buy price.

Of course you may trade bitcoins with just anyone without having to pay fees to a centralized exchange.

I think Bisq (formerly BitSquare) may be the best answer to the question; decentralized, free for some definitions of "free", and very low risk due to the escrow system - but not completely without fees, indeed as of 2017 one may end up paying quite much higher fees on Bisq than on some of the centralized exchanges.  Well, let's walk through this ...

Fees and costs

You probably won't get away completely without fees:

There is the bitcoin transaction fee, a fee for getting the transaction included in the network.  Basically, you can't withdraw your funds from the exchange or move it from one wallet to another without paying a network fee (though internal transfers i.e. on an exchange may be for free).  As of 2017 it has become significant (i.e. 0.001 BTC, but can vary a lot), though not that bad if you want to turn over significant amounts of money (i.e. 1 BTC).  According to the protocol the fee is not mandatory, but a regular transaction without a fee paid is very unlikely to be included in the blockchain.
With many exchanges, one pays the exchange a withdrawal fee instead of paying the network fee.  The withdrawal fee is usually constant, and usually higher than the average network fee paid by the exchange.
Fees to the exchange ... any commercial centralized market place do eventually have costs and hopes to get investments recovered; I would be vary of a site claiming to be for free - though, some exchanges takes in most of the profits on margin traders.  Sometimes market makers pays less fee than market takers - sometimes it's opposite (on Localbitcoins market makers pay the full fee).
Arbitrator fee - on peer-to-peer-platforms (Bisq) where arbitration may be needed, one may have to pay a fee for that.
Spread - on any exchange there will be a difference between the bid and the offer.  If you need to buy bitcoins instantly, you will have to cover the spread.  If you have the time, then place a bid/offer just marginally better than the competition and wait for the other party to take your offer and cover the spread.  On the exchanges with highest volume, the spread will anyway be insignificant compared to the volatility.
Banking fees, for converting fiat to/from exchanges and/or other peers selling bitcoins.
Currency converting costs.  YMMV, but for me this is a relatively significant and a somewhat hidden cost of sending fiat to an exchange.  The exchange typically don't do trades in my local currency, and my bank gives me a pretty bad exchange rate when I send money to the exchange.
Even meeting up with other people to trade cash may be costly wrg of transportation costs and time taken.
Time is money - spend hours searching for the cheapest offers, and how many dimes did you save on it? (And how much did the bitcoin market value rise while you were searching for it?)

Risks

No method are without risks.

Bankruptcy - as for the centralized exchanges this is probably the biggest risk - one day you send money to the exchange, the next day the exchange is gone.  It does happen from time to time.
Funds on a centralized exchange being frozen for other reasons.  Your funds may be frozen for a variety of reasons - it does happen from time to time.
Bitcoin transactions getting stuck.  Not so much an issue when transferring from the bigger exchanges, but due to the block size issue a transaction may stay pending for arbitrary long if it appears the transaction fee was too low.  I have personally experienced twice that a transaction from an honest seller using "wrong" wallet software was timing out after 72 hours.  This became less of an issue in late 2017, as the default timeout has been increased to two weeks and because there is more often periods with idle capacity in the blockchain.
Money lost or stalled due to other technical issues - seldom an issue, but if using a "shitty" exchange it may happen.
Simple scams (mostly an issue if buying or selling bitcoins to random strangers without a proper escrow system in place).  Some payment methods are also reversible (particularly credit card payments and paypal payments) or easy to fraud.
Fake exchange scams (mostly an issue when selling btc); there exists several sites looking like legit exchanges, except they will just eat up your bitcoin if you transfer btc there.  It has also happened that an attacker has managed to highjack the DNS entry and get a valid SSL certificate for the exchange (openledger.info).
Money laundring; lots of the money in circulation comes from criminal sources, and you may become suspected of money laundry.  This may cause your funds to get frozen on centralized exchanges.  This may cause troubles with law enforcement if trading peer-to-peer.  Laws may vary between different jurisdictions, unless it ought to be obvious that the money comes from criminal sources you generally should be on the right side of the law, but having to spend time answering questions from the police is still within my definition of "trouble".  Some banks may even decide to freeze your account just because you're sending money to the exchanges.
Third party scams; mostly an issue when selling bitcoins (anonymous money) for bank deposits (trackable money), not so much when buying bitcoins - a fraudster tricks a victim (or gains unauthorized access to the bank) into sending money to the bitcoin seller, and tricks the bitcoin seller into sending bitcoins to the fraudster.  The victim gets angry with the bitcoin seller i.e. because he's expecting the bitcoin seller to send him an iPhone.
Outright robbery - may be a risk if doing cash trades (I've encountered some attempts on robbery myself when doing cash trades), especially when appointing meetings with random strangers in dark alleys, or if counting bigger amounts of cash on a public place with the wrong person watching.  If you expose that you have a lot of bitcoins i.e. through Localbitcoins and your identity and address can be found out, you may also receive threats ("pay one bitcoin to address 1... or else something bad may happen to your family" - I've experienced that, too).
Software bugs and malicious software; can you trust the wallet software, etc?  How to tell that i.e. Bisq does it's job, without any severe bugs causing bitcoins to be lost?

Other answers here are focusing on the best or cheapest exchanges.  I'll skip that and try to make an overview of alternative market places:

Bisq (formerly Bitsquare)

Bitsquare is a free and decentralized market place, it comes with a good escrow protection.  It does have some drawbacks though:

I managed to buy bitcoins through a "same bank"-offer, using my local domestic bank account.  However, I did need to know the SWIFT-code for my bank, and I did need to know how to convert an IBAN to a local account number.  YMMV, but I think this is a bit too difficult for quite a lot of people wanting to buy bitcoins.
It's an application, not a web site - meaning you need to install special software to access it.  Also, it's a graphical monolithic application that is supposed to be running 24/7, difficult to use on/from laptops and mobile devices.
You can't buy bitcoins without already owning bitcoins - you will need to seed the application wallet with enough bitcoins to cover transaction fees and escrow deposit
As far as I can see, there is no way to do free-text communication with the seller there.
There is a max limit for how much can be transferred in a single trade
Beware of the potential chain split in November - the maintainer has promised to follow the 1X-chain, so if SegWit2X should be successful, one may end up at the wrong side of a chain split.

Bisq supports bank payments (including local currencies and local banks) and convertions to/from altcoins, as far as I can see cash is not an option there.

You will eventually need to cover banking fees, and the bitcoin transaction fees will be higher than normal due to the complexity of the escrow transactions.

(Note: the author haven't tried Bisq for quite some time, the information above may be out-of-date).

IRC

The IRC channel #bitcoin-otc on freenode is also place where it's possible to trade coins with no middleman taking commissions.  I've never tried it though.

Mycellium

The mycellium wallet (android) has a cash-transaction built-in marketplace which is (as for now) without any fees - but if it ever becomes popular, the Mycellium team may decide to slap a fee on it.  During the last year, I've gotten close to 0 trades through the Mycellium platform, so I've given it up.

LocalBitcoins

With a 1% fee (paid by the advertiser), LocalBitcoins.Com (LBC) is an unlikely candidate on this list - but still, the fee is not mandatory to pay, one can "sneak" away from it, without violating the ToS.

If you search for offers on LBC, you will most likely find that there is a relatively big gap between the offers and bids.  If you don't need to buy bitcoins immediately, you can "turn the table" and put out your own "i buy bitcoin"-ad.

Telegram

On the telegram chat service there is a bot BTC_CHANGE_BOT.  I haven't tested it though, don't even know if it has fee structures.


Why don't Bitcoin Full Nodes who are not Miners get compensated? Why don't full nodes who are not miners get compensated for running, storing and validating the network?

I don't think Satoshi ever answered this question so we can't be 100 percent sure on the rationale but it was clearly the right decision. Firstly, at least today (if not when released) it is orders of magnitudes more expensive to mine a block or contribute material hashpower to a mining pool than it is to run a full node. Secondly, it would be extremely difficult to locate all the full nodes on the network to distribute what would be a miniscule reward. The full nodes would need a way of telling the network what Bitcoin address they wanted to receive their "full node reward" to. Thirdly, it would cost a lot in transaction fees and take up a lot of limited block space to create an output for every single full node (tens of thousands exist) on the network every block to distribute the reward. Fourthly, many full nodes connect and disconnect to the network regularly. So you would need a way of monitoring all connections and disconnections to work out whether the full node deserved a "full node reward" for a particular block.
I'm sure there are many other reasons not to do this but hopefully the above convinces you that this is not a viable idea!


Automate Bitcoin Wallet Creation I spent several hours looking for an API, or a documentation that wouldn't be too much complex but this single thing which I was thinking would be a natural question for anyone who wanted to get started with Bitcoin programming doesn't seem to be very documented.

I'm looking for a way to automatically create a Bitcoin wallet online, I want to create an experience similar to this : http://www.bitcoinbymobile.com/ ("Get Started" -> "I don't have a bitcoin Wallet"). They create a bitcoin wallet for the user directly online and give him a bitcoin address : that's exactly what I would like to achieve. However I can't find any documentation on it.

My ultimate goal is to create a wallet online for the user and to let him put money in this wallet using his local currency and his credit card. But considering what I've seen so far, bitcoin exchange automation seems to be a great deal at this time.

To clarify, my whole question is : do you know any good (and ideally easy) way to programmatically create a bitcoin wallet and generate an adresse on a website AND (I realize it's a different question) to fund this account with a credit card. I find that this is the part of using bitcoins that is really missing.

We can't expect people to use bitcoins for retail commerce if there is not an easy way to create a wallet and to fund it rapidly. For now, what I have understood is that people have to create a wallet either by downloading the program or by creating it on a website and then, they have to have to find an other good website to buy bitcoins. The actual system seems to be more oriented to financials who don't mind to do it than to the average customer who will very rarely complicate his life like this.

You need to use JSONRPC interface used by bitcoin daemon.
See this: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
or specific PHP example: https://en.bitcoin.it/wiki/PHP_developer_intro


HELP i sent btc from a tor wallet, The recipient hasnt recieved it I have been on blockchain and seen the transaction into the tor wallet. https://blockchainbdgpzk.onion/address/1BMbBKshk9ihrQWMseoDt5bXJvQgQPeRkA?filter=5

my torwallet recieve address is     1BMbBKshk9ihrQWMseoDt5bXJvQgQPeRkA

How do I see what was sent out? As I sent out 2.55 btc, It went to an addy that has not changed so i desperately need to track this down. and see why it hasnt landed

I see that your wallet sent out a total of 2.69947368 BTC in this transaction  on June 2nd, in block 469404, which has now been confirmed 1000+.


Threat probability? 1 state controls >70% of miners. Other states go to war with them This is almost certainly a silly question, but there are a lot of new bitcoin owners like me and a specific threat was made today which sounds credible to those of us who lack deep knowledge of bitcoin.
The specific threat is this one:
1: China controls 70% of the miners. SOURCE
2: They are using Hydroelectric and Nuclear Power reactors to do this. SOURCE
3: The United States (and allies) are seeking to destroy bitcoin in a war with China.
4: Bitcoin will go to 0 and US regulated coins will survive. SOURCE
So it's kind of 2 threats rolled into 1 and I'm trying to come up with a "probability of threat number" to determine if I should even devote time to considering this.
My guess is that the probability is less than 1% but it's just a guess and I have a high amount of uncertainty due to my current depth of knowledge.
Again, please forgive the silliness of the question, but any assistance to help improve my confidence that the threat is not to be taken seriously would be appreciated.

China has dominated mining due to cheap power and hardware expertise. However, other than mining the US has been much friendlier to Bitcoin companies, startups, investors, open source developers etc than China. In addition, there are recent US based mining initiatives to attempt to decentralize mining and reduce Chinese dominance. A decentralized and censorship resistant protocol does not gel particularly well with China's surveillance and Great Firewall philosophy to digital communications and its renminbi currency controls.
With regards to probabilities, obviously no one can quote probabilities because it is purely speculative. It seems to me though that the probability of the US government banning Bitcoin or in some way attempting to destroy it via multi m/billion dollar attacks is extremely small (especially for the suggested motivation of hurting China). China holds over a trillion dollars of US government debt denominated in dollars which massively dwarfs any Bitcoin it may hold. Fiat currency wars and monetary policy are far more impactful than any attempt to devalue a country's Bitcoin holdings. The majority of attacks on the network would only achieve short term disruption at best and would be very costly when compared to using that investment to generate Bitcoin block rewards.
The US regulates the fiat to Bitcoin onramps and may seek to impose more burdensome regulation. However, it has funded and put in place a regulatory regime that has allowed internet companies to thrive over the past two decades and there is little reason for it to not to do the same for Bitcoin.


Bitcoin core: connect to specific peers from file I want to launch Bitcoin core connecting to a specific list of peers. I can do this using connect:

bitcoind -connect=<IP1> -connect=<IP2>

Is there a way I can put the peers I want to connect to into a file and give this file to bitcoind as input?

Within the data directory for your coin (/dir/for/yourcoin/.yourcoin) you will have a configuration file. Within this configuration file, you will want to place the line connect=IP ADDRESS:PORT

This will make your client automatically attempt to establish a connection with the node(s) you specify.

Example: within myaltcoin.conf place the line connect=192.168.49.50:9332
Obviously just substitute your desired IP address and port.


How to accept USDT payments the right way? We are developing an e-commerce solution and consider USDT to accept payments.

At the moment as I understand we can generate many addresses (1 per transaction) with BIP32 spec approach. Based on Omni spec seems we will have to send money from each address to some another address (say master wallet) in order to be able to withdraw or act with the received amount in full.

While Bitcoin blockchain allows generating transaction with multiple inputs (so we can send 1 tx from many inputs) to one or more outputs this is not supported in Omni.

So the question is how to do it the right way? Sending from one address to another address will take fee in BTC producing additional costs (like 1M transactions mean 1M address X fee).

fill addresses with dust, like 300 sats, receive OMNI/USDT on those. as soon you received, send them to your hotwallet. it's a regular BTC transaction, so you need to have some balance to pay the fee.

or, just do it on the etherchain as regular ERC20 token


Is it profitable to use Amazon EC2 to mine litecoins? I saw that mining BTC with CPU is not profitable anymore, and that you'd lose money mining bitcoin. Is the same thing true of litecoin?

Yes it can be worth it, but generally what happens is if it ever is worth it then a huge number of people start doing it until the prices of EC2 are driven up and it is no longer profitable. Here is a good blog post about the subject:

http://da-data.blogspot.com/2013/12/briefly-profitable-alt-coin-mining-on.html


Does P2SH unlocking script only consist of operants? I have a question about the P2SH unlocking script. Can I put common operants and operators in the P2SH unlocking script? And if yes, how can I create such script?

e.g.

unlocing script: <sig1> <pk1> CHECKSIG <pk1> <redeem script>

redeem script:  HASH160 <address> EQUALVERIFY <sig2> <pk2> CHECKSIG

Can I put common operants and operators in the P2SH unlocking script?

No, you can not.

1) Unlocking script ( scriptSig ) should contain only push operations, yours contains OP_CHECKSIG

2) It has no sense to put signature sig2 into the redeem script and check it with OP_CHECKSIG because such script definetely fail on execution. If you want to put any data in the redeem script - you can do it in other way.


As of 2017-09, Has there been talks or test implementations of making Litecoin anonymous / untracable like Monero or Zcash? Being that Litecoin is more likely to implement experimental features before Bitcoin. As of today 2017-09, has there been discussions or test implementations of making Litecoin anonymous like Monero's Ring Signatures or adopt similar features like Zcash?

Increasing fungibilty is a goal, there have been several proposals of differing seriousness and support. But this is generally seen as a goal for the project.

That being said, BTC/LTC simply cannot ever achieve this goal as throughly as Monero has without a complete redesign, which will not happen.


What is the path used for the HD wallet in Bitcoin Core 0.13? I heard that the next version of Bitcoin Core will support HD wallets.

What will be the path used for that implementation?

0.13 (current most recent release) supports HD wallets (if you create a new wallet with 0.13 it will use HD by default, <0.13 wallets will keep the non HDness).

You can disable the HD feature in >=0.13 with -usehd=0 (or usehd=0 in bitcoin.conf).

It does use only hardened private key derivation.

The keypath-scheme is m/0'/0'/k'.

BIP44 is not supported right now. It makes little sense (weak security) to use public key derivation (BIP44 does) together with a possibility to export private keys.


What does the prefix of the raw transaction encoding of an exported Electrum transaction file (.txn) mean? I have exported a testnet transaction into a .txn file:
{
    "hex": "45505446ff0002000000000101c6be24d86ab1ae5b54e7e7905b...",
    "complete": false,
    "final": false
}

However, as explained in this article, a raw transaction string starts with version number and:

The version number is four bytes long and is expressed as a hexadecimal value in little endian format.
There are two version types. Version 01 indicates that there is no relative time lock. Version 02 indicates that there may be a relative time lock.

So this hex is not a qualified raw transaction encoding, due to the prefix
45505446ff00

The version number comes after this prefix:
02000000

So I was wondering, what is the function of this prefix that Electrum adds to the raw transaction string? And is it always the same length? Because I need to automatically splice it off in order to get a valid raw transaction string.

It stands for:

45505446 - EPTF - Electrum Partial Transaction Format
ff - Separator
00 - EPTF Version - This is currently always 0.

You can verify this quickly by running a python interpreter.

Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b'EPTF\xff'.hex()
'45505446ff'


How to see bitcoin in my wallet I bought bitcoin from coinmama and sent it to my bitcoin core wallet, but after the syncing was done I don't see that my wallet has been credited. Has anyone else experienced this issue??

Thanks!

A few questions to ask:

Did you send it to the right address?
Is the address's private key controlled by/imported into the bitcoin core wallet? E.g. $ bitcoin-cli importprivkey <WIF>
Make sure the transaction has been confirmed on the blockchain.


What would be the value of Bitcoin if coin generation was complete and Bitcoin was strongly accepted today? Bare with me for a moment during this thought experiment. Currently, there is about $1.18 trillion US dollars in circulation at the moment. With that said, my one dollar bill currently represents about 1.18 trillionth of the US economy.

It is estimated that the last block to generate coins will be generated in the year 2140. At that time, there will be about 21 million bitcoins in circulation. And thereby, my one bitcoin would represent about one 21-millionth of the bitcoin economy.

Now let's say the following were true today:

Bitcoins have been completely generated
There is about 21 million bitcoins in circulation
There is about $1.18 trillion US dollars in circulation
Bitcoin is as widely accepted as a form of currency as the US dollar
The strength of the US dollar is on par with Bitcoin

Due to the large amount of circulated dollars compared to the amount of circulated bitcoin, can we assume that 1 BTC would be similarly valued at one 21-millionth of the $1.18 trillion circulated US dollars? This would equate to around $56,000. I know a lot is being assumed here, but does anyone see any major flaws in this logic?

If it so happens that bitcoins are as widely accepted as USD are today, then yes that's a roughly reasonable estimate.

You might enjoy the following link for some more thoughts along these lines:
http://falkvinge.net/2013/03/06/the-target-value-for-bitcoin-is-not-some-50-or-100-it-is-100000-to-1000000/

(One side note: just because new bitcoins are slated to stop being created in 2140, that doesn't mean no more new blocks will be created. Blocks are essential to record transactions, and they'll continue being appended to the blockchain even after the bounty drops to 0.)


Can we use a Paper Private Key that has been loaded in the Bitcoin client? Okay, I want to start offering Bitcoin as a payment option on my e-commerce site. For now, I just want to keep it simply as an option for those overseas customers who don't have credit cards/PayPal so I don't anticipate a high number of transactions. I have gone to Bitaddress.org to generate a bulk wallet, I have loaded the private keys (together with the related public address) on a USB drive and on an old non-networked computer. I plan to email a new Bitcoin address to each customer that wants to pay by Bitcoin. I have loaded a list of these addresses into bitcoinmonitor.net so once a customer pays I get an email notification after 4 confirmations and then I can ship out the product.

2 Questions:

How can I install Bitaddress.org on my non-networked computer so I can generate future paper keys without even being online, for added security? I know it's possible, but if anyone can help with a step by step would be great.
I do have the regular Bitcoin client. Eventually I may want to consolidate all these coins into one wallet but still be secure. So I figured I could then import all these private keys into the wallet that is part of the Bitcoin client (using these steps https://en.bitcoin.it/wiki/How_to_import_private_keys_v7%2B). The question is does the private key somehow change upon import? To put it another way, if the computer which runs the Bitcoin client explodes, and I did not backup the wallet.dat file, am I still safe, because the private keys that are kept on my USB or even just written down can still be used? or did the action of importing the address somehow change the private key? If it is safe, I suppose there may still be a little loss of bitcoins if any "change" transactions created new addresses? Any help is appreciated (including any problems you see with my plan). I can't program (even html), but I am very excited about Bitcoin!

1.) The web page at BitAddress.org can be loaded from a file on a thumb drive or other storage.   Most browsers let you save the web page using a View Source (right click maybe), and then Save File to a thumb drive.

Then from the offline computer you open the file from the browser and the BitAddress page will load.

2.) The private keys don't expire or invalidate after they've been imported into the client. You correctly identified the problem with that is how if you spent any of the incoming funds, the client creates a new address for "change" and thus the wallet may show a balance that includes funds not in any of the addresses from the imported private keys.  So wallet backups are still important.


Why do we need two different formats of WIF (wallet import format)? I know that a public key can be compressed. However, a public key and its compressed one have the same private key. Then why do we need two different Wallet import formats for each compressed and uncompressed one?

Wallet software needs to know whether to search the blockchain for an address generated from a compressed public key or not. The encoding of the private key signals which type should be searched for.


Can cryptocurrencies never be fully decentralized because finding peers is centralized? When initially running a cryptocurrency client, it needs to fetch peers from a centralized source. If an attacker gains control of all of a client's default peers servers, they would be able to restrict the client's access to the rest of the peers. Then, they can give the client fake data and there would be no way for the client to tell.

Are we just ignoring this issue because it'll be hard to gain control of the servers?

... it needs to fetch peers from a centralized source.

Not exactly. Once you are connected to the network, you will begin to receive lists of IP addresses and ports of known clients.

There is a list of seednodes built into Bitcoin. These addresses are only used as a last resort.

After you connect to the network once, you won't need to use the DNS seeds, etc. anymore. The Bitcoin network has a system which allows every network participant to (over time) get the IP addresses of all other network participants. Bitcoin stores this info in a local database(peers.dat) and contacts these nodes when it next starts.

  Are we just ignoring this issue because it'll be hard to gain control
  of the servers?

Note that if user have found out that he is under attack, he just needs to connect to one real Bitcoin node. It would be "quite difficult" for an attacker to pull this off, and probably not financially worth the while.


How long do MtGox withdrawals take? On Thursday, August 1st, I withdrew (or so I was given to understand) some dollars from my MtGox account.  They were to be wire-transferred to a checking account in the USA.  When the money hadn't shown up after two weeks, I sent an email to MtGox asking how I could tell where the transaction is in the queue.  I got a reply that didn't answer that question, but said that transactions are taking longer than they would like.  The money still hasn't been transferred.

Is this amount of time typical, or did this somehow get lost?  Is there some way to tell where in the queue I am?

I requested a transfer on July 22 and still haven't received it yet. There was a bounty offered for people to prove that they've received a wire in USD from Mt.Gox from the moment in which they announced they had resumed withdrawals. Only one user claimed it and he requested his wire on July 3 (which was July 4 on Japan time which is Mt.Gox's time zone). Unfortunately, it seems he's the only person to have gotten paid so far or the others aren't sharing any info.

Thread here:

https://bitcointalk.org/index.php?topic=251895.160


Error: Disk space is too low! I am trying to run bitcoind on a raspberrypi.
I started by starting bitcoind on my laptop,downloading and verifying the blockchain. So far so good, bitcoind works as expected.
Then I set prune=600 in bitcoin.conf, and it pruned as expected.
Then I moved the datafiles to my raspberrypi (the whole /bitcoin directory ).
The SD card has ~7Gb of storage.  3.5Gb was available, including the /bitcoin dir.
There was a pause of some days or weeks, so I lack the blocks in between times.
When I ran bitcoind it gave me the 'Error Disk space is too low' report, and the SD card is full
root@mybox:/home/rshn# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.3G  7.0G     0 100% /

The bitcoind log seems to indicate that it is downloading from the earliest blocks
2021-05-06T08:09:10Z
UpdateTip: new best=000000000000065c0819853ac71bdda8518706b8942f6540079ad079e2dea6e4
height=193539 version=0x00000002 log2_work=68.525890 tx=5868863
date='2012-08-12T12:29:56Z' progress=0.009181 cache=261.0MiB(2279817txo)

The blocks dir indicates that there are about 460Mb of data.
root@mybox:/home/rshn/bitcoin/blocks# ls -l
total 460068
-rw------- 1 rshn rshn 134212156 Apr 30 13:07 blk00002.dat
-rw------- 1 rshn rshn 134205043 Apr 30 13:08 blk00003.dat
-rw------- 1 rshn rshn 134191619 Apr 30 13:10 blk00004.dat
-rw------- 1 rshn rshn  16777216 Apr 30 13:10 blk00005.dat
drwx------ 2 rshn rshn      4096 Apr 30 13:10 index
-rw------- 1 rshn rshn  16271929 Apr 30 13:07 rev00002.dat
-rw------- 1 rshn rshn  16501235 Apr 30 13:08 rev00003.dat
-rw------- 1 rshn rshn  16826540 Apr 30 13:10 rev00004.dat
-rw------- 1 rshn rshn   2097152 Apr 30 13:10 rev00005.dat

How do I run the pruned node in these circs?  Thank you.

The answer was
The bitcoind client/executable was owned by user rshn.
I started the bitcoind client from a terminal as root user.
bitcoind treated the process as a new install because the owner was different.
bitcoind started downloading the full blockchain,
hence I ran out of disk space quite quickly!
TIL  start the bitcoind client logged in as the owner of the executable.


API for top bitcoin addresses sorted by available balance Is there any API from where I can get the list of top bitcoin addresses sorted by available balance? I know there are many websites out there listing Bitcoin rich list but I need an API.

This should works: http://www.tokenview.com:8088/address/richrange/btc/1/100
API documentation: https://tokenview.com/en/api


How to sell Super Bitcoin Fork I would like to sell all the forks of bitcoin especially Super Bitcoin Fork. I can see that Super Bitcoin is traded on few exchanges, but the deposit of Super Bitcoin is disabled or temporary off on all of these exchanges. Is there any way how to sell it?

List of exchanges that seem to be trading Super Bitcoin are listed here https://www.coingecko.com/en/coins/super-bitcoin/trading_exchanges

Gate offers the best liquidity at this time. Good luck


Is there a blockexplorer with a websocket API that includes relay IP address? I have a visualization that shows realtime bitcoin transactions plotted on earth: https://blocks.wizb.it.

I relies on blockchain.info's websocket API, which used to include the relay IP per transaction but unfortunately it is now always including 0.0.0.0 instead of a public IP. I've tweeted them about it, but I am looking for an alternative. Does anyone know one?

I am running a full node already, however it is not well connected enough to do this myself and actually get more than 10 different peers.

It looks like a blockchain.info API bug.

https://blockchain.info/rawtx/315d3cf722b73a2ad434dc3dba108bfb5ccdb13ea324bfa4d6e17ca3e741ad1f

"relayed_by":"0.0.0.0",

https://api.blockcypher.com/v1/btc/main/txs/315d3cf722b73a2ad434dc3dba108bfb5ccdb13ea324bfa4d6e17ca3e741ad1f?limit=50&includeHex=true

"relayed_by": "213.239.196.9:8333",

Note: I have no association with either API, but I have used Blockchain.info before, and know it can be buggy.

Also, relayed_by: 127.0.0.1 means that blockchain.info relayed it themselves.


What are the problems with naive pool sharing mechanisms? @David's comment on this answer suggests that naive approaches to mining pool management don't work. What attacks are possible on such naive approaches, such as every miner gets a share proportional to his work?

The primary problem is an "attack" of sorts referred to as "Pool Hopping." Pool hopping was first described in a paper by Bitcoin forum member Raulo and between the paper and the ensuing discussion, it was determined that there is a strategy by which pools utilizing a proportional payout method can be exploited to maximize the miner's payout at the expense of other miners in the pool.

The attack works something like this:

If the number of shares submitted to a pool are less than or equal to 43% of the current difficulty, the miner mines at this pool.
If another pool has a lower share count, the miner switches to that pool instead
If no pools in the miner's list are at or below the 43% mark, the miner switches to a pool with a fair payout system as backup.

The math for why this works is well described in the paper I've linked, but the basic concept is this: If I submit one share and it's the only share in the pool so far and it just so happens to be the share that solves the block, my share was worth 50 BTC to me. If my share is one of two, it was worth 25 BTC and so on. Shares submitted in "short rounds" (i.e. rounds that take n < difficulty shares to solve) are worth more each than those in "long rounds" (n > difficulty shares). If a miner stays at a pool for a long time, the long and short rounds even out. Pool hopping ensures that you're always part of those "short rounds."

The full explanation is somewhat more complex, but that's a fairly basic explanation. 43% was chosen due to the math explained in Raulo's paper and there are a few scripts and applications to automate the pool hopping process, some free and some commercial.

There is rampant argument about the ethics of pool hopping, but there is little argument as to its effectiveness. Even hopping between a single proportional pool and a fair-scored backup pool sees substantial earnings increases. Hopping between multiple vulnerable pools increases gains dramatically.


does 24-word recovery seed recover just bitcoins or all coins? I keep Bitcoins, Bitcoin Cash, Bitcoin Gold, Ethereum (via My Ethereum Wallet) and Litecoins on a Trezor.

Question 1:  In the event that my Trezor is lost or destroyed, will my 24 word recovery seed restore my access to just the Bitcoins, or will it recover the other coins as well?

Question 2: If the answer to Question 1 is "just the Bitcoins", then what should I be doing to preserve my access to the other coins in the event of a lost Trezor?   Is there some way to  display my private keys and copy them down on paper? Or something else I should do?

Yes, you will have access to all of your cryptocurrencies.
The 24 words seed is used to derive the master key. Keys for all cryptocurrencies are derived using BIP32 and BIP44.
You can check out the BIP44 Mapping Table.

The 24 words seed can be used on BIP39 compliant wallet like Electrum.
The private keys can also be accessed with BIP39 Tool GitHub or the online version (I don't recommend using it online.)


Any website that explains most of the BIPs in a different way that newbies can understand better? Almost everything about all the BIPs is explained on github : https://github.com/bitcoin/bips still looking for a website that explains them differently (simple language, diagrams, history, implementations, etc. which everyone can understand better and appreciate the importance of proposals in Bitcoin.

I am not aware of one comprehensive write-up, but Aaron van Wirdum has a few great write-ups of various proposals in Bitcoin Magazine, the Bitcoin Optech newsletter has covered a number of the more recent proposals in depth, there are a number of talks (and transcripts of those) about BIPs on Youtube from conferences, workshops and Bitcoin meetups. There are a few BIPs that have their own tags here where they are covered more in depth, but again, I don't know about a single resource that is just focused on explaining all the BIPs. Maybe someone should start one? :D
Until then, our site here is a great place to ask all your questions about any BIPs.


Could someone solve for your private keys by sending many transactions to the same address? I've read that it's never safe to use the same bitcoin address more than once because there is a small chance that someone could solve for your private keys (though I don't have a solid-enough background in encryption to understand all of the implications of this concept). In any case, even if you did generate a different address for every incoming transaction, what would stop an attacker from simply sending many transactions to the first address they see in an attempt to crack your private key?

So there are attacks where if you sign enough times with the same private key, the attacker, with access to a side-channel can figure out your key.

So if you were signing with your private key a lot of times, this would make your private key slightly less secure. If you're receiving bitcoins to your address, you're not signing with your private key, so this isn't an issue.

The more important consideration here is that you lose privacy with address reuse.


About Nbitcoin NodeBehavior We wrote our transaction listener and we were implement the NodeBehavior class. But when I update version of NBitcoin v3.0.0.60 to v4.1.1.46 I can't use the NodeBehavior. Because Nbitcoin cannot support to Protocol.Behaviors. What can I do? Are there another auxiliary class? Or can you suggest me another way for listen to transactions ??

Thank you for now.

I changed the .Net Framework 4.5.1 to 4.5.2 and I updated again the NBitcoin after that the problem solved.


Is there a way to estimate total number of bitcoin users/wallets? I was looking at Bitcoin Wiki.   It estimated 60,000 users (Sep 2011) based on
counting the number of bitcoin clients connected to the network in the last 24 hours.

Another possible estimate could come from Sourceforge download numbers.  But that include multiple download by the same person and across different version, and also exclude users that may have downloaded the client from other mirrors.

Have there been any new estimates on the total number of bitcoin users, or if this is too hard to count -- the number of unique wallets?

The number of wallets is impossible to count, as they can contain zero to thousands of addresses each (zero, as there may be users who just want to observe, or clients that only create addresses when explicitly asked to).
Counting users by number of client downloads won't give you a good estimation either, with all the web wallets that are out there, plus of course the other clients that are out there, the alternative ways of downloading the client and the double downloads.
Counting connected clients will also give bad results, again because of the web wallets, plus people who don't broadcast their IP address or simply don't start the software unless they really need to.

You may be able to estimate the total user count by asking all web wallets for their user counts, and then adding the amount of nodes on the network over a relatively long period. But then you'd still need to compensate for those who don't broadcast their address, dynamic IP addresses, etc.

So yeah, it's hard to estimate the user count.


How can Trezor update firmware but never receive malware? I understood from What is it about a Trezor that means it can't be infected by malware? that a Trezor would only interpret data as transaction details, but the Trezor also updates firmware.  How is it that an attacker can't hack the firmware update to somehow install malware?

You actually can't update all the firmware. In particular, the portion of the firmware that implements the security logic cannot be modified, it's burned in for good.

If you want to take full control over a Trezor, which would even let you load malware onto it, you can. However, the internal security logic would still wipe all the data in the unit when you did and display a warning each time the unit was started. So you can't use the firmware update path to steal secrets, nor can you trick someone into using a modified Trezor, so long as they watch the startup.

Assuming all this is implemented correctly and has no bugs or defects, that leaves only the possibility of malicious firmware signed by the manufacturer so that it would be accepted by the security firmware without tripping the safeguards. So to some extent, you have to trust the manufacturer. However, if they ever signed "evil firmware", and that firmware got out, their reputation would be ruined.


What is the difference between BitCoin, Bitcoin, and bitcoin? I've seen several capitalizations of the term "bitcoin". What do all these mean?

The following answer seems to be the consensus judging from this question on the meta site.

  Use Bitcoin (with a capital "B") when talking about the
  concept/technology.
  Use bitcoins (no capitalization) when talking about the unit of
  currency (4 dollars - 4 bitcoins).
  Never use BitCoin or BitCoins


Blockchain is showing 2 incoming addresses for a transaction? A transaction into one of my wallets is showing that it came from two addresses? How can I find out which one it came from?

It came from both.

Transactions can have multiple senders and multiple recipients.

Sometimes a single address can also be both a sender and a recipient.


PPC (peercoin) obsoleted by NXT? PeerCoin has a Proof-of-Stake concept (and a small portion of Proof-of-Work), to secure the network. NXT is using only POS, which makes it even more energy efficient.

Will NXT render PPC (PeerCoin) obsolete? Or which disadvantages does NXT have in comparison to PPC, except for PPC being older and therefore being more established.

One could suggest that PPC is unattackable by currently known methods because of its hybrid PoW/PoS model.

NXT can be theoretically perpetually DoSed or at least hampered by DDoSing each successive forger since the network frequently knows with high certainty the IP of the next forger.

The most likely case is that no properly written cryptocurrency is generally attackable.  I have found no evidence of network attacks, but I'm not as deep into the communities as others.

From very far away, they are indistinguishable: both slower than Ripple and less prestigious than Bitcoin; they're market capitalizations are evidence of those facts.


Are there any services that can reasonably guess what IP address a transaction originated from? Are there any services/agencies running a large number of nodes so that they can guess the IP address of a transaction's origin?

I guess they would need to run tens of thousands of nodes. However it'll be useful in tracing stolen coins. Surely there must be some.

I have seen talks and papers claiming to do so but not found any such service.

I see this as a non-issue. By using Tor the IP address of the originator is sufficiently obfuscated.

See my two other posts for some discussion and related resources:

How can I setup Bitcoin to be anonymous with Tor?

What are main advantages of Bitcoin over Monero?


What is the most efficient way to store bitcoin addresses in a database? Let's pretend I wanted to store 1MILLION btc addresses in mysql,

I thought about saving the last 10 digits of each submitted address and testing against that but would 10 characters be enough to avoid duplicates?
Is 10 digits too much? Or is there an even better way, does an industry standard exist?

Thank you in advance :)

It's not really clear what your use case is.

If you need to retrieve the addresses later, you can store each address as a string. That's only ~34MB, which easily fits in memory.

To save space, you can convert each address to hash160 format, which is only 20 bytes. In total, that's 20 MB.

If you're merely trying to test whether a Bitcoin address is contained within the database then you could use a bloom filter. A bloom filter with a false positive rate of 1 in 1020 and 1000000 elements would only take 11 MB.


Do transactions and blocks get relayed even if a node believes them to be invalid? Each node has a very clear view of what is valid and what is not. With conflicting blocks (Blockchain fork) or transactions (double-spending attack) it will always choose the first it sees, until it gets prove otherwise (longer blockchain or other transaction is included in a block).

I'm wondering whether the Satoshi Client relays any of the transactions or blocks he thinks are not valid. So will I ever see a transaction if all my neighbors have seen a conflicting transaction first? Will I see forked blocks if all my neighbors agree on which block came first?

A block is valid only if it obeys all the protocol rules.  If it is invalid, it will not be relayed:

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

Now the client does maintain side chains.  So if there is the main branch and a side branch, even though the node included a transaction in the main branch doesn't mean it will reject a block for the side branch just because it too contains the same transaction.  So for each branch it is determined if that block was valid or not.

But there is a rule that valid blocks are only relayed if they are added to the (new) main branch / best known chain (thanks to Pieter for the correction).

As far as a new transaction being relayed - if it is invalid for the main branch (e.g., double spend) then it will not be relayed by the node.

So a transaction is either already in a block in the main branch already (and thus would be rejected if it is a double spend) or it isn't in the main branch and will as a result always be relayed.

This will be relayed even if that transaction is already included in a block in the side chain.


What are the most respectable Bitcoin news websites? Which blogs or websites are the most respected in the community to bring everyone up-to-date with the Bitcoin-related news? I'm not talking about the forums, as the sheer volume of messages are overwhelming, nor am I talking about major news sites that occasionally mention Bitcoins. I'd like to know where should one go if they want the latests ins and outs of all things Bitcoin related in a digestible form.

Here are a list of blogs/sites I follow to keep up with bitcoin news:

reddit/r/bitcoin - user aggregated bitcoin links/topics, usually anything notable will be posted here.

Bitcoin Magazine - also available as an actual physical print magazine.

Cryptocoin News - mentions altcoins, but Bitcoin is most prominent

CoinDesk - a relatively new entrant to the Bitcoin news space

The Genesis Block

The Monetary Future - not exclusively bitcoin related but often covers bitcoin or related topics. This blogger (Jon Matonis)  is now a Forbes blogger and the content will typically appear on the Forbes site first.

Coding in my sleep - a personal blog  but more and more bitcoin related topics recently.

The Bitcoin Trader - excellent blog on bitcoin related topics. (less active recently (end 2012))

Bitcoin Money - another bitcoin blog.

Bitcoin Miner - bitcoin mining focused blog.

Bitcoin Watch - has a collection of links to the latest news along with exchange stats etc.

stuffexists.com - collection of lots of useful links.

Bitcoin Media - blog with articles mainly by Amir Taaki (genjix) (a Bitcoin developer)

blockchained.com - has a Top 16 Hot Topics from Bitcointalk.org (seems to use an algorithm to rank the most active current topics) as well as charts an some news links (was bitcoinx.com but that currently only has charts)

Bitcoin on Quora

Bitcoin on Twitter

The press sub-forum of bitcointalk.org is usually kept up to date with any press on bitcoin


Using PHP with RPC and cookie Since 0.12 RPC uses a "random cookie":https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.12.0.md#rpc-random-cookie-rpc-authentication for authentication, but it's not clear how to use this cookie when accessing RPC.

I'm trying things like the below, without success (401 Unauthorized)

$Request = array(
    'http' => array(
        'method' => 'POST',
        'header' => "Content-type: application/json\r\n".
                    'Cookie: __cookie__=contentsOf.cookie',
        'content' => $Params
        )
    );
if (!$Response = file_get_contents(BITCOIN_RPC_URL, false, stream_context_create($Request))) {
    return false;
}

Every example I find online uses the user:pass authentication, I've yet to see an example using cookies.

Not sure if you're still looking for an answer, but I just stumbled upon this myself and for the benefit of anyone running into this.

Even though it's called cookie based authentication, you still authenticate via Basic HTTP.

Let's say your cookie was __cookie__:somerandomlongstring then:

Username __cookie__
Password somerandomlongstring

I figured this out after finding this comment on Github


Can more than 1 block be solved per 10 mins on average (LONG TERM)? I am wondering whether it is possible for a supercomputer to find the next 1000 blocks in a very short amount of time. Hypothetically, if a government agency concentrated a supercomputer on hashing, could they solve the next 2016 blocks in a few seconds?

  The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find.

From what I understand from the article on the bitcoin.wiki, the difficulty would scale until 1 block is found every 10 minutes. This leads me to believe that in the long-term no more than 2016 blocks can be found at a rate of more than 1 per 10 minutes.
I  hope I am being clear. I will check for replies tonight.

Thank you so much.

someone /could/ throw a lot of hash power into the system. and until such a time as the difficulty adjusts, they /could/ produce more blocks than one per 10 minutes on average. but difficulty will adjust after one or more 2016-block chunks (note that change in difficulty is capped at a factor of 4 for each 2016 block chunk), until once again even with the new hash power only one block per 10 minutes is produced on average.

so "in the short term" it is possible for someone to produce more blocks than 1 per 10 minutes, but "in the long term" unless they continue adding hash power perpetually, the difficulty will catch up to them.


Can I be held liable if a gateway vanishes? I'm beginning to wonder what my liabilities may be once I start using a system like Ripple.

For example if a gateway I'm using (say Bitstamp) suddenly vanishes, could I, as a user of Ripple and Bitstamp, be held liable for some sort of debt (in addition to losing my balance on that gateway)?

Say I have 3 bitcoins on Bitstamp (and they're worth $1000 each) and transfer them to Ripple and I buy for $3000 of Litecoin. Then for whatever reason Bitstamp disappears and the price of bitcoin reaches $100 000 (it's just an example), would it be possible that the person/service I bought Litecoin from comes to me and say "You bought us for 3 bitcoins of litecoins and you got your litecoins from us, but your gateway disappeared and hence we never had our bitcoins. So you're liable of $300 000 to us".

Or could Ripple itself come to me and say: "Look, you used coins coming from Bitstamp to buy Litecoins but Bitstamp couldn't honor his word, so now we'll force the sale of your house so that you can pay us the x bitcoins you owe us"?

The question is probably silly but I'd still like to know what, as a a user, my liabilities could be because I certainly wouldn't want any money that I have outside of the crypto currencies world to be at risk once I start using/trading crypto currencies.

I'm asking this because I read about the IOU and I often read things like: "you don't have 3 bitcoins, you have an IOU saying that someone owes you 3 bitcoins". What I want to know is if I'm selling/trading the IOU or if I'm putting my a** on the line.

You are not liable when a gateway vanishes.
When you send money on Ripple, you are trading IOUs. In order for someone to receive IOUs, this recipient must have expressed his acceptance of IOUs from the corresponding issuer.

Alice wants to buy a lot of ice-cream from Bob for $20. They both trust the gateway Gateway.
Alice has previously paid $100 to Gateway and holds therefore an IOU from Gateway with the value of $100. She sends $20 to Bob. Bob also trusts Gateway, so he is willing to accept Gateway-IOUs as payment. Gateway now owes her only $80, and Gateway owes $20 to Bob.

At this point their deal is done. So, if Gateway went under after this, there would be no liability, because the payment was transferred and accepted by Bob. His beef is with Gateway, or with himself for trusting Gateway, not with Alice.


Can bitcoind still do CPU-based mining or was that feature removed? I'm seeing conflicting claims about whether  bitcoind can still do CPU-based mining. As far back as 2011 people were saying that feature was going to "soon" be removed. Was mining removed?
By the way if mining is removed from bitcoind, what are the things it can still do?

It is still there as of version 0.8.5, but just a reference implementation. It's not optimized, doesn't support pooled mining, and is not exposed via the Qt GUI.

To enable, start with the -gen option. But other than testnet (and even there...), it's utterly pointless.


Is there a scientific survey on the number of Cryptocurrency fails / scams? Is there a scientific survey/ publication/ paper about how many of the 1597 cryptocurrencies/ blockchains listed by coinmarketcap.com or similar, might be scam, have failed or are not even developed?

I wonder how many of those hundreds of blockchains around might be serious projects.

Blog entries or estimations might also be useful to me, but I would like reliable information.

Bitcoin.com

  Having completed an extensive study into last year’s crowdsales, news.Bitcoin.com can report that 46% of them are effectively dead already – despite raising over $104 million.

Satis Group's Cryptocurrency Research

  On the basis of the above classification, we found that approximately 81% of ICO’s were Scams, ~6% Failed, ~5% had Gone Dead, and ~8% went on to trade on a exchange.

Lastly, Bitcoin.com also mentions that in an MIT-authored research paper, Initial Coin Offerings and the Value of Crypto Tokens, it was "found [that] only between 5% to 25% of ICOs are frauds." However, I couldn't find evidence of this claim in the paper mentioned.


How Do I Stop My Voltage Converter From Overloading? I have been trying to run miners that I obtained from Whatsminer
They require 220V - 240V power source. Since I live in the United States, I have tried 110 to 220 V step up converters. I have tried 3 different converters, and each one overloads. The miners will run for a short period of time, then overload the converter and the converter will shut down.
Does anyone have suggestions on what I can do to get my miners running? Surely there must be other people in the Western hemisphere that have gotten these to work at home...

Does anyone have suggestions on what I can do to get my miners running?

US split-phase homes are likely to already have a 220V outlet somewhere for high-powered appliances (laundry washers, etc). You need to be sure the miner's PSU is designed for split-phase and not single-phase because the earthing/ground arrangements differ.

An electrician can create a new 220V circuit and run new wires through your walls to 220V outlets in a suitable location.

A higher powered converter (say 5000 W) might work if you have a very high current outlet that can deliver an amount of power greater than the power rating of your miner plus the power losses inherent in any converter. For example an Antminer S19 needs 3250W, if we add 25% (a random guess) for power losses in the converter that means your supply needs to provide 3250 * 1.25 / 110 = 37 amps. Most outlets in US homes will be 15 or 20 amp outlets but you might have a 30 amp outlet for a clothes dryer or electric stove. There is a 50 amp NEMA outlet but I imagine it would be rare. This might be what you'd need for an S19 but I have no experience of that. Again a professional electrician can solve this for you.

Surely there must be other people in the Western hemisphere that have gotten these to work at home

In my part of the Western hemisphere all home power outlets are 230V and can at least power a 3.1kW - 3.4Kw appliance. 7-10kw appliances are common but are usually hardwired (non pluggable) by an electrician. Your problem doesn't exist here to the same extent.

As you have discovered, Mining bitcoin is really a light-industrial enterprise for which most US homes are unsuited. Many US homeowners would need to contact their electric supply company and get a higher power supply to their home. They also need to pay an electrician to do something like wire up a new high-powered circuit from the main panel to a subsidiary panel at the appliance location. Similar to running a hobby machine shop in the garage with an assortment of second hand industrial lathes and milling machines, welders, plasma-cutters etc.


How do I extract my private keys from a protobuf wallet? Recent changes to Andreas Schildbach's Bitcoin client for Android have removed the option to export private keys. This has been replaced by an option to back up the entire wallet. Unfortunately, the wallet data of the Schildbach client is stored in an arcane format called protobuf (short presumably for Protocol Buffers). The Schildbach client can restore a protobuf wallet from its AES-encoded backup file. But the protobuf wallet cannot be imported into a different Bitcoin client such as the Bitcoin Core (QT) client.

For emphasis, I'm aware of the command line method of decoding the back-ups created by Schildbach's client, which in the past allowed the private keys to be saved in AES encrypted format to /sdcard/Download. The following command worked in the past to produce a human readable copy of my Bitcoin private keys:

openssl enc -d -aes-256-cbc -a -in encrypted-wallet-keys -out decrypted-wallet-keys

This no longer works. The following command instead produces a non-AES-encrypted protobuf wallet.

openssl enc -d -aes-256-cbc -a -in bitcoin-wallet-backup-2014-07-19 -out bitcoin-wallet-backup-2014-07-19-decrypted

The -out file is not an ASCII copy of my private keys but a copy of the protobuf wallet used internally by the Schildbach Bitcoin client (found at /data/data/de.schildbach.wallet/files/wallet-protobuf).

Since "when you're a developer it's easy" is probably not sufficient for most people, here is the full step-by-step from a Android Bitcoin Wallet to importing the private keys in Electrum which (finally...) worked for me. This solution uses bitcoinj. The approach using the .proto definition file and opening the wallet in Python was also tested, but seems more error-prone.

Requirements:

Android Bitcoin Wallet in a new version (to my knowledge, some older versions do not allow a backup).
Bash shell: tested with the Windows Bash, but should work on native Linux or OS X. Basic knowledge (cd etc.) helps.
On my system, maven and openjfx were required. Install them with sudo apt-get install maven, sudo apt-get install openjfx
Electrum (current: 2.9.2)

Step by step:

Backup: save the encrypted wallet (Safety -> Back up wallet) and move the backup file to your computer (e.g. via file transfer, Dropbox, e-mail...).
Decrypt: open the bash, move to your data directory and use openssl enc -d -aes-256-cbc -a -in bitcoin-wallet-backup > bitcoin_decrypted as stated above, which will ask for the encryption password.
Install bitcoinj:

git clone https://github.com/bitcoinj/bitcoinj.git
cd bitcoinj
git fetch --all
git checkout v0.14.4
mvn install (fails at GroupTest in Windows bash, but works anyway)
cd tools
./wallet-tool

load the decrypted wallet and dump the private keys:

./wallet-tool dump --wallet=/mnt/d/path/to/wallet/bitcoin_decrypted --dump-privkeys > /mnt/d/path/to/wallet/bitcoin_decrypted_dump.

Please note that this saves the unencrypted private keys in the file "bitcoin_decrypted_dump". Move this file to a save location (e.g. TrueCrypt/VeraCrypt container) or delete it after use.

Create a new wallet with the private keys in Electrum: File - New/Restore - filename - 'Standard wallet' - 'Use public or private keys', then list the 'priv WIF' keys from the dump file.

On handling the BTC/BCH question with Electrum and Electron Cash, please read the notes on the Electrum webpage.

If there are any questions, feel free to ask. Good luck!

Sources:

This page
https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md


Why is P2PKH used instead of the simpler P2PK? If elliptic curve cryptography is secure enough to be able to give away a public key without fear of anyone being able to calculate our private key from it, what's the reason for hashing our public key for use in P2PKH?

In other words, what's the benefit of a more complex system for locking and unlocking bitcoins, if a simple P2PK transaction is secure enough?

I'm not against extra security, but why is it not considered to be redundant?

The original reason why addresses were a public key hashes is something you'll need to ask Satoshi. My guess however is that it was just shorter and more convenient (note that compressed public keys weren't known at the time).

When compressed public keys were discovered it was simply easier to stick to the existing address scheme (it didn't require any changes at all; wallet and node software happened to already support compressed public keys). Introducing a new address scheme that was both more expensive for the sender (34 bytes of output script rather than 25) would have been nearly impossible to convince the ecosystem of - knowing that deployment of P2SH even took several years.

One often repeated argument in favor is quantum resistance. I believe this is besides the point. We have no idea what the characteristics of a hypothetical machine relying on yet to be invented technology will be. Given the degree of key reuse on the network (so there are addresses with known public keys), the existence of a system that can break ECDSA is likely a death blow to Bitcoin. A real solution to that is to prepare and have real quantum-resistant cryptography in place before it's too late. Relying on a weird hope that those hypothetical machines are somehow too slow to steal from unconfirmed transactions before they're mined is a red herring.


Why the transactions are put into blocks in the first place I understand how transactions are grouped into blocks. However, I don't understand why this is necessary in the first place. If it's a mining thing, I don't see why the miners can't just update the transactions with some metadata and leave it at that. Then the blockchain would simply be a cache on top of the transactions. I don't see the real need for a block to exist if there are the transactions, other than it being a sort of cache.

The purpose of the blockchain is to prevent the double-spending of coins by ensuring that there can be at most one valid transaction which spends some known coins. The only way to ensure this is that validators must be aware of all valid transactions.

While it is possible that someone may attempt to double-spend some coins, only one of the transactions may make it into the chain of valid blocks - which serve as an immutable record of which transactions were accepted as the correct ones. They are immutable because even the change of a single bit in a transaction would alter its transaction id, which in turn would alter the block's merkle root, and in turn, would require that all subsequent blocks have their block hash recomputed, because they all refer to a hash of the previous blocks header, which contains its merkle root.

The way all validators agree on which chain is the correct chain is by always taking the chain with the most proof-of-work done on it. This is necessary to keep the ledger immutable, because it means that an attacker attempting to modify a transaction, and thus, needing to recompute the merkle root and the hashes of subsequent blocks, would be constantly playing catch-up with the longest chain, and if they have less hashing power than the other honest miners who are working on extending the longest chain, they will not possibly be able to catch up and generate the chain with the most proof-of-work.


Trojans detected in ldb bitcoin database? I started regular scan and clamscan found lots of trojans in bitcon.lfb blocks.

What is it? A mistake?

sudo clamscan --infected --recursive --exclude-dir="^/sys" /

/root/.bitcoin/data/blocks/index/592744.ldb: Win.Trojan.Jerusalem-47 FOUND
/root/.bitcoin/data/blocks/index/589268.ldb: Win.Trojan.Nomenclatura-1 FOUND
/root/.bitcoin/data/blocks/index/644616.ldb: Win.Trojan.Redx-1 FOUND
/root/.bitcoin/data/blocks/index/638596.ldb: Win.Trojan.Phantom-5 FOUND
/root/.bitcoin/data/blocks/index/649206.ldb: Win.Trojan.Trojan-251 FOUND
/root/.bitcoin/data/blocks/index/335390.ldb: Win.Trojan.Zherkov-8 FOUND
/root/.bitcoin/data/blocks/index/589273.ldb: Win.Trojan.B-67 FOUND
/root/.bitcoin/data/blocks/index/647056.ldb: Win.Trojan.EDV-3 FOUND
/root/.bitcoin/data/blocks/index/333900.ldb: Win.Trojan.AIDS-1 FOUND
/root/.bitcoin/data/blocks/index/590327.ldb: Win.Trojan.Syslock-2 FOUND
/root/.bitcoin/data/blocks/index/641108.ldb: Win.Trojan.Jerusalem-15 FOUND
/root/.bitcoin/data/blocks/index/336793.ldb: Win.Trojan.CIA-1 FOUND
/root/.bitcoin/data/blocks/index/590264.ldb: Win.Trojan.Yankee-16 FOUND
/root/.bitcoin/data/blocks/index/647796.ldb: Win.Trojan.Vienna-43 FOUND
/root/.bitcoin/data/blocks/index/638638.ldb: Win.Trojan.Tori-1 FOUND
/root/.bitcoin/data/blocks/index/642244.ldb: Win.Trojan.Ping-2 FOUND
/root/.bitcoin/data/blocks/index/649309.ldb: Win.Trojan.Copyright-2 FOUND

No, it's vandalism. Some virus signatures were uploaded to the blockchain as a prank: https://www.reddit.com/r/Bitcoin/comments/25otbt/someone_put_a_virus_signature_in_the_bitcoin/

It seems those are some of that cases.


Metamask-like web3 inject for bitcoin Is there a browser extension that works similarly to Ethereum's Metamask? I am wondering that if there isn't one, is it because of some technical limitation, or that just no one has gotten around to developing one.

There is a Bitcoin wallet extension for Chrome. It's apparently used by 1500 people and has 3.5 stars average review. Still, I would not trust this extension without first auditing its source code. I cannot find its code on its author's Github profile.

CoinSpace is a web-based Bitcoin wallet. It's not exactly an extension but if you understand what Metamask does you'll see that it isn't really different.

Metamask loads up an Ethereum javascript library and offers a front-end to it using HTML. This is exactly what other similar wallets do, e.g. myetherwallet.

Brave Browser used to have a Metamask-like wallet for Bitcoin. I don't know what happened to the code when they moved to BAT tokens but it should be out there. It was basically a Bitcoin wallet in a Chrome extension, so the javascript for Bitcoin functions could probably be refactored out of the extension.


Does Bitcoin prefer broadcasting transactions crediting it? I'm currently doing some double-spend testing, and it appears that the standard client prefers broadcasting transactions that credit its wallet. That is to say, a client that receives such a transaction broadcasts it more, than it would broadcast other transactions in hopes of getting it into a block sooner. Is this truly the case, or are my observations incorrect?

According to the Satoshi client transaction exchange behavior, this does not seem to be the case. However, that page isn't written well.  Looking at the actual source code, I cannot see any special behavior for transactions to an address in your wallet, but I do see special behavior for transactions from such an address.

Thus, I do not think the behavior you observed is actually valid, and is more likely a pattern you noticed because human beings are too good at noticing patterns for our own good.


Is the current network difficulty algorithm appropriate for "Peak transaction-only mining"? At some point in the future miners will depend more on the Tx fee than per-block payout.

Right now people turn on and off their equipment based on local trends such as price of electricity, etc.  On the whole I don't think these local decisions affect mining as a whole.   However, if a Global trend is identified and people turn off and turn off the rigs accordingly then that will weaken the network at certain times.

Suppose the most profitable Tx fees occur in a certain time of day, and people will turn on their mining rigs, and they shut it down for less efficient hours.

  I think that if done to a significant scale, "peak Tx mining" can cause issues in security and network security.

Question

If the purpose of difficulty is to make mining new blocks more consistent over time, is it equally effective in making Tx-based payouts fair with short intervals?

More detail

Suppose significant portion of the mining ecosystem determines that the most valuable transactions are mined between 4pm and 5pm EST where the most profit can be made.  Conversely it's not profitable at all to mine at 2am-5am EST, so shut the machine down and save on electricity.

This may result in several things

Difficulty for peak hashrate differs greatly from difficulty for non-peak hashrate (within a 24 hour period)
Certain times of day where the network is more likely to be overtaken by hostile compute power
Unfair /disproportionate distribution of fees among miners
Many more blocks are created at peak times due to the increased available hashpower

What safety nets are there to protect against this?

For what it's worth, the BitMinter client already has the ability to schedule the usage of mining resources.  The intention is for minimizing local electricity cost, I don't think that would have a negative impact since this is a global mining network and electricity price changes occur every hour and should even itself out.  Conversely if it is used to mine according to trends in the whole Bitcoin network... I think that could lead to negative consequences.

Interesting thought.

Years from now we may get to a point where transaction fees are the majority of mining income and profits are so marginalized that electricity expense is a major factor. What makes sense for a miner may be to have a low-power computer with ASICs sitting idle and waiting until there are some transactions with big juicy fees, then actually start mining. Once someone mined a block with those transactions the fees are no longer up for grabs, so your equipment goes dormant again to conserve electricity.

So far not a big issue I think, because the busy and slow periods are hard to predict. The problem is if we have certain times of day when a large portion of bitcoin users are asleep, resulting in very little value available from transaction fees. Or if you could artificially create a slow period by somehow hindering the propagation of transactions.

If you know beforehand that 50% of the hashpower will switch off for a certain time period then you don't need the infamous 51% hashpower majority to pull off a double-spend - the equivalent would now be 26% of global hashpower.

So yes, if a large portion of the hashpower switches off systematically at the same time, I think that could become a weakness. But I don't see it happening until we get to a point where most, if not all, of the income from mining comes from transaction fees.


Account system is deprecated. Now, how can we set a "from account" when using the "sendmany" function? Currently I have been faced with a problem from the update of Bitcoin Core. As you may know, in the recent update, Bitcoin Core deprecated the concept of account belonging to each node. Hence, I cannot set the parameter of 'from account' or 'from address' for the coin flow tracking any longer, when I use the Bitcoin Core API methods (i.e. sendmany, sendfrom, sendtoaddress) to control Bitcoin cryptocurrency assets. The problem stems from here.
I have been implementing a service as a sort of Bitcoin escrow system, operating an individual Bitcoin Core node within it. Each user of my service takes each address, and the user addresses belong to each individual account, and the accounts belong to the Bitcoin Core node of my service. But, as the account got deprecated in the recent update, now I may not specify a certain user address under my service node and manage the asset therein. The problem is, for instance, when I call sendmany method to send BTC 1 out of my service node, the asset distributed in the user addresses of my service would be randomly reducedand the total reduction volume should be BTC 1. In other words, I cannot extract the BTC 1 certainly from the targeted user address whose owner should have used our service to pay for something worth BTC 1, and the burden of BTC outflow shall be shared for all. Furthermore, as the sendfrom method has been also deprecated, I cannot specify a user of my service to manage his or her BTC asset stored in the given wallet address.
The solution I'm considering now─and temporarily using─is, setting a database system to manage the inflow and outflow of the node and the user asset. i.e., I can specify and manage each user and his or her asset in the wallet address only via the database (e.g. mySQL), and when another participant out of my service finds our small service network, it would only be identified as a single node, controlling an asset package stored in one storage. I mean, my service node shall be a minimized Bitcoin bank for the service.
However, I want to ask your help, for me to find another way to identify each user and manage the asset in terms of each address. I don't want to let my little database be the only dominator to manage the user information, as the implementation of such database might result in a serious security problem. I want to identify each user, the address, and the existing asset therein only via Bitcoin Core protocol and the API defined in RPC.

Please give me some advice if you have any.

Sincerely,

The problem is, for instance, when I call sendmany method to send BTC 1 out of my service node, the asset distributed in the user addresses of my service would be randomly reducedand the total reduction volume should be BTC 1. In other words, I cannot extract the BTC 1 certainly from the targeted user address whose owner should have used our service to pay for something worth BTC 1, and the burden of BTC outflow shall be shared for all.

It never did this in the first place. The "from account" never did what you described; it did not select coins from addresses belonging to that account. Rather what it did was it would select coins from the entire wallet (so "from" all accounts) and the resulting transaction would say that it was reducing the "from account"'s balance. At no point in time did the "from account" parameter effect what coins were being selected.

If you truly want user address separation, you can use the multiwallet feature where each user has their own wallet file with its own keypool, private keys, transactions, etc.


Would a transition to a different signature scheme be feasible? The recent problem with Android's SecureRandom PRNG once again shows that using (EC)DSA can go horribly wrong if the signature nonce is ever reused.

There is an elliptic curve signature scheme that doesn't share this property: Ed25519.

Is there a mechanism in the Bitcoin protocol to allow transition to a new address/signature format? Would there have to be a new opcode, or does OP_CHECKSIG already support different key types?

What would happen to clients that don't support a new key format, but receive transactions from such a new address/key? Would SPV clients trust a transaction that they can't verify themselves, or reject the block containing it as invalid?

In any case, the new format can only be used once (nearly) all clients support it, but could this be implemented at some point, and enabled some time later?

Well, for starters I must say that the problem with ECDSA nonce can be avoided even when using ECDSA via the same method used in Ed25519, and indeed this method is not even novel to Ed25519. But, let's assume we need to change the signature algorithm for some reason.

OP_CHECKSIG does not support different key types per se. The public key given as input is either an uncompressed or compressed EC point, starting with 0x04, 0x03 or 0x02. Any other starting byte could be used for different transaction types, if desired. However, a separate opcode would (IMHO) be cleaner.

The only required changes are on the script side, either modifications to OP_CHECKSIG opcode or the introduction of a new opcode. And after this, miners need to start accepting transactions containing the new style signatures as "standard" scripts.

All "full" bitcoin clients verify all transactions that are present in a block (run all scripts). This means that they will refuse to accept a block that can not be verified (even if it only has one transaction failing verification). This means that if such a change is incorporated, the block chain will fork for the clients that do not support such transactions.

Nearly all clients will need to support the new signatures and the clients that do not will become unusable when encountering the first block that has a transaction with a new signature.


Has Bitcoin Cores encryption wallet security ever been bypassable? Every few years there seems to be an exploit found in Trezor that allows people to bypass the security. I was wondering has there every been the same case for Bitcoin Core wallet encryption?

Bitcoin core weaknesses?

Bitcoin core wallet encryption uses AES-256-CBC. So far as I know this is still regarded as a good encryption system although people have identified potential issues with cipher-block-chaining (CBC)

Other likely weaknesses might include

Poor implementation in Bitcoin core.
Poor choice of passwords/passphrases by the end-user.
Poor protection against snooping of in-memory keys etc by Bitcoin core or the OS.
etc

I don't recall any major issue being reported so far. There are currently 0 security advisories. A quick scan of previous common vulnerabilities for wallet related vulnerabilities doesn't find anything.

A careful study of the release-notes or even change-logs for Bitcoin core might reveal the fixing of an exploitable weakness. A careful web-search might throw something up. I haven't found anything but have not spent any time on this.

Trezor weaknesses

Published weaknesses include

weak proof of genuineness with respect to cloning etc.
side-channel attack by measuring power consumption during PIN entry.
extracting private key or seed from flash memory ICs

These require physical access to the device.

These don't really translate well into possible attacks against bitcoin core.

If you run bitcoin core on a PC say, and an attacker gets physical access to your PC, your security is probably gone.

If I had bitcoin core on a PC and suspected someone malicious had had physical access to it, I'd burn the PC and everything it touched, buy a new PC and recreate the wallet from offline backups, then transfer all remaining funds to yet another new/fresh/clean wallet or wallets.


How does the Bitcoin client encrypt the wallet.dat file? What is the algorithm used for encrypting the wallet.dat file?

A detailed explanation can be found in the application's README: https://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README

In short:

The passphrase is converted to a key/iv pair using EVP, with a dynamic number of rounds
This key/iv pair is used to encrypt a randomly-generated master key, using AES-256-CBC
The secret part of wallet keys are then encrypted using that master key, again with AES-256-CBC