Hive Scaling vs Bitcoin

in LeoFinance3 years ago (edited)

scalescalingupfishbowl.jpeg

Everyone touts Hive as a fast and feeless network that can outscale the vast majority of other projects, but is this actually true? If so, to what extent is this true?

I decided to do some basic math to figure it out.

First, lets take the network that scales the least: Bitcoin.

What is the maximum size Bitcoin block?

t1.png

Technically, the maximum Bitcoin block size is supposed to get capped at 1MB, but if we check a block explorer what do we find?

https://www.blockchain.com/explorer

t1.png

All Bitcoin blocks are actually above this limit and go as high as 2MB. I assume this is due to a technology called SegWit (segregated witness).

SegWit is the process by which the block size limit on a blockchain is increased by removing signature data from bitcoin transactions. When certain parts of a transaction are removed, this frees up space or capacity to add more transactions to the chain.

So actually that's... not what's making them bigger than 1MB.
What could it be what could it be.

Today's Bitcoin uses a piece of code called Segregated Witness (SegWit) to separate signatures from transaction data, effectively allowing the network to “cheat” by creating larger blocks than 1 MB, yet still counting them as being below the cap.

Alright whatever I guess it's just SegWit...

ANYWAY...

scalescaling.png

What's the max blocksize on Hive?

Currently 65KB per block. That's a lot smaller than a Bitcoin block, but obviously this isn't a big deal because we have one block every three seconds while Bitcoin has an average time of 10 minutes. On average, for every one Bitcoin block there will be 200 Hive blocks.

200 x 65000 = 13,000,000 (ignoring that 1KB = 1024 bytes)

This was very surprising to me.

If Hive's blocks were filled to the brim we'd only be storing ten times more information than Bitcoin. That isn't a lot. Considering how much space blogs are taking up and games and everything else it's very obvious that if Hive was ever as popular as Bitcoin is today we'd have to make some serious changes and sacrifices to keep up with demand.

learnblocklinksignaturechainblockchain.png

Why not just raise the blocksize?

This is something that Hive can do much much much easier than Bitcoin. It's a lot easier to get consensus with 20 witnesses than it is to get consensus for the entire network. The problem with increasing blocksize is that it makes nodes more expensive to run. More expensive nodes means that anyone outside the top 20 witnesses might drop out due to prohibitive overhead costs (RAM, bandwidth, etc). Bottom line: increasing blocksize greatly centralizes the network and makes it harder for new players to join the party.

This is why there has been so much controversy over raising Bitcoin's blocksize. This is the exact argument that created Bitcoin Cash and many other Bitcoin forks. The main chain wants to stay as decentralized and cheap (to run a node) as possible. They are holding out hope for other scaling solutions that won't add burdensome overhead costs to the node-runners.

hiveio.png

It's also EXTREMELY premature to be discussing increasing the blocksize limit because we've yet to stress test our current blocksize. We have no idea how expensive or unstable the network will become when we start hitting that 65KB barrier. According to the math it will cost at least x10 more money to run a Hive node than a BTC node at that time, and that's not even factoring in all the unique indexes we have to keep track of in the database due to blog posts and everything else.

This is why @blocktrades and friends spend so so much time on optimization. If we don't solve these problems now, by the time we actually get adoption, we won't actually be able to accommodate the users. This is exactly what happened in 2017, and we are scrambling to avoid a repeat of that scenario.

Hive has other advantages.

The DPoS consensus algorithm has a lot of hidden technical advantages behind the scenes when compared to its POW and POS counterparts. The biggest advantage that very few people seem to take into consideration is that we know exactly which node is going to produce the next block. This known fact shaves an entire layer of complexity off the top of our consensus layer.

t1.png

https://hive.arcange.eu/schedule/

@arcange created this neat little tool to show us this advantage in real-time. On other networks, every node needs to broadcast unconfirmed transactions to every other node. All nodes need to know which accounts want to perform which actions BEFORE they are actually added to a block. That's because any of these nodes could be the next block producer, and they all need to know what's going on with the network.

With Hive this is largely unnecessary.

When any of us need to broadcast a transaction, we can connect to any node in the network. That node that we connect to knows exactly where to send our information. They don't need to broadcast it to the entire network; only the witness who we know is next is line to post the next block. This is a nice advantage to have.

In addition to this advantage, after the block is created, what happens next? The witness node that created the block needs to broadcast it to the network, but who should they prioritize? Obviously, the witness node in line to create the next block is the #1 priority, as that witness can not create the next block without having the information contained in the current block.

automation.jpg

This streamlined assembly line of block production is a huge advantage over networks like Bitcoin and friends. We know exactly when and where information needs to be, and this will allow us to scale up with a lot less problems if and when we do decide to increase the blocksize.

3-second blocks

Of course I would be remiss if I didn't mention how this structure of block-production also makes it possible to have lightning-fast block-times. Having to wait ten minutes for a Bitcoin block (sometimes as long as one hour) is not acceptable for a lot of people.

On Hive it only takes 3-seconds, and for blocks to become completely immutable only takes 1 minute, whereas most exchanges require 3 Bitcoin block confirmations which could take hours on the unlucky side. It only takes 1 minute to get Hive onto a centralized exchange to be ready for trading. Not to mention it only costs 0.01 Hive (< 1 cent) to move Hive off an exchange... whereas it can cost up to 0.0005 Bitcoin ($30) to do the same.

bitcoincultilluminati.jpg

You get what you pay for?

Some would say Hive sacrifices a lot of security in order to get this higher level of scaling. I tend to disagree. We've yet to see the system fail, and we've yet to see anyone's money get "stolen" except for the one bad-actor that was trying to do the network harm. Considering how difficult even that was to accomplish I must assume that Hive security is a "good-enough" solution just like Bitcoin is. None of these systems will be perfect, and they don't need to be. We all have our niche to fill.

Resource Credits

A big piece of Hive scaling is the RC system, which is due for a big upgrade soon™. Many do not realize this, but Hive is basically the original DeFi network. Not only can our HivePower create more Hive, but our HivePower also creates more Resource Credits, and this all happens automatically for free.

Because RCs currently have a value rounded down to zero, many discount this resource as a nothing-asset. LOL... yeah... just wait. RCs are going to be the most important asset on the entire network once blocks fill up. It would be silly to assume that this wouldn't happen, as we are running this entire operation on 22KB per second. I repeat: we are running this entire network on 56k modem speeds and no one yet realizes that bandwidth is going to be an issue. Why? Because it never has been before. Have some vision. 22KB per second is not a difficult target to hit.

This is a great Ted Talk about trying to fix traffic jams. A freeway doesn't get clogged until it has just a tiny bit too many cars on the road. Removing 10%-20% of the cars on the road from a deadlocked traffic jam will completely clear all traffic. Think about that for a moment.

Because Hive is exactly the same way. Bandwidth is like air: you don't give it a second thought until you run out. Hive is 100% guaranteed to run out of bandwidth sooner or later, and that's when things start getting interesting.

As of now, no one gives a second thought to posting a comment or playing a game on hive. These are things we can do for free because there is zero competition for resources. Once blocks fill up the entire game changes. Users have to pick and choose what they will and will not put on chain. Bots that play Splinterlands will drop off the face of the Earth. RCs will go from zero value to some value, which will completely change the game.

And at that point it will be very hard to make the argument that Hive has free transactions. We don't. No network does. You can't run an inefficient node network for zero cost no matter how many whitepapers you write.

Of course we gain the supreme advantage of separating our monetary resource from our bandwidth resource. Those who hold vast quantities of Hive will have a replenishing resource pool that just keeps farming valuable bandwidth. Those who want access will either have to pay for it or provide value to the network with their actions.

farm.jpg

So say you're playing a new farming game on Hive and you need access to bandwidth. No problem, the dapp creator of the farm game has an RC pool up and running and he'll give you access to it should you need access. However, if you want access to said RC pool to play the game you had better fork over some of your in-game wheat to pay for it. Maybe you only have to sell 10% of your wheat to pay the overhead cost of farming it on Hive. Pretty good deal, amirite?

This is how it's going to work.

RCs will be used to create resources/tokens that are worth more than the RCs used to create them. Those who don't have their own RCs can simply pay a tax from the other tokens they've created to gain access to an RC pool. The RC pool owner will use that tax to buy even more Hive, so that they have access to even more RCs. The direction we are moving in is bursting with abundance.

Checkpoints.

It becomes clear that eventually much of what goes on inside the Hive ecosystem will have to be outsourced to 2nd-layer protocol. We can even create checkpoints and nodes that don't store all the information that a full node would. Rather than having to store the last 5 years of information a lite-node could instead store the last year of information and import a snapshot to represent the 4 years of activity before that. These nodes won't be storing blog posts older than a year, but everyone's account will have the correct number of coins in the right place. Something to think about, as this is the only way to make blockchain sustainable over time.

Conclusion

All I can say is: holy god make sure you have enough Hive to yield farm these resource credits once they are actually worth something. Looking at the new 3speak airdrop and considering my own proof-of-burn architecture, once this snowball starts rolling it's not going to slow down for quite a while. Those who do not grandfather themselves into this network now are going to very much regret it down the road as they're being forced to pay for bandwidth on a network in which they thought transactions were free.

With the way we talk about Hive, I'd of thought our scaling was x100 or even x1000 times better than Bitcoin. Simple fact of the matter is this is not true. Not even close. x10 max at the moment. However, we have a lot of room to grow and a lot of our mechanics will allow us to breach certain scaling barriers over time that Bitcoin and friends will have a very hard time with. The future is coming. Will we be ready for it?

Posted Using LeoFinance Beta

Sort:  

Sorry for being a bit dense but are you saying that, in the future, as Hive gets busier I will need more RCs than I do now to do the same stuff I do now?

Posted Using LeoFinance Beta

That is an extremely likely scenario.

When the RC system came into place we had to artificially give everyone x10 the number of RCs just so people could continue using the system. There's a very high chance that once blocks fill up that x10 bonus is going to go away and everything will cost x10 more RCs... maybe more. It all depends on supply/demand to use the system.

The problem actually gets exponentially worse once RC pools come into effect and RCs are worth real money instead of rounded to zero value. Then all the whales on Hive will pop out of nowhere and start selling their bandwidth... which will exponentially drive up the prices of RCs once again.

Oh err. 😱

!ENGAGE 20

Posted Using LeoFinance Beta

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

RC prices scale due to usage, you can check out the prices here: https://beempy.com/resource_costs.

Right now its insanely cheap to do most things. But as more and more people interact with the chain, the cost of doing certain actions will go up as more and more of that action is done(if people are doing a lot of custom_json actions, the cost of that goes up).

Now a good thing is that we are getting RC pools and RC delegations in the future to help with this. Still beats paying liquid for transactions though.

Still beats paying liquid for transactions though.

It certainly seems so.

the cost of doing certain actions will go up as more and more of that action is done

I had never considered this before now the transactions on Hive are free narrative gets pushed so much.

!ENGAGE 20

Posted Using LeoFinance Beta

Yea, the recharging part is what makes it truly free. If RC didn't recharge it'd be like any other chain.

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

As someone with over 500 HP you're probably in the clear, but you never know.
Good news is that if this happens Hive token price will go at least x100.

Wouldn't this make it harder and harder to onboard new people to the platform and kind of put hive into the same issue Ethereum is facing today with High fees? Like a paid entry fee to use the blockchain.

Posted Using LeoFinance Beta

Not really because we'd just centralize the chain more to accommodate the extra volume till we could figure out a better solution later. Hive network can move much faster in this water than Ethereum can. ETH is already a slow lumbering beast, DPOS is a completely different animal.

I'd better keep my HP then. 😁

Posted Using LeoFinance Beta

 3 years ago  Reveal Comment

Slight problem . . . I don't have a car! 😂

Posted Using LeoFinance Beta

 3 years ago  Reveal Comment

😂

!ENGAGE 10

Posted Using LeoFinance Beta

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

Speaking of witness nodes, would there ever be a possibility of expanding the current 20 to 40? Or even 100? Would that help in any way with scaling or security? I'm pretty clueless on how this technical stuff all works. I'm learning slowly (mostly through posts like yours) but it's still hard to grasp.

Posted Using LeoFinance Beta

My goal is to use sliding-scale voting so we can boost these variables up/down slowly over time.

Adding more witnesses dilutes the block rewards and makes it harder for them to maintain their services. This is especially true given the volatile nature of crypto. We want our top witnesses to be well funded. At the end of the day it may work out that it becomes impossible for a single person to be a witness and all the top pain block producers will be businesses that build on Hive and bring the most value in.

I think its gonna be a massive thing in regard to games based on hive blockchain. Let's say a player became out of RC and not able to perform any action in that game without RC. So, that player have to use the RC pool that provided by the creators of the game. In addition, the player may be asked to pay a certain amount of hive in order to get some RC to continue playing. if that player doesn't wanna pay, he/she gotta wait a certain time for his/her RC to fill again/regenerate.

Here, the RC becomes valuable which means it can raise the price of hive in the near future depending on the demand.

The main rule is that the more HP you have, the more RC you get.

thanks for sharing.

Thanks for putting this together I found it really interesting, and was shocked when you mentioned that Hive can only handle 10X bitcoin, so we really need to work on ways of scaling more if Hive becomes the success we all hope!

With Hive it becomes a lot easier to increase the blocksize and centralize the chain if necessary to absorb as much value as possible. Gaining immense value would then give us the resources to focus on scaling and decentralizing even more. Hive is a very reactive network.

I see no problem for bigger blocks. And longterm Blocks will become bigger. The tech also increase. 10MB are not the same 10MB 10 years ago ( from % viewpoint).

I think hive has the ability to adapt. So everything can come if needed and wanted.

Infrastructure is also 100x cheaper than at the start. So for that point on the technical level, there is much space to adapt.

Posted Using LeoFinance Beta

With all due respect: you see no problem for bigger blocks because you personally get all of the benefit with none of the downside. Your opinion on the matter would change immediately if you were running a node that just got 10x more expensive to run.

Agree. But at the moment it cost around 60$ ( not sure its full node).

If more use ( demand) price should increase. If we see a problem it becomes to centralize we can reward not only top 20 high ( because they can pay anyway).

like split rewards more or increase the rewards by some %.

It's not impossible. @pharesim write some time ago, a node cost him years back around 1000$ a month. today he pays under 100$.

So it's super cheap compared to any other chain.

even if blocksize increase by a factor 20, would not increase the cost by factor 20. Would be lower. And disc space is cheap.

Sure if we came to a point we would need 1000x more space, sidechains are the solution or witnesses becomes datacenters. I agree 100% with you at this point. Because at this point it will become centralized ( but only on today's tech).

We don't know what the future brings and 10 years or even 5 years, the tech can become again 10x (or higher if we look back all around 400 days factor 1.7-2 from the past).

So I don't worry that much. Also, work can be done like in the past and make the system cheaper. I would really love to hear @blocktrades about this topic, because I'm sure he knows more about it as we both :)

Edit: and bigger Blocks make hive more valuable? It should be like a solar panel that generates x of MWH and not generates more. So the value should increase? Depending on demand? So the system should be able to fix itself if demand is high enough.

Posted Using LeoFinance Beta

I'm reasonably sure we could increase blocksize by 20x or more (and the resulting traffic) without much stress on the hived nodes. BitShares creates blocks up to at least 1MB, IIRC, and even that was a somewhat arbitrary limit we set.

The more likely stress point right now would be hivemind, but I'm sure further optimizations could be made there to alleviate any such issue.

But you're right, for now there's no strong reason for witnesses to vote to increase the block size yet, I think. It's done by median of witness consensus voting, so we can rapidly change it if it that seems like a good thing to do at some point due to traffic increases.

thanks for answer :)

That's good to hear from you! :) Long-term IMO hive will have no scaling issues, adopt if needed is the best and most cost-efficient thing we can have.

There are many variables to consider.

It's an interesting push-pull between the spectrum of decentralization.

Great post!

RCs will be used to create resources/tokens that are worth more than the RCs used to create them. Those who don't have their own RCs can simply pay a tax from the other tokens they've created to gain access to an RC pool. The RC pool owner will use that tax to buy even more Hive, so that they have access to even more RCs. The direction we are moving in is bursting with abundance.

This sounds good on paper, in fact amazing, but it better be more simple than that when actually using it.

Yep I made a tweet once that one of the things that makes hive unique is its ability to accommodate changes and adapt to the needs of the entire industry and community...

Posted Using LeoFinance Beta

I've always been curious of this because when things start to ramp up around here it feels like the sites get sluggish and the blockchain slows down such as voting, commenting and posting or it errors out like crazy. I wasn't sure if that was a site issue or a blockchain issue.

This is an interesting analysis of the situation, well focused on correct aspects and included also a good example (the traffic jams talk). I agree on almost all the points raised, gaming will most likely bring the biggest chunk of volume.

Posted Using LeoFinance Beta

In addition to this advantage, after the block is created, what happens next? The witness node that created the block needs to broadcast it to the network, but who should they prioritize? Obviously, the witness node in line to create the next block is the #1 priority, as that witness can not create the next block without having the information contained in the current block.

Stupid question: Does that suggest a possible vector for attack, being able to know which witness is next in line to produce a block?

it can cost up to 0.005 Bitcoin ($30) to do the same.

Gotta shift a decimal point somewhere there. Bitcoin is at $6,000 by that math.

Posted Using LeoFinance Beta

Stupid question: Does that suggest a possible vector for attack, being able to know which witness is next in line to produce a block?

Probably... but when a witness misses a block it's not a big deal and we just move to the next witness.

It's easier to attack 20 witness nodes compared to thousands of Bitcoin nodes.
But again this is a good enough solution... and even if all 20 of our witnesses got punked we'd just elect 20 new ones temporarily.

The question is: if hive becomes clogged, people will stop using it?

Hive's easier to unclog than the rest. We can up our block size as witnesses. But it comes with a cost for witnesses too(larger servers are going to be needed and that can cost a lot of $$$) so its a tradeoff to make.

So the theory is, the more users the higher the hive price, the larger servers witness can afford?

Bots that play Splinterlands will drop off the face of the Earth.

I hope that the blockchain god will hear you.

Then who would you play when nobody else is online?

Posted Using LeoFinance Beta

That shouldn't be a problem in the context we're talking about, only would happen with mass adoption and a lot of traffic in Hive. Then possibly the game would have enough players to match whenever you need, or they could simply leave the game open like in the tournaments or brawls until the rival submit their teams.

I think it will definitely happen once the bandwidth is used up. A few weeks ago, WAX got super popular from the new additions and bridges to exchanges and they started increasing the cost of CPU (similar to RCs in HIVE). I ended up staking 15 times what I originally had in order to get the same amount of CPU allocated to me before the changes. So yes I do predict a huge increase in price once it does happen.

Posted Using LeoFinance Beta

What a fascinating and insightful read @edicted. You are so right that we just take forgranted how good we currently have it on the network at the moment.

It really is a catch 22 we could find ourselves in. With more adoption, performance and bandwidth could become an issue. The question then is, would people stick around and pay the fees or would they leave to find a cheaper, more efficient alternative.

I am so thankful for the brains behind the scenes of this platform. I wish I could contribute more to help solve some of these potential issues.

Posted Using LeoFinance Beta

Congratulations @edicted! You received a personal badge!

You powered-up at least 10 HIVE on Hive Power Up Day!
Wait until the end of Power Up Day to find out the size of your Power-Bee.
May the Hive Power be with you!

You can view your badges on your board and compare yourself to others in the Ranking

Check out the last post from @hivebuzz:

Hive Power Up Day - May 1st 2021 - Hive Power Delegation
Support the HiveBuzz project. Vote for our proposal!

Congratulations @edicted! You received a personal badge!

You powered-up at least 500 HP on Hive Power Up Day! This entitles you to a level 4 badge
Participate in the next Power Up Day and try to power-up more HIVE to get a bigger Power-Bee.
May the Hive Power be with you!

You can view your badges on your board and compare yourself to others in the Ranking

Check out the last post from @hivebuzz:

Hive Power Up Day - May 1st 2021 - Hive Power Delegation
Support the HiveBuzz project. Vote for our proposal!


Your post was promoted by @dagger212

Well said & insightful. I really appreciate this. I love seeing people with vision who are able to extrapolate current situations & resources into their likely futures.

Even better when they conclude with acknowledgement of 'room ot grow' and currently unforeseen methods to 'breach scaling barriers.'

Although I'm new to Hive and may not have a clear understanding of all you wrote, point by point, overall I got a lot out of this and it'll be interesting to see how these issues of scale are navigated going forward.

Thanks for a great read.

I've read just a bit about RCs as this funny thing that wasn't worth much. I love how you're giving just enough information to peak my curiosity to learn more. It's a super exciting time to be involved!

Posted Using LeoFinance Beta

Should we first tackle scaling issues or marketing issues?

Posted Using LeoFinance Beta

Wow, great insights here! Not sure if I like or dislike the idea of RCs becoming scarce, though. Good in one sense for holders, but Hive not really having "free" transactions while somebody else potentially figures out how to, doesn't seem good either.

Posted Using LeoFinance Beta

I am going to eat !PIZZA
You Blow My Mind GIFdownsized.gif

Posted Using LeoFinance Beta

Connect

Trade


@edicted! I sent you a slice of $PIZZA on behalf of @stickupboys.

Learn more about $PIZZA Token at hive.pizza

Thanks for putting this together I found it really interesting.

Posted Using LeoFinance Beta

In those sort of uptake scenarios a IMO lot of the blogging records will go to the 2nd layer. And the main thing the first layer will be used for is governance and immutable account verification (ie verifying the person posting and their followers) . This already happens; we currently don't post images or videos to the blockchain they are stored by 2nd layer third parties . As congestion goes up long form text will be next. A hybrid would be just to have the first 60 words get allocated etc.