From d36245c7c7a598d1dcd0c4e3a0467766ccf4e6b3 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Tue, 30 Jan 2024 16:25:16 -0600 Subject: [PATCH 01/63] cfg edit 1 --- provider/lpweb/api/apihelper/apihelper.go | 19 ++++ provider/lpweb/api/config/config.go | 117 ++++++++++++++++++++++ provider/lpweb/api/routes.go | 2 + provider/lpweb/static/edit-config.html | 39 ++++++++ 4 files changed, 177 insertions(+) create mode 100644 provider/lpweb/api/apihelper/apihelper.go create mode 100644 provider/lpweb/api/config/config.go create mode 100644 provider/lpweb/static/edit-config.html diff --git a/provider/lpweb/api/apihelper/apihelper.go b/provider/lpweb/api/apihelper/apihelper.go new file mode 100644 index 00000000000..151c6af8709 --- /dev/null +++ b/provider/lpweb/api/apihelper/apihelper.go @@ -0,0 +1,19 @@ +package apihelper + +import ( + "net/http" + "runtime/debug" + + logging "github.com/ipfs/go-log/v2" +) + +var log = logging.Logger("lp/web/apihelper") + +func OrHTTPFail(w http.ResponseWriter, err error) { + if err != nil { + w.WriteHeader(500) + w.Write([]byte(err.Error())) + log.Errorw("http fail", "err", err, "stack", string(debug.Stack())) + panic(err) + } +} diff --git a/provider/lpweb/api/config/config.go b/provider/lpweb/api/config/config.go new file mode 100644 index 00000000000..267d11e5828 --- /dev/null +++ b/provider/lpweb/api/config/config.go @@ -0,0 +1,117 @@ +package config + +import ( + "bytes" + "context" + "encoding/json" + "net/http" + "strings" + + "github.com/BurntSushi/toml" + "github.com/gorilla/mux" + "github.com/invopop/jsonschema" + + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/provider/lpweb/api/apihelper" +) + +type cfg struct { + *deps.Deps +} + +func Routes(r *mux.Router, deps *deps.Deps) { + c := &cfg{deps} + r.Methods("GET").Path("/schema").HandlerFunc(getSch) + r.Methods("GET").Path("/layers").HandlerFunc(c.getLayers) + r.Methods("GET").Path("/topo").HandlerFunc(c.topo) + r.Methods("GET").Path("/layers/{layer}").HandlerFunc(c.getLayer) + r.Methods("POST").Path("/layers/{layer}").HandlerFunc(c.setLayer) +} +func getSch(w http.ResponseWriter, r *http.Request) { + sch := jsonschema.Reflect(config.LotusProviderConfig{}) + + // add comments + for k, doc := range config.Doc { + item, ok := sch.Properties.Get(strings.ToLower(k)) + if !ok { + continue + } + for _, line := range doc { + item, ok := item.Properties.Get(strings.ToLower(line.Name)) + if !ok { + continue + } + item.Description = line.Comment + } + } + + apihelper.OrHTTPFail(w, json.NewEncoder(w).Encode(sch)) +} + +func (c *cfg) getLayers(w http.ResponseWriter, r *http.Request) { + var layers []string + apihelper.OrHTTPFail(w, c.DB.Select(context.Background(), &layers, `SELECT title FROM harmony_config ORDER BY title`)) + apihelper.OrHTTPFail(w, json.NewEncoder(w).Encode(layers)) +} + +func (c *cfg) getLayer(w http.ResponseWriter, r *http.Request) { + var layer string + apihelper.OrHTTPFail(w, c.DB.Select(context.Background(), &layer, `SELECT config FROM harmony_config WHERE title = $1`, mux.Vars(r)["layer"])) + + // Read the TOML into a struct + configStruct := map[string]any{} // NOT lotusproviderconfig b/c we want to preserve unsets + _, err := toml.Decode(layer, &configStruct) + apihelper.OrHTTPFail(w, err) + + // Encode the struct as JSON + jsonData, err := json.Marshal(configStruct) + apihelper.OrHTTPFail(w, err) + + // Write the JSON response + w.Header().Set("Content-Type", "application/json") + _, err = w.Write(jsonData) + apihelper.OrHTTPFail(w, err) +} + +func (c *cfg) setLayer(w http.ResponseWriter, r *http.Request) { + layer := mux.Vars(r)["layer"] + var configStruct map[string]any + apihelper.OrHTTPFail(w, json.NewDecoder(r.Body).Decode(&configStruct)) + + // Encode the struct as TOML + var tomlData bytes.Buffer + err := toml.NewEncoder(&tomlData).Encode(configStruct) + apihelper.OrHTTPFail(w, err) + + // Write the TOML to the database + _, err = c.DB.Exec(context.Background(), `INSERT INTO harmony_config (title, config) VALUES ($1, $2) ON CONFLICT (title) DO UPDATE SET config = $2`, layer, tomlData.String()) + apihelper.OrHTTPFail(w, err) +} + +func (c *cfg) topo(w http.ResponseWriter, r *http.Request) { + var topology []struct { + Server string + LastContact int64 + CPU int + GPU int + RAM int + //LayersCSV string `db:"layers"` + } + apihelper.OrHTTPFail(w, c.DB.Select(context.Background(), &topology, ` + SELECT + harmony_machines.host_and_port as server, last_contact + cpu, gpu, ram +FROM harmony_machines +ORDER BY server`, + /*` + SELECT + COALESCE(harmony_machines.host_and_port, harmony_layers.host_and_port) as server, + cpu, gpu, ram, layers + FROM harmony_machines + FULL JOIN harmony_layers + ON harmony_machines.host_and_port = harmony_layers.host_and_port + ORDER BY server`*/)) + w.Header().Set("Content-Type", "application/json") + apihelper.OrHTTPFail(w, json.NewEncoder(w).Encode(topology)) +} diff --git a/provider/lpweb/api/routes.go b/provider/lpweb/api/routes.go index 85b17486f70..34d446fac27 100644 --- a/provider/lpweb/api/routes.go +++ b/provider/lpweb/api/routes.go @@ -5,9 +5,11 @@ import ( "github.com/gorilla/mux" "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/provider/lpweb/api/config" "github.com/filecoin-project/lotus/provider/lpweb/api/debug" ) func Routes(r *mux.Router, deps *deps.Deps) { debug.Routes(r.PathPrefix("/debug").Subrouter(), deps) + config.Routes(r.PathPrefix("/config").Subrouter(), deps) } diff --git a/provider/lpweb/static/edit-config.html b/provider/lpweb/static/edit-config.html new file mode 100644 index 00000000000..d801c411f2c --- /dev/null +++ b/provider/lpweb/static/edit-config.html @@ -0,0 +1,39 @@ + + + + JSON Schema Editor + + + + +
+ + + + From fb86554c12dba6dc2697ff52f6fbfe2d66316c7f Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Thu, 1 Feb 2024 11:37:16 -0600 Subject: [PATCH 02/63] jsonschema deps --- go.mod | 4 ++++ go.sum | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/go.mod b/go.mod index c1b353fab4a..e3f10ff2dd6 100644 --- a/go.mod +++ b/go.mod @@ -173,9 +173,11 @@ require ( github.com/StackExchange/wmi v1.2.1 // indirect github.com/akavel/rsrc v0.8.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect + github.com/buger/jsonparser v1.1.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cilium/ebpf v0.9.1 // indirect @@ -225,6 +227,7 @@ require ( github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/huin/goupnp v1.2.0 // indirect github.com/iancoleman/orderedmap v0.1.0 // indirect + github.com/invopop/jsonschema v0.12.0 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect github.com/ipfs/go-blockservice v0.5.1 // indirect github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect @@ -309,6 +312,7 @@ require ( github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect diff --git a/go.sum b/go.sum index a7983d80cd1..8cc338de281 100644 --- a/go.sum +++ b/go.sum @@ -102,6 +102,8 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -135,6 +137,8 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/buger/goterm v1.0.3 h1:7V/HeAQHrzPk/U4BvyH2g9u+xbUW9nr4yRPyG59W4fM= github.com/buger/goterm v1.0.3/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -630,6 +634,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= +github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= @@ -1635,6 +1641,8 @@ github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84 github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= +github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= +github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= From f6f4d0e8e42e40ceeaaa284b88207f6c43a7623b Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 12 Feb 2024 17:52:04 -0600 Subject: [PATCH 03/63] feat: lp mig - first few steps --- cmd/lotus-provider/deps/deps.go | 71 +++- cmd/lotus-provider/guidedSetup/guidedSetup.go | 332 +++++++++++++++ .../internal/translations/catalog.go | 184 ++++++++ .../translations/locales/en/out.gotext.json | 400 ++++++++++++++++++ .../locales/ko/messages.gotext.json | 321 ++++++++++++++ .../translations/locales/ko/out.gotext.json | 330 +++++++++++++++ .../locales/zh/messages.gotext.json | 321 ++++++++++++++ .../translations/locales/zh/out.gotext.json | 330 +++++++++++++++ .../internal/translations/translations.go | 13 + cmd/lotus-provider/main.go | 3 +- cmd/lotus-provider/proving.go | 4 + cmd/lotus-provider/run.go | 3 + cmd/lotus-provider/stop.go | 2 + go.mod | 13 +- go.sum | 20 +- 15 files changed, 2327 insertions(+), 20 deletions(-) create mode 100644 cmd/lotus-provider/guidedSetup/guidedSetup.go create mode 100644 cmd/lotus-provider/internal/translations/catalog.go create mode 100644 cmd/lotus-provider/internal/translations/locales/en/out.gotext.json create mode 100644 cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json create mode 100644 cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json create mode 100644 cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json create mode 100644 cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json create mode 100644 cmd/lotus-provider/internal/translations/translations.go diff --git a/cmd/lotus-provider/deps/deps.go b/cmd/lotus-provider/deps/deps.go index 7a8db855f97..b7744bab2d5 100644 --- a/cmd/lotus-provider/deps/deps.go +++ b/cmd/lotus-provider/deps/deps.go @@ -10,6 +10,8 @@ import ( "net" "net/http" "os" + "path/filepath" + "regexp" "strings" "github.com/BurntSushi/toml" @@ -44,14 +46,59 @@ import ( var log = logging.Logger("lotus-provider/deps") func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { - dbConfig := config.HarmonyDB{ - Username: cctx.String("db-user"), - Password: cctx.String("db-password"), - Hosts: strings.Split(cctx.String("db-host"), ","), - Database: cctx.String("db-name"), - Port: cctx.String("db-port"), + // #1 CLI opts + fromCLI := func() (*harmonydb.DB, error) { + dbConfig := config.HarmonyDB{ + Username: cctx.String("db-user"), + Password: cctx.String("db-password"), + Hosts: strings.Split(cctx.String("db-host"), ","), + Database: cctx.String("db-name"), + Port: cctx.String("db-port"), + } + return harmonydb.NewFromConfig(dbConfig) + } + + // #2 Try local miner config + fromMiner := func() (*harmonydb.DB, error) { + u, err := os.UserHomeDir() + if err != nil { + return nil, err + } + b, err := os.ReadFile(filepath.Join(u, ".lotus", "config.toml")) + if err != nil { + return nil, err + } + cfg := config.DefaultStorageMiner() + if _, err := toml.Decode(string(b), &cfg); err != nil { + return nil, err + } + return harmonydb.NewFromConfig(cfg.HarmonyDB) + } + fromEnv := func() (*harmonydb.DB, error) { + // #3 Try env + sqlurlRegexp := `://(?P[^:]+):(?P[^@]+)@(?P[^:]+):(?P[^/]+)/(?P.+)$` + ss := regexp.MustCompile(sqlurlRegexp).FindStringSubmatch(os.Getenv("LOTUS_DB")) + if len(ss) == 0 { + return nil, errors.New("no db connection string found in LOTUS_DB env") + } + return harmonydb.NewFromConfig(config.HarmonyDB{ + Username: ss[1], + Password: ss[2], + Hosts: []string{ss[3]}, + Port: ss[4], + Database: ss[5], + }) + } + + for _, f := range []func() (*harmonydb.DB, error){fromCLI, fromMiner, fromEnv} { + db, err := f() + if err != nil { + continue + } + return db, nil } - return harmonydb.NewFromConfig(dbConfig) + log.Error("No db connection string found. User CLI args or env var: set LOTUS_DB=postgres://user:pass@host:port/dbname") + return fromCLI() //in-case it's not about bad config. } type JwtPayload struct { @@ -90,17 +137,17 @@ func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) { } type Deps struct { - Cfg *config.LotusProviderConfig - DB *harmonydb.DB + Cfg *config.LotusProviderConfig // values + DB *harmonydb.DB // has itest capability Full api.FullNode Verif storiface.Verifier LW *sealer.LocalWorker As *ctladdr.AddressSelector - Maddrs []dtypes.MinerAddress + Maddrs []dtypes.MinerAddress // values Stor *paths.Remote Si *paths.DBIndex - LocalStore *paths.Local - ListenAddr string + LocalStore *paths.Local // value + ListenAddr string // value } const ( diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/lotus-provider/guidedSetup/guidedSetup.go new file mode 100644 index 00000000000..e8a690ee516 --- /dev/null +++ b/cmd/lotus-provider/guidedSetup/guidedSetup.go @@ -0,0 +1,332 @@ +// guidedSetup for migration from lotus-miner to lotus-provider +// +// IF STRINGS CHANGED { +// follow instructions at ../internal/translations/translations.go +// } +package guidedSetup + +import ( + "context" + "fmt" + "os" + "os/signal" + "path" + "reflect" + "strings" + "syscall" + "time" + + "github.com/BurntSushi/toml" + "github.com/manifoldco/promptui" + "github.com/samber/lo" + + _ "github.com/filecoin-project/lotus/cmd/lotus-provider/internal/translations" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/node/config" + + "github.com/charmbracelet/lipgloss" + "github.com/urfave/cli/v2" + "golang.org/x/text/language" + "golang.org/x/text/message" +) + +var GuidedsetupCmd = &cli.Command{ + Name: "guided-setup", + Usage: "Run the guided setup for migrating from lotus-miner to lotus-provider", + Action: func(cctx *cli.Context) (err error) { + T, say := SetupLanguage() + setupCtrlC(say) + + say(header, "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.") + + say(notice, "This tool confirms each action it does.") + + // Run the migration steps + migrationData := MigrationData{ + T: T, + say: say, + selectTemplates: &promptui.SelectTemplates{ + Help: T("Use the arrow keys to navigate: ↓ ↑ → ← "), + }, + } + for _, step := range migrationSteps { + step(&migrationData) + } + return nil + }, +} + +func setupCtrlC(say func(style lipgloss.Style, key message.Reference, a ...interface{})) { + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + go func() { + <-c + say(notice, "Ctrl+C pressed in Terminal") + os.Exit(2) + }() +} + +var ( + header = lipgloss.NewStyle(). + Align(lipgloss.Left). + Foreground(lipgloss.Color("#00FF00")). + Background(lipgloss.Color("#242424")). + BorderStyle(lipgloss.NormalBorder()). + Width(60).Margin(1) + + notice = lipgloss.NewStyle(). + Align(lipgloss.Left). + Bold(true). + Background(lipgloss.Color("#FFFF00")).MarginBottom(1) + + green = lipgloss.NewStyle(). + Align(lipgloss.Left). + Foreground(lipgloss.Color("#00FF00")) + + plain = lipgloss.NewStyle().Align(lipgloss.Left) + + section = lipgloss.NewStyle(). + Align(lipgloss.Left). + Foreground(lipgloss.Color("black")). + Background(lipgloss.Color("#FFFFFF")). + Underline(true) +) + +type migrationStep func(*MigrationData) + +func SetupLanguage() (func(key message.Reference, a ...interface{}) string, func(style lipgloss.Style, key message.Reference, a ...interface{})) { + lang, err := language.Parse(os.Getenv("LANG")[:2]) + if err != nil { + lang = language.English + fmt.Println("Error parsing language, defaulting to English") + } + + langs := message.DefaultCatalog.Languages() + have := lo.SliceToMap(langs, func(t language.Tag) (string, bool) { return t.String(), true }) + if _, ok := have[lang.String()]; !ok { + lang = language.English + notice.Copy().AlignHorizontal(lipgloss.Right). + Render("$LANG unsupported. Avaiable: " + strings.Join(lo.Keys(have), ", ")) + } + return func(key message.Reference, a ...interface{}) string { + return message.NewPrinter(lang).Sprintf(key, a...) + }, func(sty lipgloss.Style, key message.Reference, a ...interface{}) { + msg := message.NewPrinter(lang).Sprintf(key, a...) + fmt.Println(sty.Render(msg)) + } +} + +var migrationSteps = []migrationStep{ + readMinerConfig, // Tells them to be on the miner machine + yugabyteConnect, // Miner is updated + verifySectors, // Verify the sectors are in the database + configToDB, // work on base configuration migration. + // probably should add default layers for enabling features. + // probably should add a web layer for the web interface. + // This is where Boost configuration can be completed. + // Ask if they want to report their MinerID as one that's running Provider +} + +type MigrationData struct { + T func(key message.Reference, a ...interface{}) string + say func(style lipgloss.Style, key message.Reference, a ...interface{}) + selectTemplates *promptui.SelectTemplates + MinerConfigPath string + MinerConfig *config.StorageMiner + *harmonydb.DB +} + +func configToDB(d *MigrationData) { + d.say(section, "Migrating configuration to database.") + d.say(notice, "This step will migrate the configuration from the config.toml to the database.\n") + d.say(plain, `A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\n`) + + type rawConfig struct { + Raw []byte `db:"config"` + Title string + } + var configBytes []rawConfig + err := d.Select(context.Background(), &configBytes, `SELECT config, title FROM harmony_config `) + if err != nil { + d.say(notice, "Error reading from database: %s. Aborting Migration.\n", err.Error()) + os.Exit(1) + } + //configs := lo.SliceToMap(configBytes, func(t rawConfig) (string, bool) { + // TODO + //}) + // NEEDS multiaddress PR committed to interpret configs correctly. + + // TODO d.say(plain, "This lotus-miner services the Miner ID: %s\n", "TODO MinerID") // TODO!!! + //TODO + d.say(plain, "TODO FINISH THIS FUNCTION\n") +} + +func verifySectors(d *MigrationData) { + var i []int + var lastError string + d.say(section, "Waiting for lotus-miner to write sectors into Yugabyte.") + for { + err := d.DB.Select(context.Background(), &i, "SELECT count(*) FROM sector_location") + if err != nil { + if err.Error() != lastError { + d.say(notice, "Error verifying sectors: %s\n", err.Error()) + lastError = err.Error() + } + continue + } + if i[0] > 0 { + break + } + fmt.Print(".") + time.Sleep(time.Second) + } + d.say(plain, "Sectors verified. %d sector locations found.\n", i) + d.say(plain, "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n") + + stepCompleted(d, d.T("Verified Sectors in Database")) +} + +func yugabyteConnect(d *MigrationData) { + harmonycfg := d.MinerConfig.HarmonyDB //copy the config to a local variable +yugabyteFor: + for { + i, _, err := (&promptui.Select{ + Label: d.T("Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)"), + Items: []string{ + d.T("Host: %s", strings.Join(harmonycfg.Hosts, ",")), + d.T("Port: %s", harmonycfg.Port), + d.T("Username: %s", harmonycfg.Username), + d.T("Password: %s", harmonycfg.Password), + d.T("Database: %s", harmonycfg.Database), + d.T("Continue to connect and update schema.")}, + Size: 6, + Templates: d.selectTemplates, + }).Run() + if err != nil { + d.say(notice, "Database config error occurred, abandoning migration: %s \n", err.Error()) + os.Exit(1) + } + switch i { + case 0: + host, err := (&promptui.Prompt{ + Label: d.T("Enter the Yugabyte database host(s)"), + }).Run() + if err != nil { + d.say(notice, "No host provided\n") + continue + } + harmonycfg.Hosts = strings.Split(host, ",") + case 1, 2, 3, 4: + val, err := (&promptui.Prompt{ + Label: d.T("Enter the Yugabyte database %s", []string{"port", "username", "password", "database"}[i-1]), + }).Run() + if err != nil { + d.say(notice, "No value provided\n") + continue + } + switch i { + case 1: + harmonycfg.Port = val + case 2: + harmonycfg.Username = val + case 3: + harmonycfg.Password = val + case 4: + harmonycfg.Database = val + } + continue + case 5: + d.DB, err = harmonydb.NewFromConfig(harmonycfg) + if err != nil { + if err.Error() == "^C" { + os.Exit(1) + } + d.say(notice, "Error connecting to Yugabyte database: %s\n", err.Error()) + continue + } + break yugabyteFor + } + } + + d.say(plain, "Connected to Yugabyte. Schema is current.\n") + if !reflect.DeepEqual(harmonycfg, d.MinerConfig.HarmonyDB) { + d.MinerConfig.HarmonyDB = harmonycfg + buf, err := config.ConfigUpdate(d.MinerConfig, config.DefaultStorageMiner()) + if err != nil { + d.say(notice, "Error encoding config.toml: %s\n", err.Error()) + os.Exit(1) + } + _, _ = (&promptui.Prompt{Label: "Press return to update config.toml with Yugabyte info. Backup the file now."}).Run() + stat, err := os.Stat(path.Join(d.MinerConfigPath, "config.toml")) + if err != nil { + d.say(notice, "Error reading filemode of config.toml: %s\n", err.Error()) + os.Exit(1) + } + filemode := stat.Mode() + err = os.WriteFile(path.Join(d.MinerConfigPath, "config.toml"), buf, filemode) + if err != nil { + d.say(notice, "Error writing config.toml: %s\n", err.Error()) + os.Exit(1) + } + d.say(section, "Restart Lotus Miner. \n") + } + stepCompleted(d, d.T("Connected to Yugabyte")) +} + +func readMinerConfig(d *MigrationData) { + verifyPath := func(dir string) (*config.StorageMiner, error) { + cfg := config.DefaultStorageMiner() + _, err := toml.DecodeFile(path.Join(dir, "config.toml"), &cfg) + return cfg, err + } + + dirs := map[string]*config.StorageMiner{"~/.lotusminer": nil, "~/.lotus-miner-local-net": nil} + for dir := range dirs { + cfg, err := verifyPath(dir) + if err != nil { + delete(dirs, dir) + } + dirs[dir] = cfg + } + + var selected string + if len(dirs) > 0 { + _, str, err := (&promptui.Select{ + Label: d.T("Select the location of your lotus-miner config directory?"), + Items: append(lo.Keys(dirs), d.T("Other")), + Templates: d.selectTemplates, + }).Run() + if err != nil { + if err.Error() == "^C" { + os.Exit(1) + } + selected = "Other" + } else { + d.MinerConfigPath = str + d.MinerConfig = dirs[str] + } + } + if selected == "Other" { + minerPathEntry: + str, err := (&promptui.Prompt{ + Label: d.T("Enter the path to the configuration directory used by lotus-miner"), + }).Run() + if err != nil { + d.say(notice, "No path provided, abandoning migration \n") + os.Exit(1) + } + cfg, err := verifyPath(str) + if err != nil { + d.say(notice, "Cannot read the config.toml file in the provided directory, Error: %s\n", err.Error()) + goto minerPathEntry + } + d.MinerConfigPath = str + d.MinerConfig = cfg + } + + stepCompleted(d, d.T("Read Miner Config")) +} +func stepCompleted(d *MigrationData, step string) { + fmt.Print(green.Render("✔ ")) + d.say(plain, "Completed Step: %s\n\n", step) +} diff --git a/cmd/lotus-provider/internal/translations/catalog.go b/cmd/lotus-provider/internal/translations/catalog.go new file mode 100644 index 00000000000..7605b2b47dc --- /dev/null +++ b/cmd/lotus-provider/internal/translations/catalog.go @@ -0,0 +1,184 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package translations + +import ( + "golang.org/x/text/language" + "golang.org/x/text/message" + "golang.org/x/text/message/catalog" +) + +type dictionary struct { + index []uint32 + data string +} + +func (d *dictionary) Lookup(key string) (data string, ok bool) { + p, ok := messageKeyToIndex[key] + if !ok { + return "", false + } + start, end := d.index[p], d.index[p+1] + if start == end { + return "", false + } + return d.data[start:end], true +} + +func init() { + dict := map[string]catalog.Dictionary{ + "en": &dictionary{index: enIndex, data: enData}, + "ko": &dictionary{index: koIndex, data: koData}, + "zh": &dictionary{index: zhIndex, data: zhData}, + } + fallback := language.MustParse("en") + cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) + if err != nil { + panic(err) + } + message.DefaultCatalog = cat +} + +var messageKeyToIndex = map[string]int{ + "Cannot read the config.toml file in the provided directory, Error: %s\n": 32, + "Completed Step: %s\n\n": 34, + "Connected to Yugabyte": 27, + "Connected to Yugabyte. Schema is current.\n": 22, + "Continue to connect and update schema.": 15, + "Ctrl+C pressed in Terminal": 3, + "Database config error occurred, abandoning migration: %s \n": 16, + "Database: %s": 14, + "Enter the Yugabyte database %s": 19, + "Enter the Yugabyte database host(s)": 17, + "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 9, + "Enter the path to the configuration directory used by lotus-miner": 30, + "Error connecting to Yugabyte database: %s\n": 21, + "Error encoding config.toml: %s\n": 23, + "Error reading filemode of config.toml: %s\n": 24, + "Error verifying sectors: %s\n": 5, + "Error writing config.toml: %s\n": 25, + "Host: %s": 10, + "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n": 7, + "No host provided\n": 18, + "No path provided, abandoning migration \n": 31, + "No value provided\n": 20, + "Other": 29, + "Password: %s": 13, + "Port: %s": 11, + "Read Miner Config": 33, + "Restart Lotus Miner. \n": 26, + "Sectors verified. %d sector locations found.\n": 6, + "Select the location of your lotus-miner config directory?": 28, + "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.": 0, + "This tool confirms each action it does.": 1, + "Use the arrow keys to navigate: ↓ ↑ → ← ": 2, + "Username: %s": 12, + "Verified Sectors in Database": 8, + "Waiting for lotus-miner to write sectors into Yugabyte.": 4, +} + +var enIndex = []uint32{ // 36 elements + // Entry 0 - 1F + 0x00000000, 0x0000006b, 0x00000093, 0x000000c8, + 0x000000e3, 0x0000011b, 0x0000013f, 0x00000174, + 0x000001d7, 0x000001f4, 0x00000256, 0x00000262, + 0x0000026e, 0x0000027e, 0x0000028e, 0x0000029e, + 0x000002c5, 0x00000307, 0x0000032b, 0x00000341, + 0x00000363, 0x0000037a, 0x000003ac, 0x000003db, + 0x00000402, 0x00000434, 0x0000045a, 0x00000475, + 0x0000048b, 0x000004c5, 0x000004cb, 0x0000050d, + // Entry 20 - 3F + 0x0000053a, 0x00000588, 0x0000059a, 0x000005b6, +} // Size: 168 bytes + +const enData string = "" + // Size: 1462 bytes + "\x02This interactive tool will walk you through migration of lotus-provi" + + "der.\x0aPress Ctrl+C to exit at any time.\x02This tool confirms each act" + + "ion it does.\x04\x00\x01 0\x02Use the arrow keys to navigate: ↓ ↑ → ←" + + "\x02Ctrl+C pressed in Terminal\x02Waiting for lotus-miner to write secto" + + "rs into Yugabyte.\x04\x00\x01\x0a\x1f\x02Error verifying sectors: %[1]s" + + "\x04\x00\x01\x0a0\x02Sectors verified. %[1]d sector locations found.\x04" + + "\x00\x01\x0a^\x02Never remove the database info from the config.toml for" + + " lotus-miner as it avoids double PoSt.\x02Verified Sectors in Database" + + "\x02Enter the info to connect to your Yugabyte database installation (ht" + + "tps://download.yugabyte.com/)\x02Host: %[1]s\x02Port: %[1]s\x02Username:" + + " %[1]s\x02Password: %[1]s\x02Database: %[1]s\x02Continue to connect and " + + "update schema.\x04\x00\x02 \x0a<\x02Database config error occurred, aban" + + "doning migration: %[1]s\x02Enter the Yugabyte database host(s)\x04\x00" + + "\x01\x0a\x11\x02No host provided\x02Enter the Yugabyte database %[1]s" + + "\x04\x00\x01\x0a\x12\x02No value provided\x04\x00\x01\x0a-\x02Error conn" + + "ecting to Yugabyte database: %[1]s\x04\x00\x01\x0a*\x02Connected to Yuga" + + "byte. Schema is current.\x04\x00\x01\x0a\x22\x02Error encoding config.to" + + "ml: %[1]s\x04\x00\x01\x0a-\x02Error reading filemode of config.toml: %[1" + + "]s\x04\x00\x01\x0a!\x02Error writing config.toml: %[1]s\x04\x00\x02 \x0a" + + "\x15\x02Restart Lotus Miner.\x02Connected to Yugabyte\x02Select the loca" + + "tion of your lotus-miner config directory?\x02Other\x02Enter the path to" + + " the configuration directory used by lotus-miner\x04\x00\x02 \x0a'\x02No" + + " path provided, abandoning migration\x04\x00\x01\x0aI\x02Cannot read the" + + " config.toml file in the provided directory, Error: %[1]s\x02Read Miner " + + "Config\x04\x00\x02\x0a\x0a\x16\x02Completed Step: %[1]s" + +var koIndex = []uint32{ // 36 elements + // Entry 0 - 1F + 0x00000000, 0x0000007f, 0x000000b9, 0x000000b9, + 0x000000da, 0x000000da, 0x00000106, 0x00000106, + 0x0000019b, 0x0000019b, 0x00000209, 0x0000021a, + 0x00000228, 0x00000240, 0x00000254, 0x0000026e, + 0x00000298, 0x000002fc, 0x00000338, 0x00000367, + 0x0000039f, 0x000003c8, 0x00000421, 0x00000467, + 0x000004b3, 0x00000507, 0x0000054a, 0x0000056f, + 0x00000585, 0x000005d4, 0x000005db, 0x00000636, + // Entry 20 - 3F + 0x00000689, 0x000006e8, 0x00000700, 0x0000071b, +} // Size: 168 bytes + +const koData string = "" + // Size: 1819 bytes + "\x02이 대화형 도구는 로터스 공급자 이주를 안내합니다.\x0a언제든지 종료하려면 Ctrl+C를 누르십시오.\x02이 도구는 수" + + "행하는 각 작업을 확인합니다.\x02터미널에서 Ctrl+C가 눌림\x04\x00\x01\x0a'\x02섹터 확인 중 오류 발생" + + ": %[1]s\x04\x00\x01\x0a\x8f\x01\x02로터스 마이너의 config.toml에서 데이터베이스 정보를 제거하" + + "지 마십시오. 두 번의 PoSt를 피하기 위함입니다.\x02Yugabyte 데이터베이스 설치에 연결할 정보를 입력하십시오 (h" + + "ttps://download.yugabyte.com/)\x02호스트: %[1]s\x02포트: %[1]s\x02사용자 이름: %[1" + + "]s\x02비밀번호: %[1]s\x02데이터베이스: %[1]s\x02계속 연결 및 스키마 업데이트.\x04\x00\x02 \x0a" + + "^\x02데이터베이스 구성 오류가 발생하여 마이그레이션을 포기합니다: %[1]s\x02Yugabyte 데이터베이스 호스트를 입력하" + + "십시오\x04\x00\x01\x0a*\x02호스트가 제공되지 않았습니다\x02Yugabyte 데이터베이스 %[1]s을 입력하십" + + "시오\x04\x00\x01\x0a$\x02값이 제공되지 않았습니다\x04\x00\x01\x0aT\x02Yugabyte 데이터베" + + "이스에 연결하는 중 오류가 발생했습니다: %[1]s\x04\x00\x01\x0aA\x02Yugabyte에 연결되었습니다. 스키" + + "마가 현재입니다.\x04\x00\x01\x0aG\x02config.toml을 인코딩하는 중 오류가 발생했습니다: %[1]s" + + "\x04\x00\x01\x0aO\x02config.toml의 파일 모드를 읽는 중 오류가 발생했습니다: %[1]s\x04\x00" + + "\x01\x0a>\x02config.toml을 쓰는 중 오류가 발생했습니다: %[1]s\x04\x00\x02 \x0a\x1f" + + "\x02로터스 마이너 재시작.\x02Yugabyte에 연결됨\x02로터스 마이너 구성 디렉토리의 위치를 선택하시겠습니까?\x02기" + + "타\x02로터스 마이너에서 사용하는 구성 디렉토리의 경로를 입력하십시오\x04\x00\x02 \x0aM\x02경로가 제공되지 " + + "않았으므로 마이그레이션을 포기합니다\x04\x00\x01\x0aZ\x02제공된 디렉토리에서 config.toml 파일을 읽을 " + + "수 없습니다. 오류: %[1]s\x02마이너 구성 읽기\x04\x00\x02\x0a\x0a\x15\x02단계 완료: %[1]s" + +var zhIndex = []uint32{ // 36 elements + // Entry 0 - 1F + 0x00000000, 0x00000055, 0x00000080, 0x00000080, + 0x00000099, 0x00000099, 0x000000bc, 0x000000bc, + 0x00000121, 0x00000121, 0x0000017b, 0x0000018a, + 0x00000199, 0x000001ab, 0x000001ba, 0x000001cc, + 0x000001eb, 0x00000224, 0x00000249, 0x0000025e, + 0x0000027c, 0x0000028e, 0x000002bf, 0x000002f1, + 0x00000319, 0x0000034d, 0x00000375, 0x00000396, + 0x000003ab, 0x000003db, 0x000003e2, 0x00000412, + // Entry 20 - 3F + 0x00000437, 0x00000480, 0x00000493, 0x000004ae, +} // Size: 168 bytes + +const zhData string = "" + // Size: 1198 bytes + "\x02此互动工具将引导您完成lotus-provider的迁移。\x0a随时按Ctrl+C退出。\x02此工具确认其执行的每个操作。\x02在" + + "终端中按下Ctrl+C\x04\x00\x01\x0a\x1e\x02验证扇区时出错:%[1]s\x04\x00\x01\x0a`\x02从" + + "config.toml中永远不要删除lotus-miner的数据库信息,因为它避免了双PoSt。\x02输入连接到您的Yugabyte数据库安装" + + "的信息(https://download.yugabyte.com/)\x02主机:%[1]s\x02端口:%[1]s\x02用户名:%[1" + + "]s\x02密码:%[1]s\x02数据库:%[1]s\x02继续连接和更新架构。\x04\x00\x02 \x0a3\x02发生数据库配置错误" + + ",放弃迁移:%[1]s\x02输入Yugabyte数据库主机(S)\x04\x00\x01\x0a\x10\x02未提供主机\x02输入Yu" + + "gabyte数据库 %[1]s\x04\x00\x01\x0a\x0d\x02未提供值\x04\x00\x01\x0a,\x02连接到Yugab" + + "yte数据库时出错:%[1]s\x04\x00\x01\x0a-\x02已连接到Yugabyte。模式是当前的。\x04\x00\x01\x0a" + + "#\x02编码config.toml时出错:%[1]s\x04\x00\x01\x0a/\x02读取config.toml文件模式时出错:%[1" + + "]s\x04\x00\x01\x0a#\x02写入config.toml时出错:%[1]s\x04\x00\x02 \x0a\x1b\x02重新" + + "启动Lotus Miner。\x02已连接到Yugabyte\x02选择您的lotus-miner配置目录的位置?\x02其他\x02输入l" + + "otus-miner使用的配置目录的路径\x04\x00\x02 \x0a\x1f\x02未提供路径,放弃迁移\x04\x00\x01\x0aD" + + "\x02无法读取提供的目录中的config.toml文件,错误:%[1]s\x02读取矿工配置\x04\x00\x02\x0a\x0a\x15" + + "\x02完成步骤:%[1]s" + + // Total table size 4983 bytes (4KiB); checksum: 7348663B diff --git a/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json new file mode 100644 index 00000000000..d7c5cbaf2e4 --- /dev/null +++ b/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json @@ -0,0 +1,400 @@ +{ + "language": "en", + "messages": [ + { + "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translation": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "This tool confirms each action it does.", + "message": "This tool confirms each action it does.", + "translation": "This tool confirms each action it does.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Use the arrow keys to navigate: ↓ ↑ → ←", + "message": "Use the arrow keys to navigate: ↓ ↑ → ←", + "translation": "Use the arrow keys to navigate: ↓ ↑ → ←", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Ctrl+C pressed in Terminal", + "message": "Ctrl+C pressed in Terminal", + "translation": "Ctrl+C pressed in Terminal", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Waiting for lotus-miner to write sectors into Yugabyte.", + "message": "Waiting for lotus-miner to write sectors into Yugabyte.", + "translation": "Waiting for lotus-miner to write sectors into Yugabyte.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Error verifying sectors: {Error}", + "message": "Error verifying sectors: {Error}", + "translation": "Error verifying sectors: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Sectors verified. {I} sector locations found.", + "message": "Sectors verified. {I} sector locations found.", + "translation": "Sectors verified. {I} sector locations found.", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "I", + "string": "%[1]d", + "type": "[]int", + "underlyingType": "[]int", + "argNum": 1, + "expr": "i" + } + ], + "fuzzy": true + }, + { + "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translation": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Verified Sectors in Database", + "message": "Verified Sectors in Database", + "translation": "Verified Sectors in Database", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translation": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Host: {Hosts_}", + "message": "Host: {Hosts_}", + "translation": "Host: {Hosts_}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Hosts_", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "strings.Join(harmonycfg.Hosts, \",\")" + } + ], + "fuzzy": true + }, + { + "id": "Port: {Port}", + "message": "Port: {Port}", + "translation": "Port: {Port}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Port", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Port" + } + ], + "fuzzy": true + }, + { + "id": "Username: {Username}", + "message": "Username: {Username}", + "translation": "Username: {Username}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Username", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Username" + } + ], + "fuzzy": true + }, + { + "id": "Password: {Password}", + "message": "Password: {Password}", + "translation": "Password: {Password}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Password", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Password" + } + ], + "fuzzy": true + }, + { + "id": "Database: {Database}", + "message": "Database: {Database}", + "translation": "Database: {Database}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Database", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Database" + } + ], + "fuzzy": true + }, + { + "id": "Continue to connect and update schema.", + "message": "Continue to connect and update schema.", + "translation": "Continue to connect and update schema.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Database config error occurred, abandoning migration: {Error}", + "message": "Database config error occurred, abandoning migration: {Error}", + "translation": "Database config error occurred, abandoning migration: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Enter the Yugabyte database host(s)", + "message": "Enter the Yugabyte database host(s)", + "translation": "Enter the Yugabyte database host(s)", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "No host provided", + "message": "No host provided", + "translation": "No host provided", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translation": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Stringport_username_password_databasei_1", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" + } + ], + "fuzzy": true + }, + { + "id": "No value provided", + "message": "No value provided", + "translation": "No value provided", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Error connecting to Yugabyte database: {Error}", + "message": "Error connecting to Yugabyte database: {Error}", + "translation": "Error connecting to Yugabyte database: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Connected to Yugabyte. Schema is current.", + "message": "Connected to Yugabyte. Schema is current.", + "translation": "Connected to Yugabyte. Schema is current.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Error encoding config.toml: {Error}", + "message": "Error encoding config.toml: {Error}", + "translation": "Error encoding config.toml: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error reading filemode of config.toml: {Error}", + "message": "Error reading filemode of config.toml: {Error}", + "translation": "Error reading filemode of config.toml: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error writing config.toml: {Error}", + "message": "Error writing config.toml: {Error}", + "translation": "Error writing config.toml: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Restart Lotus Miner.", + "message": "Restart Lotus Miner.", + "translation": "Restart Lotus Miner.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Connected to Yugabyte", + "message": "Connected to Yugabyte", + "translation": "Connected to Yugabyte", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Select the location of your lotus-miner config directory?", + "message": "Select the location of your lotus-miner config directory?", + "translation": "Select the location of your lotus-miner config directory?", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Other", + "message": "Other", + "translation": "Other", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Enter the path to the configuration directory used by lotus-miner", + "message": "Enter the path to the configuration directory used by lotus-miner", + "translation": "Enter the path to the configuration directory used by lotus-miner", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "No path provided, abandoning migration", + "message": "No path provided, abandoning migration", + "translation": "No path provided, abandoning migration", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translation": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Read Miner Config", + "message": "Read Miner Config", + "translation": "Read Miner Config", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Completed Step: {Step}", + "message": "Completed Step: {Step}", + "translation": "Completed Step: {Step}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Step", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "step" + } + ], + "fuzzy": true + } + ] +} \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json b/cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json new file mode 100644 index 00000000000..b84f8b1864b --- /dev/null +++ b/cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json @@ -0,0 +1,321 @@ +{ + "language": "ko", + "messages": [ + { + "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translation": "이 대화형 도구는 로터스 공급자 이주를 안내합니다.\n언제든지 종료하려면 Ctrl+C를 누르십시오." + }, + { + "id": "This tool confirms each action it does.", + "message": "This tool confirms each action it does.", + "translation": "이 도구는 수행하는 각 작업을 확인합니다." + }, + { + "id": "Ctrl+C pressed in Terminal", + "message": "Ctrl+C pressed in Terminal", + "translation": "터미널에서 Ctrl+C가 눌림" + }, + { + "id": "Verifying Sectors exist in Yugabyte.", + "message": "Verifying Sectors exist in Yugabyte.", + "translation": "Yugabyte에 섹터가 존재하는지 확인 중." + }, + { + "id": "Error verifying sectors: {Error}", + "message": "Error verifying sectors: {Error}", + "translation": "섹터 확인 중 오류 발생: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Sectors verified. {I} sectors found.", + "message": "Sectors verified. {I} sectors found.", + "translation": "섹터가 확인되었습니다. {I}개의 섹터가 발견되었습니다.", + "placeholders": [ + { + "id": "I", + "string": "%[1]d", + "type": "[]int", + "underlyingType": "[]int", + "argNum": 1, + "expr": "i" + } + ] + }, + { + "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translation": "로터스 마이너의 config.toml에서 데이터베이스 정보를 제거하지 마십시오. 두 번의 PoSt를 피하기 위함입니다." + }, + { + "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translation": "Yugabyte 데이터베이스 설치에 연결할 정보를 입력하십시오 (https://download.yugabyte.com/)" + }, + { + "id": "Host: {Hosts_}", + "message": "Host: {Hosts_}", + "translation": "호스트: {Hosts_}", + "placeholders": [ + { + "id": "Hosts_", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "strings.Join(harmonycfg.Hosts, \",\")" + } + ] + }, + { + "id": "Port: {Port}", + "message": "Port: {Port}", + "translation": "포트: {Port}", + "placeholders": [ + { + "id": "Port", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Port" + } + ] + }, + { + "id": "Username: {Username}", + "message": "Username: {Username}", + "translation": "사용자 이름: {Username}", + "placeholders": [ + { + "id": "Username", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Username" + } + ] + }, + { + "id": "Password: {Password}", + "message": "Password: {Password}", + "translation": "비밀번호: {Password}", + "placeholders": [ + { + "id": "Password", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Password" + } + ] + }, + { + "id": "Database: {Database}", + "message": "Database: {Database}", + "translation": "데이터베이스: {Database}", + "placeholders": [ + { + "id": "Database", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Database" + } + ] + }, + { + "id": "Continue to connect and update schema.", + "message": "Continue to connect and update schema.", + "translation": "계속 연결 및 스키마 업데이트." + }, + { + "id": "Database config error occurred, abandoning migration: {Error}", + "message": "Database config error occurred, abandoning migration: {Error}", + "translation": "데이터베이스 구성 오류가 발생하여 마이그레이션을 포기합니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Enter the Yugabyte database host(s)", + "message": "Enter the Yugabyte database host(s)", + "translation": "Yugabyte 데이터베이스 호스트를 입력하십시오" + }, + { + "id": "No host provided", + "message": "No host provided", + "translation": "호스트가 제공되지 않았습니다" + }, + { + "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translation": "Yugabyte 데이터베이스 {Stringport_username_password_databasei_1}을 입력하십시오", + "placeholders": [ + { + "id": "Stringport_username_password_databasei_1", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" + } + ] + }, + { + "id": "No value provided", + "message": "No value provided", + "translation": "값이 제공되지 않았습니다" + }, + { + "id": "Error connecting to Yugabyte database: {Error}", + "message": "Error connecting to Yugabyte database: {Error}", + "translation": "Yugabyte 데이터베이스에 연결하는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Connected to Yugabyte. Schema is current.", + "message": "Connected to Yugabyte. Schema is current.", + "translation": "Yugabyte에 연결되었습니다. 스키마가 현재입니다." + }, + { + "id": "Error encoding config.toml: {Error}", + "message": "Error encoding config.toml: {Error}", + "translation": "config.toml을 인코딩하는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error reading filemode of config.toml: {Error}", + "message": "Error reading filemode of config.toml: {Error}", + "translation": "config.toml의 파일 모드를 읽는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error writing config.toml: {Error}", + "message": "Error writing config.toml: {Error}", + "translation": "config.toml을 쓰는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Restart Lotus Miner.", + "message": "Restart Lotus Miner.", + "translation": "로터스 마이너 재시작." + }, + { + "id": "Connected to Yugabyte", + "message": "Connected to Yugabyte", + "translation": "Yugabyte에 연결됨" + }, + { + "id": "Select the location of your lotus-miner config directory?", + "message": "Select the location of your lotus-miner config directory?", + "translation": "로터스 마이너 구성 디렉토리의 위치를 선택하시겠습니까?" + }, + { + "id": "Other", + "message": "Other", + "translation": "기타" + }, + { + "id": "Enter the path to the configuration directory used by lotus-miner", + "message": "Enter the path to the configuration directory used by lotus-miner", + "translation": "로터스 마이너에서 사용하는 구성 디렉토리의 경로를 입력하십시오" + }, + { + "id": "No path provided, abandoning migration", + "message": "No path provided, abandoning migration", + "translation": "경로가 제공되지 않았으므로 마이그레이션을 포기합니다" + }, + { + "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translation": "제공된 디렉토리에서 config.toml 파일을 읽을 수 없습니다. 오류: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Read Miner Config", + "message": "Read Miner Config", + "translation": "마이너 구성 읽기" + }, + { + "id": "Completed Step: {Step}", + "message": "Completed Step: {Step}", + "translation": "단계 완료: {Step}", + "placeholders": [ + { + "id": "Step", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "step" + } + ] + } +] + +} \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json new file mode 100644 index 00000000000..d847ef46ab1 --- /dev/null +++ b/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json @@ -0,0 +1,330 @@ +{ + "language": "ko", + "messages": [ + { + "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translation": "이 대화형 도구는 로터스 공급자 이주를 안내합니다.\n언제든지 종료하려면 Ctrl+C를 누르십시오." + }, + { + "id": "This tool confirms each action it does.", + "message": "This tool confirms each action it does.", + "translation": "이 도구는 수행하는 각 작업을 확인합니다." + }, + { + "id": "Use the arrow keys to navigate: ↓ ↑ → ←", + "message": "Use the arrow keys to navigate: ↓ ↑ → ←", + "translation": "" + }, + { + "id": "Ctrl+C pressed in Terminal", + "message": "Ctrl+C pressed in Terminal", + "translation": "터미널에서 Ctrl+C가 눌림" + }, + { + "id": "Waiting for lotus-miner to write sectors into Yugabyte.", + "message": "Waiting for lotus-miner to write sectors into Yugabyte.", + "translation": "" + }, + { + "id": "Error verifying sectors: {Error}", + "message": "Error verifying sectors: {Error}", + "translation": "섹터 확인 중 오류 발생: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Sectors verified. {I} sector locations found.", + "message": "Sectors verified. {I} sector locations found.", + "translation": "", + "placeholders": [ + { + "id": "I", + "string": "%[1]d", + "type": "[]int", + "underlyingType": "[]int", + "argNum": 1, + "expr": "i" + } + ] + }, + { + "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translation": "로터스 마이너의 config.toml에서 데이터베이스 정보를 제거하지 마십시오. 두 번의 PoSt를 피하기 위함입니다." + }, + { + "id": "Verified Sectors in Database", + "message": "Verified Sectors in Database", + "translation": "" + }, + { + "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translation": "Yugabyte 데이터베이스 설치에 연결할 정보를 입력하십시오 (https://download.yugabyte.com/)" + }, + { + "id": "Host: {Hosts_}", + "message": "Host: {Hosts_}", + "translation": "호스트: {Hosts_}", + "placeholders": [ + { + "id": "Hosts_", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "strings.Join(harmonycfg.Hosts, \",\")" + } + ] + }, + { + "id": "Port: {Port}", + "message": "Port: {Port}", + "translation": "포트: {Port}", + "placeholders": [ + { + "id": "Port", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Port" + } + ] + }, + { + "id": "Username: {Username}", + "message": "Username: {Username}", + "translation": "사용자 이름: {Username}", + "placeholders": [ + { + "id": "Username", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Username" + } + ] + }, + { + "id": "Password: {Password}", + "message": "Password: {Password}", + "translation": "비밀번호: {Password}", + "placeholders": [ + { + "id": "Password", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Password" + } + ] + }, + { + "id": "Database: {Database}", + "message": "Database: {Database}", + "translation": "데이터베이스: {Database}", + "placeholders": [ + { + "id": "Database", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Database" + } + ] + }, + { + "id": "Continue to connect and update schema.", + "message": "Continue to connect and update schema.", + "translation": "계속 연결 및 스키마 업데이트." + }, + { + "id": "Database config error occurred, abandoning migration: {Error}", + "message": "Database config error occurred, abandoning migration: {Error}", + "translation": "데이터베이스 구성 오류가 발생하여 마이그레이션을 포기합니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Enter the Yugabyte database host(s)", + "message": "Enter the Yugabyte database host(s)", + "translation": "Yugabyte 데이터베이스 호스트를 입력하십시오" + }, + { + "id": "No host provided", + "message": "No host provided", + "translation": "호스트가 제공되지 않았습니다" + }, + { + "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translation": "Yugabyte 데이터베이스 {Stringport_username_password_databasei_1}을 입력하십시오", + "placeholders": [ + { + "id": "Stringport_username_password_databasei_1", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" + } + ] + }, + { + "id": "No value provided", + "message": "No value provided", + "translation": "값이 제공되지 않았습니다" + }, + { + "id": "Error connecting to Yugabyte database: {Error}", + "message": "Error connecting to Yugabyte database: {Error}", + "translation": "Yugabyte 데이터베이스에 연결하는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Connected to Yugabyte. Schema is current.", + "message": "Connected to Yugabyte. Schema is current.", + "translation": "Yugabyte에 연결되었습니다. 스키마가 현재입니다." + }, + { + "id": "Error encoding config.toml: {Error}", + "message": "Error encoding config.toml: {Error}", + "translation": "config.toml을 인코딩하는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error reading filemode of config.toml: {Error}", + "message": "Error reading filemode of config.toml: {Error}", + "translation": "config.toml의 파일 모드를 읽는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error writing config.toml: {Error}", + "message": "Error writing config.toml: {Error}", + "translation": "config.toml을 쓰는 중 오류가 발생했습니다: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Restart Lotus Miner.", + "message": "Restart Lotus Miner.", + "translation": "로터스 마이너 재시작." + }, + { + "id": "Connected to Yugabyte", + "message": "Connected to Yugabyte", + "translation": "Yugabyte에 연결됨" + }, + { + "id": "Select the location of your lotus-miner config directory?", + "message": "Select the location of your lotus-miner config directory?", + "translation": "로터스 마이너 구성 디렉토리의 위치를 선택하시겠습니까?" + }, + { + "id": "Other", + "message": "Other", + "translation": "기타" + }, + { + "id": "Enter the path to the configuration directory used by lotus-miner", + "message": "Enter the path to the configuration directory used by lotus-miner", + "translation": "로터스 마이너에서 사용하는 구성 디렉토리의 경로를 입력하십시오" + }, + { + "id": "No path provided, abandoning migration", + "message": "No path provided, abandoning migration", + "translation": "경로가 제공되지 않았으므로 마이그레이션을 포기합니다" + }, + { + "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translation": "제공된 디렉토리에서 config.toml 파일을 읽을 수 없습니다. 오류: {Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Read Miner Config", + "message": "Read Miner Config", + "translation": "마이너 구성 읽기" + }, + { + "id": "Completed Step: {Step}", + "message": "Completed Step: {Step}", + "translation": "단계 완료: {Step}", + "placeholders": [ + { + "id": "Step", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "step" + } + ] + } + ] +} \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json b/cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json new file mode 100644 index 00000000000..a4f4890fb87 --- /dev/null +++ b/cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json @@ -0,0 +1,321 @@ +{ + "language": "zh", + "messages": [ + { + "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translation": "此互动工具将引导您完成lotus-provider的迁移。\n随时按Ctrl+C退出。" + }, + { + "id": "This tool confirms each action it does.", + "message": "This tool confirms each action it does.", + "translation": "此工具确认其执行的每个操作。" + }, + { + "id": "Ctrl+C pressed in Terminal", + "message": "Ctrl+C pressed in Terminal", + "translation": "在终端中按下Ctrl+C" + }, + { + "id": "Verifying Sectors exist in Yugabyte.", + "message": "Verifying Sectors exist in Yugabyte.", + "translation": "正在验证Yugabyte中的扇区是否存在。" + }, + { + "id": "Error verifying sectors: {Error}", + "message": "Error verifying sectors: {Error}", + "translation": "验证扇区时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Sectors verified. {I} sectors found.", + "message": "Sectors verified. {I} sectors found.", + "translation": "已验证扇区。找到了{I}个扇区。", + "placeholders": [ + { + "id": "I", + "string": "%[1]d", + "type": "[]int", + "underlyingType": "[]int", + "argNum": 1, + "expr": "i" + } + ] + }, + { + "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translation": "从config.toml中永远不要删除lotus-miner的数据库信息,因为它避免了双PoSt。" + }, + { + "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translation": "输入连接到您的Yugabyte数据库安装的信息(https://download.yugabyte.com/)" + }, + { + "id": "Host: {Hosts_}", + "message": "Host: {Hosts_}", + "translation": "主机:{Hosts_}", + "placeholders": [ + { + "id": "Hosts_", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "strings.Join(harmonycfg.Hosts, \",\")" + } + ] + }, + { + "id": "Port: {Port}", + "message": "Port: {Port}", + "translation": "端口:{Port}", + "placeholders": [ + { + "id": "Port", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Port" + } + ] + }, + { + "id": "Username: {Username}", + "message": "Username: {Username}", + "translation": "用户名:{Username}", + "placeholders": [ + { + "id": "Username", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Username" + } + ] + }, + { + "id": "Password: {Password}", + "message": "Password: {Password}", + "translation": "密码:{Password}", + "placeholders": [ + { + "id": "Password", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Password" + } + ] + }, + { + "id": "Database: {Database}", + "message": "Database: {Database}", + "translation": "数据库:{Database}", + "placeholders": [ + { + "id": "Database", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Database" + } + ] + }, + { + "id": "Continue to connect and update schema.", + "message": "Continue to connect and update schema.", + "translation": "继续连接和更新架构。" + }, + { + "id": "Database config error occurred, abandoning migration: {Error}", + "message": "Database config error occurred, abandoning migration: {Error}", + "translation": "发生数据库配置错误,放弃迁移:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Enter the Yugabyte database host(s)", + "message": "Enter the Yugabyte database host(s)", + "translation": "输入Yugabyte数据库主机(S)" + }, + { + "id": "No host provided", + "message": "No host provided", + "translation": "未提供主机" + }, + { + "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translation": "输入Yugabyte数据库 {Stringport_username_password_databasei_1}", + "placeholders": [ + { + "id": "Stringport_username_password_databasei_1", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" + } + ] + }, + { + "id": "No value provided", + "message": "No value provided", + "translation": "未提供值" + }, + { + "id": "Error connecting to Yugabyte database: {Error}", + "message": "Error connecting to Yugabyte database: {Error}", + "translation": "连接到Yugabyte数据库时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Connected to Yugabyte. Schema is current.", + "message": "Connected to Yugabyte. Schema is current.", + "translation": "已连接到Yugabyte。模式是当前的。" + }, + { + "id": "Error encoding config.toml: {Error}", + "message": "Error encoding config.toml: {Error}", + "translation": "编码config.toml时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error reading filemode of config.toml: {Error}", + "message": "Error reading filemode of config.toml: {Error}", + "translation": "读取config.toml文件模式时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error writing config.toml: {Error}", + "message": "Error writing config.toml: {Error}", + "translation": "写入config.toml时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Restart Lotus Miner.", + "message": "Restart Lotus Miner.", + "translation": "重新启动Lotus Miner。" + }, + { + "id": "Connected to Yugabyte", + "message": "Connected to Yugabyte", + "translation": "已连接到Yugabyte" + }, + { + "id": "Select the location of your lotus-miner config directory?", + "message": "Select the location of your lotus-miner config directory?", + "translation": "选择您的lotus-miner配置目录的位置?" + }, + { + "id": "Other", + "message": "Other", + "translation": "其他" + }, + { + "id": "Enter the path to the configuration directory used by lotus-miner", + "message": "Enter the path to the configuration directory used by lotus-miner", + "translation": "输入lotus-miner使用的配置目录的路径" + }, + { + "id": "No path provided, abandoning migration", + "message": "No path provided, abandoning migration", + "translation": "未提供路径,放弃迁移" + }, + { + "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translation": "无法读取提供的目录中的config.toml文件,错误:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Read Miner Config", + "message": "Read Miner Config", + "translation": "读取矿工配置" + }, + { + "id": "Completed Step: {Step}", + "message": "Completed Step: {Step}", + "translation": "完成步骤:{Step}", + "placeholders": [ + { + "id": "Step", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "step" + } + ] + } + ] + +} \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json new file mode 100644 index 00000000000..41a320af4b4 --- /dev/null +++ b/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json @@ -0,0 +1,330 @@ +{ + "language": "zh", + "messages": [ + { + "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "translation": "此互动工具将引导您完成lotus-provider的迁移。\n随时按Ctrl+C退出。" + }, + { + "id": "This tool confirms each action it does.", + "message": "This tool confirms each action it does.", + "translation": "此工具确认其执行的每个操作。" + }, + { + "id": "Use the arrow keys to navigate: ↓ ↑ → ←", + "message": "Use the arrow keys to navigate: ↓ ↑ → ←", + "translation": "" + }, + { + "id": "Ctrl+C pressed in Terminal", + "message": "Ctrl+C pressed in Terminal", + "translation": "在终端中按下Ctrl+C" + }, + { + "id": "Waiting for lotus-miner to write sectors into Yugabyte.", + "message": "Waiting for lotus-miner to write sectors into Yugabyte.", + "translation": "" + }, + { + "id": "Error verifying sectors: {Error}", + "message": "Error verifying sectors: {Error}", + "translation": "验证扇区时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Sectors verified. {I} sector locations found.", + "message": "Sectors verified. {I} sector locations found.", + "translation": "", + "placeholders": [ + { + "id": "I", + "string": "%[1]d", + "type": "[]int", + "underlyingType": "[]int", + "argNum": 1, + "expr": "i" + } + ] + }, + { + "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", + "translation": "从config.toml中永远不要删除lotus-miner的数据库信息,因为它避免了双PoSt。" + }, + { + "id": "Verified Sectors in Database", + "message": "Verified Sectors in Database", + "translation": "" + }, + { + "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", + "translation": "输入连接到您的Yugabyte数据库安装的信息(https://download.yugabyte.com/)" + }, + { + "id": "Host: {Hosts_}", + "message": "Host: {Hosts_}", + "translation": "主机:{Hosts_}", + "placeholders": [ + { + "id": "Hosts_", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "strings.Join(harmonycfg.Hosts, \",\")" + } + ] + }, + { + "id": "Port: {Port}", + "message": "Port: {Port}", + "translation": "端口:{Port}", + "placeholders": [ + { + "id": "Port", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Port" + } + ] + }, + { + "id": "Username: {Username}", + "message": "Username: {Username}", + "translation": "用户名:{Username}", + "placeholders": [ + { + "id": "Username", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Username" + } + ] + }, + { + "id": "Password: {Password}", + "message": "Password: {Password}", + "translation": "密码:{Password}", + "placeholders": [ + { + "id": "Password", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Password" + } + ] + }, + { + "id": "Database: {Database}", + "message": "Database: {Database}", + "translation": "数据库:{Database}", + "placeholders": [ + { + "id": "Database", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "harmonycfg.Database" + } + ] + }, + { + "id": "Continue to connect and update schema.", + "message": "Continue to connect and update schema.", + "translation": "继续连接和更新架构。" + }, + { + "id": "Database config error occurred, abandoning migration: {Error}", + "message": "Database config error occurred, abandoning migration: {Error}", + "translation": "发生数据库配置错误,放弃迁移:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Enter the Yugabyte database host(s)", + "message": "Enter the Yugabyte database host(s)", + "translation": "输入Yugabyte数据库主机(S)" + }, + { + "id": "No host provided", + "message": "No host provided", + "translation": "未提供主机" + }, + { + "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", + "translation": "输入Yugabyte数据库 {Stringport_username_password_databasei_1}", + "placeholders": [ + { + "id": "Stringport_username_password_databasei_1", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" + } + ] + }, + { + "id": "No value provided", + "message": "No value provided", + "translation": "未提供值" + }, + { + "id": "Error connecting to Yugabyte database: {Error}", + "message": "Error connecting to Yugabyte database: {Error}", + "translation": "连接到Yugabyte数据库时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Connected to Yugabyte. Schema is current.", + "message": "Connected to Yugabyte. Schema is current.", + "translation": "已连接到Yugabyte。模式是当前的。" + }, + { + "id": "Error encoding config.toml: {Error}", + "message": "Error encoding config.toml: {Error}", + "translation": "编码config.toml时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error reading filemode of config.toml: {Error}", + "message": "Error reading filemode of config.toml: {Error}", + "translation": "读取config.toml文件模式时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error writing config.toml: {Error}", + "message": "Error writing config.toml: {Error}", + "translation": "写入config.toml时出错:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Restart Lotus Miner.", + "message": "Restart Lotus Miner.", + "translation": "重新启动Lotus Miner。" + }, + { + "id": "Connected to Yugabyte", + "message": "Connected to Yugabyte", + "translation": "已连接到Yugabyte" + }, + { + "id": "Select the location of your lotus-miner config directory?", + "message": "Select the location of your lotus-miner config directory?", + "translation": "选择您的lotus-miner配置目录的位置?" + }, + { + "id": "Other", + "message": "Other", + "translation": "其他" + }, + { + "id": "Enter the path to the configuration directory used by lotus-miner", + "message": "Enter the path to the configuration directory used by lotus-miner", + "translation": "输入lotus-miner使用的配置目录的路径" + }, + { + "id": "No path provided, abandoning migration", + "message": "No path provided, abandoning migration", + "translation": "未提供路径,放弃迁移" + }, + { + "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", + "translation": "无法读取提供的目录中的config.toml文件,错误:{Error}", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Read Miner Config", + "message": "Read Miner Config", + "translation": "读取矿工配置" + }, + { + "id": "Completed Step: {Step}", + "message": "Completed Step: {Step}", + "translation": "完成步骤:{Step}", + "placeholders": [ + { + "id": "Step", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "step" + } + ] + } + ] +} \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/translations.go b/cmd/lotus-provider/internal/translations/translations.go new file mode 100644 index 00000000000..ee0724a65ae --- /dev/null +++ b/cmd/lotus-provider/internal/translations/translations.go @@ -0,0 +1,13 @@ +// Usage: +// 1. change strings in guidedSetup folder that use d.T() or d.say(). +// 2. run `go generate` in the cmd/lotus-provider/internal/translations/ folder. +// 3. Ask ChatGPT to translate the locale/??/out.gotext.json files' translation +// fields to their respective languages. Replace the messages.gotext.json files. +// In web UI, you need to hit "contine generating" +// 4. run `go generate` in the cmd/lotus-provider/internal/translations/ folder to re-import. +// +// FUTURE Reliability: automate this with an openAPI call when translate fields turn up blank. +// FUTURE Cost Savings: avoid re-translating stuff that's in messages.gotext.json already. +package translations + +//go:generate gotext -srclang=en update -out=catalog.go -lang=en,zh,ko github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup diff --git a/cmd/lotus-provider/main.go b/cmd/lotus-provider/main.go index 1b025303c26..c082ddd43b5 100644 --- a/cmd/lotus-provider/main.go +++ b/cmd/lotus-provider/main.go @@ -17,6 +17,7 @@ import ( lcli "github.com/filecoin-project/lotus/cli" cliutil "github.com/filecoin-project/lotus/cli/util" "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup" "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/tracing" "github.com/filecoin-project/lotus/node/repo" @@ -36,7 +37,6 @@ func SetupCloseHandler() { } func main() { - SetupCloseHandler() lotuslog.SetupLogLevels() @@ -47,6 +47,7 @@ func main() { configCmd, testCmd, webCmd, + guidedSetup.GuidedsetupCmd, //backupCmd, //lcli.WithCategory("chain", actorCmd), //lcli.WithCategory("storage", sectorsCmd), diff --git a/cmd/lotus-provider/proving.go b/cmd/lotus-provider/proving.go index 379bfdf85ab..c8a7e57fa7a 100644 --- a/cmd/lotus-provider/proving.go +++ b/cmd/lotus-provider/proving.go @@ -27,6 +27,10 @@ var testCmd = &cli.Command{ //provingInfoCmd, wdPostCmd, }, + Before: func(cctx *cli.Context) error { + SetupCloseHandler() + return nil + }, } var wdPostCmd = &cli.Command{ diff --git a/cmd/lotus-provider/run.go b/cmd/lotus-provider/run.go index b1a4ff828c2..9b50470c9b7 100644 --- a/cmd/lotus-provider/run.go +++ b/cmd/lotus-provider/run.go @@ -67,6 +67,7 @@ var runCmd = &cli.Command{ }, }, Action: func(cctx *cli.Context) (err error) { + SetupCloseHandler() defer func() { if err != nil { if err, ok := err.(stackTracer); ok { @@ -164,6 +165,8 @@ var webCmd = &cli.Command{ }, }, Action: func(cctx *cli.Context) error { + SetupCloseHandler() + db, err := deps.MakeDB(cctx) if err != nil { return err diff --git a/cmd/lotus-provider/stop.go b/cmd/lotus-provider/stop.go index 3376d762a46..0ecbe135b9e 100644 --- a/cmd/lotus-provider/stop.go +++ b/cmd/lotus-provider/stop.go @@ -13,6 +13,8 @@ var stopCmd = &cli.Command{ Usage: "Stop a running lotus provider", Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { + SetupCloseHandler() + api, closer, err := lcli.GetAPI(cctx) if err != nil { return err diff --git a/go.mod b/go.mod index c1b353fab4a..e9eea4c2a04 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921 github.com/buger/goterm v1.0.3 + github.com/charmbracelet/lipgloss v0.9.1 github.com/chzyer/readline v1.5.1 github.com/containerd/cgroups v1.1.0 github.com/coreos/go-systemd/v22 v22.5.0 @@ -114,6 +115,7 @@ require ( github.com/libp2p/go-libp2p-routing-helpers v0.7.0 github.com/libp2p/go-maddr-filter v0.1.0 github.com/libp2p/go-msgio v0.3.0 + github.com/manifoldco/promptui v0.9.0 github.com/mattn/go-isatty v0.0.19 github.com/mattn/go-sqlite3 v1.14.16 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 @@ -159,6 +161,7 @@ require ( golang.org/x/sync v0.3.0 golang.org/x/sys v0.15.0 golang.org/x/term v0.15.0 + golang.org/x/text v0.14.0 golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 @@ -173,6 +176,7 @@ require ( github.com/StackExchange/wmi v1.2.1 // indirect github.com/akavel/rsrc v0.8.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect @@ -266,18 +270,20 @@ require ( github.com/libp2p/go-netroute v0.2.1 // indirect github.com/libp2p/go-reuseport v0.4.0 // indirect github.com/libp2p/go-yamux/v4 v4.0.1 // indirect - github.com/lucasb-eyer/go-colorful v1.0.3 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magefile/mage v1.9.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-runewidth v0.0.10 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.55 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mr-tron/base58 v1.2.0 // indirect + github.com/muesli/reflow v0.3.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multistream v0.4.1 // indirect @@ -296,7 +302,7 @@ require ( github.com/quic-go/qtls-go1-20 v0.3.3 // indirect github.com/quic-go/quic-go v0.38.2 // indirect github.com/quic-go/webtransport-go v0.5.3 // indirect - github.com/rivo/uniseg v0.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v2.18.12+incompatible // indirect @@ -321,7 +327,6 @@ require ( go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/text v0.14.0 // indirect gonum.org/v1/gonum v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.55.0 // indirect diff --git a/go.sum b/go.sum index a7983d80cd1..ffd7f938391 100644 --- a/go.sum +++ b/go.sum @@ -102,6 +102,8 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -144,6 +146,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg= +github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -1141,8 +1145,9 @@ github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= -github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.9.0 h1:t3AU2wNwehMCW97vuqQLtw6puppWXHO+O2MHo5a50XE= @@ -1156,6 +1161,8 @@ github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= @@ -1180,8 +1187,10 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -1231,6 +1240,10 @@ github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjW github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= @@ -1447,8 +1460,9 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= From 229645beb521df7d811a75f3903786db6e16faf8 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 12 Feb 2024 22:31:51 -0600 Subject: [PATCH 04/63] lp mig: default tasks --- cmd/lotus-provider/guidedSetup/guidedSetup.go | 65 ++++-- .../internal/translations/catalog.go | 187 ++++++++++-------- .../translations/locales/en/out.gotext.json | 45 +++++ .../translations/locales/ko/out.gotext.json | 35 ++++ .../translations/locales/zh/out.gotext.json | 35 ++++ .../internal/translations/translations.go | 2 +- documentation/en/cli-lotus-provider.md | 27 ++- .../harmonydb/sql/20240212-common-layers.sql | 22 +++ 8 files changed, 313 insertions(+), 105 deletions(-) create mode 100644 lib/harmony/harmonydb/sql/20240212-common-layers.sql diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/lotus-provider/guidedSetup/guidedSetup.go index e8a690ee516..f4a4edb9212 100644 --- a/cmd/lotus-provider/guidedSetup/guidedSetup.go +++ b/cmd/lotus-provider/guidedSetup/guidedSetup.go @@ -17,17 +17,16 @@ import ( "time" "github.com/BurntSushi/toml" + "github.com/charmbracelet/lipgloss" "github.com/manifoldco/promptui" "github.com/samber/lo" + "github.com/urfave/cli/v2" + "golang.org/x/text/language" + "golang.org/x/text/message" _ "github.com/filecoin-project/lotus/cmd/lotus-provider/internal/translations" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" - - "github.com/charmbracelet/lipgloss" - "github.com/urfave/cli/v2" - "golang.org/x/text/language" - "golang.org/x/text/message" ) var GuidedsetupCmd = &cli.Command{ @@ -90,6 +89,11 @@ var ( Foreground(lipgloss.Color("black")). Background(lipgloss.Color("#FFFFFF")). Underline(true) + + code = lipgloss.NewStyle(). + Align(lipgloss.Left). + Foreground(lipgloss.Color("#00FF00")). + Background(lipgloss.Color("#f8f9fa")) ) type migrationStep func(*MigrationData) @@ -120,11 +124,9 @@ var migrationSteps = []migrationStep{ readMinerConfig, // Tells them to be on the miner machine yugabyteConnect, // Miner is updated verifySectors, // Verify the sectors are in the database - configToDB, // work on base configuration migration. - // probably should add default layers for enabling features. - // probably should add a web layer for the web interface. - // This is where Boost configuration can be completed. - // Ask if they want to report their MinerID as one that's running Provider + configToDB, // TODO work on base configuration migration. + doc, + oneLastThing, } type MigrationData struct { @@ -156,11 +158,49 @@ func configToDB(d *MigrationData) { //}) // NEEDS multiaddress PR committed to interpret configs correctly. - // TODO d.say(plain, "This lotus-miner services the Miner ID: %s\n", "TODO MinerID") // TODO!!! - //TODO + // TODO d.say(plain, "This lotus-miner services the Miner ID: %s\n", "TODO MinerID") + + // This will be added to the new/existing base layer along with its specific wallet rules. + // (if existing): Here's the diff of this miner's config.toml and the db's base layer. + // To edit, use the interactive editor by doing .... after setup completes. + // (if new): Writing the base layer. + + // commit the new base layer, also commit a miner-id-named layer. d.say(plain, "TODO FINISH THIS FUNCTION\n") } +func oneLastThing(d *MigrationData) { + d.say(section, "One Last Thing") + d.say(plain, "We want to bring you the best SP tooling. Can we record your Miner ID as one that is trying lotus-provider?\n") + d.say(plain, "Hit return to tell CurioStorage.org that you've migrated to lotus-provider.\n") + _, err := (&promptui.Prompt{Label: "Press return to continue"}).Run() + if err != nil { + d.say(notice, "Aborting remaining steps.\n", err.Error()) + } + // TODO http call to home with a simple message of + // this version and "lotus-provider" signed by the miner's key. +} + +func doc(d *MigrationData) { + d.say(plain, "The configuration layers have been created for you: base, post, gui, seal.") + d.say(plain, "Documentation: \n") + d.say(plain, "Put common configuration in 'base' and include it everywhere.\n") + d.say(plain, "Instances without tasks will still serve their sectors for other providers.\n") + d.say(plain, "As there are no local config.toml files, put per-machine changes in additional layers.\n") + d.say(plain, "Edit a layer with the command: ") + d.say(code, "lotus-provider config edit \n") + + d.say(plain, "TODO FINISH THIS FUNCTION.\n") + // TODO !! + // show the command to start the web interface & the command to start the main provider. + // This is where Boost configuration can be completed. + // Doc: You can run as many providers on the same tasks as you want. It provides redundancy. + d.say(plain, "Want PoST redundancy? Run many providers with the 'post' layer.\n") + d.say(plain, "Point your browser to your web GUI to complete setup with Boost and advanced featues.\n") + + fmt.Println() +} + func verifySectors(d *MigrationData) { var i []int var lastError string @@ -183,6 +223,7 @@ func verifySectors(d *MigrationData) { d.say(plain, "Sectors verified. %d sector locations found.\n", i) d.say(plain, "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n") + d.say(plain, "Finish sealing in progress before moving those systems to lotus-provider.\n") stepCompleted(d, d.T("Verified Sectors in Database")) } diff --git a/cmd/lotus-provider/internal/translations/catalog.go b/cmd/lotus-provider/internal/translations/catalog.go index 7605b2b47dc..0832b6d0ade 100644 --- a/cmd/lotus-provider/internal/translations/catalog.go +++ b/cmd/lotus-provider/internal/translations/catalog.go @@ -40,97 +40,112 @@ func init() { } var messageKeyToIndex = map[string]int{ - "Cannot read the config.toml file in the provided directory, Error: %s\n": 32, - "Completed Step: %s\n\n": 34, - "Connected to Yugabyte": 27, - "Connected to Yugabyte. Schema is current.\n": 22, - "Continue to connect and update schema.": 15, + "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n": 6, + "Cannot read the config.toml file in the provided directory, Error: %s\n": 37, + "Completed Step: %s\n\n": 39, + "Connected to Yugabyte": 32, + "Connected to Yugabyte. Schema is current.\n": 27, + "Continue to connect and update schema.": 20, "Ctrl+C pressed in Terminal": 3, - "Database config error occurred, abandoning migration: %s \n": 16, - "Database: %s": 14, - "Enter the Yugabyte database %s": 19, - "Enter the Yugabyte database host(s)": 17, - "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 9, - "Enter the path to the configuration directory used by lotus-miner": 30, - "Error connecting to Yugabyte database: %s\n": 21, - "Error encoding config.toml: %s\n": 23, - "Error reading filemode of config.toml: %s\n": 24, - "Error verifying sectors: %s\n": 5, - "Error writing config.toml: %s\n": 25, - "Host: %s": 10, - "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n": 7, - "No host provided\n": 18, - "No path provided, abandoning migration \n": 31, - "No value provided\n": 20, - "Other": 29, - "Password: %s": 13, - "Port: %s": 11, - "Read Miner Config": 33, - "Restart Lotus Miner. \n": 26, - "Sectors verified. %d sector locations found.\n": 6, - "Select the location of your lotus-miner config directory?": 28, + "Database config error occurred, abandoning migration: %s \n": 21, + "Database: %s": 19, + "Enter the Yugabyte database %s": 24, + "Enter the Yugabyte database host(s)": 22, + "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 14, + "Enter the path to the configuration directory used by lotus-miner": 35, + "Error connecting to Yugabyte database: %s\n": 26, + "Error encoding config.toml: %s\n": 28, + "Error reading filemode of config.toml: %s\n": 29, + "Error reading from database: %s. Aborting Migration.\n": 7, + "Error verifying sectors: %s\n": 10, + "Error writing config.toml: %s\n": 30, + "Host: %s": 15, + "Migrating configuration to database.": 4, + "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n": 12, + "No host provided\n": 23, + "No path provided, abandoning migration \n": 36, + "No value provided\n": 25, + "Other": 34, + "Password: %s": 18, + "Port: %s": 16, + "Read Miner Config": 38, + "Restart Lotus Miner. \n": 31, + "Sectors verified. %d sector locations found.\n": 11, + "Select the location of your lotus-miner config directory?": 33, + "TODO FINISH THIS FUNCTION\n": 8, "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.": 0, + "This step will migrate the configuration from the config.toml to the database.\n": 5, "This tool confirms each action it does.": 1, "Use the arrow keys to navigate: ↓ ↑ → ← ": 2, - "Username: %s": 12, - "Verified Sectors in Database": 8, - "Waiting for lotus-miner to write sectors into Yugabyte.": 4, + "Username: %s": 17, + "Verified Sectors in Database": 13, + "Waiting for lotus-miner to write sectors into Yugabyte.": 9, } -var enIndex = []uint32{ // 36 elements +var enIndex = []uint32{ // 41 elements // Entry 0 - 1F 0x00000000, 0x0000006b, 0x00000093, 0x000000c8, - 0x000000e3, 0x0000011b, 0x0000013f, 0x00000174, - 0x000001d7, 0x000001f4, 0x00000256, 0x00000262, - 0x0000026e, 0x0000027e, 0x0000028e, 0x0000029e, - 0x000002c5, 0x00000307, 0x0000032b, 0x00000341, - 0x00000363, 0x0000037a, 0x000003ac, 0x000003db, - 0x00000402, 0x00000434, 0x0000045a, 0x00000475, - 0x0000048b, 0x000004c5, 0x000004cb, 0x0000050d, + 0x000000e3, 0x00000108, 0x0000015c, 0x000001cc, + 0x00000209, 0x00000228, 0x00000260, 0x00000284, + 0x000002b9, 0x0000031c, 0x00000339, 0x0000039b, + 0x000003a7, 0x000003b3, 0x000003c3, 0x000003d3, + 0x000003e3, 0x0000040a, 0x0000044c, 0x00000470, + 0x00000486, 0x000004a8, 0x000004bf, 0x000004f1, + 0x00000520, 0x00000547, 0x00000579, 0x0000059f, // Entry 20 - 3F - 0x0000053a, 0x00000588, 0x0000059a, 0x000005b6, -} // Size: 168 bytes + 0x000005ba, 0x000005d0, 0x0000060a, 0x00000610, + 0x00000652, 0x0000067f, 0x000006cd, 0x000006df, + 0x000006fb, +} // Size: 188 bytes -const enData string = "" + // Size: 1462 bytes +const enData string = "" + // Size: 1787 bytes "\x02This interactive tool will walk you through migration of lotus-provi" + "der.\x0aPress Ctrl+C to exit at any time.\x02This tool confirms each act" + "ion it does.\x04\x00\x01 0\x02Use the arrow keys to navigate: ↓ ↑ → ←" + - "\x02Ctrl+C pressed in Terminal\x02Waiting for lotus-miner to write secto" + - "rs into Yugabyte.\x04\x00\x01\x0a\x1f\x02Error verifying sectors: %[1]s" + - "\x04\x00\x01\x0a0\x02Sectors verified. %[1]d sector locations found.\x04" + - "\x00\x01\x0a^\x02Never remove the database info from the config.toml for" + - " lotus-miner as it avoids double PoSt.\x02Verified Sectors in Database" + - "\x02Enter the info to connect to your Yugabyte database installation (ht" + - "tps://download.yugabyte.com/)\x02Host: %[1]s\x02Port: %[1]s\x02Username:" + - " %[1]s\x02Password: %[1]s\x02Database: %[1]s\x02Continue to connect and " + - "update schema.\x04\x00\x02 \x0a<\x02Database config error occurred, aban" + - "doning migration: %[1]s\x02Enter the Yugabyte database host(s)\x04\x00" + - "\x01\x0a\x11\x02No host provided\x02Enter the Yugabyte database %[1]s" + - "\x04\x00\x01\x0a\x12\x02No value provided\x04\x00\x01\x0a-\x02Error conn" + - "ecting to Yugabyte database: %[1]s\x04\x00\x01\x0a*\x02Connected to Yuga" + - "byte. Schema is current.\x04\x00\x01\x0a\x22\x02Error encoding config.to" + - "ml: %[1]s\x04\x00\x01\x0a-\x02Error reading filemode of config.toml: %[1" + - "]s\x04\x00\x01\x0a!\x02Error writing config.toml: %[1]s\x04\x00\x02 \x0a" + - "\x15\x02Restart Lotus Miner.\x02Connected to Yugabyte\x02Select the loca" + - "tion of your lotus-miner config directory?\x02Other\x02Enter the path to" + - " the configuration directory used by lotus-miner\x04\x00\x02 \x0a'\x02No" + - " path provided, abandoning migration\x04\x00\x01\x0aI\x02Cannot read the" + - " config.toml file in the provided directory, Error: %[1]s\x02Read Miner " + - "Config\x04\x00\x02\x0a\x0a\x16\x02Completed Step: %[1]s" + "\x02Ctrl+C pressed in Terminal\x02Migrating configuration to database." + + "\x04\x00\x01\x0aO\x02This step will migrate the configuration from the c" + + "onfig.toml to the database.\x02A Lotus-Miner cluster shares a database a" + + "nd shares the work of managing multiple Miner IDs and their sectors.\\n" + + "\x04\x00\x01\x0a8\x02Error reading from database: %[1]s. Aborting Migrat" + + "ion.\x04\x00\x01\x0a\x1a\x02TODO FINISH THIS FUNCTION\x02Waiting for lot" + + "us-miner to write sectors into Yugabyte.\x04\x00\x01\x0a\x1f\x02Error ve" + + "rifying sectors: %[1]s\x04\x00\x01\x0a0\x02Sectors verified. %[1]d secto" + + "r locations found.\x04\x00\x01\x0a^\x02Never remove the database info fr" + + "om the config.toml for lotus-miner as it avoids double PoSt.\x02Verified" + + " Sectors in Database\x02Enter the info to connect to your Yugabyte datab" + + "ase installation (https://download.yugabyte.com/)\x02Host: %[1]s\x02Port" + + ": %[1]s\x02Username: %[1]s\x02Password: %[1]s\x02Database: %[1]s\x02Cont" + + "inue to connect and update schema.\x04\x00\x02 \x0a<\x02Database config " + + "error occurred, abandoning migration: %[1]s\x02Enter the Yugabyte databa" + + "se host(s)\x04\x00\x01\x0a\x11\x02No host provided\x02Enter the Yugabyte" + + " database %[1]s\x04\x00\x01\x0a\x12\x02No value provided\x04\x00\x01\x0a" + + "-\x02Error connecting to Yugabyte database: %[1]s\x04\x00\x01\x0a*\x02Co" + + "nnected to Yugabyte. Schema is current.\x04\x00\x01\x0a\x22\x02Error enc" + + "oding config.toml: %[1]s\x04\x00\x01\x0a-\x02Error reading filemode of c" + + "onfig.toml: %[1]s\x04\x00\x01\x0a!\x02Error writing config.toml: %[1]s" + + "\x04\x00\x02 \x0a\x15\x02Restart Lotus Miner.\x02Connected to Yugabyte" + + "\x02Select the location of your lotus-miner config directory?\x02Other" + + "\x02Enter the path to the configuration directory used by lotus-miner" + + "\x04\x00\x02 \x0a'\x02No path provided, abandoning migration\x04\x00\x01" + + "\x0aI\x02Cannot read the config.toml file in the provided directory, Err" + + "or: %[1]s\x02Read Miner Config\x04\x00\x02\x0a\x0a\x16\x02Completed Step" + + ": %[1]s" -var koIndex = []uint32{ // 36 elements +var koIndex = []uint32{ // 41 elements // Entry 0 - 1F 0x00000000, 0x0000007f, 0x000000b9, 0x000000b9, - 0x000000da, 0x000000da, 0x00000106, 0x00000106, - 0x0000019b, 0x0000019b, 0x00000209, 0x0000021a, - 0x00000228, 0x00000240, 0x00000254, 0x0000026e, - 0x00000298, 0x000002fc, 0x00000338, 0x00000367, - 0x0000039f, 0x000003c8, 0x00000421, 0x00000467, - 0x000004b3, 0x00000507, 0x0000054a, 0x0000056f, - 0x00000585, 0x000005d4, 0x000005db, 0x00000636, + 0x000000da, 0x000000da, 0x000000da, 0x000000da, + 0x000000da, 0x000000da, 0x000000da, 0x00000106, + 0x00000106, 0x0000019b, 0x0000019b, 0x00000209, + 0x0000021a, 0x00000228, 0x00000240, 0x00000254, + 0x0000026e, 0x00000298, 0x000002fc, 0x00000338, + 0x00000367, 0x0000039f, 0x000003c8, 0x00000421, + 0x00000467, 0x000004b3, 0x00000507, 0x0000054a, // Entry 20 - 3F - 0x00000689, 0x000006e8, 0x00000700, 0x0000071b, -} // Size: 168 bytes + 0x0000056f, 0x00000585, 0x000005d4, 0x000005db, + 0x00000636, 0x00000689, 0x000006e8, 0x00000700, + 0x0000071b, +} // Size: 188 bytes const koData string = "" + // Size: 1819 bytes "\x02이 대화형 도구는 로터스 공급자 이주를 안내합니다.\x0a언제든지 종료하려면 Ctrl+C를 누르십시오.\x02이 도구는 수" + @@ -151,19 +166,21 @@ const koData string = "" + // Size: 1819 bytes "않았으므로 마이그레이션을 포기합니다\x04\x00\x01\x0aZ\x02제공된 디렉토리에서 config.toml 파일을 읽을 " + "수 없습니다. 오류: %[1]s\x02마이너 구성 읽기\x04\x00\x02\x0a\x0a\x15\x02단계 완료: %[1]s" -var zhIndex = []uint32{ // 36 elements +var zhIndex = []uint32{ // 41 elements // Entry 0 - 1F 0x00000000, 0x00000055, 0x00000080, 0x00000080, - 0x00000099, 0x00000099, 0x000000bc, 0x000000bc, - 0x00000121, 0x00000121, 0x0000017b, 0x0000018a, - 0x00000199, 0x000001ab, 0x000001ba, 0x000001cc, - 0x000001eb, 0x00000224, 0x00000249, 0x0000025e, - 0x0000027c, 0x0000028e, 0x000002bf, 0x000002f1, - 0x00000319, 0x0000034d, 0x00000375, 0x00000396, - 0x000003ab, 0x000003db, 0x000003e2, 0x00000412, + 0x00000099, 0x00000099, 0x00000099, 0x00000099, + 0x00000099, 0x00000099, 0x00000099, 0x000000bc, + 0x000000bc, 0x00000121, 0x00000121, 0x0000017b, + 0x0000018a, 0x00000199, 0x000001ab, 0x000001ba, + 0x000001cc, 0x000001eb, 0x00000224, 0x00000249, + 0x0000025e, 0x0000027c, 0x0000028e, 0x000002bf, + 0x000002f1, 0x00000319, 0x0000034d, 0x00000375, // Entry 20 - 3F - 0x00000437, 0x00000480, 0x00000493, 0x000004ae, -} // Size: 168 bytes + 0x00000396, 0x000003ab, 0x000003db, 0x000003e2, + 0x00000412, 0x00000437, 0x00000480, 0x00000493, + 0x000004ae, +} // Size: 188 bytes const zhData string = "" + // Size: 1198 bytes "\x02此互动工具将引导您完成lotus-provider的迁移。\x0a随时按Ctrl+C退出。\x02此工具确认其执行的每个操作。\x02在" + @@ -181,4 +198,4 @@ const zhData string = "" + // Size: 1198 bytes "\x02无法读取提供的目录中的config.toml文件,错误:%[1]s\x02读取矿工配置\x04\x00\x02\x0a\x0a\x15" + "\x02完成步骤:%[1]s" - // Total table size 4983 bytes (4KiB); checksum: 7348663B + // Total table size 5368 bytes (5KiB); checksum: 1762260B diff --git a/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json index d7c5cbaf2e4..aa319844f0b 100644 --- a/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json +++ b/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json @@ -29,6 +29,51 @@ "translatorComment": "Copied from source.", "fuzzy": true }, + { + "id": "Migrating configuration to database.", + "message": "Migrating configuration to database.", + "translation": "Migrating configuration to database.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "This step will migrate the configuration from the config.toml to the database.", + "message": "This step will migrate the configuration from the config.toml to the database.", + "translation": "This step will migrate the configuration from the config.toml to the database.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "translation": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Error reading from database: {Error}. Aborting Migration.", + "message": "Error reading from database: {Error}. Aborting Migration.", + "translation": "Error reading from database: {Error}. Aborting Migration.", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "TODO FINISH THIS FUNCTION", + "message": "TODO FINISH THIS FUNCTION", + "translation": "TODO FINISH THIS FUNCTION", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", diff --git a/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json index d847ef46ab1..1459a0cc5d9 100644 --- a/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json +++ b/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json @@ -21,6 +21,41 @@ "message": "Ctrl+C pressed in Terminal", "translation": "터미널에서 Ctrl+C가 눌림" }, + { + "id": "Migrating configuration to database.", + "message": "Migrating configuration to database.", + "translation": "" + }, + { + "id": "This step will migrate the configuration from the config.toml to the database.", + "message": "This step will migrate the configuration from the config.toml to the database.", + "translation": "" + }, + { + "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "translation": "" + }, + { + "id": "Error reading from database: {Error}. Aborting Migration.", + "message": "Error reading from database: {Error}. Aborting Migration.", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "TODO FINISH THIS FUNCTION", + "message": "TODO FINISH THIS FUNCTION", + "translation": "" + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", diff --git a/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json b/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json index 41a320af4b4..6bfb5d85faf 100644 --- a/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json +++ b/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json @@ -21,6 +21,41 @@ "message": "Ctrl+C pressed in Terminal", "translation": "在终端中按下Ctrl+C" }, + { + "id": "Migrating configuration to database.", + "message": "Migrating configuration to database.", + "translation": "" + }, + { + "id": "This step will migrate the configuration from the config.toml to the database.", + "message": "This step will migrate the configuration from the config.toml to the database.", + "translation": "" + }, + { + "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "translation": "" + }, + { + "id": "Error reading from database: {Error}. Aborting Migration.", + "message": "Error reading from database: {Error}. Aborting Migration.", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "TODO FINISH THIS FUNCTION", + "message": "TODO FINISH THIS FUNCTION", + "translation": "" + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", diff --git a/cmd/lotus-provider/internal/translations/translations.go b/cmd/lotus-provider/internal/translations/translations.go index ee0724a65ae..9ca0038db43 100644 --- a/cmd/lotus-provider/internal/translations/translations.go +++ b/cmd/lotus-provider/internal/translations/translations.go @@ -3,7 +3,7 @@ // 2. run `go generate` in the cmd/lotus-provider/internal/translations/ folder. // 3. Ask ChatGPT to translate the locale/??/out.gotext.json files' translation // fields to their respective languages. Replace the messages.gotext.json files. -// In web UI, you need to hit "contine generating" +// In web UI, you need to hit "continue generating" // 4. run `go generate` in the cmd/lotus-provider/internal/translations/ folder to re-import. // // FUTURE Reliability: automate this with an openAPI call when translate fields turn up blank. diff --git a/documentation/en/cli-lotus-provider.md b/documentation/en/cli-lotus-provider.md index 5e58641075e..a01fc5287ac 100644 --- a/documentation/en/cli-lotus-provider.md +++ b/documentation/en/cli-lotus-provider.md @@ -10,13 +10,14 @@ VERSION: 1.25.3-dev COMMANDS: - run Start a lotus provider process - stop Stop a running lotus provider - config Manage node config by layers. The layer 'base' will always be applied. - test Utility functions for testing - web Start lotus provider web interface - version Print version - help, h Shows a list of commands or help for one command + run Start a lotus provider process + stop Stop a running lotus provider + config Manage node config by layers. The layer 'base' will always be applied. + test Utility functions for testing + web Start lotus provider web interface + guided-setup Run the guided setup for migrating from lotus-miner to lotus-provider + version Print version + help, h Shows a list of commands or help for one command DEVELOPER: auth Manage RPC permissions log Manage logging @@ -267,6 +268,18 @@ OPTIONS: --help, -h show help ``` +## lotus-provider guided-setup +``` +NAME: + lotus-provider guided-setup - Run the guided setup for migrating from lotus-miner to lotus-provider + +USAGE: + lotus-provider guided-setup [command options] [arguments...] + +OPTIONS: + --help, -h show help +``` + ## lotus-provider version ``` NAME: diff --git a/lib/harmony/harmonydb/sql/20240212-common-layers.sql b/lib/harmony/harmonydb/sql/20240212-common-layers.sql new file mode 100644 index 00000000000..3f1bd29c6b4 --- /dev/null +++ b/lib/harmony/harmonydb/sql/20240212-common-layers.sql @@ -0,0 +1,22 @@ +INSERT INTO harmony_config (title, config) VALUES + ('post', ' + [Subsystems] + EnableWindowPost = true + Enablewinningpost = true + '), + + ('gui', ' + [Subsystems] + EnableWebGui = true + '), + + ('seal', ' + [Subsystems] + EnableSealSDR = true + EnableSealSDRTrees = true + EnableSendPrecommitMsg = true + EnablePoRepProof = true + EnableSendCommitMsg = true + EnableMoveStorage = true + ') + ON CONFLICT (title) DO NOTHING; \ No newline at end of file From 5a61b87ceb42a97d8681ca82c6bc4c9353095f57 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Tue, 13 Feb 2024 09:25:29 -0600 Subject: [PATCH 05/63] code comments --- lib/harmony/harmonydb/sql/20240212-common-layers.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/harmony/harmonydb/sql/20240212-common-layers.sql b/lib/harmony/harmonydb/sql/20240212-common-layers.sql index 3f1bd29c6b4..56467abe9b1 100644 --- a/lib/harmony/harmonydb/sql/20240212-common-layers.sql +++ b/lib/harmony/harmonydb/sql/20240212-common-layers.sql @@ -19,4 +19,4 @@ INSERT INTO harmony_config (title, config) VALUES EnableSendCommitMsg = true EnableMoveStorage = true ') - ON CONFLICT (title) DO NOTHING; \ No newline at end of file + ON CONFLICT (title) DO NOTHING; -- SPs may have these names defined already. \ No newline at end of file From 17ffd12a5d86578666913c3263c49f7e5cf5a6ef Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Tue, 13 Feb 2024 10:13:48 -0600 Subject: [PATCH 06/63] docs --- cmd/lotus-provider/guidedSetup/guidedSetup.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/lotus-provider/guidedSetup/guidedSetup.go index f4a4edb9212..1ee8050ee1f 100644 --- a/cmd/lotus-provider/guidedSetup/guidedSetup.go +++ b/cmd/lotus-provider/guidedSetup/guidedSetup.go @@ -139,9 +139,8 @@ type MigrationData struct { } func configToDB(d *MigrationData) { - d.say(section, "Migrating configuration to database.") - d.say(notice, "This step will migrate the configuration from the config.toml to the database.\n") - d.say(plain, `A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\n`) + d.say(section, "Migrating config.toml to database.") + d.say(plain, `A Lotus-Provider cluster shares a database. They share the work of proving multiple Miner ID's sectors.\n`) type rawConfig struct { Raw []byte `db:"config"` @@ -170,15 +169,15 @@ func configToDB(d *MigrationData) { } func oneLastThing(d *MigrationData) { - d.say(section, "One Last Thing") - d.say(plain, "We want to bring you the best SP tooling. Can we record your Miner ID as one that is trying lotus-provider?\n") - d.say(plain, "Hit return to tell CurioStorage.org that you've migrated to lotus-provider.\n") + d.say(section, "To bring you the best SP tooling...") + d.say(plain, "Share with the Curio team your interest in lotus-provider for this Miner ID.\n") + d.say(plain, "Hit return to tell http://CurioStorage.org that you've migrated to lotus-provider.\n") _, err := (&promptui.Prompt{Label: "Press return to continue"}).Run() if err != nil { d.say(notice, "Aborting remaining steps.\n", err.Error()) } // TODO http call to home with a simple message of - // this version and "lotus-provider" signed by the miner's key. + // this version, net (mainnet/testnet), and "lotus-provider" signed by the miner's key. } func doc(d *MigrationData) { From 0c8969df0138cee3353e3a0abbf8aeab33c37f18 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 19 Feb 2024 22:49:37 -0600 Subject: [PATCH 07/63] lp-mig-progress --- cmd/lotus-provider/config.go | 11 +- cmd/lotus-provider/deps/deps.go | 15 +- cmd/lotus-provider/guidedSetup/guidedSetup.go | 125 ++++++++++- cmd/lotus-provider/guidedSetup/shared.go | 188 +++++++++++++++++ cmd/lotus-provider/migrate.go | 196 +----------------- .../harmonydb/sql/20240212-common-layers.sql | 20 +- 6 files changed, 340 insertions(+), 215 deletions(-) create mode 100644 cmd/lotus-provider/guidedSetup/shared.go diff --git a/cmd/lotus-provider/config.go b/cmd/lotus-provider/config.go index 44ba49beb14..e713b513735 100644 --- a/cmd/lotus-provider/config.go +++ b/cmd/lotus-provider/config.go @@ -44,7 +44,7 @@ var configDefaultCmd = &cli.Command{ }, Action: func(cctx *cli.Context) error { comment := !cctx.Bool("no-comment") - cfg, err := getDefaultConfig(comment) + cfg, err := deps.GetDefaultConfig(comment) if err != nil { return err } @@ -54,15 +54,6 @@ var configDefaultCmd = &cli.Command{ }, } -func getDefaultConfig(comment bool) (string, error) { - c := config.DefaultLotusProvider() - cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) - if err != nil { - return "", err - } - return string(cb), nil -} - var configSetCmd = &cli.Command{ Name: "set", Aliases: []string{"add", "update", "create"}, diff --git a/cmd/lotus-provider/deps/deps.go b/cmd/lotus-provider/deps/deps.go index b7744bab2d5..8fc011f2aa9 100644 --- a/cmd/lotus-provider/deps/deps.go +++ b/cmd/lotus-provider/deps/deps.go @@ -77,9 +77,9 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { fromEnv := func() (*harmonydb.DB, error) { // #3 Try env sqlurlRegexp := `://(?P[^:]+):(?P[^@]+)@(?P[^:]+):(?P[^/]+)/(?P.+)$` - ss := regexp.MustCompile(sqlurlRegexp).FindStringSubmatch(os.Getenv("LOTUS_DB")) + ss := regexp.MustCompile(sqlurlRegexp).FindStringSubmatch(os.Getenv("PROVIDER_DB")) if len(ss) == 0 { - return nil, errors.New("no db connection string found in LOTUS_DB env") + return nil, errors.New("no db connection string found in PROVIDER_DB env") } return harmonydb.NewFromConfig(config.HarmonyDB{ Username: ss[1], @@ -97,7 +97,7 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { } return db, nil } - log.Error("No db connection string found. User CLI args or env var: set LOTUS_DB=postgres://user:pass@host:port/dbname") + log.Error("No db connection string found. User CLI args or env var: set PROVIDER_DB=postgres://user:pass@host:port/dbname") return fromCLI() //in-case it's not about bad config. } @@ -327,3 +327,12 @@ func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.LotusProviderConfig // validate the config. Because of layering, we must validate @ startup. return lp, nil } + +func GetDefaultConfig(comment bool) (string, error) { + c := config.DefaultLotusProvider() + cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) + if err != nil { + return "", err + } + return string(cb), nil +} diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/lotus-provider/guidedSetup/guidedSetup.go index 1ee8050ee1f..9d473b0eb49 100644 --- a/cmd/lotus-provider/guidedSetup/guidedSetup.go +++ b/cmd/lotus-provider/guidedSetup/guidedSetup.go @@ -6,8 +6,13 @@ package guidedSetup import ( + "bytes" "context" + "encoding/base64" + "encoding/json" "fmt" + "math/bits" + "net/http" "os" "os/signal" "path" @@ -24,6 +29,12 @@ import ( "golang.org/x/text/language" "golang.org/x/text/message" + "github.com/filecoin-project/go-address" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/chain/types" + cliutil "github.com/filecoin-project/lotus/cli/util" _ "github.com/filecoin-project/lotus/cmd/lotus-provider/internal/translations" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" @@ -38,7 +49,7 @@ var GuidedsetupCmd = &cli.Command{ say(header, "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.") - say(notice, "This tool confirms each action it does.") + say(notice, "This tool confirms each action it does and each step is reversable.") // Run the migration steps migrationData := MigrationData{ @@ -124,7 +135,7 @@ var migrationSteps = []migrationStep{ readMinerConfig, // Tells them to be on the miner machine yugabyteConnect, // Miner is updated verifySectors, // Verify the sectors are in the database - configToDB, // TODO work on base configuration migration. + configToDB, // work on base configuration migration. doc, oneLastThing, } @@ -136,6 +147,7 @@ type MigrationData struct { MinerConfigPath string MinerConfig *config.StorageMiner *harmonydb.DB + MinerID address.Address } func configToDB(d *MigrationData) { @@ -152,11 +164,19 @@ func configToDB(d *MigrationData) { d.say(notice, "Error reading from database: %s. Aborting Migration.\n", err.Error()) os.Exit(1) } + + // SaveCredsToDB + // 1. replace 'base' if not around with mig + // 2. if base is already around, add the miner ID to the list with all the other goodies mig+MINERID + // 3. If there's a base, diff it with the miner's config.toml and show the diff. + // TODO watch what gets printed so we don't give advice to use "mig-??" + //configs := lo.SliceToMap(configBytes, func(t rawConfig) (string, bool) { - // TODO + // TODO use new config reader //}) // NEEDS multiaddress PR committed to interpret configs correctly. + //TODO clean-up shared.go to be multilingual and use it. // TODO d.say(plain, "This lotus-miner services the Miner ID: %s\n", "TODO MinerID") // This will be added to the new/existing base layer along with its specific wallet rules. @@ -168,16 +188,88 @@ func configToDB(d *MigrationData) { d.say(plain, "TODO FINISH THIS FUNCTION\n") } +// bucket returns the nearest power of 2 (rounded down) for the given power. +func bucket(power *api.MinerPower) uint64 { + return 1 << bits.LeadingZeros64(power.TotalPower.QualityAdjPower.Uint64()) +} + func oneLastThing(d *MigrationData) { d.say(section, "To bring you the best SP tooling...") d.say(plain, "Share with the Curio team your interest in lotus-provider for this Miner ID.\n") d.say(plain, "Hit return to tell http://CurioStorage.org that you've migrated to lotus-provider.\n") - _, err := (&promptui.Prompt{Label: "Press return to continue"}).Run() + _, err := (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() if err != nil { d.say(notice, "Aborting remaining steps.\n", err.Error()) + os.Exit(1) + } + + d.say(section, "We want to build what you're using.") + if build.BuildType == build.BuildMainnet { + i, _, err := (&promptui.Select{ + Label: d.T("Select what you want to share with the Curio team."), + Items: []string{ + d.T("Individual Data: Miner ID, lotus-provider version, net (mainnet/testnet). Signed."), + d.T("Aggregate-Anonymous: Miner power (bucketed), version, and net."), + d.T("Hint: I am someone running lotus-provider in production."), + d.T("Nothing.")}, + Templates: d.selectTemplates, + }).Run() + if err != nil { + d.say(notice, "Aborting remaining steps.\n", err.Error()) + os.Exit(1) + } + if i != 3 { + + api, closer, err := cliutil.GetFullNodeAPI(nil) + if err != nil { + d.say(notice, "Error connecting to lotus node: %s\n", err.Error()) + os.Exit(1) + } + defer closer() + + power, err := api.StateMinerPower(context.Background(), d.MinerID, types.EmptyTSK) + if err != nil { + d.say(notice, "Error getting miner power: %s\n", err.Error()) + os.Exit(1) + } + msgMap := map[string]any{ + "version": build.BuildVersion, + "net": build.BuildType, + "power": map[int]any{1: power, 2: bucket(power)}, + } + + if i == 1 { // Sign it + msgMap["minerID"] = d.MinerID + } + msg, err := json.Marshal(msgMap) + if err != nil { + d.say(notice, "Error marshalling message: %s\n", err.Error()) + os.Exit(1) + } + if i == 1 { + mi, err := api.StateMinerInfo(context.Background(), d.MinerID, types.EmptyTSK) + if err != nil { + d.say(notice, "Error getting miner info: %s\n", err.Error()) + os.Exit(1) + } + sig, err := api.WalletSign(context.Background(), mi.Worker, msg) + if err != nil { + d.say(notice, "Error signing message: %s\n", err.Error()) + os.Exit(1) + } + msgMap["signature"] = base64.StdEncoding.EncodeToString(sig.Data) + msg, err = json.Marshal(msgMap) + if err != nil { + d.say(notice, "Error marshalling message: %s\n", err.Error()) + os.Exit(1) + } + } + + http.DefaultClient.Post("https://curiostorage.org/api/v1/usage", "application/json", bytes.NewReader(msg)) + } + } else { + d.say(plain, "Not mainnet, not sharing.\n") } - // TODO http call to home with a simple message of - // this version, net (mainnet/testnet), and "lotus-provider" signed by the miner's key. } func doc(d *MigrationData) { @@ -189,6 +281,7 @@ func doc(d *MigrationData) { d.say(plain, "Edit a layer with the command: ") d.say(code, "lotus-provider config edit \n") + d.say(plain, "Join #fil-curio-users in Filecoin slack for help.\n") d.say(plain, "TODO FINISH THIS FUNCTION.\n") // TODO !! // show the command to start the web interface & the command to start the main provider. @@ -219,11 +312,15 @@ func verifySectors(d *MigrationData) { fmt.Print(".") time.Sleep(time.Second) } - d.say(plain, "Sectors verified. %d sector locations found.\n", i) - d.say(plain, "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n") + d.say(plain, "The sectors are in the database. The database is ready for lotus-provider.\n") + d.say(notice, "Now shut down lotus-miner and move the systems to lotus-provider.\n") - d.say(plain, "Finish sealing in progress before moving those systems to lotus-provider.\n") - stepCompleted(d, d.T("Verified Sectors in Database")) + _, err := (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() + if err != nil { + d.say(notice, "Aborting migration.\n") + os.Exit(1) + } + stepCompleted(d, d.T("Sectors verified. %d sector locations found.\n", i)) } func yugabyteConnect(d *MigrationData) { @@ -296,7 +393,7 @@ yugabyteFor: d.say(notice, "Error encoding config.toml: %s\n", err.Error()) os.Exit(1) } - _, _ = (&promptui.Prompt{Label: "Press return to update config.toml with Yugabyte info. Backup the file now."}).Run() + _, _ = (&promptui.Prompt{Label: d.T("Press return to update config.toml with Yugabyte info. Backup the file now.")}).Run() stat, err := os.Stat(path.Join(d.MinerConfigPath, "config.toml")) if err != nil { d.say(notice, "Error reading filemode of config.toml: %s\n", err.Error()) @@ -314,6 +411,12 @@ yugabyteFor: } func readMinerConfig(d *MigrationData) { + d.say(plain, "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.\n") + _, err := (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() + if err != nil { + d.say(notice, "Aborting migration.\n") + os.Exit(1) + } verifyPath := func(dir string) (*config.StorageMiner, error) { cfg := config.DefaultStorageMiner() _, err := toml.DecodeFile(path.Join(dir, "config.toml"), &cfg) diff --git a/cmd/lotus-provider/guidedSetup/shared.go b/cmd/lotus-provider/guidedSetup/shared.go new file mode 100644 index 00000000000..089b8f1259e --- /dev/null +++ b/cmd/lotus-provider/guidedSetup/shared.go @@ -0,0 +1,188 @@ +package guidedSetup + +import ( + "bytes" + "context" + "encoding/base64" + "errors" + "fmt" + "net/http" + "os" + "path" + "strings" + + "github.com/BurntSushi/toml" + "github.com/filecoin-project/go-address" + "github.com/ipfs/go-datastore" + "github.com/samber/lo" + "github.com/urfave/cli/v2" + "golang.org/x/xerrors" + + cliutil "github.com/filecoin-project/lotus/cli/util" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/node/modules" + "github.com/filecoin-project/lotus/node/repo" +) + +func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header http.Header) (err error) { + _, say := SetupLanguage() + ctx := context.Background() + + r, err := repo.NewFS(minerRepoPath) + if err != nil { + return err + } + + ok, err := r.Exists() + if err != nil { + return err + } + + if !ok { + return fmt.Errorf("repo not initialized") + } + + lr, err := r.LockRO(repo.StorageMiner) + if err != nil { + return fmt.Errorf("locking repo: %w", err) + } + defer func() { _ = lr.Close() }() + + cfgNode, err := lr.Config() + if err != nil { + return fmt.Errorf("getting node config: %w", err) + } + smCfg := cfgNode.(*config.StorageMiner) + + db, err := harmonydb.NewFromConfig(smCfg.HarmonyDB) + if err != nil { + return fmt.Errorf("could not reach the database. Ensure the Miner config toml's HarmonyDB entry"+ + " is setup to reach Yugabyte correctly: %w", err) + } + + var titles []string + err = db.Select(ctx, &titles, `SELECT title FROM harmony_config WHERE LENGTH(config) > 0`) + if err != nil { + return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ + " is setup to reach Yugabyte correctly: %s", err.Error()) + } + if layerName == "" { + layerName = fmt.Sprintf("mig%d", len(titles)) + } else { + if lo.Contains(titles, layerName) && !overwrite { + return errors.New("the overwrite flag is needed to replace existing layer: " + layerName) + } + } + say(plain, "Layer %s created. ", layerName) + + // Copy over identical settings: + + buf, err := os.ReadFile(path.Join(lr.Path(), "config.toml")) + if err != nil { + return fmt.Errorf("could not read config.toml: %w", err) + } + var lpCfg config.LotusProviderConfig + _, err = toml.Decode(string(buf), &lpCfg) + if err != nil { + return fmt.Errorf("could not decode toml: %w", err) + } + + // Populate Miner Address + mmeta, err := lr.Datastore(ctx, "/metadata") + if err != nil { + return xerrors.Errorf("opening miner metadata datastore: %w", err) + } + defer func() { + _ = mmeta.Close() + }() + + maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) + if err != nil { + return xerrors.Errorf("getting miner address datastore entry: %w", err) + } + + addr, err := address.NewFromBytes(maddrBytes) + if err != nil { + return xerrors.Errorf("parsing miner actor address: %w", err) + } + + lpCfg.Addresses.MinerAddresses = []string{addr.String()} + + ks, err := lr.KeyStore() + if err != nil { + return xerrors.Errorf("keystore err: %w", err) + } + js, err := ks.Get(modules.JWTSecretName) + if err != nil { + return xerrors.Errorf("error getting JWTSecretName: %w", err) + } + + lpCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) + + ainfo, err := cliutil.GetAPIInfo(&cli.Context{}, repo.FullNode) + if err != nil { + return xerrors.Errorf(`could not get API info for FullNode: %w + Set the environment variable to the value of "lotus auth api-info --perm=admin"`, err) + } + lpCfg.Apis.ChainApiInfo = []string{header.Get("Authorization")[7:] + ":" + ainfo.Addr} + + // Express as configTOML + configTOML := &bytes.Buffer{} + if err = toml.NewEncoder(configTOML).Encode(lpCfg); err != nil { + return err + } + + if !lo.Contains(titles, "base") { + cfg, err := deps.GetDefaultConfig(true) + if err != nil { + return xerrors.Errorf("Cannot get default config: %w", err) + } + _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ('base', $1)", cfg) + + if err != nil { + return err + } + } + + if overwrite { + _, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", layerName) + if err != nil { + return err + } + } + + _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ($1, $2)", layerName, configTOML.String()) + if err != nil { + return err + } + + dbSettings := getDBSettings(*smCfg) + say(plain, `To work with the config:`) + say(code, `lotus-provider `+dbSettings+` config edit `+layerName) + say(plain, `To run Lotus Provider: in its own machine or cgroup without other files, use the command:`) + say(code, `lotus-provider `+dbSettings+` run --layer=`+layerName+`,post`) + return nil +} + +func getDBSettings(smCfg config.StorageMiner) string { + dbSettings := "" + def := config.DefaultStorageMiner().HarmonyDB + if def.Hosts[0] != smCfg.HarmonyDB.Hosts[0] { + dbSettings += ` --db-host="` + strings.Join(smCfg.HarmonyDB.Hosts, ",") + `"` + } + if def.Port != smCfg.HarmonyDB.Port { + dbSettings += " --db-port=" + smCfg.HarmonyDB.Port + } + if def.Username != smCfg.HarmonyDB.Username { + dbSettings += ` --db-user="` + smCfg.HarmonyDB.Username + `"` + } + if def.Password != smCfg.HarmonyDB.Password { + dbSettings += ` --db-password="` + smCfg.HarmonyDB.Password + `"` + } + if def.Database != smCfg.HarmonyDB.Database { + dbSettings += ` --db-name="` + smCfg.HarmonyDB.Database + `"` + } + return dbSettings +} diff --git a/cmd/lotus-provider/migrate.go b/cmd/lotus-provider/migrate.go index 3869c7dfb97..b79fb0835ba 100644 --- a/cmd/lotus-provider/migrate.go +++ b/cmd/lotus-provider/migrate.go @@ -1,28 +1,12 @@ package main import ( - "bytes" - "context" - "encoding/base64" - "errors" "fmt" - "os" - "path" - "strings" - "github.com/BurntSushi/toml" - "github.com/fatih/color" - "github.com/ipfs/go-datastore" - "github.com/samber/lo" "github.com/urfave/cli/v2" - "golang.org/x/xerrors" - - "github.com/filecoin-project/go-address" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/node/modules" + "github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup" "github.com/filecoin-project/lotus/node/repo" ) @@ -65,183 +49,15 @@ const ( const FlagMinerRepoDeprecation = "storagerepo" func fromMiner(cctx *cli.Context) (err error) { - ctx := context.Background() - cliCommandColor := color.New(color.FgHiBlue).SprintFunc() - configColor := color.New(color.FgHiGreen).SprintFunc() - - r, err := repo.NewFS(cctx.String(FlagMinerRepo)) - if err != nil { - return err - } - - ok, err := r.Exists() - if err != nil { - return err - } - - if !ok { - return fmt.Errorf("repo not initialized") - } - - lr, err := r.LockRO(repo.StorageMiner) - if err != nil { - return fmt.Errorf("locking repo: %w", err) - } - defer func() { _ = lr.Close() }() - - cfgNode, err := lr.Config() - if err != nil { - return fmt.Errorf("getting node config: %w", err) - } - smCfg := cfgNode.(*config.StorageMiner) - - db, err := harmonydb.NewFromConfig(smCfg.HarmonyDB) - if err != nil { - return fmt.Errorf("could not reach the database. Ensure the Miner config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %w", err) - } - - var titles []string - err = db.Select(ctx, &titles, `SELECT title FROM harmony_config WHERE LENGTH(config) > 0`) - if err != nil { - return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %s", err.Error()) - } - name := cctx.String("to-layer") - if name == "" { - name = fmt.Sprintf("mig%d", len(titles)) - } else { - if lo.Contains(titles, name) && !cctx.Bool("overwrite") { - return errors.New("the overwrite flag is needed to replace existing layer: " + name) - } - } - msg := "Layer " + configColor(name) + ` created. ` - - // Copy over identical settings: - - buf, err := os.ReadFile(path.Join(lr.Path(), "config.toml")) - if err != nil { - return fmt.Errorf("could not read config.toml: %w", err) - } - var lpCfg config.LotusProviderConfig - _, err = toml.Decode(string(buf), &lpCfg) - if err != nil { - return fmt.Errorf("could not decode toml: %w", err) - } - - // Populate Miner Address - mmeta, err := lr.Datastore(ctx, "/metadata") - if err != nil { - return xerrors.Errorf("opening miner metadata datastore: %w", err) - } - defer func() { - _ = mmeta.Close() - }() - - maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) - if err != nil { - return xerrors.Errorf("getting miner address datastore entry: %w", err) - } - - addr, err := address.NewFromBytes(maddrBytes) - if err != nil { - return xerrors.Errorf("parsing miner actor address: %w", err) - } - - lpCfg.Addresses.MinerAddresses = []string{addr.String()} - - ks, err := lr.KeyStore() - if err != nil { - return xerrors.Errorf("keystore err: %w", err) - } - js, err := ks.Get(modules.JWTSecretName) - if err != nil { - return xerrors.Errorf("error getting JWTSecretName: %w", err) - } - - lpCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) + minerRepoPath := cctx.String(FlagMinerRepo) + layerName := cctx.String("to-layer") + overwrite := cctx.Bool("overwrite") // Populate API Key _, header, err := cliutil.GetRawAPI(cctx, repo.FullNode, "v0") if err != nil { return fmt.Errorf("cannot read API: %w", err) } - - ainfo, err := cliutil.GetAPIInfo(&cli.Context{}, repo.FullNode) - if err != nil { - return xerrors.Errorf(`could not get API info for FullNode: %w - Set the environment variable to the value of "lotus auth api-info --perm=admin"`, err) - } - lpCfg.Apis.ChainApiInfo = []string{header.Get("Authorization")[7:] + ":" + ainfo.Addr} - - // Enable WindowPoSt - lpCfg.Subsystems.EnableWindowPost = true - msg += "\nBefore running lotus-provider, ensure any miner/worker answering of WindowPost is disabled by " + - "(on Miner) " + configColor("DisableBuiltinWindowPoSt=true") + " and (on Workers) not enabling windowpost on CLI or via " + - "environment variable " + configColor("LOTUS_WORKER_WINDOWPOST") + "." - - // Express as configTOML - configTOML := &bytes.Buffer{} - if err = toml.NewEncoder(configTOML).Encode(lpCfg); err != nil { - return err - } - - if !lo.Contains(titles, "base") { - cfg, err := getDefaultConfig(true) - if err != nil { - return xerrors.Errorf("Cannot get default config: %w", err) - } - _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ('base', $1)", cfg) - - if err != nil { - return err - } - } - - if cctx.Bool("overwrite") { - i, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", name) - if i != 0 { - fmt.Println("Overwriting existing layer") - } - if err != nil { - fmt.Println("Got error while deleting existing layer: " + err.Error()) - } - } - - _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ($1, $2)", name, configTOML.String()) - if err != nil { - return err - } - - dbSettings := "" - def := config.DefaultStorageMiner().HarmonyDB - if def.Hosts[0] != smCfg.HarmonyDB.Hosts[0] { - dbSettings += ` --db-host="` + strings.Join(smCfg.HarmonyDB.Hosts, ",") + `"` - } - if def.Port != smCfg.HarmonyDB.Port { - dbSettings += " --db-port=" + smCfg.HarmonyDB.Port - } - if def.Username != smCfg.HarmonyDB.Username { - dbSettings += ` --db-user="` + smCfg.HarmonyDB.Username + `"` - } - if def.Password != smCfg.HarmonyDB.Password { - dbSettings += ` --db-password="` + smCfg.HarmonyDB.Password + `"` - } - if def.Database != smCfg.HarmonyDB.Database { - dbSettings += ` --db-name="` + smCfg.HarmonyDB.Database + `"` - } - - var layerMaybe string - if name != "base" { - layerMaybe = "--layer=" + name - } - - msg += ` -To work with the config: -` + cliCommandColor(`lotus-provider `+dbSettings+` config help `) - msg += ` -To run Lotus Provider: in its own machine or cgroup without other files, use the command: -` + cliCommandColor(`lotus-provider `+dbSettings+` run `+layerMaybe) - fmt.Println(msg) - return nil + err = guidedSetup.SaveConfigToLayer(minerRepoPath, layerName, overwrite, header) + return err } diff --git a/lib/harmony/harmonydb/sql/20240212-common-layers.sql b/lib/harmony/harmonydb/sql/20240212-common-layers.sql index 56467abe9b1..7286f550fd2 100644 --- a/lib/harmony/harmonydb/sql/20240212-common-layers.sql +++ b/lib/harmony/harmonydb/sql/20240212-common-layers.sql @@ -18,5 +18,23 @@ INSERT INTO harmony_config (title, config) VALUES EnablePoRepProof = true EnableSendCommitMsg = true EnableMoveStorage = true - ') + '), + + ('seal-gpu', ' + [Subsystems] + EnableSealSDRTrees = true + '), + + ('seal-snark', ' + [Subsystems] + EnablePoRepProof = true + EnableSendPrecommitMsg = true + '), + + ('seal-cpu', ' + [Subsystems] + EnableSealSDR = true + EnableSendCommitMsg = true + EnableMoveStorage = true + '), ON CONFLICT (title) DO NOTHING; -- SPs may have these names defined already. \ No newline at end of file From 6765ac1fa807ff46a347b5e1f48b1e9a90e84012 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 19 Feb 2024 23:15:49 -0600 Subject: [PATCH 08/63] shared --- cmd/lotus-provider/guidedSetup/shared.go | 28 +++--- cmd/lotus-provider/migrate.go | 108 ----------------------- extern/filecoin-ffi | 2 +- 3 files changed, 18 insertions(+), 120 deletions(-) diff --git a/cmd/lotus-provider/guidedSetup/shared.go b/cmd/lotus-provider/guidedSetup/shared.go index 089b8f1259e..0e321609259 100644 --- a/cmd/lotus-provider/guidedSetup/shared.go +++ b/cmd/lotus-provider/guidedSetup/shared.go @@ -68,14 +68,6 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ " is setup to reach Yugabyte correctly: %s", err.Error()) } - if layerName == "" { - layerName = fmt.Sprintf("mig%d", len(titles)) - } else { - if lo.Contains(titles, layerName) && !overwrite { - return errors.New("the overwrite flag is needed to replace existing layer: " + layerName) - } - } - say(plain, "Layer %s created. ", layerName) // Copy over identical settings: @@ -108,7 +100,14 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return xerrors.Errorf("parsing miner actor address: %w", err) } - lpCfg.Addresses.MinerAddresses = []string{addr.String()} + lpCfg.Addresses = []config.LotusProviderAddresses{{ + MinerAddresses: []string{addr.String()}, + PreCommitControl: smCfg.Addresses.PreCommitControl, + CommitControl: smCfg.Addresses.CommitControl, + TerminateControl: smCfg.Addresses.TerminateControl, + DisableOwnerFallback: smCfg.Addresses.DisableOwnerFallback, + DisableWorkerFallback: smCfg.Addresses.DisableWorkerFallback, + }} ks, err := lr.KeyStore() if err != nil { @@ -134,7 +133,7 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return err } - if !lo.Contains(titles, "base") { + if !lo.Contains(titles, "base") { // TODO REMOVE THIS. INSTEAD ADD A BASE or append to addresses cfg, err := deps.GetDefaultConfig(true) if err != nil { return xerrors.Errorf("Cannot get default config: %w", err) @@ -145,7 +144,14 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return err } } - + if layerName == "" { // only make mig if base exists and we are different. // compare to base. + layerName = fmt.Sprintf("mig-%s", lpCfg.Addresses[0].MinerAddresses[0]) + } else { + if lo.Contains(titles, layerName) && !overwrite { + return errors.New("the overwrite flag is needed to replace existing layer: " + layerName) + } + } + say(plain, "Layer %s created. ", layerName) if overwrite { _, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", layerName) if err != nil { diff --git a/cmd/lotus-provider/migrate.go b/cmd/lotus-provider/migrate.go index 3c5e7c01cbc..b79fb0835ba 100644 --- a/cmd/lotus-provider/migrate.go +++ b/cmd/lotus-provider/migrate.go @@ -1,26 +1,12 @@ package main import ( - "context" - "encoding/base64" - "errors" "fmt" - "os" - "path" - "github.com/ipfs/go-datastore" - "github.com/samber/lo" "github.com/urfave/cli/v2" - "golang.org/x/xerrors" - - "github.com/filecoin-project/go-address" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/repo" ) @@ -66,100 +52,6 @@ func fromMiner(cctx *cli.Context) (err error) { minerRepoPath := cctx.String(FlagMinerRepo) layerName := cctx.String("to-layer") overwrite := cctx.Bool("overwrite") - ctx := context.Background() - - r, err := repo.NewFS(cctx.String(FlagMinerRepo)) - if err != nil { - return err - } - - ok, err := r.Exists() - if err != nil { - return err - } - - if !ok { - return fmt.Errorf("repo not initialized") - } - - lr, err := r.LockRO(repo.StorageMiner) - if err != nil { - return fmt.Errorf("locking repo: %w", err) - } - defer func() { _ = lr.Close() }() - - cfgNode, err := lr.Config() - if err != nil { - return fmt.Errorf("getting node config: %w", err) - } - smCfg := cfgNode.(*config.StorageMiner) - - db, err := harmonydb.NewFromConfig(smCfg.HarmonyDB) - if err != nil { - return fmt.Errorf("could not reach the database. Ensure the Miner config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %w", err) - } - - var titles []string - err = db.Select(ctx, &titles, `SELECT title FROM harmony_config WHERE LENGTH(config) > 0`) - if err != nil { - return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %s", err.Error()) - } - name := cctx.String("to-layer") - if name == "" { - name = fmt.Sprintf("mig%d", len(titles)) - } else { - if lo.Contains(titles, name) && !cctx.Bool("overwrite") { - return errors.New("the overwrite flag is needed to replace existing layer: " + name) - } - } - - // Copy over identical settings: - - buf, err := os.ReadFile(path.Join(lr.Path(), "config.toml")) - if err != nil { - return fmt.Errorf("could not read config.toml: %w", err) - } - var lpCfg config.LotusProviderConfig - _, err = deps.LoadConfigWithUpgrades(string(buf), &lpCfg) - if err != nil { - return fmt.Errorf("could not decode toml: %w", err) - } - - // Populate Miner Address - mmeta, err := lr.Datastore(ctx, "/metadata") - if err != nil { - return xerrors.Errorf("opening miner metadata datastore: %w", err) - } - defer func() { - _ = mmeta.Close() - }() - - maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) - if err != nil { - return xerrors.Errorf("getting miner address datastore entry: %w", err) - } - - addr, err := address.NewFromBytes(maddrBytes) - if err != nil { - return xerrors.Errorf("parsing miner actor address: %w", err) - } - - lpCfg.Addresses = []config.LotusProviderAddresses{{ - MinerAddresses: []string{addr.String()}, - }} - - ks, err := lr.KeyStore() - if err != nil { - return xerrors.Errorf("keystore err: %w", err) - } - js, err := ks.Get(modules.JWTSecretName) - if err != nil { - return xerrors.Errorf("error getting JWTSecretName: %w", err) - } - - lpCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) // Populate API Key _, header, err := cliutil.GetRawAPI(cctx, repo.FullNode, "v0") diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index b715c9403fa..4176a1e662e 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit b715c9403faf919e95fdc702cd651e842f18d890 +Subproject commit 4176a1e662e865834bfdc5861da921dc2d272b45 From d47b2f708a33d0d7392f1d020ab940a594e785dd Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Sun, 25 Feb 2024 21:34:36 -0600 Subject: [PATCH 09/63] comments and todos --- cmd/lotus-provider/deps/deps.go | 32 ++++-- cmd/lotus-provider/guidedSetup/guidedSetup.go | 99 +++++++++---------- cmd/lotus-provider/guidedSetup/shared.go | 36 ++++++- 3 files changed, 103 insertions(+), 64 deletions(-) diff --git a/cmd/lotus-provider/deps/deps.go b/cmd/lotus-provider/deps/deps.go index 27f9df4d74b..487d51c245d 100644 --- a/cmd/lotus-provider/deps/deps.go +++ b/cmd/lotus-provider/deps/deps.go @@ -58,21 +58,33 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { return harmonydb.NewFromConfig(dbConfig) } - // #2 Try local miner config - fromMiner := func() (*harmonydb.DB, error) { - u, err := os.UserHomeDir() + readToml := func(path string) (*harmonydb.DB, error) { + cfg, err := config.FromFile(path) if err != nil { return nil, err } - b, err := os.ReadFile(filepath.Join(u, ".lotus", "config.toml")) - if err != nil { - return nil, err + if c, ok := cfg.(*config.StorageMiner); !ok { + return harmonydb.NewFromConfig(c.HarmonyDB) } - cfg := config.DefaultStorageMiner() - if _, err := toml.Decode(string(b), &cfg); err != nil { + return nil, errors.New("not a miner config") + } + + // #2 Try local miner config + fromMinerEnv := func() (*harmonydb.DB, error) { + v := os.Getenv("LOTUS_MINER_PATH") + if v == "" { + return nil, errors.New("no miner env") + } + return readToml(filepath.Join(v, "config.toml")) + + } + + fromMiner := func() (*harmonydb.DB, error) { + u, err := os.UserHomeDir() + if err != nil { return nil, err } - return harmonydb.NewFromConfig(cfg.HarmonyDB) + return readToml(filepath.Join(u, ".lotusminer/config.toml")) } fromEnv := func() (*harmonydb.DB, error) { // #3 Try env @@ -90,7 +102,7 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { }) } - for _, f := range []func() (*harmonydb.DB, error){fromCLI, fromMiner, fromEnv} { + for _, f := range []func() (*harmonydb.DB, error){fromCLI, fromMinerEnv, fromMiner, fromEnv} { db, err := f() if err != nil { continue diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/lotus-provider/guidedSetup/guidedSetup.go index 9d473b0eb49..87d9446532e 100644 --- a/cmd/lotus-provider/guidedSetup/guidedSetup.go +++ b/cmd/lotus-provider/guidedSetup/guidedSetup.go @@ -47,9 +47,8 @@ var GuidedsetupCmd = &cli.Command{ T, say := SetupLanguage() setupCtrlC(say) - say(header, "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.") - - say(notice, "This tool confirms each action it does and each step is reversable.") + say(header, "This interactive tool migrates lotus-miner to lotus-provider in 5 minutes.\n") + say(notice, "Each step needs your confirmation & is reversable. Press Ctrl+C to exit at any time.") // Run the migration steps migrationData := MigrationData{ @@ -113,7 +112,7 @@ func SetupLanguage() (func(key message.Reference, a ...interface{}) string, func lang, err := language.Parse(os.Getenv("LANG")[:2]) if err != nil { lang = language.English - fmt.Println("Error parsing language, defaulting to English") + fmt.Println("Error parsing language, defaulting to English. Please reach out to the Curio team if you would like to have additional language support.") } langs := message.DefaultCatalog.Languages() @@ -151,8 +150,9 @@ type MigrationData struct { } func configToDB(d *MigrationData) { - d.say(section, "Migrating config.toml to database.") - d.say(plain, `A Lotus-Provider cluster shares a database. They share the work of proving multiple Miner ID's sectors.\n`) + d.say(section, "Migrating config.toml to database.\n") + d.say(plain, "Lotus-Providers run 1 per machine. Multiple machines cooperate through YugabyteDB.\n") + d.say(plain, "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.\n") type rawConfig struct { Raw []byte `db:"config"` @@ -204,49 +204,46 @@ func oneLastThing(d *MigrationData) { } d.say(section, "We want to build what you're using.") - if build.BuildType == build.BuildMainnet { - i, _, err := (&promptui.Select{ - Label: d.T("Select what you want to share with the Curio team."), - Items: []string{ - d.T("Individual Data: Miner ID, lotus-provider version, net (mainnet/testnet). Signed."), - d.T("Aggregate-Anonymous: Miner power (bucketed), version, and net."), - d.T("Hint: I am someone running lotus-provider in production."), - d.T("Nothing.")}, - Templates: d.selectTemplates, - }).Run() - if err != nil { - d.say(notice, "Aborting remaining steps.\n", err.Error()) - os.Exit(1) + i, _, err := (&promptui.Select{ + Label: d.T("Select what you want to share with the Curio team."), + Items: []string{ + d.T("Individual Data: Miner ID, lotus-provider version, net (mainnet/testnet). Signed."), + d.T("Aggregate-Anonymous: Miner power (bucketed), version, and net."), + d.T("Hint: I am someone running lotus-provider on [test or main]."), + d.T("Nothing.")}, + Templates: d.selectTemplates, + }).Run() + if err != nil { + d.say(notice, "Aborting remaining steps.\n", err.Error()) + os.Exit(1) + } + if i < 3 { + msgMap := map[string]any{ + "chain": build.BuildTypeString(), } - if i != 3 { - + if i < 2 { api, closer, err := cliutil.GetFullNodeAPI(nil) if err != nil { d.say(notice, "Error connecting to lotus node: %s\n", err.Error()) os.Exit(1) } defer closer() - power, err := api.StateMinerPower(context.Background(), d.MinerID, types.EmptyTSK) if err != nil { d.say(notice, "Error getting miner power: %s\n", err.Error()) os.Exit(1) } - msgMap := map[string]any{ - "version": build.BuildVersion, - "net": build.BuildType, - "power": map[int]any{1: power, 2: bucket(power)}, - } + msgMap["version"] = build.BuildVersion + msgMap["net"] = build.BuildType + msgMap["power"] = map[int]any{1: power, 2: bucket(power)} - if i == 1 { // Sign it - msgMap["minerID"] = d.MinerID - } - msg, err := json.Marshal(msgMap) - if err != nil { - d.say(notice, "Error marshalling message: %s\n", err.Error()) - os.Exit(1) - } - if i == 1 { + if i < 1 { // Sign it + msgMap["miner_id"] = d.MinerID + msg, err := json.Marshal(msgMap) + if err != nil { + d.say(notice, "Error marshalling message: %s\n", err.Error()) + os.Exit(1) + } mi, err := api.StateMinerInfo(context.Background(), d.MinerID, types.EmptyTSK) if err != nil { d.say(notice, "Error getting miner info: %s\n", err.Error()) @@ -258,36 +255,32 @@ func oneLastThing(d *MigrationData) { os.Exit(1) } msgMap["signature"] = base64.StdEncoding.EncodeToString(sig.Data) - msg, err = json.Marshal(msgMap) - if err != nil { - d.say(notice, "Error marshalling message: %s\n", err.Error()) - os.Exit(1) - } } - - http.DefaultClient.Post("https://curiostorage.org/api/v1/usage", "application/json", bytes.NewReader(msg)) } - } else { - d.say(plain, "Not mainnet, not sharing.\n") + msg, err := json.Marshal(msgMap) + if err != nil { + d.say(notice, "Error marshalling message: %s\n", err.Error()) + os.Exit(1) + } + // TODO ensure this endpoint is up and running. + http.DefaultClient.Post("https://curiostorage.org/api/v1/usage", "application/json", bytes.NewReader(msg)) } } func doc(d *MigrationData) { - d.say(plain, "The configuration layers have been created for you: base, post, gui, seal.") + d.say(plain, "The following configuration layers have been created for you: base, post, gui, seal.") d.say(plain, "Documentation: \n") - d.say(plain, "Put common configuration in 'base' and include it everywhere.\n") - d.say(plain, "Instances without tasks will still serve their sectors for other providers.\n") - d.say(plain, "As there are no local config.toml files, put per-machine changes in additional layers.\n") - d.say(plain, "Edit a layer with the command: ") - d.say(code, "lotus-provider config edit \n") + d.say(plain, "Edit configuration layers with the command: \n") + d.say(plain, "lotus-provider config edit \n\n") + d.say(plain, "The 'base' layer should store common configuration. You likely want all lotus-providers to include it in their --layers argument.\n") + d.say(plain, "Make other layers for per-machine changes.\n") d.say(plain, "Join #fil-curio-users in Filecoin slack for help.\n") d.say(plain, "TODO FINISH THIS FUNCTION.\n") // TODO !! // show the command to start the web interface & the command to start the main provider. // This is where Boost configuration can be completed. - // Doc: You can run as many providers on the same tasks as you want. It provides redundancy. - d.say(plain, "Want PoST redundancy? Run many providers with the 'post' layer.\n") + d.say(plain, "Want PoST redundancy? Run many lotus-provider instances with the 'post' layer.\n") d.say(plain, "Point your browser to your web GUI to complete setup with Boost and advanced featues.\n") fmt.Println() diff --git a/cmd/lotus-provider/guidedSetup/shared.go b/cmd/lotus-provider/guidedSetup/shared.go index 0e321609259..1c53e218fb5 100644 --- a/cmd/lotus-provider/guidedSetup/shared.go +++ b/cmd/lotus-provider/guidedSetup/shared.go @@ -133,7 +133,40 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return err } - if !lo.Contains(titles, "base") { // TODO REMOVE THIS. INSTEAD ADD A BASE or append to addresses + if lo.Contains(titles, "base") { + // append addresses + var baseCfg config.LotusProviderConfig + var baseText string + db.QueryRow(ctx, "SELECT config FROM harmony_config WHERE title='base'").Scan(&baseText) + _, err := deps.LoadConfigWithUpgrades(baseText, &baseCfg) + if err != nil { + return xerrors.Errorf("Cannot load base config: %w", err) + } + for _, addr := range baseCfg.Addresses { + if lo.Contains(addr.MinerAddresses, lpCfg.Addresses[0].MinerAddresses[0]) { + goto skipWritingToBase + } + } + // write to base + { + baseCfg.Addresses = append(baseCfg.Addresses, lpCfg.Addresses[0]) + cb, err := config.ConfigUpdate(baseCfg, config.DefaultLotusProvider(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) + if err != nil { + return xerrors.Errorf("cannot interpret config: %w", err) + } + var buf bytes.Buffer + err = toml.NewEncoder(&buf).Encode(cb) + if err != nil { + return xerrors.Errorf("cannot encode config: %w", err) + } + _, err = db.Exec(ctx, "UPDATE harmony_config SET config=$1 WHERE title='base'", buf.String()) + if err != nil { + return xerrors.Errorf("cannot update base config: %w", err) + } + say(plain, "Configuration 'base' was updated to include this miner's address and its wallet setup.") + } + skipWritingToBase: + } else if layerName == "" { cfg, err := deps.GetDefaultConfig(true) if err != nil { return xerrors.Errorf("Cannot get default config: %w", err) @@ -144,6 +177,7 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return err } } + if layerName == "" { // only make mig if base exists and we are different. // compare to base. layerName = fmt.Sprintf("mig-%s", lpCfg.Addresses[0].MinerAddresses[0]) } else { From 443b05c51e36f4a7bde5a39b362a954bb9bbd608 Mon Sep 17 00:00:00 2001 From: LexLuthr <88259624+LexLuthr@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:06:18 +0400 Subject: [PATCH 10/63] fix: curio: rename lotus-provider to curio (#11645) * rename provider to curio * install gotext * fix lint errors, mod tidy * fix typo * fix API_INFO and add gotext to circleCI * add back gotext * add gotext after remerge --- .circleci/config.yml | 1 + .gitignore | 2 +- Dockerfile | 8 +- Makefile | 52 +- api/{api_lp.go => api_curio.go} | 2 +- api/client/client.go | 6 +- api/docgen/docgen.go | 8 +- api/proxy_gen.go | 72 +-- api/v1api/latest.go | 2 +- api/version.go | 2 +- build/openrpc/full.json | 478 +++++++++--------- build/openrpc/gateway.json | 186 +++---- cli/util/api.go | 4 +- cmd/{lotus-provider => curio}/config.go | 14 +- cmd/{lotus-provider => curio}/deps/deps.go | 48 +- .../guidedsetup/guidedsetup.go} | 34 +- .../guidedsetup}/shared.go | 35 +- cmd/curio/internal/translations/catalog.go | 287 +++++++++++ .../translations/locales/en/out.gotext.json | 359 +++++++++++-- .../locales/ko/messages.gotext.json | 6 +- .../translations/locales/ko/out.gotext.json | 279 +++++++++- .../locales/zh/messages.gotext.json | 6 +- .../translations/locales/zh/out.gotext.json | 279 +++++++++- .../internal/translations/translations.go | 8 +- cmd/{lotus-provider => curio}/main.go | 36 +- cmd/{lotus-provider => curio}/migrate.go | 8 +- cmd/{lotus-provider => curio}/proving.go | 10 +- cmd/{lotus-provider => curio}/rpc/rpc.go | 28 +- cmd/{lotus-provider => curio}/run.go | 20 +- cmd/{lotus-provider => curio}/stop.go | 2 +- cmd/{lotus-provider => curio}/tasks/tasks.go | 20 +- .../internal/translations/catalog.go | 201 -------- {provider => curiosrc}/address.go | 6 +- curiosrc/builder.go | 50 ++ .../chainsched/chain_sched.go | 22 +- .../lpmessage => curiosrc/message}/sender.go | 6 +- .../multictladdr/multiaddresses.go | 2 +- .../lpweb => curiosrc/web}/api/debug/debug.go | 6 +- curiosrc/web/api/routes.go | 13 + .../lpweb => curiosrc/web}/hapi/routes.go | 4 +- .../lpweb => curiosrc/web}/hapi/simpleinfo.go | 2 +- .../web}/hapi/web/actor_summary.gohtml | 0 .../web}/hapi/web/chain_rpcs.gohtml | 0 .../web}/hapi/web/cluster_machines.gohtml | 0 .../web}/hapi/web/cluster_task_history.gohtml | 0 .../web}/hapi/web/cluster_tasks.gohtml | 0 {provider/lpweb => curiosrc/web}/srv.go | 14 +- .../web}/static/chain-connectivity.js | 0 .../lpweb => curiosrc/web}/static/index.html | 4 +- .../window}/compute_do.go | 4 +- .../window}/compute_task.go | 8 +- .../window}/faults_simple.go | 2 +- .../window}/recover_task.go | 14 +- .../window}/submit_task.go | 12 +- .../winning}/winning_task.go | 4 +- ...ds-provider.md => api-v0-methods-curio.md} | 1 + .../{cli-lotus-provider.md => cli-curio.md} | 198 ++++---- ...-config.toml => default-curio-config.toml} | 0 go.sum | 8 - itests/kit/ensemble.go | 6 +- itests/kit/node_full.go | 4 +- lib/harmony/harmonydb/harmonydb.go | 2 +- lib/harmony/resources/resources.go | 2 +- node/config/def.go | 10 +- node/config/doc_gen.go | 336 ++++++------ node/config/types.go | 14 +- node/repo/fsrepo.go | 22 +- provider/builder.go | 50 -- provider/lpweb/api/routes.go | 13 - .../{lotus-provider.service => curio.service} | 6 +- scripts/generate-lotus-cli.py | 2 +- 71 files changed, 2101 insertions(+), 1249 deletions(-) rename api/{api_lp.go => api_curio.go} (83%) rename cmd/{lotus-provider => curio}/config.go (92%) rename cmd/{lotus-provider => curio}/deps/deps.go (85%) rename cmd/{lotus-provider/guidedSetup/guidedSetup.go => curio/guidedsetup/guidedsetup.go} (92%) rename cmd/{lotus-provider/guidedSetup => curio/guidedsetup}/shared.go (84%) create mode 100644 cmd/curio/internal/translations/catalog.go rename cmd/{lotus-provider => curio}/internal/translations/locales/en/out.gotext.json (50%) rename cmd/{lotus-provider => curio}/internal/translations/locales/ko/messages.gotext.json (97%) rename cmd/{lotus-provider => curio}/internal/translations/locales/ko/out.gotext.json (55%) rename cmd/{lotus-provider => curio}/internal/translations/locales/zh/messages.gotext.json (97%) rename cmd/{lotus-provider => curio}/internal/translations/locales/zh/out.gotext.json (54%) rename cmd/{lotus-provider => curio}/internal/translations/translations.go (62%) rename cmd/{lotus-provider => curio}/main.go (77%) rename cmd/{lotus-provider => curio}/migrate.go (82%) rename cmd/{lotus-provider => curio}/proving.go (94%) rename cmd/{lotus-provider => curio}/rpc/rpc.go (85%) rename cmd/{lotus-provider => curio}/run.go (88%) rename cmd/{lotus-provider => curio}/stop.go (91%) rename cmd/{lotus-provider => curio}/tasks/tasks.go (64%) delete mode 100644 cmd/lotus-provider/internal/translations/catalog.go rename {provider => curiosrc}/address.go (89%) create mode 100644 curiosrc/builder.go rename {provider => curiosrc}/chainsched/chain_sched.go (77%) rename {provider/lpmessage => curiosrc/message}/sender.go (98%) rename {provider => curiosrc}/multictladdr/multiaddresses.go (97%) rename {provider/lpweb => curiosrc/web}/api/debug/debug.go (97%) create mode 100644 curiosrc/web/api/routes.go rename {provider/lpweb => curiosrc/web}/hapi/routes.go (87%) rename {provider/lpweb => curiosrc/web}/hapi/simpleinfo.go (98%) rename {provider/lpweb => curiosrc/web}/hapi/web/actor_summary.gohtml (100%) rename {provider/lpweb => curiosrc/web}/hapi/web/chain_rpcs.gohtml (100%) rename {provider/lpweb => curiosrc/web}/hapi/web/cluster_machines.gohtml (100%) rename {provider/lpweb => curiosrc/web}/hapi/web/cluster_task_history.gohtml (100%) rename {provider/lpweb => curiosrc/web}/hapi/web/cluster_tasks.gohtml (100%) rename {provider/lpweb => curiosrc/web}/srv.go (84%) rename {provider/lpweb => curiosrc/web}/static/chain-connectivity.js (100%) rename {provider/lpweb => curiosrc/web}/static/index.html (97%) rename {provider/lpwindow => curiosrc/window}/compute_do.go (99%) rename {provider/lpwindow => curiosrc/window}/compute_task.go (98%) rename {provider/lpwindow => curiosrc/window}/faults_simple.go (99%) rename {provider/lpwindow => curiosrc/window}/recover_task.go (96%) rename {provider/lpwindow => curiosrc/window}/submit_task.go (95%) rename {provider/lpwinning => curiosrc/winning}/winning_task.go (99%) rename documentation/en/{api-v0-methods-provider.md => api-v0-methods-curio.md} (92%) rename documentation/en/{cli-lotus-provider.md => cli-curio.md} (56%) rename documentation/en/{default-lotus-provider-config.toml => default-curio-config.toml} (100%) delete mode 100644 provider/builder.go delete mode 100644 provider/lpweb/api/routes.go rename scripts/{lotus-provider.service => curio.service} (55%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 81cc6adcfde..3459f536e43 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -379,6 +379,7 @@ jobs: at: ~/ - run: go install golang.org/x/tools/cmd/goimports - run: go install github.com/hannahhoward/cbor-gen-for + - run: go install golang.org/x/text/cmd/gotext - run: make gen - run: git --no-pager diff && git --no-pager diff --quiet - run: make docsgen-cli diff --git a/.gitignore b/.gitignore index c40a76fd07c..439ae39e00d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ /lotus-chainwatch /lotus-shed /lotus-sim -/lotus-provider +/curio /lotus-townhall /lotus-fountain /lotus-stats diff --git a/Dockerfile b/Dockerfile index ea26b618436..34a3e854901 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,7 +109,7 @@ COPY --from=lotus-builder /opt/filecoin/lotus-wallet /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-gateway /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-miner /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-worker /usr/local/bin/ -COPY --from=lotus-builder /opt/filecoin/lotus-provider /usr/local/bin/ +COPY --from=lotus-builder /opt/filecoin/curio /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-stats /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-fountain /usr/local/bin/ @@ -118,13 +118,13 @@ RUN mkdir /var/lib/lotus RUN mkdir /var/lib/lotus-miner RUN mkdir /var/lib/lotus-worker RUN mkdir /var/lib/lotus-wallet -RUN mkdir /var/lib/lotus-provider +RUN mkdir /var/lib/curio RUN chown fc: /var/tmp/filecoin-proof-parameters RUN chown fc: /var/lib/lotus RUN chown fc: /var/lib/lotus-miner RUN chown fc: /var/lib/lotus-worker RUN chown fc: /var/lib/lotus-wallet -RUN chown fc: /var/lib/lotus-provider +RUN chown fc: /var/lib/curio VOLUME /var/tmp/filecoin-proof-parameters @@ -132,7 +132,7 @@ VOLUME /var/lib/lotus VOLUME /var/lib/lotus-miner VOLUME /var/lib/lotus-worker VOLUME /var/lib/lotus-wallet -VOLUME /var/lib/lotus-provider +VOLUME /var/lib/curio EXPOSE 1234 EXPOSE 2345 diff --git a/Makefile b/Makefile index 841c715e117..933a3642558 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ CLEAN+=build/.update-modules deps: $(BUILD_DEPS) .PHONY: deps -build-devnets: build lotus-seed lotus-shed lotus-provider +build-devnets: build lotus-seed lotus-shed curio .PHONY: build-devnets debug: GOFLAGS+=-tags=debug @@ -97,14 +97,14 @@ lotus-miner: $(BUILD_DEPS) .PHONY: lotus-miner BINS+=lotus-miner -lotus-provider: $(BUILD_DEPS) - rm -f lotus-provider - $(GOCC) build $(GOFLAGS) -o lotus-provider ./cmd/lotus-provider -.PHONY: lotus-provider -BINS+=lotus-provider +curio: $(BUILD_DEPS) + rm -f curio + $(GOCC) build $(GOFLAGS) -o curio ./cmd/curio +.PHONY: curio +BINS+=curio -lp2k: GOFLAGS+=-tags=2k -lp2k: lotus-provider +curio2k: GOFLAGS+=-tags=2k +curio2k: curio lotus-worker: $(BUILD_DEPS) rm -f lotus-worker @@ -130,7 +130,7 @@ an existing lotus binary in your PATH. This may cause problems if you don't run .PHONY: build -install: install-daemon install-miner install-worker install-provider +install: install-daemon install-miner install-worker install-curio install-daemon: install -C ./lotus /usr/local/bin/lotus @@ -138,8 +138,8 @@ install-daemon: install-miner: install -C ./lotus-miner /usr/local/bin/lotus-miner -install-provider: - install -C ./lotus-provider /usr/local/bin/lotus-provider +install-curio: + install -C ./curio /usr/local/bin/curio install-worker: install -C ./lotus-worker /usr/local/bin/lotus-worker @@ -156,8 +156,8 @@ uninstall-daemon: uninstall-miner: rm -f /usr/local/bin/lotus-miner -uninstall-provider: - rm -f /usr/local/bin/lotus-provider +uninstall-curio: + rm -f /usr/local/bin/curio uninstall-worker: rm -f /usr/local/bin/lotus-worker @@ -256,13 +256,13 @@ install-miner-service: install-miner install-daemon-service @echo @echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup." -install-provider-service: install-provider install-daemon-service +install-curio-service: install-curio install-daemon-service mkdir -p /etc/systemd/system mkdir -p /var/log/lotus - install -C -m 0644 ./scripts/lotus-provider.service /etc/systemd/system/lotus-provider.service + install -C -m 0644 ./scripts/curio.service /etc/systemd/system/curio.service systemctl daemon-reload @echo - @echo "lotus-provider service installed. Don't forget to run 'sudo systemctl start lotus-provider' to start it and 'sudo systemctl enable lotus-provider' for it to be enabled on startup." + @echo "Curio service installed. Don't forget to run 'sudo systemctl start curio' to start it and 'sudo systemctl enable curio' for it to be enabled on startup." install-main-services: install-miner-service @@ -282,10 +282,10 @@ clean-miner-service: rm -f /etc/systemd/system/lotus-miner.service systemctl daemon-reload -clean-provider-service: - -systemctl stop lotus-provider - -systemctl disable lotus-provider - rm -f /etc/systemd/system/lotus-provider.service +clean-curio-service: + -systemctl stop curio + -systemctl disable curio + rm -f /etc/systemd/system/curio.service systemctl daemon-reload clean-main-services: clean-daemon-service @@ -358,7 +358,7 @@ docsgen-md-bin: api-gen actors-gen docsgen-openrpc-bin: api-gen actors-gen $(GOCC) build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd -docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker docsgen-md-provider +docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker docsgen-md-curio docsgen-md-full: docsgen-md-bin ./docgen-md "api/api_full.go" "FullNode" "api" "./api" > documentation/en/api-v1-unstable-methods.md @@ -367,8 +367,8 @@ docsgen-md-storage: docsgen-md-bin ./docgen-md "api/api_storage.go" "StorageMiner" "api" "./api" > documentation/en/api-v0-methods-miner.md docsgen-md-worker: docsgen-md-bin ./docgen-md "api/api_worker.go" "Worker" "api" "./api" > documentation/en/api-v0-methods-worker.md -docsgen-md-provider: docsgen-md-bin - ./docgen-md "api/api_lp.go" "Provider" "api" "./api" > documentation/en/api-v0-methods-provider.md +docsgen-md-curio: docsgen-md-bin + ./docgen-md "api/api_curio.go" "Curio" "api" "./api" > documentation/en/api-v0-methods-curio.md docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker docsgen-openrpc-gateway @@ -393,16 +393,16 @@ gen: actors-code-gen type-gen cfgdoc-gen docsgen api-gen circleci jen: gen -snap: lotus lotus-miner lotus-worker lotus-provider +snap: lotus lotus-miner lotus-worker curio snapcraft # snapcraft upload ./lotus_*.snap # separate from gen because it needs binaries -docsgen-cli: lotus lotus-miner lotus-worker lotus-provider +docsgen-cli: lotus lotus-miner lotus-worker curio python3 ./scripts/generate-lotus-cli.py ./lotus config default > documentation/en/default-lotus-config.toml ./lotus-miner config default > documentation/en/default-lotus-miner-config.toml - ./lotus-provider config default > documentation/en/default-lotus-provider-config.toml + ./curio config default > documentation/en/default-curio-config.toml .PHONY: docsgen-cli print-%: diff --git a/api/api_lp.go b/api/api_curio.go similarity index 83% rename from api/api_lp.go rename to api/api_curio.go index 8b58379f8e1..81d479fb8f5 100644 --- a/api/api_lp.go +++ b/api/api_curio.go @@ -2,7 +2,7 @@ package api import "context" -type LotusProvider interface { +type Curio interface { Version(context.Context) (Version, error) //perm:admin // Trigger shutdown diff --git a/api/client/client.go b/api/client/client.go index 4d51221f92b..4a8ff927227 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -15,9 +15,9 @@ import ( "github.com/filecoin-project/lotus/lib/rpcenc" ) -// NewProviderRpc creates a new http jsonrpc client. -func NewProviderRpc(ctx context.Context, addr string, requestHeader http.Header) (api.LotusProvider, jsonrpc.ClientCloser, error) { - var res v1api.LotusProviderStruct +// NewCurioRpc creates a new http jsonrpc client. +func NewCurioRpc(ctx context.Context, addr string, requestHeader http.Header) (api.Curio, jsonrpc.ClientCloser, error) { + var res v1api.CurioStruct closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors)) diff --git a/api/docgen/docgen.go b/api/docgen/docgen.go index 6028a40f250..f5a89a55203 100644 --- a/api/docgen/docgen.go +++ b/api/docgen/docgen.go @@ -430,10 +430,10 @@ func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []r i = &api.GatewayStruct{} t = reflect.TypeOf(new(struct{ api.Gateway })).Elem() permStruct = append(permStruct, reflect.TypeOf(api.GatewayStruct{}.Internal)) - case "Provider": - i = &api.LotusProviderStruct{} - t = reflect.TypeOf(new(struct{ api.LotusProvider })).Elem() - permStruct = append(permStruct, reflect.TypeOf(api.LotusProviderStruct{}.Internal)) + case "Curio": + i = &api.CurioStruct{} + t = reflect.TypeOf(new(struct{ api.Curio })).Elem() + permStruct = append(permStruct, reflect.TypeOf(api.CurioStruct{}.Internal)) default: panic("unknown type") } diff --git a/api/proxy_gen.go b/api/proxy_gen.go index c07fc3a6144..d50ef387cdd 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -111,6 +111,19 @@ type CommonNetStub struct { NetStub } +type CurioStruct struct { + Internal CurioMethods +} + +type CurioMethods struct { + Shutdown func(p0 context.Context) error `perm:"admin"` + + Version func(p0 context.Context) (Version, error) `perm:"admin"` +} + +type CurioStub struct { +} + type EthSubscriberStruct struct { Internal EthSubscriberMethods } @@ -827,19 +840,6 @@ type GatewayMethods struct { type GatewayStub struct { } -type LotusProviderStruct struct { - Internal LotusProviderMethods -} - -type LotusProviderMethods struct { - Shutdown func(p0 context.Context) error `perm:"admin"` - - Version func(p0 context.Context) (Version, error) `perm:"admin"` -} - -type LotusProviderStub struct { -} - type NetStruct struct { Internal NetMethods } @@ -1450,6 +1450,28 @@ func (s *CommonStub) Version(p0 context.Context) (APIVersion, error) { return *new(APIVersion), ErrNotSupported } +func (s *CurioStruct) Shutdown(p0 context.Context) error { + if s.Internal.Shutdown == nil { + return ErrNotSupported + } + return s.Internal.Shutdown(p0) +} + +func (s *CurioStub) Shutdown(p0 context.Context) error { + return ErrNotSupported +} + +func (s *CurioStruct) Version(p0 context.Context) (Version, error) { + if s.Internal.Version == nil { + return *new(Version), ErrNotSupported + } + return s.Internal.Version(p0) +} + +func (s *CurioStub) Version(p0 context.Context) (Version, error) { + return *new(Version), ErrNotSupported +} + func (s *EthSubscriberStruct) EthSubscription(p0 context.Context, p1 jsonrpc.RawParams) error { if s.Internal.EthSubscription == nil { return ErrNotSupported @@ -5201,28 +5223,6 @@ func (s *GatewayStub) Web3ClientVersion(p0 context.Context) (string, error) { return "", ErrNotSupported } -func (s *LotusProviderStruct) Shutdown(p0 context.Context) error { - if s.Internal.Shutdown == nil { - return ErrNotSupported - } - return s.Internal.Shutdown(p0) -} - -func (s *LotusProviderStub) Shutdown(p0 context.Context) error { - return ErrNotSupported -} - -func (s *LotusProviderStruct) Version(p0 context.Context) (Version, error) { - if s.Internal.Version == nil { - return *new(Version), ErrNotSupported - } - return s.Internal.Version(p0) -} - -func (s *LotusProviderStub) Version(p0 context.Context) (Version, error) { - return *new(Version), ErrNotSupported -} - func (s *NetStruct) ID(p0 context.Context) (peer.ID, error) { if s.Internal.ID == nil { return *new(peer.ID), ErrNotSupported @@ -7448,10 +7448,10 @@ func (s *WorkerStub) WaitQuiet(p0 context.Context) error { var _ ChainIO = new(ChainIOStruct) var _ Common = new(CommonStruct) var _ CommonNet = new(CommonNetStruct) +var _ Curio = new(CurioStruct) var _ EthSubscriber = new(EthSubscriberStruct) var _ FullNode = new(FullNodeStruct) var _ Gateway = new(GatewayStruct) -var _ LotusProvider = new(LotusProviderStruct) var _ Net = new(NetStruct) var _ Signable = new(SignableStruct) var _ StorageMiner = new(StorageMinerStruct) diff --git a/api/v1api/latest.go b/api/v1api/latest.go index b8eeed2de57..a1e63b6ada7 100644 --- a/api/v1api/latest.go +++ b/api/v1api/latest.go @@ -13,4 +13,4 @@ func PermissionedFullAPI(a FullNode) FullNode { return api.PermissionedFullAPI(a) } -type LotusProviderStruct = api.LotusProviderStruct +type CurioStruct = api.CurioStruct diff --git a/api/version.go b/api/version.go index e968bf93bc4..124f53dabfb 100644 --- a/api/version.go +++ b/api/version.go @@ -60,7 +60,7 @@ var ( MinerAPIVersion0 = newVer(1, 5, 0) WorkerAPIVersion0 = newVer(1, 7, 0) - ProviderAPIVersion0 = newVer(1, 0, 0) + CurioAPIVersion0 = newVer(1, 0, 0) ) //nolint:varcheck,deadcode diff --git a/build/openrpc/full.json b/build/openrpc/full.json index 5f70ce52a56..03401b0c979 100644 --- a/build/openrpc/full.json +++ b/build/openrpc/full.json @@ -37,7 +37,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1464" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1486" } }, { @@ -60,7 +60,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1475" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1497" } }, { @@ -103,7 +103,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1486" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1508" } }, { @@ -214,7 +214,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1508" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1530" } }, { @@ -454,7 +454,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1519" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1541" } }, { @@ -685,7 +685,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1530" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1552" } }, { @@ -784,7 +784,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1541" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1563" } }, { @@ -816,7 +816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1552" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1574" } }, { @@ -922,7 +922,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1563" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1585" } }, { @@ -1019,7 +1019,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1574" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1596" } }, { @@ -1078,7 +1078,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1585" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1607" } }, { @@ -1171,7 +1171,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1596" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1618" } }, { @@ -1255,7 +1255,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1607" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1629" } }, { @@ -1355,7 +1355,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1618" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1640" } }, { @@ -1411,7 +1411,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1629" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1651" } }, { @@ -1484,7 +1484,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1640" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1662" } }, { @@ -1557,7 +1557,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1651" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1673" } }, { @@ -1604,7 +1604,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1662" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1684" } }, { @@ -1636,7 +1636,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1673" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1695" } }, { @@ -1691,7 +1691,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1684" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1706" } }, { @@ -1743,7 +1743,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1706" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1728" } }, { @@ -1780,7 +1780,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1717" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1739" } }, { @@ -1827,7 +1827,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1728" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1750" } }, { @@ -1874,7 +1874,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1739" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1761" } }, { @@ -1954,7 +1954,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1750" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1772" } }, { @@ -2006,7 +2006,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1761" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1783" } }, { @@ -2065,7 +2065,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1772" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1794" } }, { @@ -2136,7 +2136,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1783" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1805" } }, { @@ -2177,7 +2177,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1794" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1816" } }, { @@ -2245,7 +2245,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1816" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1838" } }, { @@ -2306,7 +2306,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1827" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1849" } }, { @@ -2413,7 +2413,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1838" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1860" } }, { @@ -2569,7 +2569,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1849" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1871" } }, { @@ -2635,7 +2635,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1860" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1882" } }, { @@ -2976,7 +2976,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1871" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1893" } }, { @@ -3021,7 +3021,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1882" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1904" } }, { @@ -3068,7 +3068,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1915" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1937" } }, { @@ -3139,7 +3139,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1926" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1948" } }, { @@ -3282,7 +3282,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1937" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1959" } }, { @@ -3612,7 +3612,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1948" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1970" } }, { @@ -3680,7 +3680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1959" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1981" } }, { @@ -3914,7 +3914,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1970" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1992" } }, { @@ -4077,7 +4077,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1981" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2003" } }, { @@ -4160,7 +4160,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1992" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2014" } }, { @@ -4201,7 +4201,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2003" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2025" } }, { @@ -4272,7 +4272,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2014" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2036" } }, { @@ -4416,7 +4416,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2025" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2047" } }, { @@ -4456,7 +4456,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2036" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2058" } }, { @@ -4497,7 +4497,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2047" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2069" } }, { @@ -4622,7 +4622,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2058" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2080" } }, { @@ -4747,7 +4747,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2069" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2091" } }, { @@ -4786,7 +4786,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2080" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2102" } }, { @@ -4833,7 +4833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2091" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2113" } }, { @@ -4888,7 +4888,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2102" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2124" } }, { @@ -4917,7 +4917,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2113" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2135" } }, { @@ -5054,7 +5054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2124" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2146" } }, { @@ -5083,7 +5083,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2135" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2157" } }, { @@ -5137,7 +5137,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2146" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2168" } }, { @@ -5228,7 +5228,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2157" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2179" } }, { @@ -5256,7 +5256,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2168" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2190" } }, { @@ -5346,7 +5346,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2179" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2201" } }, { @@ -5602,7 +5602,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2190" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2212" } }, { @@ -5847,7 +5847,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2201" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2223" } }, { @@ -5903,7 +5903,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2212" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2234" } }, { @@ -5950,7 +5950,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2223" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2245" } }, { @@ -6048,7 +6048,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2234" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2256" } }, { @@ -6114,7 +6114,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2245" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2267" } }, { @@ -6180,7 +6180,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2256" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2278" } }, { @@ -6289,7 +6289,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2267" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2289" } }, { @@ -6347,7 +6347,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2278" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2300" } }, { @@ -6469,7 +6469,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2289" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2311" } }, { @@ -6673,7 +6673,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2300" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2322" } }, { @@ -6868,7 +6868,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2311" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2333" } }, { @@ -7055,7 +7055,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2322" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2344" } }, { @@ -7259,7 +7259,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2333" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2355" } }, { @@ -7350,7 +7350,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2344" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2366" } }, { @@ -7408,7 +7408,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2355" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2377" } }, { @@ -7666,7 +7666,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2366" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2388" } }, { @@ -7941,7 +7941,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2377" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2399" } }, { @@ -7969,7 +7969,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2388" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2410" } }, { @@ -8007,7 +8007,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2399" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2421" } }, { @@ -8115,7 +8115,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2410" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2432" } }, { @@ -8153,7 +8153,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2421" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2443" } }, { @@ -8182,7 +8182,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2432" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2454" } }, { @@ -8245,7 +8245,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2443" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2465" } }, { @@ -8308,7 +8308,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2454" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2476" } }, { @@ -8353,7 +8353,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2465" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2487" } }, { @@ -8536,7 +8536,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2476" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2498" } }, { @@ -8752,7 +8752,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2487" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2509" } }, { @@ -8806,7 +8806,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2498" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2520" } }, { @@ -8860,7 +8860,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2509" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2531" } }, { @@ -8915,7 +8915,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2520" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2542" } }, { @@ -9058,7 +9058,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2531" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2553" } }, { @@ -9185,7 +9185,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2542" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2564" } }, { @@ -9287,7 +9287,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2553" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2575" } }, { @@ -9510,7 +9510,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2564" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2586" } }, { @@ -9590,7 +9590,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2575" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2597" } }, { @@ -9635,7 +9635,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2586" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2608" } }, { @@ -9691,7 +9691,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2597" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2619" } }, { @@ -9771,7 +9771,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2608" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2630" } }, { @@ -9851,7 +9851,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2619" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2641" } }, { @@ -10336,7 +10336,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2630" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2652" } }, { @@ -10530,7 +10530,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2641" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2663" } }, { @@ -10685,7 +10685,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2652" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2674" } }, { @@ -10934,7 +10934,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2663" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2685" } }, { @@ -11089,7 +11089,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2674" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2696" } }, { @@ -11266,7 +11266,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2685" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2707" } }, { @@ -11364,7 +11364,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2696" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2718" } }, { @@ -11529,7 +11529,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2707" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2729" } }, { @@ -11568,7 +11568,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2718" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2740" } }, { @@ -11633,7 +11633,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2729" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2751" } }, { @@ -11679,7 +11679,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2740" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2762" } }, { @@ -11829,7 +11829,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2751" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2773" } }, { @@ -11966,7 +11966,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2762" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2784" } }, { @@ -12197,7 +12197,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2773" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2795" } }, { @@ -12334,7 +12334,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2784" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2806" } }, { @@ -12499,7 +12499,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2795" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2817" } }, { @@ -12576,7 +12576,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2806" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2828" } }, { @@ -12771,7 +12771,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2828" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2850" } }, { @@ -12950,7 +12950,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2839" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2861" } }, { @@ -13112,7 +13112,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2850" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2872" } }, { @@ -13260,7 +13260,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2861" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2883" } }, { @@ -13488,7 +13488,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2872" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2894" } }, { @@ -13636,7 +13636,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2883" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2905" } }, { @@ -13848,7 +13848,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2894" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2916" } }, { @@ -14054,7 +14054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2905" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2927" } }, { @@ -14122,7 +14122,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2916" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2938" } }, { @@ -14239,7 +14239,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2927" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2949" } }, { @@ -14330,7 +14330,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2938" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2960" } }, { @@ -14416,7 +14416,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2949" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2971" } }, { @@ -14611,7 +14611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2960" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2982" } }, { @@ -14773,7 +14773,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2971" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2993" } }, { @@ -14969,7 +14969,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2982" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3004" } }, { @@ -15149,7 +15149,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2993" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3015" } }, { @@ -15312,7 +15312,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3004" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3026" } }, { @@ -15339,7 +15339,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3015" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3037" } }, { @@ -15366,7 +15366,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3026" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3048" } }, { @@ -15465,7 +15465,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3037" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3059" } }, { @@ -15511,7 +15511,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3048" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3070" } }, { @@ -15611,7 +15611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3059" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3081" } }, { @@ -15727,7 +15727,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3070" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3092" } }, { @@ -15775,7 +15775,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3081" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3103" } }, { @@ -15867,7 +15867,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3092" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3114" } }, { @@ -15982,7 +15982,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3103" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3125" } }, { @@ -16030,7 +16030,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3114" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3136" } }, { @@ -16067,7 +16067,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3125" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3147" } }, { @@ -16339,7 +16339,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3136" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3158" } }, { @@ -16387,7 +16387,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3147" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3169" } }, { @@ -16445,7 +16445,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3158" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3180" } }, { @@ -16650,7 +16650,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3169" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3191" } }, { @@ -16853,7 +16853,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3180" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3202" } }, { @@ -17022,7 +17022,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3191" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3213" } }, { @@ -17226,7 +17226,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3202" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3224" } }, { @@ -17393,7 +17393,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3213" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3235" } }, { @@ -17600,7 +17600,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3224" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3246" } }, { @@ -17668,7 +17668,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3235" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3257" } }, { @@ -17720,7 +17720,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3246" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3268" } }, { @@ -17769,7 +17769,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3257" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3279" } }, { @@ -17860,7 +17860,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3268" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3290" } }, { @@ -18366,7 +18366,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3279" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3301" } }, { @@ -18472,7 +18472,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3290" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3312" } }, { @@ -18524,7 +18524,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3301" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3323" } }, { @@ -19076,7 +19076,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3312" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3334" } }, { @@ -19190,7 +19190,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3323" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3345" } }, { @@ -19287,7 +19287,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3334" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3356" } }, { @@ -19387,7 +19387,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3345" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3367" } }, { @@ -19475,7 +19475,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3356" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3378" } }, { @@ -19575,7 +19575,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3367" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3389" } }, { @@ -19700,7 +19700,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3378" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3400" } }, { @@ -19809,7 +19809,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3389" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3411" } }, { @@ -19912,7 +19912,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3400" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3422" } }, { @@ -19973,7 +19973,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3411" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3433" } }, { @@ -20103,7 +20103,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3422" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3444" } }, { @@ -20210,7 +20210,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3433" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3455" } }, { @@ -20409,7 +20409,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3444" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3466" } }, { @@ -20486,7 +20486,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3455" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3477" } }, { @@ -20563,7 +20563,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3466" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3488" } }, { @@ -20672,7 +20672,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3477" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3499" } }, { @@ -20781,7 +20781,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3488" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3510" } }, { @@ -20842,7 +20842,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3499" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3521" } }, { @@ -20952,7 +20952,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3510" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3532" } }, { @@ -21013,7 +21013,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3521" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3543" } }, { @@ -21081,7 +21081,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3532" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3554" } }, { @@ -21149,7 +21149,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3543" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3565" } }, { @@ -21230,7 +21230,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3554" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3576" } }, { @@ -21384,7 +21384,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3565" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3587" } }, { @@ -21456,7 +21456,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3576" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3598" } }, { @@ -21620,7 +21620,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3587" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3609" } }, { @@ -21785,7 +21785,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3598" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3620" } }, { @@ -21855,7 +21855,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3609" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3631" } }, { @@ -21923,7 +21923,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3620" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3642" } }, { @@ -22016,7 +22016,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3631" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3653" } }, { @@ -22087,7 +22087,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3642" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3664" } }, { @@ -22288,7 +22288,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3653" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3675" } }, { @@ -22420,7 +22420,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3664" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3686" } }, { @@ -22557,7 +22557,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3675" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3697" } }, { @@ -22668,7 +22668,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3686" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3708" } }, { @@ -22800,7 +22800,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3697" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3719" } }, { @@ -22931,7 +22931,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3708" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3730" } }, { @@ -23002,7 +23002,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3719" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3741" } }, { @@ -23086,7 +23086,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3730" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3752" } }, { @@ -23172,7 +23172,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3741" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3763" } }, { @@ -23355,7 +23355,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3752" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3774" } }, { @@ -23382,7 +23382,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3763" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3785" } }, { @@ -23435,7 +23435,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3774" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3796" } }, { @@ -23523,7 +23523,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3785" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3807" } }, { @@ -23974,7 +23974,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3796" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3818" } }, { @@ -24141,7 +24141,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3807" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3829" } }, { @@ -24239,7 +24239,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3818" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3840" } }, { @@ -24412,7 +24412,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3829" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3851" } }, { @@ -24510,7 +24510,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3840" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3862" } }, { @@ -24661,7 +24661,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3851" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3873" } }, { @@ -24746,7 +24746,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3862" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3884" } }, { @@ -24814,7 +24814,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3873" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3895" } }, { @@ -24866,7 +24866,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3884" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3906" } }, { @@ -24934,7 +24934,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3895" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3917" } }, { @@ -25095,7 +25095,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3906" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3928" } }, { @@ -25142,7 +25142,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3917" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3939" } }, { @@ -25189,7 +25189,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3928" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3950" } }, { @@ -25232,7 +25232,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3950" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3972" } }, { @@ -25328,7 +25328,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3961" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3983" } }, { @@ -25594,7 +25594,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3972" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3994" } }, { @@ -25617,7 +25617,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3983" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4005" } }, { @@ -25660,7 +25660,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3994" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4016" } }, { @@ -25711,7 +25711,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4005" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4027" } }, { @@ -25756,7 +25756,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4016" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4038" } }, { @@ -25784,7 +25784,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4027" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4049" } }, { @@ -25824,7 +25824,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4038" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4060" } }, { @@ -25883,7 +25883,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4049" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4071" } }, { @@ -25927,7 +25927,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4060" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4082" } }, { @@ -25986,7 +25986,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4071" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4093" } }, { @@ -26023,7 +26023,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4082" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4104" } }, { @@ -26067,7 +26067,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4093" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4115" } }, { @@ -26107,7 +26107,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4104" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4126" } }, { @@ -26182,7 +26182,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4115" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4137" } }, { @@ -26390,7 +26390,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4126" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4148" } }, { @@ -26434,7 +26434,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4137" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4159" } }, { @@ -26524,7 +26524,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4148" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4170" } }, { @@ -26551,7 +26551,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4159" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4181" } } ] diff --git a/build/openrpc/gateway.json b/build/openrpc/gateway.json index 42521f0c8b0..bf51d0c79e3 100644 --- a/build/openrpc/gateway.json +++ b/build/openrpc/gateway.json @@ -242,7 +242,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4170" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4192" } }, { @@ -473,7 +473,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4181" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4203" } }, { @@ -505,7 +505,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4192" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4214" } }, { @@ -611,7 +611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4203" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4225" } }, { @@ -704,7 +704,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4214" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4236" } }, { @@ -788,7 +788,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4225" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4247" } }, { @@ -888,7 +888,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4236" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4258" } }, { @@ -944,7 +944,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4247" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4269" } }, { @@ -1017,7 +1017,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4258" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4280" } }, { @@ -1090,7 +1090,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4269" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4291" } }, { @@ -1137,7 +1137,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4280" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4302" } }, { @@ -1169,7 +1169,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4291" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4313" } }, { @@ -1206,7 +1206,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4313" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4335" } }, { @@ -1253,7 +1253,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4324" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4346" } }, { @@ -1293,7 +1293,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4335" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4357" } }, { @@ -1340,7 +1340,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4346" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4368" } }, { @@ -1369,7 +1369,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4357" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4379" } }, { @@ -1506,7 +1506,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4368" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4390" } }, { @@ -1535,7 +1535,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4379" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4401" } }, { @@ -1589,7 +1589,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4390" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4412" } }, { @@ -1680,7 +1680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4401" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4423" } }, { @@ -1708,7 +1708,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4412" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4434" } }, { @@ -1798,7 +1798,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4423" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4445" } }, { @@ -2054,7 +2054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4434" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4456" } }, { @@ -2299,7 +2299,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4445" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4467" } }, { @@ -2355,7 +2355,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4456" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4478" } }, { @@ -2402,7 +2402,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4467" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4489" } }, { @@ -2500,7 +2500,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4478" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4500" } }, { @@ -2566,7 +2566,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4489" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4511" } }, { @@ -2632,7 +2632,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4500" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4522" } }, { @@ -2741,7 +2741,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4511" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4533" } }, { @@ -2799,7 +2799,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4522" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4544" } }, { @@ -2921,7 +2921,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4533" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4555" } }, { @@ -3108,7 +3108,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4544" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4566" } }, { @@ -3312,7 +3312,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4555" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4577" } }, { @@ -3403,7 +3403,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4566" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4588" } }, { @@ -3461,7 +3461,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4577" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4599" } }, { @@ -3719,7 +3719,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4588" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4610" } }, { @@ -3994,7 +3994,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4599" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4621" } }, { @@ -4022,7 +4022,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4610" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4632" } }, { @@ -4060,7 +4060,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4621" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4643" } }, { @@ -4168,7 +4168,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4632" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4654" } }, { @@ -4206,7 +4206,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4643" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4665" } }, { @@ -4235,7 +4235,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4654" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4676" } }, { @@ -4298,7 +4298,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4665" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4687" } }, { @@ -4361,7 +4361,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4676" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4698" } }, { @@ -4406,7 +4406,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4687" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4709" } }, { @@ -4589,7 +4589,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4698" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4720" } }, { @@ -4805,7 +4805,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4709" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4731" } }, { @@ -4859,7 +4859,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4720" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4742" } }, { @@ -4913,7 +4913,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4731" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4753" } }, { @@ -5015,7 +5015,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4742" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4764" } }, { @@ -5238,7 +5238,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4753" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4775" } }, { @@ -5432,7 +5432,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4764" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4786" } }, { @@ -5478,7 +5478,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4775" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4797" } }, { @@ -5628,7 +5628,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4786" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4808" } }, { @@ -5765,7 +5765,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4797" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4819" } }, { @@ -5833,7 +5833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4808" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4830" } }, { @@ -5950,7 +5950,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4819" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4841" } }, { @@ -6041,7 +6041,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4830" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4852" } }, { @@ -6127,7 +6127,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4841" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4863" } }, { @@ -6154,7 +6154,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4852" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4874" } }, { @@ -6181,7 +6181,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4863" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4885" } }, { @@ -6249,7 +6249,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4874" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4896" } }, { @@ -6755,7 +6755,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4885" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4907" } }, { @@ -6852,7 +6852,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4896" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4918" } }, { @@ -6952,7 +6952,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4907" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4929" } }, { @@ -7052,7 +7052,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4918" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4940" } }, { @@ -7177,7 +7177,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4929" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4951" } }, { @@ -7286,7 +7286,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4940" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4962" } }, { @@ -7389,7 +7389,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4951" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4973" } }, { @@ -7519,7 +7519,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4962" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4984" } }, { @@ -7626,7 +7626,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4973" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4995" } }, { @@ -7687,7 +7687,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4984" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5006" } }, { @@ -7755,7 +7755,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4995" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5017" } }, { @@ -7836,7 +7836,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5006" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5028" } }, { @@ -8000,7 +8000,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5017" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5039" } }, { @@ -8201,7 +8201,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5028" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5050" } }, { @@ -8312,7 +8312,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5039" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5061" } }, { @@ -8443,7 +8443,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5050" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5072" } }, { @@ -8529,7 +8529,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5061" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5083" } }, { @@ -8556,7 +8556,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5072" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5094" } }, { @@ -8609,7 +8609,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5083" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5105" } }, { @@ -8697,7 +8697,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5094" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5116" } }, { @@ -9148,7 +9148,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5105" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5127" } }, { @@ -9315,7 +9315,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5116" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5138" } }, { @@ -9488,7 +9488,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5127" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5149" } }, { @@ -9556,7 +9556,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5138" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5160" } }, { @@ -9624,7 +9624,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5149" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5171" } }, { @@ -9785,7 +9785,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5160" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5182" } }, { @@ -9830,7 +9830,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5171" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5193" } }, { @@ -9875,7 +9875,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5182" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5204" } }, { @@ -9902,7 +9902,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5193" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5215" } } ] diff --git a/cli/util/api.go b/cli/util/api.go index fe1ac153678..6ca8d132111 100644 --- a/cli/util/api.go +++ b/cli/util/api.go @@ -168,7 +168,7 @@ func GetRawAPIMultiV2(ctx *cli.Context, ainfoCfg []string, version string) ([]Ht var httpHeads []HttpHead if len(ainfoCfg) == 0 { - return httpHeads, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './lotus-provider config get base >/tmp/base.toml' \nthen adding \n[APIs] \n ChainApiInfo = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './lotus-provider config set /tmp/base.toml'") + return httpHeads, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './curio config get base >/tmp/base.toml' \nthen adding \n[APIs] \n ChainApiInfo = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './curio config set /tmp/base.toml'") } for _, i := range ainfoCfg { ainfo := ParseApiInfo(i) @@ -415,7 +415,7 @@ func GetFullNodeAPIV1(ctx *cli.Context, opts ...GetFullNodeOption) (v1api.FullNo return &v1API, finalCloser, nil } -func GetFullNodeAPIV1LotusProvider(ctx *cli.Context, ainfoCfg []string, opts ...GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error) { +func GetFullNodeAPIV1Curio(ctx *cli.Context, ainfoCfg []string, opts ...GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error) { if tn, ok := ctx.App.Metadata["testnode-full"]; ok { return tn.(v1api.FullNode), func() {}, nil } diff --git a/cmd/lotus-provider/config.go b/cmd/curio/config.go similarity index 92% rename from cmd/lotus-provider/config.go rename to cmd/curio/config.go index 27baf94044d..a513c22753c 100644 --- a/cmd/lotus-provider/config.go +++ b/cmd/curio/config.go @@ -12,7 +12,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" ) @@ -92,12 +92,12 @@ var configSetCmd = &cli.Command{ return fmt.Errorf("cannot read stream/file %w", err) } - lp := config.DefaultLotusProvider() // ensure it's toml - _, err = deps.LoadConfigWithUpgrades(string(bytes), lp) + curioConfig := config.DefaultCurioConfig() // ensure it's toml + _, err = deps.LoadConfigWithUpgrades(string(bytes), curioConfig) if err != nil { return fmt.Errorf("cannot decode file: %w", err) } - _ = lp + _ = curioConfig err = setConfig(db, name, string(bytes)) @@ -202,7 +202,7 @@ var configRmCmd = &cli.Command{ var configViewCmd = &cli.Command{ Name: "interpret", Aliases: []string{"view", "stacked", "stack"}, - Usage: "Interpret stacked config layers by this version of lotus-provider, with system-generated comments.", + Usage: "Interpret stacked config layers by this version of curio, with system-generated comments.", ArgsUsage: "a list of layers to be interpreted as the final config", Flags: []cli.Flag{ &cli.StringSliceFlag{ @@ -217,11 +217,11 @@ var configViewCmd = &cli.Command{ if err != nil { return err } - lp, err := deps.GetConfig(cctx, db) + curioConfig, err := deps.GetConfig(cctx, db) if err != nil { return err } - cb, err := config.ConfigUpdate(lp, config.DefaultLotusProvider(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) + cb, err := config.ConfigUpdate(curioConfig, config.DefaultCurioConfig(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) if err != nil { return xerrors.Errorf("cannot interpret config: %w", err) } diff --git a/cmd/lotus-provider/deps/deps.go b/cmd/curio/deps/deps.go similarity index 85% rename from cmd/lotus-provider/deps/deps.go rename to cmd/curio/deps/deps.go index 487d51c245d..139aad8c114 100644 --- a/cmd/lotus-provider/deps/deps.go +++ b/cmd/curio/deps/deps.go @@ -1,4 +1,4 @@ -// Package deps provides the dependencies for the lotus provider node. +// Package deps provides the dependencies for the curio node. package deps import ( @@ -28,6 +28,8 @@ import ( "github.com/filecoin-project/lotus/api" cliutil "github.com/filecoin-project/lotus/cli/util" + curio "github.com/filecoin-project/lotus/curiosrc" + "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/fsjournal" @@ -35,15 +37,13 @@ import ( "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/lotus/provider" - "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -var log = logging.Logger("lotus-provider/deps") +var log = logging.Logger("curio/deps") func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { // #1 CLI opts @@ -89,9 +89,9 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { fromEnv := func() (*harmonydb.DB, error) { // #3 Try env sqlurlRegexp := `://(?P[^:]+):(?P[^@]+)@(?P[^:]+):(?P[^/]+)/(?P.+)$` - ss := regexp.MustCompile(sqlurlRegexp).FindStringSubmatch(os.Getenv("PROVIDER_DB")) + ss := regexp.MustCompile(sqlurlRegexp).FindStringSubmatch(os.Getenv("CURIO_DB")) if len(ss) == 0 { - return nil, errors.New("no db connection string found in PROVIDER_DB env") + return nil, errors.New("no db connection string found in CURIO_DB env") } return harmonydb.NewFromConfig(config.HarmonyDB{ Username: ss[1], @@ -109,7 +109,7 @@ func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { } return db, nil } - log.Error("No db connection string found. User CLI args or env var: set PROVIDER_DB=postgres://user:pass@host:port/dbname") + log.Error("No db connection string found. User CLI args or env var: set CURIO_DB=postgres://user:pass@host:port/dbname") return fromCLI() //in-case it's not about bad config. } @@ -149,8 +149,8 @@ func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) { } type Deps struct { - Cfg *config.LotusProviderConfig // values - DB *harmonydb.DB // has itest capability + Cfg *config.CurioConfig // values + DB *harmonydb.DB // has itest capability Full api.FullNode Verif storiface.Verifier LW *sealer.LocalWorker @@ -182,7 +182,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, return err } if !ok { - if err := r.Init(repo.Provider); err != nil { + if err := r.Init(repo.Curio); err != nil { return err } } @@ -210,7 +210,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, } if deps.As == nil { - deps.As, err = provider.AddressSelector(deps.Cfg.Addresses)() + deps.As, err = curio.AddressSelector(deps.Cfg.Addresses)() if err != nil { return err } @@ -240,7 +240,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, if v := os.Getenv("FULLNODE_API_INFO"); v != "" { cfgApiInfo = []string{v} } - deps.Full, fullCloser, err = cliutil.GetFullNodeAPIV1LotusProvider(cctx, cfgApiInfo) + deps.Full, fullCloser, err = cliutil.GetFullNodeAPIV1Curio(cctx, cfgApiInfo) if err != nil { return err } @@ -290,7 +290,7 @@ Get it with: jq .PrivateKey ~/.lotus-miner/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU`, wstates := statestore.New(dssync.MutexWrap(ds.NewMapDatastore())) // todo localWorker isn't the abstraction layer we want to use here, we probably want to go straight to ffiwrapper - // maybe with a lotus-provider specific abstraction. LocalWorker does persistent call tracking which we probably + // maybe with a curio specific abstraction. LocalWorker does persistent call tracking which we probably // don't need (ehh.. maybe we do, the async callback system may actually work decently well with harmonytask) deps.LW = sealer.NewLocalWorker(sealer.WorkerConfig{}, deps.Stor, deps.LocalStore, deps.Si, nil, wstates) } @@ -311,14 +311,14 @@ Get it with: jq .PrivateKey ~/.lotus-miner/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU`, var oldAddresses = regexp.MustCompile("(?i)^[addresses]$") -func LoadConfigWithUpgrades(text string, lp *config.LotusProviderConfig) (toml.MetaData, error) { +func LoadConfigWithUpgrades(text string, curioConfig *config.CurioConfig) (toml.MetaData, error) { // allow migration from old config format that was limited to 1 wallet setup. newText := oldAddresses.ReplaceAllString(text, "[[addresses]]") - meta, err := toml.Decode(newText, &lp) + meta, err := toml.Decode(newText, &curioConfig) return meta, err } -func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.LotusProviderConfig, error) { - lp := config.DefaultLotusProvider() +func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.CurioConfig, error) { + curioConfig := config.DefaultCurioConfig() have := []string{} layers := cctx.StringSlice("layers") for _, layer := range layers { @@ -329,30 +329,30 @@ func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.LotusProviderConfig return nil, fmt.Errorf("missing layer '%s' ", layer) } if layer == "base" { - return nil, errors.New(`lotus-provider defaults to a layer named 'base'. - Either use 'migrate' command or edit a base.toml and upload it with: lotus-provider config set base.toml`) + return nil, errors.New(`curio defaults to a layer named 'base'. + Either use 'migrate' command or edit a base.toml and upload it with: curio config set base.toml`) } return nil, fmt.Errorf("could not read layer '%s': %w", layer, err) } - meta, err := LoadConfigWithUpgrades(text, lp) + meta, err := LoadConfigWithUpgrades(text, curioConfig) if err != nil { - return lp, fmt.Errorf("could not read layer, bad toml %s: %w", layer, err) + return curioConfig, fmt.Errorf("could not read layer, bad toml %s: %w", layer, err) } for _, k := range meta.Keys() { have = append(have, strings.Join(k, " ")) } - log.Infow("Using layer", "layer", layer, "config", lp) + log.Infow("Using layer", "layer", layer, "config", curioConfig) } _ = have // FUTURE: verify that required fields are here. // If config includes 3rd-party config, consider JSONSchema as a way that // 3rd-parties can dynamically include config requirements and we can // validate the config. Because of layering, we must validate @ startup. - return lp, nil + return curioConfig, nil } func GetDefaultConfig(comment bool) (string, error) { - c := config.DefaultLotusProvider() + c := config.DefaultCurioConfig() cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) if err != nil { return "", err diff --git a/cmd/lotus-provider/guidedSetup/guidedSetup.go b/cmd/curio/guidedsetup/guidedsetup.go similarity index 92% rename from cmd/lotus-provider/guidedSetup/guidedSetup.go rename to cmd/curio/guidedsetup/guidedsetup.go index 87d9446532e..8286379ac8b 100644 --- a/cmd/lotus-provider/guidedSetup/guidedSetup.go +++ b/cmd/curio/guidedsetup/guidedsetup.go @@ -1,9 +1,9 @@ -// guidedSetup for migration from lotus-miner to lotus-provider +// guidedSetup for migration from lotus-miner to Curio // // IF STRINGS CHANGED { // follow instructions at ../internal/translations/translations.go // } -package guidedSetup +package guidedsetup import ( "bytes" @@ -35,20 +35,20 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/types" cliutil "github.com/filecoin-project/lotus/cli/util" - _ "github.com/filecoin-project/lotus/cmd/lotus-provider/internal/translations" + _ "github.com/filecoin-project/lotus/cmd/curio/internal/translations" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" ) var GuidedsetupCmd = &cli.Command{ Name: "guided-setup", - Usage: "Run the guided setup for migrating from lotus-miner to lotus-provider", + Usage: "Run the guided setup for migrating from lotus-miner to Curio", Action: func(cctx *cli.Context) (err error) { T, say := SetupLanguage() setupCtrlC(say) - say(header, "This interactive tool migrates lotus-miner to lotus-provider in 5 minutes.\n") - say(notice, "Each step needs your confirmation & is reversable. Press Ctrl+C to exit at any time.") + say(header, "This interactive tool migrates lotus-miner to Curio in 5 minutes.\n") + say(notice, "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.") // Run the migration steps migrationData := MigrationData{ @@ -151,7 +151,7 @@ type MigrationData struct { func configToDB(d *MigrationData) { d.say(section, "Migrating config.toml to database.\n") - d.say(plain, "Lotus-Providers run 1 per machine. Multiple machines cooperate through YugabyteDB.\n") + d.say(plain, "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.\n") d.say(plain, "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.\n") type rawConfig struct { @@ -195,8 +195,8 @@ func bucket(power *api.MinerPower) uint64 { func oneLastThing(d *MigrationData) { d.say(section, "To bring you the best SP tooling...") - d.say(plain, "Share with the Curio team your interest in lotus-provider for this Miner ID.\n") - d.say(plain, "Hit return to tell http://CurioStorage.org that you've migrated to lotus-provider.\n") + d.say(plain, "Share with the Curio team your interest in Curio for this Miner ID.\n") + d.say(plain, "Hit return to tell http://CurioStorage.org that you've migrated to Curio.\n") _, err := (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() if err != nil { d.say(notice, "Aborting remaining steps.\n", err.Error()) @@ -207,9 +207,9 @@ func oneLastThing(d *MigrationData) { i, _, err := (&promptui.Select{ Label: d.T("Select what you want to share with the Curio team."), Items: []string{ - d.T("Individual Data: Miner ID, lotus-provider version, net (mainnet/testnet). Signed."), + d.T("Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed."), d.T("Aggregate-Anonymous: Miner power (bucketed), version, and net."), - d.T("Hint: I am someone running lotus-provider on [test or main]."), + d.T("Hint: I am someone running Curio on [test or main]."), d.T("Nothing.")}, Templates: d.selectTemplates, }).Run() @@ -271,16 +271,16 @@ func doc(d *MigrationData) { d.say(plain, "The following configuration layers have been created for you: base, post, gui, seal.") d.say(plain, "Documentation: \n") d.say(plain, "Edit configuration layers with the command: \n") - d.say(plain, "lotus-provider config edit \n\n") - d.say(plain, "The 'base' layer should store common configuration. You likely want all lotus-providers to include it in their --layers argument.\n") + d.say(plain, "curio config edit \n\n") + d.say(plain, "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.\n") d.say(plain, "Make other layers for per-machine changes.\n") d.say(plain, "Join #fil-curio-users in Filecoin slack for help.\n") d.say(plain, "TODO FINISH THIS FUNCTION.\n") // TODO !! - // show the command to start the web interface & the command to start the main provider. + // show the command to start the web interface & the command to start the main Curio instance. // This is where Boost configuration can be completed. - d.say(plain, "Want PoST redundancy? Run many lotus-provider instances with the 'post' layer.\n") + d.say(plain, "Want PoST redundancy? Run many Curio instances with the 'post' layer.\n") d.say(plain, "Point your browser to your web GUI to complete setup with Boost and advanced featues.\n") fmt.Println() @@ -305,8 +305,8 @@ func verifySectors(d *MigrationData) { fmt.Print(".") time.Sleep(time.Second) } - d.say(plain, "The sectors are in the database. The database is ready for lotus-provider.\n") - d.say(notice, "Now shut down lotus-miner and move the systems to lotus-provider.\n") + d.say(plain, "The sectors are in the database. The database is ready for Curio.\n") + d.say(notice, "Now shut down lotus-miner and move the systems to Curio.\n") _, err := (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() if err != nil { diff --git a/cmd/lotus-provider/guidedSetup/shared.go b/cmd/curio/guidedsetup/shared.go similarity index 84% rename from cmd/lotus-provider/guidedSetup/shared.go rename to cmd/curio/guidedsetup/shared.go index 1c53e218fb5..0521d8bdc99 100644 --- a/cmd/lotus-provider/guidedSetup/shared.go +++ b/cmd/curio/guidedsetup/shared.go @@ -1,4 +1,4 @@ -package guidedSetup +package guidedsetup import ( "bytes" @@ -12,14 +12,15 @@ import ( "strings" "github.com/BurntSushi/toml" - "github.com/filecoin-project/go-address" "github.com/ipfs/go-datastore" "github.com/samber/lo" "github.com/urfave/cli/v2" "golang.org/x/xerrors" + "github.com/filecoin-project/go-address" + cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules" @@ -75,8 +76,8 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h if err != nil { return fmt.Errorf("could not read config.toml: %w", err) } - var lpCfg config.LotusProviderConfig - _, err = toml.Decode(string(buf), &lpCfg) + var curioCfg config.CurioConfig + _, err = toml.Decode(string(buf), &curioCfg) if err != nil { return fmt.Errorf("could not decode toml: %w", err) } @@ -100,7 +101,7 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return xerrors.Errorf("parsing miner actor address: %w", err) } - lpCfg.Addresses = []config.LotusProviderAddresses{{ + curioCfg.Addresses = []config.CurioAddresses{{ MinerAddresses: []string{addr.String()}, PreCommitControl: smCfg.Addresses.PreCommitControl, CommitControl: smCfg.Addresses.CommitControl, @@ -118,24 +119,24 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return xerrors.Errorf("error getting JWTSecretName: %w", err) } - lpCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) + curioCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) ainfo, err := cliutil.GetAPIInfo(&cli.Context{}, repo.FullNode) if err != nil { return xerrors.Errorf(`could not get API info for FullNode: %w Set the environment variable to the value of "lotus auth api-info --perm=admin"`, err) } - lpCfg.Apis.ChainApiInfo = []string{header.Get("Authorization")[7:] + ":" + ainfo.Addr} + curioCfg.Apis.ChainApiInfo = []string{header.Get("Authorization")[7:] + ":" + ainfo.Addr} // Express as configTOML configTOML := &bytes.Buffer{} - if err = toml.NewEncoder(configTOML).Encode(lpCfg); err != nil { + if err = toml.NewEncoder(configTOML).Encode(curioCfg); err != nil { return err } if lo.Contains(titles, "base") { // append addresses - var baseCfg config.LotusProviderConfig + var baseCfg config.CurioConfig var baseText string db.QueryRow(ctx, "SELECT config FROM harmony_config WHERE title='base'").Scan(&baseText) _, err := deps.LoadConfigWithUpgrades(baseText, &baseCfg) @@ -143,14 +144,14 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h return xerrors.Errorf("Cannot load base config: %w", err) } for _, addr := range baseCfg.Addresses { - if lo.Contains(addr.MinerAddresses, lpCfg.Addresses[0].MinerAddresses[0]) { + if lo.Contains(addr.MinerAddresses, curioCfg.Addresses[0].MinerAddresses[0]) { goto skipWritingToBase } } // write to base { - baseCfg.Addresses = append(baseCfg.Addresses, lpCfg.Addresses[0]) - cb, err := config.ConfigUpdate(baseCfg, config.DefaultLotusProvider(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) + baseCfg.Addresses = append(baseCfg.Addresses, curioCfg.Addresses[0]) + cb, err := config.ConfigUpdate(baseCfg, config.DefaultCurioConfig(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) if err != nil { return xerrors.Errorf("cannot interpret config: %w", err) } @@ -179,7 +180,7 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h } if layerName == "" { // only make mig if base exists and we are different. // compare to base. - layerName = fmt.Sprintf("mig-%s", lpCfg.Addresses[0].MinerAddresses[0]) + layerName = fmt.Sprintf("mig-%s", curioCfg.Addresses[0].MinerAddresses[0]) } else { if lo.Contains(titles, layerName) && !overwrite { return errors.New("the overwrite flag is needed to replace existing layer: " + layerName) @@ -200,9 +201,9 @@ func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, header h dbSettings := getDBSettings(*smCfg) say(plain, `To work with the config:`) - say(code, `lotus-provider `+dbSettings+` config edit `+layerName) - say(plain, `To run Lotus Provider: in its own machine or cgroup without other files, use the command:`) - say(code, `lotus-provider `+dbSettings+` run --layer=`+layerName+`,post`) + say(code, `curio `+dbSettings+` config edit `+layerName) + say(plain, `To run Curio: in its own machine or cgroup without other files, use the command:`) + say(code, `curio `+dbSettings+` run --layer=`+layerName+`,post`) return nil } diff --git a/cmd/curio/internal/translations/catalog.go b/cmd/curio/internal/translations/catalog.go new file mode 100644 index 00000000000..3f31ffc1be0 --- /dev/null +++ b/cmd/curio/internal/translations/catalog.go @@ -0,0 +1,287 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package translations + +import ( + "golang.org/x/text/language" + "golang.org/x/text/message" + "golang.org/x/text/message/catalog" +) + +type dictionary struct { + index []uint32 + data string +} + +func (d *dictionary) Lookup(key string) (data string, ok bool) { + p, ok := messageKeyToIndex[key] + if !ok { + return "", false + } + start, end := d.index[p], d.index[p+1] + if start == end { + return "", false + } + return d.data[start:end], true +} + +func init() { + dict := map[string]catalog.Dictionary{ + "en": &dictionary{index: enIndex, data: enData}, + "ko": &dictionary{index: koIndex, data: koData}, + "zh": &dictionary{index: zhIndex, data: zhData}, + } + fallback := language.MustParse("en") + cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) + if err != nil { + panic(err) + } + message.DefaultCatalog = cat +} + +var messageKeyToIndex = map[string]int{ + "Aborting migration.\n": 39, + "Aborting remaining steps.\n": 13, + "Aggregate-Anonymous: Miner power (bucketed), version, and net.": 17, + "Cannot read the config.toml file in the provided directory, Error: %s\n": 66, + "Completed Step: %s\n\n": 68, + "Configuration 'base' was updated to include this miner's address and its wallet setup.": 69, + "Connected to Yugabyte": 60, + "Connected to Yugabyte. Schema is current.\n": 54, + "Continue to connect and update schema.": 47, + "Ctrl+C pressed in Terminal": 3, + "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.\n": 5, + "Database config error occurred, abandoning migration: %s \n": 48, + "Database: %s": 46, + "Documentation: \n": 26, + "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.": 1, + "Edit configuration layers with the command: \n": 27, + "Enter the Yugabyte database %s": 51, + "Enter the Yugabyte database host(s)": 49, + "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 41, + "Enter the path to the configuration directory used by lotus-miner": 64, + "Error connecting to Yugabyte database: %s\n": 53, + "Error connecting to lotus node: %s\n": 20, + "Error encoding config.toml: %s\n": 55, + "Error getting miner info: %s\n": 23, + "Error getting miner power: %s\n": 21, + "Error marshalling message: %s\n": 22, + "Error reading filemode of config.toml: %s\n": 57, + "Error reading from database: %s. Aborting Migration.\n": 7, + "Error signing message: %s\n": 24, + "Error verifying sectors: %s\n": 36, + "Error writing config.toml: %s\n": 58, + "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.\n": 6, + "Hint: I am someone running Curio on [test or main].": 18, + "Hit return to tell http://CurioStorage.org that you've migrated to Curio.\n": 11, + "Host: %s": 42, + "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.": 16, + "Join #fil-curio-users in Filecoin slack for help.\n": 31, + "Layer %s created. ": 70, + "Make other layers for per-machine changes.\n": 30, + "Migrating config.toml to database.\n": 4, + "No host provided\n": 50, + "No path provided, abandoning migration \n": 65, + "No value provided\n": 52, + "Nothing.": 19, + "Now shut down lotus-miner and move the systems to Curio.\n": 38, + "Other": 63, + "Password: %s": 45, + "Point your browser to your web GUI to complete setup with Boost and advanced featues.\n": 34, + "Port: %s": 43, + "Press return to continue": 12, + "Press return to update config.toml with Yugabyte info. Backup the file now.": 56, + "Read Miner Config": 67, + "Restart Lotus Miner. \n": 59, + "Sectors verified. %d sector locations found.\n": 40, + "Select the location of your lotus-miner config directory?": 62, + "Select what you want to share with the Curio team.": 15, + "Share with the Curio team your interest in Curio for this Miner ID.\n": 10, + "TODO FINISH THIS FUNCTION\n": 8, + "TODO FINISH THIS FUNCTION.\n": 32, + "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.\n": 29, + "The following configuration layers have been created for you: base, post, gui, seal.": 25, + "The sectors are in the database. The database is ready for Curio.\n": 37, + "This interactive tool migrates lotus-miner to Curio in 5 minutes.\n": 0, + "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.\n": 61, + "To bring you the best SP tooling...": 9, + "To run Curio: in its own machine or cgroup without other files, use the command:": 72, + "To work with the config:": 71, + "Use the arrow keys to navigate: ↓ ↑ → ← ": 2, + "Username: %s": 44, + "Waiting for lotus-miner to write sectors into Yugabyte.": 35, + "Want PoST redundancy? Run many Curio instances with the 'post' layer.\n": 33, + "We want to build what you're using.": 14, + "curio config edit \n\n": 28, +} + +var enIndex = []uint32{ // 74 elements + // Entry 0 - 1F + 0x00000000, 0x00000047, 0x000000a0, 0x000000d5, + 0x000000f0, 0x00000118, 0x0000016f, 0x000001f8, + 0x00000235, 0x00000254, 0x00000278, 0x000002c1, + 0x00000310, 0x00000329, 0x00000348, 0x0000036c, + 0x0000039f, 0x000003e8, 0x00000427, 0x0000045b, + 0x00000464, 0x0000048f, 0x000004b5, 0x000004db, + 0x00000500, 0x00000522, 0x00000577, 0x0000058c, + 0x000005be, 0x000005e2, 0x0000065f, 0x0000068f, + // Entry 20 - 3F + 0x000006c6, 0x000006e6, 0x00000731, 0x0000078c, + 0x000007c4, 0x000007e8, 0x0000082f, 0x0000086d, + 0x00000886, 0x000008bb, 0x0000091d, 0x00000929, + 0x00000935, 0x00000945, 0x00000955, 0x00000965, + 0x0000098c, 0x000009ce, 0x000009f2, 0x00000a08, + 0x00000a2a, 0x00000a41, 0x00000a73, 0x00000aa2, + 0x00000ac9, 0x00000b15, 0x00000b47, 0x00000b6d, + 0x00000b88, 0x00000b9e, 0x00000bf0, 0x00000c2a, + // Entry 40 - 5F + 0x00000c30, 0x00000c72, 0x00000c9f, 0x00000ced, + 0x00000cff, 0x00000d1b, 0x00000d72, 0x00000d8c, + 0x00000da5, 0x00000df6, +} // Size: 320 bytes + +const enData string = "" + // Size: 3574 bytes + "\x04\x00\x01\x0aB\x02This interactive tool migrates lotus-miner to Curio" + + " in 5 minutes.\x02Each step needs your confirmation and can be reversed." + + " Press Ctrl+C to exit at any time.\x04\x00\x01 0\x02Use the arrow keys t" + + "o navigate: ↓ ↑ → ←\x02Ctrl+C pressed in Terminal\x04\x00\x01\x0a#\x02Mi" + + "grating config.toml to database.\x04\x00\x01\x0aR\x02Curio run 1 instanc" + + "e per machine. Multiple machines cooperate through YugabyteDB.\x04\x00" + + "\x01\x0a\x83\x01\x02For SPs with multiple Miner IDs, run 1 migration per" + + " lotus-miner all to the same 1 database. The cluster will serve all Mine" + + "r IDs.\x04\x00\x01\x0a8\x02Error reading from database: %[1]s. Aborting " + + "Migration.\x04\x00\x01\x0a\x1a\x02TODO FINISH THIS FUNCTION\x02To bring " + + "you the best SP tooling...\x04\x00\x01\x0aD\x02Share with the Curio team" + + " your interest in Curio for this Miner ID.\x04\x00\x01\x0aJ\x02Hit retur" + + "n to tell http://CurioStorage.org that you've migrated to Curio.\x02Pres" + + "s return to continue\x04\x00\x01\x0a\x1a\x02Aborting remaining steps." + + "\x02We want to build what you're using.\x02Select what you want to share" + + " with the Curio team.\x02Individual Data: Miner ID, Curio version, net (" + + "mainnet/testnet). Signed.\x02Aggregate-Anonymous: Miner power (bucketed)" + + ", version, and net.\x02Hint: I am someone running Curio on [test or main" + + "].\x02Nothing.\x04\x00\x01\x0a&\x02Error connecting to lotus node: %[1]s" + + "\x04\x00\x01\x0a!\x02Error getting miner power: %[1]s\x04\x00\x01\x0a!" + + "\x02Error marshalling message: %[1]s\x04\x00\x01\x0a \x02Error getting m" + + "iner info: %[1]s\x04\x00\x01\x0a\x1d\x02Error signing message: %[1]s\x02" + + "The following configuration layers have been created for you: base, post" + + ", gui, seal.\x04\x00\x02 \x0a\x0f\x02Documentation:\x04\x00\x02 \x0a," + + "\x02Edit configuration layers with the command:\x04\x00\x02\x0a\x0a\x1e" + + "\x02curio config edit \x04\x00\x01\x0ax\x02The 'base' layer s" + + "hould store common configuration. You likely want all curio to include i" + + "t in their --layers argument.\x04\x00\x01\x0a+\x02Make other layers for " + + "per-machine changes.\x04\x00\x01\x0a2\x02Join #fil-curio-users in Fileco" + + "in slack for help.\x04\x00\x01\x0a\x1b\x02TODO FINISH THIS FUNCTION.\x04" + + "\x00\x01\x0aF\x02Want PoST redundancy? Run many Curio instances with the" + + " 'post' layer.\x04\x00\x01\x0aV\x02Point your browser to your web GUI to" + + " complete setup with Boost and advanced featues.\x02Waiting for lotus-mi" + + "ner to write sectors into Yugabyte.\x04\x00\x01\x0a\x1f\x02Error verifyi" + + "ng sectors: %[1]s\x04\x00\x01\x0aB\x02The sectors are in the database. T" + + "he database is ready for Curio.\x04\x00\x01\x0a9\x02Now shut down lotus-" + + "miner and move the systems to Curio.\x04\x00\x01\x0a\x14\x02Aborting mig" + + "ration.\x04\x00\x01\x0a0\x02Sectors verified. %[1]d sector locations fou" + + "nd.\x02Enter the info to connect to your Yugabyte database installation " + + "(https://download.yugabyte.com/)\x02Host: %[1]s\x02Port: %[1]s\x02Userna" + + "me: %[1]s\x02Password: %[1]s\x02Database: %[1]s\x02Continue to connect a" + + "nd update schema.\x04\x00\x02 \x0a<\x02Database config error occurred, a" + + "bandoning migration: %[1]s\x02Enter the Yugabyte database host(s)\x04" + + "\x00\x01\x0a\x11\x02No host provided\x02Enter the Yugabyte database %[1]" + + "s\x04\x00\x01\x0a\x12\x02No value provided\x04\x00\x01\x0a-\x02Error con" + + "necting to Yugabyte database: %[1]s\x04\x00\x01\x0a*\x02Connected to Yug" + + "abyte. Schema is current.\x04\x00\x01\x0a\x22\x02Error encoding config.t" + + "oml: %[1]s\x02Press return to update config.toml with Yugabyte info. Bac" + + "kup the file now.\x04\x00\x01\x0a-\x02Error reading filemode of config.t" + + "oml: %[1]s\x04\x00\x01\x0a!\x02Error writing config.toml: %[1]s\x04\x00" + + "\x02 \x0a\x15\x02Restart Lotus Miner.\x02Connected to Yugabyte\x04\x00" + + "\x01\x0aM\x02To Start, ensure your sealing pipeline is drained and shut-" + + "down lotus-miner.\x02Select the location of your lotus-miner config dire" + + "ctory?\x02Other\x02Enter the path to the configuration directory used by" + + " lotus-miner\x04\x00\x02 \x0a'\x02No path provided, abandoning migration" + + "\x04\x00\x01\x0aI\x02Cannot read the config.toml file in the provided di" + + "rectory, Error: %[1]s\x02Read Miner Config\x04\x00\x02\x0a\x0a\x16\x02Co" + + "mpleted Step: %[1]s\x02Configuration 'base' was updated to include this " + + "miner's address and its wallet setup.\x04\x00\x01 \x15\x02Layer %[1]s cr" + + "eated.\x02To work with the config:\x02To run Curio: in its own machine o" + + "r cgroup without other files, use the command:" + +var koIndex = []uint32{ // 74 elements + // Entry 0 - 1F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + // Entry 20 - 3F + 0x00000021, 0x00000021, 0x00000021, 0x00000021, + 0x00000021, 0x0000004d, 0x0000004d, 0x0000004d, + 0x0000004d, 0x0000004d, 0x000000bb, 0x000000cc, + 0x000000da, 0x000000f2, 0x00000106, 0x00000120, + 0x0000014a, 0x000001ae, 0x000001ea, 0x00000219, + 0x00000251, 0x0000027a, 0x000002d3, 0x00000319, + 0x00000365, 0x00000365, 0x000003b9, 0x000003fc, + 0x00000421, 0x00000437, 0x00000437, 0x00000486, + // Entry 40 - 5F + 0x0000048d, 0x000004e8, 0x0000053b, 0x0000059a, + 0x000005b2, 0x000005cd, 0x000005cd, 0x000005cd, + 0x000005cd, 0x000005cd, +} // Size: 320 bytes + +const koData string = "" + // Size: 1485 bytes + "\x02터미널에서 Ctrl+C가 눌림\x04\x00\x01\x0a'\x02섹터 확인 중 오류 발생: %[1]s\x02Yugabyt" + + "e 데이터베이스 설치에 연결할 정보를 입력하십시오 (https://download.yugabyte.com/)\x02호스트: %[1" + + "]s\x02포트: %[1]s\x02사용자 이름: %[1]s\x02비밀번호: %[1]s\x02데이터베이스: %[1]s\x02계속 연" + + "결 및 스키마 업데이트.\x04\x00\x02 \x0a^\x02데이터베이스 구성 오류가 발생하여 마이그레이션을 포기합니다: %" + + "[1]s\x02Yugabyte 데이터베이스 호스트를 입력하십시오\x04\x00\x01\x0a*\x02호스트가 제공되지 않았습니다" + + "\x02Yugabyte 데이터베이스 %[1]s을 입력하십시오\x04\x00\x01\x0a$\x02값이 제공되지 않았습니다\x04" + + "\x00\x01\x0aT\x02Yugabyte 데이터베이스에 연결하는 중 오류가 발생했습니다: %[1]s\x04\x00\x01" + + "\x0aA\x02Yugabyte에 연결되었습니다. 스키마가 현재입니다.\x04\x00\x01\x0aG\x02config.toml을" + + " 인코딩하는 중 오류가 발생했습니다: %[1]s\x04\x00\x01\x0aO\x02config.toml의 파일 모드를 읽는 중 " + + "오류가 발생했습니다: %[1]s\x04\x00\x01\x0a>\x02config.toml을 쓰는 중 오류가 발생했습니다: %[" + + "1]s\x04\x00\x02 \x0a\x1f\x02로터스 마이너 재시작.\x02Yugabyte에 연결됨\x02로터스 마이너 구성 " + + "디렉토리의 위치를 선택하시겠습니까?\x02기타\x02로터스 마이너에서 사용하는 구성 디렉토리의 경로를 입력하십시오\x04" + + "\x00\x02 \x0aM\x02경로가 제공되지 않았으므로 마이그레이션을 포기합니다\x04\x00\x01\x0aZ\x02제공된 디" + + "렉토리에서 config.toml 파일을 읽을 수 없습니다. 오류: %[1]s\x02마이너 구성 읽기\x04\x00\x02" + + "\x0a\x0a\x15\x02단계 완료: %[1]s" + +var zhIndex = []uint32{ // 74 elements + // Entry 0 - 1F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + // Entry 20 - 3F + 0x00000019, 0x00000019, 0x00000019, 0x00000019, + 0x00000019, 0x0000003c, 0x0000003c, 0x0000003c, + 0x0000003c, 0x0000003c, 0x00000096, 0x000000a5, + 0x000000b4, 0x000000c6, 0x000000d5, 0x000000e7, + 0x00000106, 0x0000013f, 0x00000164, 0x00000179, + 0x00000197, 0x000001a9, 0x000001da, 0x0000020c, + 0x00000234, 0x00000234, 0x00000268, 0x00000290, + 0x000002b1, 0x000002c6, 0x000002c6, 0x000002f6, + // Entry 40 - 5F + 0x000002fd, 0x0000032d, 0x00000352, 0x0000039b, + 0x000003ae, 0x000003c9, 0x000003c9, 0x000003c9, + 0x000003c9, 0x000003c9, +} // Size: 320 bytes + +const zhData string = "" + // Size: 969 bytes + "\x02在终端中按下Ctrl+C\x04\x00\x01\x0a\x1e\x02验证扇区时出错:%[1]s\x02输入连接到您的Yugabyte" + + "数据库安装的信息(https://download.yugabyte.com/)\x02主机:%[1]s\x02端口:%[1]s\x02用户" + + "名:%[1]s\x02密码:%[1]s\x02数据库:%[1]s\x02继续连接和更新架构。\x04\x00\x02 \x0a3\x02发生" + + "数据库配置错误,放弃迁移:%[1]s\x02输入Yugabyte数据库主机(S)\x04\x00\x01\x0a\x10\x02未提供主机" + + "\x02输入Yugabyte数据库 %[1]s\x04\x00\x01\x0a\x0d\x02未提供值\x04\x00\x01\x0a,\x02" + + "连接到Yugabyte数据库时出错:%[1]s\x04\x00\x01\x0a-\x02已连接到Yugabyte。模式是当前的。\x04" + + "\x00\x01\x0a#\x02编码config.toml时出错:%[1]s\x04\x00\x01\x0a/\x02读取config.tom" + + "l文件模式时出错:%[1]s\x04\x00\x01\x0a#\x02写入config.toml时出错:%[1]s\x04\x00\x02 " + + "\x0a\x1b\x02重新启动Lotus Miner。\x02已连接到Yugabyte\x02选择您的lotus-miner配置目录的位置?" + + "\x02其他\x02输入lotus-miner使用的配置目录的路径\x04\x00\x02 \x0a\x1f\x02未提供路径,放弃迁移\x04" + + "\x00\x01\x0aD\x02无法读取提供的目录中的config.toml文件,错误:%[1]s\x02读取矿工配置\x04\x00\x02" + + "\x0a\x0a\x15\x02完成步骤:%[1]s" + + // Total table size 6988 bytes (6KiB); checksum: D6A4252A diff --git a/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json b/cmd/curio/internal/translations/locales/en/out.gotext.json similarity index 50% rename from cmd/lotus-provider/internal/translations/locales/en/out.gotext.json rename to cmd/curio/internal/translations/locales/en/out.gotext.json index aa319844f0b..8a3fa1c6519 100644 --- a/cmd/lotus-provider/internal/translations/locales/en/out.gotext.json +++ b/cmd/curio/internal/translations/locales/en/out.gotext.json @@ -2,16 +2,16 @@ "language": "en", "messages": [ { - "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "translation": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", + "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "translation": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", "translatorComment": "Copied from source.", "fuzzy": true }, { - "id": "This tool confirms each action it does.", - "message": "This tool confirms each action it does.", - "translation": "This tool confirms each action it does.", + "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "translation": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", "translatorComment": "Copied from source.", "fuzzy": true }, @@ -30,23 +30,23 @@ "fuzzy": true }, { - "id": "Migrating configuration to database.", - "message": "Migrating configuration to database.", - "translation": "Migrating configuration to database.", + "id": "Migrating config.toml to database.", + "message": "Migrating config.toml to database.", + "translation": "Migrating config.toml to database.", "translatorComment": "Copied from source.", "fuzzy": true }, { - "id": "This step will migrate the configuration from the config.toml to the database.", - "message": "This step will migrate the configuration from the config.toml to the database.", - "translation": "This step will migrate the configuration from the config.toml to the database.", + "id": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", + "message": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", + "translation": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", "translatorComment": "Copied from source.", "fuzzy": true }, { - "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", - "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", - "translation": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "id": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", + "message": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", + "translation": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", "translatorComment": "Copied from source.", "fuzzy": true }, @@ -74,6 +74,248 @@ "translatorComment": "Copied from source.", "fuzzy": true }, + { + "id": "To bring you the best SP tooling...", + "message": "To bring you the best SP tooling...", + "translation": "To bring you the best SP tooling...", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Share with the Curio team your interest in Curio for this Miner ID.", + "message": "Share with the Curio team your interest in Curio for this Miner ID.", + "translation": "Share with the Curio team your interest in Curio for this Miner ID.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "message": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "translation": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Press return to continue", + "message": "Press return to continue", + "translation": "Press return to continue", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Aborting remaining steps.", + "message": "Aborting remaining steps.", + "translation": "Aborting remaining steps.", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]v", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "We want to build what you're using.", + "message": "We want to build what you're using.", + "translation": "We want to build what you're using.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Select what you want to share with the Curio team.", + "message": "Select what you want to share with the Curio team.", + "translation": "Select what you want to share with the Curio team.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "message": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "translation": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "message": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "translation": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Hint: I am someone running Curio on [test or main].", + "message": "Hint: I am someone running Curio on [test or main].", + "translation": "Hint: I am someone running Curio on [test or main].", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Nothing.", + "message": "Nothing.", + "translation": "Nothing.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Error connecting to lotus node: {Error}", + "message": "Error connecting to lotus node: {Error}", + "translation": "Error connecting to lotus node: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error getting miner power: {Error}", + "message": "Error getting miner power: {Error}", + "translation": "Error getting miner power: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error marshalling message: {Error}", + "message": "Error marshalling message: {Error}", + "translation": "Error marshalling message: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error getting miner info: {Error}", + "message": "Error getting miner info: {Error}", + "translation": "Error getting miner info: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "Error signing message: {Error}", + "message": "Error signing message: {Error}", + "translation": "Error signing message: {Error}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ], + "fuzzy": true + }, + { + "id": "The following configuration layers have been created for you: base, post, gui, seal.", + "message": "The following configuration layers have been created for you: base, post, gui, seal.", + "translation": "The following configuration layers have been created for you: base, post, gui, seal.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Documentation:", + "message": "Documentation:", + "translation": "Documentation:", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Edit configuration layers with the command:", + "message": "Edit configuration layers with the command:", + "translation": "Edit configuration layers with the command:", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "curio config edit \u003clayername\u003e", + "message": "curio config edit \u003clayername\u003e", + "translation": "curio config edit \u003clayername\u003e", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "message": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "translation": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Make other layers for per-machine changes.", + "message": "Make other layers for per-machine changes.", + "translation": "Make other layers for per-machine changes.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Join #fil-curio-users in Filecoin slack for help.", + "message": "Join #fil-curio-users in Filecoin slack for help.", + "translation": "Join #fil-curio-users in Filecoin slack for help.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "TODO FINISH THIS FUNCTION.", + "message": "TODO FINISH THIS FUNCTION.", + "translation": "TODO FINISH THIS FUNCTION.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "message": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "translation": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "message": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "translation": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", @@ -98,6 +340,27 @@ ], "fuzzy": true }, + { + "id": "The sectors are in the database. The database is ready for Curio.", + "message": "The sectors are in the database. The database is ready for Curio.", + "translation": "The sectors are in the database. The database is ready for Curio.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Now shut down lotus-miner and move the systems to Curio.", + "message": "Now shut down lotus-miner and move the systems to Curio.", + "translation": "Now shut down lotus-miner and move the systems to Curio.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Aborting migration.", + "message": "Aborting migration.", + "translation": "Aborting migration.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Sectors verified. {I} sector locations found.", "message": "Sectors verified. {I} sector locations found.", @@ -115,20 +378,6 @@ ], "fuzzy": true }, - { - "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translation": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Verified Sectors in Database", - "message": "Verified Sectors in Database", - "translation": "Verified Sectors in Database", - "translatorComment": "Copied from source.", - "fuzzy": true - }, { "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", @@ -324,6 +573,13 @@ ], "fuzzy": true }, + { + "id": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "message": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "translation": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Error reading filemode of config.toml: {Error}", "message": "Error reading filemode of config.toml: {Error}", @@ -372,6 +628,13 @@ "translatorComment": "Copied from source.", "fuzzy": true }, + { + "id": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "message": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "translation": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Select the location of your lotus-miner config directory?", "message": "Select the location of your lotus-miner config directory?", @@ -440,6 +703,44 @@ } ], "fuzzy": true + }, + { + "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "translation": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Layer {LayerName} created.", + "message": "Layer {LayerName} created.", + "translation": "Layer {LayerName} created.", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "LayerName", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "layerName" + } + ], + "fuzzy": true + }, + { + "id": "To work with the config:", + "message": "To work with the config:", + "translation": "To work with the config:", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "To run Curio: in its own machine or cgroup without other files, use the command:", + "message": "To run Curio: in its own machine or cgroup without other files, use the command:", + "translation": "To run Curio: in its own machine or cgroup without other files, use the command:", + "translatorComment": "Copied from source.", + "fuzzy": true } ] } \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json b/cmd/curio/internal/translations/locales/ko/messages.gotext.json similarity index 97% rename from cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json rename to cmd/curio/internal/translations/locales/ko/messages.gotext.json index b84f8b1864b..680268b394c 100644 --- a/cmd/lotus-provider/internal/translations/locales/ko/messages.gotext.json +++ b/cmd/curio/internal/translations/locales/ko/messages.gotext.json @@ -2,9 +2,9 @@ "language": "ko", "messages": [ { - "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "translation": "이 대화형 도구는 로터스 공급자 이주를 안내합니다.\n언제든지 종료하려면 Ctrl+C를 누르십시오." + "id": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", + "translation": "이 대화형 도구는 Curio 마이그레이션 과정을 안내합니다.\n언제든지 종료하려면 Ctrl+C를 누르십시오." }, { "id": "This tool confirms each action it does.", diff --git a/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json b/cmd/curio/internal/translations/locales/ko/out.gotext.json similarity index 55% rename from cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json rename to cmd/curio/internal/translations/locales/ko/out.gotext.json index 1459a0cc5d9..9dc86dbfe44 100644 --- a/cmd/lotus-provider/internal/translations/locales/ko/out.gotext.json +++ b/cmd/curio/internal/translations/locales/ko/out.gotext.json @@ -2,14 +2,14 @@ "language": "ko", "messages": [ { - "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "translation": "이 대화형 도구는 로터스 공급자 이주를 안내합니다.\n언제든지 종료하려면 Ctrl+C를 누르십시오." + "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "translation": "" }, { - "id": "This tool confirms each action it does.", - "message": "This tool confirms each action it does.", - "translation": "이 도구는 수행하는 각 작업을 확인합니다." + "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "translation": "" }, { "id": "Use the arrow keys to navigate: ↓ ↑ → ←", @@ -22,18 +22,18 @@ "translation": "터미널에서 Ctrl+C가 눌림" }, { - "id": "Migrating configuration to database.", - "message": "Migrating configuration to database.", + "id": "Migrating config.toml to database.", + "message": "Migrating config.toml to database.", "translation": "" }, { - "id": "This step will migrate the configuration from the config.toml to the database.", - "message": "This step will migrate the configuration from the config.toml to the database.", + "id": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", + "message": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", "translation": "" }, { - "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", - "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "id": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", + "message": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", "translation": "" }, { @@ -56,6 +56,196 @@ "message": "TODO FINISH THIS FUNCTION", "translation": "" }, + { + "id": "To bring you the best SP tooling...", + "message": "To bring you the best SP tooling...", + "translation": "" + }, + { + "id": "Share with the Curio team your interest in Curio for this Miner ID.", + "message": "Share with the Curio team your interest in Curio for this Miner ID.", + "translation": "" + }, + { + "id": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "message": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "translation": "" + }, + { + "id": "Press return to continue", + "message": "Press return to continue", + "translation": "" + }, + { + "id": "Aborting remaining steps.", + "message": "Aborting remaining steps.", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]v", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "We want to build what you're using.", + "message": "We want to build what you're using.", + "translation": "" + }, + { + "id": "Select what you want to share with the Curio team.", + "message": "Select what you want to share with the Curio team.", + "translation": "" + }, + { + "id": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "message": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "translation": "" + }, + { + "id": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "message": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "translation": "" + }, + { + "id": "Hint: I am someone running Curio on [test or main].", + "message": "Hint: I am someone running Curio on [test or main].", + "translation": "" + }, + { + "id": "Nothing.", + "message": "Nothing.", + "translation": "" + }, + { + "id": "Error connecting to lotus node: {Error}", + "message": "Error connecting to lotus node: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error getting miner power: {Error}", + "message": "Error getting miner power: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error marshalling message: {Error}", + "message": "Error marshalling message: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error getting miner info: {Error}", + "message": "Error getting miner info: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error signing message: {Error}", + "message": "Error signing message: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "The following configuration layers have been created for you: base, post, gui, seal.", + "message": "The following configuration layers have been created for you: base, post, gui, seal.", + "translation": "" + }, + { + "id": "Documentation:", + "message": "Documentation:", + "translation": "" + }, + { + "id": "Edit configuration layers with the command:", + "message": "Edit configuration layers with the command:", + "translation": "" + }, + { + "id": "curio config edit \u003clayername\u003e", + "message": "curio config edit \u003clayername\u003e", + "translation": "" + }, + { + "id": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "message": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "translation": "" + }, + { + "id": "Make other layers for per-machine changes.", + "message": "Make other layers for per-machine changes.", + "translation": "" + }, + { + "id": "Join #fil-curio-users in Filecoin slack for help.", + "message": "Join #fil-curio-users in Filecoin slack for help.", + "translation": "" + }, + { + "id": "TODO FINISH THIS FUNCTION.", + "message": "TODO FINISH THIS FUNCTION.", + "translation": "" + }, + { + "id": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "message": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "translation": "" + }, + { + "id": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "message": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "translation": "" + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", @@ -76,6 +266,21 @@ } ] }, + { + "id": "The sectors are in the database. The database is ready for Curio.", + "message": "The sectors are in the database. The database is ready for Curio.", + "translation": "" + }, + { + "id": "Now shut down lotus-miner and move the systems to Curio.", + "message": "Now shut down lotus-miner and move the systems to Curio.", + "translation": "" + }, + { + "id": "Aborting migration.", + "message": "Aborting migration.", + "translation": "" + }, { "id": "Sectors verified. {I} sector locations found.", "message": "Sectors verified. {I} sector locations found.", @@ -91,16 +296,6 @@ } ] }, - { - "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translation": "로터스 마이너의 config.toml에서 데이터베이스 정보를 제거하지 마십시오. 두 번의 PoSt를 피하기 위함입니다." - }, - { - "id": "Verified Sectors in Database", - "message": "Verified Sectors in Database", - "translation": "" - }, { "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", @@ -266,6 +461,11 @@ } ] }, + { + "id": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "message": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "translation": "" + }, { "id": "Error reading filemode of config.toml: {Error}", "message": "Error reading filemode of config.toml: {Error}", @@ -306,6 +506,11 @@ "message": "Connected to Yugabyte", "translation": "Yugabyte에 연결됨" }, + { + "id": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "message": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "translation": "" + }, { "id": "Select the location of your lotus-miner config directory?", "message": "Select the location of your lotus-miner config directory?", @@ -360,6 +565,36 @@ "expr": "step" } ] + }, + { + "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "translation": "" + }, + { + "id": "Layer {LayerName} created.", + "message": "Layer {LayerName} created.", + "translation": "", + "placeholders": [ + { + "id": "LayerName", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "layerName" + } + ] + }, + { + "id": "To work with the config:", + "message": "To work with the config:", + "translation": "" + }, + { + "id": "To run Curio: in its own machine or cgroup without other files, use the command:", + "message": "To run Curio: in its own machine or cgroup without other files, use the command:", + "translation": "" } ] } \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json b/cmd/curio/internal/translations/locales/zh/messages.gotext.json similarity index 97% rename from cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json rename to cmd/curio/internal/translations/locales/zh/messages.gotext.json index a4f4890fb87..d9d28029387 100644 --- a/cmd/lotus-provider/internal/translations/locales/zh/messages.gotext.json +++ b/cmd/curio/internal/translations/locales/zh/messages.gotext.json @@ -2,9 +2,9 @@ "language": "zh", "messages": [ { - "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "translation": "此互动工具将引导您完成lotus-provider的迁移。\n随时按Ctrl+C退出。" + "id": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", + "message": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", + "translation": "此互动工具将引导您完成Curio的迁移。\n随时按Ctrl+C退出。" }, { "id": "This tool confirms each action it does.", diff --git a/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json b/cmd/curio/internal/translations/locales/zh/out.gotext.json similarity index 54% rename from cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json rename to cmd/curio/internal/translations/locales/zh/out.gotext.json index 6bfb5d85faf..f79a994fa51 100644 --- a/cmd/lotus-provider/internal/translations/locales/zh/out.gotext.json +++ b/cmd/curio/internal/translations/locales/zh/out.gotext.json @@ -2,14 +2,14 @@ "language": "zh", "messages": [ { - "id": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.", - "translation": "此互动工具将引导您完成lotus-provider的迁移。\n随时按Ctrl+C退出。" + "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", + "translation": "" }, { - "id": "This tool confirms each action it does.", - "message": "This tool confirms each action it does.", - "translation": "此工具确认其执行的每个操作。" + "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", + "translation": "" }, { "id": "Use the arrow keys to navigate: ↓ ↑ → ←", @@ -22,18 +22,18 @@ "translation": "在终端中按下Ctrl+C" }, { - "id": "Migrating configuration to database.", - "message": "Migrating configuration to database.", + "id": "Migrating config.toml to database.", + "message": "Migrating config.toml to database.", "translation": "" }, { - "id": "This step will migrate the configuration from the config.toml to the database.", - "message": "This step will migrate the configuration from the config.toml to the database.", + "id": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", + "message": "Curio run 1 instance per machine. Multiple machines cooperate through YugabyteDB.", "translation": "" }, { - "id": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", - "message": "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n", + "id": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", + "message": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", "translation": "" }, { @@ -56,6 +56,196 @@ "message": "TODO FINISH THIS FUNCTION", "translation": "" }, + { + "id": "To bring you the best SP tooling...", + "message": "To bring you the best SP tooling...", + "translation": "" + }, + { + "id": "Share with the Curio team your interest in Curio for this Miner ID.", + "message": "Share with the Curio team your interest in Curio for this Miner ID.", + "translation": "" + }, + { + "id": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "message": "Hit return to tell http://CurioStorage.org that you've migrated to Curio.", + "translation": "" + }, + { + "id": "Press return to continue", + "message": "Press return to continue", + "translation": "" + }, + { + "id": "Aborting remaining steps.", + "message": "Aborting remaining steps.", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]v", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "We want to build what you're using.", + "message": "We want to build what you're using.", + "translation": "" + }, + { + "id": "Select what you want to share with the Curio team.", + "message": "Select what you want to share with the Curio team.", + "translation": "" + }, + { + "id": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "message": "Individual Data: Miner ID, Curio version, net (mainnet/testnet). Signed.", + "translation": "" + }, + { + "id": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "message": "Aggregate-Anonymous: Miner power (bucketed), version, and net.", + "translation": "" + }, + { + "id": "Hint: I am someone running Curio on [test or main].", + "message": "Hint: I am someone running Curio on [test or main].", + "translation": "" + }, + { + "id": "Nothing.", + "message": "Nothing.", + "translation": "" + }, + { + "id": "Error connecting to lotus node: {Error}", + "message": "Error connecting to lotus node: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error getting miner power: {Error}", + "message": "Error getting miner power: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error marshalling message: {Error}", + "message": "Error marshalling message: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error getting miner info: {Error}", + "message": "Error getting miner info: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "Error signing message: {Error}", + "message": "Error signing message: {Error}", + "translation": "", + "placeholders": [ + { + "id": "Error", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "err.Error()" + } + ] + }, + { + "id": "The following configuration layers have been created for you: base, post, gui, seal.", + "message": "The following configuration layers have been created for you: base, post, gui, seal.", + "translation": "" + }, + { + "id": "Documentation:", + "message": "Documentation:", + "translation": "" + }, + { + "id": "Edit configuration layers with the command:", + "message": "Edit configuration layers with the command:", + "translation": "" + }, + { + "id": "curio config edit \u003clayername\u003e", + "message": "curio config edit \u003clayername\u003e", + "translation": "" + }, + { + "id": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "message": "The 'base' layer should store common configuration. You likely want all curio to include it in their --layers argument.", + "translation": "" + }, + { + "id": "Make other layers for per-machine changes.", + "message": "Make other layers for per-machine changes.", + "translation": "" + }, + { + "id": "Join #fil-curio-users in Filecoin slack for help.", + "message": "Join #fil-curio-users in Filecoin slack for help.", + "translation": "" + }, + { + "id": "TODO FINISH THIS FUNCTION.", + "message": "TODO FINISH THIS FUNCTION.", + "translation": "" + }, + { + "id": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "message": "Want PoST redundancy? Run many Curio instances with the 'post' layer.", + "translation": "" + }, + { + "id": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "message": "Point your browser to your web GUI to complete setup with Boost and advanced featues.", + "translation": "" + }, { "id": "Waiting for lotus-miner to write sectors into Yugabyte.", "message": "Waiting for lotus-miner to write sectors into Yugabyte.", @@ -76,6 +266,21 @@ } ] }, + { + "id": "The sectors are in the database. The database is ready for Curio.", + "message": "The sectors are in the database. The database is ready for Curio.", + "translation": "" + }, + { + "id": "Now shut down lotus-miner and move the systems to Curio.", + "message": "Now shut down lotus-miner and move the systems to Curio.", + "translation": "" + }, + { + "id": "Aborting migration.", + "message": "Aborting migration.", + "translation": "" + }, { "id": "Sectors verified. {I} sector locations found.", "message": "Sectors verified. {I} sector locations found.", @@ -91,16 +296,6 @@ } ] }, - { - "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translation": "从config.toml中永远不要删除lotus-miner的数据库信息,因为它避免了双PoSt。" - }, - { - "id": "Verified Sectors in Database", - "message": "Verified Sectors in Database", - "translation": "" - }, { "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", @@ -266,6 +461,11 @@ } ] }, + { + "id": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "message": "Press return to update config.toml with Yugabyte info. Backup the file now.", + "translation": "" + }, { "id": "Error reading filemode of config.toml: {Error}", "message": "Error reading filemode of config.toml: {Error}", @@ -306,6 +506,11 @@ "message": "Connected to Yugabyte", "translation": "已连接到Yugabyte" }, + { + "id": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "message": "To Start, ensure your sealing pipeline is drained and shut-down lotus-miner.", + "translation": "" + }, { "id": "Select the location of your lotus-miner config directory?", "message": "Select the location of your lotus-miner config directory?", @@ -360,6 +565,36 @@ "expr": "step" } ] + }, + { + "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", + "translation": "" + }, + { + "id": "Layer {LayerName} created.", + "message": "Layer {LayerName} created.", + "translation": "", + "placeholders": [ + { + "id": "LayerName", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "layerName" + } + ] + }, + { + "id": "To work with the config:", + "message": "To work with the config:", + "translation": "" + }, + { + "id": "To run Curio: in its own machine or cgroup without other files, use the command:", + "message": "To run Curio: in its own machine or cgroup without other files, use the command:", + "translation": "" } ] } \ No newline at end of file diff --git a/cmd/lotus-provider/internal/translations/translations.go b/cmd/curio/internal/translations/translations.go similarity index 62% rename from cmd/lotus-provider/internal/translations/translations.go rename to cmd/curio/internal/translations/translations.go index 9ca0038db43..eb2449a19b6 100644 --- a/cmd/lotus-provider/internal/translations/translations.go +++ b/cmd/curio/internal/translations/translations.go @@ -1,13 +1,13 @@ // Usage: -// 1. change strings in guidedSetup folder that use d.T() or d.say(). -// 2. run `go generate` in the cmd/lotus-provider/internal/translations/ folder. +// 1. change strings in guidedsetup folder that use d.T() or d.say(). +// 2. run `go generate` in the cmd/curio/internal/translations/ folder. // 3. Ask ChatGPT to translate the locale/??/out.gotext.json files' translation // fields to their respective languages. Replace the messages.gotext.json files. // In web UI, you need to hit "continue generating" -// 4. run `go generate` in the cmd/lotus-provider/internal/translations/ folder to re-import. +// 4. run `go generate` in the cmd/curio/internal/translations/ folder to re-import. // // FUTURE Reliability: automate this with an openAPI call when translate fields turn up blank. // FUTURE Cost Savings: avoid re-translating stuff that's in messages.gotext.json already. package translations -//go:generate gotext -srclang=en update -out=catalog.go -lang=en,zh,ko github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup +//go:generate gotext -srclang=en update -out=catalog.go -lang=en,zh,ko github.com/filecoin-project/lotus/cmd/curio/guidedsetup diff --git a/cmd/lotus-provider/main.go b/cmd/curio/main.go similarity index 77% rename from cmd/lotus-provider/main.go rename to cmd/curio/main.go index c082ddd43b5..0bb0f500b7c 100644 --- a/cmd/lotus-provider/main.go +++ b/cmd/curio/main.go @@ -16,8 +16,8 @@ import ( "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" - "github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup" + "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/curio/guidedsetup" "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/tracing" "github.com/filecoin-project/lotus/node/repo" @@ -47,7 +47,7 @@ func main() { configCmd, testCmd, webCmd, - guidedSetup.GuidedsetupCmd, + guidedsetup.GuidedsetupCmd, //backupCmd, //lcli.WithCategory("chain", actorCmd), //lcli.WithCategory("storage", sectorsCmd), @@ -56,7 +56,7 @@ func main() { //lcli.WithCategory("storage", sealingCmd), } - jaeger := tracing.SetupJaegerTracing("lotus") + jaeger := tracing.SetupJaegerTracing("curio") defer func() { if jaeger != nil { _ = jaeger.ForceFlush(context.Background()) @@ -70,7 +70,7 @@ func main() { if jaeger != nil { _ = jaeger.Shutdown(cctx.Context) } - jaeger = tracing.SetupJaegerTracing("lotus/" + cmd.Name) + jaeger = tracing.SetupJaegerTracing("curio/" + cmd.Name) if cctx.IsSet("color") { color.NoColor = !cctx.Bool("color") @@ -85,7 +85,7 @@ func main() { } app := &cli.App{ - Name: "lotus-provider", + Name: "curio", Usage: "Filecoin decentralized storage network provider", Version: build.UserVersion(), EnableBashCompletion: true, @@ -98,46 +98,46 @@ func main() { }, &cli.StringFlag{ Name: "panic-reports", - EnvVars: []string{"LOTUS_PANIC_REPORT_PATH"}, + EnvVars: []string{"CURIO_PANIC_REPORT_PATH"}, Hidden: true, - Value: "~/.lotusprovider", // should follow --repo default + Value: "~/.curio", // should follow --repo default }, &cli.StringFlag{ Name: "db-host", - EnvVars: []string{"LOTUS_DB_HOST"}, + EnvVars: []string{"CURIO_DB_HOST", "CURIO_HARMONYDB_HOSTS"}, Usage: "Command separated list of hostnames for yugabyte cluster", Value: "yugabyte", }, &cli.StringFlag{ Name: "db-name", - EnvVars: []string{"LOTUS_DB_NAME", "LOTUS_HARMONYDB_HOSTS"}, + EnvVars: []string{"CURIO_DB_NAME", "CURIO_HARMONYDB_NAME"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-user", - EnvVars: []string{"LOTUS_DB_USER", "LOTUS_HARMONYDB_USERNAME"}, + EnvVars: []string{"CURIO_DB_USER", "CURIO_HARMONYDB_USERNAME"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-password", - EnvVars: []string{"LOTUS_DB_PASSWORD", "LOTUS_HARMONYDB_PASSWORD"}, + EnvVars: []string{"CURIO_DB_PASSWORD", "CURIO_HARMONYDB_PASSWORD"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-port", - EnvVars: []string{"LOTUS_DB_PORT", "LOTUS_HARMONYDB_PORT"}, + EnvVars: []string{"CURIO_DB_PORT", "CURIO_HARMONYDB_PORT"}, Hidden: true, Value: "5433", }, &cli.StringFlag{ Name: "layers", - EnvVars: []string{"LOTUS_LAYERS", "LOTUS_CONFIG_LAYERS"}, + EnvVars: []string{"CURIO_LAYERS", "CURIO_CONFIG_LAYERS"}, Value: "base", }, &cli.StringFlag{ Name: deps.FlagRepoPath, - EnvVars: []string{"LOTUS_REPO_PATH"}, - Value: "~/.lotusprovider", + EnvVars: []string{"CURIO_REPO_PATH"}, + Value: "~/.curio", }, cliutil.FlagVeryVerbose, }, @@ -153,7 +153,7 @@ func main() { panic(r) } - // Generate report in LOTUS_PATH and re-raise panic + // Generate report in CURIO_PATH and re-raise panic build.GeneratePanicReport(c.String("panic-reports"), p, c.App.Name) panic(r) } @@ -161,6 +161,6 @@ func main() { }, } app.Setup() - app.Metadata["repoType"] = repo.Provider + app.Metadata["repoType"] = repo.Curio lcli.RunApp(app) } diff --git a/cmd/lotus-provider/migrate.go b/cmd/curio/migrate.go similarity index 82% rename from cmd/lotus-provider/migrate.go rename to cmd/curio/migrate.go index b79fb0835ba..c9c78f8df88 100644 --- a/cmd/lotus-provider/migrate.go +++ b/cmd/curio/migrate.go @@ -6,14 +6,14 @@ import ( "github.com/urfave/cli/v2" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/lotus-provider/guidedSetup" + "github.com/filecoin-project/lotus/cmd/curio/guidedsetup" "github.com/filecoin-project/lotus/node/repo" ) var configMigrateCmd = &cli.Command{ Name: "from-miner", - Usage: "Express a database config (for lotus-provider) from an existing miner.", - Description: "Express a database config (for lotus-provider) from an existing miner.", + Usage: "Express a database config (for curio) from an existing miner.", + Description: "Express a database config (for curio) from an existing miner.", Flags: []cli.Flag{ &cli.StringFlag{ Name: FlagMinerRepo, @@ -58,6 +58,6 @@ func fromMiner(cctx *cli.Context) (err error) { if err != nil { return fmt.Errorf("cannot read API: %w", err) } - err = guidedSetup.SaveConfigToLayer(minerRepoPath, layerName, overwrite, header) + err = guidedsetup.SaveConfigToLayer(minerRepoPath, layerName, overwrite, header) return err } diff --git a/cmd/lotus-provider/proving.go b/cmd/curio/proving.go similarity index 94% rename from cmd/lotus-provider/proving.go rename to cmd/curio/proving.go index 602c991e1ed..72b5c53c3dd 100644 --- a/cmd/lotus-provider/proving.go +++ b/cmd/curio/proving.go @@ -15,9 +15,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/dline" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" + curio "github.com/filecoin-project/lotus/curiosrc" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/provider" ) var testCmd = &cli.Command{ @@ -51,7 +51,7 @@ var wdPostCmd = &cli.Command{ var wdPostTaskCmd = &cli.Command{ Name: "task", Aliases: []string{"scheduled", "schedule", "async", "asynchronous"}, - Usage: "Test the windowpost scheduler by running it on the next available lotus-provider. ", + Usage: "Test the windowpost scheduler by running it on the next available curio. ", Flags: []cli.Flag{ &cli.Uint64Flag{ Name: "deadline", @@ -160,7 +160,7 @@ It will not send any messages to the chain. Since it can compute any deadline, o &cli.StringFlag{ Name: "storage-json", Usage: "path to json file containing storage config", - Value: "~/.lotus-provider/storage.json", + Value: "~/.curio/storage.json", }, &cli.Uint64Flag{ Name: "partition", @@ -176,7 +176,7 @@ It will not send any messages to the chain. Since it can compute any deadline, o return err } - wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := provider.WindowPostScheduler(ctx, deps.Cfg.Fees, deps.Cfg.Proving, deps.Full, deps.Verif, deps.LW, nil, + wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := curio.WindowPostScheduler(ctx, deps.Cfg.Fees, deps.Cfg.Proving, deps.Full, deps.Verif, deps.LW, nil, deps.As, deps.Maddrs, deps.DB, deps.Stor, deps.Si, deps.Cfg.Subsystems.WindowPostMaxTasks) if err != nil { return err diff --git a/cmd/lotus-provider/rpc/rpc.go b/cmd/curio/rpc/rpc.go similarity index 85% rename from cmd/lotus-provider/rpc/rpc.go rename to cmd/curio/rpc/rpc.go index e2897030f6e..ad2475d5954 100644 --- a/cmd/lotus-provider/rpc/rpc.go +++ b/cmd/curio/rpc/rpc.go @@ -20,28 +20,28 @@ import ( "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/curiosrc/web" "github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics/proxy" - "github.com/filecoin-project/lotus/provider/lpweb" "github.com/filecoin-project/lotus/storage/paths" ) -var log = logging.Logger("lp/rpc") +var log = logging.Logger("curio/rpc") -func LotusProviderHandler( +func CurioHandler( authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, - a api.LotusProvider, + a api.Curio, permissioned bool) http.Handler { mux := mux.NewRouter() readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder() rpcServer := jsonrpc.NewServer(jsonrpc.WithServerErrors(api.RPCErrors), readerServerOpt) - wapi := proxy.MetricedAPI[api.LotusProvider, api.LotusProviderStruct](a) + wapi := proxy.MetricedAPI[api.Curio, api.CurioStruct](a) if permissioned { - wapi = api.PermissionedAPI[api.LotusProvider, api.LotusProviderStruct](wapi) + wapi = api.PermissionedAPI[api.Curio, api.CurioStruct](wapi) } rpcServer.Register("Filecoin", wapi) @@ -63,17 +63,17 @@ func LotusProviderHandler( return ah } -type ProviderAPI struct { +type CurioAPI struct { *deps.Deps ShutdownChan chan struct{} } -func (p *ProviderAPI) Version(context.Context) (api.Version, error) { - return api.ProviderAPIVersion0, nil +func (p *CurioAPI) Version(context.Context) (api.Version, error) { + return api.CurioAPIVersion0, nil } // Trigger shutdown -func (p *ProviderAPI) Shutdown(context.Context) error { +func (p *CurioAPI) Shutdown(context.Context) error { close(p.ShutdownChan) return nil } @@ -114,10 +114,10 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c } // Serve the RPC. srv := &http.Server{ - Handler: LotusProviderHandler( + Handler: CurioHandler( authVerify, remoteHandler, - &ProviderAPI{dependencies, shutdownChan}, + &CurioAPI{dependencies, shutdownChan}, true), ReadHeaderTimeout: time.Minute * 3, BaseContext: func(listener net.Listener) context.Context { @@ -132,7 +132,7 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c eg.Go(srv.ListenAndServe) if dependencies.Cfg.Subsystems.EnableWebGui { - web, err := lpweb.GetSrv(ctx, dependencies) + web, err := web.GetSrv(ctx, dependencies) if err != nil { return err } diff --git a/cmd/lotus-provider/run.go b/cmd/curio/run.go similarity index 88% rename from cmd/lotus-provider/run.go rename to cmd/curio/run.go index 9b50470c9b7..48d6dad3cba 100644 --- a/cmd/lotus-provider/run.go +++ b/cmd/curio/run.go @@ -14,9 +14,9 @@ import ( "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" - "github.com/filecoin-project/lotus/cmd/lotus-provider/rpc" - "github.com/filecoin-project/lotus/cmd/lotus-provider/tasks" + "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/curio/rpc" + "github.com/filecoin-project/lotus/cmd/curio/tasks" "github.com/filecoin-project/lotus/lib/ulimit" "github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/node" @@ -28,7 +28,7 @@ type stackTracer interface { var runCmd = &cli.Command{ Name: "run", - Usage: "Start a lotus provider process", + Usage: "Start a Curio process", Flags: []cli.Flag{ &cli.StringFlag{ Name: "listen", @@ -58,12 +58,12 @@ var runCmd = &cli.Command{ &cli.StringFlag{ Name: "storage-json", Usage: "path to json file containing storage config", - Value: "~/.lotus-provider/storage.json", + Value: "~/.curio/storage.json", }, &cli.StringFlag{ Name: "journal", Usage: "path to journal files", - Value: "~/.lotus-provider/", + Value: "~/.curio/", }, }, Action: func(cctx *cli.Context) (err error) { @@ -87,7 +87,7 @@ var runCmd = &cli.Command{ ctx, _ := tag.New(lcli.DaemonContext(cctx), tag.Insert(metrics.Version, build.BuildVersion), tag.Insert(metrics.Commit, build.CurrentCommit), - tag.Insert(metrics.NodeType, "provider"), + tag.Insert(metrics.NodeType, "curio"), ) shutdownChan := make(chan struct{}) { @@ -136,7 +136,7 @@ var runCmd = &cli.Command{ return err } finishCh := node.MonitorShutdown(shutdownChan) //node.ShutdownHandler{Component: "rpc server", StopFunc: rpcStopper}, - //node.ShutdownHandler{Component: "provider", StopFunc: stop}, + //node.ShutdownHandler{Component: "curio", StopFunc: stop}, <-finishCh return nil @@ -145,8 +145,8 @@ var runCmd = &cli.Command{ var webCmd = &cli.Command{ Name: "web", - Usage: "Start lotus provider web interface", - Description: `Start an instance of lotus provider web interface. + Usage: "Start Curio web interface", + Description: `Start an instance of Curio web interface. This creates the 'web' layer if it does not exist, then calls run with that layer.`, Flags: []cli.Flag{ &cli.StringFlag{ diff --git a/cmd/lotus-provider/stop.go b/cmd/curio/stop.go similarity index 91% rename from cmd/lotus-provider/stop.go rename to cmd/curio/stop.go index 0ecbe135b9e..36d47196d71 100644 --- a/cmd/lotus-provider/stop.go +++ b/cmd/curio/stop.go @@ -10,7 +10,7 @@ import ( var stopCmd = &cli.Command{ Name: "stop", - Usage: "Stop a running lotus provider", + Usage: "Stop a running Curio process", Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { SetupCloseHandler() diff --git a/cmd/lotus-provider/tasks/tasks.go b/cmd/curio/tasks/tasks.go similarity index 64% rename from cmd/lotus-provider/tasks/tasks.go rename to cmd/curio/tasks/tasks.go index 2c4cd58bfff..fb57046486f 100644 --- a/cmd/lotus-provider/tasks/tasks.go +++ b/cmd/curio/tasks/tasks.go @@ -1,4 +1,4 @@ -// Package tasks contains tasks that can be run by the lotus-provider command. +// Package tasks contains tasks that can be run by the curio command. package tasks import ( @@ -7,14 +7,14 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/samber/lo" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" + curio "github.com/filecoin-project/lotus/curiosrc" + "github.com/filecoin-project/lotus/curiosrc/message" + "github.com/filecoin-project/lotus/curiosrc/winning" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" - "github.com/filecoin-project/lotus/provider" - "github.com/filecoin-project/lotus/provider/lpmessage" - "github.com/filecoin-project/lotus/provider/lpwinning" ) -var log = logging.Logger("lotus-provider/deps") +var log = logging.Logger("curio/deps") func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.TaskEngine, error) { cfg := dependencies.Cfg @@ -28,7 +28,7 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task si := dependencies.Si var activeTasks []harmonytask.TaskInterface - sender, sendTask := lpmessage.NewSender(full, full, db) + sender, sendTask := message.NewSender(full, full, db) activeTasks = append(activeTasks, sendTask) /////////////////////////////////////////////////////////////////////// @@ -37,7 +37,7 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task { if cfg.Subsystems.EnableWindowPost { - wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := provider.WindowPostScheduler(ctx, cfg.Fees, cfg.Proving, full, verif, lw, sender, + wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := curio.WindowPostScheduler(ctx, cfg.Fees, cfg.Proving, full, verif, lw, sender, as, maddrs, db, stor, si, cfg.Subsystems.WindowPostMaxTasks) if err != nil { return nil, err @@ -46,11 +46,11 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task } if cfg.Subsystems.EnableWinningPost { - winPoStTask := lpwinning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, lw, verif, full, maddrs) + winPoStTask := winning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, lw, verif, full, maddrs) activeTasks = append(activeTasks, winPoStTask) } } - log.Infow("This lotus_provider instance handles", + log.Infow("This Curio instance handles", "miner_addresses", maddrs, "tasks", lo.Map(activeTasks, func(t harmonytask.TaskInterface, _ int) string { return t.TypeDetails().Name })) diff --git a/cmd/lotus-provider/internal/translations/catalog.go b/cmd/lotus-provider/internal/translations/catalog.go deleted file mode 100644 index 0832b6d0ade..00000000000 --- a/cmd/lotus-provider/internal/translations/catalog.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package translations - -import ( - "golang.org/x/text/language" - "golang.org/x/text/message" - "golang.org/x/text/message/catalog" -) - -type dictionary struct { - index []uint32 - data string -} - -func (d *dictionary) Lookup(key string) (data string, ok bool) { - p, ok := messageKeyToIndex[key] - if !ok { - return "", false - } - start, end := d.index[p], d.index[p+1] - if start == end { - return "", false - } - return d.data[start:end], true -} - -func init() { - dict := map[string]catalog.Dictionary{ - "en": &dictionary{index: enIndex, data: enData}, - "ko": &dictionary{index: koIndex, data: koData}, - "zh": &dictionary{index: zhIndex, data: zhData}, - } - fallback := language.MustParse("en") - cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) - if err != nil { - panic(err) - } - message.DefaultCatalog = cat -} - -var messageKeyToIndex = map[string]int{ - "A Lotus-Miner cluster shares a database and shares the work of managing multiple Miner IDs and their sectors.\\n": 6, - "Cannot read the config.toml file in the provided directory, Error: %s\n": 37, - "Completed Step: %s\n\n": 39, - "Connected to Yugabyte": 32, - "Connected to Yugabyte. Schema is current.\n": 27, - "Continue to connect and update schema.": 20, - "Ctrl+C pressed in Terminal": 3, - "Database config error occurred, abandoning migration: %s \n": 21, - "Database: %s": 19, - "Enter the Yugabyte database %s": 24, - "Enter the Yugabyte database host(s)": 22, - "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 14, - "Enter the path to the configuration directory used by lotus-miner": 35, - "Error connecting to Yugabyte database: %s\n": 26, - "Error encoding config.toml: %s\n": 28, - "Error reading filemode of config.toml: %s\n": 29, - "Error reading from database: %s. Aborting Migration.\n": 7, - "Error verifying sectors: %s\n": 10, - "Error writing config.toml: %s\n": 30, - "Host: %s": 15, - "Migrating configuration to database.": 4, - "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.\n": 12, - "No host provided\n": 23, - "No path provided, abandoning migration \n": 36, - "No value provided\n": 25, - "Other": 34, - "Password: %s": 18, - "Port: %s": 16, - "Read Miner Config": 38, - "Restart Lotus Miner. \n": 31, - "Sectors verified. %d sector locations found.\n": 11, - "Select the location of your lotus-miner config directory?": 33, - "TODO FINISH THIS FUNCTION\n": 8, - "This interactive tool will walk you through migration of lotus-provider.\nPress Ctrl+C to exit at any time.": 0, - "This step will migrate the configuration from the config.toml to the database.\n": 5, - "This tool confirms each action it does.": 1, - "Use the arrow keys to navigate: ↓ ↑ → ← ": 2, - "Username: %s": 17, - "Verified Sectors in Database": 13, - "Waiting for lotus-miner to write sectors into Yugabyte.": 9, -} - -var enIndex = []uint32{ // 41 elements - // Entry 0 - 1F - 0x00000000, 0x0000006b, 0x00000093, 0x000000c8, - 0x000000e3, 0x00000108, 0x0000015c, 0x000001cc, - 0x00000209, 0x00000228, 0x00000260, 0x00000284, - 0x000002b9, 0x0000031c, 0x00000339, 0x0000039b, - 0x000003a7, 0x000003b3, 0x000003c3, 0x000003d3, - 0x000003e3, 0x0000040a, 0x0000044c, 0x00000470, - 0x00000486, 0x000004a8, 0x000004bf, 0x000004f1, - 0x00000520, 0x00000547, 0x00000579, 0x0000059f, - // Entry 20 - 3F - 0x000005ba, 0x000005d0, 0x0000060a, 0x00000610, - 0x00000652, 0x0000067f, 0x000006cd, 0x000006df, - 0x000006fb, -} // Size: 188 bytes - -const enData string = "" + // Size: 1787 bytes - "\x02This interactive tool will walk you through migration of lotus-provi" + - "der.\x0aPress Ctrl+C to exit at any time.\x02This tool confirms each act" + - "ion it does.\x04\x00\x01 0\x02Use the arrow keys to navigate: ↓ ↑ → ←" + - "\x02Ctrl+C pressed in Terminal\x02Migrating configuration to database." + - "\x04\x00\x01\x0aO\x02This step will migrate the configuration from the c" + - "onfig.toml to the database.\x02A Lotus-Miner cluster shares a database a" + - "nd shares the work of managing multiple Miner IDs and their sectors.\\n" + - "\x04\x00\x01\x0a8\x02Error reading from database: %[1]s. Aborting Migrat" + - "ion.\x04\x00\x01\x0a\x1a\x02TODO FINISH THIS FUNCTION\x02Waiting for lot" + - "us-miner to write sectors into Yugabyte.\x04\x00\x01\x0a\x1f\x02Error ve" + - "rifying sectors: %[1]s\x04\x00\x01\x0a0\x02Sectors verified. %[1]d secto" + - "r locations found.\x04\x00\x01\x0a^\x02Never remove the database info fr" + - "om the config.toml for lotus-miner as it avoids double PoSt.\x02Verified" + - " Sectors in Database\x02Enter the info to connect to your Yugabyte datab" + - "ase installation (https://download.yugabyte.com/)\x02Host: %[1]s\x02Port" + - ": %[1]s\x02Username: %[1]s\x02Password: %[1]s\x02Database: %[1]s\x02Cont" + - "inue to connect and update schema.\x04\x00\x02 \x0a<\x02Database config " + - "error occurred, abandoning migration: %[1]s\x02Enter the Yugabyte databa" + - "se host(s)\x04\x00\x01\x0a\x11\x02No host provided\x02Enter the Yugabyte" + - " database %[1]s\x04\x00\x01\x0a\x12\x02No value provided\x04\x00\x01\x0a" + - "-\x02Error connecting to Yugabyte database: %[1]s\x04\x00\x01\x0a*\x02Co" + - "nnected to Yugabyte. Schema is current.\x04\x00\x01\x0a\x22\x02Error enc" + - "oding config.toml: %[1]s\x04\x00\x01\x0a-\x02Error reading filemode of c" + - "onfig.toml: %[1]s\x04\x00\x01\x0a!\x02Error writing config.toml: %[1]s" + - "\x04\x00\x02 \x0a\x15\x02Restart Lotus Miner.\x02Connected to Yugabyte" + - "\x02Select the location of your lotus-miner config directory?\x02Other" + - "\x02Enter the path to the configuration directory used by lotus-miner" + - "\x04\x00\x02 \x0a'\x02No path provided, abandoning migration\x04\x00\x01" + - "\x0aI\x02Cannot read the config.toml file in the provided directory, Err" + - "or: %[1]s\x02Read Miner Config\x04\x00\x02\x0a\x0a\x16\x02Completed Step" + - ": %[1]s" - -var koIndex = []uint32{ // 41 elements - // Entry 0 - 1F - 0x00000000, 0x0000007f, 0x000000b9, 0x000000b9, - 0x000000da, 0x000000da, 0x000000da, 0x000000da, - 0x000000da, 0x000000da, 0x000000da, 0x00000106, - 0x00000106, 0x0000019b, 0x0000019b, 0x00000209, - 0x0000021a, 0x00000228, 0x00000240, 0x00000254, - 0x0000026e, 0x00000298, 0x000002fc, 0x00000338, - 0x00000367, 0x0000039f, 0x000003c8, 0x00000421, - 0x00000467, 0x000004b3, 0x00000507, 0x0000054a, - // Entry 20 - 3F - 0x0000056f, 0x00000585, 0x000005d4, 0x000005db, - 0x00000636, 0x00000689, 0x000006e8, 0x00000700, - 0x0000071b, -} // Size: 188 bytes - -const koData string = "" + // Size: 1819 bytes - "\x02이 대화형 도구는 로터스 공급자 이주를 안내합니다.\x0a언제든지 종료하려면 Ctrl+C를 누르십시오.\x02이 도구는 수" + - "행하는 각 작업을 확인합니다.\x02터미널에서 Ctrl+C가 눌림\x04\x00\x01\x0a'\x02섹터 확인 중 오류 발생" + - ": %[1]s\x04\x00\x01\x0a\x8f\x01\x02로터스 마이너의 config.toml에서 데이터베이스 정보를 제거하" + - "지 마십시오. 두 번의 PoSt를 피하기 위함입니다.\x02Yugabyte 데이터베이스 설치에 연결할 정보를 입력하십시오 (h" + - "ttps://download.yugabyte.com/)\x02호스트: %[1]s\x02포트: %[1]s\x02사용자 이름: %[1" + - "]s\x02비밀번호: %[1]s\x02데이터베이스: %[1]s\x02계속 연결 및 스키마 업데이트.\x04\x00\x02 \x0a" + - "^\x02데이터베이스 구성 오류가 발생하여 마이그레이션을 포기합니다: %[1]s\x02Yugabyte 데이터베이스 호스트를 입력하" + - "십시오\x04\x00\x01\x0a*\x02호스트가 제공되지 않았습니다\x02Yugabyte 데이터베이스 %[1]s을 입력하십" + - "시오\x04\x00\x01\x0a$\x02값이 제공되지 않았습니다\x04\x00\x01\x0aT\x02Yugabyte 데이터베" + - "이스에 연결하는 중 오류가 발생했습니다: %[1]s\x04\x00\x01\x0aA\x02Yugabyte에 연결되었습니다. 스키" + - "마가 현재입니다.\x04\x00\x01\x0aG\x02config.toml을 인코딩하는 중 오류가 발생했습니다: %[1]s" + - "\x04\x00\x01\x0aO\x02config.toml의 파일 모드를 읽는 중 오류가 발생했습니다: %[1]s\x04\x00" + - "\x01\x0a>\x02config.toml을 쓰는 중 오류가 발생했습니다: %[1]s\x04\x00\x02 \x0a\x1f" + - "\x02로터스 마이너 재시작.\x02Yugabyte에 연결됨\x02로터스 마이너 구성 디렉토리의 위치를 선택하시겠습니까?\x02기" + - "타\x02로터스 마이너에서 사용하는 구성 디렉토리의 경로를 입력하십시오\x04\x00\x02 \x0aM\x02경로가 제공되지 " + - "않았으므로 마이그레이션을 포기합니다\x04\x00\x01\x0aZ\x02제공된 디렉토리에서 config.toml 파일을 읽을 " + - "수 없습니다. 오류: %[1]s\x02마이너 구성 읽기\x04\x00\x02\x0a\x0a\x15\x02단계 완료: %[1]s" - -var zhIndex = []uint32{ // 41 elements - // Entry 0 - 1F - 0x00000000, 0x00000055, 0x00000080, 0x00000080, - 0x00000099, 0x00000099, 0x00000099, 0x00000099, - 0x00000099, 0x00000099, 0x00000099, 0x000000bc, - 0x000000bc, 0x00000121, 0x00000121, 0x0000017b, - 0x0000018a, 0x00000199, 0x000001ab, 0x000001ba, - 0x000001cc, 0x000001eb, 0x00000224, 0x00000249, - 0x0000025e, 0x0000027c, 0x0000028e, 0x000002bf, - 0x000002f1, 0x00000319, 0x0000034d, 0x00000375, - // Entry 20 - 3F - 0x00000396, 0x000003ab, 0x000003db, 0x000003e2, - 0x00000412, 0x00000437, 0x00000480, 0x00000493, - 0x000004ae, -} // Size: 188 bytes - -const zhData string = "" + // Size: 1198 bytes - "\x02此互动工具将引导您完成lotus-provider的迁移。\x0a随时按Ctrl+C退出。\x02此工具确认其执行的每个操作。\x02在" + - "终端中按下Ctrl+C\x04\x00\x01\x0a\x1e\x02验证扇区时出错:%[1]s\x04\x00\x01\x0a`\x02从" + - "config.toml中永远不要删除lotus-miner的数据库信息,因为它避免了双PoSt。\x02输入连接到您的Yugabyte数据库安装" + - "的信息(https://download.yugabyte.com/)\x02主机:%[1]s\x02端口:%[1]s\x02用户名:%[1" + - "]s\x02密码:%[1]s\x02数据库:%[1]s\x02继续连接和更新架构。\x04\x00\x02 \x0a3\x02发生数据库配置错误" + - ",放弃迁移:%[1]s\x02输入Yugabyte数据库主机(S)\x04\x00\x01\x0a\x10\x02未提供主机\x02输入Yu" + - "gabyte数据库 %[1]s\x04\x00\x01\x0a\x0d\x02未提供值\x04\x00\x01\x0a,\x02连接到Yugab" + - "yte数据库时出错:%[1]s\x04\x00\x01\x0a-\x02已连接到Yugabyte。模式是当前的。\x04\x00\x01\x0a" + - "#\x02编码config.toml时出错:%[1]s\x04\x00\x01\x0a/\x02读取config.toml文件模式时出错:%[1" + - "]s\x04\x00\x01\x0a#\x02写入config.toml时出错:%[1]s\x04\x00\x02 \x0a\x1b\x02重新" + - "启动Lotus Miner。\x02已连接到Yugabyte\x02选择您的lotus-miner配置目录的位置?\x02其他\x02输入l" + - "otus-miner使用的配置目录的路径\x04\x00\x02 \x0a\x1f\x02未提供路径,放弃迁移\x04\x00\x01\x0aD" + - "\x02无法读取提供的目录中的config.toml文件,错误:%[1]s\x02读取矿工配置\x04\x00\x02\x0a\x0a\x15" + - "\x02完成步骤:%[1]s" - - // Total table size 5368 bytes (5KiB); checksum: 1762260B diff --git a/provider/address.go b/curiosrc/address.go similarity index 89% rename from provider/address.go rename to curiosrc/address.go index 84a10a5d720..6d1738f2dc3 100644 --- a/provider/address.go +++ b/curiosrc/address.go @@ -1,4 +1,4 @@ -package provider +package curio import ( "golang.org/x/xerrors" @@ -6,11 +6,11 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/provider/multictladdr" ) -func AddressSelector(addrConf []config.LotusProviderAddresses) func() (*multictladdr.MultiAddressSelector, error) { +func AddressSelector(addrConf []config.CurioAddresses) func() (*multictladdr.MultiAddressSelector, error) { return func() (*multictladdr.MultiAddressSelector, error) { as := &multictladdr.MultiAddressSelector{ MinerMap: make(map[address.Address]api.AddressConfig), diff --git a/curiosrc/builder.go b/curiosrc/builder.go new file mode 100644 index 00000000000..9bdd5ce4d84 --- /dev/null +++ b/curiosrc/builder.go @@ -0,0 +1,50 @@ +package curio + +import ( + "context" + "time" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/curiosrc/chainsched" + "github.com/filecoin-project/lotus/curiosrc/message" + "github.com/filecoin-project/lotus/curiosrc/multictladdr" + "github.com/filecoin-project/lotus/curiosrc/window" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/lotus/storage/paths" + "github.com/filecoin-project/lotus/storage/sealer" + "github.com/filecoin-project/lotus/storage/sealer/storiface" +) + +//var log = logging.Logger("curio") + +func WindowPostScheduler(ctx context.Context, fc config.CurioFees, pc config.ProvingConfig, + api api.FullNode, verif storiface.Verifier, lw *sealer.LocalWorker, sender *message.Sender, + as *multictladdr.MultiAddressSelector, addresses map[dtypes.MinerAddress]bool, db *harmonydb.DB, + stor paths.Store, idx paths.SectorIndex, max int) (*window.WdPostTask, *window.WdPostSubmitTask, *window.WdPostRecoverDeclareTask, error) { + + chainSched := chainsched.New(api) + + // todo config + ft := window.NewSimpleFaultTracker(stor, idx, 32, 5*time.Second, 300*time.Second) + + computeTask, err := window.NewWdPostTask(db, api, ft, lw, verif, chainSched, addresses, max) + if err != nil { + return nil, nil, nil, err + } + + submitTask, err := window.NewWdPostSubmitTask(chainSched, sender, db, api, fc.MaxWindowPoStGasFee, as) + if err != nil { + return nil, nil, nil, err + } + + recoverTask, err := window.NewWdPostRecoverDeclareTask(sender, db, api, ft, as, chainSched, fc.MaxWindowPoStGasFee, addresses) + if err != nil { + return nil, nil, nil, err + } + + go chainSched.Run(ctx) + + return computeTask, submitTask, recoverTask, nil +} diff --git a/provider/chainsched/chain_sched.go b/curiosrc/chainsched/chain_sched.go similarity index 77% rename from provider/chainsched/chain_sched.go rename to curiosrc/chainsched/chain_sched.go index 559a0274f29..1aa5d38bb60 100644 --- a/provider/chainsched/chain_sched.go +++ b/curiosrc/chainsched/chain_sched.go @@ -14,29 +14,29 @@ import ( "github.com/filecoin-project/lotus/chain/types" ) -var log = logging.Logger("chainsched") +var log = logging.Logger("curio/chainsched") type NodeAPI interface { ChainHead(context.Context) (*types.TipSet, error) ChainNotify(context.Context) (<-chan []*api.HeadChange, error) } -type ProviderChainSched struct { +type CurioChainSched struct { api NodeAPI callbacks []UpdateFunc started bool } -func New(api NodeAPI) *ProviderChainSched { - return &ProviderChainSched{ +func New(api NodeAPI) *CurioChainSched { + return &CurioChainSched{ api: api, } } type UpdateFunc func(ctx context.Context, revert, apply *types.TipSet) error -func (s *ProviderChainSched) AddHandler(ch UpdateFunc) error { +func (s *CurioChainSched) AddHandler(ch UpdateFunc) error { if s.started { return xerrors.Errorf("cannot add handler after start") } @@ -45,7 +45,7 @@ func (s *ProviderChainSched) AddHandler(ch UpdateFunc) error { return nil } -func (s *ProviderChainSched) Run(ctx context.Context) { +func (s *CurioChainSched) Run(ctx context.Context) { s.started = true var ( @@ -88,7 +88,7 @@ func (s *ProviderChainSched) Run(ctx context.Context) { continue } - ctx, span := trace.StartSpan(ctx, "ProviderChainSched.headChange") + ctx, span := trace.StartSpan(ctx, "CurioChainSched.headChange") s.update(ctx, nil, chg.Val) @@ -97,7 +97,7 @@ func (s *ProviderChainSched) Run(ctx context.Context) { continue } - ctx, span := trace.StartSpan(ctx, "ProviderChainSched.headChange") + ctx, span := trace.StartSpan(ctx, "CurioChainSched.headChange") var lowest, highest *types.TipSet = nil, nil @@ -122,15 +122,15 @@ func (s *ProviderChainSched) Run(ctx context.Context) { } } -func (s *ProviderChainSched) update(ctx context.Context, revert, apply *types.TipSet) { +func (s *CurioChainSched) update(ctx context.Context, revert, apply *types.TipSet) { if apply == nil { - log.Error("no new tipset in window post ProviderChainSched.update") + log.Error("no new tipset in window post CurioChainSched.update") return } for _, ch := range s.callbacks { if err := ch(ctx, revert, apply); err != nil { - log.Errorf("handling head updates in provider chain sched: %+v", err) + log.Errorf("handling head updates in curio chain sched: %+v", err) } } } diff --git a/provider/lpmessage/sender.go b/curiosrc/message/sender.go similarity index 98% rename from provider/lpmessage/sender.go rename to curiosrc/message/sender.go index 0db0c0b5102..21dac7d4c5e 100644 --- a/provider/lpmessage/sender.go +++ b/curiosrc/message/sender.go @@ -1,4 +1,4 @@ -package lpmessage +package message import ( "bytes" @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/lotus/lib/promise" ) -var log = logging.Logger("lpmessage") +var log = logging.Logger("curio/message") var SendLockedWait = 100 * time.Millisecond @@ -187,7 +187,7 @@ func (s *SendTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done b } else { // Note: this handles an unlikely edge-case: // We have previously signed the message but either failed to send it or failed to update the db - // note that when that happens the likely cause is the provider process losing its db connection + // note that when that happens the likely cause is the curio process losing its db connection // or getting killed before it can update the db. In that case the message lock will still be held // so it will be safe to rebroadcast the signed message diff --git a/provider/multictladdr/multiaddresses.go b/curiosrc/multictladdr/multiaddresses.go similarity index 97% rename from provider/multictladdr/multiaddresses.go rename to curiosrc/multictladdr/multiaddresses.go index 4f19477294c..af751ff17e7 100644 --- a/provider/multictladdr/multiaddresses.go +++ b/curiosrc/multictladdr/multiaddresses.go @@ -14,7 +14,7 @@ import ( "github.com/filecoin-project/lotus/storage/ctladdr" ) -var log = logging.Logger("multictladdr") +var log = logging.Logger("curio/multictladdr") type MultiAddressSelector struct { MinerMap map[address.Address]api.AddressConfig diff --git a/provider/lpweb/api/debug/debug.go b/curiosrc/web/api/debug/debug.go similarity index 97% rename from provider/lpweb/api/debug/debug.go rename to curiosrc/web/api/debug/debug.go index 84568451970..c0e89ab8e29 100644 --- a/provider/lpweb/api/debug/debug.go +++ b/curiosrc/web/api/debug/debug.go @@ -1,4 +1,4 @@ -// Package debug provides the API for various debug endpoints in lotus-provider. +// Package debug provides the API for various debug endpoints in curio. package debug import ( @@ -18,10 +18,10 @@ import ( "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/build" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" ) -var log = logging.Logger("lp/web/debug") +var log = logging.Logger("curio/web/debug") type debug struct { *deps.Deps diff --git a/curiosrc/web/api/routes.go b/curiosrc/web/api/routes.go new file mode 100644 index 00000000000..c030f7d531e --- /dev/null +++ b/curiosrc/web/api/routes.go @@ -0,0 +1,13 @@ +// Package api provides the HTTP API for the lotus curio web gui. +package api + +import ( + "github.com/gorilla/mux" + + "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/curiosrc/web/api/debug" +) + +func Routes(r *mux.Router, deps *deps.Deps) { + debug.Routes(r.PathPrefix("/debug").Subrouter(), deps) +} diff --git a/provider/lpweb/hapi/routes.go b/curiosrc/web/hapi/routes.go similarity index 87% rename from provider/lpweb/hapi/routes.go rename to curiosrc/web/hapi/routes.go index b07ab60a57a..d1208860909 100644 --- a/provider/lpweb/hapi/routes.go +++ b/curiosrc/web/hapi/routes.go @@ -8,7 +8,7 @@ import ( logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" ) //go:embed web/* @@ -32,4 +32,4 @@ func Routes(r *mux.Router, deps *deps.Deps) error { return nil } -var log = logging.Logger("lpweb") +var log = logging.Logger("curio/web") diff --git a/provider/lpweb/hapi/simpleinfo.go b/curiosrc/web/hapi/simpleinfo.go similarity index 98% rename from provider/lpweb/hapi/simpleinfo.go rename to curiosrc/web/hapi/simpleinfo.go index ee36a1e1762..e48f573f9a9 100644 --- a/provider/lpweb/hapi/simpleinfo.go +++ b/curiosrc/web/hapi/simpleinfo.go @@ -81,7 +81,7 @@ var templateDev = os.Getenv("LOTUS_WEB_DEV") == "1" func (a *app) executeTemplate(w http.ResponseWriter, name string, data interface{}) { if templateDev { - fs := os.DirFS("./cmd/lotus-provider/web/hapi/web") + fs := os.DirFS("./cmd/curio/web/hapi/web") a.t = template.Must(template.ParseFS(fs, "*")) } if err := a.t.ExecuteTemplate(w, name, data); err != nil { diff --git a/provider/lpweb/hapi/web/actor_summary.gohtml b/curiosrc/web/hapi/web/actor_summary.gohtml similarity index 100% rename from provider/lpweb/hapi/web/actor_summary.gohtml rename to curiosrc/web/hapi/web/actor_summary.gohtml diff --git a/provider/lpweb/hapi/web/chain_rpcs.gohtml b/curiosrc/web/hapi/web/chain_rpcs.gohtml similarity index 100% rename from provider/lpweb/hapi/web/chain_rpcs.gohtml rename to curiosrc/web/hapi/web/chain_rpcs.gohtml diff --git a/provider/lpweb/hapi/web/cluster_machines.gohtml b/curiosrc/web/hapi/web/cluster_machines.gohtml similarity index 100% rename from provider/lpweb/hapi/web/cluster_machines.gohtml rename to curiosrc/web/hapi/web/cluster_machines.gohtml diff --git a/provider/lpweb/hapi/web/cluster_task_history.gohtml b/curiosrc/web/hapi/web/cluster_task_history.gohtml similarity index 100% rename from provider/lpweb/hapi/web/cluster_task_history.gohtml rename to curiosrc/web/hapi/web/cluster_task_history.gohtml diff --git a/provider/lpweb/hapi/web/cluster_tasks.gohtml b/curiosrc/web/hapi/web/cluster_tasks.gohtml similarity index 100% rename from provider/lpweb/hapi/web/cluster_tasks.gohtml rename to curiosrc/web/hapi/web/cluster_tasks.gohtml diff --git a/provider/lpweb/srv.go b/curiosrc/web/srv.go similarity index 84% rename from provider/lpweb/srv.go rename to curiosrc/web/srv.go index f6bcfcf85bf..0f88b270276 100644 --- a/provider/lpweb/srv.go +++ b/curiosrc/web/srv.go @@ -1,5 +1,5 @@ -// Package lpweb defines the HTTP web server for static files and endpoints. -package lpweb +// Package web defines the HTTP web server for static files and endpoints. +package web import ( "context" @@ -16,10 +16,10 @@ import ( "github.com/gorilla/mux" "go.opencensus.io/tag" - "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/curiosrc/web/api" + "github.com/filecoin-project/lotus/curiosrc/web/hapi" "github.com/filecoin-project/lotus/metrics" - "github.com/filecoin-project/lotus/provider/lpweb/api" - "github.com/filecoin-project/lotus/provider/lpweb/hapi" ) //go:embed static @@ -43,7 +43,7 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) { var static fs.FS = static if webDev { - basePath = "cmd/lotus-provider/web/static" + basePath = "cmd/curio/web/static" static = os.DirFS(basePath) } @@ -74,7 +74,7 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) { return &http.Server{ Handler: http.HandlerFunc(mx.ServeHTTP), BaseContext: func(listener net.Listener) context.Context { - ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-provider")) + ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "curio")) return ctx }, Addr: deps.Cfg.Subsystems.GuiAddress, diff --git a/provider/lpweb/static/chain-connectivity.js b/curiosrc/web/static/chain-connectivity.js similarity index 100% rename from provider/lpweb/static/chain-connectivity.js rename to curiosrc/web/static/chain-connectivity.js diff --git a/provider/lpweb/static/index.html b/curiosrc/web/static/index.html similarity index 97% rename from provider/lpweb/static/index.html rename to curiosrc/web/static/index.html index 98f7336ade5..11cb90f6def 100644 --- a/provider/lpweb/static/index.html +++ b/curiosrc/web/static/index.html @@ -1,6 +1,6 @@ - Lotus Provider Cluster Overview + Curio Cluster Overview + - - - - -
Loading...
+
+
+
+ + + + +
Loading...
+
+
+