From b4be759b2c453dd409295d77095a301296a07057 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 16 May 2022 15:11:10 +0300 Subject: [PATCH] don't store dev bundle release keys in the datastore This is a nicety for development, so that we always load a development bundle to avoid having to give them distinct names etc. Just call you release "dev" or "dev.xxx..." and put the bundle in `.lotus/builtin-actors/v8/dev/builting-actors-${network}.{car,sha256sum}` and it will be unconditionally loaded. --- node/modules/builtin_actors.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/node/modules/builtin_actors.go b/node/modules/builtin_actors.go index 05b6e9e32..991372526 100644 --- a/node/modules/builtin_actors.go +++ b/node/modules/builtin_actors.go @@ -2,6 +2,7 @@ package modules import ( "fmt" + "strings" "sync" "go.uber.org/fx" @@ -71,6 +72,11 @@ func LoadBuiltinActors(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRe return result, err } + if rel == "dev" || strings.HasPrefix(rel, "dev.") { + // don't store the release key so that we always load development bundles + continue + } + // add the release key with the manifest to avoid reloading it in next restart. if err := ds.Put(ctx, key, mfCid.Bytes()); err != nil { return result, xerrors.Errorf("error storing manifest CID for builtin-actors vrsion %d to the datastore: %w", av, err)