Skip to content
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

Recipe for a runtime without FRAME #144

Open
wants to merge 249 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 245 commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
5e90e82
Copy super runtime and strip frame pallets
JoshOrndorff Jan 29, 2020
c49745f
Strip grandpa
JoshOrndorff Jan 29, 2020
2ac2f7e
Diving in. Gonna need help.
JoshOrndorff Jan 29, 2020
a425aeb
Something compiles
JoshOrndorff Feb 3, 2020
cd625ff
implemented execute_block
JoshOrndorff Feb 3, 2020
a50aa01
"implemented" initialize_block
JoshOrndorff Feb 3, 2020
1365b71
implemented finalize_block
JoshOrndorff Feb 3, 2020
6c19687
Implement Aura and Grandpa runtime APIs
JoshOrndorff Feb 3, 2020
90f704f
Partial attempt at complete node. Not working. Comitting because pair…
JoshOrndorff Feb 3, 2020
a711cf0
Solved a few warnings and trivial errors. Now really stuck.
JoshOrndorff Feb 3, 2020
912148b
remove frame references
gnunicorn Feb 3, 2020
ee9b5a5
fix unchecked extrinsic
gnunicorn Feb 3, 2020
29cf18c
the outer knows only about the opaque block
gnunicorn Feb 3, 2020
221bec6
fix warnings
gnunicorn Feb 3, 2020
1e97f13
GenesisConfig defaultable
gnunicorn Feb 3, 2020
c4ba1e9
Implement so service builder can build
gnunicorn Feb 3, 2020
a658992
master.into()
JoshOrndorff Feb 3, 2020
5fe748c
Mostly working code, sketch of writeup
JoshOrndorff Mar 13, 2020
41aa2c4
update Cargo.toml s to ba5c85a
JoshOrndorff Mar 13, 2020
c26a906
Fix runtimes
JoshOrndorff Mar 13, 2020
7b1416b
Fix weights
JoshOrndorff Mar 13, 2020
84de1c8
Fix kitchen node
JoshOrndorff Mar 13, 2020
d04f172
Fix rpc node
JoshOrndorff Mar 13, 2020
b101f9a
Update deps to 0bd9ffa
JoshOrndorff Mar 16, 2020
6369abc
update compiler
JoshOrndorff Mar 16, 2020
bcb94ae
Add dedicated pow runtime. basic-pow now builds and runs.
JoshOrndorff Mar 17, 2020
f901694
Clean code comments
JoshOrndorff Mar 17, 2020
c68b1e0
strip down pow-runtime
JoshOrndorff Mar 17, 2020
46b6b0b
Clean up genesis
JoshOrndorff Mar 17, 2020
7f40e1c
Raise the difficulty
JoshOrndorff Mar 17, 2020
253ca45
More write-up
JoshOrndorff Mar 17, 2020
d856f9b
simple -> basic
JoshOrndorff Mar 17, 2020
0a27121
More writeup
JoshOrndorff Mar 18, 2020
e14b4b3
Finish drafting writeup.
JoshOrndorff Mar 18, 2020
bc7589a
Merge branch 'master' into joshy-pow
JoshOrndorff Mar 18, 2020
08695b7
link checker adjustment
JoshOrndorff Mar 18, 2020
a369d3d
Update nodes/basic-pow/src/pow.rs
JoshOrndorff Mar 19, 2020
5afc4f8
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
ea59156
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
d326e6e
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
c5b3846
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
1998ab0
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
ebe747e
Update runtimes/pow-runtime/src/lib.rs
JoshOrndorff Mar 19, 2020
4b18155
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
09ee429
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
cd69b88
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
4d94749
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
96d8327
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
07d51b3
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
748dbcb
Update book.toml
JoshOrndorff Mar 19, 2020
1297724
Update nodes/basic-pow/src/chain_spec.rs
JoshOrndorff Mar 19, 2020
bf25be5
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
898268e
Update text/3-entrees/basic-pow.md
JoshOrndorff Mar 19, 2020
a807509
Clean some commented code
JoshOrndorff Mar 19, 2020
735b1d8
Bring simple-map up to snuff (grr this is mixed with a bigger PR, oh …
JoshOrndorff Mar 19, 2020
40a015a
Update all cargo files.
JoshOrndorff Mar 19, 2020
792e1fa
Update basic-token (except tests)
JoshOrndorff Mar 19, 2020
abc2a2e
Update struct storage
JoshOrndorff Mar 19, 2020
b0b61e5
update execution-schedule
JoshOrndorff Mar 19, 2020
1f1788e
Ditch Linked Maps
JoshOrndorff Mar 19, 2020
9462b5f
Everything compiles (excet tests)
JoshOrndorff Mar 19, 2020
ce0c97b
Simplify key and address handling in chain-spec
JoshOrndorff Mar 20, 2020
d02cbae
Merge branch 'joshy-pow' of github.com:substrate-developer-hub/recipe…
JoshOrndorff Mar 20, 2020
713f909
Update runtime toward apps compatability
JoshOrndorff Mar 20, 2020
75bbba6
Include this javascript diagnostic stuff temporarily.
JoshOrndorff Mar 20, 2020
19dbf6b
Fix doc typo (Just so CI runs again)
JoshOrndorff Mar 20, 2020
7ee59e3
Make pow-runtime code look as close as possible to api-runtime. (flai…
JoshOrndorff Mar 20, 2020
d45a6e8
Update to 34c5cb3. Everything compiles and tests pass.
JoshOrndorff Mar 20, 2020
c8c27fb
Update to 1d8fa43 (all compiles)
JoshOrndorff Mar 23, 2020
2b2f7dd
Merge branch 'master' into follow-substrate-master
JoshOrndorff Mar 23, 2020
3f222fb
Merge branch 'joshy-pow' into follow-substrate-master
JoshOrndorff Mar 23, 2020
26d3157
Merge branch 'master' into follow-substrate-master
JoshOrndorff Mar 23, 2020
2a4f10d
restore Cargo.lock
JoshOrndorff Mar 23, 2020
9611d33
Fix pow-runtime
JoshOrndorff Mar 24, 2020
6c7d9c9
Merge branch 'master' into follow-substrate-master
JoshOrndorff Mar 24, 2020
6bce9a9
Merge branch 'master' into follow-substrate-master
JoshOrndorff Mar 31, 2020
7d1670a
de-alias super-runtime (finally)
JoshOrndorff Mar 31, 2020
1365721
Update deps to crates.io (alpha.5)
JoshOrndorff Mar 31, 2020
fd7904d
fix in-code build scripts alias
JoshOrndorff Mar 31, 2020
ee191a4
clean basic-pow cargo.toml
JoshOrndorff Mar 31, 2020
0de4400
Clean Kitchen node cargo.toml
JoshOrndorff Mar 31, 2020
04e5a53
Include missing struct storage type
JoshOrndorff Mar 31, 2020
8a1f588
Clean rpc-node
JoshOrndorff Mar 31, 2020
2801de6
Update version in Readme
JoshOrndorff Mar 31, 2020
95e7d36
clean default-instance
JoshOrndorff Mar 31, 2020
34e1af4
clean last-caller
JoshOrndorff Mar 31, 2020
bb17296
Substrate is on crates.io Hooray!
JoshOrndorff Apr 1, 2020
3c9a777
Fix tests on new recipes
JoshOrndorff Apr 1, 2020
90bb109
Merge master for new folder structure. No actual updates yet.
JoshOrndorff Apr 1, 2020
1d14f69
update wasm-build-runner
JoshOrndorff Apr 1, 2020
c35d3a7
Update deps to alpha.5 (no compile)
JoshOrndorff Apr 1, 2020
8bc5962
Runtime Compiles
JoshOrndorff Apr 1, 2020
35e7c25
Dealias crates, general tidying
JoshOrndorff Apr 1, 2020
2d230f7
spaces to tabs
JoshOrndorff Apr 1, 2020
85a3378
minor cleaning to node in case we end up keeping it
JoshOrndorff Apr 1, 2020
c122dd2
Merge branch 'alpha.5' into joshy-frameless-runtime
JoshOrndorff Apr 1, 2020
c289b71
Compiles with a PoW node, but errors out immediately
JoshOrndorff Apr 1, 2020
b405079
Start updating frameless-node, but lots of API changes ahead
JoshOrndorff Apr 1, 2020
597b0c6
Dupe code from kitchen node
JoshOrndorff Apr 23, 2020
20708db
Seperate crate for sha3pow
JoshOrndorff Apr 23, 2020
0753545
Something compiles.
JoshOrndorff Apr 23, 2020
b85b6a2
Create a new runtime so this thing actually runs.
JoshOrndorff Apr 23, 2020
2c7f6b2
Remove commented babe code
JoshOrndorff Apr 23, 2020
de33a7f
Wire existing basic-pow node to newly-separated sha3pow crate.
JoshOrndorff Apr 23, 2020
e924938
Bring in complete sha3pow from utxo workshop, and adapt nodes to use it.
JoshOrndorff Apr 23, 2020
079b7de
Remove unnecessary trait bounds on Sha3Algorithm
JoshOrndorff Apr 23, 2020
72111c9
Writeups for basic-pow and sha3-pow-consensus
JoshOrndorff Apr 23, 2020
e9fbf0a
Merge branch 'master' into joshy-hybrid-consensus
JoshOrndorff Apr 24, 2020
850c48a
Minor fix & visible WIP note :)
jimmychu0807 Apr 24, 2020
ef169bf
update to custom Substrate branch to support justification import.
JoshOrndorff Apr 24, 2020
03593ec
standardize super runtime TODO How to remove the session key stuff fr…
JoshOrndorff May 2, 2020
f8f7cd5
Preserve babe-grandpa node and runtime. This will be a reipe about gr…
JoshOrndorff May 2, 2020
b462e71
standardize basic-pow node and prune pow-runtime
JoshOrndorff May 2, 2020
035eedb
Standardize weight-fee-runtime.
JoshOrndorff May 2, 2020
8062554
Move sum-storage to super-runtime and prune api-runtime
JoshOrndorff May 4, 2020
10fa739
Convert kitchen node to instant seal
JoshOrndorff May 4, 2020
54d756d
Add comment with hint about light client problem
JoshOrndorff May 4, 2020
3613fc2
Merge branch 'master' into joshy-standardize-runtimes
JoshOrndorff May 4, 2020
8305406
Fix minor type aggregation issue
JoshOrndorff May 4, 2020
86bc846
Convert rpc-node to instant seal
JoshOrndorff May 4, 2020
8871130
Only kitchen node supports ocw-runtime
JoshOrndorff May 4, 2020
2d91bde
Properly prune session keys from runtime
JoshOrndorff May 4, 2020
00002f0
Standardize ocw-runtime
JoshOrndorff May 4, 2020
383b0f1
Restore api-runtime
JoshOrndorff May 4, 2020
3037691
Standardize API Runtime
JoshOrndorff May 4, 2020
099484c
rename sum-storage-runtime-api It isn't _necessarily_ related to the rpc
JoshOrndorff May 4, 2020
021037b
Update runtime API writeup to reflect refactorings.
JoshOrndorff May 4, 2020
36a3382
Update nodes/babe-grandpa-node/Cargo.toml
JoshOrndorff May 7, 2020
9083d0c
Update runtimes/super-runtime/src/lib.rs
JoshOrndorff May 7, 2020
cc01394
Update nodes/babe-grandpa-node/Cargo.toml
JoshOrndorff May 7, 2020
45bde8a
Kitchen node compiles with light client. Also converted api-runtime a…
JoshOrndorff May 8, 2020
edcfee2
Add fixme annotation to light clients.
JoshOrndorff May 8, 2020
e174e67
Merge branch 'joshy-standardize-runtimes' of github.com:substrate-dev…
JoshOrndorff May 8, 2020
2c459ee
Clean kitchen node Cargo.toml
JoshOrndorff May 8, 2020
9d5f61a
Strip instant seal code from manual seal node
JoshOrndorff May 8, 2020
9e2ba3d
Update manual seal writeup
JoshOrndorff May 8, 2020
ebffaeb
Write up kitchen node
JoshOrndorff May 8, 2020
6bcfa86
Clarify language in api-runtime writeup
JoshOrndorff May 8, 2020
087f441
typo: because -> became
JoshOrndorff May 8, 2020
a8522cb
Replace TODO with comment in babe-grandpa node Cargo.toml
JoshOrndorff May 8, 2020
285d2ff
Remove some TODOs
JoshOrndorff May 8, 2020
b467961
bump deps, LongestChain, default weights
JoshOrndorff May 8, 2020
c6e0e84
changed append api
JoshOrndorff May 8, 2020
a2be10c
API Runtime Compiles
JoshOrndorff May 8, 2020
8f4c61a
Start working on OCW runtime and pallet
JoshOrndorff May 8, 2020
227388d
Super runtime compiles
JoshOrndorff May 8, 2020
9ee61df
Weight fee runtime and weight pallet compile. Both will eed another l…
JoshOrndorff May 8, 2020
81fa2b5
Babe-grandpa-untime compiles
JoshOrndorff May 8, 2020
9f1e87d
Merge branch 'master' into alpha.7
JoshOrndorff May 8, 2020
0f31fdc
re-apply dependency bumps (not sure where that work went)
JoshOrndorff May 8, 2020
464d2aa
Babe-grandpa-node compiles
JoshOrndorff May 8, 2020
7ec98f5
basic-pow compiles
JoshOrndorff May 8, 2020
df0b923
updated for alpha.7
jimmychu0807 May 10, 2020
3b048a5
it compiles!
jimmychu0807 May 10, 2020
5be531d
[wip] Fixing kitchen node compiler error
jimmychu0807 May 10, 2020
75f4a47
Upstream fix merged
JoshOrndorff May 11, 2020
00a4c11
Merge branch 'manual-seal-light-client' into alpha.7
JoshOrndorff May 11, 2020
ff3a7fe
minor fix to kitchen node text
JoshOrndorff May 11, 2020
fd823dd
bump dependencies and standardize format in all pallets' Cargo.toml f…
JoshOrndorff May 11, 2020
ee3baec
Bump deps in all runtimes TODO Babe grandpa runtime doesn't compile
JoshOrndorff May 11, 2020
8d33a16
Make Babe Grandpa Runtime Compile
JoshOrndorff May 11, 2020
1c187f3
Bump deps in all nodes and make them compile
JoshOrndorff May 11, 2020
af5b86d
Start updating tests
JoshOrndorff May 11, 2020
29f3732
fix charity tests
JoshOrndorff May 11, 2020
4093d17
Most tests are updated
JoshOrndorff May 11, 2020
04aa682
prune accidentally committed notes file
JoshOrndorff May 11, 2020
57a0b29
Start working on offchain-demo tests
JoshOrndorff May 11, 2020
e3f213c
Merge alpha.7 and start updating
JoshOrndorff May 11, 2020
3719d76
Rename to optional-grandpa-runtime, update deps, make compile
JoshOrndorff May 11, 2020
bb14b69
update optional-grandpa genesis
JoshOrndorff May 11, 2020
17efcb6
rename back to minimal grandpa runtime
JoshOrndorff May 11, 2020
17cc878
writeup hybrid consensus
JoshOrndorff May 12, 2020
e21793d
hybrid consensus is no longer wip
JoshOrndorff May 12, 2020
1ceb2a9
offchain-demo tests pass
jimmychu0807 May 12, 2020
5a19187
Merge branch 'master' into alpha.7
JoshOrndorff May 13, 2020
08b6ae8
Merge branch 'develop' into joshy-frameless-runtime
JoshOrndorff May 13, 2020
58c6435
Final nail in pow runtime
JoshOrndorff May 13, 2020
d1fe43c
prune stray dependencies on safe-mix
JoshOrndorff May 13, 2020
8787f0e
Merge develop
JoshOrndorff May 13, 2020
a1106cf
Compiles with kitchen node
JoshOrndorff May 13, 2020
0d4d9ab
Prune frameless node
JoshOrndorff May 13, 2020
4b01b98
Prune some commented code
JoshOrndorff May 13, 2020
96c2e34
Sketch writeup
JoshOrndorff May 13, 2020
c09d147
Try runtime in pow and manual seal Same Error
JoshOrndorff May 13, 2020
ca721fb
Insert some genesis state
JoshOrndorff May 13, 2020
9ea062b
Node doesn't crash
JoshOrndorff May 13, 2020
638d12b
Merge branch 'joshy-prune-safe-mix' into develop
JoshOrndorff May 14, 2020
f475498
Remove no-longer-correct type override for `weight: u32`. (#246)
JoshOrndorff May 14, 2020
2e0890a
Merge branch 'develop' of github.com:substrate-developer-hub/recipes …
JoshOrndorff May 14, 2020
4fdb0ce
Call on_initialize and on_finalize from execute_block
JoshOrndorff May 14, 2020
fed5c66
Add image in ocw storage recipe
JoshOrndorff May 15, 2020
e4a5b77
Update CI to support gitflow (#247)
JoshOrndorff May 16, 2020
f01f827
Update to alpha.8 (#249)
JoshOrndorff May 16, 2020
39e322a
add .md extension (#251)
JoshOrndorff May 16, 2020
940163f
cargo fmt (#253)
JoshOrndorff May 18, 2020
feb209a
Update Contributing Guidelines (#252)
JoshOrndorff May 18, 2020
c6def5c
Add clippy to CI (#250)
JoshOrndorff May 18, 2020
6f91ef9
Clean cargo.toml files (#254)
JoshOrndorff May 18, 2020
d4e19fc
Revise prepare kitchen chapter (#255)
JoshOrndorff May 18, 2020
95d2a1b
bump dependencies
JoshOrndorff May 18, 2020
5adf539
ProposerFactory takes prometheus registry
JoshOrndorff May 18, 2020
a0d611f
No longer need to allow clippy::string_lit_as_bytes
JoshOrndorff May 18, 2020
6c892d5
Substrate dependencies to 12e08fd (#257)
JoshOrndorff May 19, 2020
28ce1f2
update rustdocs links
JoshOrndorff May 20, 2020
58a4fbe
add rustdocs update to release process
JoshOrndorff May 20, 2020
0e4fbfd
revert commits accidentally made directly to develop
JoshOrndorff May 20, 2020
6603125
Change rustdocs link to crates.parity.io (#260)
JoshOrndorff May 20, 2020
52ff4d2
Merge branch 'develop' into prettier-test
JoshOrndorff May 22, 2020
b58e477
fix clippy error
JoshOrndorff May 22, 2020
74ef9a7
Format markdown with Prettier (#263)
JoshOrndorff May 22, 2020
74021b4
fix Summary
JoshOrndorff May 23, 2020
ac0cca1
Cleanup crowdfund (#265)
JoshOrndorff May 26, 2020
b4036b7
Add writeup for Babe Grandpa Node (#264)
JoshOrndorff May 26, 2020
285247a
Prepare Cargo.toml files for publishing (#226)
JoshOrndorff May 26, 2020
336d677
Fix typos in kitchen-node doc (#268)
lsaether May 27, 2020
597a3a9
Fix name on kitchen node write-up
JoshOrndorff May 27, 2020
f2f1efc
Update dependencies to 45b9f0a (rc2) (#269)
JoshOrndorff May 27, 2020
d9310fb
Merge branch 'develop' of github.com:substrate-developer-hub/recipes …
JoshOrndorff May 27, 2020
a0acaa2
Bring changes from rc2-prep back to develop branch (#274)
JoshOrndorff May 29, 2020
e2d95a2
Update to cd305af (#275)
JoshOrndorff May 29, 2020
31f4d38
Recipe for coupled pallets (#272)
JoshOrndorff Jun 1, 2020
f77fc07
Rename vec-set's store to VecSet (#279)
JoshOrndorff Jun 2, 2020
cb94b5c
Fix substrate.io links (#286)
Jun 4, 2020
bfa066b
Update CI Actions (#285)
JoshOrndorff Jun 4, 2020
80e9aee
fix typo and format style (#280)
manxiaqu Jun 4, 2020
728330e
Update lib.rs
TovarishFin Jun 8, 2020
eb091d9
Decouple link checking from mdbook (#287)
JoshOrndorff Jun 8, 2020
fd2fc1a
Addition to Manual Seal that combines it with Instant seal (#291)
lsaether Jun 8, 2020
1bc97e8
Fix typo (#292)
igorline Jun 9, 2020
dd1fa41
Updates Substrate dependencies to 34695a8 (#293)
JoshOrndorff Jun 9, 2020
62940d2
develop.into()
JoshOrndorff Jun 9, 2020
d959ed6
Update license and other Cargo.toml metadata
JoshOrndorff Jun 9, 2020
f0a93da
x
JoshOrndorff Jun 9, 2020
7b21f6c
Add debug prints and body for `apply_extrinsic`
JoshOrndorff Jun 10, 2020
5faefba
More Cargo.toml cleaning
JoshOrndorff Jun 10, 2020
4a7cee7
Clear header from storage and log calculated header.
JoshOrndorff Jun 10, 2020
2236ebc
clippy
JoshOrndorff Jun 10, 2020
0b9a8df
more clippy
JoshOrndorff Jun 10, 2020
05c681f
update all authors (#296)
JoshOrndorff Jun 11, 2020
9c4c3b2
Don't manually hash state root
JoshOrndorff Jun 11, 2020
5e168d4
Merge branch 'develop' into joshy-frameless-runtime
JoshOrndorff Jun 11, 2020
f3c9a56
prune GetNodeBlock
JoshOrndorff Jun 12, 2020
73f0f7a
Clean comments and style
JoshOrndorff Jun 12, 2020
e464fe0
strip commented code
JoshOrndorff Jun 12, 2020
2869547
Hack ValidTransaction
JoshOrndorff Jun 12, 2020
bb51f11
style cleanup on writeup
JoshOrndorff Jun 12, 2020
a9d9b5d
more cleanup
JoshOrndorff Jun 12, 2020
d4ca4e1
More writeup
JoshOrndorff Jun 12, 2020
106a34c
decoding them extrinsics
gnunicorn Sep 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/build-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ on:
pull_request:
branches:
- master
- develop

jobs:
build:
build-book:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
mdbook-version: '0.3.7'
# mdbook-version: 'latest'

- name: Install mdbook-linkcheck
run: |
curl -LSfs https://japaric.github.io/trust/install.sh | \
bash -s -- --git Michael-F-Bryan/mdbook-linkcheck

- name: Build Book
run: mdbook build
9 changes: 2 additions & 7 deletions .github/workflows/build-deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@ on:
- master

jobs:
build-deploy:
build-deploy-book:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
# mdbook-version: 'latest'

- name: Install mdbook-linkcheck
run: |
curl -LSfs https://japaric.github.io/trust/install.sh | \
bash -s -- --git Michael-F-Bryan/mdbook-linkcheck

- name: Build Book
run: mdbook build

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Links

on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: '.github/workflows/mlc_config.json'
10 changes: 10 additions & 0 deletions .github/workflows/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^https://crates.io"
},
{
"pattern": "^https://github.com/substrate-developer-hub/recipes/tree/master"
}
]
}
35 changes: 16 additions & 19 deletions .github/workflows/test.yml → .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
name: Test
name: Test Code

on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop

jobs:
build:
test-code:
runs-on: ubuntu-18.04

steps:
- name: Checkout Code
uses: actions/checkout@v1
uses: actions/checkout@v2

# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.cargo/registry
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2020-03-09
components: rustfmt
toolchain: nightly-2020-05-07
components: rustfmt, clippy
target: wasm32-unknown-unknown
override: true
default: true

- name: Run clippy
run: cargo +nightly-2020-05-07 clippy -- -D warnings

- name: Check Kitchen
run: cargo check --all

Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 100,
"proseWrap": "always"
}
158 changes: 112 additions & 46 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,123 @@
# Contributing Guidelines

The **purpose** of [Substrate Recipes](https://substrate.dev/recipes/) is to identify best practices and extract useful patterns for developing on Substrate, and to present those patterns in an approachable and fun format.

The recipes onboards aspiring blockchain developers by focusing first on **FRAME pallet development** patterns before reusing these patterns in the context of **runtime configurations**, and finally installing those runtimes in full substrate-based nodes.

The recipes supplements existing resources by providing usage examples, demonstrating best practices in context, and extending simple samples/tutorials. Likewise, it is necessary to **frequently link to/from [reference docs](https://substrate.dev/rustdocs/master/), [tutorials](https://substrate.dev/tutorials/), and [high-level docs](https://substrate.dev/docs)**.

## Chef's Workflow

1. Isolate useful pattern(s) from the main [Substrate](https://github.com/paritytech/substrate) repository and other code that builds on Substrate.

2. Open an [issue](https://github.com/substrate-developer-hub/recipes/issues/new) describing how the pattern can be condensed into a recipe.

3. Fork the [recipes](https://github.com/substrate-developer-hub/recipes). Before making any changes, checkout another branch.

4. Write complete working code in one of the `pallets`, `runtimes`, or `nodes` directories, and add it the the workspace in `Cargo.toml`.

5. Write the companion text in the `text` directory, referencing the code you wrote.

6. Stage your changes locally (see below).

7. Open a new pull request. Thanks for you contributions <3.

### Testing and Staging Locally
```bash
# Test code
cargo test --all

# Install mdbook
cargo install mdbook

#Build and open rendered book in default browser
mdbook build --open
```
The Substrate Recipes strive to identify and extract useful patterns and examples of developing on
Substrate, and to present those patterns in an approachable and fun format. **Your help is
Welcome!**

The Recipes are part of the Substrate Developer Hub, so inter-linking between the Recipes and other
DevHub facets is common. In particular, the Recipes frequently links to:

- The [Reference Docs](https://substrate.dev/rustdocs/v2.0.0-rc2/)
- The [Tutorials](https://substrate.dev/en/tutorials)
- The [Knowledge Base](https://substrate.dev/docs/en/)

## Reporting Bugs

One way to contribute to the Recipes, is to report issues you find when using the Recipes. You may
report new issues at https://github.com/substrate-developer-hub/recipes/issues. When reporting an
issue, please inlcude the following information.

- **Short summary of the issue encountered** - In a sentence or two explain what the issue is at a
high level.
- **What recipe has the issue** - You may specify the recipe by name (e.g. "Basic PoW Node"),
directory (eg. `/nodes/basic-pow`), or GitHub link (eg.
https://github.com/substrate-developer-hub/recipes/tree/master/nodes/basic-pow). Other
unambiguous ways of specifying the particular recipe are also acceptable (e.g. crates.io link,
or rendered text link).
- **Steps to reproduce** - What actions did you take to notice the issue? Did you submit a
particular extrinsic? Did you compile the code a particular way? What command did you run the
node with?
- **Expected Behavior** - What were you expecting to happen when you encountered the bug?
- **Observed Behavior** - What actually happened when you encountered the bug?
- **Additional Relevant Information** - What error message did you receive? What OS and rust
compiler are you using?

## Git Workflow

The recipes adhere closely to
[gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow). That means
there are two main branches in the repository, `master`, and `develop` as well as any number of
topic branches. If you aren't familiar with gitflow, it is worth reading that article and studying
the diagrams. One of the diagrams is included below.

![gitflow](<https://wac-cdn.atlassian.com/dam/jcr:a9cea7b7-23c3-41a7-a4e0-affa053d9ea7/04%20(1).svg?cdnVersion=1017>)

### Master Branch

The `master` branch contains stable, published code and is where release versions are tagged.
Released versions will always be in the history of the `master` branch. The code on `master` uses
published dependencies from `crates.io` and uses git dependencies only where absolutely necessary
likely because crates.io does not yet host the relevant crates.

### Develop Branch

The `develop` branch is where active development happens. It is where new recipes, revisions, CI
updates, and most other changes are merged. In order to keep up with the latest Substrate
development, the `develop` branch allows dependencies from git.

### Cutting a Release

It is time to tag a new release when either enough new features have been contributed that releasing
makes sense, or, more likely, Substrate itself has tagged a new release. The release process also
follows [GitFlow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
Creating a new release is usually initiated by the project maintainer, but the steps are outlined
here nonetheless.

1. Create a release branch off of `develop`.
1. Update dependencies to crates.io.
1. Update the version of each Recipes crate.
1. Update rustdocs links from crates.parity.io to substrate.dev/rustdocs/_appropriate-version_
1. Make a pull request against `master`.
1. Tag the new release version in the history of `master` only after the release branch is merged.

## Proposing Changes and Additions

If you would like to make a change or addition to the recipes, you do not need anyone's permission
to get started. You simply open a Pull Request against the `develop` branch. Of course, not all
changes will be accepted, and changes should either be in line with the existing Recipes structure
or refactor that structure for a good reason. If you want preliminary input from the Recipes'
maintainers before beginning, please
[open an issue](https://github.com/substrate-developer-hub/recipes/issues) discussing your idea
first. Either approach (PR or issue) is welcome.

### What to Contribute

Anything you think will make the Recipes better, is worth proposing. Here are some ideas to get you
started. All of these ideas and more are listed in our
[issue queue](https://github.com/substrate-developer-hub/recipes/issues)

- **Test Coverage** - Not all code is covered, and not all covered code is covered well, but we
would like more and better coverage.
- **New recipes** - If you know how to do something useful in Substrate that is not yet covered in
the Recipes, please contribute.
- **UX improvements** - Any way to make it easier and less confusing to get new users onboarded is
welcome.
- **CI Improvements** - The more tests we have automated, the higher quality the Recipes will be.

## Style

### Rust Code
There is not yet strict enforcement of the [Rust in Substrate coding style](https://wiki.parity.io/Substrate-Style-Guide), but it is highly encouraged to wrap lines at 120 characters a line (or less) for improving reviewer experience on github.

Graciously invoke `cargo fmt` on any Rust code -- this should soon be enforced by CI!
There is not yet strict enforcement of the
[Rust in Substrate coding style](https://wiki.parity.io/Substrate-Style-Guide), but it is highly
encouraged to wrap lines at 120 characters a line (or less) for improving reviewer experience on
github.

Graciously invoke `cargo fmt` and `cargo clippy` on any Rust code; This should soon be enforced by
CI.

### Cargo.toml
Prefer listing dependencies under a single `[dependencies]` header in lieu of using a `[dependencies.some_import]` for every `some_import` module imported. This preference is not enforced. See [`adding-machine/Cargo.toml`](https://github.com/substrate-developer-hub/recipes/blob/master/pallets/adding-machine/Cargo.toml) for an example of the recommended less verbose `Cargo.toml` syntax.

Prefer listing dependencies under a single `[dependencies]` header in lieu of using a
`[dependencies.some_import]` for every `some_import` module imported.

### English
No standards for language style are enforced aside from the common English spelling/grammar rules. @4meta5 has a few *preferences*:
* Avoid using "we", "our", "you" because it often is conducive to unnecessary language
* Prefer active voice (instead of "you may want to use active voice" `=>` "use active voice")
* Link as often as possible to outside content and useful resources including other recipes, docs,
tutorials, and code. It is not necessary to re-link the same external resource on subsequent
mentions in a single document.

## Test Coverage
Not all code is covered, and not all covered code is covered well, but we have a good start and will continue to improve. Your help is warmly welcomed.
Run the tests with `cargo test -- all`.

No standards for language style are enforced aside from the common English spelling/grammar rules.
@4meta5 has a few _preferences_:

- Avoid using "we", "our", "you" because it often is conducive to unnecessary language
- Prefer active voice ("you may want to use active voice" `=>` "use active voice")
- Link as often as possible to outside content and useful resources including other recipes,
knowledge base, tutorials, Wikipedia, and 3rd party content. It is not necessary to re-link the
same external resource on subsequent mentions in a single document.
Loading