From 6a08379034a3020b63924c235224cbe496770250 Mon Sep 17 00:00:00 2001 From: Moses Narrow Date: Fri, 4 Oct 2024 11:19:51 -0500 Subject: [PATCH] update deps --- go.mod | 6 +- go.sum | 37 +++- .../github.com/skycoin/skywire/.golangci.yml | 6 +- .../github.com/skycoin/skywire/CHANGELOG.md | 21 +++ vendor/github.com/skycoin/skywire/Makefile | 23 ++- vendor/github.com/skycoin/skywire/README.md | 11 ++ .../skycoin/skywire/dmsghttp-config.json | 110 +++++------- .../skycoin/skywire/mainnet_rules.md | 14 +- .../skywire/pkg/app/appcommon/hello.go | 2 +- .../skywire/pkg/app/appdisc/factory.go | 13 +- .../skycoin/skywire/pkg/app/appserver/proc.go | 3 +- .../skywire/pkg/app/appserver/proc_manager.go | 2 +- .../skywire/pkg/router/network_stats.go | 2 +- .../skycoin/skywire/pkg/router/route_group.go | 12 +- .../skycoin/skywire/pkg/router/router.go | 9 +- .../router/setupmetrics/victoria_metrics.go | 2 +- .../skycoin/skywire/pkg/routing/packet.go | 4 +- .../skycoin/skywire/pkg/routing/rule.go | 2 +- .../skycoin/skywire/pkg/routing/table.go | 2 +- .../skycoin/skywire/pkg/servicedisc/types.go | 2 +- .../skywire/pkg/transport/handshake.go | 2 +- .../transport/network/handshake/handshake.go | 5 +- .../skycoin/skywire/pkg/visor/hypervisor.go | 6 +- .../skycoin/skywire/pkg/visor/init.go | 14 +- .../skywire/pkg/visor/visorconfig/config.go | 67 ++++--- .../pkg/visor/visorconfig/hypervisorconfig.go | 44 +++-- .../skywire/pkg/visor/visorconfig/services.go | 8 +- .../skywire/pkg/visor/visorconfig/v1.go | 6 +- .../skycoin/skywire/services-config.json | 168 ++++++++---------- vendor/github.com/skycoin/skywire/skywire.go | 1 - vendor/modules.txt | 8 +- 31 files changed, 346 insertions(+), 266 deletions(-) diff --git a/go.mod b/go.mod index 048195d1..6c2e0d89 100644 --- a/go.mod +++ b/go.mod @@ -23,8 +23,8 @@ require ( github.com/json-iterator/go v1.1.12 github.com/rs/cors v1.8.2 github.com/sirupsen/logrus v1.9.3 - github.com/skycoin/dmsg v1.3.26-0.20240924024628-ed5195787d40 - github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 + github.com/skycoin/dmsg v1.3.28 + github.com/skycoin/skywire v1.3.28 github.com/skycoin/skywire-utilities v1.3.25 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 github.com/spf13/cobra v1.7.0 @@ -119,7 +119,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/quic-go/quic-go v0.42.0 // indirect github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 // indirect - github.com/skycoin/skycoin v0.27.1 // indirect + github.com/skycoin/skycoin v0.28.0 // indirect github.com/skycoin/systray v1.10.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect diff --git a/go.sum b/go.sum index 93bc362e..a3b103c5 100644 --- a/go.sum +++ b/go.sum @@ -17,17 +17,21 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/metrics v1.24.0 h1:ILavebReOjYctAGY5QU2F9X0MYvkcrG3aEn2RKa1Zkw= github.com/VictoriaMetrics/metrics v1.24.0/go.mod h1:eFT25kvsTidQFHb6U0oa0rTrDRdz4xTYjpL8+UPohys= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/bitfield/script v0.22.1 h1:DphxoC5ssYciwd0ZS+N0Xae46geAD/0mVWh6a2NUxM4= github.com/bitfield/script v0.22.1/go.mod h1:fv+6x4OzVsRs6qAlc7wiGq8fq1b5orhtQdtW0dwjUHI= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.0 h1:qtNZduETEIWJVIyDl01BeNxur2rW9OwTQ/yBqFRkKEk= github.com/bytedance/sonic v1.10.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029 h1:POmUHfxXdeyM8Aomg4tKDcwATCFuW+cYLkj6pwsw9pc= github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029/go.mod h1:Rpr5n9cGHYdM3S3IK8ROSUUUYjQOu+MSUCZDcJbYWi8= +github.com/cenkalti/backoff v1.1.0/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -304,6 +308,7 @@ github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZY github.com/klauspost/reedsolomon v1.11.8 h1:s8RpUW5TK4hjr+djiOpbZJB4ksx+TdYbRH7vHQpwPOY= github.com/klauspost/reedsolomon v1.11.8/go.mod h1:4bXRN+cVzMdml6ti7qLouuYi32KHJ5MGv0Qd8a47h6A= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -324,11 +329,13 @@ github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -336,10 +343,12 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -375,6 +384,7 @@ github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXX github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -383,22 +393,25 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skycoin/dmsg v1.3.26-0.20240924024628-ed5195787d40 h1:GKUDgXHWahO45dDuivC36h6rRVfg6R02d8oDhQp2t74= -github.com/skycoin/dmsg v1.3.26-0.20240924024628-ed5195787d40/go.mod h1:qfF8cAig3JHLAojmfYEWn8ttV4aHsiitkZeD1TH8Wrg= +github.com/skycoin/dmsg v1.3.28 h1:zpQwkCJ0/hmlVb9wTQZDOTl/bC9e1Hsxh7Q6/jHG+4I= +github.com/skycoin/dmsg v1.3.28/go.mod h1:AxsiUhS7FpllJv/gHO/OlI3mGyeznIp9zitXwKWQXeQ= +github.com/skycoin/encodertest v0.0.0-20190217072920-14c2e31898b9/go.mod h1:OQz8NXVJUWEw7PWYASZ/1BIw5GXgVMTGvrCGDlZa9+k= github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0duwyG+7WliWz5u9kgk1h5MnLuA= github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:UXghlricA7J3aRD/k7p/zBObQfmBawwCxIVPVjz2Q3o= -github.com/skycoin/skycoin v0.27.1 h1:HatxsRwVSPaV4qxH6290xPBmkH/HgiuAoY2qC+e8C9I= -github.com/skycoin/skycoin v0.27.1/go.mod h1:78nHjQzd8KG0jJJVL/j0xMmrihXi70ti63fh8vXScJw= -github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 h1:3OFs/rnlDZYmhRGOEZq0wZk1LC45/UZTRpFXVDJ2lSA= -github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1/go.mod h1:jsyaaHXEIEDcbTcceUTIi23BZAYXqBDhk/tjRnfCUs4= +github.com/skycoin/skycoin v0.28.0 h1:0TN2tsU8CbCnGANKKxMr4jcG8RuBa8hWREeYtjDDtlk= +github.com/skycoin/skycoin v0.28.0/go.mod h1:E9RvlMn8iQGX/upaIQvkHHcw/180JBqAQbRIzkLrkSQ= +github.com/skycoin/skywire v1.3.28 h1:CWg/GE2WV68TvPoIn2edqdq/pfu3a96hJF12ofNKb8U= +github.com/skycoin/skywire v1.3.28/go.mod h1:zmOIJReAmueQ6HHp6SbwCSWCS/CXBLpJN2LcWgnXsFI= github.com/skycoin/skywire-utilities v1.3.25 h1:mk8dUonFdhVopFF3d9wbOyXXoiuAO+mN1y+ve6SzgX4= github.com/skycoin/skywire-utilities v1.3.25/go.mod h1:yFKWpL1bDRPKU3uK+cTF4PnYUMe+eyIj5N2bk4sF5Cw= github.com/skycoin/systray v1.10.0 h1:fQZJHMylpVvfmOOTLvUssfyHVDoC8Idx6Ba2BlLEuGg= @@ -409,15 +422,19 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -451,6 +468,7 @@ github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= github.com/tkrajina/gpxgo v1.1.2 h1:il6rjS6IGm3yqa/yr7+fKBlF3ufWDEPZrYi/kxI1Jv0= github.com/tkrajina/gpxgo v1.1.2/go.mod h1:795sjVRFo5wWyN6oOZp0RYienGGBJjpAlgOz2nCngA0= +github.com/toqueteos/webbrowser v1.1.0/go.mod h1:Hqqqmzj8AHn+VlZyVjaRWY20i25hoOZGAABCcg2el4A= github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= @@ -460,6 +478,7 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8= github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ= @@ -496,6 +515,8 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -530,6 +551,7 @@ golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -560,6 +582,8 @@ golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -679,6 +703,7 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/vendor/github.com/skycoin/skywire/.golangci.yml b/vendor/github.com/skycoin/skywire/.golangci.yml index a34efe31..60bac573 100644 --- a/vendor/github.com/skycoin/skywire/.golangci.yml +++ b/vendor/github.com/skycoin/skywire/.golangci.yml @@ -45,7 +45,7 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" - format: colored-line-number + formats: colored-line-number # print lines of code with issue, default is true print-issued-lines: true @@ -66,8 +66,7 @@ linters-settings: check-blank: true govet: # report about shadowed variables - check-shadowing: true - + shadow: true # Obtain type information from installed (to $GOPATH/pkg) package files: # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages # before analyzing them. @@ -160,7 +159,6 @@ linters: - ineffassign - typecheck - gosec - - megacheck - misspell - nakedret enable-all: false diff --git a/vendor/github.com/skycoin/skywire/CHANGELOG.md b/vendor/github.com/skycoin/skywire/CHANGELOG.md index b520af21..1a2f050c 100644 --- a/vendor/github.com/skycoin/skywire/CHANGELOG.md +++ b/vendor/github.com/skycoin/skywire/CHANGELOG.md @@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. updates may be generated with `scripts/changelog.sh ` +## 1.3.26 + +- Embed Deployment Configuration [#1873](https://github.com/skycoin/skywire/pull/1873) +- Remove hardcoded services [#1872](https://github.com/skycoin/skywire/pull/1872) +- Update dmsg server ip address in dmsghttp-config.json [#1868](https://github.com/skycoin/skywire/pull/1868) + +## 1.3.25 + +- update skywire-services and skycoin-service-discovery to v1.3.25 [#1864](https://github.com/skycoin/skywire/pull/1864) +- make ready for v1.3.25 [#1863](https://github.com/skycoin/skywire/pull/1863) +- update skywire-utilties [#1862](https://github.com/skycoin/skywire/pull/1862) +- Update Reward Calculation [#1859](https://github.com/skycoin/skywire/pull/1859) + +## 1.3.24 + +- fix Windows installer script [#1858](https://github.com/skycoin/skywire/pull/1858) +- fix reward calculation [#1857](https://github.com/skycoin/skywire/pull/1857) +- fix survey & reward calculation [#1856](https://github.com/skycoin/skywire/pull/1856) +- Fix IP issue on survey [#1855](https://github.com/skycoin/skywire/pull/1855) +- Fix skywire cli log / update dmsg dep [#1853](https://github.com/skycoin/skywire/pull/1853) +- add windows arm64 archive to release [#1852](https://github.com/skycoin/skywire/pull/1852) ## 1.3.23 diff --git a/vendor/github.com/skycoin/skywire/Makefile b/vendor/github.com/skycoin/skywire/Makefile index e95a5d78..917533f0 100644 --- a/vendor/github.com/skycoin/skywire/Makefile +++ b/vendor/github.com/skycoin/skywire/Makefile @@ -97,6 +97,18 @@ date: commit: @echo $(COMMIT) +services: ## update services-config.json + scripts/services.sh + +dig-services: ## show IP addresses for the services + scripts/dig-services.sh + +dmsghttp: ## update dmsghttp-config.json + scripts/dmsghttp.sh + +count-dmsg-disc-entries: + curl -sL $(jq -r '.prod.dmsg_discovery' services-config.json)/dmsg-discovery/entries | jq '. | length' + check: lint check-cg test ## Run linters and tests check-cg: ## Cursory check of the main help menu, offline dmsghttp config gen and offline config gen @@ -129,6 +141,8 @@ build-merged-windows: clean-windows install-system-linux: build ## Install apps and binaries over those provided by the linux package - linux package must be installed first! sudo echo "sudo cache" sudo install -Dm755 $(BUILD_PATH)skywire /opt/skywire/bin/ + sudo install -Dm644 services-config.json /opt/skywire/ + sudo install -Dm644 dmsghttp-config.json /opt/skywire/ install-generate: ## Installs required execs for go generate. @@ -158,7 +172,10 @@ install-static: ## Install `skywire-visor`, `skywire-cli`, `setup-node` lint: ## Run linters. Use make install-linters first golangci-lint --version - ${OPTS} golangci-lint run -c .golangci.yml ./... + ${OPTS} golangci-lint run -c .golangci.yml skywire.go #break down the linter run over smaller sections of the source code + ${OPTS} golangci-lint run -c .golangci.yml ./cmd/... + ${OPTS} golangci-lint run -c .golangci.yml ./pkg/... + ${OPTS} golangci-lint run -c .golangci.yml ./... lint-windows: ## Run linters. Use make install-linters-windows first powershell 'golangci-lint --version' @@ -360,8 +377,8 @@ windows-installer-release: gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-windows-386.msi # useful commands -dmsghttp-update: ## update dmsghttp config - go run cmd/skywire/skywire.go cli config update dmsghttp -p dmsghttp-config.json +#dmsghttp-update: ## update dmsghttp config +# go run cmd/skywire/skywire.go cli config update dmsghttp -p dmsghttp-config.json help: ## `make help` menu @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/vendor/github.com/skycoin/skywire/README.md b/vendor/github.com/skycoin/skywire/README.md index bde281b9..f5cbf795 100644 --- a/vendor/github.com/skycoin/skywire/README.md +++ b/vendor/github.com/skycoin/skywire/README.md @@ -549,3 +549,14 @@ yay --mflags " -p git.PKGBUILD " -S skywire 6. [ ̶I̶s̶s̶u̶e̶ ̶a̶ ̶p̶e̶r̶s̶o̶n̶a̶l̶ ̶G̶i̶t̶H̶u̶b̶ ̶a̶c̶c̶e̶s̶s̶ ̶t̶o̶k̶e̶n̶.̶](https://github.com/settings/tokens) 7. ̶R̶u̶n̶ ̶`̶G̶I̶T̶H̶U̶B̶_̶T̶O̶K̶E̶N̶=̶y̶o̶u̶r̶_̶t̶o̶k̶e̶n̶ ̶m̶a̶k̶e̶ ̶g̶i̶t̶h̶u̶b̶-̶r̶e̶l̶e̶a̶s̶e̶`̶ 8. [Check the created GitHub release.](https://github.com/skycoin/skywire/releases/) + + +## Dependency Graph + +made with [goda](https://github.com/loov/goda) + +``` +goda graph github.com/skycoin/skywire/... | dot -Tsvg -o docs/skywire-goda-graph.svg +``` + +![Dependency Graph](docs/skywire-goda-graph.svg "github.com/skycoin/skywire Dependency Graph") diff --git a/vendor/github.com/skycoin/skywire/dmsghttp-config.json b/vendor/github.com/skycoin/skywire/dmsghttp-config.json index b9d54bdc..e677a92d 100644 --- a/vendor/github.com/skycoin/skywire/dmsghttp-config.json +++ b/vendor/github.com/skycoin/skywire/dmsghttp-config.json @@ -1,76 +1,64 @@ { - "test": { - "dmsg_servers": [ + "test": { + "dmsg_servers": [ { - "static": "024716428e6315d954356e9ad72bea32bb2b41aab5a54a9b5cb4313964016e64d8", - "server": { - "address": "139.144.183.24:30080" - } - }, - { - "static": "0228af3fd99c8d86a882495c8e0202bdd4da78c69e013065d8634286dd4a0ac098", - "server": { - "address": "139.162.55.79:30084" - } - }, - { - "static": "03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5", - "server": { - "address": "170.187.228.44:30083" - } + "static": "024716428e6315d954356e9ad72bea32bb2b41aab5a54a9b5cb4313964016e64d8", + "server": { + "address": "139.144.183.24:30080" + } } - ], - "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", - "transport_discovery": "dmsg://02703cf828ea11d25b2c8eb0796132ecc7e53b22325b20ce3674ce5cd8693e4fb6:80", - "address_resolver": "dmsg://030eb7d8cf6eac40c19bbc433de6d6b9bb7a47f2e1d7095c6a01aa676471670ad2:80", - "route_finder": "dmsg://02ece5b69eaee13ef967b7eb67ca93f1dfddad3a51c9cb1808c4bd0d8d8aa32053:80", - "uptime_tracker": "dmsg://022c788cca11f208cdfd83ed0c2a8c7b661221736c461adc7c6738a2c1b041c7f8:80", - "service_discovery": "dmsg://038f751df4af75fb3d51f6693602bfe8289145e633ffdd1e67d686bea595f84d55:80" - }, - "prod": { - "dmsg_servers": [ + ], + "dmsg_discovery": "dmsg://024a7b9b7db1626d46777e5c665333afa57f48934b57652305fc7a2b19dc4c65d4:80", + "transport_discovery": "dmsg://02703cf828ea11d25b2c8eb0796132ecc7e53b22325b20ce3674ce5cd8693e4fb6:80", + "address_resolver": "dmsg://030eb7d8cf6eac40c19bbc433de6d6b9bb7a47f2e1d7095c6a01aa676471670ad2:80", + "route_finder": "dmsg://02ece5b69eaee13ef967b7eb67ca93f1dfddad3a51c9cb1808c4bd0d8d8aa32053:80", + "uptime_tracker": "dmsg://022c788cca11f208cdfd83ed0c2a8c7b661221736c461adc7c6738a2c1b041c7f8:80", + "service_discovery": "dmsg://038f751df4af75fb3d51f6693602bfe8289145e633ffdd1e67d686bea595f84d55:80" + }, + "prod": { + "dmsg_servers": [ { - "static": "0371ab4bcff7b121f4b91f6856d6740c6f9dc1fe716977850aeb5d84378b300a13", - "server": { - "address": "139.162.160.227:30087" - } + "static": "0371ab4bcff7b121f4b91f6856d6740c6f9dc1fe716977850aeb5d84378b300a13", + "server": { + "address": "139.162.160.227:30087" + } }, { - "static": "030c83534af1041aee60c2f124b682a9d60c6421876db7c67fc83a73c5effdbd96", - "server": { - "address": "188.121.99.59:8081" - } + "static": "030c83534af1041aee60c2f124b682a9d60c6421876db7c67fc83a73c5effdbd96", + "server": { + "address": "188.121.99.59:8081" + } }, { - "static": "0326978f5a53aff537dbb47fed58b1f123af3b00132d365f1309a14db4168dcff7", - "server": { - "address": "70.121.23.42:9083" - } + "static": "0326978f5a53aff537dbb47fed58b1f123af3b00132d365f1309a14db4168dcff7", + "server": { + "address": "70.121.13.123:9083" + } }, { - "static": "0281a102c82820e811368c8d028cf11b1a985043b726b1bcdb8fce89b27384b2cb", - "server": { - "address": "139.162.160.227:30086" - } + "static": "0281a102c82820e811368c8d028cf11b1a985043b726b1bcdb8fce89b27384b2cb", + "server": { + "address": "139.162.160.227:30086" + } }, { - "static": "03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5", - "server": { - "address": "170.187.228.44:30083" - } + "static": "03717576ada5b1744e395c66c2bb11cea73b0e23d0dcd54422139b1a7f12e962c4", + "server": { + "address": "139.162.173.101:30083" + } }, { - "static": "0228af3fd99c8d86a882495c8e0202bdd4da78c69e013065d8634286dd4a0ac098", - "server": { - "address": "170.187.228.178:30084" - } + "static": "02a2d4c346dabd165fd555dfdba4a7f4d18786fe7e055e562397cd5102bdd7f8dd", + "server": { + "address": "139.162.173.101:30082" + } } - ], - "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", - "transport_discovery": "dmsg://02b307aee5c8ce1666c63891f8af25ad2f0a47a243914c963942b3ba35b9d095ae:80", - "address_resolver": "dmsg://03234b2ee4128d1f78c180d06911102906c80795dfe41bd6253f2619c8b6252a02:80", - "route_finder": "dmsg://039d89c5eedfda4a28b0c58b0b643eff949f08e4f68c8357278081d26f5a592d74:80", - "uptime_tracker": "dmsg://022c424caa6239ba7d1d9d8f7dab56cd5ec6ae2ea9ad97bb94ad4b48f62a540d3f:80", - "service_discovery": "dmsg://0204890f9def4f9a5448c2e824c6a4afc85fd1f877322320898fafdf407cc6fef7:80" - } - } + ], + "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", + "transport_discovery": "dmsg://02b307aee5c8ce1666c63891f8af25ad2f0a47a243914c963942b3ba35b9d095ae:80", + "address_resolver": "dmsg://03234b2ee4128d1f78c180d06911102906c80795dfe41bd6253f2619c8b6252a02:80", + "route_finder": "dmsg://039d89c5eedfda4a28b0c58b0b643eff949f08e4f68c8357278081d26f5a592d74:80", + "uptime_tracker": "dmsg://022c424caa6239ba7d1d9d8f7dab56cd5ec6ae2ea9ad97bb94ad4b48f62a540d3f:80", + "service_discovery": "dmsg://0204890f9def4f9a5448c2e824c6a4afc85fd1f877322320898fafdf407cc6fef7:80" + } +} diff --git a/vendor/github.com/skycoin/skywire/mainnet_rules.md b/vendor/github.com/skycoin/skywire/mainnet_rules.md index da4f7733..68e8d5df 100644 --- a/vendor/github.com/skycoin/skywire/mainnet_rules.md +++ b/vendor/github.com/skycoin/skywire/mainnet_rules.md @@ -54,7 +54,7 @@ A total of up to ~1114.754 Skycoin are distributed daily in leap-years. To receive Skycoin rewards for running skywire, the following requirements must be met: -* 1) **Minimum skywire version v1.3.25** - Cutoff September 1st 2024 +* 1) **Minimum skywire version v1.3.26** - Cutoff October 1st 2024 * 2) **75% [uptime](#uptime) per day** minimum is required to be eligible to receive rewards @@ -109,11 +109,6 @@ skywire visor -v The update deadlines specify the version of software required as of (i.e. on or before) the specified date in order to maintain reward eligibility: -**Reward eligibility after 7-1-2024 requires Skywire v1.3.23** - -Requirement established 6-25-2024 - -Rewards Cutoff date for updating 7-1-2024 **Reward eligibility after 9-1-2024 requires Skywire v1.3.25** @@ -121,6 +116,11 @@ Requirement established 8-21-2024 Rewards Cutoff date for updating 9-1-2024 +**Reward eligibility after 10-1-2024 requires Skywire v1.3.26** + +Requirement established 9-24-2024 + +Rewards Cutoff date for updating 10-1-2024 ### Deployment @@ -431,4 +431,4 @@ The following hardware is eligible for rewards: #### ZTE - ZXV10 B860H -**If you would like to use other boards please contact the team first for approval ; only the boards on the list are guaranteed to be eligible for rewards.** +~~If you would like to use other boards please contact the team first for approval ; only the boards on the list are guaranteed to be eligible for rewards.~~ diff --git a/vendor/github.com/skycoin/skywire/pkg/app/appcommon/hello.go b/vendor/github.com/skycoin/skywire/pkg/app/appcommon/hello.go index 807d73ec..a648d15d 100644 --- a/vendor/github.com/skycoin/skywire/pkg/app/appcommon/hello.go +++ b/vendor/github.com/skycoin/skywire/pkg/app/appcommon/hello.go @@ -63,7 +63,7 @@ func WriteHello(w io.Writer, hello Hello) error { raw := make([]byte, 2+len(helloRaw)) size := len(helloRaw) - binary.BigEndian.PutUint16(raw[:2], uint16(size)) + binary.BigEndian.PutUint16(raw[:2], uint16(size)) //nolint if n := copy(raw[2:], helloRaw); n != size { panic("hello write does not add up") } diff --git a/vendor/github.com/skycoin/skywire/pkg/app/appdisc/factory.go b/vendor/github.com/skycoin/skywire/pkg/app/appdisc/factory.go index 9ac8548f..9b193610 100644 --- a/vendor/github.com/skycoin/skywire/pkg/app/appdisc/factory.go +++ b/vendor/github.com/skycoin/skywire/pkg/app/appdisc/factory.go @@ -2,13 +2,14 @@ package appdisc import ( + "encoding/json" "net/http" "github.com/sirupsen/logrus" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/logging" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/servicedisc" "github.com/skycoin/skywire/pkg/skyenv" @@ -31,7 +32,15 @@ func (f *Factory) setDefaults() { f.Log = logging.MustGetLogger("appdisc") } if f.ServiceDisc == "" { - f.ServiceDisc = utilenv.ServiceDiscAddr + var envServices skywire.EnvServices + var services skywire.Services + var sdURL string + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err == nil { + if err := json.Unmarshal(envServices.Prod, &services); err == nil { + sdURL = services.ServiceDiscovery + } + } + f.ServiceDisc = sdURL } } diff --git a/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc.go b/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc.go index cd6d0d0b..96b6f9d2 100644 --- a/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc.go +++ b/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc.go @@ -439,7 +439,8 @@ func (p *Proc) ConnectionsSummary() []ConnectionSummary { } var summaries []ConnectionSummary - rpcGW.cm.DoRange(func(id uint16, v interface{}) bool { + // rpcGW.cm.DoRange(func(id uint16, v interface{}) bool { + rpcGW.cm.DoRange(func(_ uint16, v interface{}) bool { if v == nil { summaries = append(summaries, ConnectionSummary{}) return true diff --git a/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc_manager.go b/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc_manager.go index 357dde3b..b79e6278 100644 --- a/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc_manager.go +++ b/vendor/github.com/skycoin/skywire/pkg/app/appserver/proc_manager.go @@ -221,7 +221,7 @@ func (m *procManager) Start(conf appcommon.ProcConfig) (appcommon.ProcID, error) return 0, err } delete(m.errors, conf.AppName) - return appcommon.ProcID(proc.cmd.Process.Pid), nil + return appcommon.ProcID(proc.cmd.Process.Pid), nil //nolint } // Register registers a proc for an external app. diff --git a/vendor/github.com/skycoin/skywire/pkg/router/network_stats.go b/vendor/github.com/skycoin/skywire/pkg/router/network_stats.go index f954ec2a..c151e3ef 100644 --- a/vendor/github.com/skycoin/skywire/pkg/router/network_stats.go +++ b/vendor/github.com/skycoin/skywire/pkg/router/network_stats.go @@ -32,7 +32,7 @@ func (s *networkStats) SetLatency(latency uint32) { func (s *networkStats) Latency() time.Duration { latencyMs := atomic.LoadUint32(&s.latency) // the latency is store in uint32 of millisecond but time.Duration takes nanosecond - return time.Duration(latencyMs * uint32(time.Millisecond.Nanoseconds())) + return time.Duration(latencyMs * uint32(time.Millisecond.Nanoseconds())) //nolint } func (s *networkStats) SetUploadSpeed(speed uint32) { diff --git a/vendor/github.com/skycoin/skywire/pkg/router/route_group.go b/vendor/github.com/skycoin/skywire/pkg/router/route_group.go index 9b8293e9..ca694c4a 100644 --- a/vendor/github.com/skycoin/skywire/pkg/router/route_group.go +++ b/vendor/github.com/skycoin/skywire/pkg/router/route_group.go @@ -449,7 +449,7 @@ func (rg *RouteGroup) sendPing() error { throughput := rg.networkStats.RemoteThroughput() timestamp := time.Now().UTC().UnixNano() / int64(time.Millisecond) - rg.networkStats.SetDownloadSpeed(uint32(throughput)) + rg.networkStats.SetDownloadSpeed(uint32(throughput)) //nolint packet := routing.MakePingPacket(rule.NextRouteID(), timestamp, throughput) @@ -697,7 +697,7 @@ func (rg *RouteGroup) handleErrorPacket(packet routing.Packet) error { return nil } - rg.SetError(fmt.Errorf(string(packet.Payload()))) + rg.SetError(fmt.Errorf("%v", string(packet.Payload()))) return nil } @@ -723,9 +723,9 @@ func (rg *RouteGroup) handlePingPacket(packet routing.Packet) error { rg.logger.WithField("func", "RouteGroup.handlePingPacket").Tracef("Throughput is around %d", throughput) - rg.networkStats.SetUploadSpeed(uint32(throughput)) + rg.networkStats.SetUploadSpeed(uint32(throughput)) //nolint - return rg.sendPong(int64(timestamp)) + return rg.sendPong(int64(timestamp)) //nolint } func (rg *RouteGroup) handlePongPacket(packet routing.Packet) error { @@ -734,13 +734,13 @@ func (rg *RouteGroup) handlePongPacket(packet routing.Packet) error { sentAtMs := binary.BigEndian.Uint64(payload) ms := sentAtMs % 1000 - sentAt := time.Unix(int64(sentAtMs/1000), int64(ms)*int64(time.Millisecond)).UTC() + sentAt := time.Unix(int64(sentAtMs/1000), int64(ms)*int64(time.Millisecond)).UTC() //nolint latency := time.Now().UTC().Sub(sentAt).Milliseconds() rg.logger.WithField("func", "RouteGroup.handlePongPacket").Tracef("Latency is around %d ms", latency) - rg.networkStats.SetLatency(uint32(latency)) + rg.networkStats.SetLatency(uint32(latency)) //nolint return nil } diff --git a/vendor/github.com/skycoin/skywire/pkg/router/router.go b/vendor/github.com/skycoin/skywire/pkg/router/router.go index c18f28b2..45a99a36 100644 --- a/vendor/github.com/skycoin/skywire/pkg/router/router.go +++ b/vendor/github.com/skycoin/skywire/pkg/router/router.go @@ -990,11 +990,11 @@ func (r *router) forwardPacket(ctx context.Context, packet routing.Packet, rule case routing.ClosePacket: p = routing.MakeClosePacket(rule.NextRouteID(), routing.CloseCode(packet.Payload()[0])) case routing.PingPacket: - timestamp := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset:])) - throughput := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset+8:])) + timestamp := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset:])) //nolint + throughput := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset+8:])) //nolint p = routing.MakePingPacket(rule.NextRouteID(), timestamp, throughput) case routing.PongPacket: - timestamp := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset:])) + timestamp := int64(binary.BigEndian.Uint64(packet[routing.PacketPayloadOffset:])) //nolint p = routing.MakePongPacket(rule.NextRouteID(), timestamp) case routing.ErrorPacket: var err error @@ -1328,7 +1328,8 @@ func (r *router) removeRouteGroupOfRule(rule routing.Rule) { } func (r *router) checkIfTransportAvailable() (ok bool) { - r.tm.WalkTransports(func(tp *transport.ManagedTransport) bool { + // r.tm.WalkTransports(func(tp *transport.ManagedTransport) bool { + r.tm.WalkTransports(func(_ *transport.ManagedTransport) bool { ok = true return ok }) diff --git a/vendor/github.com/skycoin/skywire/pkg/router/setupmetrics/victoria_metrics.go b/vendor/github.com/skycoin/skywire/pkg/router/setupmetrics/victoria_metrics.go index 32f32e9a..6a2b5929 100644 --- a/vendor/github.com/skycoin/skywire/pkg/router/setupmetrics/victoria_metrics.go +++ b/vendor/github.com/skycoin/skywire/pkg/router/setupmetrics/victoria_metrics.go @@ -43,7 +43,7 @@ func (m *VictoriaMetrics) RecordRequest() func(rules *routing.EdgeRules, err *er start := time.Now() m.activeRequests.Inc() - return func(rules *routing.EdgeRules, err *error) { + return func(_ *routing.EdgeRules, err *error) { if *err == nil { m.reqDurationsSuccesses.UpdateDuration(start) } else { diff --git a/vendor/github.com/skycoin/skywire/pkg/routing/packet.go b/vendor/github.com/skycoin/skywire/pkg/routing/packet.go index d7550281..5fbd602a 100644 --- a/vendor/github.com/skycoin/skywire/pkg/routing/packet.go +++ b/vendor/github.com/skycoin/skywire/pkg/routing/packet.go @@ -105,7 +105,7 @@ func MakeDataPacket(id RouteID, payload []byte) (Packet, error) { packet[PacketTypeOffset] = byte(DataPacket) binary.BigEndian.PutUint32(packet[PacketRouteIDOffset:], uint32(id)) - binary.BigEndian.PutUint16(packet[PacketPayloadSizeOffset:], uint16(len(payload))) + binary.BigEndian.PutUint16(packet[PacketPayloadSizeOffset:], uint16(len(payload))) //nolint copy(packet[PacketPayloadOffset:], payload) return packet, nil @@ -187,7 +187,7 @@ func MakeErrorPacket(id RouteID, errPayload []byte) (Packet, error) { packet[PacketTypeOffset] = byte(ErrorPacket) binary.BigEndian.PutUint32(packet[PacketRouteIDOffset:], uint32(id)) - binary.BigEndian.PutUint16(packet[PacketPayloadSizeOffset:], uint16(len(errPayload))) + binary.BigEndian.PutUint16(packet[PacketPayloadSizeOffset:], uint16(len(errPayload))) //nolint copy(packet[PacketPayloadOffset:], errPayload) return packet, nil diff --git a/vendor/github.com/skycoin/skywire/pkg/routing/rule.go b/vendor/github.com/skycoin/skywire/pkg/routing/rule.go index 1d0b091f..6aa22cfe 100644 --- a/vendor/github.com/skycoin/skywire/pkg/routing/rule.go +++ b/vendor/github.com/skycoin/skywire/pkg/routing/rule.go @@ -65,7 +65,7 @@ func (r Rule) assertLen(l int) { // KeepAlive returns rule's keep-alive timeout. func (r Rule) KeepAlive() time.Duration { r.assertLen(RuleHeaderSize) - return time.Duration(binary.BigEndian.Uint64(r[0:8])) + return time.Duration(binary.BigEndian.Uint64(r[0:8])) //nolint } // setKeepAlive sets rule's keep-alive timeout. diff --git a/vendor/github.com/skycoin/skywire/pkg/routing/table.go b/vendor/github.com/skycoin/skywire/pkg/routing/table.go index bc85fe86..954986ab 100644 --- a/vendor/github.com/skycoin/skywire/pkg/routing/table.go +++ b/vendor/github.com/skycoin/skywire/pkg/routing/table.go @@ -92,7 +92,7 @@ func (mt *memTable) reserveKeysImpl(n int) (first, last RouteID, err error) { } first = mt.nextID + 1 - mt.nextID += RouteID(n) + mt.nextID += RouteID(n) //nolint last = mt.nextID return first, last, nil diff --git a/vendor/github.com/skycoin/skywire/pkg/servicedisc/types.go b/vendor/github.com/skycoin/skywire/pkg/servicedisc/types.go index b3d44ec5..9e9b2c5b 100644 --- a/vendor/github.com/skycoin/skywire/pkg/servicedisc/types.go +++ b/vendor/github.com/skycoin/skywire/pkg/servicedisc/types.go @@ -82,7 +82,7 @@ func (a *SWAddr) UnmarshalText(text []byte) error { if err != nil { return err } - binary.BigEndian.PutUint16(a[len(a)-2:], uint16(port)) + binary.BigEndian.PutUint16(a[len(a)-2:], uint16(port)) //nolint return nil } diff --git a/vendor/github.com/skycoin/skywire/pkg/transport/handshake.go b/vendor/github.com/skycoin/skywire/pkg/transport/handshake.go index ab363658..a773da67 100644 --- a/vendor/github.com/skycoin/skywire/pkg/transport/handshake.go +++ b/vendor/github.com/skycoin/skywire/pkg/transport/handshake.go @@ -96,7 +96,7 @@ func (hs SettlementHS) Do(ctx context.Context, dc DiscoveryClient, transport net // The handshake logic only REGISTERS the transport, and does not update the status of the transport. func MakeSettlementHS(init bool, log *logging.Logger) SettlementHS { // initiating logic. - initHS := func(ctx context.Context, dc DiscoveryClient, transport network.Transport, sk cipher.SecKey) (err error) { + initHS := func(ctx context.Context, dc DiscoveryClient, transport network.Transport, sk cipher.SecKey) (err error) { //nolint entry := makeEntryFromTransport(transport) // create signed entry and send it to responding visor. diff --git a/vendor/github.com/skycoin/skywire/pkg/transport/network/handshake/handshake.go b/vendor/github.com/skycoin/skywire/pkg/transport/network/handshake/handshake.go index 125c6e32..46fccfc7 100644 --- a/vendor/github.com/skycoin/skywire/pkg/transport/network/handshake/handshake.go +++ b/vendor/github.com/skycoin/skywire/pkg/transport/network/handshake/handshake.go @@ -64,7 +64,7 @@ type Handshake func(conn net.Conn, deadline time.Time) (lAddr, rAddr dmsg.Addr, // InitiatorHandshake creates the handshake logic on the initiator's side. func InitiatorHandshake(lSK cipher.SecKey, localAddr, remoteAddr dmsg.Addr) Handshake { - return handshakeMiddleware(func(conn net.Conn, deadline time.Time) (lAddr, rAddr dmsg.Addr, err error) { + return handshakeMiddleware(func(conn net.Conn, _ time.Time) (lAddr, rAddr dmsg.Addr, err error) { if err = writeFrame0(conn); err != nil { return dmsg.Addr{}, dmsg.Addr{}, err } @@ -113,7 +113,8 @@ func MakeF2PortChecker(portChecker func(port uint16) error) CheckF2 { // ResponderHandshake creates the handshake logic on the responder's side. func ResponderHandshake(checkF2 CheckF2) Handshake { - return handshakeMiddleware(func(conn net.Conn, deadline time.Time) (lAddr, rAddr dmsg.Addr, err error) { + // return handshakeMiddleware(func(conn net.Conn, deadline time.Time) (lAddr, rAddr dmsg.Addr, err error) { + return handshakeMiddleware(func(conn net.Conn, _ time.Time) (lAddr, rAddr dmsg.Addr, err error) { if err = readFrame0(conn); err != nil { return dmsg.Addr{}, dmsg.Addr{}, err } diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/hypervisor.go b/vendor/github.com/skycoin/skywire/pkg/visor/hypervisor.go index 8ebbfebd..182b4e50 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/hypervisor.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/hypervisor.go @@ -179,7 +179,7 @@ func (hv *Hypervisor) AddMockData(config MockConfig) error { hv.remoteVisors[pk] = Conn{ Addr: dmsg.Addr{ PK: pk, - Port: uint16(i), + Port: uint16(i), //nolint }, API: client, } @@ -1111,7 +1111,7 @@ func (hv *Hypervisor) deleteRoutes() http.HandlerFunc { } continue } - routeID := routing.RouteID(ridUint64) + routeID := routing.RouteID(ridUint64) //nolint contains := false for _, rule := range rules { if rule.KeyRouteID() == routeID { @@ -1502,7 +1502,7 @@ func ridFromParam(r *http.Request, key string) (routing.RouteID, error) { return 0, errors.New("invalid route ID provided") } - return routing.RouteID(rid), nil + return routing.RouteID(rid), nil //nolint } func strSliceFromQuery(r *http.Request, key string, defaultVal []string) []string { diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/init.go b/vendor/github.com/skycoin/skywire/pkg/visor/init.go index 4f341c1b..c793712a 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/init.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/init.go @@ -30,10 +30,10 @@ import ( "github.com/skycoin/dmsg/pkg/dmsghttp" "github.com/skycoin/dmsg/pkg/dmsgpty" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/logging" "github.com/skycoin/skywire-utilities/pkg/netutil" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/vpn" "github.com/skycoin/skywire/pkg/app/appdisc" "github.com/skycoin/skywire/pkg/app/appevent" @@ -640,7 +640,7 @@ func initSkywireForwardConn(ctx context.Context, v *Visor, log *logging.Logger) log.Debug("Accepting sky forwarding conn...") conn, err := l.Accept() if err != nil { - if !errors.Is(appnet.ErrClosedConn, err) { + if !errors.Is(err, appnet.ErrClosedConn) { log.WithError(err).Error("Failed to accept conn") } return @@ -1516,8 +1516,14 @@ func initPublicAutoconnect(ctx context.Context, v *Visor, log *logging.Logger) e return nil } serviceDisc := v.conf.Launcher.ServiceDisc - if serviceDisc == "" { - serviceDisc = utilenv.ServiceDiscAddr + if serviceDisc == "" { //it might be intentionally blank ; consider revising. + var envServices skywire.EnvServices + var services skywire.Services + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err == nil { + if err := json.Unmarshal(envServices.Prod, &services); err == nil { + serviceDisc = services.ServiceDiscovery + } + } } // todo: refactor updatedisc: split connecting to services in updatedisc and diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/config.go b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/config.go index d4565960..b5984103 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/config.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/config.go @@ -11,9 +11,9 @@ import ( "github.com/skycoin/dmsg/pkg/dmsgpty" coinCipher "github.com/skycoin/skycoin/src/cipher" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/logging" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appserver" "github.com/skycoin/skywire/pkg/dmsgc" "github.com/skycoin/skywire/pkg/routing" @@ -25,34 +25,20 @@ import ( // This is used as default values if no config is given, or for missing *required* fields. // This function always returns the latest config version. func MakeBaseConfig(common *Common, testEnv bool, dmsgHTTP bool, services *Services, dmsgHTTPServersList *DmsgHTTPServers) *V1 { + //check if any services were passed if services == nil { - //fall back on defaults + var envServices skywire.EnvServices + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err != nil { + return nil + } if !testEnv { - services = &Services{ - DmsgDiscovery: utilenv.DmsgDiscAddr, - TransportDiscovery: utilenv.TpDiscAddr, - AddressResolver: utilenv.AddressResolverAddr, - RouteFinder: utilenv.RouteFinderAddr, - RouteSetupNodes: MustPKs(utilenv.RouteSetupPKs), - TransportSetupPKs: MustPKs(utilenv.TPSetupPKs), - UptimeTracker: utilenv.UptimeTrackerAddr, - ServiceDiscovery: utilenv.ServiceDiscAddr, - StunServers: utilenv.GetStunServers(), - DNSServer: utilenv.DNSServer, + if err := json.Unmarshal(envServices.Prod, &services); err != nil { + return nil } } else { - services = &Services{ - DmsgDiscovery: utilenv.TestDmsgDiscAddr, - TransportDiscovery: utilenv.TestTpDiscAddr, - AddressResolver: utilenv.TestAddressResolverAddr, - RouteFinder: utilenv.TestRouteFinderAddr, - RouteSetupNodes: MustPKs(utilenv.TestRouteSetupPKs), - TransportSetupPKs: MustPKs(utilenv.TestTPSetupPKs), - UptimeTracker: utilenv.TestUptimeTrackerAddr, - ServiceDiscovery: utilenv.TestServiceDiscAddr, - StunServers: utilenv.GetStunServers(), - DNSServer: utilenv.DNSServer, + if err := json.Unmarshal(envServices.Test, &services); err != nil { + return nil } } } @@ -61,14 +47,14 @@ func MakeBaseConfig(common *Common, testEnv bool, dmsgHTTP bool, services *Servi conf.Common = common } conf.Dmsg = &dmsgc.DmsgConfig{ - Discovery: services.DmsgDiscovery, //utilenv.DmsgDiscAddr, + Discovery: services.DmsgDiscovery, SessionsCount: 1, Servers: []*disc.Entry{}, ConnectedServersType: "all", } conf.Transport = &Transport{ - Discovery: services.TransportDiscovery, //utilenv.TpDiscAddr, - AddressResolver: services.AddressResolver, //utilenv.AddressResolverAddr, + Discovery: services.TransportDiscovery, + AddressResolver: services.AddressResolver, PublicAutoconnect: PublicAutoconnect, LogStore: &LogStore{ Type: FileLogStore, @@ -79,25 +65,25 @@ func MakeBaseConfig(common *Common, testEnv bool, dmsgHTTP bool, services *Servi StcprPort: 0, } conf.Routing = &Routing{ - RouteFinder: services.RouteFinder, //utilenv.RouteFinderAddr, - RouteSetupNodes: services.RouteSetupNodes, //[]cipher.PubKey{utilenv.MustPK(utilenv.SetupPK)}, + RouteFinder: services.RouteFinder, + RouteSetupNodes: services.RouteSetupNodes, RouteFinderTimeout: DefaultTimeout, } conf.Launcher = &Launcher{ - ServiceDisc: services.ServiceDiscovery, //utilenv.ServiceDiscAddr, + ServiceDisc: services.ServiceDiscovery, Apps: nil, ServerAddr: AppSrvAddr, BinPath: AppBinPath, DisplayNodeIP: false, } conf.UptimeTracker = &UptimeTracker{ - Addr: services.UptimeTracker, //utilenv.UptimeTrackerAddr, + Addr: services.UptimeTracker, } conf.CLIAddr = RPCAddr conf.LogLevel = LogLevel conf.LocalPath = LocalPath conf.DmsgHTTPServerPath = LocalPath + "/" + Custom - conf.StunServers = services.StunServers //utilenv.GetStunServers() + conf.StunServers = services.StunServers conf.ShutdownTimeout = DefaultTimeout conf.Dmsgpty = &Dmsgpty{ @@ -148,9 +134,22 @@ func MakeDefaultConfig(log *logging.MasterLogger, sk *cipher.SecKey, usrEnv bool if err != nil { return nil, err } + dnsServer := "" var dmsgHTTPServersList *DmsgHTTPServers - - dnsServer := utilenv.DNSServer + var envServices skywire.EnvServices + var svcs skywire.Services + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err != nil { + return nil, nil + } + if !testEnv { + if err := json.Unmarshal(envServices.Prod, &svcs); err != nil { + dnsServer = svcs.DNSServer + } + } else { + if err := json.Unmarshal(envServices.Test, &svcs); err != nil { + dnsServer = svcs.DNSServer + } + } if services != nil { if services.DNSServer != "" { dnsServer = services.DNSServer diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/hypervisorconfig.go b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/hypervisorconfig.go index 99b284ea..aa2476cd 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/hypervisorconfig.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/hypervisorconfig.go @@ -11,8 +11,8 @@ import ( "path/filepath" "time" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/cipher" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/util/pathutil" ) @@ -112,24 +112,34 @@ func (c *HypervisorConfig) FillDefaults(testEnv bool) { } if c.DmsgDiscovery == "" { - if testEnv { - c.DmsgDiscovery = utilenv.TestDmsgDiscAddr - } else { - c.DmsgDiscovery = utilenv.DmsgDiscAddr + var envServices EnvServices + var services Services + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err == nil { + if testEnv { + if err := json.Unmarshal(envServices.Test, &services); err != nil { + return + } + } else { + if err := json.Unmarshal(envServices.Prod, &services); err != nil { + return + } + } + + c.DmsgDiscovery = services.DmsgDiscovery } - } - if c.DmsgPort == 0 { - c.DmsgPort = DmsgHypervisorPort - } - if c.HTTPAddr == "" { - c.HTTPAddr = httpAddr - } - c.Cookies.FillDefaults() - c.EnableAuth = EnableAuth - c.EnableTLS = EnableTLS - c.TLSCertFile = TLSCert - c.TLSKeyFile = TLSKey + if c.DmsgPort == 0 { + c.DmsgPort = DmsgHypervisorPort + } + if c.HTTPAddr == "" { + c.HTTPAddr = httpAddr + } + c.Cookies.FillDefaults() + c.EnableAuth = EnableAuth + c.EnableTLS = EnableTLS + c.TLSCertFile = TLSCert + c.TLSKeyFile = TLSKey + } } // Parse parses the file in path, and decodes to the config. diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/services.go b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/services.go index 44ff133a..c3f3c4c8 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/services.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/services.go @@ -52,7 +52,13 @@ func Fetch(mLog *logging.MasterLogger, serviceConf string, stdout bool) (service return services } -// Services are subdomains and IP addresses of the skywire services +// EnvServices is the struct for the outer JSON +type EnvServices struct { + Test json.RawMessage `json:"test"` + Prod json.RawMessage `json:"prod"` +} + +// Services is subdomains and IP addresses of the skywire services type Services struct { DmsgDiscovery string `json:"dmsg_discovery,omitempty"` TransportDiscovery string `json:"transport_discovery,omitempty"` diff --git a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/v1.go b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/v1.go index b74fd5bd..3f19d26f 100644 --- a/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/v1.go +++ b/vendor/github.com/skycoin/skywire/pkg/visor/visorconfig/v1.go @@ -290,13 +290,13 @@ func (v1 *V1) AddAppConfig(launch *launcher.AppLauncher, appName, binaryName str for { min := 10 max := 99 - randomNumber = rand.Intn(max-min+1) + min //nolint - if _, ok := busyPorts[routing.Port(randomNumber)]; !ok { + randomNumber = rand.Intn(max-min+1) + min //nolint + if _, ok := busyPorts[routing.Port(randomNumber)]; !ok { //nolint break } } - conf.Apps = append(conf.Apps, appserver.AppConfig{Name: appName, Binary: binaryName, Port: routing.Port(randomNumber)}) + conf.Apps = append(conf.Apps, appserver.AppConfig{Name: appName, Binary: binaryName, Port: routing.Port(randomNumber)}) //nolint launch.ResetConfig(launcher.AppLauncherConfig{ VisorPK: v1.PK, diff --git a/vendor/github.com/skycoin/skywire/services-config.json b/vendor/github.com/skycoin/skywire/services-config.json index 7dea1122..6322f9b1 100644 --- a/vendor/github.com/skycoin/skywire/services-config.json +++ b/vendor/github.com/skycoin/skywire/services-config.json @@ -1,92 +1,80 @@ { - "test": { - "conf": "http://conf.skywire.dev", - "dmsg_discovery": "http://dmsgd.skywire.dev", - "transport_discovery": "http://tpd.skywire.dev", - "address_resolver": "http://ar.skywire.dev", - "route_finder": "http://rf.skywire.dev", - "route_setup_nodes": [ - "026c2a3e92d6253c5abd71a42628db6fca9dd9aa037ab6f4e3a31108558dfd87cf" - ], - "transport_setup": [ - "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", - "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", - "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", - "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", - "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", - "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", - "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", - "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", - "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", - "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" - ], - "uptime_tracker": "http://ut.skywire.dev", - "service_discovery": "http://sd.skywire.dev", - "stun_servers": [ - "139.162.12.30:3478", - "170.187.228.181:3478", - "172.104.161.184:3478", - "170.187.231.137:3478", - "143.42.74.91:3478", - "170.187.225.78:3478", - "143.42.78.123:3478", - "139.162.12.244:3478" - ], - "dns_server": "1.1.1.1", - "survey_whitelist": [ - "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", - "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", - "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", - "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", - "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", - "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", - "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" - ] - }, - "prod": { - "conf": "http://conf.skywire.skycoin.com", - "dmsg_discovery": "http://dmsgd.skywire.skycoin.com", - "transport_discovery": "http://tpd.skywire.skycoin.com", - "address_resolver": "http://ar.skywire.skycoin.com", - "route_finder": "http://rf.skywire.skycoin.com", - "route_setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557", - "024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438", - "03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015" - ], - "transport_setup": [ - "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", - "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", - "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", - "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", - "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", - "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", - "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", - "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", - "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", - "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" - ], - "uptime_tracker": "http://ut.skywire.skycoin.com", - "service_discovery": "http://sd.skycoin.com", - "stun_servers": [ - "139.162.30.112:3478", - "192.53.118.31:3478", - "192.53.118.61:3478", - "170.187.228.44:3478", - "170.187.228.178:3478", - "139.162.30.129:3478", - "192.53.118.134:3478", - "192.53.118.209:3478" - ], - "dns_server": "1.1.1.1", - "survey_whitelist": [ - "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", - "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", - "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", - "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", - "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", - "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", - "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" - ] - } + "test": { + "conf": "http://conf.skywire.dev", + "dmsg_discovery": "http://dmsgd.skywire.dev", + "transport_discovery": "http://tpd.skywire.dev", + "address_resolver": "http://ar.skywire.dev", + "route_finder": "http://rf.skywire.dev", + "route_setup_nodes": [ + "026c2a3e92d6253c5abd71a42628db6fca9dd9aa037ab6f4e3a31108558dfd87cf" + ], + "transport_setup": [ + "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", + "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", + "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", + "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", + "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", + "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", + "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", + "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", + "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", + "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" + ], + "uptime_tracker": "http://ut.skywire.dev", + "service_discovery": "http://sd.skywire.dev", + "stun_servers": [ + "139.162.160.227:3479", + "172.104.145.184:3479" + ], + "dns_server": "1.1.1.1", + "survey_whitelist": [ + "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", + "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", + "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", + "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", + "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", + "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", + "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" + ] + }, + "prod": { + "conf": "http://conf.skywire.skycoin.com", + "dmsg_discovery": "http://dmsgd.skywire.skycoin.com", + "transport_discovery": "http://tpd.skywire.skycoin.com", + "address_resolver": "http://ar.skywire.skycoin.com", + "route_finder": "http://rf.skywire.skycoin.com", + "route_setup_nodes": [ + "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557", + "024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438", + "03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015" + ], + "transport_setup": [ + "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", + "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", + "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", + "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", + "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", + "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", + "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", + "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", + "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", + "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" + ], + "uptime_tracker": "http://ut.skywire.skycoin.com", + "service_discovery": "http://sd.skycoin.com", + "stun_servers": [ + "139.162.160.227:3479", + "172.104.145.184:3479" + ], + "dns_server": "1.1.1.1", + "survey_whitelist": [ + "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", + "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", + "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", + "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", + "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", + "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", + "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" + ] + } } diff --git a/vendor/github.com/skycoin/skywire/skywire.go b/vendor/github.com/skycoin/skywire/skywire.go index ac53ec55..ee99b806 100644 --- a/vendor/github.com/skycoin/skywire/skywire.go +++ b/vendor/github.com/skycoin/skywire/skywire.go @@ -63,7 +63,6 @@ var Test Services // TestConf is the service configuration address / URL for the skywire test deployment var TestConf Conf -// initialize the embedded files into variables func init() { var js interface{} err := json.Unmarshal([]byte(ServicesJSON), &js) diff --git a/vendor/modules.txt b/vendor/modules.txt index 41607148..82829881 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -457,7 +457,7 @@ github.com/rs/cors ## explicit; go 1.13 github.com/sirupsen/logrus github.com/sirupsen/logrus/hooks/syslog -# github.com/skycoin/dmsg v1.3.26-0.20240924024628-ed5195787d40 +# github.com/skycoin/dmsg v1.3.28 ## explicit; go 1.21 github.com/skycoin/dmsg/internal/servermetrics github.com/skycoin/dmsg/pkg/direct @@ -473,15 +473,15 @@ github.com/skycoin/dmsg/pkg/noise # github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 ## explicit github.com/skycoin/noise -# github.com/skycoin/skycoin v0.27.1 -## explicit +# github.com/skycoin/skycoin v0.28.0 +## explicit; go 1.14 github.com/skycoin/skycoin/src/cipher github.com/skycoin/skycoin/src/cipher/base58 github.com/skycoin/skycoin/src/cipher/ripemd160 github.com/skycoin/skycoin/src/cipher/secp256k1-go github.com/skycoin/skycoin/src/cipher/secp256k1-go/secp256k1-go2 github.com/skycoin/skycoin/src/util/logging -# github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 +# github.com/skycoin/skywire v1.3.28 ## explicit; go 1.21 github.com/skycoin/skywire github.com/skycoin/skywire/cmd/setup-node/commands