text:
oclvanitygen not showing private key?
I am trying to generate my own address using my GPU with oclvanitygen, but it seems like that it only displays the:

CPU hash
GPU hash, and
Found delta

but not a private key?
Any idea why? Vanitygen using CPU is displaying private key but not oclvanitygen.
I am using Windows 7 Ultimate 64 bit and Sapphire 7970

Can you add a copypaste of your screen?

Is the error maybe because the CPU processing power is not capable of handling the speeds of the GPU. In other words, maybe a new CPU is necessary??

I saw that newer drivers are broken, but some report good behaviour with 11.11.
https://github.com/samr7/vanitygen/issues/19

This may or may not have anything to do with your problem but it's worth looking into.
Is your GPU a CUDA core based Nvidia card or an ATI GP-GPU based card, not a standard GPU from ATI (but fully programmable).
You should download the OpenCL test suite to test your video card to see if it supports OpenCL 1 and 2, if it doesn't that would explain why you can't generate keys on it.
Another thing, if you are using Linux or BSD, the open source drivers may not have the correct OpenCL commands and functions that the application you're using is looking for. Also, you need to download extra libraries and support files for accurate clocking, etc. It's a big 'ole mess.
What is better to do is if you're using Linux, is to get on an Long Term Support release, such as Ubuntu 12.04 LTS (latest release of it) and if using an ATI card or embedded chip set that does support OpenCL 1 & 2 in hardware to download the latest driver for said chip set.
Note: Pay close attention to the AMD website and don't try to install a driver that isn't not supported otherwise you're going to need to restart in single user mode to fix the damage manually, which is more than likely you're going to need to reinstall X-org from the command line. If you're not used to this by now, it's a pain in the rear end. (And this is coming from a Linux programmer).
Maybe, this will have something to do with your problem or maybe not, at least it gives you a little hint to look else where other than just the applications you're currently trying to run.

Updated my question.

Here's the real answer:
It printed this:
Difficulty: 20349
Match idx: 0
CPU hash: 3d0f90a4eaabc213418484821hd21a5b4d99dc8d
GPU hash: 3d0f90a4eaf37de5294b656204921a5b4d99dc8d
Found delta: 30193 Start delta: 1
[33.21 Mkey/s][total 4096][Prob 45.7%][87.5% in 13.8s]

oclVanitygen generates addresses by using OpenCL. OpenCL can run on GPUs, in contrast to C. After OpenCL thinks an address it created has the expected prefix, it passes the private key (actually the delta value of it), the calculated P2PKH hash and the idx value to the C part of the software. When the GPU calculated hash doesn't match the CPU calculated hash, it dumps the info for debugging.
Short Answer: It would, of course, have printed the private key if it had found an address with the expected prefix.


text:
spending some of the coins nullifies address' balance. where does the remainder goes?
I use litecoin-qt, but my guess it'll be the same for Bitcoin or any other crypto coin.
I created a new wallet, added an address and received the coins I expected. Then I created another wallet on different PC added another (non default) address, and sent some of the coins from first address mentioned to the second. I used 'sendfrom' command.
Now both wallets show exactly what I would expect, however on any online block explorer I see something strange. When I enter the first address, I see the transaction with the initial amount, but then another row that withdraw that amount. Clicking on the transaction I see that the second address is credited with the amount I sent, and the rest goes to an unfamiliar address.
What does it mean or what am I missing?
Where's this 3rd address coming from?
I thought I know how things are working with cryptocoins, but now I'm completely lost.

Can you give this question a more descriptive title, please?

As you may know, transactions have inputs and outputs. The outputs give the addresses to which coins are being sent, and the inputs link back to outputs of the prior transactions that gave the coins to this transaction's sender, thus forming a chain. Anyone on the network can step along this chain to verify that all the coins in circulation legitimately got to their present owners.
To make it easier to verify the chain, the Bitcoin protocol has a rule that each input must spend all the coins that were in the output that it links to. (I am presuming that Litecoin is the same.) So if the smallest (or only) transaction to your address had
an output of 150 LTC, then you have to spend 150 LTC. But since you only really want to spend 45 LTC, your wallet gives the transaction a second output that sends the remaining 105 LTC back to you, as "change".
Rather than sending the change back to the same address that is spending the coins, some wallets choose to generate a new address and send the change there. I am not exactly sure why; perhaps it's to help obscure what addresses belong to whom, for privacy. But in any case, you should find that your wallet holds the private key to this new address. The 105  coins are still yours, they're just at a different address.

Thanks. Indeed, running validateaddress confirms that the 'unfamiliar' addresses belongs to me, meaning I hold theirs private key. I didn't know a private key can generate/verify more than one address.

@elyash: It doesn't. Each address has its own private key, and your wallet holds all of them.

10x. Point to myself - storing the private key of the initial address is useless, once you spend some of the coins. Only wallet.dat backup will be suffice

@elyash: True. Some wallets pre-generate a bunch of keys/addresses so they can be  backed up with wallet.dat even  before they are used.

source: Stack Exchange

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

sort: votes


text:
Acting as a passive node rather than an active one using bitcoind
I currently have a bitcoind version:80500 running on a VPS. I am interested in using it to only verify transactions for me much the same way blockchain.info  does.
Is it possible to run bitcoind to do this? I guess the best analogy to this would be acting as a leecher. Or does it always act as an active node passing transactions etc?

This might not be quite what you want. but what about checking out electrum?

There's no way of configuring a node not to relay transactions, as it would be detrimental to the network. You would need to heavily modify bitcoind to manage this, and there's not a huge reason for you to ever want to. What do you think you will achieve by not relaying anthing? It's not what you or the network wants.

The reason being, to save on bandwidth and cpu cycles

How much CPU and bandwidth is it using right now, then?

Relaying transactions takes no effort at all really, and if you're not listening then nobody will sync from you and take up large amounts of bandwidth. The CPU impact of bitcoind once synchronised is negligible.

Im guessing that the relaying of transactions is done from incoming to outgoing transactions is that correct? Just as a thought exercise: is it possible to simply observe the blockchain without participating in its transactions?

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


text:
CGminer multiple instances
I think I need to run multiple instances but they seem to effect each other.

Device 0: 7970
Device 1: 7970
Device 2: 7950

I can get both 7970's into one instance with:
cgminer.exe --scrypt -I 13 --thread-concurrency 8192 -w 256 -d 0,1

but when I open another version of cgminer, in another folder, with another name, and a different batch file, like this:
cgminer2.exe --scrypt -I 20 --thread-concurrency 22400 -g 1 -w256

what happens is the core clocks of my first instance all change to match those of my second instance, despite not having set clocks in either batch file. (so my 7970 goes from 1050/1500 to 1125/1375) and worst of all obviously is I go from 720khs to 530 khs on my 7970's.
I can however go into the cgminer on the 7970's and tell it to change the clocks back to what I want, and it does, and all 3 cards run perfectly in two instances.
Is there any way to make it so the two instances don't see eachother? (--remove-disabled doesn't work)

EDIT:
It's been a while since I was mining, but IIRC it was just a matter of copying the cgminer folder and running the second copy. The problem I ran into above was because I didn't notice that the first miner created a mining.config file, which when I copied the folder, was running without my knowledge and applying its settings, even though I was changing them outside the mining.config file (I was using batch files for my configs.)
So it was really just a matter of targeting them with the -d parameter.

ahh i fixed it, there was a miner.config file in there that was kicking off on it's own. Now I successfully have two instances of cgminer and two instances of cgwatcher working fine :D

Could you edit your question and list how you solved this issue? Im looking to do the same

authors: Микаил Алиев


text:
What's the status of alternative full node implementations?
In "Does running an alternative full node implementation benefit the Bitcoin network?", I asked about running an alternative full node implementation for the benefit of the Bitcoin network.
What is the current status of different alternative full node implementations with regard to

maturity (alpha/beta/stable)
performance
compatibility tests
code review
suitability for different purposes:

experimentation
merchants
as a wallet
as a lightweight wallet back-end
solely for the benefit of the network?

Update: Moved the list of implementations into an answer.

This question requires a good answer to be too long for this format. However, I think the Client overview page of the bitcoin.it-wiki might be at least partially what you are looking for.

@Murch You must consider that StackExchange answers usually appear first and foremost while searching, and that an answer here might attract more interest than a blog post could. The SE format is rich enough, I guess the limitations are engagement and expertise - i.e., nobody cares, or who cares doesn't know.

@BrunoKim Correct. Unfortunately, engagement on the Bitcoin.SE is somewhat at a low, so I would expect information that has to be constantly updated to fall behind quickly, i.e. in this case I think it is better to link to the bitcoin wiki (not a blog post) instead of duplicating their effort.

@Murch I couldn't find any wiki page on bitcoin.it about full node implementations, and the tables there don't seem to have a column for that either. In your opinion, should I create a list of full node implementations on the wiki instead of maintaining this list here?

Well, if someone starts doing it here, that would be marvelous of course, I was just thinking that there might be more people using bitcoin.it actively than bitcoin.SE.
However, I am not sure, are you currently collecting information in the Question? It might be better if you created an answer instead for the answer part. :) If you need help, I am up for it, I usually hang out in the Bitcoin chat when I am online.

The answer to this question will change radically over time, (and may actually be opinion-driven,) so I don't think this is a good place for this question.

In any case, the answer part of the question would make a good start for an answer.

It's not an answer, but I requested to be able to do my Masters Thesis about Bitcoin and if my proposal is accepted, I will be building a full node implementation in Dart. I've been building a Dart Bitcoin library for the last few months.

Update: Coin Dance has an excellent table of node implementations with descriptions and links at the bottom of their Bitcoin Nodes Summary page.

