Markdown linter (#1309)

* Add markdown linting

- add linter default rules
- adapt rules to current code
- fix the code for linting to pass
- add CI check

fix #1243

* Fix markdown for Substrate
* Fix tooling install
* Fix workflow
* Add documentation
* Remove trailing spaces
* Update .github/.markdownlint.yaml

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix mangled markdown/lists
* Fix captalization issues on known words
This commit is contained in:
Chevdor
2023-09-04 11:02:32 +02:00
committed by GitHub
parent 830fde2a60
commit a30092ab42
271 changed files with 6289 additions and 4450 deletions
+14 -10
View File
@@ -2,8 +2,9 @@
Indexes transactions and manages storage proofs.
Allows storing arbitrary data on the chain. Data is automatically removed after `StoragePeriod` blocks, unless the storage is renewed.
Validators must submit proof of storing a random chunk of data for block `N - StoragePeriod` when producing block `N`.
Allows storing arbitrary data on the chain. Data is automatically removed after `StoragePeriod` blocks, unless the
storage is renewed. Validators must submit proof of storing a random chunk of data for block `N - StoragePeriod` when
producing block `N`.
# Running a chain
@@ -15,8 +16,9 @@ Start with generating a chain spec.
cargo run --release -- build-spec --chain=local > sc_init.json
```
Edit the json chain spec file to customise the chain. The storage chain genesis params are configured in the `transactionStorage` section.
Note that `storagePeriod` is specified in blocks and changing it also requires code changes at the moment.
Edit the json chain spec file to customise the chain. The storage chain genesis params are configured in the
`transactionStorage` section. Note that `storagePeriod` is specified in blocks and changing it also requires code
changes at the moment.
Build a raw spec from the init spec.
@@ -31,11 +33,11 @@ cargo run --release -- --chain=sc.json -d /tmp/alice --storage-chain --keep-bloc
cargo run --release -- --chain=sc.json -d /tmp/bob --storage-chain --keep-blocks=100800 --ipfs-server --validator --bob
```
`--storage-chain` enables transaction indexing.
`--keep-blocks=100800` enables block pruning. The value here should be greater or equal than the storage period.
`--ipfs-server` enables serving stored content over IPFS.
`--storage-chain` enables transaction indexing. `--keep-blocks=100800` enables block pruning. The value here should be
greater or equal than the storage period. `--ipfs-server` enables serving stored content over IPFS.
Once the network is started, any other joining nodes need to sync with `--sync=fast`. Regular sync will fail because block pruning removes old blocks. The chain does not keep full block history.
Once the network is started, any other joining nodes need to sync with `--sync=fast`. Regular sync will fail because
block pruning removes old blocks. The chain does not keep full block history.
```bash
cargo run --release -- --chain=sc.json -d /tmp/charlie --storage-chain --keep-blocks=100800 --ipfs-server --validator --charlie --sync=fast
@@ -43,7 +45,8 @@ cargo run --release -- --chain=sc.json -d /tmp/charlie --storage-chain --keep-bl
# Making transactions
To store data use the `transactionStorage.store` extrinsic. And IPFS CID can be generated from the Blake2-256 hash of the data.
To store data use the `transactionStorage.store` extrinsic. And IPFS CID can be generated from the Blake2-256 hash of
the data.
```js
const util_crypto = require('@polkadot/util-crypto');
@@ -76,7 +79,8 @@ ipfs block get /ipfs/<CID> > kitten.jpeg
```
To renew data and prevent it from being disposed after the storage period, use `transactionStorage.renew(block, index)`
where `block` is the block number of the previous store or renew transction, and index is the index of that transaction in the block.
where `block` is the block number of the previous store or renew transction, and index is the index of that transaction
in the block.
License: Apache-2.0