From aa682a377d0c26a631cd362ba473193add046e63 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 27 May 2020 15:16:37 +0200 Subject: [PATCH 1/2] Partially fix pond spawn Signed-off-by: Jakub Sztandera --- lotuspond/spawn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lotuspond/spawn.go b/lotuspond/spawn.go index 4d8b8b9fd..5b0f7f704 100644 --- a/lotuspond/spawn.go +++ b/lotuspond/spawn.go @@ -171,7 +171,7 @@ func (api *api) SpawnStorage(fullNodeRepo string) (nodeInfo, error) { initArgs := []string{"init", "--nosync"} if fullNodeRepo == api.running[1].meta.Repo { presealPrefix := filepath.Join(fullNodeRepo, "preseal") - initArgs = []string{"init", "--actor=t01000", "--genesis-miner", "--pre-sealed-sectors=" + presealPrefix, "--pre-sealed-metadata=" + filepath.Join(presealPrefix, "pre-seal-t0101.json")} + initArgs = []string{"init", "--actor=t01000", "--genesis-miner", "--pre-sealed-sectors=" + presealPrefix, "--pre-sealed-metadata=" + filepath.Join(presealPrefix, "pre-seal-t01000.json")} } id := atomic.AddInt32(&api.cmds, 1) From 3f9cde28fc95fb8c367ec6e07e376588237953a9 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 27 May 2020 16:16:29 +0200 Subject: [PATCH 2/2] Update go-log, reduce drand entry log level, add TAG env for dev scripts Signed-off-by: Jakub Sztandera --- chain/beacon/drand/drand.go | 2 +- go.mod | 2 +- go.sum | 2 ++ scripts/dev/gen-daemon | 9 +++++---- scripts/dev/sminer-init | 5 ++++- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/chain/beacon/drand/drand.go b/chain/beacon/drand/drand.go index 39c185ee7..f5d6b2b41 100644 --- a/chain/beacon/drand/drand.go +++ b/chain/beacon/drand/drand.go @@ -106,7 +106,7 @@ func (db *DrandBeacon) Entry(ctx context.Context, round uint64) <-chan beacon.Re } go func() { - log.Warnw("fetching randomness", "round", round) + log.Infow("fetching randomness", "round", round) resp, err := db.client.Get(ctx, round) var br beacon.Response diff --git a/go.mod b/go.mod index 3a4912c92..b8fa35330 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf github.com/ipfs/go-ipld-format v0.2.0 github.com/ipfs/go-log v1.0.4 - github.com/ipfs/go-log/v2 v2.1.0 + github.com/ipfs/go-log/v2 v2.1.1 github.com/ipfs/go-merkledag v0.3.1 github.com/ipfs/go-path v0.0.7 github.com/ipfs/go-unixfs v0.2.4 diff --git a/go.sum b/go.sum index 7134301be..61e846c3d 100644 --- a/go.sum +++ b/go.sum @@ -480,6 +480,8 @@ github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscw github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.1.0 h1:7l5yjP7aLl5xr7RmqEvPZy9Skq7PP2fIP0Pa7lU/UII= github.com/ipfs/go-log/v2 v2.1.0/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= +github.com/ipfs/go-log/v2 v2.1.1 h1:G4TtqN+V9y9HY9TA6BwbCVyyBZ2B9MbCjR2MtGx8FR0= +github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= diff --git a/scripts/dev/gen-daemon b/scripts/dev/gen-daemon index ba896b5d6..62a07595d 100755 --- a/scripts/dev/gen-daemon +++ b/scripts/dev/gen-daemon @@ -3,8 +3,9 @@ set -o xtrace export TRUST_PARAMS=1 +tag=${TAG:-debug} -go run -tags=debug ./cmd/lotus-seed pre-seal --sector-size 2048 --num-sectors 2 -go run -tags=debug ./cmd/lotus-seed genesis new localnet.json -go run -tags=debug ./cmd/lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json -go run -tags=debug ./cmd/lotus daemon --lotus-make-genesis=devel.gen --genesis-template=localnet.json --bootstrap=false +go run -tags=$tag ./cmd/lotus-seed pre-seal --sector-size 2048 --num-sectors 2 +go run -tags=$tag ./cmd/lotus-seed genesis new localnet.json +go run -tags=$tag ./cmd/lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json +go run -tags=$tag ./cmd/lotus daemon --lotus-make-genesis=devel.gen --genesis-template=localnet.json --bootstrap=false diff --git a/scripts/dev/sminer-init b/scripts/dev/sminer-init index ce38d5ba2..2f4a3f7af 100755 --- a/scripts/dev/sminer-init +++ b/scripts/dev/sminer-init @@ -4,4 +4,7 @@ set -o xtrace export TRUST_PARAMS=1 -go run -tags=debug ./cmd/lotus-storage-miner init --actor=t0101 --genesis-miner --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t0101.json +tag=${TAG:-debug} + +go run -tags=$tag ./cmd/lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key +go run -tags=$tag ./cmd/lotus-storage-miner init --actor=t01000 --genesis-miner --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json