Below are the implementations I've found. I'm not sure if all of them qualify as full nodes.

btcd
(in Go, by Conformal Systems LLC)
Bits of Proof
(in Java, by bits of proof zrt.)
bitcoinj has a
fully verifying mode
(in Java, by Mike Hearn)
picocoin
(in C, by Jeff Garzik)
libbitcoin has an
example full node implementation,
also advertises to be a
completely independent and full Bitcoin stack
albeit only pre-alpha proof-of-concept with no GUI
(in C++, by Amir Taaki)
caesure
(in Python, by Sam Rushing)
Electrum-server,
uses bitcoind as a back-end
(in Python, by thomasv@bitcointalk)
Ufasoft Coin
(in C++, only for Windows, by Ufasoft)
Bitcore (in JavaScript. Note that it needs parts of Bitcoin Core to function)

(Sources: Core Development Update #4 by Gavin Andresen, Jun 21 2013 on the Bitcoin Foundation blog; bitcointalk.org forums)
Updated bitcoinj and libbitcoin status (based on information from
this bitcointalk thread);
Electrum backend
Added Bitcore

I'd like to stress that miners must use bitcoind. If certain miners use different implementations it might cause forks in the blockchain. It's a complicated issue talked more in detail here http://bitcoin.stackexchange.com/questions/25254/why-dont-developers-switch-from-bitcoin-qt-to-a-cleaner-implementation

We also use our own implementation, in Go as well but distinct from btcd: http://www.blockcypher.com

@Matthieu Thanks for the information! Looks like it's only used internally by you and it isn't possible for others to run full nodes using your software?

@akaihola For now, but you can access it through the API and we will open source it when we're ready.

Should NBitcoin be listed here too?

I think Hive uses Electrum-server as its backend? Is the API documented?

authors: วัฒนา นาพรหม


text:
Why does the standard Bitcoin client not display the balance per address?
Any Bitcoin wallet holds several bitcoin addresses. Such addresses are either generated manually from the GUI addressbook or automatically collecting the "change" of a "Send" transaction. The total balance is the sum of the credit of all addresses.
Why does the Bitcoin software not tell me ADDRESS1 holds 1 BTC while ADDRESS2 has 5BTC?
The standard Bitcoin client automatically selects an address to send from. (From the comments, I learned that there exits a patch, which allows a user to choose an address to sent from.)
Does the behaviour of the standard client described here have any advantages over letting the user choose?

See this question for some info on choosing what address to send from. My suggestion is that you edit that part of your question out so that this one is just about "Why does the client not display the balance per address?"

The balance of an address is almost always useless, since money is sent from random addresses.

Having different addresses in the client is intended for increasing anonymity and for you to be able to identify different senders. It is not intended to be used as different "accounts". The concept of accounts actually does exist in bitcoind but it is not currently used in the client. It wouldn't be too hard to add, so it is possible that it will be added in the future if there is demand for it.
Normally a user is not interested in the details of specifying what address to send funds from. The client does a good job of choosing what input addresses to use and will for example use older ones first in order to reduce fees.

Thank you for your answer. I understand that addresses are not meant to be used as accounts and the standard client GUI reflects this. However, any transaction on the bitcoin network is associated with at least one Sent and at least one Received address. Anyone can lookup the Sent address in the blockchain. It feels wrong if the person who initiates the transaction does not see this information.

@Jan: Well, there is no reason to present information that is of no interest to the user. A regular user is just interested in the fact that the funds were sent from the user's wallet to some receiver (as of now, identified by an address).

I don't think it's true that the Satashi client will "use older ones first in order to reduce fees".  The last time I looked at the code it looked to me like it was trying to use the smallest set of addresses that provided enough to cover the transaction without considering age.

I think originally addresses were meant to be an internal Bitcoin mechanism (ie. a technicality) and not something users should care about (or even ever be able to see). Se [this answer] for more on this, and the answer's question for one of the arguments for this.
Perhaps what you actually want, instead of seeing multiple addresses with their particular balances, is to uses multiple wallets -- clients that support multiple wallets (eg. MultiBit and Armory but not the original client) will of course show the balance for each wallet separately.

I think usually people don't do separate "banking" with different addresses, rather than they prefer seeing the total. This is especially true when you regularly switch addresses for receiving money. As there is little need for such a feature, it wasn't implemented.

In the current version of Bitcoin Core v0.15.1 simply load up bitcoin-qt, go to settings>options>wallet and check Enable coin control features and click OK.
Then, go to the Send tab and click on Inputs. There you can see each receiving address that a balance has originate from, and if you expand or select list mode, each individual amount and address including for change currently held.


text:
(Why) is it difficult to merge and split wallet.dat?
It is a common question, how to sync a wallet across different devices.
As far as I understand, a wallet is just a collection of private keys. Each private key can be uniquely identified using the bitcoin address associated with the key. Thus, why don't we think of wallet.dat as if it was a directory:
Filename     File Content
=Address     =Private Key

1HB5XMLmzFV  8ALj6mfBsbifRo
...          ...

Now, syncing such a directory is trivial. If the filename (address) matches, the file is identical and does not need to be synced. If a filename is only present on one side, just copy the file, it's a new address.
Is something like this going to be implemented in a future client version? Or is my idea faulty?

The ability to import and export keys is in the works, with several forks in the Github project trying out various methods. One of them will eventually be selected and make its way into the official client. Until then we're reliant on tools like pywallet to import and export keys.
As for the directory concept, the wallet.dat file stores this information in a BerkeleyDB format, as well as a transactions list. I can see the potential benefits, though there are likely downsides that I've not considered and I'm certainly not qualified to speak to the mindset of the developers. Perhaps you'll get lucky though, at least one big name from the Bitcoin devs has been known to frequent these parts.

The problem is that the client software assumes it owns all of the accounts and doesn't care which accounts hold the actual funds. So, if you have 35 bitcoins, they may spread in 3 accounts that you know about and 4 internal "change" accounts. Or you may think of 10 bitcoins as being in one program account and 15 in another program account while all 35 bitcoins are actually in one bitcoin account.
In addition, if the same account were running on two different machines, they may submit conflicting transactions. This would be considered malicious by the recipients.

If you have the same wallet.dat open on 2 different machines connected to the network, does it cause any problems, or it is only when a double spend is attempted?

So long as you don't spend anything at all, it won't cause any problems because neither one will know the other one is running and nothing will be changed. But as soon as you do any spend at all, things can become inconsistent across the two wallets, each thinking they have funds they do not actually have. (Some of this is fundamental, some of it is just bugs -- or more politely, 'missing features' -- in the client.

Double spending is a good point. It's clear that spending from different copies of the wallet within a timeframe of 10 minutes is problematic. It becomes even more problematic if we take into account that the user won't know which bitcoin from which address (s)he is spending.

The huge missing feature of pywallet is that you can't import many keys at once (which is strange since it can export many keys at once).

Are you sure this is an answer and not a comment on an answer?


text:
Who implemented BitcoinPayment at the Bitcoin wiki?
Who was the technical person who implement/integrated BitcoinPayment at the Bitcoin wiki? How can he be contacted?

I think BitcoinPayment should be enhanced to stop new user from registering, not just editing. The Recent Changes page is totally spammed by new users - https://en.bitcoin.it/wiki/Special:RecentChanges

FYI, here is how to view the recent changes without user pages, which filters out this spam: https://en.bitcoin.it/w/index.php?namespace=2&invert=1&title=Special%3ARecentChanges

As Nanotube said, MagicalTux made this plugin himself.

The history of the page suggests that Nanotube, MagicalTux and Rdymac were the last that edited the page.
The first two of them have contact instructions on their Wiki profile, only the latter does not.

Hello! I added instructions for Spanish users because if people pay the fee under 'en.' subdomain they won't be able to edit the 'es.' subdomain site. edit: I added my profile to the wiki https://en.bitcoin.it/wiki/User:Rdymac


text:
Is there a website that shows historic price data?
I need to find what the Bitcoin-Mt. Gox USD price was at certain historic dates and times (exact timestamp).
Is there a website where I can input a specific historic date+time, and get the rate for that time?
I believe that Bitcoin Chart's API might do the trick ... but I'm asking about a website with a UX, not an API.

Do you need granularity finer than once a day?
The daily data is available here: https://docs.google.com/spreadsheet/ccc?key=0AmcTCtjBoRWUdHJuUE1mUkFxa3A0eHBDQkxZLVVFZmc
Because Google docs spreadsheet data can be queried as an API, a javascript front end that queries a specific day could be easily created.

@StephenGornick - I do. I need a specific timestamp in a specific day (GMT).

@StephenGornick Why is that spreadsheet discontinued?

I think this should help:
http://bitcoincharts.com/charts/
Here you can view all the historical data:
http://bitcoincharts.com/charts/mtgoxUSD#tgSzm1g10zm2g25zv
And if you need any specific date you can hit "Custom time". :)
Hope this helps.

The daily candles are visualized nicely here: https://satoshi.camp/stats/mtgoxhistory/usd


text:
What's the status of BitInstant's debit card?
http://www.engadget.com/2012/08/20/bitinstant-founder-says-bitcoin-debit-card-to-launch-within-next/
It's been almost four months. Where can I find the latest public information about this?

This is still very much a project which is being worked on.  BitInstant hopes to bring you more info as everything progresses.  Thanks for your patience.


text:
Which Venture Capital firms are especially interested in Bitcoin?

Which have invested into Bitcoin or Bitcoin companies?
Which have shown "more interest than average" (e.g. Pamir from Hummingbird Ventures organized the Bitcoin London Conference)?

See also https://bitcointalk.org/index.php?topic=267727.0

There hasn't been a definitive survey of the venture Capital industry but Boost VC has made several bitcoin investments. Its founders Adam Draper and Brayton Williams are responsible for organizing the Boost Bitcoin Fund which several venture capital firms are participating in. There are also currently 7 bitcoin companies in their 2013 class of startups.

From AKCoins's answer:
Coinbase has raised $6 million from all the big VCs:

Start Fund
Y Combinator
Ribbit Capital
Union Square Ventures
Garry Tan
SV Angel
Greg Kidd
FundersClub
Adam Draper
IDG Ventures


text:
Are all strategies to mine PPCoin Proof of Stake blocks equivalent?
Alice, Bob and Charlie each own 100 PPCoin, and would like to generate more using Proof of Stake.

Alice keeps her ppcoind running all the time
Bob stores them offline for a year, and then runs ppcoind for a week
Charlie uses some other arbitrary "strategy", where I define a strategy by a sequence of ON/OFF schedules, that can possibly depend on whether he finds coins in previous schedules. (Technically it's a decision tree).

Would all the above, on average, achieve equal expected amount of PPCoins in their wallets? Is there a dominant strategy? What about a combination of maximum expected value and security (running your client 24/7 might yield the max amount of PPCoins, but it's also the most volunerable one (wallet must be decrypted for coin generation)).

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

alice finds the most blocks. 520 confirmations + 30 days of no-stake makes a maximum of 12 blocks per year from the same coins. compound interest makes no impact at all with 12 compounds and 1% ROI .she makes max 1.00437%
bob makes a perfect 1.00% but loses a lot of stake and risks not finding a bloc in that week.
charlie makes 1.00-1.00437% depending how often he finds blocks.
actually, they can find much more blocks, as parts of wallet have different age, but its just as running many wallets, there is no difference in maths.

Wait - I'm looking at the overall effectiveness of Bob's strategy. When t --> infinity, saying something like "bob loses a lot of stake" is meaningless, I want to get the annual percentage Bob makes on his money.

bob makes a perfect 1.00% but loses a lot of stake and risks not finding a block in that one week - than he starts loosing, but not much. if he finds first block after 3 years he makes 3 PPC, and have 103 coins after 3 years. if he finds a block every year he would have 103.03 coins.

I'm still missing a complete analysis that isn't dependant on the odds of him finding a coin. I'd like to realize the expected value of the different strategy - that is, a single number that summarizes his average projected earnings (the same for Alice and Charlie). Perhaps you wrote that and I misparsed your post.


text:
Are there any attacks with a plurality of computing power?
There has been some discussion about possible attacks if one has the majority (over 50%) of the computing power of the bitcoin network. What happens if an attacker (or coordinated group of attackers) has more computing power than any other user (or coordinated group of users), but not necessarily the majority of all computing power?
Toy example
As a toy example, consider we have 3 users: Alice, Bob, and Steve.
Alice and Bob are both honest users that are fine using the protocol as specified. However, they will not go above-and-beyond the protocol to help each other (in fact, they would be happy to make money off the disadvantage of the other, as long as they are still complying with the protocol).
Steve is an attacker and is willing to perform actions outside of the protocol in order to either gain profit or just destroy the network. If Steve has 41% of the computing power, Bob has 34%, and Alice has 25% then are there attacks Steve could launch?
The toy example is included to just make it clear what I mean by plurality vs. majority, and what I mean by honest but uncoordinated users. I am obviously more interested in an answer to the general question than this specific toy model.

The Finney attack (explained in the first paragraph of this question) is one such attack.

Technically the Finney attack doesn't require a plurality of computing power, it just requires some computing power. The more substantial that amount the better the chance of success, but a plurality is not a requirement. Artem, are you asking for attacks which require a plurality or attacks which can be executed with a plurality or less?

I assumed by "plurality" he just meant "a significant amount, but less than half". In which case, attacks that are more likely to succeed the more computing power you have, such as the Finney attack, are exactly what he's asking about.

I am really interested in attacks that require or significantly benefit from having more computing power than any other cooperative of users. If the attack just requires some computing power, unless it qualitatively gets better when reaching plurality, it won't really answer the question. Let me know if I should make this more clear in the question.

In a certain sense, all 51% attacks are really plurality attacks, but you have to consider all honest users as forming a single "coordinated group".  (Which is true when you think about it: they are all following the intended protocol as implemented by standard software.)
Suppose for example that 30% of hash power is controlled by honest miners, 32% by Cartel X, and 38% by Cartel Y.  The honest miners are mining on the main chain.  Cartel X wants to reverse a transaction that appeared in some previous block A, so they are mining on a side chain that diverges from the main chain at block A-1.  Cartel Y wants to reverse a different transaction that appeared in a previous block B, so are likewise mining on their own side chain from B-1.
Given enough time, Cartel Y's chain will eventually be longer than either the "honest" chain or the chain produced by Cartel X, so it will become the official record.  Cartel Y will be successful in reversing their transaction, and Cartel X will not.
The 51% figure is based on the assumption that all miners who are not part of the attacking cartel are honest.  But if some of them are part of a competing cartel, then a plurality indeed suffices, assuming you count all honest miners as a cartel of their own.
In principle something similar could happen in the event of a blockchain fork, where honest miners could split into two or more non-cooperating groups mining on distinct chains.  In that case an attacker controlling more hash power than either group could mount a 51% attack also.

There are no such attacks known and there are some reasons none are likely to be exist. There is nothing special cooperating users could do, so far as we know. And the only 'tipping point' where something becomes possible, is 51% of total mining power. Other than that, there is no advantage to having more computing power than someone else.

"Other than that, there is no advantage to having more computing power than someone else.". Well, you could not do anything nefarious, but you'd be getting a bigger share of the mining proceeds.

I'm not sure why you would care whether your share was bigger than someone else's or not. What difference does it make, for example, if you get X, whether an attacker gets Y (Y > X), or two other people (one an attacker, one not) get Y/2 (Y/2 < X)? (The question was specifically whether there was an advantage to having more computing power than a malicious attacker.)

Yes, and my comment was specifically not about the malicious attacker. Just some extra context to soften the statement that there was "no advantage [in any way] to having more computing power".

There are at least two double spend attacks if merchants accept zero-confirm transactions. (Bear in mind that a single confirmation takes an average of 10 minutes, and longer than an hour with probability 1:400).

With the Finney attack you precompute a block with a transaction to yourself. When you have a solution, you go to a merchant and buy something, giving him a transaction from the same address (and same output). When you step out of the shop with your goods, you release the presolved block (containing a transaction to yourself) into the wild, invalidating the genuine transaction.
With the discount scheme you override the transaction only with a certain probability (proportional to the size of your rig), but there are no timing issues. A potential real-world example is described here. See also here for a discussion.

I don't think this is an answer to the question

authors: ปรเมศวร์ พลรักษ์


text:
How safe is it to use a Linux live CD to access my savings wallet?
It's clearly safe to create a savings wallet offline with a live CD, as no data can be sent to an attacker even if the live CD image is compromised (which seems unlikely).
However, when it comes to sending a transaction from a savings wallet, the client must be connected to the internet, so the risk increases. If you create a live linux CD, with an OS such as Ubuntu, it is out of date within a fairly short time of it being created as the live CD does not receive the latest patches that a permanent installation normally receives.
Presumably this means there's a chance (however small) that when you use the live CD and connect to the internet a security hole will exist that can be exploited to steal your wallet and wallet passphrase next time you enter it. How big is this risk? (Am I just being totally paranoid?!)
The severity of the risk is obviously a difficult thing to determine in the context of all possible live CDs, so perhaps a better question is this, if the first one is too difficult: have there previously been any security holes in live CD releases that allow an attacker to remotely control the computer?

I think this question belongs to other SEs, like StackOverflow, SuperUser, Ask Ubuntu, or IT Security, as it is not a Bitcoin-specific problem.

In my opinion, there is sufficient concern about private key safety within the Bitcoin community that it justifies a Bitcoin-specific answer here.

Security is always an issue and complex systems like operating systems are prone to attacks. However, it is possible to use an offline machine to create the signed transactions and then export them to another machine.
For example a soft copy of those signed transactions could be copied on to a fresh USB stick, or printed out on paper as plain text or QR codes and so on. These transactions could then be imported into an online Bitcoin client that does not have the private keys, but can just transmit the transactions to the network.
Your private keys are always held offline and thus only exposed to physical attack vectors which should be sufficient to relieve your concerns.

Is there any guides or tools on how to create the signed transaction then import it into another client?

Take a look at the forums here: https://bitcointalk.org/index.php?topic=28278.0

I would not recommend connecting a printer to the air-gapped computer (especially USB printer). If you want to transfer data to/from the air-gapped computer you can use RFC1751 encoding/decoding. If you want to print data - use a pencil. I was thinking about this and this is why I added RFC1751 encoding/decoding tool in my live CD: https://github.com/vstoykovbg/cryptopup/
Maybe haveged is a good solution for the PRNG problem, but I recommend mixing the noise from the microphone or noise generator just in case: https://github.com/vstoykovbg/doublerandom

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


text:
Has anyone patched the code to experiment with the currency supply model?
Since the supply model of a currency is a key factor in it's economic properties, I think it would be interesting to experiment with supply models that could be changed easily.
It could perhaps then be linked to some other external factor which could be objectively ascertained with the resilience of the p2p structure like for example, available fresh water, carbon or population.
Have there been any efforts in this direction?

Computational work for hash operations is verifiable.  How do you verify population?

There have been various experiments in this regard. The Alternate Cryptocurrnecies sub-forum is full of them. If I recall, Tenebrix and/or GeistGeld removed the halving block sizes, resulting in a coin without a cap on the number of coins.
Also, there is EnCoin, and alt whose price is supposed to be based on the cost of electricity.

You should look into Digital Coin concept. It allows anyone to issue their own currency and control it, thus allowing for any supply and demand model. Bitcoin fits into the concept nicely as a "standard of value".
There are a number of private currencies that are linked to prices of various items, such as Ven. There is not much stopping anyone from creating new ones.
All in all, trying to control Bitcoin's supply other than buying and selling it would be quite hard. People wouldn't welcome for example trying to go against the reward drop.


text:
How will Ripples be distributed?
What is the distribution plan to get Ripples (XRPs) distributed to the general public? How will hoarding / spoofing be tackled?
(E.g. with a faucet based on Google account auth, one could open several google accounts and get "too many" XRPs).

Why the downvote and vote to close? Ripple is on topic. http://meta.bitcoin.stackexchange.com/questions/335/should-this-se-also-cover-questions-about-ripple

No idea, sounds like a legitimate question.

Looks like someone went on a spree, I can see 11 questions tagged for potential closing - http://bitcoin.stackexchange.com/review

The "ideal" distribution strategy for OpenCoin, is to give away the 50 billion XRP in such a way that spurs adoption but does not create a surplus which will depress prices. Adoption is spurred by handing out generous helpings of XRP to a small audience. This is what they are doing by handing out 50,000 XRP to every Bitcointalk.org user that has a sufficiently aged forum account. Every week they have been reducing the amount given out.
Very soon they will give out just enough XRP to fund the reserve requirement for an account, plus a couple of trust lines and a couple of order book offers (About 400 XRP at the current requirements).
They want to make sure that each individual can only receive a free serving of XRPs once, or else they will have a surplus of XRP that can be sold, depressing the price. I would expect they would leverage existing identification services such as OpenID, Facebook, Google+ type of systems by creating apps.
They could also leverage the gateways, which already collect personal information on every user as part of "Know Your Customer" and "U.S. PATRIOT Act." By hashing this information according to some standard method, it would be possible to filter duplicates across gateways.

The first sentence makes no sense. Giving away 50 billion so as not to create surplus... If there's no surplus at 50 billion, there won't be at 99.8 billion. Keeping 50% is insane. They might as well give away 20 million so as not to create surplus...


text:
How do I exchange the issuer of my BTC in Ripple?
I see Ripple now has 2 Gateways, WeExchange and Bitstamp.
I sent 1 BTC to WeExchange, and got in return 1 "WeExchange BTC in Ripple".
How do I exchange it directly for 1 "Bitstsamp BTC in Ripple"?
The Trade page in the client doesn't seem to allow me to select BTC as both ends of a trade. I don't want to go through another intermediate currency, I think I'll lose a lot because of the margins - I expect that trading BTC issued by different exchanges should be relatively without spread.

FYI, I filed this as a bug report: https://github.com/rippleFoundation/ripple-client/issues/352

It will happen automatically when you pay someone who only accepts Bitcoins from the other gateway. There are several different ways you could form transactions to do this, but I think the client doesn't currently give you an easy way to get to any of them.
In the Ripple system internals, people can create offers whose sides are the same currency but different issuers. However, you can also achieve the same effect without having to go through an offer (and likely at a lower cost) by using a circular payment path with no exchanges.
Again, you can't do this with the client currently, but here's how it works on the server side:

You have 1 WeExchange BTC. You want 1 Bitstamp BTC.
You form a payment path like this:
You/BTC -> WeEx/BTC -> ??? -> Bitstamp/BTC -> You/BTC
You hand this payment path to the server, telling it you want to get 1 Bitcoin out.
The server finds the cheapest way to do it. Most likely, it will find one or more people who have extended trust to WeEx/BTC and hold Bitstamp/BTC. You can use any of those people. (For safety, you can pick three to make sure your transaction goes through.)
With the three payment paths the server found you, you form a "Payment" transaction. Assuming all three of those people don't change their trust or balance settings before your transaction applies, the exchange is complete. Someone in the middle has your WeEx/BTC and you have their Bitstamp/BTC.

Note that if there's an exchange offer that gives you better than 1-to-1, the pathfinding scheme will use that instead. So you could wind up with more bitcoins out than in. (Though it's not likely.)
This actually will not allow you to get 1 Bitcoin out because you would have to pay two transfer fees to transfer the Bitstamp and WeEx IOUs. The total of the transfer fees is something like .7%, so you'd only get .993 Bitcoins out.
Instead, if you're not in a hurry, you could drop your credit limit to WeExchange to zero. This signals that you want to get rid of your WeExchange IOUs. Anyone picking a payment path like above in the other direction will try to accommodate you. Then they'd pay the transfer fees. (The current pathfinding algorithm doesn't always do this, but the new one scheduled to replace it shortly will be better at this.)

Thanks. Can you extend your (already complicated) answer here http://bitcoin.stackexchange.com/questions/7590/does-ripple-ever-charge-proportional-transaction-fees to explain why would you pay a proportional fee here? How does it work? Perhaps your answer already explains it, but it's rather complicated and might need a TL;DR

Just noting to people - I'll of course have to give some credit limit to BitStamp for David's suggestion to work, or for me to get any BitStampBTC in the first place.

Opened an issue on github: https://github.com/rippleFoundation/ripple-client/issues/230

FYI, I dropped my credit limit for WeExchange to zero on Feb23-24 ... and I believe I still the system hasn't yet converted any of me WeeBTC to BitstampBTC. I think this issue should get a decent priority ... people should be able to think in terms of the abstract currency, and not have to think about the different issuers (as long as issuers are not defaulting).


text:
How can I get email notification when I get or make a Ripple payment?
What's the easiest way to get an email notification whenever I receive or send a Ripple payment?

The Ripple API is public, you can either write your own tool to do this or you could try posting on the Ripple forums to encourage someone else to provide such a service publicly.

Have a look at my service, Was I Paid?. It will send you an email on payment receipt, and in the future will support other types of events.

Write a node.js app, using this and this. Subscribe to account transactions, and send an email whenever something happens.


text:
What happens if you create and lose an Mt. Gox redeemable code?
When you create an Mt. Gox code, you are shown a long textual code, and the amount is immediately deducted from your account.
What happens if you lose the code (e.g. your computer accidentally shuts down before you copy-paste the code into someplace safe)? Mt. Gox already shows the funds as if they don't exist in your account (even before they are redeemed).
If there a way to restore lost codes?

The code appears in your account history.  If it hasn't been redeemed, it also appears here:
Funding Options -> Redeem Codes
It also has a Cancel if you don't wish to use it (it simply redeems it to your own account).


text:
How can you view the Ripple orderbook without being logged in?
Is there a service that exposes the orderbook without requiring a Ripple account?

Not the orders (at least yet), but graphs of the market are available at https://ripplecharts.com/ and http://bitcoincharts.com/

You can get the orderbook via a ruby command line tool: https://github.com/arvicco/rippler or make your own using websockets and the published API (I have one in Go).

http://xrp.webr3.org/usd-xrp has the orderbooks of Bitstamp BTC/XRP, Bitstamp USD/XRP. https://ripplewise.info has Bitstamp, SnapSwap, RippleChina orderbooks.

Yep, you can view all the markets that trade Ripple without logging in on the Bitango market search page: http://bitdango.com/markets?quoteCurrencies=XRP


text:
What's the difference between 12 word seed and 24 word seed?
Why was the format switched to 24 words for some newer wallets?

The English-language wordlist for the BIP39 standard has 2048 words, so if the phrase contained only 12 random words, the number of possible combinations would be 2048^12 = 2^132, and the phrase would have 132 bits of security. However, some of the data in a BIP39 phrase is not random, so the actual security of a 12-word BIP39 mnemonic phrase is only 128 bits. This is approximately the same strength as all Bitcoin private keys, so most experts consider it to be sufficiently secure.

How does this answer the question of why some wallets use 24 word mnemonic?

24-word is much secure but 12-word is enough

Do developers of the wallets which use 24 words not understand this? Why don't they go for 48 words to be even more secure?..

@SergeiTikhomirov 12-word seed is really enough and secure

In Bitcoin, a private key is a 256-bit number ...

It sounds like the real answer is risk/reward as perceived by the manufactures. Some feel the risk of using 12 words is worth the reward of more customers because they feel that 1) 12 is secure enough and 2) they can get more customers because they would rather deal with half the words.

Notice in the actual unsafe working examples below that:

12 words utilizes 128 (4x32) bits of entropy
18 words utilizes 192 (4x48) bits of entropy
24 words utilized 256 (4x64) bits of entropy

Note the results below can be easily extended to 15 and 21 BIP 39 seed words.
% echo -n "This is a VERY pooor low entropy brain wallet" | bx base16-encode | bx sha256 | cut -c 1-32 | bx mnemonic-new
health boil host ostrich fire spike body solar collect harvest catalog crystal
% echo -n "This is a VERY pooor low entropy brain wallet" | bx base16-encode | bx sha256 | cut -c 1-48 | bx mnemonic-new
health boil host ostrich fire spike body solar collect harvest catalog cup mix tattoo market festival sudden please
% echo -n "This is a VERY pooor low entropy brain wallet" | bx base16-encode | bx sha256 | cut -c 1-64 | bx mnemonic-new
health boil host ostrich fire spike body solar collect harvest catalog cup mix tattoo market festival sudden pony notable beach wide health original inform
Also note the repetition of the BIP 39 words above.

A bitcoin private key is 256 bits. So you would need about 24 words (bip39 draws from 2048 words) to equal that. (2048^24= about 3x10^79
2^256= about 1x10^77)

Well for starters that should exponentially increase the security of the password if anything else


text:
Is there a Ripple address directory?
Not part of the protocol, but rather a 3rd party?
A directory could be built starting from this thread, where a lot of known Bitcoin figures posted their Ripple address (myself included).

The only list I've seen is here: https://github.com/arvicco/rippler/blob/master/lib/rippler/contacts.rb


text:
What are some resources that analyze "how centralized Bitcoin really is"
Are there any blogs that track the centralization in Bitcoin? Is it growing, or is Bitcoin becoming less centralized over time?
E.g. I believe mining pools have become somewhat less centralized in the last two years. At some point the hash power distribution had 1-2 pools that controlled over 50% of the network - now the largest piece in the hash power pie is "Unknown" (possibly solo miners).
This is nice - but it still doesn't answer the question, as I don't really have the historic data to compare with. Other aspects of centralization worth tracking over time is Mt. Gox volume, the number and power distribution between core developers, and ownership of various community assets such as bitcointalk & the wiki.
As an answer I would want to get some threads/blogs that analyze this information and post updates - the answer in this case can't be a static analysis of the present situation (it wouldn't be a good fit for this Q&A format, as such answers tend to get stale).


