Pages:
Author

Topic: Scalability - page 2. (Read 26218 times)

newbie
Activity: 2
Merit: 0
July 14, 2010, 11:06:13 AM
#31
Having to download the entire chain also causes issues with new user acceptance.  I installed bitcoin on an older box I have and it took about 4 hours to download the entire chain.  As time goes on this is only going to get worse.  While this is a minor annoyance for most people here with fast connections and servers, if bitcoin were to actually get wider acceptance outside the tech circle it would be a deal breaker.

Say your neighbor wanted to buy something with bitcoins.  You tell him to install the program, then go to the exchange and buy some coins.  Sounds great, right?  How do you think he will feel about the transaction when he has to wait 8 hours after installing the program to get his bitcoins because he has to download a chain with 200,000 blocks?  Do you think he would recommend it to his friends?  To gain more widespread acceptance, initial transactions would need to overcome this factor.
newbie
Activity: 9
Merit: 0
July 14, 2010, 10:59:18 AM
#30
Quote
Why? E-Mail and Jabber work the same way. Everyone can run their own server, and many do, but most users prefer to use someone else's server(s).
Sure it can work that way but is that the ideal? Doesn't that make the network less robust and more vulnerable to attacks and manipulation? What happens if some attackers start running a cluster of supernodes? The main point is why rely on this more vulnerable architecture when you don't have to? It isn't easier to implement.

Quote
Edit: Even more closely related: Kazaa and Gnutella work the same way, too. You connect to a supernode that then searches for files on your behalf.
Yeah and I would argue neither of those systems are very well designed. Limewire replaced the gnutella routing with Kademlia actually.

spaceshaker: yes I agree there will have to be nodes that act as proxies for mobile devices.
member
Activity: 60
Merit: 10
July 14, 2010, 10:26:04 AM
#29
Having a collection of servers that act as transaction clearing houses for people would probably work but it seems to break the whole p2p idea of the system.

Why? E-Mail and Jabber work the same way. Everyone can run their own server, and many do, but most users prefer to use someone else's server(s).

Edit: Even more closely related: Kazaa and Gnutella work the same way, too. You connect to a supernode that then searches for files on your behalf.
newbie
Activity: 8
Merit: 0
July 14, 2010, 09:06:05 AM
#28
Having a collection of servers that act as transaction clearing houses for people would probably work but it seems to break the whole p2p idea of the system. And I think isn't necessary if you design the system right in the first place.

It depends on how it was implemented. I don't think having transaction clearing houses necessarily excludes p2p. It depends on how the network was implemented. Assuming things remained open, the transaction clearing houses could still be p2p. Anybody could join in and work to clear transactions. It's just that it wouldn't be required in order to send/receive transactions. It would actually be extremely beneficial if there were literally thousands of transaction clearing houses or if some regular users did participate in the full system to prevent the established clearing houses from conspiring together to cheat the system. That is one of the beauties of bitcoin IMO.

It seems like the best thing would be to lay the system on top of a DHT like kademlia. Maybe you can do this later I'm not sure. Again the documentation is lacking so it is hard to tell if you can easily break the chain apart in order to stick it in a DHT later. I was hoping the devs would stop by and answer maybe they are too busy improving the docs...

Although DHT is an interesting concept I don't know if it really solves the problem. Smartphones are a good use case:
  • You don't want to be acting as a peer on a p2p network with a smartphone. It hurts battery life and it could be costly in cellular data charges.
  • Smartphones don't have the processing power or storage capacity to either process blocks or store even parts of the block chain.

The future is not desktop PCs but is "thin" machines like smartphones, tablets and netbooks. These lightweight devices will vastly out-number PCs in the years to come. It isn't tenable to participate in p2p from a thin device, at least in the forseeable future. I think Gavin's ideas of a lightweight bitcoin client seem to address this issue.
newbie
Activity: 9
Merit: 0
July 14, 2010, 07:39:51 AM
#27
Quote
There's a great talk by the CTO of Facebook available on Youtube, and I think he gave the right advice on scaling:
Don't worry much about it until just before it becomes a problem.  Don't overengineer, because you're likely to waste time doing something that turns out to be irrelevant.

