Skip to content

Commit 8a8fb56

Browse files
authored
Merge pull request #8642 from filecoin-project/feat/nv16-bundles
[nv16] dynamic loading of builtin actor bundles
2 parents f0867a9 + 68b280b commit 8a8fb56

23 files changed

+395
-288
lines changed

.circleci/config.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ commands:
4848
- run: sudo apt-get install ocl-icd-opencl-dev libhwloc-dev
4949
- run: git submodule sync
5050
- run: git submodule update --init
51-
- fetch_builtin_actors
5251
download-params:
5352
steps:
5453
- restore_cache:
@@ -84,12 +83,6 @@ commands:
8483
name: fetch all tags
8584
command: |
8685
git fetch --all
87-
fetch_builtin_actors:
88-
steps:
89-
- run:
90-
name: fetch builtin actor bundles
91-
command: |
92-
build/builtin-actors/fetch-bundles.sh
9386
packer_build:
9487
description: "Run a packer build"
9588
parameters:

.circleci/template.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ commands:
4848
- run: sudo apt-get install ocl-icd-opencl-dev libhwloc-dev
4949
- run: git submodule sync
5050
- run: git submodule update --init
51-
- fetch_builtin_actors
5251
download-params:
5352
steps:
5453
- restore_cache:
@@ -84,12 +83,6 @@ commands:
8483
name: fetch all tags
8584
command: |
8685
git fetch --all
87-
fetch_builtin_actors:
88-
steps:
89-
- run:
90-
name: fetch builtin actor bundles
91-
command: |
92-
build/builtin-actors/fetch-bundles.sh
9386
packer_build:
9487
description: "Run a packer build"
9588
parameters:

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ build/.update-modules:
5757

5858
# end git modules
5959

60-
# builtin actor bundles
61-
builtin-actor-bundles:
62-
./build/builtin-actors/fetch-bundles.sh
63-
64-
BUILD_DEPS+=builtin-actor-bundles
65-
66-
.PHONY: builtin-actor-bundles
67-
6860
## MAIN BINARIES
6961

7062
CLEAN+=build/.update-modules
@@ -79,15 +71,19 @@ debug: GOFLAGS+=-tags=debug
7971
debug: build-devnets
8072

8173
2k: GOFLAGS+=-tags=2k
74+
2k: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=devnet
8275
2k: build-devnets
8376

8477
calibnet: GOFLAGS+=-tags=calibnet
78+
calibnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=calibrationnet
8579
calibnet: build-devnets
8680

8781
butterflynet: GOFLAGS+=-tags=butterflynet
82+
butterflynet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=butterflynet
8883
butterflynet: build-devnets
8984

9085
interopnet: GOFLAGS+=-tags=interopnet
86+
interopnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=caterpillarnet
9187
interopnet: build-devnets
9288

9389
lotus: $(BUILD_DEPS)

build/builtin-actors/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/builtin-actors/bundles.env

Lines changed: 0 additions & 2 deletions
This file was deleted.

build/builtin-actors/fetch-bundles.sh

Lines changed: 0 additions & 85 deletions
This file was deleted.

build/builtin_actors.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package build
2+
3+
import (
4+
"bytes"
5+
6+
"github.com/filecoin-project/lotus/chain/actors"
7+
8+
"github.com/BurntSushi/toml"
9+
)
10+
11+
var BuiltinActorReleases map[actors.Version]string
12+
13+
func init() {
14+
BuiltinActorReleases = make(map[actors.Version]string)
15+
16+
spec := BundleSpec{}
17+
18+
r := bytes.NewReader(BuiltinActorBundles)
19+
_, err := toml.DecodeReader(r, &spec)
20+
if err != nil {
21+
panic(err)
22+
}
23+
24+
for _, b := range spec.Bundles {
25+
BuiltinActorReleases[b.Version] = b.Release
26+
}
27+
}

build/builtin_actors_2k.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

build/builtin_actors_butterfly.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

build/builtin_actors_calibnet.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)