Rollups vs sharding, are rollups sharding?

This is in response to https://www.reddit.com/r/tezos/comments/saihye/comment/htu0dcw/?utm_source=share&utm_medium=web2x&context=3

@daniel_lee_tech writes

Personally I am not a fan of rollups.

It is sort of the opposite of the Blockchain ethos ( a single source of verfiable truth open to everyone).

However zk rollups kind of fixes that problem because you can run a computation off chain but prove that you did the computation honestly and post that proof on the main chain.

However with EVM apps, you have this problem where if you want to interact with a Dapp, that Dapp has to exist on the network you are currently on.

Ie. Dapps on optimisim can only work for you if you have an account on optimisim. Dapps on Loopring only work if you have an account on Loopring.

This creates a fractured eco system where you always have to keep bridging to different networks to avoid fees and network congestion.

Vitalik also acknowledge this user experience pain point on his latest appearance on the bankless podcast.

Also the EVM cannot run in parallel unless you fundamentally change how it works so by itā€™s very nature it will congest any layer 2. ( Tezos blockchain is not that much different either).

This also applies to the avax c chain. Itā€™s actually a pretty simple calculation to make also, all you need to is get the gas limit of a block, get the gas needed for a simple transaction and divide.

So for avax c chain with 10 million gas per block, 21000 gas per transfer, 10 second blocktime, it averages out to roughly 50 TPS, if we are only doing simple transactions.

That being said I know the founder of tezos is in support of rollups.

To me, it seems like if you support layer 2s, that means you just support sharding with extra steps. Why not just shard your Blockchain in the first place?

Also for me personally, I donā€™t see the average person switching networks so they can just transact with each other.

Layer 2s are not very user friendly. I think the ultimate goal for a Blockchain is to shard their eco system for scalibilty but hide and abstract away the sharding from developers and users.

The users should be able to transact on the Blockchain as if it is one chain but under the hood itā€™s shared.

My answer is below:

In terms of ethos, I wouldnā€™t use Optimism as your reference point, Arbitrum is a much better design.

Generally speaking, all arguments for monolithic execution are better arguments for heavy-duty rollups, even if it means a single rollup for one chain (similar to Flow). To me, this is the killer argument in favor of rollups. You keep the nodes maintaining consensus lightweight, where an honest majority matters and decentralization is paramount, and you push heavy-duty execution in an environment where you require a single honest party instead of a majority.

The one caveat to this is parallelization of execution, for example with multiple cores. While itā€™s possible to do that within rollups, it requires more work ā€” you have to treat the execution trace as a graph instead of a sequence. So does this mean we should eschew rollups to focus primarily on parallelized execution at L1? Not really:

To begin with, aside from some low-hanging fruits in terms of parallelism (signature verification for example), which can be special-cased in rollups, itā€™s quite hard to get a gas model that works for parallelized execution. Optimistically running code in parallel and rerunning conflicts is a common strategy, but you cannot predict the gas cost for it. Itā€™s not enough for a parallelization scheme to be fast, we have to be able to predict how slow itā€™s going to be in the worse case to set gas limits. Mechanisms that do work end up resembling L2: you divvy up part of your ledger in zones and allow parallelized execution when transactions commit to staying within the zone. You may also have to keep the state on separate disks, as IO costs quickly start dominating. The benefit of that approach over rollups (which also create separate state trees and execution) is that composability is still relatively easy, though it can require a higher gas cost to be executed with a lock on multiple zones. If you look at the execution graph of such a model, itā€™s pretty straightforward: a set of parallel execution traces join at one point, followed by a single execution thread for cross interactions. Unlike arbitrary parallelism, this type of model (which minimizes joins) is not terribly hard to special-case within a rollup.

Moreover: computation / IO quickly stops being the bottleneck and bandwidth takes over. Rollups, as envisioned, compose with sharded data availability whereas most sharded execution proposals do not.

So, as to your question, why not just shard your blockchain? Well this is sharding, with fewer steps. Rollups + data-availability sharding are substantially less complicated than most sharding proposals. Some sharding proposals are less complicated, but they do not typically scale data-availability.

13 Likes

Thanks for the response.

When I meant ā€œsharding with extra stepsā€

I was speaking through the perspective of the user.