He is also talking about a website. The scalability issues with websites are well known and solved and can be easily tacked on as you get bigger. So yeah you don't need to worry about them when you start. bitcoin is a whole new beast.

Having a collection of servers that act as transaction clearing houses for people would probably work but it seems to break the whole p2p idea of the system. And I think isn't necessary if you design the system right in the first place.

It seems like the best thing would be to lay the system on top of a DHT like kademlia. Maybe you can do this later I'm not sure. Again the documentation is lacking so it is hard to tell if you can easily break the chain apart in order to stick it in a DHT later. I was hoping the devs would stop by and answer maybe they are too busy improving the docs...


newbie
Activity: 8
Merit: 0
July 14, 2010, 06:31:16 AM
#26
Making it easier for merchants to accept bitcoins, and users to pay using them, aught to be priority number 1.
Don't worry much about it until just before it becomes a problem.  Don't overengineer, because you're likely to waste time doing something that turns out to be irrelevant.

I agree with both points but they also seem to be somewhat mutually contradictory to me (this may be because of ignorance more than anything). Perhaps you can illuminate what steps you think need to be taken to "make it easier for merchants to accept bitcoins and users to pay using them". In my view, having a lightweight client, build on fairly open standards would facilitate making transactions easier. Ideally this lightweight client would/could be implemented in a number of languages/platforms.

Don't worry much about it until just before it becomes a problem.  Don't overengineer, because you're likely to waste time doing something that turns out to be irrelevant.

This is certainly good advice: "beware of premature optimization". I would like to point out though that optimization and system architecture are different beasts. Planning for scalability is a system architecture task. The whole "Don't overengineer" paradigm is more of an implementation & design principle and suggests that we should be agile in that we only implement what we need today. An agile perspective does not preclude thinking about and planning out the system architecture, at least testing assumptions mentally and ensuring that "it could scale" when the time comes for that ability to be added. I have been involved in a number of projects that failed not because the underlying technology was bad, but because scalability was never considered or tested up front. Everything worked perfectly until the system was put "to the (scalability) test". A lack of planning and foresight up-front was usually the cause.

This quote seems appropriate:
"We reject: kings, presidents and voting.
We believe in: rough consensus and running code."  -- David D. Clark

I like this quote. There is certainly something to be said for having something that works. I tend to struggle with being a bit of a purist; I have to work at pragmatism. Having said this, you can say: "we have great software. It has very few bugs and it hardly ever crashes" and that all sounds well and good until the day it becomes untrue. Scalability issues can hit you quickly and silently, especially in this day-in-age.

My preference would be, for a project like this, would be to continue to have "working software" but also establish a well defined road-map of where we hope the software is going. This road map needs to discuss scalability and how we envision a system with a million transactions a day would work and looks, not just today but 20 years from now. A currency needs to be resilient. For people to assign value to Bitcoin they need to perceive that it has value and that it is safe. This means they need to be able to trust that the infrastructure & design is (and will be) perpetually reliable. Unfortunately I don't Bitcoin, if it is to be successful, as the luxury of being just another hacked together open source project (I'm not implying that it is hacky...I'm implying that the prevailing mindset and practice in open source tends to be a "hack it together" mind set).
legendary
Activity: 1652
Merit: 2301
Chief Scientist
July 13, 2010, 11:22:49 PM
#25
Making it easier for merchants to accept bitcoins, and users to pay using them, aught to be priority number 1.

There's a great talk by the CTO of Facebook available on Youtube, and I think he gave the right advice on scaling:
Don't worry much about it until just before it becomes a problem.  Don't overengineer, because you're likely to waste time doing something that turns out to be irrelevant.

I think Satoshi has done an amazingly fantastic job; over the last two days of Bitcoin being "slashdotted" I haven't heard of ANY problems with Bitcoin transactions getting lost, or of the network crashing due to the load, or any problem at all with the core functionality.

Yes, it's annoying to have to wait for the block chain to download (especially with the Microsoft Security Essentials weirdness), and yes it would be nice if all the pieces of Bitcoin functionality were already nicely separated and ready to be rearranged and extended in all the ways we all want to rearrange and extend it.  But I've been poking at the Bitcoin code for over a month now, and the more I learn the more impressed I become at the thought that's gone into it.

This quote seems appropriate:
"We reject: kings, presidents and voting.
We believe in: rough consensus and running code."  -- David D. Clark
sr. member
Activity: 308
Merit: 258
July 13, 2010, 10:36:51 PM
#24
I think then now would be a good point to work out a separate "server" and "client" for the next release. Those want to run servers that sit on fast fiber connections and run 24/7 (like myself) can do this for the good of the service. Those that just want to send money from point A to point B can use the client which either function as a full blown node server (like it does now) or give the option to connect to "trusted" servers in the network and just have the server do the hard work and report back to the client when coins are transfered around properly.

Since the network can be participated by both dedicated server farms and Joe Blow with his laptop, you still maintain the open network and crypto security that you need, but also offer another solution for those less technical and wanting an easy click and send interface that they have now, website payments, etc.

I mean, I'm seeing stories about Bit Coin all over the web now, so the popularity is coming quickly and people are going to poke around the source code and program, then come here to make suggestions/complaints/worship/etc.

Might as well get a head start.  Grin

It's win/win because people can run thin clients, people can run servers, and those that don't trust either can run their own client/server/p2p application themself, but it all benefits BitCoin one way or another.  Wink
legendary
Activity: 1652
Merit: 2301
Chief Scientist
July 13, 2010, 09:20:45 PM
#23
And I expect most of us will be running lightweight clients that just keep our wallets, sign transactions, and send and receive transactions to the ultra-fast nodes that ARE looking at every transaction.

Is this possible? What would this look like? From a technical perspective what does a "lightweight client" look like for you? My understanding is that the Bitcoin client needs the entire block chain in order to establish trust.
I'm imagining:

A lightweight client would have a wallet with coins in it (public+private key pairs).

And a secure way of sending messages to, and getting messages from, any of the ultra-fast, always-connected heavyweight nodes.

The lightweight client sends money by:
  creating a transaction (signing coins with the private key)
  sending the signed transaction securely to the ultra-fast server, which puts it on the network.
  receiving confirmation that the transaction was valid and sent, and updating its wallet (marks coins as spent)
   (or getting a "you already spent those coins" error from the server)

The lightweight client receives money by:
  Either polling the server every once in a while, asking "Any payments to these BC addresses that I have in my wallet?"
   ... or asking the server to tell it whenever it sees a transaction to a list of BC addresses (or maybe when it sees
    a relevant transaction with N confirmations)
  When transactions occur, the lightweight client updates its wallet (adds the coins).

You don't have to trust the server; it never has your private keys.

Well, you do have to trust that the server doesn't lie about whether your transactions are valid or not, but why would the server lie about that?

newbie
Activity: 9
Merit: 0
July 13, 2010, 09:15:31 PM
#22
Quote
That's not bad.  Actual network bandwidth will be higher (the way the network is connected you get the same transaction multiple times from your peers).  You won't be running an always-connected-network node on your iPhone, but any low-cost server will give you twenty times that bandwidth per month.  And 18GB isn't much disk space in these days of terabyte hard drives.

Not bad? huh? That seems totally broken to me.
I'm less worried about storage space than the bandwidth and time it will take a new node to enter the network.
Like you said the blocks are duplicated so a given node must download some multiple of the transactions a day. That is a tremendous amount of downloading.
Also any new node must download 216GB for each year the network has been this large!

Doesn't the system also just completely break at some point when the rate of transactions is too high? I could be wrong since I'm not sure exactly how it is decided which transactions go into a particular block. Again the pdf is kind of lacking.

Also isn't there a problem when 2 computers both solve a block before they realize the other one has? This will become more and more likely as there are more nodes.

