-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spartan PoC Consensus: Milestone 1 #165
Conversation
Thanks for the delivery, we'll review it as soon as possible! |
Hello. Thanks again for your milestone 1 deliveries. We've had a first look: The farmer plotted and - once the node was running - it started farming and I could watch the blocks being generated – so great work :)). Overall your deliveries, documentation and articles are comprehensive and I just have a few remarks to consider: General
spartan_client Documentation:
Docker:
Code:
Functionality
spartan_farmer Documentation:
Functionality: Both plotting and farming works as intended under normal conditions - therefore the following inputs are probably optional for this milestone but might be considered later:
sc_consensus_poc
Thanks again for your great efforts and please feel free to ask any questions that pop-up and of course let me know if you have a different opinion on my remarks. |
Thank you for taking the time to review our submission with such great detail @protyze . We appreciate all the feedback and comments. It's always good to know how other people see our project and code from the outside. We will be submitting a PR later today that addresses all of the issues you raised. |
…onsensus_module-milestone_1.md Match W3F naming convention
@protyze we have tried to address all of your issues with the above commits. General
spartan_client
spartan_farmer
sc_consensus_poc
Thanks again for taking the time to review our code in detail and provide such great feedback. We have done our best to incorporate as much of it as possible. |
Hi @rg3l3dr. Thank you very much for the adjustments. I will have a look into them and get back to you as soon as possible. |
@rg3l3dr Thanks again for the swift reply. All your adjustments look very good to me and you have reasonably argued about the remarks that you wouldn't consider within this milestone. I'll suggest to accept your milestone 1 deliveries and a colleague will double check it before the final approval. Two minor remarks regarding the adjusted README-files:
Thank you very much for all your efforts and the good work. I'm looking forward to see more of this project in the future! |
Thank you @rg3l3dr for the delivery and @protyze for the evaluation. Looks quite good overall, nice work. I'll give it a deeper look and leave a few comments of my own in the coming 2-3 days. |
@rg3l3dr apologies for the delay. I was a bit busier than expected. Great delivery overall, congratulations on what you've achieved so far and thanks for the adjustments you've already made. I have a few remarks to add to @protyze's already thorough review:
As I said, independently of my comments this is all in all A+ work. Keep it up and let us know if you need anything else. |
@alxs thanks for the detailed review and positive feedback. Most of the points you raise were either deliberate design decisions on our part or us seeking to replicate the style and structure of the substrate modules this work was based on. Regarding your comments, we will be submitting the necessary changes soon, but I wanted to quickly provide our thought process so we can come to consensus on what those changes should actually be.
I hope that all makes sense. These decisions were based on several iterations of ways to structure the project and this ended up working the best for us to maintain compatibility as Substrate evolves. |
@rg3l3dr Just to add my 5 cents here:
That makes partial sense to me. I'm not an expert, yet I believe you might be mixing up two concepts here. If I understand correctly and you want to become a parachain, then your codebase should most likely not be based off the
Keeping the above in mind, you can notice that if you have a specific instantiation of If you have merging upstream at some point in mind, you might want to find the middle ground, and keep the Let me know if this makes sense. |
We believe that it is more similar to Substrate repo than Polkadot and that is why we started with Substrate fork. First of all, we need some new primitives and we also needed changes to some of substrate's components to make things work (specifically Second, we do not intend to launch Spartan as a full-fledged network on its own. It is a preparation, building of components for Subspace and potentially other PoC-based protocols on Substrate. Third, we build those components in such a way that with click of a button we can create a PR into upstream. And lastly, targeting a particualr snapshot of upstream TL;DR: In a perfect world eventual result would be such that |
Thanks for elaborating on your reasoning, that makes sense 👍🏼 |
Thanks for being so responsive @rg3l3dr @nazar-pc. Regarding the inclusion within FRAME and/or Substrate, feel free to create an issue or draft PR upstream to see if there is indeed interest to merge this at some point in the future. However, note that we had this situation with another grantee recently and Parity wasn't very keen to merge their code. See paritytech/substrate#7820 (comment). The largest issue is that maintaining an external pallet, and even more so another consensus algorithm, would require developer resources from Parity's side which are already strained. In general, while I agree with most of your arguments, I think apart from this point it'd still be a good idea to work on your own repository instead of the current fork. But I suggest we discuss the reasons for this on Element; I've created a room with the two of you in which to discuss this freely. Feel free to wait with this until the integration within Substrate has been clarified. No worries about the public announcements, I can see how the external review outside of the standard review process may have been confusing. In any case, I think there's not much you could do at this point for this milestone to be rejected ;). Let me know when you're done with the changes and I'll be happy to merge the PR. |
@mmagician @alxs thanks again for the detailed feedback and comments. The final remaining issues should now be addressed and the PR should be ready to merge.
We have also nearly completed all the tasks for milestone 2 of this grant and plan to submit that next week. |
Thank you for the updates! Regarding the license in
Sounds good, keep us updated in this regard. Also just curious, how would this work? I had a look at your Subspace paper a few weeks ago and if I remember correctly, farmers were the PoC-based nodes of the network, which I'm assuming might face the same issues as a PoW chain, whereas executors formed a PoS layer on top of those. If as I understood it the purpose of the two separate node tiers was to solve the farmer's dilemma, can you still do so while removing the executor role? Regardless of this, how would you roughly approach combining Spartan and Ouroboros into one consensus algorithm without this separation? Besides, do you have any updates regarding merging into Substrate? In any case, I'm happy to tell you that the milestone is a pass! You can find my evaluation notes here. I'll forward your invoice internally. |
Thanks @alxs! We misunderstood on the license, thinking it just needed to be declared in the cargo.toml, but we will add an actual license file in the next milestone. Actually the farmer PoC protocol is praos-like (not the executor staking election), in that we divide time into fixed slots and epochs and then derive the randomness for the current epoch from some past epoch. Farmer's can then look ahead into the current epoch to see if they are elected, and use this proof as the basis for connecting to a relay chain validator. Executors are better understood as a finalization or ratification mechanism on top of the farmer protocol and they are chosen for each new block (not in a praos-like fashion). But they are not providing "finality" just proposing a new state root that can be challenged within some multiple of the network delay. In order to integrate directly as a parachain we will need remove the chain selection rule and just have farmers produce blocks, while relying on the relay chain to choose the longest chain (currently it does this internally). In that cases executors would work off the longest relay chain branch. We could also have our own finality gadget (such as Taiji) and have only farmed, executed, and finalized blocks sent to the relay chain (as a parachain). Others options are to to retain the current structure and run as a parthread or build a bridge into Polkadot as a fully sovereign chain. Ideally we would like to be parachain while still being only loosely coupled to the relay chain from a consensus perspective, though we're not sure if that is possible within the current architecture. Still a lot of thinking and discussion to do here on the best way to integrate, and it will probably come down to what works best with XCMP so that we can provide efficient cross-parachain storage within Polkadot. No updates regarding merging into Substrate yet, but hoping to get more direction on that through Substrate Builders, we should be submitting our final application this weekend. Thanks for all the great feedback and facilitating the discussion! |
hi @rg3l3dr we transferred the payment. |
Milestone Delivery Checklist
Link to the application PR: w3f/Grants-Program#357