text:
c-lightning: single tx multi-channel open stuck on CHANNELD_AWAITING_LOCKIN:We've confirmed funding, they haven't yet
I've tried to open multiple Lightning Network channels using a single Bitcoin transaction, with these steps:

For every peer in PEERS (n=25) run:

lightning-cli connect ${peer}
lightning-cli fundchannel_start ${peer.id} ${amount}

Save all returned ADDRESSES
Construct a Bitcoin Transaction spending ${amount} to each of returned ${ADDRESSES}:

bitcoin-cli createrawtransaction …
bitcoin-cli signrawtransactionwithkey …
bitcoin-cli sendrawtransaction …

Note returned txid
Complete all channels with:

lightning-cli fundchannel_compete ${peer.id} ${txid} ${corresponding vout}

Wait for channels to open, which never happens…

My regnet tests worked, but on mainnet things got stuck…
Relevant transaction.
(Redacted) output of lightning-cli listpeers for involved peers.
Among all of the channels that got stuck, there's one where both ends are under my control (c-lightning <----> lnd).  I'm able to test things on it:
$ lightning-cli listpeers 03935a378993d0b55056801b11957aaecb9f85f34b64245f864c22a2d25001de74 | jq
{
  "peers": [
    {
      "id": "03935a378993d0b55056801b11957aaecb9f85f34b64245f864c22a2d25001de74",
      "connected": true,
      "netaddr": [
        "203.150.177.97:52226"
      ],
      "globalfeatures": "",
      "localfeatures": "81",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "scratch_txid": "873bbef47e5c6dda481d62cf5b67d83170448a81e770162aedf1437d6ce16ef9",
          "owner": "lightning_channeld",
          "short_channel_id": "589813x1972x24",
          "direction": 0,
          "channel_id": "2197bec830e4c2124cc78d96f882c2f8e216c5aebf66002d0d1b9d5a833a6406",
          "funding_txid": "1e643a835a9d1b0d2d0066bfaec516e2f8c282f8968dc74c12c2e430c8be9721",
          "private": false,
          "funding_allocation_msat": {
            "03935a378993d0b55056801b11957aaecb9f85f34b64245f864c22a2d25001de74": 0,
            "032260c3b64b471b7eb0630b4af5d07ca94ff4e759573cbbe1bfb25845c375ed6e": 309735000
          },
          "funding_msat": {
            "03935a378993d0b55056801b11957aaecb9f85f34b64245f864c22a2d25001de74": "0msat",
            "032260c3b64b471b7eb0630b4af5d07ca94ff4e759573cbbe1bfb25845c375ed6e": "309735000msat"
          },
          "msatoshi_to_us": 309735000,
          "to_us_msat": "309735000msat",
          "msatoshi_to_us_min": 309735000,
          "min_to_us_msat": "309735000msat",
          "msatoshi_to_us_max": 309735000,
          "max_to_us_msat": "309735000msat",
          "msatoshi_total": 309735000,
          "total_msat": "309735000msat",
          "dust_limit_satoshis": 546,
          "dust_limit_msat": "546000msat",
          "max_htlc_value_in_flight_msat": 18446744073709552000,
          "max_total_htlc_in_msat": "18446744073709551615msat",
          "their_channel_reserve_satoshis": 3098,
          "their_reserve_msat": "3098000msat",
          "our_channel_reserve_satoshis": 3097,
          "our_reserve_msat": "3097000msat",
          "spendable_msatoshi": 300877000,
          "spendable_msat": "300877000msat",
          "htlc_minimum_msat": 0,
          "minimum_htlc_in_msat": "0msat",
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:We've confirmed funding, they haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_offered_msat": "0msat",
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "in_fulfilled_msat": "0msat",
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_offered_msat": "0msat",
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0,
          "out_fulfilled_msat": "0msat",
          "htlcs": []
        }
      ]
    }
  ]
}

