-
Notifications
You must be signed in to change notification settings - Fork 184
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
Vision for Substrate Recipes (v2) #32
Comments
@4meta5 Thanks for writing this out so clearly. I'm happy that the srml tour will find a home here. And I'll be ready to write the first recipe in that section next week. Should we use the existing srml or expand on @shawntabrizi 's idea of a "simple-srml"? Or what do you think about this format for each module. Explore the existing srml module's code noting which parts are the core concepts and which parts are kinda polkadot-specific, then have a recipe for writing a simple version of it. |
Great write up. I would be interested to learn more about the general structure of the SRML-TOUR I could see a TON of use of going through each module, and pulling out "recipes" that can be learned from each module. For example:
I would see it being a much harder problem to create recipes for "re-creating" the modules. I def see the value in this, but may be ambitious for this round of content development. Maybe the vision? |
@JoshOrndorff Let's stick to the existing SRML for now -- I want to explore the "simple-srml" independent of this (maybe the patterns that we extract from the SRML for this could help us design this simple srml). I agree with @shawntabrizi -- for now, let's just focus on extracting learned patterns. This is much more realistic than mapping the specs to the module code (although this is also in high demand). I updated the original post -- each module's topics can be organized in the respective issues #33 and #34 If we knock out a bunch of modules with this narrow scope (extract useful patterns), we'll be in a good position to pursue the more ambitious project of documenting how to "re-create" the modules. |
I feel comfortable working towards the structure described in #42 |
…do-alpha6 Update to alpha.6
WHAT ARE THE RECIPES? I envision the recipes as similar to Rust by Example, but for Substrate. The purpose is to provide examples of Substrate runtime patterns through minimal samples. Each sample might only take up a single page in the book, but the point is to demonstrate common patterns and application in the context of an example.
TLDR; each recipe should fulfill two objectives:
kitchen/
)motivation:
While some developers complete tutorials chronologically, many prefer to skim tutorials for usage examples and apply patterns to build a personal project. For these developers, it is useful to have something like Rust by Example to reference while building. By not requiring the developer to read previous sections for continuity, this format is convenient in the context of fast prototyping based on common design patterns.
If done well, this format can
The 2nd objective is especially relevant. I want to minimize the friction for converting personal notes into recipes for teaching others. Moreover, I want to target the creation of specific content pertaining to the most well-vetted code that uses the Substrate Runtime API, the SRML.
srml-tour
With @JoshOrndorff 's blessing, I want to create a section similar to srml-tour for the recipes. I think this fits what I view as the purpose of the recipes: a space to share high-level explanations of SRML code and API usage examples for building runtimes.
criteria
The structure of each recipe should be oriented around the patterns and use cases it exposes. Even so, in general, each recipe should be a single page explainer to communicate how the code in certain module(s) maps to the web3 research specs. Each post should do the followingmotivate study of the chosen module(s) (possibly in the context of Polkadot)explain how objects/relationships are modeled and how this influences the implementationpriorities
treasury
, especially because of thisdemocracy
, already partly finished by @JoshOrndorffcollective
+elections
as thecouncil
support/phragmen
=>
elections
+staking
staking
because it containsinflation
which is interesting paired withtreasury
and demonstrates fixed point arithmeticfuture recipes/sections?
lots of V2 patterns to be covered...
=>
not lengthy docs, but succinct tips and short examples of scaffolding (3433 and 3479)The text was updated successfully, but these errors were encountered: