Skip to content

Commit

Permalink
Merge branch 'main' into patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi authored Aug 27, 2024
2 parents defab4f + c734112 commit c461228
Show file tree
Hide file tree
Showing 53 changed files with 255 additions and 423 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Default localhost port configuration:
```env
GATSBY_WEBSITE_URL=http://localhost:8100
GATSBY_DOCS_URL=http://localhost:8200
GATSBY_MARKETPLACE_URL=http://localhost:8300
GATSBY_CAREERS_URL=https://careers.substrate.io
```

**Start development server**
Expand Down
14 changes: 1 addition & 13 deletions config/menus.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { MARKETPLACE_URL, WEBSITE_URL, CAREERS_URL } = require('./webConsts.js');
const { WEBSITE_URL } = require('./webConsts.js');

/* the main menu, ids of items must match
the submenu's key of this js object */
Expand Down Expand Up @@ -58,14 +58,6 @@ const developers = [
url: 'https://paritytech.github.io/substrate/master/sc_service/',
id: 'developers.rustdocs',
},
{
url: MARKETPLACE_URL,
id: 'developers.marketplace',
},
{
url: WEBSITE_URL + '/developers/playground/',
id: 'developers.playground',
},
{
url: WEBSITE_URL + '/developers/smart-contracts/',
id: 'developers.smart-contracts',
Expand Down Expand Up @@ -132,10 +124,6 @@ const opportunities = [
url: WEBSITE_URL + '/ecosystem/opportunities/grants',
id: 'ecosystem.opportunities.grants',
},
{
url: CAREERS_URL,
id: 'ecosystem.opportunities.careers',
},
];