It seems like, for whatever reason, other peers have failed to confirm funding.
And the question obviously is: how does one resolve it? :)  Any help appreciated!
edit: Attempts to force-close channels result with this (full-er log):
sendrawtx exit 26, gave error code: -26?error message:?non-mandatory-script-verify-flag (Witness program hash mismatch) (code 64)?

tl;dr: Tried opening multiple channels using a single btc tx.  Channels got stuck.  What do?

I wrote the fundchannel_start/fundchannel_complete pathway. You should not broadcast the signed funding transaction until after you have successfully called fundchannel_complete for each of the peers. This is because fundchannel_complete secures the commitment transactions that are necessary to spend the funding transaction output for that channel. By broadcasting the transaction before you've 'completed' the channel open, there's no guarantee that you'll be able to spend those funds.
If you get an error in any of the funchannel_completes then your entire funding transaction will have to be discarded/cancelled. There's not good support at the moment for calling fundchannel_cancel after fundchannel_complete has been called; this needs to be fixed. There's an open issue for it on c-lightning's Github repo.
It's highly likely that the issue you're seeing with the LND/c-lightning interop is related to the fact that you published the funding transaction before notifying them about it. You might try re-scanning the blockchain with the LND node and see if it resolves the error.

I definitely misunderstood it then, and run fundchannel_complete after sending the transaction :/. Rescanning helped c-lightning, but no such luck with lnd unfortunately (The only relevant rescan I've found with them was: https://github.com/lightningnetwork/lnd/blob/master/docs/recovery.md#forced-in-place-rescan)

On a side note: perhaps fundchannel_[pre]confirm, or fundchannel_ensure would be a better name for it.

Also @c2knaps, funds lost, or might be possible to recover?

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


text:
Why was transaction malleability fix required for Lightning network?
Transaction malleability is that TXID can be changed modifying the signature slightly without the private key. To implement Lightning Network, it was required to fix the malleability.
However, I thought that we just wait for 1 confirmation that we create an opening transaction, which is 2 of 2 Multisig, in order to open a channel.
After researching Lightning network protocol, I kind of found out that before broadcasting the opening transaction, we have to create a commitment transaction that needs the TXID of the opening transaction, and we have to keep it to claim. If the TXID is changed, the commitment transaction won’t be valid. So we needed to fix transaction malleability to keep the commitment transaction valid.
Is this correct? If not, please educate me.

LN can work without SegWit, even though a bit limited.

Alice creates a multisig transaction sending 100btc to a shared Alice-Bob output–one that requires both signatures–and signs it. We’ll call this transaction Tx0. And she only reveals Tx0 to Bob after:
Alice and Bob each sign a timelocked transaction for 30 days from now, sending 100btc back to Alice. This is not committed to the blockchain, and opens a “channel” between them.
Uncommitted transaction has dependency over Tx0. After Alice reveals Tx0 to Bob, if Bob successfully changes the transaction hash for Tx0 on blockchain, then uncommitted transaction will become invalid and Alice will not be able to claim 100btc back.
If, in addition to requiring the refund Tx, Alice also requires Bob to sign Tx0 before she does so that only she can submit Tx0 to the blockchain, this attack would not work.

So it seems to me that my explanation is correct, right?

Yes. The reasoning was correct.

Also worth to note that without segwit, any third party (and especially a miner) could change the txid of a transaction.  Bob himself is always free to re-sign the transaction using a different nonce value for the signature using his private key, but a 3rd party can also replace the s value of any signature with a specific s' value (really it is just n - s) while keeping the signature valid.
The great thing about segwit is that it protects from both Bob signing with a different nonce (changing the signature completely) and a 3rd party changing the s specifically.

The punishment transaction construction requires an immutable commitment transaction. Transaction malleability was an issue in that regard because it allows for more than one valid version of the same transaction.*
Before the funding transaction is committed to the blockchain, the two channel partners are exchanging commitment transactions that allow each party to unilaterally reclaim their portion of the funds. Whenever a payment is made on the channel, the channel partners exchange updated versions of the commitment transactions. To invalidate outdated states, each party provides a breach remedy to their counterparty which allows the counterparty to claim all funds in the channel if the old state is broadcast. The breach remedy is a second transaction that spends the output of the counterparty's commitment transaction. Hence, the breach remedy construction required the commitment transaction to be immutable.
Additionally, segwit solves another problem. For non-segwit transactions, the transaction id (txid) can only be calculated after a transaction is signed. Hence, a commitment transaction that allows fund recovery could only be constructed after the funding transaction was already fully committed to. Since the witness does not contribute to the txid of segwit transactions, funding a channel from segwit funds simplifies the exchange of information for the construction of commitment transactions.

Lightning network channels are a multi signature operation, if Alice and Bob open a channel, both are signing a contract where they agree the terms, so both sign.
If changing the signature of the transaction (if transaction malleability) is allowed. One side could modify/invalidate the contract.
that why it was fixed


text:
Avoiding Bitcoin malleable bug with implementation
I'm currently working on some Bitcoin code and whilst I'm hoping I've covered my bases, I wanted to check the implementation theory.
If I understand the malleable bug it's basically...
You create a transaction address for the transaction to take place on.  At this point a transaction id is created (txid)
The txid is changed before the transaction is complete on the network, creating a second txid, that the transaction will eventually be completed/confirmed/verified on.
So if that is correct (please correct me if I'm wrong)...
A script/program transferring coins to somebody should work something like this:
A transaction address is created and given to the payee to transfer the requested balance to.
That transaction address is checked periodically for number of confirmations.  When the transaction address receives 6 or more confirmations it can be considered as completed.
Is there a better/quicker/securer way ?
Thanks

You're confusing addresses with the transaction id. Addresses can't be changed. The transaction id can be. You create a transaction sending btc to an address. The problem is you can't simply use thee transaction id to track the progress of the transaction because someone can change that id and then you don't see it going into the blockchain even though it has.

Thanks Jannes.
So why wouldn't people try to verify against transaction addresses instead of transaction IDs ?

Yeah that's basically what you're supposed to do. Keep an eye on your own balance and match any transaction you see to any transaction you made earlier. Just not by the id but by the addresses. Which basically means you make your own hash of the important (non-malleable) parts of the transaction that you create and then you keep an eye on the blockchain for that hash. There's a recommended best practices for such a hash. Best to follow those and not implement something yourself based on what some random lurker on  here tells you (meaning: i may have parts or all of this wrong)

https://github.com/bitcoin/bitcoin/pull/3656

I think your question would be much clearer if you edited it to reflect your new knowledge about the difference between addresses and transaction ids. ;)

related: How is a Transaction ID generated & when does it change? (with a new sequence ID?)

Lower the confirmation.
The security reports are specific, 1 confirmation is not safe. 2 confirmations is considered 'safe'. More is considered 'safe'.
You can "rock'n roll" with 2 confirmation.
MtGox died the epic death because their custom made wallet was accepting coins after just 1 confirmation


text:
Couldn't an attacker cause online (watch-only) wallets to display malicious receiving addresses?
If I understand correctly, one of the main perks of using a deterministic watch-only wallet is the ability to generate new receiving addresses without syncing with the offline wallet, but this seems vulnerable to attack.
Example:

To prevent an attacker from stealing her funds, Alice keeps her private keys in an Armory offline wallet. She uses an [online] watching-only wallet to generate receiving addresses, which seems to be recommended by Armory's page Using Our Wallet:

Now that the wallets are setup, you can use the watching-only wallet exactly the same way as a regular wallet, except Bitcoins cannot be sent from it.   Use the “Receive Bitcoins” button to generate addresses for receiving payments, and incoming transactions will show up in the ledger with a slightly different color than your other wallets.

A similar suggestion on the Electrum tutorials page:

You now have an online wallet where you can check your balances and give out new addresses, but you can't however spend the coins. So if an attacker would be able take over your online computer your coins can't be lost.

Eve creates a modified version of Armory in which all new receiving addresses (created when the user presses "Receive Bitcoins") are owned by Eve instead of Alice.
Eve gains access to Alice's online computer and plants the modified version of Armory. Now any payments received by Alice's new addresses are actually under Eve's control, without her knowledge.

Obviously you could generate the receiving address a second time on the offline wallet and verify that they match, but doesn't that defeat the purpose? Also, shouldn't there be a warning about this?

This is a frequent and common flaw with most claimed security flaws: "Eve somehow gains access to Alice's online computer and... "  Once an attacker has access to a victim's computer, they can do ANYTHING! Reformat the harddrive; install a new OS; copy all private keys.  If the attack relies on a magical step of the attacker somehow gaining access to a protected resource, then it is not a real attack.

Yes, this is possible. However, since Bob (actually, in cryptography, usually Eve, the attacker) has, apparently, got access to Alice's computer, he/she could also replace the Bitcoin application with one that does the same thing.
The purpose of this procedure is to protect Alice's existing bitcoin. It does not do other things.

Fair enough, thanks for clarifying. Also, I'll change the attacker to "Eve" :)

authors: Рустам Кадыров


text:
How can I prevent Armory from getting stuck at "30 seconds" Building Databases on OSX 10.9?
I'm running Bitcoin-Qt v0.8.6-beta and Armory 0.90-beta on OSX 10.9. I've been stuck at "30 seconds" for several hours. This has happened twice now. Activity monitor displays no disk activity, but ~90-120% cpu usage. Bitcoin-Qt is fully synced and displays a green checkmark.
Any help would be appreciated, thanks!
EDIT:
The log file contains a bunch of messages similar to this:

-ERROR - 1394339952: (leveldb_wrapper.cpp:1145) Block height exceeds DupID lookup table
  -ERROR - 1394339952: (leveldb_wrapper.cpp:1145) Block height exceeds DupID lookup table
  -WARN  - 1394339952: (BlockUtils.cpp:4617)    Tx: d5fdcc541e25de1c
  -ERROR - 1394339952: (leveldb_wrapper.cpp:1145) Block height exceeds DupID lookup table
  -ERROR - 1394339952: (leveldb_wrapper.cpp:1145) Block height exceeds DupID lookup table
  -WARN  - 1394339952: (BlockUtils.cpp:4617)    Tx: 982051fd1e4ba744

WARNING: Triple-check you have a backup of all of your Bitcoin-Qt and Armory wallets before deleting anything.
Deleting the Armory and Bitcoin data directories (~/Library/Application Support/Bitcoin and ~/Library/Application Support/Armory) and re-downloading the entire blockchain (starting with a fresh bootstrap.dat) in Bitcoin-Qt fixed this for me.


text:
ip:port node list for testnet?
https://blockchain.info/ip-log
shows the ip:port for bitcoin nodes
where can I find nodes for testnet?
Google is coming up dry!
After many hours spent; I tried what seemed the logical approach: use a main-net nodes ip but change the port from 8333 to 8332 (but, no luck, not connecting to testnet!)
also tried 18332   :/
I am a new company, I want to test!

I am using this https://github.com/sebicas/bitcoin-sniffer to realize new-transactions and new-blocks real time on main-net but I am failing to do so on testnet (where do I connect? please)
This information should be instantly available and easy to find!
Then we wonder why bitcoin is not adopted!
The information is no where on the net!!
While literally the whole planet (99% of everyone) is a newbie (why is this not readily accessible info!??)
I am at a loss for words ...

I currently connect successfully to bitcoin main-net using:
{host:'109.123.116.24',port:8333}

#!/bin/bash

for i in testnet-seed.bitcoin.jonasschnelli.ch \
    seed.tbtc.petertodd.org \
    testnet-seed.bluematt.me \
    testnet-seed.bitcoin.schildbach.de
do
    nslookup $i 2>&1 | grep Address | cut -d' ' -f2
done

Testnet is port 18333 by default. Or run a testnet node and check what it connects to.


text:
What is Joel Katz' role in Ripple?
I see quite a few answers from Joel Katz, and a friend of mine referred to him as "a Ripple founder". Is this true? His name is not mentioned on this question.

"JoelKatz" is the bitcointalk.org handle of David Schwartz. He answered the linked question and referred to himself as "myself", and you should see him listed under this name as a Ripple developer in other places.

Thanks. I wonder which of the two is his real name, if at all.

@ripper234: I am fairly confident David Schwartz is the real one as it's used more commonly and in more official places. In fact linking to the SE profile changed my answer as I meant him as a person, not just the SE profile.

Feel free to revert my edit if you want.

This answer is correct. My real name is "David Schwartz". I have used the nickname "JoelKatz" for a long time, including on the Bitcoin Forum. If you look at my profile on SE, you'll see this: "I am OpenCoin's Chief Cryptographer and one of the architects of the Ripple payment system."


text:
How do I backup my Ripple wallet?
Ripple uses a Blob Vault structure to hold the wallet, but it currently resides on one centralized endpoint. It might be prudent to back up your wallet.
How is it done?

There are two things to backup/save, both can be found in the client under "Wallet -> Security".
The first and most important is your "secret key". Your public key is your ripple address that is r0123456789ABCDEabcde, your secret key is in a similar format but starts with 's', something like s0123456789ABCDEabcde. Write this down or save it somewhere safe. With just this your funds and trust lines can be recovered into a new wallet.
The other thing to save is your wallet. It's stored encrypted and contains your contacts as well as your secret key. The client will let you make an explicit copy into a local file that you can save as you wish. As with the secret key you do this via "Wallet->Security" in the client.
On account creation (and whenever you login) you can set the "Fetch wallet from" option to one of "Payward", "Payward and Local Browser" or "Local Browser". The middle option, both, is the default. It means that an encrypted copy of your wallet is stored at https://blobvault.payward.com (seen/set on the Advanced->Options page) and somewhere in your browser (?where?). The payward option allows you to access your wallet from any device and the local copy makes you not depend on payward being up/accessible at all times.

With respect to the "fetch wallet from" options, see http://bitcoin.stackexchange.com/questions/7849/what-do-the-fetch-wallet-options-when-opening-a-ripple-wallet-mean/8534#8534

I would like to backup the wallet in my Dropbox, not just "somewhere in my browser".

@ripper234, Read again: "make an explicit copy into a local file". I assume you know how to get local files to/from Dropbox.

Ah sorry, I missed the part about export, thanks.


text:
Negate the need for blockchain explores and full blockchain syncing for simple queries
Rather than download the full blockchain or a pruned version; would it be viable to peer-to-peer ask 'what is this block' or 'what is this tx'?
We download the full blockchain from several peers so why not ask peers for just on piece of info?
Is there a javascript/node.js library that does this?

What kind of queries? Bitcoind needs to download all blocks in order to be able to validate them. If you want to ask certain queries and don't care whether you're being lied to, then sure, a lot of that work is not needed.

That's exactly what your bitcoind client does. It asks for specific blocks in network calls and if you wanted to, you can create a simple client that asks only for certain tx's and blocks like you said.
That is in fact what most SPV wallets (phone-based wallets and some others) are doing. They ask for block headers only and then ask for transactions related to those blocks to prove that certain transactions exist.

This is not true for bitcoind (if you're referring to the Bitcoin Core rpc server binary), but it is true for some other clients. Bitcoin Core always downloads all blocks, because it cannot do full validation when gaps are missing.

I meant that bitcoind asks peers "what is thisk block" or "what is this tx"


text:
Bitcore.io Create a raw tx hex (signed) to push to the blockchain
I am trying to push a raw transaction to blockr.io testnet using bitcore (current latest version 0.12.9) for node.js https://github.com/bitpay/bitcore
I have constructed my transaction like so:
var unspents=
[ { txid: '67b22a1874be2e748b2c904e2181f85a9d6503001e58c374e17b1161cd5a36f4',
    vout: 0,
    address: 'myHtNgECiAjBctWz1tM2TN2PupWwfHtgMi',
    scriptPubKey: '76a914c2f9958848c465efd042fcb76fef519f03a83ec288ac',
    amount: 100000,
    confirmations: 39 } ];

    var transaction=new bitcore.Transaction()
    .fee(bitcore.Unit.fromBTC(0.0001).toSatoshis())
    .from(unspents) // there is one unspent of 0.001
    .to(bitcore.Address.fromString(payToAddress),0.001)
    .change(myAddress)
    .sign(privateKey);

console.log(transaction.isFullySigned()); // This returns true

When I POST this to blockr.io I serialize it:
'https://'+'t'+'btc.blockr.io/api/v1/tx/push'    // < t at the beginning is for testnet

{'hex':transaction.serialize()} // 0100000001f4365acd61117be174c3581e0003659d5af881214e902c8b742ebe74182ab267000000006a47304402204f5950a8f8e7346e96101da811452246d51741131310f58d5cfdc064e547d3dc02202b817a442bb043a1174fe0703082ebbd7bc622afc00084710be21fa143444d83012102bbe798da887604bdd360dd059061b48816634e44d9f54563af2c727b8bcb3e2fffffffff02a08601000000000017a9149ffdff1f3eea0deb21ed967b91c7ef3cce65b2d68750f2704e180900001976a914c2f9958848c465efd042fcb76fef519f03a83ec288ac00000000

The response I get back from blockr.io is:
[ { status: 'fail',
    data: 'Could not push your transaction!',
    code: 500,
    message: 'Did you sign your transaction?' },
  500 ]

Below is the transaction I sent but as JSON. I'm thinking there is something wrong with it?
{
"version":1,
"inputs":
[{
    "prevTxId":"67b22a1874be2e748b2c904e2181f85a9d6503001e58c374e17b1161cd5a36f4",
    "outputIndex":0,
    "sequenceNumber":4294967295,
    "script":"47304402204f5950a8f8e7346e96101da811452246d51741131310f58d5cfdc064e547d3dc02202b817a442bb043a1174fe0703082ebbd7bc622afc00084710be21fa143444d83012102bbe798da887604bdd360dd059061b48816634e44d9f54563af2c727b8bcb3e2f",
    "scriptString":"71 0x304402204f5950a8f8e7346e96101da811452246d51741131310f58d5cfdc064e547d3dc02202b817a442bb043a1174fe0703082ebbd7bc622afc00084710be21fa143444d8301 33 0x02bbe798da887604bdd360dd059061b48816634e44d9f54563af2c727b8bcb3e2f",
    "output":{
        "satoshis":10000000000000,
        "script":"76a914c2f9958848c465efd042fcb76fef519f03a83ec288ac"
    }
}]
,"outputs":
[{
    "satoshis":100000,
    "script":"a9149ffdff1f3eea0deb21ed967b91c7ef3cce65b2d687"
},{
    "satoshis":9999999890000,
    "script":"76a914c2f9958848c465efd042fcb76fef519f03a83ec288ac"
}]
,"nLockTime":0,
"changeScript":"OP_DUP OP_HASH160 20 0xc2f9958848c465efd042fcb76fef519f03a83ec2 OP_EQUALVERIFY OP_CHECKSIG",
"changeIndex":1,
"fee":10000

}
I signed it with my private key then serialized it as blockr wants it in hex format does this mean I have got to somehow sign it after it's serialized or what?
And what is the deal with these large numbers:
"satoshis":10000000000000,

"satoshis":9999999890000,

UPDATE:
Block chain info instead returns this error:
Unable To find all tx inputs [67b22a1874be2e748b2c904e2181f85a9d6503001e58c374e17b1161cd5a36f4]

The problem is on this line:
amount: 100000,

The amount is supposed to be in coins, not satoshis, according these comments in the code. To fix it, replace that line with
satoshis: 100000,

And what is the deal with these large numbers:

Since the code was assuming an input with 100,000 coins in the inputs, the change address had a lot more coins in it than there should have been.


text:
Energy to confirm one block?
What is the minimum energy (or CPU operations) required for someone to confirm one block on their own, to launch a double-spend attack?
How can I calculate this from the current difficulty or hashrate?

What do you mean by "confirm"? You mean confirm that it's valid given the block? And what does that have to do with the difficulty or hashrate? Do you mean create a block in the first place? In which case, what do you mean by "on one's own"?

Here is how to compute this in general.  I am intentionally not going to give an example using current numbers, since (a) it will instantly be obsolete, and (b) it will encourage people to ask for an updated answer, rather than learning to work it out for themselves.

Determine the current network difficulty.  Google "bitcoin difficulty" for the current figure.  Call it D.
Multiply D by 2^32, which is about 4.3e9.  Call this new number H.  This represents the average number of hashes needed to mine one block.
Look up the hashes per unit energy for current mining hardware.  Check https://en.bitcoin.it/wiki/Mining_hardware_comparison for the device with the highest number in the Mhash/J column.  Multiply this Mhash/J number by 1 million (1e6) to determine the number of hashes per joule performed by this hardware.  Call this number E.
Divide H by E.  This gives you the number of joules of energy needed to mine one block.
If you would prefer to measure energy in kilowatt-hours (a typical billing unit for electric utilities), then divide the previous number by 3.6e6.

There is no minimum. In theory, you could find a valid block on your very first attempt. The best we can do is an average.
Here's the average energy required to find one valid block using CPU mining:

average energy required = difficulty * 232 / 2*10^6 * joules

Or, at current difficulty, 1.018×10^14 joules.
Explanation:

difficulty * 232

The average number of hashes to find a block.

2*10^6 * joules

According to the Bitcoin wiki, the typical mining efficiency for CPUs is 2 Mhash/J.

As this is roughly 2.8 million USD worth of electricity at typical prices, this should give some indication as to why CPU mining is not considered feasible these days.


text:
Accepting Bitcoin payments on my website using bitcoind? Many questions... no apparent answers
I am trying to design a system that lets me accept Bitcoins on my website. I would like to use bitcoind, or bitcoinj. However, I have many questions regarding this setup.
FYI, I already read similar questions on this website and haven't gotten my answer.
Bitcoinj:

Seems tricky. I wasn't able to find any example code that works for me. Don't take it as a sign of incompetence or laziness on my end. The examples on their site didn't work properly because they renamed many of their classes and I can't get it to work. If you have a piece of code working with the latest version, please point me to that direction.

Bitcoind:

How many addresses can bitcoind reasonably manage? Is it a good idea to create tons of addresses and have bitcoind watch all of them?
How often should I 'flush' the wallet? It doesn't make sense to me to keep the same wallet all the time since that file will grow huge in time.
I am planning on doing the following:
1) User generates the address on my website, sends BTC.
2) I start polling 'listunspent' every X minutes. When I see that the TX got N confirmations, I send the money to the cold storage. I also put money down on the sender's account on my website.
3) Now how do I get rid of this address? It sounds like these addresses will accumulate and break bitcoind after some point.

