Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/conceptual/core/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ these needs automatically; thus a child trie is used instead.
## Runtime Storage API

The Substrate's [Support
module](https://substrate.dev/rustdocs/master/palette_support/index.html) provides
module](https://substrate.dev/rustdocs/master/frame_support/index.html) provides
utilities to generate unique, deterministic keys for your runtime module storage
items. These storage items are placed in the state trie and are accessible by
querying the trie by key.
Expand Down
64 changes: 32 additions & 32 deletions docs/conceptual/runtime/srml.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ functionality for a runtime.

### System Module

The [System module](https://substrate.dev/rustdocs/master/palette_system/index.html) provides low-level types, storage, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots to still be done in this file:

  • Rename the entire file
  • Rename all the headers eg System Module -> System Pallet
  • rename srml -> ?? (brought this up on riot chat)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the title, this is meant only to change links.

Other steps you can help with (which include what you mention here) are listed here: #324

The [System module](https://substrate.dev/rustdocs/master/frame_system/index.html) provides low-level types, storage, and
functions for your blockchain. All other modules depend on the System module as the basis of your
Substrate runtime.

Expand Down Expand Up @@ -51,7 +51,7 @@ for the runtime. It dispatches incoming extrinsic calls to the respective module

### Support Library

The [SRML support library](https://substrate.dev/rustdocs/master/palette_support/index.html) is a collection of Rust macros,
The [SRML support library](https://substrate.dev/rustdocs/master/frame_support/index.html) is a collection of Rust macros,
types, traits, and functions that simplify the development of Substrate runtime modules.

The support macros expand at compile time to generate code which is used by the runtime and reduce
Expand All @@ -73,14 +73,14 @@ The SRML contains a set of prebuilt runtime modules that can be used in your Sub
The Assets module is a simple, secure module for dealing with fungible assets.

* [Docs](https://substrate.dev/rustdocs/master/pallet_assets/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/assets/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs)

### Aura

The Aura module extends Aura consensus by managing offline reporting.

* [Docs](https://substrate.dev/rustdocs/master/pallet_aura/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/aura/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/aura/src/lib.rs)

### Authority Discovery

Expand All @@ -89,199 +89,199 @@ authorities, learn its own authority id, as well as to sign and verify messages
authorities.

* [Docs](https://substrate.dev/rustdocs/master/pallet_authority_discovery/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/authority-discovery/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/authority-discovery/src/lib.rs)

### Authorship

The Authorship module tracks the current author of the block and recent uncles.

* [Docs](https://substrate.dev/rustdocs/master/pallet_authorship/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/authorship/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/authorship/src/lib.rs)

### BABE

The BABE module extends BABE consensus by collecting on-chain randomness from VRF outputs and
managing epoch transitions.

* [Docs](https://substrate.dev/rustdocs/master/pallet_babe/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/babe/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/babe/src/lib.rs)

### Balances

The Balances module provides functionality for handling accounts and balances.

* [Docs](https://substrate.dev/rustdocs/master/pallet_balances/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/balances/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs)

### Collective

The Collective module allows a set of account IDs to make their collective feelings known through
dispatched calls from specialized origins.

* [Docs](https://substrate.dev/rustdocs/master/pallet_collective/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/collective/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/collective/src/lib.rs)

### Contracts

The Contracts module provides functionality for the runtime to deploy and execute WebAssembly
smart-contracts.

* [Docs](https://substrate.dev/rustdocs/master/pallet_contracts/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/contracts/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs)

### Democracy

The Democracy module provides a democratic system that handles administration of general stakeholder
voting.

* [Docs](https://substrate.dev/rustdocs/master/pallet_democracy/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/democracy/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs)

### Elections Phragmen

The Phragmen Elections module is an election module based on [sequential
phragmen](https://research.web3.foundation/en/latest/polkadot/NPoS/4.%20Sequential%20Phragm%C3%A9n%E2%80%99s%20method/).

* [Docs](https://substrate.dev/rustdocs/master/pallet_elections_phragmen/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/elections-phragmen/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/elections-phragmen/src/lib.rs)

### Elections

The Elections module is an election module for stake-weighted membership selection of a collective.

* [Docs](https://substrate.dev/rustdocs/master/pallet_elections/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/elections/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/elections/src/lib.rs)

### EVM

The EVM Module is an [Ethereum](https://en.wikipedia.org/wiki/Ethereum) virtual machine (EVM)
execution module for Substrate.

* [Docs](https://substrate.dev/rustdocs/master/pallet_evm/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/evm/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/evm/src/lib.rs)

### Example

The Example module is a simple example of a runtime module demonstrating concepts, APIs and
structures common to most runtime modules.

* [Docs](https://substrate.dev/rustdocs/master/pallet_example/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/example/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs)

### Finality Tracker

The Finality Tracker module tracks the last finalized block, as perceived by block authors.

* [Docs](https://substrate.dev/rustdocs/master/pallet_finality_tracker/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/finality-tracker/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/finality-tracker/src/lib.rs)

### Generic Asset

The Generic Asset module provides functionality for handling accounts and asset balances.

* [Docs](https://substrate.dev/rustdocs/master/pallet_generic_asset/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/generic-asset/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/generic-asset/src/lib.rs)

### GRANDPA

The GRANDPA module extends GRANDPA consensus by managing the GRANDPA authority set ready for the
native code.

* [Docs](https://substrate.dev/rustdocs/master/pallet_grandpa/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/grandpa/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/grandpa/src/lib.rs)

### I'm Online

The I'm Online module allows validators to gossip a heartbeat transaction with each new session to
signal that the node is online in the current era.

* [Docs](https://substrate.dev/rustdocs/master/pallet_im_online/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/im-online/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs)

### Indices

The Indices module allocates indices for newly created accounts. An index is a short form of an
address.

* [Docs](https://substrate.dev/rustdocs/master/pallet_indices/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/indices/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/indices/src/lib.rs)

### Membership

The Membership module allows control of membership of a set of `AccountId`s, useful for managing
membership of a collective.

* [Docs](https://substrate.dev/rustdocs/master/pallet_membership/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/membership/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/membership/src/lib.rs)

### Offences

The Offences module tracks reported offences.

* [Docs](https://substrate.dev/rustdocs/master/pallet_offences/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/offences/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/offences/src/lib.rs)

### Randomness Collective Flip

The Randomness Collective Flip module provides a `random` function that generates low-influence
random values based on the block hashes from the previous `81` blocks.

* [Docs](https://substrate.dev/rustdocs/master/pallet_randomness_collective_flip/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/randomness-collective-flip/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/randomness-collective-flip/src/lib.rs)

### Scored Pool

The Scored Pool module maintains a scored membership pool where the highest scoring entities are
made members.

* [Docs](https://substrate.dev/rustdocs/master/pallet_scored_pool/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/scored-pool/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/scored-pool/src/lib.rs)

### Session

The Session module allows validators to manage their session keys, provides a function for changing
the session length, and handles session rotation.

* [Docs](https://substrate.dev/rustdocs/master/pallet_session/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/session/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/session/src/lib.rs)

### Staking

The Staking module is used to manage funds at stake by network maintainers.

* [Docs](https://substrate.dev/rustdocs/master/pallet_staking/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/staking/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/staking/src/lib.rs)

### Sudo

The Sudo module allows for a single account (called the "sudo key") to execute dispatchable
functions that require a `Root` origin or designate a new account to replace them as the sudo key.

* [Docs](https://substrate.dev/rustdocs/master/pallet_sudo/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/sudo/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/sudo/src/lib.rs)

### Timestamp

The Timestamp module provides functionality to get and set the on-chain time.

* [Docs](https://substrate.dev/rustdocs/master/pallet_timestamp/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/timestamp/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/timestamp/src/lib.rs)

### Transaction Payment

The Transaction Payment module provides the basic logic needed to pay the absolute minimum amount
needed for a transaction to be included.

* [Docs](https://substrate.dev/rustdocs/master/pallet_transaction_payment/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/transaction-payment/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs)

### Treasury

The Treasury module provides a "pot" of funds that can be managed by stakeholders in the system and
a structure for making spending proposals from this pot.

* [Docs](https://substrate.dev/rustdocs/master/pallet_treasury/index.html)
* [Source](https://github.com/paritytech/substrate/blob/master/palette/treasury/src/lib.rs)
* [Source](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs)

## Next Steps

Expand All @@ -296,9 +296,9 @@ a structure for making spending proposals from this pot.

### References

- Visit the reference docs for the [System module](https://substrate.dev/rustdocs/master/palette_system/index.html).
- Visit the reference docs for the [System module](https://substrate.dev/rustdocs/master/frame_system/index.html).

- Visit the reference docs for the [Executive module](https://substrate.dev/rustdocs/master/pallet_executive/index.html).

- Visit the reference docs for the [SRML support
library](https://substrate.dev/rustdocs/master/palette_support/index.html).
library](https://substrate.dev/rustdocs/master/frame_support/index.html).
12 changes: 6 additions & 6 deletions docs/conceptual/runtime/weight.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A weight calculation should always:
implementation of the dispatch should take the state of the change into account and manually take
extra fees or bonds or take any other measures to make sure that the transaction is safe.

The [System module](https://substrate.dev/rustdocs/master/palette_system/struct.Module.html) is
The [System module](https://substrate.dev/rustdocs/master/frame_system/struct.Module.html) is
responsible for accumulating the weight of each block as it gets executed and making sure that it
does not exceed the limit. The [Transaction Payment
module](https://substrate.dev/rustdocs/master/pallet_transaction_payment/index.html) is responsible
Expand All @@ -40,13 +40,13 @@ filled with too many transactions. While processing transactions within a block,
accumulates both the total length of the block (sum of encoded transactions in bytes) and the total
weight of the block. If either of these numbers surpass the limits, no further transactions are
accepted in that block. These limits are defined in
[`MaximumBlockLength`](https://substrate.dev/rustdocs/master/palette_system/trait.Trait.html#associatedtype.MaximumBlockLength)
[`MaximumBlockLength`](https://substrate.dev/rustdocs/master/frame_system/trait.Trait.html#associatedtype.MaximumBlockLength)
and
[`MaximumBlockWeight`](https://substrate.dev/rustdocs/master/palette_system/trait.Trait.html#associatedtype.MaximumBlockLength).
[`MaximumBlockWeight`](https://substrate.dev/rustdocs/master/frame_system/trait.Trait.html#associatedtype.MaximumBlockLength).

One important note about these limits is that a portion of them are reserved for the `Operational`
dispatch class. This rule applies to both of the limits and the ratio can be found in
[`AvailableBlockRatio`](https://substrate.dev/rustdocs/master/palette_system/trait.Trait.html#associatedtype.AvailableBlockRatio).
[`AvailableBlockRatio`](https://substrate.dev/rustdocs/master/frame_system/trait.Trait.html#associatedtype.AvailableBlockRatio).

For example, if the block length limit is 1 megabyte and the ratio is set to 80%, all transactions
can fill the first 800 kilobytes of the block while the last 200 can only be filled by the
Expand All @@ -60,7 +60,7 @@ operational class.
weights](https://github.com/substrate-developer-hub/recipes/tree/master/kitchen/modules/weights)
and custom
[WeightToFee](https://github.com/substrate-developer-hub/recipes/tree/master/kitchen/runtimes/weight-fee-runtime).
- The [srml-example](https://github.com/paritytech/substrate/blob/master/palette/example/src/lib.rs)
- The [srml-example](https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs)
module.

### Examples
Expand All @@ -72,6 +72,6 @@ operational class.
### References

- Take a look at the [SRML Transaction Payment
module](https://github.com/paritytech/substrate/blob/master/palette/transaction-payment/src/lib.rs).
module](https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs).
- Find info about weights including the `SimpleDispatchInfo` enum in
[weights.rs](https://github.com/paritytech/substrate/blob/master/primitives/sr-primitives/src/weights.rs).
8 changes: 4 additions & 4 deletions docs/development/module/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ decl_module! {
}
```

The default behavior of this function is to call [`deposit_event`](https://substrate.dev/rustdocs/master/palette_system/struct.Module.html#method.deposit_event) from the SRML System module.
The default behavior of this function is to call [`deposit_event`](https://substrate.dev/rustdocs/master/frame_system/struct.Module.html#method.deposit_event) from the SRML System module.

This function places the event in the System module's runtime storage for that block. At the beginning of a new block, the System module automatically removes all events that were stored from the previous block.

Expand Down Expand Up @@ -113,8 +113,8 @@ View the following Substrate recipes to find examples of how runtime events are

### References

* Visit the reference docs for the [`decl_event!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.decl_event.html).
* Visit the reference docs for the [`decl_event!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_event.html).

* Visit the reference docs for the [`decl_module!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.decl_module.html).
* Visit the reference docs for the [`decl_module!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_module.html).

* Visit the reference docs for the [`construct_runtime!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.construct_runtime.html).
* Visit the reference docs for the [`construct_runtime!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.construct_runtime.html).
6 changes: 3 additions & 3 deletions docs/development/module/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ TODO

* Visit the reference docs for the [Executive module](https://substrate.dev/rustdocs/master/pallet_executive/index.html).

* Visit the reference docs for the [`decl_event!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.decl_event.html).
* Visit the reference docs for the [`decl_event!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_event.html).

* Visit the reference docs for the [`decl_storage!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.decl_storage.html).
* Visit the reference docs for the [`decl_storage!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_storage.html).

* Visit the reference docs for the [`construct_runtime!` macro](https://substrate.dev/rustdocs/master/palette_support/macro.construct_runtime.html).
* Visit the reference docs for the [`construct_runtime!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.construct_runtime.html).
2 changes: 1 addition & 1 deletion docs/development/module/fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ payment module drawing inspiration from Transaction Payment.
### Learn More

- Dedicated [weight documentation](conceptual/runtime/weight.md)
- [Example module](https://github.com/paritytech/substrate/blob/master/palette/example/src/lib.rs)
- [Example module](https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs)
- [SignedExtension](https://substrate.dev/rustdocs/master/sr_primitives/traits/trait.SignedExtension.html)

### Examples
Expand Down
Loading