You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: documentation/misc/Building_a_network_skeleton.md
+7-17
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ There is a network skeleton in Lotus, which bubbles up all the other dependencie
99
99
- 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.
100
100
- 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);`
101
101
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)
103
103
104
104
2. In a seperate PR bump the Ref-FVM version:
105
105
@@ -115,7 +115,7 @@ You can take a look at [this Ref-FVM PR as a reference](https://github.com/filec
115
115
section. It may be appropriate to duplicate some entries across these crates if the changes are
116
116
relevant to multiple crates.
117
117
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).
119
119
120
120
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).
121
121
@@ -152,14 +152,14 @@ You can take a look at [this PR as a reference](https://github.com/filecoin-proj
152
152
- Commit the above changes with a `Delete migration specific for nvXX` message so its easier to review.
153
153
- 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.
154
154
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.
156
156
157
157
2. In a second PR based off your first PR, add a simple migration for the network upgrade:
158
158
159
159
- Copy the system.go template [^1], and add it to your `/builtin/vXX+1/migration` folder.
160
160
- Copy the top.go template [^2], and add it to your `/builtin/vXX+1/migration` folder.
161
161
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.
163
163
164
164
3. [Follow the release process](https://github.com/filecoin-project/go-state-types#release-process) to publish `v0.NEW_VERSION.0-dev`
165
165
@@ -173,23 +173,13 @@ You can take a look at [this PR as a reference](https://github.com/filecoin-proj
173
173
2. Patch the FVM-dependency (fvm4 and fvm4_shared) in`rust/cargo.toml` to use the newly published Ref-FVM release.
174
174
- Add `features = ["nvXX+1-dev"]`.
175
175
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.
177
177
178
178
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`
179
179
180
180
👉 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.
181
181
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.
193
183
194
184
## Lotus Checklist
195
185
@@ -268,7 +258,7 @@ And you're done! These are all the steps necessary to create a network upgrade s
268
258
- Complete the migration at upgrade epoch, with a successful upgrade.
269
259
- 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`
270
260
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.
0 commit comments