I have read a lot about this but nobody explains this aspect. They just revolve around the problem.

Actually Ive done this.
What I would say is that if you are planning to it your self it requires some amount of time and expertise if you really want to implement a custom solution that can integrate with your web platform. I did some research and in the end this is how I did it.
I use Bitcoind
It runs on a private server well away from the web server.
On the private server there are several encrypted wallets running on different ports under different user accounts each of them runs the RPC deamon that only responds to ssl from the local host.
Users have an account on on the web application, when they are created they are assigned to one of the private wallets and given an account in that wallet.
The web application sends an RPC request for getaddress  using a message queue that a process on the private server listens to. This issues a new address for payment and puts it in the web applications database.
When we want to accept payment we display the new address to the user on the web page
On the private server a deamon runs every minute or so that calls getreceivedbyaddress  -minconf with the addresses we have displayed to users to receive payment.
when it sees a new payment it updates the webservers database with the record of the payment.
To make it more complicated but secure the communication is also encrypted and the details of the transaction signed using a shared secret between the web server and the wallet daemon process. So for example the web application wont regard the payment as accepted until it sees a signed transaction in its database and the deamon wont put one there until it has seen the minimum number of transactions confirmations on the network.
It took me a couple of days to implement but I had quite a big head start.
The easiest way is to go with one of the payment vendors who have done the hard work for you unless you plan on becoming one of them.
There are several other gotyas you have to be aware of.. for example
Keeping a secure backup of the remote wallets
Keeping the address pool in the remote wallets primed and making sure you have backed up the wallet after priming it.
Storing the wallet pass-phrases so you don't lock your self out
having a way to change them..
What I do is have a multi signature approach where half the wallet phrase is sotred in the daemon binary so the developer could get hold of it.. The other half entered at run time by the support guy. Neither of them would have the full pass phrase so cant steel the wallet and run away with it easily.
Regarding the problem of creating too many addresses and not being able to remove them.
At them moment this is not a problem for us as our solution will scale as we get more users we can create more wallets.
As for cold storage I'm not completely convinced this offers us any more security than we have now with out giving us more problems associated with managing the cold part of the storage. At the moment its a numbers game. where by if we only have $5000 in a wallet its probably not worth it. If we have $3 million in a wallet then we would firstly be ecstatic our business was that successful, Then probably invest in a more secure private data center some brand new servers and some very clever security people

