-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8642 from filecoin-project/feat/nv16-bundles
[nv16] dynamic loading of builtin actor bundles
- Loading branch information
Showing
23 changed files
with
395 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package build | ||
|
||
import ( | ||
"bytes" | ||
|
||
"github.com/filecoin-project/lotus/chain/actors" | ||
|
||
"github.com/BurntSushi/toml" | ||
) | ||
|
||
var BuiltinActorReleases map[actors.Version]string | ||
|
||
func init() { | ||
BuiltinActorReleases = make(map[actors.Version]string) | ||
|
||
spec := BundleSpec{} | ||
|
||
r := bytes.NewReader(BuiltinActorBundles) | ||
_, err := toml.DecodeReader(r, &spec) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
for _, b := range spec.Bundles { | ||
BuiltinActorReleases[b.Version] = b.Release | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package build | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/filecoin-project/lotus/chain/actors" | ||
) | ||
|
||
var NetworkBundle string | ||
|
||
//go:embed bundles.toml | ||
var BuiltinActorBundles []byte | ||
|
||
type BundleSpec struct { | ||
Bundles []Bundle | ||
} | ||
|
||
type Bundle struct { | ||
Version actors.Version | ||
Release string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[[bundles]] | ||
version = 8 | ||
release = "b71c2ec785aec23d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.