Skip to content

Commit c6fdf95

Browse files
authored
chore: update network skeleton docs (#12631)
1 parent a24d38d commit c6fdf95

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

documentation/misc/Building_a_network_skeleton.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ There is a network skeleton in Lotus, which bubbles up all the other dependencie
9999
- In fvm/src/machine/default.rs, locate the new function within your machine context. You'll find a SUPPORTED_VERSIONS constant that sets the range of supported network versions. Update this range to include the new network version. Do this by replacing the existing feature flag nvXX-dev and NetworkVersion::VXX with the new ones corresponding to your new network version.
100100
- In `shared/src/version/mod.rs`, in the `NetworkVersion` implementation, you will find a series of constants representing different network versions. To add a new network version, you need to declare a new constant: `pub const (VXX+1): Self = Self(XX+1);`
101101

102-
You can take a look at [this Ref-FVM PR as a reference](https://github.com/filecoin-project/ref-fvm/pull/2000), which added the skeleton for network version 23. You can also check out the [releasing primary FVM crates checklist here](https://github.com/filecoin-project/ref-fvm/blob/master/CONTRIBUTING.md#primary-fvm-crates)
102+
You can take a look at [this Ref-FVM PR as a reference](https://github.com/filecoin-project/ref-fvm/pull/2029), which added the skeleton for network version 24. You can also check out the [releasing primary FVM crates checklist here](https://github.com/filecoin-project/ref-fvm/blob/master/CONTRIBUTING.md#primary-fvm-crates)
103103

104104
2. In a seperate PR bump the Ref-FVM version:
105105

@@ -115,7 +115,7 @@ You can take a look at [this Ref-FVM PR as a reference](https://github.com/filec
115115
section. It may be appropriate to duplicate some entries across these crates if the changes are
116116
relevant to multiple crates.
117117

118-
You can take a look at [this PR as a reference](https://github.com/filecoin-project/ref-fvm/pull/2002).
118+
You can take a look at [this PR as a reference](https://github.com/filecoin-project/ref-fvm/pull/2030).
119119

120120
3. Wait for the PR to be merged and the reviewer to [publish a new release](https://github.com/filecoin-project/ref-fvm/blob/master/CONTRIBUTING.md#releasing).
121121

@@ -152,14 +152,14 @@ You can take a look at [this PR as a reference](https://github.com/filecoin-proj
152152
- Commit the above changes with a `Delete migration specific for nvXX` message so its easier to review.
153153
- Check your `/builtin/vXX+1/check.go` file, and see if there is any Invariant TODOs that stems from the previous migration that needs to be cleaned up.
154154

155-
👉 You can take a look at this [Go-State-Types PR as a reference](https://github.com/filecoin-project/go-state-types/pull/257), which added the skeleton for network version 23.
155+
👉 You can take a look at this [Go-State-Types PR as a reference](https://github.com/filecoin-project/go-state-types/pull/299), which added the skeleton for network version 24.
156156

157157
2. In a second PR based off your first PR, add a simple migration for the network upgrade:
158158

159159
- Copy the system.go template [^1], and add it to your `/builtin/vXX+1/migration` folder.
160160
- Copy the top.go template [^2], and add it to your `/builtin/vXX+1/migration` folder.
161161

162-
👉 You can take a look at this [Go-State-Types PR as a reference](https://github.com/filecoin-project/go-state-types/pull/258), which added a simple migration for network version 23.
162+
👉 You can take a look at this [Go-State-Types PR as a reference](https://github.com/filecoin-project/go-state-types/pull/304), which added a simple migration for network version 24.
163163

164164
3. [Follow the release process](https://github.com/filecoin-project/go-state-types#release-process) to publish `v0.NEW_VERSION.0-dev`
165165

@@ -173,23 +173,13 @@ You can take a look at [this PR as a reference](https://github.com/filecoin-proj
173173
2. Patch the FVM-dependency (fvm4 and fvm4_shared) in `rust/cargo.toml` to use the newly published Ref-FVM release.
174174
- Add `features = ["nvXX+1-dev"]`.
175175

176-
👉 You can take a look at this [Filecoin-FFI PR as a reference](https://github.com/filecoin-project/filecoin-ffi/pull/454), which added the skeleton for network version 23.
176+
👉 You can take a look at this [Filecoin-FFI PR as a reference](https://github.com/filecoin-project/filecoin-ffi/pull/479), which added the skeleton for network version 24.
177177

178178
3. [Follow the release process](https://github.com/filecoin-project/filecoin-ffi/blob/master/RELEASE.md) to publish `v1.NEW_LOTUS_MINOR_VERSION.0-dev`
179179

180180
👉 You can take a look at this [Filecoin-FFI PR as a reference](https://github.com/filecoin-project/filecoin-ffi/pull/481), which was for network version 24.
181181

182-
Note: one only needs to update `filecion-ffi`'s dependency on `go-state-types` when a network upgrade is introducing new types in `go-state-types` (see [below](#new-types-in-go-state-types)). Otherwise, `filecion-ffi`'s dependency on `go-state-types` is just updated when doing fiinal releases before the network upgrade.
183-
184-
## Filecoin-FFI Checklist
185-
186-
1. Update the `TryFrom<u32>` implementation for `EngineVersion` in `rust/src/fvm/engine.rs`
187-
- Add the new network version number (XX+1) to the existing match arm for the network version.
188-
189-
2. Patch the FVM-dependency (fvm4 and fvm4_shared) in `rust/cargo.toml` to use the newly published Ref-FVM release.
190-
- Add `features = ["nvXX+1-dev"]`.
191-
192-
You can take a look at this [Filecoin-FFI PR as a reference](https://github.com/filecoin-project/filecoin-ffi/pull/454), which added the skeleton for network version 23.
182+
Note: one only needs to update `filecion-ffi`'s dependency on `go-state-types` when a network upgrade is introducing new types in `go-state-types` (see [below](#new-types-in-go-state-types)). Otherwise, `filecion-ffi`'s dependency on `go-state-types` is just updated when doing fiinal releases before the network upgrade.
193183

194184
## Lotus Checklist
195185

@@ -268,7 +258,7 @@ And you're done! These are all the steps necessary to create a network upgrade s
268258
- Complete the migration at upgrade epoch, with a successful upgrade.
269259
- Sync the new network version with the mock actor bundle, and be able to see that you are on a new network version with `lotus state network-version`
270260
271-
You can take a look at this [Lotus PR as a reference](https://github.com/filecoin-project/lotus/pull/11964), which added the skeleton for network version 23.
261+
You can take a look at this [Lotus PR as a reference](https://github.com/filecoin-project/lotus/pull/12419) and [this](https://github.com/filecoin-project/lotus/pull/12455), which added the skeleton for network version 24.
272262
273263
## Special Cases
274264

0 commit comments

Comments
 (0)