This answer would benefit from some formating and perhaps a TL;DR.

be my guest feel free to edit as you like. Journalism has never been my speciality

Awesome answer, still relevant after a couple of years! Any reason why not to use the -notifywallet argument of bitcoind to get notified of new deposits? Also, as of 2016, don't rely on the built in accounting mechanism, it will get deprecated. It's very straightforward to just keep a record of transactions in your db. Just provide ways to backup all the transactions because those are your accounting records.

How many addresses can bitcoind reasonably manage?
it is not the amount of addresses that matters but the amount of transactions going in and out of those addresses that can stress out the server.
Is it a good idea to create tons of addresses and have bitcoind watch all of them?
If you have it nicely organized in a database or some other file then go for it.
How often should I 'flush' the wallet? It doesn't make sense to me to keep the same wallet all the time since that file will grow huge in time.
someone stated I have a wallet with many transactions. It's around 200M. and each wallet flushing takes 4 seconds and blocks JSON RPC calls. from github. So unless you pass 200M transactions do not worry about flushing.
in regards for your second part why not use an open source bitcoin front end such as coiniv. That way you do not have to worry about the customer generating new bitcoin addresses you just inegrate it with coiniv which already has an api

I was able to get this working with some outside help (I paid him with Bitcoin).
http://www.bitcoinmonitor.net/
It monitors the block chain for payments to an address you provide (I use a cold storage address so it is never exposed to hackers). When a payment comes in it sends the details and then I can process the data received.

