Skip to content

Commit

Permalink
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Browse files Browse the repository at this point in the history
…t into fix/rename-messaging-to-dmsg
  • Loading branch information
Darkren committed Jan 16, 2020
2 parents 9dbbac0 + ac07ab8 commit 640a082
Show file tree
Hide file tree
Showing 211 changed files with 45,700 additions and 46,047 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ bin: ## Build `skywire-visor`, `skywire-cli`, `hypervisor`
${OPTS} go build ${BUILD_OPTS} -o ./skywire-visor ./cmd/skywire-visor
${OPTS} go build ${BUILD_OPTS} -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build ${BUILD_OPTS} -o ./setup-node ./cmd/setup-node
${OPTS} go build ${BUILD_OPTS} -o ./dmsg-server ./cmd/dmsg-server
${OPTS} go build ${BUILD_OPTS} -o ./hypervisor ./cmd/hypervisor
${OPTS} go build ${BUILD_OPTS} -o ./dmsgpty ./cmd/dmsgpty

Expand Down
122 changes: 0 additions & 122 deletions cmd/dmsg-server/commands/root.go

This file was deleted.

7 changes: 0 additions & 7 deletions cmd/dmsg-server/dmsg-server.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/setup-node/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"secret_key": "42bca4df2f3189b28872d40e6c61aacd5e85b8e91f8fea65780af27c142419e5",
"dmsg": {
"discovery": "http://skywire.skycoin.net:8001",
"server_count": 1
"sessions_count": 1
},
"transport_discovery": "http://skywire.skycoin.net:8003",
"log_level": "info"
Expand Down
2 changes: 1 addition & 1 deletion cmd/skywire-cli/commands/node/gen-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func defaultConfig() *visor.Config {
} else {
conf.Dmsg.Discovery = skyenv.DefaultDmsgDiscAddr
}
conf.Dmsg.ServerCount = 1
conf.Dmsg.SessionsCount = 1

ptyConf := defaultDmsgPtyConfig()
conf.DmsgPty = &ptyConf
Expand Down
14 changes: 7 additions & 7 deletions cmd/skywire-visor/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,21 @@ func (cfg *runCfg) runNode() *runCfg {

time.Sleep(startDelay)

node, err := visor.NewNode(&cfg.conf, cfg.masterLogger, cfg.restartCtx)
if err != nil {
cfg.logger.Fatal("Failed to initialize node: ", err)
}

if cfg.conf.DmsgPty != nil {
err = node.UnlinkSocketFiles(cfg.conf.AppServerSockFile, cfg.conf.DmsgPty.CLIAddr)
err = visor.UnlinkSocketFiles(cfg.conf.AppServerSockFile, cfg.conf.DmsgPty.CLIAddr)
} else {
err = node.UnlinkSocketFiles(cfg.conf.AppServerSockFile)
err = visor.UnlinkSocketFiles(cfg.conf.AppServerSockFile)
}

if err != nil {
cfg.logger.Fatal("failed to unlink socket files: ", err)
}

node, err := visor.NewNode(&cfg.conf, cfg.masterLogger, cfg.restartCtx)
if err != nil {
cfg.logger.Fatal("Failed to initialize node: ", err)
}

if cfg.conf.Uptime.Tracker != "" {
uptimeTracker, err := utclient.NewHTTP(cfg.conf.Uptime.Tracker, cfg.conf.Node.StaticPubKey, cfg.conf.Node.StaticSecKey)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/skywire-visor/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "http://skywire.skycoin.net:8001",
"server_count": 5
"sessions_count": 5
},
"apps": [
{
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/gorilla/securecookie v1.1.1
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d
github.com/pkg/profile v1.3.0
github.com/prometheus/client_golang v1.2.1
github.com/prometheus/client_golang v1.3.0
github.com/prometheus/common v0.7.0
github.com/sirupsen/logrus v1.4.2
github.com/skycoin/dmsg v0.0.0-20190805065636-70f4c32a994f // indirect
Expand All @@ -24,7 +24,6 @@ require (
golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a
golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2 // indirect
)

//replace github.com/SkycoinProject/dmsg => ../dmsg
replace github.com/SkycoinProject/dmsg => ../dmsg
15 changes: 15 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA=
github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
Expand All @@ -40,6 +42,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-redis/redis v6.15.6+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand All @@ -48,6 +51,7 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand All @@ -62,6 +66,7 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down Expand Up @@ -105,17 +110,23 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI=
github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc=
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.1.0 h1:ElTg5tNp4DqfV7UQjDqv2+RJlNzsDtvNAWccbItceIE=
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8=
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
Expand Down Expand Up @@ -163,6 +174,7 @@ golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -173,6 +185,8 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f h1:68K/z8GLUxV76xGSqwTWw2gyk/jwn79LUL43rES2g8o=
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand All @@ -183,6 +197,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191206204035-259af5ff87bd/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2 h1:V9r/14uGBqLgNlHRYWdVqjMdWkcOHnE2KG8DwVqQSEc=
golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
Expand Down
2 changes: 1 addition & 1 deletion integration/generic/nodeA.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/generic/nodeC.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/intermediary-nodeB.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/nodeA.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/nodeC.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/proxy/nodeA.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
2 changes: 1 addition & 1 deletion integration/proxy/nodeC.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dmsg": {
"discovery": "https://dmsg.discovery.skywire.skycoin.com",
"server_count": 1
"sessions_count": 1
},
"transport": {
"discovery": "https://transport.discovery.skywire.skycoin.com",
Expand Down
6 changes: 5 additions & 1 deletion pkg/app/appnet/dmsg_networker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ func (n *DMSGNetworker) Dial(addr Addr) (net.Conn, error) {

// DialContext dials remote `addr` via dmsg network with context.
func (n *DMSGNetworker) DialContext(ctx context.Context, addr Addr) (net.Conn, error) {
return n.dmsgC.Dial(ctx, addr.PubKey, uint16(addr.Port))
remote := dmsg.Addr{
PK: addr.PubKey,
Port: uint16(addr.Port),
}
return n.dmsgC.Dial(ctx, remote)
}

// Listen starts listening on local `addr` in the dmsg network.
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/appserver/rpc_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ func testRPCGatewayDialOK(t *testing.T, l *logging.Logger, nType appnet.Type, di
localPort := routing.Port(100)

dialCtx := context.Background()
dialConn := dmsg.NewStream(nil, nil, dmsg.Addr{Port: uint16(localPort)}, dmsg.Addr{}, 0, 10, func() {})
dialConn := &appcommon.MockConn{}
dialConn.On("LocalAddr").Return(dmsg.Addr{Port: uint16(localPort)})
dialConn.On("RemoteAddr").Return(dmsg.Addr{})

var dialErr error

Expand Down
Loading

0 comments on commit 640a082

Please sign in to comment.