Quote
Eventually, if Bitcoin survives and gets as popular as credit cards for paying for stuff I expect somebody will create a compatible version with a more efficient network structure (maybe by that time there will be

But it seems like a lot of these things aren't just issues of network structure. They seem inherent in the cryptographic design so it wouldn't be that straight forward to replace. Plus why not address these issues now if only to instill faith that the system is well thought out rather than just wave hands and say "computers will be faster" or "we'll tack on some better networking later"


Again I think the general idea is great and I hope the developers have good answers for all these questions. I just want to understand it/make sure it has been thought through carefully enough. I sincerely hope that it actually can work. I'd love to never have to use paypal again.

jib
member
Activity: 92
Merit: 10
July 13, 2010, 08:57:48 PM
#21
I think a lightweight client would need to trust the fast node it talks to that sees every transaction.
newbie
Activity: 8
Merit: 0
July 13, 2010, 08:52:00 PM
#20
And I expect most of us will be running lightweight clients that just keep our wallets, sign transactions, and send and receive transactions to the ultra-fast nodes that ARE looking at every transaction.

Is this possible? What would this look like? From a technical perspective what does a "lightweight client" look like for you? My understanding is that the Bitcoin client needs the entire block chain in order to establish trust.

I am just thinking out loud here...

Although the peer-to-peer model is certainly novel perhaps it seems to me to be somewhat utopian. Bear with me for a minute here (I am not trying to troll). Consider banks. Banks have a system whereby they can work together efficiently. I take take money out of a ATM from bank X even though I bank with bank Y. Banks loan money to each other. They are generally cooperative. Instead of every Tom, Dick & Harry having a Bitcoin client on his/her PC (or smartphone) participating in an open P2P network, perhaps there is a collection of Bitcoin "banks" who provide the service of hosting and "peering" the Bitcoin block chain. These are large enough organizations that they can afford the bandwidth and hardware needed to maintain an infinitely long block chain with a million (or more) transactions a day. These banks would still be peer-2-peer, and hopefully also completely open. Ideally anybody could participate in the peer-2-peer network, its just that the average person won't because of the barrier to entry. These banks still operate using the same fundamental technology we have to day. All of the beautiful facets of Bitcoin are preserved, except that the number of active participants is somewhat reduced. Anybody that _wanted_ to participate still could.

The problem remaining would be the typical "last mile" problem. How does Tom (or Dick or Harry) perform transactions? Well the issue becomes much more straight forward at this point. Now the trust only has to be between two parties (the "bank" and Tom). This really becomes more of a proxy issue. Now Tom has to send a transaction request through his "bank". It might even be possible to bake into Bitcoin a protocol for proxy transactions.

Anyway...This is just my 2 cents. I would really like a tangible answer to this problem because it seems foundational to the success of this endeavor to me.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
July 13, 2010, 07:42:32 PM
#19
77428 transactions in 66663 blocks is about 46,752,464 bytes.
which works out to about 600 bytes per transaction (including block headers + database overheads)
That sounds about right.

So a million transactions a day would be 600 million bytes.  600 megabytes a day, 18 GB a month.

That's not bad.  Actual network bandwidth will be higher (the way the network is connected you get the same transaction multiple times from your peers).  You won't be running an always-connected-network node on your iPhone, but any low-cost server will give you twenty times that bandwidth per month.  And 18GB isn't much disk space in these days of terabyte hard drives.

A million transactions per day is a LOT!  For comparison, in 2006 there were about 60 million credit card transactions per day in the US.

Eventually, if Bitcoin survives and gets as popular as credit cards for paying for stuff I expect somebody will create a compatible version with a more efficient network structure (maybe by that time there will be some fancy IPV6 multicast protocol or something).  And they'll implement a couple of gateway nodes (running on really fast connections) that shuttle transaction and block traffic from the current Bitcoin network into the super-efficient network.  And I expect most of us will be running lightweight clients that just keep our wallets, sign transactions, and send and receive transactions to the ultra-fast nodes that ARE looking at every transaction.

You know, kind of like how we have those Big Routers in the Sky that handle Internet backbone traffic (or the ultra-fast DNS root servers).  The Internet didn't start out with astoundingly fast routers zinging packets around.
sr. member
Activity: 294
Merit: 252
Firstbits: 1duzy
July 13, 2010, 06:34:03 PM
#18
Given that the formula for coin generation should be known somewhere, can't someone just calculate how much disk space X amount of coins will take given XYZ transactions, etc.
I'm curious myself to how much space it will take.  Smiley

From the pdf:
"A block header with no transactions would be about 80 bytes."
and
"Once the latest transaction in a coin is buried under enough blocks, the spent transactions before
it can be discarded to save disk space."

so 80 x number of blocks + average transaction size * number of transactions.

Practically, from my disk:
77428 transactions in 66663 blocks is about 46,752,464 bytes.
which works out to about 600 bytes per transaction (including block headers + database overheads)



sr. member
Activity: 308
Merit: 258
July 13, 2010, 05:08:58 PM
#17
Well The economic discussion probably belongs in a different thread so I'll leave it at that. Oh I went to make a new thread but this guy has made my point better: https://bitcointalksearch.org/topic/the-current-bitcoin-economic-model-doesnt-work-57

knightmb: the number of coins per block is set to go down as time goes on so the number ends up being quite a bit larger than that. Also you have to include the transactions. There have been way less transactions during these first 67k blocks than there will be if millions of people start using the system.

Can someone that works on the code please answer this question of how scaling will be dealt with? The most important thing right now seems to be making a good case for why this system will work to get sellers to adopt it. The pdf is too light on details.
Thanks for pointing that out, I wasn't sure how that would scale over time, was just making some guess. Given that the formula for coin generation should be known somewhere, can't someone just calculate how much disk space X amount of coins will take given XYZ transactions, etc.

I'm curious myself to how much space it will take.  Smiley
newbie
Activity: 8
Merit: 0
July 13, 2010, 04:45:39 PM
#16
Can someone that works on the code please answer this question of how scaling will be dealt with? The most important thing right now seems to be making a good case for why this system will work to get sellers to adopt it. The pdf is too light on details.

I will second this. I am investigating whether this is a project I want to invest time and energy into (I am a professional C++ developer) as I see the potential for a revolutionary technology. However if the solution doesn't scale to millions and millions of transactions per-day (and a very large number of blocks) I fear this solution is destined to become more of an interesting research project rather than something that will have longevity and practical usefulness.
newbie
Activity: 9
Merit: 0
July 13, 2010, 04:37:33 PM
#15
Well The economic discussion probably belongs in a different thread so I'll leave it at that. Oh I went to make a new thread but this guy has made my point better: https://bitcointalksearch.org/topic/the-current-bitcoin-economic-model-doesnt-work-57

knightmb: the number of coins per block is set to go down as time goes on so the number ends up being quite a bit larger than that. Also you have to include the transactions. There have been way less transactions during these first 67k blocks than there will be if millions of people start using the system.

Can someone that works on the code please answer this question of how scaling will be dealt with? The most important thing right now seems to be making a good case for why this system will work to get sellers to adopt it. The pdf is too light on details.
sr. member
Activity: 308
Merit: 258
July 13, 2010, 04:17:23 PM
#14
1) Well even if you are right and the system can forget about old transactions, it still is broadcasting all current transactions to all nodes which doesn't scale. And nodes will need to keep collecting blocks forever which also doesn't scale.
That is a good point, one I didn't think about.  So, let me think out loud here. There are a possible 21 million coins. Every time a block is generated by someone, they earn 50 coins. Right now, I see 66,618 blocks have been generated since the beginning. So that's 66618 x 50 = 3,330,900 coins so far. To reach 21 million, we need to reach 21,000,000 / 50 = 420,000 blocks. 66,618 blocks take up about 56 megabytes of hard disk space. So, perhaps 420,000 blocks (if every single coin is created) would take up about 420000 x 56 / 66618 = 353 megabytes of hard disk space.