why not just use the blockchain.info api?

Free 3rd party services are a trade-off: On the one hand, they are cheap and quick to get started. But on the other hand, your business is incurring risk that they might suddenly stop, get overloaded, provide inaccurate information, etc. The more serious you are about Bitcoin, the less you want to rely on free 3rd party services.

bitcoind is a very huge app
You should test this by yourself before. I'm currently trying to test dictionary attack. 100k addresses made my wallet.dat to 50mb. After first 50k speed of adding new address radically decreased.
There is no option to remove address from wallet.dat for secure reason, to preventing loss.
You might look at pywallet, This little python script can dump you wallet.dat in plain-text. Probably, wrapping back from plain to binary not a hard task, for even a young programmer.
Looks like side api, what @mulllhausen has mentioned, is the best, light solution.
Look at vanitygen, you can generate vanity addresses by ajax+cgi user's request and check by blockchain.info api confirmation, and send e-mail to your work-box with privkey.
However, I don't know what kind of obfuscation exchanges used, like cryptsy or mtgox. Anyway, looks like keeping alive default bitcoind daemon on the webserver not a good idea.

If you really want to use bitcoind instead of a payment processor and you have a volume that a single instance of bitcoind can't handle (say, 5 figures of addresses) then you're going to have to build a cluster. Use a database to keep track of which addresses are on which bitcoind instance.
A vanitygen app might be useful for creating addresses and waiting for a payment before committing the address to a bitcoind wallet to save yourself from filling up servers with unused wallets.
There are a few tools out there to check balances of Bitcoin addresses without having to import them into bitcoind (and without revealing the private key to the tools).

