Zcash PoS on Polkadot SDK

Zcash on Polkadot SDK, Why not?

I understand Shielded Labs is developing Crossink, “a hybrid PoW/PoS consensus algorithm for Zcash”. It’s debatable whether this will be the best way forward, but it seems clear to me that it would be an improvement over the status-quo. Now, given it’s debatable, where is the debate? I’d like to make sure Crosslink will be better than Zcash on Polkadot SDK, anyone can point me to some public discussions on the matter?

I know that some people are very confused about this, where they think using Polkadot SDK implies becoming part of Polkadot. That is not the case at all, so let’s have this clear from the start.

I just saw the tweet of Zooko relating to PolkaVM:

Oh, PolkaVM sounds cool: https://ethereum-magicians.org/t/long-term-l1-execution-layer-proposal-replace-the-evm-with-risc-v/23617/32 I must sheepishly confess that I kind of ignored it at first because it had “Polka” in its name, but this sounds cool.

Along with the confession, I would have liked some kind of argument explaining what happened there, for him to decide “Polka” was ever a term worth ignoring.

Either way, what makes Crosslink better than Polkadot SDK? Is it only because @zooko has a preference for a hybrid PoW/PoS? I can see some advantages to that, but I’m not entirely sold on the idea, so I’m curious to understand this more.

My understanding of Polkadot SDK is that it comes with governance tools. The Bitcoin governance (what we currently use for Zcash) is great for blockchains that are static and do not have a dev fund. We are very far from static, and we do have a dev fund, both imply a substantial role to governance. Will Crosslink provide anything of the sort?

Most people will think of governance on blockchain as governance of the token holders. It does not have to be the case, but we need the right tools and structure.

Take a look: Fellowship Uncovered: What’s Cooking in Polkadot #1 | by Polkadotters | Kusama & Polkadot validators | Medium

This looks like a question for @shielded-nate or @aquietinvestor from Shielded Labs. If I recall correctly from previous discussion there will be governance tools as part of the protocol.

The pros/cons of moving to PoS immediately vs a PoW/PoS hybrid were discussed here as part of the TFL :

3 Likes

I have an understanding that Nate looked into a lot of options before choosing to Crosslink. And I’m guessing that BFT compatibility was not chosen by accident. Either way I wouldn’t want to wait another 5 years for switching.

1 Like

Tune in here, looks related to your question

2 Likes

I think we should have gone straight for pure PoS, but at this point I think litigating it will just waste time. Anyway, these blockchain SDKs usually cover both interaction with a consensus implementation and tools to build a virtual machine. My guess is that we can’t use most of the sdk to build the Zcash VM because it’s probably created with transparent functionality in mind. You could probably implement the staking components and use it to interact with a node implementation of the Polkadot consensus algorithm, but I don’t see the point using Polkadot’s consensus over something like Tendermint, which is what they are going for as far as I know. Personally I would have modified Zcash to interact with an implementation of Avalanche’s consensus algorithm, like this guy.

2 Likes

I’m very curious what we can expect from those governance tools. Thank you in advance @shielded-nate & @aquietinvestor for any details you are able to share.

Thanks a lot for sharing this @Shawn, I’ll take some time to review in details.

Me neither. :wink: It’s just that it’s such a consequential move for the project that I want make sure I feel good about it and can defend it as well eventually.

Absolutely, but a debate would remain useful given how quickly those things are progressing. Ethereum looking into moving to RISC-V, essentially trailing Polkadot, is a major turn of events imho.

That’s my guess too, admittedly after discussing this a bit with @hanh a while ago and him explaining me pretty much that.

Thanks @dismad, it was interesting indeed. It’s good to hear about different approaches and how they get defended. It’s pretty much what I’d like to see here.

Hence my question, what’s the TL;DR of why we went for the Cosmos SDK instead of the Polkadot SDK and others, and what can expect in term of governance tools given the relevance of that aspect in this project.

The pallets have to be rust compiled to wasm that was a deal breaker for me.

Interesting. Does the upcoming changes to RISC-V change your view? Unlike Ethereum, this has been planned for a long time on Polkadot.

I don’t understand what difference that makes.

I’m no expert so best I can do is share the Polkadot announcement from 2023:

Actually I’ll throw the one of Vitalik that is relevant too:

But that’s just to bounce on your point that you didn’t like using WASM. You didn’t say why or anything so I’m curious to read more of your thoughts if you wish to share them.

they are talking about smart contracts. In our case, it would be the chain consensus rules.

I can’t say that I understand what the problem is with this, but it’s ok.

