diff --git a/README.md b/README.md index 98a8c6b0b888063c9ffd447641f55a0d5339a191..0cd7989af96e9851126932c253e8385c3f9ea8d7 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ client --password user1-password --ndf ndf.json -l client1.log -s user1session - client --password user2-password --ndf ndf.json -l client2.log -s user2session --writeContact user2-contact.json --unsafe -m "Hi" # Send E2E Messages -client --password user1-password --ndf ndf.json -l client1.log -s user1session --destfile user2-contact.json --unsafe-channel-creation -m "Hi User 2, from User 1 with E2E Encryption" & +client --password user1-password --ndf ndf.json -l client1.log -s user1session --destfile user1-contact.json --unsafe-channel-creation -m "Hi User 2, from User 1 with E2E Encryption" & client --password user2-password --ndf ndf.json -l client2.log -s user2session --destfile user1-contact.json --unsafe-channel-creation -m "Hi User 1, from User 2 with E2E Encryption" & ``` diff --git a/api/client.go b/api/client.go index d3cb829b84b0f87b2743d259cfe884973cb070d4..9068708d01307030a811065b810588d8614b677c 100644 --- a/api/client.go +++ b/api/client.go @@ -8,6 +8,7 @@ package api import ( + "gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/primitives/id" "time" @@ -226,6 +227,16 @@ func Login(storageDir string, password []byte, parameters params.Network) (*Clie "or track network.") } + if def.Notification.Address != "" { + hp := connect.GetDefaultHostParams() + hp.AuthEnabled = false + hp.MaxRetries = 5 + _, err = c.comms.AddHost(&id.NotificationBot, def.Notification.Address, []byte(def.Notification.TlsCertificate), hp) + if err != nil { + jww.WARN.Printf("Failed adding host for notifications: %+v", err) + } + } + // Initialize network and link it to context c.network, err = network.NewManager(c.storage, c.switchboard, c.rng, c.comms, parameters, def) diff --git a/api/notifications.go b/api/notifications.go index dff1977765b31b98297feaa75827e1b2edc71fd6..99ab1d89c79faa1c955d4c2e8f587f20e2f48d60 100644 --- a/api/notifications.go +++ b/api/notifications.go @@ -7,7 +7,16 @@ package api -import jww "github.com/spf13/jwalterweatherman" +import ( + "fmt" + "github.com/pkg/errors" + jww "github.com/spf13/jwalterweatherman" + "gitlab.com/elixxir/comms/mixmessages" + "gitlab.com/elixxir/crypto/hash" + "gitlab.com/xx_network/crypto/signature/rsa" + "gitlab.com/xx_network/primitives/id" + "gitlab.com/xx_network/primitives/id/ephemeral" +) // RegisterForNotifications allows a client to register for push // notifications. @@ -15,24 +24,34 @@ import jww "github.com/spf13/jwalterweatherman" // especially as these rely on third parties (i.e., Firebase *cough* // *cough* google's palantir *cough*) that may represent a security // risk to the user. -func (c *Client) RegisterForNotifications(token []byte) error { +func (c *Client) RegisterForNotifications(token string) error { jww.INFO.Printf("RegisterForNotifications(%s)", token) - // // Pull the host from the manage - // notificationBotHost, ok := cl.receptionManager.Comms.GetHost(&id.NotificationBot) - // if !ok { - // return errors.New("Failed to retrieve host for notification bot") - // } - - // // Send the register message - // _, err := cl.receptionManager.Comms.RegisterForNotifications(notificationBotHost, - // &mixmessages.NotificationToken{ - // Token: notificationToken, - // }) - // if err != nil { - // err := errors.Errorf( - // "RegisterForNotifications: Unable to register for notifications! %s", err) - // return err - // } + fmt.Println("RegisterforNotifications") + // Pull the host from the manage + notificationBotHost, ok := c.comms.GetHost(&id.NotificationBot) + if !ok { + return errors.New("RegisterForNotifications: Failed to retrieve host for notification bot") + } + intermediaryReceptionID, sig, err := c.getIidAndSig() + if err != nil { + return err + } + fmt.Println("Sending message") + // Send the register message + _, err = c.comms.RegisterForNotifications(notificationBotHost, + &mixmessages.NotificationRegisterRequest{ + Token: token, + IntermediaryId: intermediaryReceptionID, + TransmissionRsa: rsa.CreatePublicKeyPem(c.GetUser().TransmissionRSA.GetPublic()), + TransmissionRsaSig: sig, + TransmissionSalt: c.GetUser().TransmissionSalt, + IIDTransmissionRsaSig: []byte("temp"), + }) + if err != nil { + err := errors.Errorf( + "RegisterForNotifications: Unable to register for notifications! %s", err) + return err + } return nil } @@ -40,19 +59,46 @@ func (c *Client) RegisterForNotifications(token []byte) error { // UnregisterForNotifications turns of notifications for this client func (c *Client) UnregisterForNotifications() error { jww.INFO.Printf("UnregisterForNotifications()") - // // Pull the host from the manage - // notificationBotHost, ok := cl.receptionManager.Comms.GetHost(&id.NotificationBot) - // if !ok { - // return errors.New("Failed to retrieve host for notification bot") - // } - - // // Send the unregister message - // _, err := cl.receptionManager.Comms.UnregisterForNotifications(notificationBotHost) - // if err != nil { - // err := errors.Errorf( - // "RegisterForNotifications: Unable to register for notifications! %s", err) - // return err - // } + // Pull the host from the manage + notificationBotHost, ok := c.comms.GetHost(&id.NotificationBot) + if !ok { + return errors.New("Failed to retrieve host for notification bot") + } + intermediaryReceptionID, sig, err := c.getIidAndSig() + if err != nil { + return err + } + // Send the unregister message + _, err = c.comms.UnregisterForNotifications(notificationBotHost, &mixmessages.NotificationUnregisterRequest{ + IntermediaryId: intermediaryReceptionID, + IIDTransmissionRsaSig: sig, + }) + if err != nil { + err := errors.Errorf( + "RegisterForNotifications: Unable to register for notifications! %s", err) + return err + } return nil } + +func (c *Client) getIidAndSig() ([]byte, []byte, error) { + intermediaryReceptionID, err := ephemeral.GetIntermediaryId(c.GetUser().ReceptionID) + if err != nil { + return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to form intermediary ID") + } + h, err := hash.NewCMixHash() + if err != nil { + return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to create cmix hash") + } + _, err = h.Write(intermediaryReceptionID) + if err != nil { + return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to write intermediary ID to hash") + } + + sig, err := rsa.Sign(c.rng.GetStream(), c.GetUser().TransmissionRSA, hash.CMixHash, h.Sum(nil), nil) + if err != nil { + return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to sign intermediary ID") + } + return intermediaryReceptionID, sig, nil +} diff --git a/api/results.go b/api/results.go index 73d1193ccb9f0d3cb5667d6aa5a9170a2db78a5c..590634b9646f2b92f3b56e29d422145806807d66 100644 --- a/api/results.go +++ b/api/results.go @@ -157,7 +157,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, // Skip if the round is nil (unknown from historical rounds) // they default to timed out, so correct behavior is preserved - if roundReport.RoundInfo == nil || roundReport.TimedOut { + if roundReport.RoundInfo == nil || roundReport.TimedOut { allRoundsSucceeded = false } else { // If available, denote the result @@ -202,7 +202,7 @@ func (c *Client) getHistoricalRounds(msg *pb.HistoricalRounds, } } - if resp == nil{ + if resp == nil { return } diff --git a/auth/confirm.go b/auth/confirm.go index 40c983c6feb73446495bb9307a2c6793fca7b259..30a51181c97f3e8bea4993eac82555152655dc7f 100644 --- a/auth/confirm.go +++ b/auth/confirm.go @@ -13,11 +13,11 @@ import ( "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/storage" - "gitlab.com/xx_network/primitives/id" "gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/crypto/diffieHellman" cAuth "gitlab.com/elixxir/crypto/e2e/auth" "gitlab.com/elixxir/primitives/format" + "gitlab.com/xx_network/primitives/id" "io" ) diff --git a/bindings/client.go b/bindings/client.go index d5c40e456de1b263a48184250cbb67fecc9e0c88..6eafdc35a03be94ad9cfa547f5a0054f60072230 100644 --- a/bindings/client.go +++ b/bindings/client.go @@ -366,15 +366,15 @@ func (c *Client) WaitForMessageDelivery(marshaledSendReport []byte, "WaitForMessageDelivery callback due to bad Send Report: %+v", err)) } - if sr==nil || sr.rl == nil || len(sr.rl.list) == 0{ + if sr == nil || sr.rl == nil || len(sr.rl.list) == 0 { return errors.New(fmt.Sprintf("Failed to "+ - "WaitForMessageDelivery callback due to invalid Send Report " + + "WaitForMessageDelivery callback due to invalid Send Report "+ "unmarshal: %s", string(marshaledSendReport))) } f := func(allRoundsSucceeded, timedOut bool, rounds map[id.Round]api.RoundResult) { results := make([]byte, len(sr.rl.list)) - jww.INFO.Printf("Processing WaitForMessageDelivery report " + + jww.INFO.Printf("Processing WaitForMessageDelivery report "+ "for %v, success: %v, timedout: %v", sr.mid, allRoundsSucceeded, timedOut) for i, r := range sr.rl.list { diff --git a/bindings/message.go b/bindings/message.go index 6cead4ad09a8be5fc49433bf9e68e5cf0ab87a9f..32947d5fc3b0fc7e87579bdacd39c1bc69edb404 100644 --- a/bindings/message.go +++ b/bindings/message.go @@ -40,7 +40,7 @@ func (m *Message) GetMessageType() int { // Returns the message's timestamp in ms func (m *Message) GetTimestampMS() int64 { ts := m.r.Timestamp.UnixNano() - ts = (ts+999999)/1000000 + ts = (ts + 999999) / 1000000 return ts } diff --git a/bindings/notifications.go b/bindings/notifications.go new file mode 100644 index 0000000000000000000000000000000000000000..461f15c324d55c144372161157e2d76cb0108869 --- /dev/null +++ b/bindings/notifications.go @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2021 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + +package bindings + +import ( + "encoding/base64" + "github.com/pkg/errors" + "gitlab.com/elixxir/crypto/fingerprint" + "gitlab.com/xx_network/primitives/id" +) + +// NotificationForMe Check if a notification received is for me +func NotificationForMe(messageHash, idFP string, receptionId []byte) (bool, error) { + messageHashBytes, err := base64.StdEncoding.DecodeString(messageHash) + if err != nil { + return false, errors.WithMessage(err, "Failed to decode message ID") + } + idFpBytes, err := base64.StdEncoding.DecodeString(idFP) + if err != nil { + return false, errors.WithMessage(err, "Failed to decode identity fingerprint") + } + rid, err := id.Unmarshal(receptionId) + if err != nil { + return false, errors.WithMessage(err, "Failed to unmartial reception ID") + } + return fingerprint.CheckIdentityFpFromMessageHash(idFpBytes, messageHashBytes, rid), nil +} + +// RegisterForNotifications accepts firebase messaging token +func (c *Client) RegisterForNotifications(token string) error { + return c.api.RegisterForNotifications(token) +} + +// UnregisterForNotifications unregister user for notifications +func (c *Client) UnregisterForNotifications() error { + return c.api.UnregisterForNotifications() +} diff --git a/bindings/notifications_test.go b/bindings/notifications_test.go new file mode 100644 index 0000000000000000000000000000000000000000..c30e6e175566905a59b60ef4a570adcca77af3f9 --- /dev/null +++ b/bindings/notifications_test.go @@ -0,0 +1,23 @@ +package bindings + +import ( + "encoding/base64" + "gitlab.com/elixxir/crypto/fingerprint" + "gitlab.com/xx_network/primitives/id" + "testing" +) + +func TestNotificationForMe(t *testing.T) { + payload := []byte("I'm a payload") + hash := fingerprint.GetMessageHash(payload) + rid := id.NewIdFromString("zezima", id.User, t) + fp := fingerprint.IdentityFP(payload, rid) + + ok, err := NotificationForMe(base64.StdEncoding.EncodeToString(hash), base64.StdEncoding.EncodeToString(fp), rid.Bytes()) + if err != nil { + t.Errorf("Failed to check notification: %+v", err) + } + if !ok { + t.Error("Should have gotten ok response") + } +} diff --git a/bindings/send.go b/bindings/send.go index 673fad0003ac009b707de67be8f3edc9804f639f..886bf0ea819557c50ddef4b41846d0ae3d5a5d00 100644 --- a/bindings/send.go +++ b/bindings/send.go @@ -135,9 +135,9 @@ type SendReport struct { mid e2e.MessageID } -type SendReportDisk struct{ +type SendReportDisk struct { List []id.Round - Mid []byte + Mid []byte } func (sr *SendReport) GetRoundList() *RoundList { @@ -157,14 +157,13 @@ func (sr *SendReport) Marshal() ([]byte, error) { } func (sr *SendReport) Unmarshal(b []byte) error { - srd := SendReportDisk{ - } - if err := json.Unmarshal(b, &srd); err!=nil{ - return errors.New(fmt.Sprintf("Failed to unmarshal send " + + srd := SendReportDisk{} + if err := json.Unmarshal(b, &srd); err != nil { + return errors.New(fmt.Sprintf("Failed to unmarshal send "+ "report: %s", err.Error())) } - copy(sr.mid[:],srd.Mid) - sr.rl = &RoundList{list:srd.List} + copy(sr.mid[:], srd.Mid) + sr.rl = &RoundList{list: srd.List} return nil } diff --git a/cmd/root.go b/cmd/root.go index 567dfa016e59a06bde1da0e187f254997d71ba72..01b245cec199c3d1ceb726de9c3b1938c7261614 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -62,6 +62,7 @@ var rootCmd = &cobra.Command{ recipientID, isPrecanPartner = parseRecipient( viper.GetString("destid")) } + fmt.Println(isPrecanPartner) // Set it to myself if recipientID == nil { @@ -115,6 +116,11 @@ var rootCmd = &cobra.Command{ client.GetHealth().AddChannel(connected) waitUntilConnected(connected) + //err = client.RegisterForNotifications([]byte("dJwuGGX3KUyKldWK5PgQH8:APA91bFjuvimRc4LqOyMDiy124aLedifA8DhldtaB_b76ggphnFYQWJc_fq0hzQ-Jk4iYp2wPpkwlpE1fsOjs7XWBexWcNZoU-zgMiM0Mso9vTN53RhbXUferCbAiEylucEOacy9pniN")) + //if err != nil { + // jww.FATAL.Panicf("Failed to register for notifications: %+v", err) + //} + // After connection, make sure we have registered with at least // 85% of the nodes numReg := 1 @@ -249,6 +255,7 @@ var rootCmd = &cobra.Command{ } } fmt.Printf("Received %d\n", receiveCnt) + err = client.StopNetworkFollower(5 * time.Second) if err != nil { jww.WARN.Printf( @@ -322,12 +329,12 @@ func createClient() *api.Client { } else { if userIDprefix != "" { err = api.NewVanityClient(string(ndfJSON), storeDir, - []byte(pass), regCode, userIDprefix) + []byte(pass), regCode, userIDprefix) } else { err = api.NewClient(string(ndfJSON), storeDir, - []byte(pass), regCode) + []byte(pass), regCode) } - + } if err != nil { diff --git a/go.mod b/go.mod index 20c85a77446311ad7223fb314e0e7bbfa0aa5108..5e81fe817c08d39457e3e17a384ee0fd791d8508 100644 --- a/go.mod +++ b/go.mod @@ -6,26 +6,26 @@ require ( github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang/protobuf v1.4.3 github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect - github.com/magiconair/properties v1.8.5 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect - github.com/pelletier/go-toml v1.9.0 // indirect + github.com/magiconair/properties v1.8.4 // indirect + github.com/mitchellh/mapstructure v1.4.0 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect github.com/pkg/errors v0.9.1 github.com/smartystreets/assertions v1.0.1 // indirect + github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.1.1 github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/viper v1.7.1 gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228 - gitlab.com/elixxir/comms v0.0.4-0.20210429182303-0edbda5e1b2c - gitlab.com/elixxir/crypto v0.0.7-0.20210429182057-898c75770293 + gitlab.com/elixxir/comms v0.0.4-0.20210429222550-0cbb396aaacd + gitlab.com/elixxir/crypto v0.0.7-0.20210413184512-e41c09223958 gitlab.com/elixxir/ekv v0.1.5 - gitlab.com/elixxir/primitives v0.0.3-0.20210429180244-cdbb97da0c16 - gitlab.com/xx_network/comms v0.0.4-0.20210426213447-82674e09e402 - gitlab.com/xx_network/crypto v0.0.5-0.20210420170153-2a6276844076 + gitlab.com/elixxir/primitives v0.0.3-0.20210427004615-c68ecf15fcf3 + gitlab.com/xx_network/comms v0.0.4-0.20210409202820-eb3dca6571d3 + gitlab.com/xx_network/crypto v0.0.5-0.20210405224157-2b1f387b42c1 gitlab.com/xx_network/primitives v0.0.4-0.20210402222416-37c1c4d3fac4 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 - golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 // indirect - golang.org/x/text v0.3.6 // indirect + golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1 // indirect google.golang.org/grpc v1.34.0 // indirect google.golang.org/protobuf v1.26.0-rc.1 diff --git a/go.sum b/go.sum index 9c4b366bf5651eff852a775187540585485b0aca..84056af7e3188a65bba555a06f2b5671f773e700 100644 --- a/go.sum +++ b/go.sum @@ -133,6 +133,7 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= @@ -145,8 +146,8 @@ github.com/liyue201/goqr v0.0.0-20200803022322-df443203d4ea h1:uyJ13zfy6l79CM3Hn github.com/liyue201/goqr v0.0.0-20200803022322-df443203d4ea/go.mod h1:w4pGU9PkiX2hAWyF0yuHEHmYTQFAd6WHzp6+IY7JVjE= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -161,8 +162,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -173,12 +174,13 @@ github.com/nyaruka/phonenumbers v1.0.60/go.mod h1:sDaTZ/KPX5f8qyV9qN+hIm+4ZBARJr github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.0 h1:NOd0BRdOKpPf0SxkL3HxSQOG7rNh+4kl6PHcBPFs7Q0= -github.com/pelletier/go-toml v1.9.0/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/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= @@ -208,13 +210,14 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= +github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -250,18 +253,32 @@ github.com/zeebo/pcg v1.0.0 h1:dt+dx+HvX8g7Un32rY9XWoYnd0NmKmrIzpHF7qiTDj0= github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228 h1:Gi6rj4mAlK0BJIk1HIzBVMjWNjIUfstrsXC2VqLYPcA= gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k= -gitlab.com/elixxir/comms v0.0.4-0.20210427005410-7ae183abda2a h1:u3bGNs0IRcFw+OtRNBR87UCRWHLA57TkSF80HdReg4U= -gitlab.com/elixxir/comms v0.0.4-0.20210427005410-7ae183abda2a/go.mod h1:r9zz08vO5MjzAsfA6yd978PIkm0dVYAo4EooXc/ES1M= -gitlab.com/elixxir/comms v0.0.4-0.20210429182303-0edbda5e1b2c h1:+6hshgCT43Z4f+nNQUeIZGdIYhch5dGgJLcMzyUPujo= -gitlab.com/elixxir/comms v0.0.4-0.20210429182303-0edbda5e1b2c/go.mod h1:eRkJ3+6afFAqTyHneUN04ix4MIV16F52/GMHaNbGXZU= +gitlab.com/elixxir/comms v0.0.4-0.20210409192302-249b5af3dbc8 h1:k9BLWNw7CHwH4H3gNWA0Q/BXNg7923AFflWJtYZr5z4= +gitlab.com/elixxir/comms v0.0.4-0.20210409192302-249b5af3dbc8/go.mod h1:/y5QIivolXMa6TO+ZqFWAV49wxlXXxUCqZH9Zi82kXU= +gitlab.com/elixxir/comms v0.0.4-0.20210413160356-853e51fc18e5 h1:Q/+lhZpIDQdIKy9aXNCLkCk8AavFE7HAuaila0sv5mw= +gitlab.com/elixxir/comms v0.0.4-0.20210413160356-853e51fc18e5/go.mod h1:0XsJ63n7knUeSX9BDKQG7xGtX6w0l5WsfplSsMbP9iM= +gitlab.com/elixxir/comms v0.0.4-0.20210418162540-e8b5e8c46988 h1:MjMxUPNrTaJcWblWEFtDory8zNnOt9ACqZSK3E2s7hU= +gitlab.com/elixxir/comms v0.0.4-0.20210418162540-e8b5e8c46988/go.mod h1:ld2cWRyYD9jxAFRR1FYAZce7FV25YMIjKUdCJF7Of44= +gitlab.com/elixxir/comms v0.0.4-0.20210423203408-dc8bf3dbd86b h1:iie2Lsj/kMBi7io426X5rHONUtJdOr5bqSeCFBN22qY= +gitlab.com/elixxir/comms v0.0.4-0.20210423203408-dc8bf3dbd86b/go.mod h1:ld2cWRyYD9jxAFRR1FYAZce7FV25YMIjKUdCJF7Of44= +gitlab.com/elixxir/comms v0.0.4-0.20210429222550-0cbb396aaacd h1:goYpN2Zg0x/QxZt0OiyvZsgRlJyP/m9NH+vY8lLm65Y= +gitlab.com/elixxir/comms v0.0.4-0.20210429222550-0cbb396aaacd/go.mod h1:ld2cWRyYD9jxAFRR1FYAZce7FV25YMIjKUdCJF7Of44= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4 h1:28ftZDeYEko7xptCZzeFWS1Iam95dj46TWFVVlKmw6A= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c= gitlab.com/elixxir/crypto v0.0.3 h1:znCt/x2bL4y8czTPaaFkwzdgSgW3BJc/1+dxyf1jqVw= gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= -gitlab.com/elixxir/crypto v0.0.7-0.20210427005255-4fe1bcf69c5a h1:DX+PiQ/koxI/uNNqAxUiFJXP+nbl5qN1u3lBElpauzQ= -gitlab.com/elixxir/crypto v0.0.7-0.20210427005255-4fe1bcf69c5a/go.mod h1:XuDhkhjI/h1w8OQW8neyP9hvt2KMH/GSCjRQTWg2AEk= -gitlab.com/elixxir/crypto v0.0.7-0.20210429182057-898c75770293 h1:7f7rYmDI1HvSgT0+1xhSb7rM5zxQjG005byDtr4BqX0= -gitlab.com/elixxir/crypto v0.0.7-0.20210429182057-898c75770293/go.mod h1:e2tQyVZR4Tbj4ashHIDF2k55Gj2MT+J6qhZxrszPA74= +gitlab.com/elixxir/crypto v0.0.7-0.20210409192145-eab67f2f8931 h1:kY/qBfjrZTFHJnvM1IcxB03+ZQL4+ESUjV4I4kCxoE8= +gitlab.com/elixxir/crypto v0.0.7-0.20210409192145-eab67f2f8931/go.mod h1:ZktO3MT3oNo+g2Nq0GuC3ebJWJphh7t5KwwDDGBegnY= +gitlab.com/elixxir/crypto v0.0.7-0.20210412193049-f3718fa4facb h1:9CT5f+nV4sisutLx8Z3BAEiqjktcCL2ZpEqcpmgzyqA= +gitlab.com/elixxir/crypto v0.0.7-0.20210412193049-f3718fa4facb/go.mod h1:ZktO3MT3oNo+g2Nq0GuC3ebJWJphh7t5KwwDDGBegnY= +gitlab.com/elixxir/crypto v0.0.7-0.20210412195114-be927031747a h1:DSYIXSCWrwkyHUs2fJMliI4+Bd9h+WA5PXI78uvhCj4= +gitlab.com/elixxir/crypto v0.0.7-0.20210412195114-be927031747a/go.mod h1:HMMRBuv/yMqB5c31G9OPlOAifOOqGypCyD5v6py+4vo= +gitlab.com/elixxir/crypto v0.0.7-0.20210412231025-6f75c577f803 h1:8sLODlAYRT0Y9NA+uoMoF1qBrBRrW5TikyKAOvyCd+E= +gitlab.com/elixxir/crypto v0.0.7-0.20210412231025-6f75c577f803/go.mod h1:HMMRBuv/yMqB5c31G9OPlOAifOOqGypCyD5v6py+4vo= +gitlab.com/elixxir/crypto v0.0.7-0.20210413182603-9525e6071fa7 h1:V004OOQrZ6F0iH4BwjObFWbWWqzvKbXRd3Dv2UEz6AI= +gitlab.com/elixxir/crypto v0.0.7-0.20210413182603-9525e6071fa7/go.mod h1:HMMRBuv/yMqB5c31G9OPlOAifOOqGypCyD5v6py+4vo= +gitlab.com/elixxir/crypto v0.0.7-0.20210413184512-e41c09223958 h1:tjEWlRieizWKnHFV1Q0nNegHT5QJJf9hECiM7nJSbik= +gitlab.com/elixxir/crypto v0.0.7-0.20210413184512-e41c09223958/go.mod h1:HMMRBuv/yMqB5c31G9OPlOAifOOqGypCyD5v6py+4vo= gitlab.com/elixxir/ekv v0.1.5 h1:R8M1PA5zRU1HVnTyrtwybdABh7gUJSCvt1JZwUSeTzk= gitlab.com/elixxir/ekv v0.1.5/go.mod h1:e6WPUt97taFZe5PFLPb1Dupk7tqmDCTQu1kkstqJvw4= gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= @@ -269,18 +286,20 @@ gitlab.com/elixxir/primitives v0.0.0-20200804170709-a1896d262cd9/go.mod h1:p0Vel gitlab.com/elixxir/primitives v0.0.0-20200804182913-788f47bded40/go.mod h1:tzdFFvb1ESmuTCOl1z6+yf6oAICDxH2NPUemVgoNLxc= gitlab.com/elixxir/primitives v0.0.1 h1:q61anawANlNAExfkeQEE1NCsNih6vNV1FFLoUQX6txQ= gitlab.com/elixxir/primitives v0.0.1/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE= +gitlab.com/elixxir/primitives v0.0.3-0.20210409190923-7bf3cd8d97e7 h1:q3cw7WVtD6hDqTi8ydky+yiqJ4RkWp/hkTSNirr9Z6Y= +gitlab.com/elixxir/primitives v0.0.3-0.20210409190923-7bf3cd8d97e7/go.mod h1:h0QHrjrixLNaP24ZXAgDOZXP4eegrQ24BCZPGitg8Jg= gitlab.com/elixxir/primitives v0.0.3-0.20210427004615-c68ecf15fcf3 h1:fQZzwSDzFymbXlTPVCDTrnBkOhFAx4fACwZQHpmTVOY= gitlab.com/elixxir/primitives v0.0.3-0.20210427004615-c68ecf15fcf3/go.mod h1:h0QHrjrixLNaP24ZXAgDOZXP4eegrQ24BCZPGitg8Jg= -gitlab.com/elixxir/primitives v0.0.3-0.20210429180244-cdbb97da0c16 h1:ZIXWpEbSWUrVvqtrmo5/MVvDJm94eX5j2dgtGptkt6U= -gitlab.com/elixxir/primitives v0.0.3-0.20210429180244-cdbb97da0c16/go.mod h1:h0QHrjrixLNaP24ZXAgDOZXP4eegrQ24BCZPGitg8Jg= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= -gitlab.com/xx_network/comms v0.0.4-0.20210426213447-82674e09e402 h1:owWfI0mh31/nUV8Dh70z+inpFhU4GItlpsjsqYnWn7c= -gitlab.com/xx_network/comms v0.0.4-0.20210426213447-82674e09e402/go.mod h1:PIgq/b4ucczEqCWAmPEnht/4QJw57+mPSICHiyMEstU= +gitlab.com/xx_network/comms v0.0.4-0.20210406210737-45d1e87d294a h1:r0mvBjHPBCYEVmhEe6JhLQDc0+dCORf1ejtuZ8IbyKY= +gitlab.com/xx_network/comms v0.0.4-0.20210406210737-45d1e87d294a/go.mod h1:7ciuA+LTE0GC7upviGbyyb2hrpJG9Pnq2cc5oz2N5Ss= +gitlab.com/xx_network/comms v0.0.4-0.20210409202820-eb3dca6571d3 h1:0o9kveRSEQ9ykRh/hd+z9Iq53YNvFArW1RQ6ICdAG5g= +gitlab.com/xx_network/comms v0.0.4-0.20210409202820-eb3dca6571d3/go.mod h1:7ciuA+LTE0GC7upviGbyyb2hrpJG9Pnq2cc5oz2N5Ss= gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= gitlab.com/xx_network/crypto v0.0.4 h1:lpKOL5mTJ2awWMfgBy30oD/UvJVrWZzUimSHlOdZZxo= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= -gitlab.com/xx_network/crypto v0.0.5-0.20210420170153-2a6276844076 h1:bLR43541fUUhPTMGuCWKz7IEQevAm4OeTBVtsDt8tgg= -gitlab.com/xx_network/crypto v0.0.5-0.20210420170153-2a6276844076/go.mod h1:CUhRpioyLaKIylg+LIyZX1rhOmFaEXQQ6esNycx9dcA= +gitlab.com/xx_network/crypto v0.0.5-0.20210405224157-2b1f387b42c1 h1:4Hrphjtqn3vO8LI872YwVKy5dCFJdD5u0dE4O2QCZqU= +gitlab.com/xx_network/crypto v0.0.5-0.20210405224157-2b1f387b42c1/go.mod h1:CUhRpioyLaKIylg+LIyZX1rhOmFaEXQQ6esNycx9dcA= gitlab.com/xx_network/primitives v0.0.0-20200803231956-9b192c57ea7c/go.mod h1:wtdCMr7DPePz9qwctNoAUzZtbOSHSedcK++3Df3psjA= gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da h1:CCVslUwNC7Ul7NG5nu3ThGTSVUt1TxNRX+47f5TUwnk= gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK9xevzWCaPO7b1wiluVJGk7R5ZsuC7pHY5hteZFQug= @@ -301,6 +320,7 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -380,8 +400,8 @@ golang.org/x/sys v0.0.0-20201014080544-cc95f250f6bc/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d h1:jbzgAvDZn8aEnytae+4ou0J0GwFZoHR0hOrTg4qH8GA= golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -391,8 +411,6 @@ golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -467,6 +485,7 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/network/follow.go b/network/follow.go index e761d2aa507f24e23e0028fff56ce4e3db2f998f..259e9b2a0390f9f78fee741c1ba32f75e23dd660 100644 --- a/network/follow.go +++ b/network/follow.go @@ -24,8 +24,6 @@ package network import ( "fmt" - "sync/atomic" - "time" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/network/rounds" @@ -34,6 +32,8 @@ import ( "gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" + "sync/atomic" + "time" ) const debugTrackPeriod = 1 * time.Minute @@ -114,6 +114,7 @@ func (m *manager) follow(report interfaces.ClientErrorReport, rng csprng.Source, if err != nil { return } + pollResp := result.(*pb.GatewayPollResponse) // ---- Process Network State Update Data ---- @@ -219,12 +220,11 @@ func (m *manager) follow(report interfaces.ClientErrorReport, rng csprng.Source, return } - //prepare the filter objects for processing filterList := make([]*rounds.RemoteFilter, 0, filtersEnd-filtersStart) for i := filtersStart; i < filtersEnd; i++ { if len(pollResp.Filters.Filters[i].Filter) != 0 { - filterList= append(filterList,rounds.NewRemoteFilter(pollResp.Filters.Filters[i])) + filterList = append(filterList, rounds.NewRemoteFilter(pollResp.Filters.Filters[i])) } } diff --git a/network/message/handler.go b/network/message/handler.go index 88484e6fb98672520bf3e39af0cd3175597b53b4..b8892cff56f51009558998fcd74b1fa027c4a712 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -48,14 +48,11 @@ func (m *Manager) handleMessage(ecrMsg format.Message, identity reception.Identi var relationshipFingerprint []byte //check if the identity fingerprint matches - forMe, err := fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(), + forMe := fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(), ecrMsg.GetContents(), identity.Source) - if err != nil { - jww.FATAL.Panicf("Could not check IdentityFingerprint: %+v", err) - } if !forMe { if jww.GetLogThreshold() == jww.LevelTrace { - expectedFP, _ := fingerprint2.IdentityFP(ecrMsg.GetContents(), + expectedFP := fingerprint2.IdentityFP(ecrMsg.GetContents(), identity.Source) jww.TRACE.Printf("Message for %d (%s) failed identity "+ "check: %v (expected) vs %v (received)", identity.EphId, diff --git a/network/message/sendCmix.go b/network/message/sendCmix.go index a3659870b8489cc3ab42e322ae5d6a79f73a54d0..eca56777b03cbd10fc5fba77d6b0a9a96f7b234a 100644 --- a/network/message/sendCmix.go +++ b/network/message/sendCmix.go @@ -34,7 +34,7 @@ type sendCmixCommsInterface interface { } // 1.5 seconds -const sendTimeBuffer = 2500 * time.Millisecond +const sendTimeBuffer = 3500 * time.Millisecond // WARNING: Potentially Unsafe // Public manager function to send a message over CMIX @@ -108,13 +108,7 @@ func sendCmixHelper(sender *gateway.Sender, msg format.Message, recipient *id.ID msg.SetEphemeralRID(ephIdFilled[:]) //set the identity fingerprint - ifp, err := fingerprint.IdentityFP(msg.GetContents(), recipient) - if err != nil { - jww.FATAL.Panicf("failed to generate the Identity "+ - "fingerprint due to unrecoverable error when sending to %s "+ - "(msgDigest: %s): %+v", recipient, msg.Digest(), err) - } - + ifp := fingerprint.IdentityFP(msg.GetContents(), recipient) msg.SetIdentityFP(ifp) //build the topology diff --git a/storage/auth/store.go b/storage/auth/store.go index d6730d03d8fcde7db0ee9edb76cb056942be8b7c..9ce2e6154e3b5bce28f4df6c36cbffca43255fc8 100644 --- a/storage/auth/store.go +++ b/storage/auth/store.go @@ -365,7 +365,7 @@ func (s *Store) Done(partner *id.ID) { s.mux.RUnlock() if !ok { - jww.ERROR.Panicf("Request cannot be finished, not " + + jww.ERROR.Panicf("Request cannot be finished, not "+ "found: %s", partner) return }