You should check out http://bitpay.com or http://coinbase.com. They host the payment processor for you.

This off-topic for the question, question is about Bitcoin payments via Bitcoind.


text:
Turn off fee destruction in PPCoin
In the sourcecode of PPCoin/SRC/MAIN.CPP line 1433 I read: fees are destroyed to compensate the entire network.
I want to turn it off that fees are destroyed, if I change this code will it work?
// ppcoin: fees are not collected by miners as in bitcoin
// ppcoin: fees are destroyed to compensate the entire network
if (fDebug && GetBoolArg("-printcreation"))
    printf("ConnectBlock() : destroy=%s nFees=%"PRI64d"\n", FormatMoney(nFees).c_str(), nFees);

If I change destroy=%s to destroy=%$$$, will it stop destroying fees?

I'll take a look through the code, but i don't think that is the only place it is referenced in that code

No. That's a printf statement, so you will only prevent the printing, not the actual destruction.


text:
What is the maximal value of 1 BTC?
If all of the world suddenly decided they want to use BTC as their currency, what would the value of 1 BTC be, as measured in today's US dollars?
(Of course dollars would drop to zero in this theoretical case, but we can still measure BTC in today's dollars and get a finite result)

It sounds like you are asking what the value of bitcoin would be if all of the M2 money supply in the entire world had to be exchanged into bitcoins.  Of course, this is an apples to oranges comparison.

@StephenGornick - it is and is not apples to oranges. Bitcoin derivatives could replaces some aspects of the M2 money supply that is today denominated in Fiat.

Why vote to close btw? Was it you @StephenGornick?

I am one of the two that voted to close this, yes.

@StephenGornick - on what grounds?

@ripper234 - Because a discussion like this wouldn't be constructive?  It would be a discussion, that itself, is grounds to be closed.  It wouldn't be possible to even guess what the price would be because we wouldn't be able to calculate how many BTC there actually would be at said point.

Basing on this set of data from XKCD, world's GDP is $62,900,000,000,000, If all of it was expressed in 21 million bitcoins, then each bitcoin would be worth $2,995,238.10, so roughly 3 million dollars.

Even at this point, 8 decimal place accuracy looks just enough. 1 satoshi will become 10 cents USD.

@vi.su. A good observation, I didn't even notice that... Although $3 million divided by 100 million satoshis is 3 cents, not 10 ;).

One paper dollar can be responsible for one thousand dollars worth of GDP if it were to turn over three times a day (e.g., velocity of about 1,000 on an annual basis.)   The Federal Reserve says velocity for MZM is about 1.5 times per year, but M1 is nearly 7 times per year.  So if GDP is 62.9 trillion, then just under 10 trillion M1 money is needed.

Unaccepting this as per the comment on reddit - http://www.reddit.com/r/Bitcoin/comments/16d6ti/maximal_value_of_1btc_at_the_moment_about_3/c7uyrp2

@ripper234 this is the key point http://www.reddit.com/r/Bitcoin/comments/16d6ti/maximal_value_of_1btc_at_the_moment_about_3/c7v238d "If I pass one bitcoin around a billion times that's a GDP of a billion bitcoins.
That bitcoin wasn't worth a billion bitcoins though (how could it be). GDP therefore has nothing to do with the value of the currency used to measure it."

I think a more reliable way is to compare it to gold, since the exact value of currency in the world is very difficult to calculate. It's estimated that 171,300 tonnes of gold have been mined in human history, which is roughly equivalent to 5.5 billion troy ounces.
5.5 billion oz/21 million bitcoin = 261.9 oz/bitcoin

The value of one ounce of gold is about $1,668 so the value of bitcoins in current dollars would be about:
261.9 oz/bitcoin * 1668 USD/oz = 436,849.20 USD/bitcoin

If bitcoin is lucky enough (and I hope it is) to be valued at 1% of the total gold supply, then each bitcoin would be around $4,368.49. This would make the entire bitcoin supply worth about $91 billion.

Welp, this happened.

As of 2009, we have some random guy on the Internet estimating $4.5 trillion as the value of all paper and coin around the world. That's a pretty decent number to use if you're looking to imagine replacing all fiat money with Bitcoin.
One big problem: there would be more demand for "cash" transactions since Bitcoins are more convenient than physical cash.
That is, due to convenience factors, a lot of us like monetary transactions that don't require the existence of any paper or coin. If we all switched to Bitcoin, how many of us would transfer BTC to a bank for the promise to pay back?
Anyway, $4.5 trillion divided by $21 million is $214,285.71. That said, that's in 2009 dollars with the 2009 world economy, and a lot of assumptions. Also, with a deflationary currency that is far more convenient than paper and coin, its value would likely be far greater than that if every single human being wanted to only use Bitcoin and have all financial transactions denominated in BTC.

All of those answer are right but they do not take in effect that bitcoins can, are and will be destroyed (I am talking about lost bitcoins not the network crash).
That said the value of one bitcoin will be higher than the expected value we calculated and should continue to rise as more bitcoins are destroyed.
Bitcoins can be destroyed by many ways:
-Losing one's wallet
-Making a payment to an invalid address (like the 0x0 puclic key, an elleptic curve in ECDSA cannot pass by (0,0))

Care to explain why downvote, bitcoins can and will be destroyed....just loose your wallet.


text:
how to develop trading platform for bitcoin
I would like to know how to start developing trading platform for BTC,LTC where the user can create his wallet, send and receive coins, Buy and sell coins.
i have checked the trading platforms and i know what needs to be done. But BTC has open source code. if anyone has used it and know whether it would be better to go with BTC open source or an api.
can anyone guide me in starting this.
Thanks

Do you have any programming experience?

Start by looking at existing trading platforms. Decide what features you want to have. Then think about what data you'll need to store and design a database schema. Then begin writing the code to perform your business logic using the database schema. Last, put a front end on it and invite people to test it.

authors: Владимир Галко