The rest would be transaction history to make sure the owners are valid and older transactions are pruned after a while, so perhaps at full scale, this application could eat up as much as 1GB of hard disk space. So, someone correct me if I'm wrong, but even at full scale, the clients would need about 1GB of hard disk space to contain a fully generated coin network?

Quote
2) Yes I know it is p2p that is why you have to worry about how the network stays connected and not just assume everyone will be connected. There are issues like islanding that you have to worry about if you remove a central point like the irc channel is now. This issue is more minor because this problem has been solved before and you don't have to change the way the currency system works to fix it later. I only mention it because I think the solution to 1 will also help here.
From what I read in the release notes, the IRC is just a bootstrap, the new version can work around IRC failure as it has an alternative (but slower) ways to sync up the first time users to the network.

Quote
3) I know the number is really 21million*10^8 or whatever. But that is still fixed and the size of the bitcoin economy (hopefully) isn't fixed. The idea is that it will grow right? So that means that the value of bitcoins will have to change over time which isn't ideal. A currency that has 0 inflation/deflation is the most ideal right?
Well, imagine if you will, the US and our national gross. It's somewhere in the multi-trillions last I heard. So, if everything had to be converted to dollars, that would be a trillion dollars in circulation (ignore how a complex system like a countries currency, this is way over simplifying).  No imagine all of that was to be transfered into Bit Coins? Well, there are only 21 million Bit Coins, so a 1 to 1 conversion is out of the question. Basically it would have to be scaled back to the decimal points (probably 4 places) to fit all of that in. That still leaves 4 more decimal places in which any economy working in the Quadrillion range is probably out of scope of any country in the world (or all countries combined really)

