From 6dff614fa703bd3f415044b9e576dd9a36f224b6 Mon Sep 17 00:00:00 2001 From: Mantas Domasevicius Date: Wed, 18 Mar 2026 09:50:19 +0200 Subject: [PATCH 1/3] Replace broken fallback rpc url Signed-off-by: Mantas Domasevicius --- metadata/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/network.go b/metadata/network.go index 57f642ef1..4f0c517c9 100644 --- a/metadata/network.go +++ b/metadata/network.go @@ -87,7 +87,7 @@ var MainnetDefinition = NetworkDefinition{ MystAddress: "0x1379e8886a944d2d9d440b3d88df536aea08d9f3", EtherClientRPC: []string{ "https://polygon1.mysterium.network/", - "https://polygon-rpc.com/", + "https://polygon.drpc.org", }, KnownHermeses: []string{ "0xa62a2a75949d25e17c6f08a7818e7be97c18a8d2", From 3c85aebc9c74417abf0280f7eb18d2a31fd0a5c3 Mon Sep 17 00:00:00 2001 From: Mantas Domasevicius Date: Wed, 18 Mar 2026 10:18:51 +0200 Subject: [PATCH 2/3] Update DNS map Signed-off-by: Mantas Domasevicius --- metadata/network.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/metadata/network.go b/metadata/network.go index 4f0c517c9..fd57b0232 100644 --- a/metadata/network.go +++ b/metadata/network.go @@ -99,15 +99,15 @@ var MainnetDefinition = NetworkDefinition{ PilvytisAddress: "https://pilvytis.mysterium.network", ObserverAddress: "https://observer.mysterium.network", DNSMap: map[string][]string{ - "discovery.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81"}, - "trust.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81"}, - "broker.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81"}, + "discovery.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", "46.224.211.253", "188.245.149.150"}, + "trust.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", "46.224.211.253", "188.245.149.150"}, + "broker.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", "46.224.211.253", "188.245.149.150"}, "transactor.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", - "51.158.204.23", "51.158.204.75", "51.158.204.9", "51.158.204.30"}, // remove after the migration is complete - "affiliator.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81"}, + "51.158.204.23", "51.158.204.75", "51.158.204.9", "51.158.204.30", "46.224.211.253", "188.245.149.150"}, // remove after the migration is complete + "affiliator.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", "46.224.211.253", "188.245.149.150"}, "pilvytis.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", - "51.158.204.23", "51.158.204.75", "51.158.204.9", "51.158.204.30"}, // remove after the migration is complete - "observer.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81"}, + "51.158.204.23", "51.158.204.75", "51.158.204.9", "51.158.204.30", "46.224.211.253", "188.245.149.150"}, // remove after the migration is complete + "observer.mysterium.network": {"159.69.15.34", "159.69.244.241", "116.203.130.98", "49.12.244.81", "46.224.211.253", "188.245.149.150"}, }, DefaultChainID: 137, DefaultCurrency: "MYST", From ece1be37083e50f6f37d999fe9212aa6f97ee57f Mon Sep 17 00:00:00 2001 From: Mantas Domasevicius Date: Wed, 18 Mar 2026 10:53:46 +0200 Subject: [PATCH 3/3] Use older version of goimports for go1.24.x Signed-off-by: Mantas Domasevicius --- ci/check/check.go | 3 +- ci/check/go_imports.go | 108 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 ci/check/go_imports.go diff --git a/ci/check/check.go b/ci/check/check.go index 2022e81c5..b2bcf580b 100644 --- a/ci/check/check.go +++ b/ci/check/check.go @@ -27,7 +27,6 @@ import ( "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" - "github.com/mysteriumnetwork/go-ci/commands" "github.com/mysteriumnetwork/go-ci/util" "github.com/mysteriumnetwork/node/ci/packages" @@ -60,7 +59,7 @@ func CheckGoVet() error { // CheckGoImports checks for issues with go imports. func CheckGoImports() error { - return commands.GoImportsD(".", "pb", "tequilapi/endpoints/assets") + return GoImportsD(".", "pb", "tequilapi/endpoints/assets") } // CheckSwagger checks whether swagger spec at "tequilapi/docs/swagger.json" is valid against swagger specification 2.0. diff --git a/ci/check/go_imports.go b/ci/check/go_imports.go new file mode 100644 index 000000000..db28d5ddb --- /dev/null +++ b/ci/check/go_imports.go @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2026 The "MysteriumNetwork/node" Authors. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package check + +import ( + "errors" + "fmt" + "go/build" + "os" + "path" + "strings" + + "github.com/magefile/mage/mg" + "github.com/magefile/mage/sh" + "github.com/mysteriumnetwork/go-ci/shell" + "github.com/mysteriumnetwork/go-ci/util" +) + +// GoImportsD checks for issues with go imports. +// +// Instead of packages, it operates on directories, thus it is compatible with gomodules outside GOPATH. +// +// Example: +// +// commands.GoImportsD(".", "docs") +func GoImportsD(dir string, excludes ...string) error { + mg.Deps(GetImports) + goimportsBin, err := util.GetGoBinaryPath("goimports") + if err != nil { + fmt.Println("❌ GoImports") + fmt.Println("Tool 'goimports' not found") + return err + } + var allExcludes []string + allExcludes = append(allExcludes, excludes...) + allExcludes = append(allExcludes, util.GoLintExcludes()...) + dirs, err := util.GetProjectFileDirectories(allExcludes) + if err != nil { + return err + } + out, err := shell.NewCmd(goimportsBin + " -e -l -d " + strings.Join(dirs, " ")).Output() + if err != nil { + fmt.Println("❌ GoImports") + fmt.Println("goimports: error executing") + return err + } + if len(out) != 0 { + fmt.Println("❌ GoImports") + fmt.Println("goimports: the following files contain go import errors:") + fmt.Println(out) + return errors.New("goimports: not all imports follow the goimports format") + } + fmt.Println("✅ GoImports") + return nil +} + +// GetGoPath returns the go path +func GetGoPath() string { + gopath := os.Getenv("GOPATH") + if gopath == "" { + gopath = build.Default.GOPATH + } + return gopath +} + +// GetGoBinaryPath looks for the given binary in path, if not checks if it's in $GOPATH/bin +func GetGoBinaryPath(binaryName string) (string, error) { + res, err := sh.Output("which", binaryName) + if err == nil { + return res, nil + } + gopath := GetGoPath() + binaryUnderGopath := path.Join(gopath, "bin", binaryName) + if _, err := os.Stat(binaryUnderGopath); os.IsNotExist(err) { + return "", err + } + return binaryUnderGopath, nil +} + +// GetImports installs goimports binary. +func GetImports() error { + path, _ := GetGoBinaryPath("goimports") + if path != "" { + fmt.Println("Tool 'goimports' already installed") + return nil + } + err := sh.RunV("go", "install", "golang.org/x/tools/cmd/goimports@v0.41.0") + if err != nil { + fmt.Println("Could not go get goimports") + return err + } + return nil +}