My intuition is that a Blockchain that supports sharding natively on the protocol would be able to abstract it away from users and developers, in theory.

The current experience with rollups arenā€™t a nice experience with the bridging and handling of multiple accounts and networks. Also using a rollup based asset as gas and not the main asset is also troublesome to me.

Also my intuition with this approach is that these rollups become large silos of network activity, largely independent of the main chain, where you only pull your assets on the main chain when you intend to sell some assets since your exchange doesnā€™t support the rollup based asset.

Because of this siloed property, the security of the asset in the main chain boils down to your most insecure layer 2.

Iā€™m also skeptical behind the incentives and game theory running a layer 2, at what point in TVL is the layer 2 incentivized to ā€œovertakeā€ the layer 1? What would the dynamics be when a layer 2 is more popular then the layer 1 and people never leave the layer 2?

Itā€™s not obvious to me that a layer 1 that isnā€™t the main hub of activity, (not just a settlement layer for third party layer 2 proofs) would have any merit to continue its existence. However this is just speculation on my part.

Of course, this is more a paranoia based point and might not be all realistic in practice.

I also believe that in a non sharded Blockchain, thereā€™s an upper limit of how many layer 2s a Blockchain could support, since the limited gas per block. This essentially clogs up the main chain just to process layer 2s after a certain threshold of high activity.

So it is a possibility where a Blockchain still has high fees and the poor UI/UX of a rollup based Blockchain.

In my opinion, a cryptocurrency no longer becomes a cryptocurrency when you canā€™t transact on it cheaply without jumping through hoops, (bridging your assets to whatever layer 2 the payee wants to accept).

Also itā€™s not obvious to me that every layer 2 wrapped native asset will be accepted by all, in the far future where crypto becomes more of a medium of exchange.

I also want to point out that ETH 2.0 actually was juggling the idea of sharding their Blockchain but still run computation on layer 2s. Only sharding state.

This implies to me that after a certain threshold of high activity that sharding is needed, whether or not you use layer 2s.

That being said, I understand the technical merits of a layer 2, especially zero knowledge. I donā€™t doubt the technology at all but Iā€™m afraid that rollups and layer 2s are hyper-optimizing for the current use case and demographic (a handful of early adopters and enthusiasts) that are willing to bridge and put up with whatever UI/UX pain points.

Obviously my crux of my argument would be destroyed if a rollup(s) based implementation was incredibly user friendly and cheap for all users in any part of the stack (layer 1 and layer 2).

1 Like

Recently, it was found that ORU are not necessarily user friend:

Also, this thread is quite educational on why there should be independent monitoring for rollups

Iā€™m still quite interested and lean more towards an avalanche subnet style for web3 enthusiasts. ORU work better for isolated activities, but avalanche subnets seem enable fricitonless activity between chains, whilst scaling. One thing to note, avax does not really publish how subnets work

1 Like

good points.

I also saw that EricaDAO thread on twitter.

I also think these examples are great supporting points for my arguments,

specifically these one that I mentioned:

and

1 Like

Thatā€™s absolutely not the case. If you own an asset on the main chain you are only exposed to the security of the rollups that you, as a user, choose to use. I recommend you read the literature on rollups, starting with the excellent documentation from Arbitrum.

Avalanche subnets do not let you scale, they are just different ledgers with possibly overlapping validators, but the security is not shared. It misses the important property that each node should add to the security of the entire network.

2 Likes

Yes, but in reality (vs theory) what is the difference? if the validators are the same, the security is most likely going to remain consistent for the primary and secondary ledger.
Whereas with ORU you are going to a separate ledger also but verifiable through L1.

What Iā€™m getting at is, ORU scale in the same manner as subnets, by creating a separate ledger. But subnet security is slightly less because you are relying on their secondary actions (towards the subnet) to be good, but this is counterbalanced as they also act correctly for the primary chain

correct me if Iā€™m wrong, Iā€™m not expert in L2

1 Like

If thatā€™s the case you are only increasing the load on validators, i.e. vertical scaling, and you might as well just require beefier machines to run L1.

One of the main USP of subnets is that you can implement your own VM - providing the opportunity for non-evm chains to have an evm side-chain, and I believe subnets utilise validity-proofs or some form of plasma. I agree, ORU and ZKRU are much more technically brilliant but sometimes simplicity wins.