So, if you don't think of a 1 to 1 conversion for Bit Coins, because even I want to think of Bit Coins as dollars for example. But it isn't. It is it's own currency within itself whose value is only dependent on the people that use it and what value they give it. It's like that for any currency really, the only difference is, instead of the bank or government in XYZ country being the one who controls how it's created and distributed, WE *all* control how it's created and distributed.

We are *minting* the coin (through CPU cycles to generate the encryption hashes) and at the same time using it for trade and value. The only difference is, this isn't a USA currency or a Swedish currency, it's all completely electronic. The bank, the teller, the minting; is all of us at the same time. Basically, all of our clients have agreed upon certain rules to follow and as long as each client follows those rules, it can participate. Any client that doesn't (through hacking, cheating, etc.) is basically ignored by the rest. It's like playing a game of soccer where you have two teams competing and one guy just up and grabs the ball, runs down to the other side and throws the ball in. Dances up and down that he scored a point. Well, everyone else will just ignore him and his point, he wasn't playing by the set rules.  Grin
member
Activity: 70
Merit: 11
July 13, 2010, 04:16:37 PM
#13
I don't know that it's valid to say there is a fixed supply of bitcoins, because as has been discussed elsewhere in the forums, lost coins (lost/stolen wallets, hoarded coins on never-to-connect-again machines, etc) will not be recoverable in any way. So there's a cap on the number of coins that can be created over the lifetime of the currency, but the amount of bitcoins in circulation will not be fixed, as there will inevitably be lost coins as time goes on.

Now the divisibility of the coins is, as I understand it, what helps to insulate the currency against crazy deflation... but the economic discussions usually elude me, so I'm not 100% positive on that.

You have a point here; it would probably be good if there was a mechanism to regenerate lost coins, but I'm not sure how that could be implemented.

As Bitcoins become more valuable, people will increasingly take precautions. Therefore, the loss should decrease as time goes on. Losing 5000 BTCs worth $5 isn't such a big deal; losing 5000 BTCs worth $10,000 is!
newbie
Activity: 20
Merit: 0
July 13, 2010, 04:14:35 PM
#12
I don't know that it's valid to say there is a fixed supply of bitcoins, because as has been discussed elsewhere in the forums, lost coins (lost/stolen wallets, hoarded coins on never-to-connect-again machines, etc) will not be recoverable in any way. So there's a cap on the number of coins that can be created over the lifetime of the currency, but the amount of bitcoins in circulation will not be fixed, as there will inevitably be lost coins as time goes on.

Now the divisibility of the coins is, as I understand it, what helps to insulate the currency against crazy deflation... but the economic discussions usually elude me, so I'm not 100% positive on that.
Pages:
Jump to: