mirror of https://github.com/status-im/go-waku.git
chore: remove rendezvous
This commit is contained in:
parent
9b5922bc74
commit
1b7dd9fe3f
|
@ -1,6 +1,6 @@
|
|||
module basic2
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
replace github.com/status-im/go-waku => ../..
|
||||
|
||||
|
@ -117,7 +117,6 @@ require (
|
|||
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e // indirect
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b // indirect
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 // indirect
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect
|
||||
github.com/status-im/noise v1.0.1 // indirect
|
||||
|
|
|
@ -241,7 +241,6 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA
|
|||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
|
@ -935,7 +934,6 @@ github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8
|
|||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
|
||||
github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
|
||||
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio=
|
||||
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
|
@ -1399,8 +1397,6 @@ github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e h1:fDm8hqKGF
|
|||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e/go.mod h1:u1s0ACIlweIjmJrgXyljRPSOflZLaS6ezb044+92W3c=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2 h1:uvcD2U7skYqPQviARFb4w3wZyFSYLs/pfVrJaRSDcCA=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b h1:0hfwE6usp+dCdGbEaQjrCuBmVBjCzSaHTejW3xG+yH8=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b/go.mod h1:rRqjTHCbxRbulvSw0VKnt45LIYvZOBxCsmfJZOqijdo=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 h1:Tx39c6DLpPjLbMFj0K2ft4eS43toezWOXs026tbLPhU=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5/go.mod h1:buDqUAAFez13mhNTGAJKD03XyEe8PdlTKdsTbfi8imI=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"chat3/pb"
|
||||
"chat2/pb"
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module chat3
|
||||
module chat2
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
replace github.com/status-im/go-waku => ../..
|
||||
|
||||
|
@ -15,7 +15,6 @@ require (
|
|||
github.com/ipfs/go-log v1.0.5
|
||||
github.com/ipfs/go-log/v2 v2.5.1
|
||||
github.com/libp2p/go-libp2p v0.23.2
|
||||
github.com/libp2p/go-libp2p-core v0.20.1
|
||||
github.com/muesli/reflow v0.3.0
|
||||
github.com/multiformats/go-multiaddr v0.7.0
|
||||
github.com/status-im/go-waku v0.0.0-00010101000000-000000000000
|
||||
|
@ -124,7 +123,6 @@ require (
|
|||
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e // indirect
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b // indirect
|
||||
github.com/status-im/noise v1.0.1 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.5 // indirect
|
||||
|
|
|
@ -975,8 +975,6 @@ github.com/libp2p/go-libp2p v0.23.2 h1:yqyTeKQJyofWXxEv/eEVUvOrGdt/9x+0PIQ4N1kax
|
|||
github.com/libp2p/go-libp2p v0.23.2/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI=
|
||||
github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw=
|
||||
github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI=
|
||||
github.com/libp2p/go-libp2p-core v0.20.1 h1:fQz4BJyIFmSZAiTbKV8qoYhEH5Dtv/cVhZbG3Ib/+Cw=
|
||||
github.com/libp2p/go-libp2p-core v0.20.1/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY=
|
||||
github.com/libp2p/go-libp2p-pubsub v0.8.1 h1:hSw09NauFUaA0FLgQPBJp6QOy0a2n+HSkb8IeOx8OnY=
|
||||
github.com/libp2p/go-libp2p-pubsub v0.8.1/go.mod h1:e4kT+DYjzPUYGZeWk4I+oxCSYTXizzXii5LDRRhjKSw=
|
||||
github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY=
|
||||
|
@ -1410,8 +1408,6 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y
|
|||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e h1:fDm8hqKGFy8LMNV8zedT3W+QYVPVDfb0F9Fr7fVf9rQ=
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e/go.mod h1:u1s0ACIlweIjmJrgXyljRPSOflZLaS6ezb044+92W3c=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b h1:0hfwE6usp+dCdGbEaQjrCuBmVBjCzSaHTejW3xG+yH8=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b/go.mod h1:rRqjTHCbxRbulvSw0VKnt45LIYvZOBxCsmfJZOqijdo=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 h1:Tx39c6DLpPjLbMFj0K2ft4eS43toezWOXs026tbLPhU=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5/go.mod h1:buDqUAAFez13mhNTGAJKD03XyEe8PdlTKdsTbfi8imI=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module filter2
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
replace github.com/status-im/go-waku => ../..
|
||||
|
||||
|
@ -117,7 +117,6 @@ require (
|
|||
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e // indirect
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b // indirect
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 // indirect
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect
|
||||
github.com/status-im/noise v1.0.1 // indirect
|
||||
|
|
|
@ -241,7 +241,6 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA
|
|||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
|
@ -935,7 +934,6 @@ github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8
|
|||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
|
||||
github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
|
||||
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio=
|
||||
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
|
@ -1399,8 +1397,6 @@ github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e h1:fDm8hqKGF
|
|||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e/go.mod h1:u1s0ACIlweIjmJrgXyljRPSOflZLaS6ezb044+92W3c=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2 h1:uvcD2U7skYqPQviARFb4w3wZyFSYLs/pfVrJaRSDcCA=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b h1:0hfwE6usp+dCdGbEaQjrCuBmVBjCzSaHTejW3xG+yH8=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b/go.mod h1:rRqjTHCbxRbulvSw0VKnt45LIYvZOBxCsmfJZOqijdo=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 h1:Tx39c6DLpPjLbMFj0K2ft4eS43toezWOXs026tbLPhU=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5/go.mod h1:buDqUAAFez13mhNTGAJKD03XyEe8PdlTKdsTbfi8imI=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg=
|
||||
|
|
1
go.mod
1
go.mod
|
@ -22,7 +22,6 @@ require (
|
|||
github.com/multiformats/go-multiaddr v0.7.0
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a
|
||||
github.com/urfave/cli/v2 v2.20.2
|
||||
|
|
8
go.sum
8
go.sum
|
@ -1269,7 +1269,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
|
||||
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
||||
|
@ -1323,7 +1322,6 @@ github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT
|
|||
github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI=
|
||||
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y=
|
||||
github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0=
|
||||
github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=
|
||||
github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU=
|
||||
|
@ -1429,10 +1427,6 @@ github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e h1:fDm8hqKGF
|
|||
github.com/status-im/go-discover v0.0.0-20220406135310-85a2ce36f63e/go.mod h1:u1s0ACIlweIjmJrgXyljRPSOflZLaS6ezb044+92W3c=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2 h1:uvcD2U7skYqPQviARFb4w3wZyFSYLs/pfVrJaRSDcCA=
|
||||
github.com/status-im/go-ethereum v1.10.4-status.2/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b h1:0hfwE6usp+dCdGbEaQjrCuBmVBjCzSaHTejW3xG+yH8=
|
||||
github.com/status-im/go-waku-rendezvous v0.0.0-20221019192605-ef843e5c7d5b/go.mod h1:rRqjTHCbxRbulvSw0VKnt45LIYvZOBxCsmfJZOqijdo=
|
||||
github.com/status-im/go-watchdog v1.2.0-ios-nolibproc h1:BJwZEF7OVKaXc2zErBUAolFSGzwrTBbWnN8e/6MER5E=
|
||||
github.com/status-im/go-watchdog v1.2.0-ios-nolibproc/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5 h1:Tx39c6DLpPjLbMFj0K2ft4eS43toezWOXs026tbLPhU=
|
||||
github.com/status-im/go-zerokit-rln v0.1.5/go.mod h1:buDqUAAFez13mhNTGAJKD03XyEe8PdlTKdsTbfi8imI=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg=
|
||||
|
@ -1458,7 +1452,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
|
@ -2285,7 +2278,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg=
|
||||
gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
|
||||
|
|
23
waku.go
23
waku.go
|
@ -320,29 +320,6 @@ func main() {
|
|||
Usage: "Discovery can automatically update its ENR with the IP address as seen by other nodes it communicates with.",
|
||||
Destination: &options.DiscV5.AutoUpdate,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "rendezvous",
|
||||
Usage: "Enable rendezvous protocol for peer discovery",
|
||||
Destination: &options.Rendezvous.Enable,
|
||||
},
|
||||
&cli.GenericFlag{
|
||||
Name: "rendezvous-node",
|
||||
Usage: "Multiaddr of a waku2 rendezvous node. Option may be repeated",
|
||||
Value: &cliutils.MultiaddrSlice{
|
||||
Values: &options.Rendezvous.Nodes,
|
||||
},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "rendezvous-server",
|
||||
Usage: "Node will act as rendezvous server",
|
||||
Destination: &options.RendezvousServer.Enable,
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "rendezvous-db-path",
|
||||
Value: "/tmp/rendezvous",
|
||||
Usage: "Path where peer records database will be stored",
|
||||
Destination: &options.RendezvousServer.DBPath,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "dns-discovery",
|
||||
Usage: "Enable DNS discovery",
|
||||
|
|
13
waku/node.go
13
waku/node.go
|
@ -32,7 +32,6 @@ import (
|
|||
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
|
||||
ws "github.com/libp2p/go-libp2p/p2p/transport/websocket"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
rendezvous "github.com/status-im/go-waku-rendezvous"
|
||||
"github.com/status-im/go-waku/logging"
|
||||
"github.com/status-im/go-waku/waku/metrics"
|
||||
"github.com/status-im/go-waku/waku/persistence"
|
||||
|
@ -194,13 +193,6 @@ func Execute(options Options) {
|
|||
nodeOpts = append(nodeOpts, node.WithWakuRelayAndMinPeers(options.Relay.MinRelayPeersToPublish, wakurelayopts...))
|
||||
}
|
||||
|
||||
if options.RendezvousServer.Enable {
|
||||
db, err := persistence.NewRendezVousLevelDB(options.RendezvousServer.DBPath)
|
||||
failOnErr(err, "RendezvousDB")
|
||||
storage := rendezvous.NewStorage(db)
|
||||
nodeOpts = append(nodeOpts, node.WithRendezvousServer(storage))
|
||||
}
|
||||
|
||||
if options.Filter.Enable {
|
||||
nodeOpts = append(nodeOpts, node.WithWakuFilter(!options.Filter.DisableFullNode, filter.WithTimeout(options.Filter.Timeout)))
|
||||
}
|
||||
|
@ -217,10 +209,6 @@ func Execute(options Options) {
|
|||
nodeOpts = append(nodeOpts, node.WithLightPush())
|
||||
}
|
||||
|
||||
if options.Rendezvous.Enable {
|
||||
nodeOpts = append(nodeOpts, node.WithRendezvous(pubsub.WithDiscoveryOpts(discovery.Limit(45), discovery.TTL(time.Duration(20)*time.Second))))
|
||||
}
|
||||
|
||||
var discoveredNodes []dnsdisc.DiscoveredNode
|
||||
if options.DNSDiscovery.Enable {
|
||||
if len(options.DNSDiscovery.URLs.Value()) != 0 {
|
||||
|
@ -268,7 +256,6 @@ func Execute(options Options) {
|
|||
|
||||
failOnErr(err, "Wakunode")
|
||||
|
||||
addPeers(wakuNode, options.Rendezvous.Nodes, string(rendezvous.RendezvousID_v001))
|
||||
addPeers(wakuNode, options.Store.Nodes, string(store.StoreID_v20beta4))
|
||||
addPeers(wakuNode, options.LightPush.Nodes, string(lightpush.LightPushID_v20beta1))
|
||||
addPeers(wakuNode, options.Filter.Nodes, string(filter.FilterID_v20beta1))
|
||||
|
|
|
@ -9,20 +9,6 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// RendezvousOptions are settings for enabling the rendezvous protocol for
|
||||
// discovering new nodes
|
||||
type RendezvousOptions struct {
|
||||
Enable bool
|
||||
Nodes []multiaddr.Multiaddr
|
||||
}
|
||||
|
||||
// RendezvousServerOptions are settings to enable the waku node to act as a
|
||||
// rendezvous server
|
||||
type RendezvousServerOptions struct {
|
||||
Enable bool
|
||||
DBPath string
|
||||
}
|
||||
|
||||
// DiscV5Options are settings to enable a modified version of Ethereum’s Node
|
||||
// Discovery Protocol v5 as a means for ambient node discovery.
|
||||
type DiscV5Options struct {
|
||||
|
@ -167,18 +153,16 @@ type Options struct {
|
|||
NAT string
|
||||
PersistPeers bool
|
||||
|
||||
Websocket WSOptions
|
||||
Relay RelayOptions
|
||||
Store StoreOptions
|
||||
Swap SwapOptions
|
||||
Filter FilterOptions
|
||||
LightPush LightpushOptions
|
||||
RLNRelay RLNRelayOptions
|
||||
DiscV5 DiscV5Options
|
||||
Rendezvous RendezvousOptions
|
||||
RendezvousServer RendezvousServerOptions
|
||||
DNSDiscovery DNSDiscoveryOptions
|
||||
Metrics MetricsOptions
|
||||
RPCServer RPCServerOptions
|
||||
RESTServer RESTServerOptions
|
||||
Websocket WSOptions
|
||||
Relay RelayOptions
|
||||
Store StoreOptions
|
||||
Swap SwapOptions
|
||||
Filter FilterOptions
|
||||
LightPush LightpushOptions
|
||||
RLNRelay RLNRelayOptions
|
||||
DiscV5 DiscV5Options
|
||||
DNSDiscovery DNSDiscoveryOptions
|
||||
Metrics MetricsOptions
|
||||
RPCServer RPCServerOptions
|
||||
RESTServer RESTServerOptions
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
package persistence
|
||||
|
||||
import (
|
||||
rendezvous "github.com/status-im/go-waku-rendezvous"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||
"github.com/syndtr/goleveldb/leveldb/util"
|
||||
)
|
||||
|
||||
// RendezVousLevelDB is a struct used to hold a reference to a LevelDB database
|
||||
type RendezVousLevelDB struct {
|
||||
db *leveldb.DB
|
||||
}
|
||||
|
||||
// NewRendezVousLevelDB opens a LevelDB database to be used for rendezvous protocol
|
||||
func NewRendezVousLevelDB(dBPath string) (*RendezVousLevelDB, error) {
|
||||
db, err := leveldb.OpenFile(dBPath, &opt.Options{OpenFilesCacheCapacity: 3})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &RendezVousLevelDB{db}, nil
|
||||
}
|
||||
|
||||
// Delete removes a key from the database
|
||||
func (r *RendezVousLevelDB) Delete(key []byte) error {
|
||||
return r.db.Delete(key, nil)
|
||||
}
|
||||
|
||||
// Put inserts or updates a key in the database
|
||||
func (r *RendezVousLevelDB) Put(key []byte, value []byte) error {
|
||||
return r.db.Put(key, value, nil)
|
||||
}
|
||||
|
||||
// NewIterator returns an interator that can be used to iterate over all
|
||||
// the records contained in the DB
|
||||
func (r *RendezVousLevelDB) NewIterator(prefix []byte) rendezvous.Iterator {
|
||||
return r.db.NewIterator(util.BytesPrefix(prefix), nil)
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package persistence
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestRendezVousWithLevelDb(t *testing.T) {
|
||||
dbPath := "/tmp/rendezvoustest"
|
||||
rdv, err := NewRendezVousLevelDB(dbPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = rdv.Put([]byte("key"), []byte("value"))
|
||||
require.NoError(t, err)
|
||||
|
||||
val, err := rdv.db.Get([]byte("key"), nil)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte("value"), val)
|
||||
|
||||
it := rdv.NewIterator(nil)
|
||||
ok := it.Next()
|
||||
require.True(t, ok)
|
||||
require.Equal(t, []byte("key"), it.Key())
|
||||
require.Equal(t, []byte("value"), it.Value())
|
||||
ok = it.Next()
|
||||
require.False(t, ok)
|
||||
|
||||
err = rdv.Delete([]byte("key"))
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = rdv.db.Get([]byte("key"), nil)
|
||||
require.Error(t, err)
|
||||
}
|
|
@ -24,7 +24,6 @@ import (
|
|||
ma "github.com/multiformats/go-multiaddr"
|
||||
"go.opencensus.io/stats"
|
||||
|
||||
rendezvous "github.com/status-im/go-waku-rendezvous"
|
||||
"github.com/status-im/go-waku/logging"
|
||||
"github.com/status-im/go-waku/waku/try"
|
||||
v2 "github.com/status-im/go-waku/waku/v2"
|
||||
|
@ -67,14 +66,13 @@ type WakuNode struct {
|
|||
opts *WakuNodeParameters
|
||||
log *zap.Logger
|
||||
|
||||
relay *relay.WakuRelay
|
||||
filter *filter.WakuFilter
|
||||
lightPush *lightpush.WakuLightPush
|
||||
rendezvous *rendezvous.RendezvousService
|
||||
store store.Store
|
||||
swap *swap.WakuSwap
|
||||
rlnRelay RLNRelay
|
||||
wakuFlag utils.WakuEnrBitfield
|
||||
relay *relay.WakuRelay
|
||||
filter *filter.WakuFilter
|
||||
lightPush *lightpush.WakuLightPush
|
||||
store store.Store
|
||||
swap *swap.WakuSwap
|
||||
rlnRelay RLNRelay
|
||||
wakuFlag utils.WakuEnrBitfield
|
||||
|
||||
localNode *enode.LocalNode
|
||||
|
||||
|
@ -281,11 +279,6 @@ func (w *WakuNode) Start() error {
|
|||
w.filter = filter
|
||||
}
|
||||
|
||||
if w.opts.enableRendezvous {
|
||||
rendezvous := rendezvous.NewRendezvousDiscovery(w.host)
|
||||
w.opts.wOpts = append(w.opts.wOpts, pubsub.WithDiscovery(rendezvous, w.opts.rendezvousOpts...))
|
||||
}
|
||||
|
||||
err := w.setupENR(w.ListenAddresses())
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -321,13 +314,6 @@ func (w *WakuNode) Start() error {
|
|||
}
|
||||
}
|
||||
|
||||
if w.opts.enableRendezvousServer {
|
||||
err := w.mountRendezvous()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Subscribe store to topic
|
||||
if w.opts.storeMsgs {
|
||||
w.log.Info("Subscribing store to broadcaster")
|
||||
|
@ -355,10 +341,6 @@ func (w *WakuNode) Stop() {
|
|||
defer w.identificationEventSub.Close()
|
||||
defer w.addressChangesSub.Close()
|
||||
|
||||
if w.rendezvous != nil {
|
||||
w.rendezvous.Stop()
|
||||
}
|
||||
|
||||
if w.filter != nil {
|
||||
w.filter.Stop()
|
||||
}
|
||||
|
@ -492,17 +474,6 @@ func (w *WakuNode) mountDiscV5() error {
|
|||
return err
|
||||
}
|
||||
|
||||
func (w *WakuNode) mountRendezvous() error {
|
||||
w.rendezvous = rendezvous.NewRendezvousService(w.host, w.opts.rendevousStorage)
|
||||
|
||||
if err := w.rendezvous.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
w.log.Info("Rendezvous service started")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *WakuNode) startStore() {
|
||||
w.store.Start(w.ctx)
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
manet "github.com/multiformats/go-multiaddr/net"
|
||||
rendezvous "github.com/status-im/go-waku-rendezvous"
|
||||
"github.com/status-im/go-waku/waku/v2/protocol/filter"
|
||||
"github.com/status-im/go-waku/waku/v2/protocol/pb"
|
||||
"github.com/status-im/go-waku/waku/v2/protocol/store"
|
||||
|
@ -72,11 +71,6 @@ type WakuNodeParameters struct {
|
|||
swapDisconnectThreshold int
|
||||
swapPaymentThreshold int
|
||||
|
||||
enableRendezvous bool
|
||||
enableRendezvousServer bool
|
||||
rendevousStorage rendezvous.Storage
|
||||
rendezvousOpts []pubsub.DiscoverOpt
|
||||
|
||||
enableDiscV5 bool
|
||||
udpPort int
|
||||
discV5bootnodes []*enode.Node
|
||||
|
@ -283,26 +277,6 @@ func WithDiscoveryV5(udpPort int, bootnodes []*enode.Node, autoUpdate bool, disc
|
|||
}
|
||||
}
|
||||
|
||||
// WithRendezvous is a WakuOption used to enable go-waku-rendezvous discovery.
|
||||
// It accepts an optional list of DiscoveryOpt options
|
||||
func WithRendezvous(discoverOpts ...pubsub.DiscoverOpt) WakuNodeOption {
|
||||
return func(params *WakuNodeParameters) error {
|
||||
params.enableRendezvous = true
|
||||
params.rendezvousOpts = discoverOpts
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithRendezvousServer is a WakuOption used to set the node as a rendezvous
|
||||
// point, using an specific storage for the peer information
|
||||
func WithRendezvousServer(storage rendezvous.Storage) WakuNodeOption {
|
||||
return func(params *WakuNodeParameters) error {
|
||||
params.enableRendezvousServer = true
|
||||
params.rendevousStorage = storage
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithWakuFilter enables the Waku V2 Filter protocol. This WakuNodeOption
|
||||
// accepts a list of WakuFilter gossipsub options to setup the protocol
|
||||
func WithWakuFilter(fullNode bool, filterOpts ...filter.Option) WakuNodeOption {
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
rendezvous "github.com/status-im/go-waku-rendezvous"
|
||||
"github.com/status-im/go-waku/tests"
|
||||
"github.com/status-im/go-waku/waku/persistence"
|
||||
"github.com/status-im/go-waku/waku/v2/protocol/store"
|
||||
|
@ -41,8 +40,6 @@ func TestWakuOptions(t *testing.T) {
|
|||
WithPrivateKey(prvKey),
|
||||
WithLibP2POptions(),
|
||||
WithWakuRelay(),
|
||||
WithRendezvous(),
|
||||
WithRendezvousServer(rendezvous.NewStorage(nil)),
|
||||
WithWakuFilter(true),
|
||||
WithDiscoveryV5(123, nil, false),
|
||||
WithWakuStore(true, true),
|
||||
|
|
Loading…
Reference in New Issue