const resources = [
Expand Down
4 changes: 1 addition & 3 deletions config/siteMetadata.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const menus = require('./menus.js');
const { WEBSITE_URL, DOCS_URL, MARKETPLACE_URL, CAREERS_URL } = require('./webConsts.js');
const { WEBSITE_URL, DOCS_URL } = require('./webConsts.js');

module.exports = {
menus,
Expand All @@ -10,8 +10,6 @@ module.exports = {
siteUrl: DOCS_URL,
websiteUrl: WEBSITE_URL,
docsUrl: DOCS_URL,
marketplaceUrl: MARKETPLACE_URL,
careersUrl: CAREERS_URL,
author: 'Parity WebDev/W3F WebOps',
pressEmail: '[email protected]',
email: '[email protected]',
Expand Down
4 changes: 0 additions & 4 deletions config/webConsts.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
const WEBSITE_URL = process.env.GATSBY_WEBSITE_URL;
const DOCS_URL = process.env.GATSBY_DOCS_URL;
const MARKETPLACE_URL = process.env.GATSBY_MARKETPLACE_URL;
const CAREERS_URL = process.env.GATSBY_CAREERS_URL;

module.exports = {
WEBSITE_URL,
DOCS_URL,
MARKETPLACE_URL,
CAREERS_URL,
};
3 changes: 0 additions & 3 deletions content/locales/en/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"developers.home": "Home",
"developers.docs": "Docs",
"developers.rustdocs": "Rust Docs",
"developers.marketplace": "Marketplace",
"developers.playground": "Playground",
"developers.smart-contracts": "Smart Contracts",
"developers.substrate-connect": "Substrate Connect",
"developers.rococo-network": "Rococo Network",
Expand All @@ -32,7 +30,6 @@

"ecosystem.opportunities.hackathons": "Hackathons",
"ecosystem.opportunities.grants": "Grants",
"ecosystem.opportunities.careers": "Careers",

"ecosystem.resources.seminar": "Substrate Seminar",
"ecosystem.resources.past-seminars": "Past Seminars",
Expand Down
2 changes: 1 addition & 1 deletion content/md/en/docs/build/build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ This option is primarily used for faster compile time when you don't need to upd

## Where to go next

- [Wasm-builder README](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/utils/wasm-builder/README.md)
- [Wasm-builder source](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/utils/wasm-builder/src/lib.rs)
- [Rust compilation options](https://doc.rust-lang.org/cargo/commands/cargo-build.html#compilation-options)
- [Discussion: Removing the native runtime](https://github.com/paritytech/substrate/issues/10579)
5 changes: 5 additions & 0 deletions content/md/en/docs/build/genesis-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ description:
keywords:
---

<div class="warning">
<strong>⚠️ WARNING:</strong> This page contains outdated information. Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/frame_support/pallet_macros/attr.genesis_build.html">Rust docs</a> for the most up-to-date documentation on this topic.
</div>


The first block produced by any blockchain is referred to as the genesis block.
The hash associated with this block is the top-level parent of all blocks produced after that first block.

Expand Down
4 changes: 4 additions & 0 deletions content/md/en/docs/build/origins.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ keywords:
- origins
---

<div class="warning">
<strong>⚠️ WARNING:</strong> This page contains outdated information. Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_origin/index.html">Rust docs</a> for the most up-to-date documentation on this topic.
</div>

The runtime origin is used by dispatchable functions to check where a call has come from.

## Raw origins
Expand Down
9 changes: 9 additions & 0 deletions content/md/en/docs/build/pallet-coupling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ keywords:
- pallet design
---

<div class="warning">
<p>
<strong>⚠️ WARNING:</strong> This page contains potentially outdated information. Reading it might still be useful, yet we suggest taking it with a grain of salt.
</p>
<p>
Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_pallet_coupling/index.html">`polkadot-sdk-docs` crate</a> for the most up-to-date documentation on this topic.
</p>
</div>

The term **coupling** is often used to describe the degree to which two software modules depend on each other.
For example, in object-oriented programming tight coupling and loose coupling are used to describe the relationship between objects classes:

Expand Down
4 changes: 4 additions & 0 deletions content/md/en/docs/build/remote-procedure-calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ keywords:
- frontend
---

<div class="warning">
<strong>⚠️ WARNING:</strong> This page may contain outdated information. Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/custom_runtime_api_rpc/index.html">Rust docs</a> for the most up-to-date documentation on this topic.
</div>

Remote procedure calls, or RPC methods, are a way for an external program—for example, a browser or front-end application—to communicate with a Substrate node.
In general, these methods enable an RPC client to connect to an RPC server endpoint to request some type of service.
For example, you might use an RPC method to read a stored value, submit a transaction, or request information about the chain a node is connected to.
Expand Down
2 changes: 1 addition & 1 deletion content/md/en/docs/build/tx-weights-fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ use frame_support:: {
Pays::Yes,
},
weights::Weight,
};

#[pallet::weight(FunctionOf(
|args: (&Vec<User>,)| args.0.len().saturating_mul(10_000),
)
]

fn handle_users(origin, calls: Vec<User>) {
// Do something per user
}
Expand Down
4 changes: 2 additions & 2 deletions content/md/en/docs/deploy/keys-and-network-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ Session keys are private online keys that are used by validators to sign consens
Session keys must be available online to enable the validator to perform certain network operations.

These keys aren't used to control funds and they should only be used for their intended purpose.
They can be changed regularly
They can be changed regularly.
To create session keys, a validator node operator must use a controller account too generate a certificate signed with the session's public key.
The certificate attests that the key acts on behalf of the validator's staking account and nominators.
After creating the session key, the validator node operator informs the chain that this key represents the controller key by
publishing the session certificate in a transaction on the chain.
In most cases, node operators use the [Session](https://paritytech.github.io/substrate/master/pallet_session/index.html)) pallet to manage their session keys.
In most cases, node operators use the [Session](https://paritytech.github.io/substrate/master/pallet_session/index.html) pallet to manage their session keys.

The [`SessionKeys`](https://paritytech.github.io/substrate/master/sp_session/index.html)
trait is a generic, indexable type and you can declare any number of session keys in the runtime.
Expand Down
4 changes: 2 additions & 2 deletions content/md/en/docs/learn/accounts-addresses-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The secret seed phrase is important because it can be used to recover access to

For most networks, the **public key** associated with an account is how that account is identified on the network and some form of it is used as the destination address for transactions.
However, Substrate-based chains use the underlying public key to derive one or more **public addresses**.
Instead of using the public key directly, Substrate allows you generate multiple addresses and address formats for an account.
Instead of using the public key directly, Substrate allows you to generate multiple addresses and address formats for an account.

## Address encoding and chain-specific addresses

Expand Down Expand Up @@ -74,7 +74,7 @@ For more information about working with generic types, see [Rust for Substrate](

## Specialized accounts

As a flexible and module framework for blockchain development, Substrate itself doesn't require you define or use any specific type of accounts.
As a flexible and module framework for blockchain development, Substrate itself doesn't require you to define or use any specific type of accounts.
However, different chains can implement different rules for how accounts and the keys that control them are used.
For example, you might implement specialized accounts if your application requires:

Expand Down
2 changes: 0 additions & 2 deletions content/md/en/docs/learn/blockchain-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,3 @@ You can explore the following resources to learn more.
- [Build a local blockchain](/tutorials/build-a-blockchain/build-local-blockchain/)
- [Simulate a network](/tutorials/build-a-blockchain/simulate-network/)
- [Add trusted nodes](/tutorials/build-a-blockchain/add-trusted-nodes/)

If you prefer to explore code directly, you can start building in the [Substrate Playground](/playground/) or consult the API reference to get details about the Rust crates you use.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A few of the key benefits include:

You can use Substrate Connect to connect to any Substrate-based blockchain.
However, you must specify the correct name of the chain that you want to connect to.
There are a few well-known chain names that are defined for the [`WellKnownChain`](https://paritytech.github.io/substrate-connect/api/enums/connect_src.WellKnownChain.html) enumeration type.
There are a few well-known chain names that are defined for the [`WellKnownChain`](https://paritytech.github.io/substrate-connect/api/enums/_substrate_connect.WellKnownChain.html) enumeration type.

You can connect to the following public blockchain networks using the name listed:

Expand Down
9 changes: 9 additions & 0 deletions content/md/en/docs/learn/offchain-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ description: Highlights how you can integrate data from offchain sources into th
keywords:
---

<div class="warning">
<p>
<strong>⚠️ WARNING:</strong> This page contains potentially outdated information. Reading it might still be useful, yet we suggest taking it with a grain of salt.
</p>
<p>
Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_offchain_workers/index.html">`polkadot-sdk-docs` crate</a> for the most up-to-date documentation on this topic.
</p>
</div>

There are many use cases where you might want to query data from an offchain source or process data without using on-chain resources before updating the on-chain state.
The conventional way of incorporating offchain data involves connecting to [oracles](/reference/glossary#oracle) to supply the data from some traditional source.
Although using oracles is one approach to working with offchain data sources, there are limitations to the security, scalability, and infrastructure efficiency that oracles can provide.
Expand Down
1 change: 0 additions & 1 deletion content/md/en/docs/learn/runtime-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ pub mod pallet {
// Declare the pallet type
// This is a placeholder to implement traits and methods.
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);

// Add the runtime configuration trait
Expand Down
4 changes: 2 additions & 2 deletions content/md/en/docs/learn/rust-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Being the language of choice for Substrate, Rust is a highly performant programm

## Rust in Substrate

In the [Architecture]() section, you will learn that Substrate is made of two distinct architectural components: the outer node and the runtime.
In the [Architecture](/learn/architecture/) section, you will learn that Substrate is made of two distinct architectural components: the outer node and the runtime.
While more complex features in Rust such as multithreading and asynchronous Rust are used in the outer node code, they aren't directly exposed to runtime engineers, making it easier for runtime engineers to focus on the business logic of their node.

Generally, depending on their focus, developers should expect to know:
Expand All @@ -40,7 +40,7 @@ These macros allow you to focus on writing idiomatic Rust and application-specif

Rust macros are a powerful tool to help ensure certain requirements are met (without re-writing code) such as the logic to be formatted in a specific way, specific checks are made, or some logic consists of specific data structures.
This is especially useful to help developers write code that can integrate with the complexity of a Substrate runtime.
For example, the `#[frame_system::pallet]` macro is required in all FRAME pallets to help you correctly implement certain required attributes-such as storage items or externally callable functions-and make it compatible with the build process in `construct_runtime`.
For example, the `#[frame_support::pallet]` macro is required in all FRAME pallets to help you correctly implement certain required attributes-such as storage items or externally callable functions-and make it compatible with the build process in `construct_runtime`.

Developing Substrate runtimes involves heavy use of Rust's attribute macros, which come in two flavors: derive attributes and custom attributes.
When you're getting started with Substrate, it isn't so important to know exactly how they work, but rather to know that they exist that they empower you to write correct runtime code.
Expand Down
6 changes: 3 additions & 3 deletions content/md/en/docs/learn/transaction-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ If a transaction is invalid—for example, because it is too large or doesn't co
A transaction might be rejected for any of the following reasons:

- The transaction has already been included in a block so it is dropped from the verifying queue.
- The transaction's signature is invalid, so it is immediately be rejected.
- The transaction is too large to fit in the current block, so it is be put back in a queue for a new verification round.
- The transaction's signature is invalid, so it is immediately rejected.
- The transaction is too large to fit in the current block, so it is put back in a queue for a new verification round.

## Transactions ordered by priority

Expand Down Expand Up @@ -136,7 +136,7 @@ Before committing any state changes to storage, the runtime logic should perform

Note that [events](/build/events-and-errors/) are also written to storage.
Therefore, the runtime logic should not emit an event before performing the complementary actions.
If a transaction fails after an event is emitted, the event is not be reverted.
If a transaction fails after an event is emitted, the event is not reverted.

### Finalizing a block

Expand Down
8 changes: 4 additions & 4 deletions content/md/en/docs/learn/what-can-you-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Individual pallets are typically easy to develop by using FRAME and easy for Sub

### Writing correct code

It's worth noting that pallets don't inherently provide any of type of protection or safeguards that smart contracts provide.
It's worth noting that pallets don't inherently provide any type of protection or safeguards that smart contracts provide.
With pallets, you control the logic available for runtime developers to implement.
You provide the methods, storage items, events, and errors that your module requires.
Pallets don't inherently introduce a fee or metering system.
Expand All @@ -101,7 +101,7 @@ This lack of built-in safeguards implies that you have a great deal of responsib

### Pallets outside of runtime development

Often, writing a pallet is the gateway to runtime development, giving you the opportunity to experiment with existing pallets and coding patterns without building a compete blockchain application.
Often, writing a pallet is the gateway to runtime development, giving you the opportunity to experiment with existing pallets and coding patterns without building a complete blockchain application.
Individual pallets also provide an alternative way you can contribute to a project without writing your own application.

Although writing and testing pallets is typically a stepping stone to building larger scale application, there are many examples of the value individual pallets can have to the ecosystem as a whole.
Expand Down Expand Up @@ -170,7 +170,7 @@ The only requirement is that your parachain or parathread must be compatible wit

### Planning parachain resource requirements

As a parachain, your project can offer functionality to a broader community in a more secure way that a private chain or a solo chain.
As a parachain, your project can offer functionality to a broader community in a more secure way than a private chain or a solo chain.
However, if you want to build a production-ready parachain, you should keep the following additional requirements in mind:

- You'll need a development team with sufficient skills and experience, whether that means programming in Rust or a background in UX design.
Expand All @@ -196,7 +196,7 @@ For example, building a parachain might be the best option for the following use
- Digital wallets
- Internet of things (IOT) applications
- Gaming applications
- Web 3.0 infrastructureM
- Web 3.0 infrastructure

### Explore building a parachain

Expand Down
2 changes: 1 addition & 1 deletion content/md/en/docs/learn/xcm-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ There are several other registers in the XCVM to handle specific tasks.
For example, there's a surplus weight register to store any overestimation of fees and a refunded weight register to store the portion of surplus weight that has been refunded.
In general, you can't modify the values stored in the registers directly.
Instead, values are set when the XCM executor program starts and are manipulated by specific instructions, under certain circumstances, or according to certain rules.
FOr more information about what's contained in each register, see [XCM reference](/reference/xcm-reference/).
For more information about what's contained in each register, see [XCM reference](/reference/xcm-reference/).

### Configuration

Expand Down
2 changes: 1 addition & 1 deletion content/md/en/docs/maintain/runtime-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If a runtime upgrade requires changes to the existing state, it is likely to req

In [Build process](/main-docs/build/build-process/), you learned that compiling a node generated both a platform-native binary and a WebAssembly binary and that selecting which binary to use at different points in the block production process can be controlled by execution strategy command-line options.
The component that selects the runtime execution environment to communicate with is called the **executor**.
Although you can override the default execution strategies for custom scenarios, in most cases, or the executor select the appropriate binary to use by evaluating the following information for both the native and WebAssembly runtime binaries:
Although you can override the default execution strategies for custom scenarios, in most cases the executor select the appropriate binary to use by evaluating the following information for both the native and WebAssembly runtime binaries:

- `spec_name`
- `spec_version`
Expand Down
Loading

0 comments on commit c461228

Please sign in to comment.