The main point, is that as a community, we should all at least have a TL;DR understanding of why the Cosmos SDK is better and how the governance aspect will be handled. It’s not too much to ask for I think.

1 Like

It’s not that I don’t like wasm, but making everything work in wasm is pretty tough.

1 Like

Hey @shielded-nate ! I’m sure you’re working hard but I think the community as a whole would benefit if you could spare a few minutes to explain the reasoning that is motivating the implementation you are developing, including what you found wrong in alternative quality implementations such as the Polkadot SDK. Thanks,

3 Likes

Hi, thanks for your interest!

I checked our Scoping and realized it isn’t clear about governance, so I wanted to clear up right away that Crosslink v1 will not have any governance features or changes.

The biggest reason is we just want to ship a useful technical improvement quickly, whereas changing governance is something that needs careful deliberation and a heavy governance process. Shipping a more straightforward “tech only” improvement requires fairly light governance decision. (Another reason is the added complexity in design and implementation would slow us down.)

The second thing I wanted to clarify is our goal for Crosslink v1 is “good enough, as fast as possible, without bells and whistles”. There are so many exciting ways we can improve Zcash by future improvements after Crosslink v1, and we’ve started collecting requests and ideas for improvements after the v1 release on github with the sl-crosslink-post-1.0-brainstorms label. Check that out and everyone should feel free to put your own ideas there! We’ll start evaluating those ideas way down the line after v1 is close to shipping.

Ok, with those big picture things out of the way, here’s some rationale around polkadot sdk:

The truth is, I am in more contact with Cosmos people, so I’ve relied more on their recommendations or proximity. (This includes the Agoric folks, Penumbra devs, and @zmanian.) So because of that I’ve been pretty confident a Tendermint BFT consensus should work with Crosslink and also (importantly) that the SDK should be relatively easy to integrate with Zebra code.

I’m just less familiar with Polkadot, both the consensus and the SDK. And remember, with the “v1 is good enough goal”, I’m implicitly pointing out that we can change the PoS consensus algorithm after v1! One of the strengths of the hybrid PoW/PoS approach is it seems easier and safer to do this than swapping out an entire consensus algorithm all at once (ie: pure TendermintBFT to pure Polkadot consensus would be much riskier, IMO).

So we don’t have to get it perfect for v1, just “good enough, as fast as possible”.

Finally, I read the post Zooko linked to. It does look pretty cool! But, as @hanh points out, that PolkaVM is more for a smart contracts platform, and Crosslink v1 has no smart contracts. I know some people are keen to add smart contracts to Zcash in the future, and if there were an effort to do that, I would want to revisit this.

In particular, I’m not up-to-date on private contract design, although I had a great chat with Howard Wu of Aleo about their design last week at Token 2049!

For a smart contracts platform, I’m personally really interested if we could connect a “standard bytecode toolchain” into Halo2 so that smart contracts could be written in existing high level languages like rust. (This isn’t my specialization; I thought I had heard of a RISC V proving scheme, but don’t trust my memory. @ebfull and the other ZK specialists may know much more, although I know @ebfull is focused on Tachyon scaling architecture for now.)

I hope all of this helps! Let me know how this lands and if I addressed your questions / feedback.

PS: I added a ticket called inspired by this forum thread, but after I posted it, I realized there are others at Shielded Labs (@aquietinvestor and Zooko) as well as others around Zcash like @hanh already working on ways to improve ZEC-weighted polls. (I’m hyperfocused on just one thing: shipping Crosslink good enough, as fast as possible, so I’m less aware of the other developments in Zcash.)

5 Likes

Thanks a lot for your answer @shielded-nate. You gave me a lot to think about and I’m probably still going to mull it over for a while.

extract:

Why use a Hybrid Proof-of-Stake plus Proof-of-Work system?
[…]

  • Proof-of-Work allows people to earn ZEC by mining, even if they don’t already own any ZEC and they can’t buy ZEC on an exchange.
  1. Do you foresee the Hybrid mining / validating to be temporary, followed with full PoS afterwards? If temporary, how long and indeed, what do you think of the impact on people only able to acquire ZEC through mining without ASICs; it’s certainly a strong appeal to Monero and Ycash today.

  2. If not temporary, could you (or someone else) explain what happened historically for Zcash to not reject ASICs? I completely understand and respect the decision of Monero and Ycash to prevent ASICs from mining on their respective blockchains, and find it quite wise. Who took that decision in Zcash, and why? Finally, will Crosslink also be essentially reserved to ASICs?