Going back to the initial conversation, if it is problematic to go from CEX>L2>L1, I think we will suffer from silo(ism). Unless there is a mechanism to solve: if we initiate the mint (of nftā€™s, tokens) in a L2, somehow theyā€™re posted to the L1 first and then can pivot to different L2ā€™s. Right now ORU seem to only post proofs to L1 and this makes it difficult to withdraw to L1 from L2.
Sure L2ā€™s are great for corporations and institutional niche products, where there is a single use-case, but I see it problematic for the blockchain nomad who likes to go from one defi opportunity to another.

1 Like

You can do that just was well, if not better, with ORUs. Subnets are not ā€œsimpleā€ they come with the entire complexity of Avalanche and its drawbacks. If you want simple, you can have a bunch of sidechains with custodial bridges run by bakers. Same security properties as subnets.

1 Like

Thatā€™s true, a side-chain could do it. Would love to hear you elaborate on `

2 Likes

Ironically, Kevin from Ava labs used the term ā€˜beefyā€™ today :laughing:

1 Like

How competitive is Tezos rollup architecture and DA with emerging tech like Celestia + EVMOS?

1 Like

How is this fixed with rollups?

Rollups have a different set of validitators, largely independent from the main chain.

At least in subnets there is some guaranted overlap, in third party rollups there isnā€™t any validators inherited from the main chain.

And uploading proofs to layer 1 isnā€™t security, since a layer 2 validator set can still censor you.

Sure subnet security is not perfect but I donā€™t see how rollups are any better.

Obviously you are only exposed to the security of the rollup you choose to use.

Youā€™re mischaracterizing my argument.

The problem lies where a blockchain incentivizes users to trust the security outside of the secure layer 1 because of the costly layer 1 fees.

The problem isnā€™t if rollups are a great technology, the problem is when a chain introduces a native layer 1 sharding / scaling protocol, why bother with the cumbersome network filled with incompatible layer 2s with varying amounts of security?

And the reason ā€œsharding is too hardā€ isnā€™t an excuse since there will be teams that will take on the challenge and succeed.

The question is not, ā€œshould we shard layer 1ā€ but ā€œwhen should we shard layer 1ā€.

I even asked the Celestia team ( a data availability blockchain) if they are going to shard and they said yes.

And if Tezos wants to be a rollup centric blockchain, it worries me that they are the only rollup centric blockchain that is against sharding.

Even Vitalik himself admitted that even with sharding and only providing state and no execution that layer 1 fees will still be high.

I donā€™t see how tezos could accomplish low layer 1 fees with many rollups without sharding.

Unless you donā€™t plan on having a cheap layer 1? Which then all my arguments are nullified since most of my gripes revolve around having a transactable layer 1.

1 Like

Transactions on layer 2 rollups inherit the security of layer 1 (with just 1 honest participant needed on layer 2), thatā€™s literally the whole point of rollups. They are a completely distinct way of scaling from Sharding. Rollups offer significantly higher scalability gains and rollups and sharding complement each other. I encourage you to read Vitalikā€™s post here.

Would just like to throw in:

1 Like

I believe Tezos will aim for data and execution sharding in the long run

1 Like

I believe all chains will eventually come to this conclusion.

1 Like

Iā€™m literally quoting you.

Iā€™m willing to accept that this does not represent your viewpoint, but this is what you wrote, this is what people will read, and every bit of misinformation likes this creates a disproportionate amount of work on the part of those expected to dispel it. I understand that this may not be intentional on your part, but you should in turn understand that this makes me very ill-disposed to engage further.

2 Likes

Sure, youā€™re quoting me and I should have done a better job on why I think a layer 2 is insecure and undesirable.

but you should in turn understand that this makes me very ill-disposed to engage further.

Fair enough. I felt that this thread hasnā€™t really gone anywhere, I feel that most of the conversation here is people talking past each other.

I respect the position youā€™ve taken, I personally hold a different position and I believe inevitably if a blockchain want to take on the throughput of the world it has to shard on layer 1 (rollups or not), which I think is a position that is vindicated with the current roadmap for Ethereum.

I think currently the industry has a bias for layer 2s but my personal humble opinion is that these layer 2 technologies are not going to be successful in the long term for mass adoption.

Only time will tell.

2 Likes