Skip to content

Commit 737ea93

Browse files
committed
docs: fmt all commonmark
1 parent c515ad3 commit 737ea93

32 files changed

+240
-127
lines changed

contracts/contracts/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ To do that, we use the `get_selectors` function from a script in Python.
3030

3131
## References
3232

33-
- [Introduction to EIP-2535 Diamonds](https://eip2535diamonds.substack.com/p/introduction-to-the-diamond-standard)
34-
- [ERC-2535: Diamonds, Multi-Facet Proxy](https://eips.ethereum.org/EIPS/eip-2535#facets-state-variables-and-diamond-storage)
35-
- [Understanding Diamonds on Ethereum](https://dev.to/mudgen/understanding-diamonds-on-ethereum-1fb)
33+
- [Introduction to EIP-2535 Diamonds](https://eip2535diamonds.substack.com/p/introduction-to-the-diamond-standard)
34+
- [ERC-2535: Diamonds, Multi-Facet Proxy](https://eips.ethereum.org/EIPS/eip-2535#facets-state-variables-and-diamond-storage)
35+
- [Understanding Diamonds on Ethereum](https://dev.to/mudgen/understanding-diamonds-on-ethereum-1fb)

contracts/ops/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
This directory includes a set of scripts to ease the deployment of the IPC Solidity contracts to any network using hardhat.
44

5-
- `deploy.sh`: Deploys the IPC solidity contracts into a specific network.
6-
- `compile-abi.sh`: Compiles all contracts and outputs the ABI for the high-level contracts in the desired folder (by default `./out`).
5+
- `deploy.sh`: Deploys the IPC solidity contracts into a specific network.
6+
- `compile-abi.sh`: Compiles all contracts and outputs the ABI for the high-level contracts in the desired folder (by default `./out`).

contracts/specs/PROPERTIES.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
List of identified and checked invariants of the IPC protocol following the categorization by [Certora](https://github.com/Certora/Tutorials/blob/master/06.Lesson_ThinkingProperties/Categorizing_Properties.pdf):
44

5-
- Valid States
6-
- State Transitions
7-
- Variable Transitions
8-
- High-Level Properties
9-
- Unit Tests
10-
- Valid States
11-
- State Transitions
12-
- Variable Transitions
13-
- High-Level Properties
14-
- Unit Tests
5+
- Valid States
6+
- State Transitions
7+
- Variable Transitions
8+
- High-Level Properties
9+
- Unit Tests
10+
- Valid States
11+
- State Transitions
12+
- Variable Transitions
13+
- High-Level Properties
14+
- Unit Tests
1515

1616
## Subnet Registry
1717

docs-gitbook/concepts/subnets/parent-child-interactions.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ There are following parent-child interactions available in IPC
1616

1717
6\. Removing child subnets from the IPC hierarchy.
1818

19-
20-
2119
## Checkpointing
2220

2321
Checkpointing is a method for a parent subnet to keep a record of the evolution of its child subnet’s state by including snapshots of the child’s state (called checkpoints) in the parent’s state. If, for some reason, the child subnet misbehaves as a whole, agreement can be reached in the parent subnet about how to proceed.
@@ -26,7 +24,6 @@ Checkpointed history of a child subnet cannot be reverted as long as a parent su
2624

2725
In case of subnet failure, checkpointing enables participants (e.g., former users of the failed subnet) to agree on picking up an older version of the child subnet’s state from before the occurrence of the failure and, say, use that version as the initial state of a new, more robust subnet.\
2826

29-
3027
### Checkpointing fees
3128

3229
There are a number of fees that are paid during checkpointing: 

docs-gitbook/developer-guides/deploy-blockscout.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# Deploying Blockscout on a local subnet
1+
# Deploying Blockscout on a local subnet
22

33
Before delving into this tutorial, you should have [deployed a local subnet](deploy-a-subnet). If you're connecting to an existing remote subnet and not following the guide, make sure that you have a local docker installation.
44

55
These are instructions for deploying a basic, non-customised, local subnet explorer. The resulting instance will not provide all Blockscout features not be appropriate for production use.
66

77
1. Get Blockscout
8+
89
```
910
git clone https://github.com/blockscout/blockscout
1011
cd ./blockscout/docker-compose
1112
```
1213

13-
2. Edit `./envs/common-blockscout.env` and set
14+
2. Edit `./envs/common-blockscout.env` and set
15+
1416
```
1517
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER=true
1618
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=true
@@ -21,6 +23,7 @@ The default setup assumes a local subnet with the Ethereum RPC on `localhost:854
2123
Some frontend calls use hardcoded absolute URLs. Unless you're only accessing the Blockscout interface on `localhost`, make sure to review the environmental variables in the different files under `./envs/` and adjust addresses (e.g. `BLOCKSCOUT_HOST` in `envs/common-blockscout.env` and `NEXT_PUBLIC_STATS_API_HOST` in `envs/common-frontend.env`. You'll also need to make sure the required ports are accessible (at least 80, 8080, and 8081).
2224

2325
3. Start Blockscout
26+
2427
```
2528
docker compose -f docker-compose-no-build-geth.yml up -d
2629
```

docs-gitbook/developer-guides/pluggable-syscall-tutorial.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ IPC uses the [Filecoin Virtual Machine (FVM)](https://docs.filecoin.io/smart-con
1515
* Extending chain-specific syscalls once IPC supports more root chains. Because other chains may have their own special syscalls different as Filecoin (proof validation, etc.).
1616
* Extending features to support better development tools. E.g. adding special debugging syscalls, adding randomness syscalls, and supporting more ECC curve, etc.
1717

18-
## Pre-requisite knowledge for tutorial:
18+
## Pre-requisite knowledge for tutorial
1919

2020
* [ref-fvm](https://github.com/filecoin-project/ref-fvm)
2121
* [fvm syscall APIs](https://docs.rs/fvm\_sdk/latest/fvm\_sdk/sys/index.html)
@@ -34,7 +34,7 @@ TIP: For clarity, the instructions may have skipped certain files (like long `Ca
3434
### **1. Define the custom syscall**
3535

3636
* In this example, we will be creating a simple syscall which accesses the filesystem. Inside syscalls, you can run external processes, link to rust libraries, access network, call other syscalls, etc.
37-
* We’ll call this new syscall `my_custom_syscall`and its defined as follows:
37+
* We’ll call this new syscall `my_custom_syscall`and its defined as follows:
3838

3939
```rust
4040
pub trait CustomKernel: Kernel {
@@ -43,7 +43,7 @@ TIP: For clarity, the instructions may have skipped certain files (like long `Ca
4343
```
4444

4545
[fendermint/vm/interpreter/src/fvm/examples/mycustomkernel.rs#L23](https://github.com/consensus-shipyard/ipc/blob/98497363a10e08236325e6d5c52755b9fcd52958/fendermint/vm/interpreter/src/fvm/examples/mycustomkernel.rs#L23)
46-
* Define a struct `CustomKernelImpl` which extends `DefaultKernel` . We use the `ambassador` crate to automatically delegate calls which reduces the boilerplate code we need to write. Here we simply delegate all calls to existing syscall to the `DefaultKernel`.
46+
* Define a struct `CustomKernelImpl` which extends `DefaultKernel` . We use the `ambassador` crate to automatically delegate calls which reduces the boilerplate code we need to write. Here we simply delegate all calls to existing syscall to the `DefaultKernel`.
4747

4848
```rust
4949
#[derive(Delegate)]
@@ -65,7 +65,7 @@ TIP: For clarity, the instructions may have skipped certain files (like long `Ca
6565

6666
### **2. Implementing all necessary functions for the syscall**
6767

68-
* Implement `my_custom_syscall`
68+
* Implement `my_custom_syscall`
6969

7070
Here is where we implement our custom syscall:
7171

@@ -166,11 +166,11 @@ where
166166
+ MessageOps
167167
+ NetworkOps
168168
+ RandomnessOps
169-
+ SelfOps,
169+
+ SelfOps,
170170
{
171-
fn link_syscalls(linker: &mut Linker<K>) -> anyhow::Result<()> {
171+
fn link_syscalls(linker: &mut Linker<K>) -> anyhow::Result<()> {
172172
DefaultKernel::<K::CallManager>::link_syscalls(linker)?;
173-
173+
174174
linker.link_syscall("my_custom_kernel", "my_custom_syscall", my_custom_syscall)?;
175175

176176
Ok(())
@@ -211,8 +211,7 @@ executor: DefaultExecutor<CustomKernelImpl<DefaultCallManager<DefaultMachine<DB,
211211

212212
### **6. Use syscall in your IPC subnet**
213213

214-
* Now, we are all set to use the custom syscall in the IPC subnet. The custom syscall can be called in IPC actors to utilize the extended feature. For this tutorial, we can create a simple actor to demonstrate how to import and call the custom syscall and then confirm that its working correctly.
215-
214+
* Now, we are all set to use the custom syscall in the IPC subnet. The custom syscall can be called in IPC actors to utilize the extended feature. For this tutorial, we can create a simple actor to demonstrate how to import and call the custom syscall and then confirm that its working correctly.
216215

217216
* Lets create a `customsyscall` folder in `ipc/fendermint/actors/` and then create a file called [actor.rs](https://github.com/consensus-shipyard/ipc/blob/98497363a10e08236325e6d5c52755b9fcd52958/fendermint/actors/customsyscall/src/actor.rs) in that new folder. Here we want to create a very simple actor, which when invoked (received a message on its Invoke method) will call the new syscall and return its value:
218217

docs-gitbook/developer-guides/upgrades/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ In this document, we describe how IPC achieves full upgradability of all its com
77
# IPC Actor upgrades
88

99
The on-chain logic for IPC is implemented in two contracts, the IPC gateway and the subnet actor, as well as an auxiliary contract use for UX purposes, the registry.
10+
1011
- The gateway is a singleton actor that lives in every IPC subnet and implements the common logic for IPC. It is responsible for managing the collateral of subnet, enforcing the firewall requirement, and the cross-net interactions.
1112
- The subnet actor is a user-defined actor that implements the specific logic of a subnet. This contract is deployed in the parent from which the child subnet wants to be deployed. There is one subnet-actor for each child subnet in the parent.
1213
- The subnet registry behaves as a subnet actor factory that offers users a convenient way of deploying instances of the reference implementation of the subnet actor in a network.
@@ -104,14 +105,14 @@ pub struct Upgrade {
104105
```
105106

106107
Fields:
108+
107109
- `chain_id`: The chain id the upgrade should be applied to.
108110
- `block_height`: The block height where the upgrade should be applied to and the `migration` function executed.
109111
- `new_app_version`: Indicates a new application protocol version if the upgrade introduces backward-incompatible changes.
110112
- `migration`: The migration function that is executed when applying the upgrade. The migration function is passed the `FvmExecState` which gives access to the `state_tree`, `block_store`, ability to send messages and more.
111113

112114
Fendermint supports scheduling multiple upgrades through its `UpgradeScheduler` API which is defined as follows:
113115

114-
115116
```rust
116117
struct UpgradeKey(ChainID, BlockHeight);
117118

@@ -219,4 +220,3 @@ halt_height = 0
219220
#### 5. Start the new Fendermint version
220221

221222
We can now start the new version of Fendermint which contains the upgrade we need.
222-

docs-gitbook/developer-guides/upgrades/patch-state.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Inside this migration function, we need to retrieve the actor state associated w
2020

2121
Our migration function is defined as follows:
2222

23-
2423
```rust
2524
pub fn patch_actor_state_func(state: &mut FvmExecState<NamespaceBlockstore>) -> anyhow::Result<()> {
2625
let state_tree = state.state_tree_mut();
@@ -90,4 +89,4 @@ let interpreter = FvmMessageInterpreter::<DB, _>::new(
9089
...
9190
scheduler,
9291
);
93-
```
92+
```

docs-gitbook/developer-guides/upgrades/upgrade-wasm-actor.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ To replace the existing `chainmetadata` actor that we deployed at genesis with t
1010

1111
Our migration function is defined as follows:
1212

13-
1413
```rust
1514
// The WASM binary of the new version of the chainmetadata actor.
1615
static WASM_BIN: &[u8] = include_bytes!("../output/fendermint_actor_chainmetadata_v2.wasm");
@@ -73,4 +72,4 @@ let interpreter = FvmMessageInterpreter::<DB, _>::new(
7372
...
7473
scheduler,
7574
);
76-
```
75+
```

docs-gitbook/quickstarts/deploy-a-subnet.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Several steps in this guide involve running long-lived processes. In each of the
1010

1111
### Step 1: Prepare your system
1212

13-
#### Install the basic requirements for IPC:
13+
#### Install the basic requirements for IPC
1414

1515
{% tabs %}
1616
{% tab title="Linux" %}
17+
1718
* Install system packages: `sudo apt install build-essential clang cmake pkg-config libssl-dev protobuf-compiler git curl`.
1819
* Install Rust. See [instructions](https://www.rust-lang.org/tools/install).
1920
* Install cargo-make: `cargo install --force cargo-make`.
@@ -25,9 +26,11 @@ Also install the following dependencies ([details](https://lotus.filecoin.io/lot
2526
```
2627
sudo apt update && sudo apt install build-essential libssl-dev mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang hwloc libhwloc-dev wget ca-certificates gnupg -y
2728
```
29+
2830
{% endtab %}
2931

3032
{% tab title="MacOS" %}
33+
3134
* Install Xcode from App Store or terminal: `xcode-select --install`
3235
* Install Homebrew. See [instructions](https://brew.sh/).
3336
* Install dependencies: `brew install jq`
@@ -38,14 +41,15 @@ sudo apt update && sudo apt install build-essential libssl-dev mesa-opencl-icd o
3841
{% endtab %}
3942
{% endtabs %}
4043

41-
#### Building:
44+
#### Building
4245

4346
{% hint style="info" %}
4447
NOTE: this step may take a while to compile, depending on OS version and hardware build
4548
{% endhint %}
4649

4750
{% tabs %}
4851
{% tab title="Linux" %}
52+
4953
```
5054
# make sure that rust has the wasm32 target & use stable version of rustc
5155
rustup target add wasm32-unknown-unknown
@@ -63,9 +67,11 @@ make
6367
./target/release/ipc-cli --version
6468
./target/release/fendermint --version
6569
```
70+
6671
{% endtab %}
6772

6873
{% tab title="MacOS" %}
74+
6975
```
7076
# make sure that rust has the wasm32 target & use stable version of rustc
7177
rustup target add wasm32-unknown-unknown
@@ -82,6 +88,7 @@ cargo build --release
8288
./target/release/ipc-cli --version
8389
./target/release/fendermint --version
8490
```
91+
8592
{% endtab %}
8693
{% endtabs %}
8794

@@ -91,10 +98,12 @@ cargo build --release
9198

9299
{% tabs %}
93100
{% tab title="Linux/MacOS" %}
101+
94102
```
95103
alias ipc-cli="cargo run -q -p ipc-cli --release --"
96104
ipc-cli config init
97105
```
106+
98107
{% endtab %}
99108
{% endtabs %}
100109

@@ -117,7 +126,7 @@ gateway_addr = "<GATEWAY_ADDR>"
117126
registry_addr = "<REGISTRY_ADDR>"
118127
```
119128

120-
* **Replace** the `gateway_addr` and `registry_addr` with the following values. Click on the badges below to take you to the source to copy and paste them or go to [this link](https://github.com/consensus-shipyard/ipc/blob/cd/contracts/deployments/r314159.json).
129+
* **Replace** the `gateway_addr` and `registry_addr` with the following values. Click on the badges below to take you to the source to copy and paste them or go to [this link](https://github.com/consensus-shipyard/ipc/blob/cd/contracts/deployments/r314159.json).
121130

122131
[![Gateway Address](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fconsensus-shipyard%2Fipc%2Fcd%2Fcontracts%2Fdeployments%2Fr314159.json\&query=%24.gateway\_addr\&label=Gateway%20Address)](https://github.com/consensus-shipyard/ipc/blob/cd/contracts/deployments/r314159.json)
123132

@@ -224,39 +233,40 @@ TIP: Highly recommend documenting that information which will be useful to boots
224233
#################################
225234
226235
Subnet ID:
227-
/r314159/t410f6b2qto756ox3qfoonq4ii6pdrylxwyretgpixuy
236+
/r314159/t410f6b2qto756ox3qfoonq4ii6pdrylxwyretgpixuy
228237
229238
Eth API:
230-
http://0.0.0.0:8545
239+
http://0.0.0.0:8545
231240
232241
Chain ID:
233-
3684170297508395
242+
3684170297508395
234243
235244
Fendermint API:
236-
http://localhost:26658
245+
http://localhost:26658
237246
238247
CometBFT API:
239-
http://0.0.0.0:26657
248+
http://0.0.0.0:26657
240249
241250
CometBFT node ID:
242-
ca644ac3194d39a2834f5d98e141d682772c149b
251+
ca644ac3194d39a2834f5d98e141d682772c149b
243252
244253
CometBFT P2P:
245-
http://0.0.0.0:26656
254+
http://0.0.0.0:26656
246255
247256
IPLD Resolver Multiaddress:
248-
/ip4/0.0.0.0/tcp/26655/p2p/16Uiu2HAkwhrWn9hYFQMR2QmW5Ky7HJKSGVkT8xKnQr1oUGCkqWms
257+
/ip4/0.0.0.0/tcp/26655/p2p/16Uiu2HAkwhrWn9hYFQMR2QmW5Ky7HJKSGVkT8xKnQr1oUGCkqWms
249258
```
250259

251260
You'll need the final component of the `IPLD Resolver Multiaddress` (the `peer ID`) and the `CometBFT node ID` for the next nodes to start.
252261

253-
* _**BOOTSTRAPS**_: \<CometBFT node ID for validator1>@validator-1-cometbft:26656
262+
* _**BOOTSTRAPS**_: \<CometBFT node ID for validator1>@validator-1-cometbft:26656
254263

255264
```
256265
// An example
257266
ca644ac3194d39a2834f5d98e141d682772c149b@validator-1-cometbft:26656
258267
```
259-
* _**RESOLVER\_BOOTSTRAPS**_: /dns/validator-1-fendermint/tcp/26655/p2p/\<Peer ID in IPLD Resolver Multiaddress>
268+
269+
* _**RESOLVER\_BOOTSTRAPS**_: /dns/validator-1-fendermint/tcp/26655/p2p/\<Peer ID in IPLD Resolver Multiaddress>
260270
261271
<pre><code>// An example
262272
<strong>/dns/validator-1-fendermint/tcp/26655/p2p/16Uiu2HAkwhrWn9hYFQMR2QmW5Ky7HJKSGVkT8xKnQr1oUGCkqWms

0 commit comments

Comments
 (0)