Skip to content
Snippets Groups Projects
Commit df0a696f authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'xx-3003/update-id-creation' into 'agile/EphemeralReception'

Xx 3003/update id creation

See merge request !510
parents 9aa8857f f71c88bb
Branches
Tags
No related merge requests found
Showing with 630 additions and 67 deletions
...@@ -346,7 +346,7 @@ func (c *Client) GetHealth() interfaces.HealthTracker { ...@@ -346,7 +346,7 @@ func (c *Client) GetHealth() interfaces.HealthTracker {
return c.network.GetHealthTracker() return c.network.GetHealthTracker()
} }
// Returns the switchboard for Registration // Returns the switchboard for Identity
func (c *Client) GetSwitchboard() interfaces.Switchboard { func (c *Client) GetSwitchboard() interfaces.Switchboard {
jww.INFO.Printf("GetSwitchboard()") jww.INFO.Printf("GetSwitchboard()")
return c.switchboard return c.switchboard
......
...@@ -15,6 +15,7 @@ import ( ...@@ -15,6 +15,7 @@ import (
"gitlab.com/elixxir/crypto/e2e" "gitlab.com/elixxir/crypto/e2e"
"gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
) )
//This holds all functions to send messages over the network //This holds all functions to send messages over the network
...@@ -45,23 +46,21 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round, ...@@ -45,23 +46,21 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round,
// recipient. Note that both SendE2E and SendUnsafe call SendCMIX. // recipient. Note that both SendE2E and SendUnsafe call SendCMIX.
// Returns the round ID of the round the payload was sent or an error // Returns the round ID of the round the payload was sent or an error
// if it fails. // if it fails.
func (c *Client) SendCMIX(msg format.Message, param params.CMIX) (id.Round, func (c *Client) SendCMIX(msg format.Message, recipientID *id.ID,
error) { param params.CMIX) (id.Round, ephemeral.Id, error) {
jww.INFO.Printf("SendCMIX(%s)", string(msg.GetContents())) jww.INFO.Printf("SendCMIX(%s)", string(msg.GetContents()))
return c.network.SendCMIX(msg, param) return c.network.SendCMIX(msg, recipientID, param)
} }
// NewCMIXMessage Creates a new cMix message with the right properties // NewCMIXMessage Creates a new cMix message with the right properties
// for the current cMix network. // for the current cMix network.
// FIXME: this is weird and shouldn't be necessary, but it is. // FIXME: this is weird and shouldn't be necessary, but it is.
func (c *Client) NewCMIXMessage(recipient *id.ID, func (c *Client) NewCMIXMessage(contents []byte) (format.Message, error) {
contents []byte) (format.Message, error) {
primeSize := len(c.storage.Cmix().GetGroup().GetPBytes()) primeSize := len(c.storage.Cmix().GetGroup().GetPBytes())
msg := format.NewMessage(primeSize) msg := format.NewMessage(primeSize)
if len(contents) > msg.ContentsSize() { if len(contents) > msg.ContentsSize() {
return format.Message{}, errors.New("Contents to long for cmix") return format.Message{}, errors.New("Contents to long for cmix")
} }
msg.SetContents(contents) msg.SetContents(contents)
msg.SetRecipientID(recipient)
return msg, nil return msg, nil
} }
...@@ -99,7 +99,6 @@ func ConfirmRequestAuth(partner contact.Contact, rng io.Reader, ...@@ -99,7 +99,6 @@ func ConfirmRequestAuth(partner contact.Contact, rng io.Reader,
cmixMsg.SetKeyFP(fp) cmixMsg.SetKeyFP(fp)
cmixMsg.SetMac(mac) cmixMsg.SetMac(mac)
cmixMsg.SetContents(baseFmt.Marshal()) cmixMsg.SetContents(baseFmt.Marshal())
cmixMsg.SetRecipientID(partner.ID)
// fixme: channel can get into a bricked state if the first save occurs and // fixme: channel can get into a bricked state if the first save occurs and
// the second does not or the two occur and the storage into critical // the second does not or the two occur and the storage into critical
...@@ -127,7 +126,7 @@ func ConfirmRequestAuth(partner contact.Contact, rng io.Reader, ...@@ -127,7 +126,7 @@ func ConfirmRequestAuth(partner contact.Contact, rng io.Reader,
storage.GetCriticalRawMessages().AddProcessing(cmixMsg) storage.GetCriticalRawMessages().AddProcessing(cmixMsg)
/*send message*/ /*send message*/
round, err := net.SendCMIX(cmixMsg, params.GetDefaultCMIX()) round, _, err := net.SendCMIX(cmixMsg, partner.ID, params.GetDefaultCMIX())
if err != nil { if err != nil {
// if the send fails just set it to failed, it will but automatically // if the send fails just set it to failed, it will but automatically
// retried // retried
......
...@@ -132,7 +132,6 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, ...@@ -132,7 +132,6 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader,
cmixMsg.SetKeyFP(requestfp) cmixMsg.SetKeyFP(requestfp)
cmixMsg.SetMac(mac) cmixMsg.SetMac(mac)
cmixMsg.SetContents(baseFmt.Marshal()) cmixMsg.SetContents(baseFmt.Marshal())
cmixMsg.SetRecipientID(partner.ID)
jww.INFO.Printf("PARTNER ID: %s", partner.ID) jww.INFO.Printf("PARTNER ID: %s", partner.ID)
/*store state*/ /*store state*/
...@@ -149,11 +148,11 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, ...@@ -149,11 +148,11 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader,
//jww.INFO.Printf("CMIX MESSAGE 1: %s, %v, %v, %v", cmixMsg.GetRecipientID(), //jww.INFO.Printf("CMIX MESSAGE 1: %s, %v, %v, %v", cmixMsg.GetRecipientID(),
// cmixMsg.GetKeyFP(), cmixMsg.GetMac(), cmixMsg.GetContents()) // cmixMsg.GetKeyFP(), cmixMsg.GetMac(), cmixMsg.GetContents())
jww.INFO.Printf("CMIX MESSAGE FP: %s, %v", cmixMsg.GetRecipientID(), jww.INFO.Printf("CMIX MESSAGE FP: %s, %v", partner.ID,
cmixMsg.GetKeyFP()) cmixMsg.GetKeyFP())
/*send message*/ /*send message*/
round, err := net.SendCMIX(cmixMsg, params.GetDefaultCMIX()) round, _, err := net.SendCMIX(cmixMsg, partner.ID, params.GetDefaultCMIX())
if err != nil { if err != nil {
// if the send fails just set it to failed, it will but automatically // if the send fails just set it to failed, it will but automatically
// retried // retried
......
...@@ -43,13 +43,13 @@ func (c *Client) SendCmix(recipient, contents []byte, parameters string) (int, e ...@@ -43,13 +43,13 @@ func (c *Client) SendCmix(recipient, contents []byte, parameters string) (int, e
err)) err))
} }
msg, err := c.api.NewCMIXMessage(u, contents) msg, err := c.api.NewCMIXMessage(contents)
if err != nil { if err != nil {
return -1, errors.New(fmt.Sprintf("Failed to sendCmix: %+v", return -1, errors.New(fmt.Sprintf("Failed to sendCmix: %+v",
err)) err))
} }
rid, err := c.api.SendCMIX(msg, p) rid, _, err := c.api.SendCMIX(msg, u, p)
if err != nil { if err != nil {
return -1, errors.New(fmt.Sprintf("Failed to sendCmix: %+v", return -1, errors.New(fmt.Sprintf("Failed to sendCmix: %+v",
err)) err))
......
...@@ -44,7 +44,7 @@ func NewUserDiscovery(client *Client)(*UserDiscovery, error){ ...@@ -44,7 +44,7 @@ func NewUserDiscovery(client *Client)(*UserDiscovery, error){
// network signatures are malformed or if the username is taken. Usernames // network signatures are malformed or if the username is taken. Usernames
// cannot be changed after registration at this time. Will fail if the user is // cannot be changed after registration at this time. Will fail if the user is
// already registered. // already registered.
// Registration does not go over cmix, it occurs over normal communications // Identity does not go over cmix, it occurs over normal communications
func (ud *UserDiscovery)Register(username string)error{ func (ud *UserDiscovery)Register(username string)error{
return ud.ud.Register(username) return ud.ud.Register(username)
} }
......
...@@ -565,7 +565,7 @@ func init() { ...@@ -565,7 +565,7 @@ func init() {
viper.BindPFlag("log", rootCmd.PersistentFlags().Lookup("log")) viper.BindPFlag("log", rootCmd.PersistentFlags().Lookup("log"))
rootCmd.Flags().StringP("regcode", "", "", rootCmd.Flags().StringP("regcode", "", "",
"Registration code (optional)") "Identity code (optional)")
viper.BindPFlag("regcode", rootCmd.Flags().Lookup("regcode")) viper.BindPFlag("regcode", rootCmd.Flags().Lookup("regcode"))
rootCmd.Flags().StringP("message", "m", "", "Message to send") rootCmd.Flags().StringP("message", "m", "", "Message to send")
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
package globals package globals
//Registration //Identity
const REG_KEYGEN = 1 //Generating Cryptographic Keys const REG_KEYGEN = 1 //Generating Cryptographic Keys
const REG_PRECAN = 2 //Doing a Precanned Registration (Not Secure) const REG_PRECAN = 2 //Doing a Precanned Identity (Not Secure)
const REG_UID_GEN = 3 //Generating User ID const REG_UID_GEN = 3 //Generating User ID
const REG_PERM = 4 //Validating User Identity With Permissioning Server const REG_PERM = 4 //Validating User Identity With Permissioning Server
const REG_NODE = 5 //Registering with Nodes const REG_NODE = 5 //Registering with Nodes
......
...@@ -19,14 +19,14 @@ require ( ...@@ -19,14 +19,14 @@ require (
github.com/spf13/viper v1.7.1 github.com/spf13/viper v1.7.1
github.com/ugorji/go v1.1.4 // indirect github.com/ugorji/go v1.1.4 // indirect
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect
gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228 gitlab.com/elixxir/bloomfilter v0.0.0-20210120224144-ac046983a17a
gitlab.com/elixxir/comms v0.0.4-0.20210114174157-1306832d440b gitlab.com/elixxir/comms v0.0.4-0.20210208181740-1ad1139f7170
gitlab.com/elixxir/crypto v0.0.7-0.20210107184400-5c3e52a35758 gitlab.com/elixxir/crypto v0.0.7-0.20210208181828-64b4b57e23d6
gitlab.com/elixxir/ekv v0.1.4 gitlab.com/elixxir/ekv v0.1.4
gitlab.com/elixxir/primitives v0.0.3-0.20210107183456-9cf6fe2de1e5 gitlab.com/elixxir/primitives v0.0.3-0.20210127201240-6a42ad925e8a
gitlab.com/xx_network/comms v0.0.4-0.20210112233928-eac8db03c397 gitlab.com/xx_network/comms v0.0.4-0.20210121204701-7a1eb0542424
gitlab.com/xx_network/crypto v0.0.5-0.20210107183440-804e0f8b7d22 gitlab.com/xx_network/crypto v0.0.5-0.20210121204626-b251b926e4f7
gitlab.com/xx_network/primitives v0.0.4-0.20210114170718-1549f24d462c gitlab.com/xx_network/primitives v0.0.4-0.20210208183356-ee1e9ec13f8f
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 // indirect golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 // indirect
......
...@@ -265,6 +265,9 @@ github.com/zeebo/pcg v1.0.0 h1:dt+dx+HvX8g7Un32rY9XWoYnd0NmKmrIzpHF7qiTDj0= ...@@ -265,6 +265,9 @@ github.com/zeebo/pcg v1.0.0 h1:dt+dx+HvX8g7Un32rY9XWoYnd0NmKmrIzpHF7qiTDj0=
github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= 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 h1:Gi6rj4mAlK0BJIk1HIzBVMjWNjIUfstrsXC2VqLYPcA=
gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k= gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k=
gitlab.com/elixxir/bloomfilter v0.0.0-20210120224144-ac046983a17a h1:0vLmGrqRDlaru89aKQPk3MyRPUInFujpqnVspBA6QTQ=
gitlab.com/elixxir/bloomfilter v0.0.0-20210120224144-ac046983a17a/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k=
gitlab.com/elixxir/comms v0.0.3/go.mod h1:5p7oz4yFrK037rPap6ooaWrloJrzuVZ4jnzOdvgyqnU=
gitlab.com/elixxir/comms v0.0.4-0.20201217200754-6259dc49e6f1 h1:4iuAA/I8/aQ1Jn3gBguuR1u+LVy3YyShxpoNcqApaVg= gitlab.com/elixxir/comms v0.0.4-0.20201217200754-6259dc49e6f1 h1:4iuAA/I8/aQ1Jn3gBguuR1u+LVy3YyShxpoNcqApaVg=
gitlab.com/elixxir/comms v0.0.4-0.20201217200754-6259dc49e6f1/go.mod h1:2sNUHm725vQG4pG1RtvMd7kJ5CNqFb7Rl9cenuQCa2c= gitlab.com/elixxir/comms v0.0.4-0.20201217200754-6259dc49e6f1/go.mod h1:2sNUHm725vQG4pG1RtvMd7kJ5CNqFb7Rl9cenuQCa2c=
gitlab.com/elixxir/comms v0.0.4-0.20201229200853-c403d72e877c h1:YjTlUbZiNiJdL7Fy4TIUoWlHNK4dFOtuJ40YgsG7fac= gitlab.com/elixxir/comms v0.0.4-0.20201229200853-c403d72e877c h1:YjTlUbZiNiJdL7Fy4TIUoWlHNK4dFOtuJ40YgsG7fac=
...@@ -279,10 +282,22 @@ gitlab.com/elixxir/comms v0.0.4-0.20210112234945-18c36b2d908f h1:EsCG5+sB1ZapIBY ...@@ -279,10 +282,22 @@ gitlab.com/elixxir/comms v0.0.4-0.20210112234945-18c36b2d908f h1:EsCG5+sB1ZapIBY
gitlab.com/elixxir/comms v0.0.4-0.20210112234945-18c36b2d908f/go.mod h1:R2Ank04m99uGRhKOssWzITqN47AT+EOyG2OiCHLGroE= gitlab.com/elixxir/comms v0.0.4-0.20210112234945-18c36b2d908f/go.mod h1:R2Ank04m99uGRhKOssWzITqN47AT+EOyG2OiCHLGroE=
gitlab.com/elixxir/comms v0.0.4-0.20210114174157-1306832d440b h1:LdlL28odDDoQbhpgF7jUR3x2TXG1P4TzGfVBg2Md6Ek= gitlab.com/elixxir/comms v0.0.4-0.20210114174157-1306832d440b h1:LdlL28odDDoQbhpgF7jUR3x2TXG1P4TzGfVBg2Md6Ek=
gitlab.com/elixxir/comms v0.0.4-0.20210114174157-1306832d440b/go.mod h1:R2Ank04m99uGRhKOssWzITqN47AT+EOyG2OiCHLGroE= gitlab.com/elixxir/comms v0.0.4-0.20210114174157-1306832d440b/go.mod h1:R2Ank04m99uGRhKOssWzITqN47AT+EOyG2OiCHLGroE=
gitlab.com/elixxir/comms v0.0.4-0.20210115185903-5dba75967ad3 h1:QJLHqjl35tV/BmFqY+auK6wrmjTdRh+IO/fXQA56XIg=
gitlab.com/elixxir/comms v0.0.4-0.20210115185903-5dba75967ad3/go.mod h1:s+wIMGLQWeIiOY+LYmGciAkcM9whr+CWQNzf8qb+Oao=
gitlab.com/elixxir/comms v0.0.4-0.20210121204920-12c3111eff14 h1:/5w3IE06wUF35/h8x6SHM8zZUcrQw2VgBjhmAcJjDow=
gitlab.com/elixxir/comms v0.0.4-0.20210121204920-12c3111eff14/go.mod h1:oJPQZEobUQwmype16+Hl9s2l+k3luL4ViUKxj0S4Dp8=
gitlab.com/elixxir/comms v0.0.4-0.20210121222442-b714136536e9 h1:9jQb6bynSFVw9jDKX8t71V7EEwKkDtxzDxMaxw7+hYc=
gitlab.com/elixxir/comms v0.0.4-0.20210121222442-b714136536e9/go.mod h1:oJPQZEobUQwmype16+Hl9s2l+k3luL4ViUKxj0S4Dp8=
gitlab.com/elixxir/comms v0.0.4-0.20210126185553-8ccfd64bf81b h1:ENB2YHpF72bbVHA6GG8BrMXEb+si9JHhO39vx7vk7hA=
gitlab.com/elixxir/comms v0.0.4-0.20210126185553-8ccfd64bf81b/go.mod h1:5hxGwa/8BEpo4cZrbxhxyXPpXmwzMPunKE/H141+rPU=
gitlab.com/elixxir/comms v0.0.4-0.20210208181740-1ad1139f7170 h1:YD0QgSP5puQXn3bMOJuA7sT7DXLCVgHBW//PSESU45o=
gitlab.com/elixxir/comms v0.0.4-0.20210208181740-1ad1139f7170/go.mod h1:fWuPOszadMhHLOywy2+mMSMH00k9sh/zw/povSWurn4=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4 h1:28ftZDeYEko7xptCZzeFWS1Iam95dj46TWFVVlKmw6A= 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.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 h1:znCt/x2bL4y8czTPaaFkwzdgSgW3BJc/1+dxyf1jqVw=
gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA=
gitlab.com/elixxir/crypto v0.0.4/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA=
gitlab.com/elixxir/crypto v0.0.6 h1:c94CGzBTV7LgInGHfmeJHrqq9nIc/WEOLUd9OeQBN74=
gitlab.com/elixxir/crypto v0.0.7-0.20201217200352-0ba771a66932/go.mod h1:nqSNe486j6ua96nv1et6x2ESl/qXevkx7f31GowMRh4= gitlab.com/elixxir/crypto v0.0.7-0.20201217200352-0ba771a66932/go.mod h1:nqSNe486j6ua96nv1et6x2ESl/qXevkx7f31GowMRh4=
gitlab.com/elixxir/crypto v0.0.7-0.20201222203132-9b4cc1ae3da6 h1:Vyf2wJ1/CoHLznATpI+z84OJQ+sgAbpVLT9P1CNjSVI= gitlab.com/elixxir/crypto v0.0.7-0.20201222203132-9b4cc1ae3da6 h1:Vyf2wJ1/CoHLznATpI+z84OJQ+sgAbpVLT9P1CNjSVI=
gitlab.com/elixxir/crypto v0.0.7-0.20201222203132-9b4cc1ae3da6/go.mod h1:NsIzH+TN592lMcmJGVzxUE64dObXuci7jo0qajyGahI= gitlab.com/elixxir/crypto v0.0.7-0.20201222203132-9b4cc1ae3da6/go.mod h1:NsIzH+TN592lMcmJGVzxUE64dObXuci7jo0qajyGahI=
...@@ -290,6 +305,18 @@ gitlab.com/elixxir/crypto v0.0.7-0.20210104223925-7dfd3ad55d5c h1:/iLLZvu5mbFXxc ...@@ -290,6 +305,18 @@ gitlab.com/elixxir/crypto v0.0.7-0.20210104223925-7dfd3ad55d5c h1:/iLLZvu5mbFXxc
gitlab.com/elixxir/crypto v0.0.7-0.20210104223925-7dfd3ad55d5c/go.mod h1:cEn3ghYlk7Fhz1dOu3OEw9v9nIZNYH6hqnjHlTLxFiA= gitlab.com/elixxir/crypto v0.0.7-0.20210104223925-7dfd3ad55d5c/go.mod h1:cEn3ghYlk7Fhz1dOu3OEw9v9nIZNYH6hqnjHlTLxFiA=
gitlab.com/elixxir/crypto v0.0.7-0.20210107184400-5c3e52a35758 h1:h2l8SZbdgcyMVwgcMqBgAoJSqI1CC23MChB5k7xqqRI= gitlab.com/elixxir/crypto v0.0.7-0.20210107184400-5c3e52a35758 h1:h2l8SZbdgcyMVwgcMqBgAoJSqI1CC23MChB5k7xqqRI=
gitlab.com/elixxir/crypto v0.0.7-0.20210107184400-5c3e52a35758/go.mod h1:JDC7EFs5V97qourZyiSHBiiXHGUoKWX9XtJVhfEvpC4= gitlab.com/elixxir/crypto v0.0.7-0.20210107184400-5c3e52a35758/go.mod h1:JDC7EFs5V97qourZyiSHBiiXHGUoKWX9XtJVhfEvpC4=
gitlab.com/elixxir/crypto v0.0.7-0.20210113224347-cc4926b30fba h1:GtjhegVf6L9MZ6gp2oeBo/oVYUVB/IO91xBycF/jcNo=
gitlab.com/elixxir/crypto v0.0.7-0.20210113224347-cc4926b30fba/go.mod h1:JDC7EFs5V97qourZyiSHBiiXHGUoKWX9XtJVhfEvpC4=
gitlab.com/elixxir/crypto v0.0.7-0.20210114172156-b576829ba7d8 h1:KhhsuPn+aPzZ66jdbbRF55SurogvQ/X9KuMWkXtmq+U=
gitlab.com/elixxir/crypto v0.0.7-0.20210114172156-b576829ba7d8/go.mod h1:4AumkGNppiEaMo6bIpFBrV6wZtaIjpbvkpA5+FBisA8=
gitlab.com/elixxir/crypto v0.0.7-0.20210115231025-5d9b0dbc6985 h1:Csf3dIhwA6D293aURIHKuvwZr4HgIRzJ4FpCklmXEmA=
gitlab.com/elixxir/crypto v0.0.7-0.20210115231025-5d9b0dbc6985/go.mod h1:JDC7EFs5V97qourZyiSHBiiXHGUoKWX9XtJVhfEvpC4=
gitlab.com/elixxir/crypto v0.0.7-0.20210121204803-2caab60ff687 h1:tBlYA/jUOquWpe7bGZBQtvngbfbHsyt11aKZ761++8k=
gitlab.com/elixxir/crypto v0.0.7-0.20210121204803-2caab60ff687/go.mod h1:7egP0+qiVyZnqcBlRr4rL0FhGNkqDCNEygungCAp7NM=
gitlab.com/elixxir/crypto v0.0.7-0.20210125231257-b52a556be893 h1:0NjQOwdGO/xBvgBMzRLSFXpSpnluzjT16obl5AcGfmI=
gitlab.com/elixxir/crypto v0.0.7-0.20210125231257-b52a556be893/go.mod h1:BoYrgHnTJPvvd4f/f4A+y22wwgZ7IxkYtGC8x9WiwxA=
gitlab.com/elixxir/crypto v0.0.7-0.20210208181828-64b4b57e23d6 h1:Q1Ldvj70eM60MLaHgSXE7C95uTkn5utCq+bMCY2pyrA=
gitlab.com/elixxir/crypto v0.0.7-0.20210208181828-64b4b57e23d6/go.mod h1:JDC7EFs5V97qourZyiSHBiiXHGUoKWX9XtJVhfEvpC4=
gitlab.com/elixxir/ekv v0.1.4-0.20201217220111-9c7e8be21577 h1:qT3ZO9GbKv7PcmakATsXsUdzn/hlm817ETOT/csDIak= gitlab.com/elixxir/ekv v0.1.4-0.20201217220111-9c7e8be21577 h1:qT3ZO9GbKv7PcmakATsXsUdzn/hlm817ETOT/csDIak=
gitlab.com/elixxir/ekv v0.1.4-0.20201217220111-9c7e8be21577/go.mod h1:e6WPUt97taFZe5PFLPb1Dupk7tqmDCTQu1kkstqJvw4= gitlab.com/elixxir/ekv v0.1.4-0.20201217220111-9c7e8be21577/go.mod h1:e6WPUt97taFZe5PFLPb1Dupk7tqmDCTQu1kkstqJvw4=
gitlab.com/elixxir/ekv v0.1.4 h1:NLVMwsFEKArWcsDHu2DbXlm9374iSgn7oIA3rVSsvjc= gitlab.com/elixxir/ekv v0.1.4 h1:NLVMwsFEKArWcsDHu2DbXlm9374iSgn7oIA3rVSsvjc=
...@@ -299,6 +326,7 @@ gitlab.com/elixxir/primitives v0.0.0-20200804170709-a1896d262cd9/go.mod h1:p0Vel ...@@ -299,6 +326,7 @@ 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.0-20200804182913-788f47bded40/go.mod h1:tzdFFvb1ESmuTCOl1z6+yf6oAICDxH2NPUemVgoNLxc=
gitlab.com/elixxir/primitives v0.0.1 h1:q61anawANlNAExfkeQEE1NCsNih6vNV1FFLoUQX6txQ= 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.1/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.2/go.mod h1:3fxFHSlQhkV4vs+S0dZEz3Om3m+40WX8L806yvSnNFc=
gitlab.com/elixxir/primitives v0.0.3-0.20201217193438-8ebfc882f1de/go.mod h1:H1OZ6ZXzTB3G4nOEdJzBJ7BySRnivpJTkTphxazFCl4= gitlab.com/elixxir/primitives v0.0.3-0.20201217193438-8ebfc882f1de/go.mod h1:H1OZ6ZXzTB3G4nOEdJzBJ7BySRnivpJTkTphxazFCl4=
gitlab.com/elixxir/primitives v0.0.3-0.20201222171449-bdfe30389bb5 h1:BUV1ouY+9NA5+ZF+QfTpIBL1vO5zk31I68N7DX9bKj8= gitlab.com/elixxir/primitives v0.0.3-0.20201222171449-bdfe30389bb5 h1:BUV1ouY+9NA5+ZF+QfTpIBL1vO5zk31I68N7DX9bKj8=
gitlab.com/elixxir/primitives v0.0.3-0.20201222171449-bdfe30389bb5/go.mod h1:5Z8fce94mks0aFhMvzftx2jJpDx4/pzDU20G2oTiU9w= gitlab.com/elixxir/primitives v0.0.3-0.20201222171449-bdfe30389bb5/go.mod h1:5Z8fce94mks0aFhMvzftx2jJpDx4/pzDU20G2oTiU9w=
...@@ -310,7 +338,17 @@ gitlab.com/elixxir/primitives v0.0.3-0.20210106014507-bf3dfe228fa6 h1:sUqEla1uUI ...@@ -310,7 +338,17 @@ gitlab.com/elixxir/primitives v0.0.3-0.20210106014507-bf3dfe228fa6 h1:sUqEla1uUI
gitlab.com/elixxir/primitives v0.0.3-0.20210106014507-bf3dfe228fa6/go.mod h1:Ph6isHUDVjmRUd9DioyKpd8W9J52gKBiDeue4DCygXA= gitlab.com/elixxir/primitives v0.0.3-0.20210106014507-bf3dfe228fa6/go.mod h1:Ph6isHUDVjmRUd9DioyKpd8W9J52gKBiDeue4DCygXA=
gitlab.com/elixxir/primitives v0.0.3-0.20210107183456-9cf6fe2de1e5 h1:50HbCJWirpX2Q+NNhIHcs0M9f45H1UJ/7LNMu81Bnn0= gitlab.com/elixxir/primitives v0.0.3-0.20210107183456-9cf6fe2de1e5 h1:50HbCJWirpX2Q+NNhIHcs0M9f45H1UJ/7LNMu81Bnn0=
gitlab.com/elixxir/primitives v0.0.3-0.20210107183456-9cf6fe2de1e5/go.mod h1:Ph6isHUDVjmRUd9DioyKpd8W9J52gKBiDeue4DCygXA= gitlab.com/elixxir/primitives v0.0.3-0.20210107183456-9cf6fe2de1e5/go.mod h1:Ph6isHUDVjmRUd9DioyKpd8W9J52gKBiDeue4DCygXA=
gitlab.com/elixxir/primitives v0.0.3-0.20210121204717-e15ada7f0a73 h1:9h+pCc1ceIWDR1CM5sdoV7KHvNYzKQRJjeIfc26fyDU=
gitlab.com/elixxir/primitives v0.0.3-0.20210121204717-e15ada7f0a73/go.mod h1:bGYfAGerVVZhNzh+PxOMZVG7iYAUfInYvtdAkAqgiY8=
gitlab.com/elixxir/primitives v0.0.3-0.20210122185056-ad244787d961 h1:BUN6bUBmTeebwYvTQ5yVi1iJlNAhjR7kEndcsV339dE=
gitlab.com/elixxir/primitives v0.0.3-0.20210122185056-ad244787d961/go.mod h1:bGYfAGerVVZhNzh+PxOMZVG7iYAUfInYvtdAkAqgiY8=
gitlab.com/elixxir/primitives v0.0.3-0.20210125225949-9469ce6b08fc/go.mod h1:bGYfAGerVVZhNzh+PxOMZVG7iYAUfInYvtdAkAqgiY8=
gitlab.com/elixxir/primitives v0.0.3-0.20210126180712-bfbfb725c75a h1:3jq90Nmn8Ew9vfUuizV4mvj6py5LOmX3wkuBc+ywJ0w=
gitlab.com/elixxir/primitives v0.0.3-0.20210126180712-bfbfb725c75a/go.mod h1:bGYfAGerVVZhNzh+PxOMZVG7iYAUfInYvtdAkAqgiY8=
gitlab.com/elixxir/primitives v0.0.3-0.20210127201240-6a42ad925e8a h1:ZQncDfITNE12EdJK+shh6UzHlALhNU4Zjvv4hid2krs=
gitlab.com/elixxir/primitives v0.0.3-0.20210127201240-6a42ad925e8a/go.mod h1:Ph6isHUDVjmRUd9DioyKpd8W9J52gKBiDeue4DCygXA=
gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw=
gitlab.com/xx_network/comms v0.0.3/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8=
gitlab.com/xx_network/comms v0.0.4-0.20201130190834-365ddae56e7b/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= gitlab.com/xx_network/comms v0.0.4-0.20201130190834-365ddae56e7b/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8=
gitlab.com/xx_network/comms v0.0.4-0.20201217200138-87075d5b4ffd h1:4LjS3UuBNA/AaglIJ+k1IBoxYgCWt+FM1MPYxjAFfaQ= gitlab.com/xx_network/comms v0.0.4-0.20201217200138-87075d5b4ffd h1:4LjS3UuBNA/AaglIJ+k1IBoxYgCWt+FM1MPYxjAFfaQ=
gitlab.com/xx_network/comms v0.0.4-0.20201217200138-87075d5b4ffd/go.mod h1:/vIk6tSrDqk/7HZOdrbSXZT+kEL43HIoz60AoZTzTXg= gitlab.com/xx_network/comms v0.0.4-0.20201217200138-87075d5b4ffd/go.mod h1:/vIk6tSrDqk/7HZOdrbSXZT+kEL43HIoz60AoZTzTXg=
...@@ -322,6 +360,10 @@ gitlab.com/xx_network/comms v0.0.4-0.20210107184305-7bb439c08ded h1:VHAQcap/+jcF ...@@ -322,6 +360,10 @@ gitlab.com/xx_network/comms v0.0.4-0.20210107184305-7bb439c08ded h1:VHAQcap/+jcF
gitlab.com/xx_network/comms v0.0.4-0.20210107184305-7bb439c08ded/go.mod h1:12OZe2Ol9lEk7JTm48GQ4zj1O01SH0ygfLqOb8EHrtU= gitlab.com/xx_network/comms v0.0.4-0.20210107184305-7bb439c08ded/go.mod h1:12OZe2Ol9lEk7JTm48GQ4zj1O01SH0ygfLqOb8EHrtU=
gitlab.com/xx_network/comms v0.0.4-0.20210112233928-eac8db03c397 h1:E7p5lGX+nTAIKB6Wno3mRxBfC+SX5ZY2FKp8JEMzdSM= gitlab.com/xx_network/comms v0.0.4-0.20210112233928-eac8db03c397 h1:E7p5lGX+nTAIKB6Wno3mRxBfC+SX5ZY2FKp8JEMzdSM=
gitlab.com/xx_network/comms v0.0.4-0.20210112233928-eac8db03c397/go.mod h1:12OZe2Ol9lEk7JTm48GQ4zj1O01SH0ygfLqOb8EHrtU= gitlab.com/xx_network/comms v0.0.4-0.20210112233928-eac8db03c397/go.mod h1:12OZe2Ol9lEk7JTm48GQ4zj1O01SH0ygfLqOb8EHrtU=
gitlab.com/xx_network/comms v0.0.4-0.20210115175102-ad5814bff11c h1:MRxHypL++mTDzVJq503ePBW3aGHE5FTG1ybac8rGK0A=
gitlab.com/xx_network/comms v0.0.4-0.20210115175102-ad5814bff11c/go.mod h1:12OZe2Ol9lEk7JTm48GQ4zj1O01SH0ygfLqOb8EHrtU=
gitlab.com/xx_network/comms v0.0.4-0.20210121204701-7a1eb0542424 h1:zhfkbutYEY7PQuC1kcugCt4am/oRAyla6u4xDc5PqWs=
gitlab.com/xx_network/comms v0.0.4-0.20210121204701-7a1eb0542424/go.mod h1:MNkja6iUsM2yjBQicwLUGYctZmAU/D4AMpDD04vfBg8=
gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= 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 h1:lpKOL5mTJ2awWMfgBy30oD/UvJVrWZzUimSHlOdZZxo=
gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk=
...@@ -334,6 +376,8 @@ gitlab.com/xx_network/crypto v0.0.5-0.20210106014410-0554a33a7124 h1:G2fNW7uPzJE ...@@ -334,6 +376,8 @@ gitlab.com/xx_network/crypto v0.0.5-0.20210106014410-0554a33a7124 h1:G2fNW7uPzJE
gitlab.com/xx_network/crypto v0.0.5-0.20210106014410-0554a33a7124/go.mod h1:tTYlvAZNUFMtndcijM37iujkM4gP8kUwGiS9n7NA5Ck= gitlab.com/xx_network/crypto v0.0.5-0.20210106014410-0554a33a7124/go.mod h1:tTYlvAZNUFMtndcijM37iujkM4gP8kUwGiS9n7NA5Ck=
gitlab.com/xx_network/crypto v0.0.5-0.20210107183440-804e0f8b7d22 h1:SQga1vOuAGzbYURnBjG0f37r7WmWKZRdiqmdopaNMb4= gitlab.com/xx_network/crypto v0.0.5-0.20210107183440-804e0f8b7d22 h1:SQga1vOuAGzbYURnBjG0f37r7WmWKZRdiqmdopaNMb4=
gitlab.com/xx_network/crypto v0.0.5-0.20210107183440-804e0f8b7d22/go.mod h1:tTYlvAZNUFMtndcijM37iujkM4gP8kUwGiS9n7NA5Ck= gitlab.com/xx_network/crypto v0.0.5-0.20210107183440-804e0f8b7d22/go.mod h1:tTYlvAZNUFMtndcijM37iujkM4gP8kUwGiS9n7NA5Ck=
gitlab.com/xx_network/crypto v0.0.5-0.20210121204626-b251b926e4f7 h1:eraxUmI0EFDtfqTV4Ojndoh8Bv8PBUbZaT27VLU1yhc=
gitlab.com/xx_network/crypto v0.0.5-0.20210121204626-b251b926e4f7/go.mod h1:61fEAGI2+JD6CbT5PMzxy1SBMvgiFxE4MyiQghzoOVg=
gitlab.com/xx_network/primitives v0.0.0-20200803231956-9b192c57ea7c/go.mod h1:wtdCMr7DPePz9qwctNoAUzZtbOSHSedcK++3Df3psjA= 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 h1:CCVslUwNC7Ul7NG5nu3ThGTSVUt1TxNRX+47f5TUwnk=
gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK9xevzWCaPO7b1wiluVJGk7R5ZsuC7pHY5hteZFQug= gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK9xevzWCaPO7b1wiluVJGk7R5ZsuC7pHY5hteZFQug=
...@@ -347,8 +391,25 @@ gitlab.com/xx_network/primitives v0.0.4-0.20201229212313-fe33d9809f27 h1:JGpYRKk ...@@ -347,8 +391,25 @@ gitlab.com/xx_network/primitives v0.0.4-0.20201229212313-fe33d9809f27 h1:JGpYRKk
gitlab.com/xx_network/primitives v0.0.4-0.20201229212313-fe33d9809f27/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc= gitlab.com/xx_network/primitives v0.0.4-0.20201229212313-fe33d9809f27/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc=
gitlab.com/xx_network/primitives v0.0.4-0.20210106014326-691ebfca3b07 h1:ZxGp7Q0Vyx2mWM84GIPPT3PZK2TLfwycSIk7EgNMIws= gitlab.com/xx_network/primitives v0.0.4-0.20210106014326-691ebfca3b07 h1:ZxGp7Q0Vyx2mWM84GIPPT3PZK2TLfwycSIk7EgNMIws=
gitlab.com/xx_network/primitives v0.0.4-0.20210106014326-691ebfca3b07/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc= gitlab.com/xx_network/primitives v0.0.4-0.20210106014326-691ebfca3b07/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc=
gitlab.com/xx_network/primitives v0.0.4-0.20210114170718-1549f24d462c h1:RjDklUt70MgcVqBoJvWdBoygkizoByv6Q6DsZSqcFSI=
gitlab.com/xx_network/primitives v0.0.4-0.20210114170718-1549f24d462c/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE= gitlab.com/xx_network/primitives v0.0.4-0.20210114170718-1549f24d462c/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210118193646-93176e2e6925 h1:n40/5N6aXnye+QmkqKCnEEEepYw4lN9uQ/mhAyCyA3o=
gitlab.com/xx_network/primitives v0.0.4-0.20210118193646-93176e2e6925/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc=
gitlab.com/xx_network/primitives v0.0.4-0.20210121203635-8a771fc14f8a h1:ZDv8RHUsl9pjIkgqd8u6y00P+6TXEASwBg9dpvHSsT0=
gitlab.com/xx_network/primitives v0.0.4-0.20210121203635-8a771fc14f8a/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210127181825-f9178f9d19b5 h1:dI/3SkJie/Twy4ZZnsNncyiLI6KHJboaRagSU5V96YY=
gitlab.com/xx_network/primitives v0.0.4-0.20210127181825-f9178f9d19b5/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210129181607-5b719add9171 h1:9nvaBYeOH/f8Ev/1b3IhoJdrxXaQZ5Lb/tFe1GzqH00=
gitlab.com/xx_network/primitives v0.0.4-0.20210129181607-5b719add9171/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210201174745-f294e495260d h1:tXEJOJq6rIizJyo/fgs6G17isq9UMahHx6BPtXgheLg=
gitlab.com/xx_network/primitives v0.0.4-0.20210201174745-f294e495260d/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210201180649-48711cee9127 h1:DYYHQeNyh/6Cj3swZYy8bAYFL4yqxedu2dFZMDt8D3M=
gitlab.com/xx_network/primitives v0.0.4-0.20210201180649-48711cee9127/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210201180820-639f0a366d52 h1:gZk8XTQOAFt3IUd2LUsWWYpQQz5ktQF5uD+gV4pu4e8=
gitlab.com/xx_network/primitives v0.0.4-0.20210201180820-639f0a366d52/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210202001929-8bf8bf35a234 h1:OXR+c++r+IsFu4OKEMY9pJrZFCTp/qt8irEdCgNj4Hw=
gitlab.com/xx_network/primitives v0.0.4-0.20210202001929-8bf8bf35a234/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210208183356-ee1e9ec13f8f h1:21mljvQ0ZPNZbOP0BG5JNGlDgiC/vg9NZ/AaseXSxBI=
gitlab.com/xx_network/primitives v0.0.4-0.20210208183356-ee1e9ec13f8f/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/ring v0.0.2 h1:TlPjlbFdhtJrwvRgIg4ScdngMTaynx/ByHBRZiXCoL0= gitlab.com/xx_network/ring v0.0.2 h1:TlPjlbFdhtJrwvRgIg4ScdngMTaynx/ByHBRZiXCoL0=
gitlab.com/xx_network/ring v0.0.2/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM= gitlab.com/xx_network/ring v0.0.2/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
...@@ -524,6 +585,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 ...@@ -524,6 +585,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
......
package interfaces
const BloomFilterSize = 904 // In Bits
const BloomFilterHashes = 10
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
"crypto" "crypto"
"encoding/base64" "encoding/base64"
"encoding/json" "encoding/json"
"fmt"
"gitlab.com/elixxir/crypto/cyclic" "gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/primitives/fact" "gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/crypto/csprng"
...@@ -37,6 +38,8 @@ func TestContact_Marshal_Unmarshal(t *testing.T) { ...@@ -37,6 +38,8 @@ func TestContact_Marshal_Unmarshal(t *testing.T) {
buff := expectedContact.Marshal() buff := expectedContact.Marshal()
fmt.Println(string(buff))
testContact, err := Unmarshal(buff) testContact, err := Unmarshal(buff)
if err != nil { if err != nil {
t.Errorf("Unmarshal() produced an error: %+v", err) t.Errorf("Unmarshal() produced an error: %+v", err)
......
...@@ -10,6 +10,7 @@ package message ...@@ -10,6 +10,7 @@ package message
import ( import (
"gitlab.com/elixxir/crypto/e2e" "gitlab.com/elixxir/crypto/e2e"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"time" "time"
) )
...@@ -18,6 +19,8 @@ type Receive struct { ...@@ -18,6 +19,8 @@ type Receive struct {
Payload []byte Payload []byte
MessageType Type MessageType Type
Sender *id.ID Sender *id.ID
RecipientID *id.ID
EphemeralID ephemeral.Id
Timestamp time.Time Timestamp time.Time
Encryption EncryptionType Encryption EncryptionType
} }
...@@ -15,12 +15,13 @@ import ( ...@@ -15,12 +15,13 @@ import (
"gitlab.com/elixxir/crypto/e2e" "gitlab.com/elixxir/crypto/e2e"
"gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
) )
type NetworkManager interface { type NetworkManager interface {
SendE2E(m message.Send, p params.E2E) ([]id.Round, e2e.MessageID, error) SendE2E(m message.Send, p params.E2E) ([]id.Round, e2e.MessageID, error)
SendUnsafe(m message.Send, p params.Unsafe) ([]id.Round, error) SendUnsafe(m message.Send, p params.Unsafe) ([]id.Round, error)
SendCMIX(message format.Message, p params.CMIX) (id.Round, error) SendCMIX(message format.Message, recipient *id.ID, p params.CMIX) (id.Round, ephemeral.Id, error)
GetInstance() *network.Instance GetInstance() *network.Instance
GetHealthTracker() HealthTracker GetHealthTracker() HealthTracker
Follow() (stoppable.Stoppable, error) Follow() (stoppable.Stoppable, error)
......
...@@ -26,6 +26,7 @@ import ( ...@@ -26,6 +26,7 @@ import (
"gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/crypto/large" "gitlab.com/xx_network/crypto/large"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"gitlab.com/xx_network/primitives/ndf" "gitlab.com/xx_network/primitives/ndf"
"testing" "testing"
"time" "time"
...@@ -76,9 +77,9 @@ func (t *testNetworkManagerGeneric) SendUnsafe(m message.Send, p params.Unsafe) ...@@ -76,9 +77,9 @@ func (t *testNetworkManagerGeneric) SendUnsafe(m message.Send, p params.Unsafe)
return nil, nil return nil, nil
} }
func (t *testNetworkManagerGeneric) SendCMIX(message format.Message, p params.CMIX) (id.Round, error) { func (t *testNetworkManagerGeneric) SendCMIX(message format.Message, rid *id.ID, p params.CMIX) (id.Round, ephemeral.Id, error) {
return id.Round(0), nil return id.Round(0), ephemeral.Id{}, nil
} }
...@@ -183,9 +184,9 @@ func (t *testNetworkManagerFullExchange) SendUnsafe(m message.Send, p params.Uns ...@@ -183,9 +184,9 @@ func (t *testNetworkManagerFullExchange) SendUnsafe(m message.Send, p params.Uns
return nil, nil return nil, nil
} }
func (t *testNetworkManagerFullExchange) SendCMIX(message format.Message, p params.CMIX) (id.Round, error) { func (t *testNetworkManagerFullExchange) SendCMIX(message format.Message, eid *id.ID, p params.CMIX) (id.Round, ephemeral.Id, error) {
return id.Round(0), nil return id.Round(0), ephemeral.Id{}, nil
} }
......
///////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 xx network SEZC //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file //
///////////////////////////////////////////////////////////////////////////////
package ephemeral
import (
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/interfaces/message"
"gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/elixxir/client/stoppable"
"gitlab.com/elixxir/comms/network"
"gitlab.com/elixxir/comms/testkeys"
"gitlab.com/elixxir/crypto/e2e"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"gitlab.com/xx_network/primitives/ndf"
"gitlab.com/xx_network/primitives/utils"
"testing"
)
// testNetworkManager is a test implementation of NetworkManager interface.
type testNetworkManager struct {
instance *network.Instance
msg message.Send
}
func (t *testNetworkManager) SendE2E(m message.Send, _ params.E2E) ([]id.Round,
e2e.MessageID, error) {
rounds := []id.Round{
id.Round(0),
id.Round(1),
id.Round(2),
}
t.msg = m
return rounds, e2e.MessageID{}, nil
}
func (t *testNetworkManager) SendUnsafe(m message.Send, _ params.Unsafe) ([]id.Round, error) {
rounds := []id.Round{
id.Round(0),
id.Round(1),
id.Round(2),
}
t.msg = m
return rounds, nil
}
func (t *testNetworkManager) SendCMIX(format.Message, *id.ID, params.CMIX) (id.Round, ephemeral.Id, error) {
return 0, ephemeral.Id{}, nil
}
func (t *testNetworkManager) GetInstance() *network.Instance {
return t.instance
}
func (t *testNetworkManager) GetHealthTracker() interfaces.HealthTracker {
return nil
}
func (t *testNetworkManager) Follow() (stoppable.Stoppable, error) {
return nil, nil
}
func (t *testNetworkManager) CheckGarbledMessages() {}
func NewTestNetworkManager(i interface{}) interfaces.NetworkManager {
switch i.(type) {
case *testing.T, *testing.M, *testing.B:
break
default:
globals.Log.FATAL.Panicf("initTesting is restricted to testing only."+
"Got %T", i)
}
commsManager := connect.NewManagerTesting(i)
cert, err := utils.ReadFile(testkeys.GetNodeCertPath())
if err != nil {
globals.Log.FATAL.Panicf("Failed to create new test Instance: %v", err)
}
commsManager.AddHost(&id.Permissioning, "", cert, connect.GetDefaultHostParams())
instanceComms := &connect.ProtoComms{
Manager: commsManager,
}
thisInstance, err := network.NewInstanceTesting(instanceComms, getNDF(), getNDF(), nil, nil, i)
if err != nil {
globals.Log.FATAL.Panicf("Failed to create new test Instance: %v", err)
}
thisManager := &testNetworkManager{instance: thisInstance}
return thisManager
}
func getNDF() *ndf.NetworkDefinition {
return &ndf.NetworkDefinition{
E2E: ndf.Group{
Prime: "E2EE983D031DC1DB6F1A7A67DF0E9A8E5561DB8E8D49413394C049B" +
"7A8ACCEDC298708F121951D9CF920EC5D146727AA4AE535B0922C688B55B3DD2AE" +
"DF6C01C94764DAB937935AA83BE36E67760713AB44A6337C20E7861575E745D31F" +
"8B9E9AD8412118C62A3E2E29DF46B0864D0C951C394A5CBBDC6ADC718DD2A3E041" +
"023DBB5AB23EBB4742DE9C1687B5B34FA48C3521632C4A530E8FFB1BC51DADDF45" +
"3B0B2717C2BC6669ED76B4BDD5C9FF558E88F26E5785302BEDBCA23EAC5ACE9209" +
"6EE8A60642FB61E8F3D24990B8CB12EE448EEF78E184C7242DD161C7738F32BF29" +
"A841698978825B4111B4BC3E1E198455095958333D776D8B2BEEED3A1A1A221A6E" +
"37E664A64B83981C46FFDDC1A45E3D5211AAF8BFBC072768C4F50D7D7803D2D4F2" +
"78DE8014A47323631D7E064DE81C0C6BFA43EF0E6998860F1390B5D3FEACAF1696" +
"015CB79C3F9C2D93D961120CD0E5F12CBB687EAB045241F96789C38E89D796138E" +
"6319BE62E35D87B1048CA28BE389B575E994DCA755471584A09EC723742DC35873" +
"847AEF49F66E43873",
Generator: "2",
},
CMIX: ndf.Group{
Prime: "9DB6FB5951B66BB6FE1E140F1D2CE5502374161FD6538DF1648218642F0B5C48" +
"C8F7A41AADFA187324B87674FA1822B00F1ECF8136943D7C55757264E5A1A44F" +
"FE012E9936E00C1D3E9310B01C7D179805D3058B2A9F4BB6F9716BFE6117C6B5" +
"B3CC4D9BE341104AD4A80AD6C94E005F4B993E14F091EB51743BF33050C38DE2" +
"35567E1B34C3D6A5C0CEAA1A0F368213C3D19843D0B4B09DCB9FC72D39C8DE41" +
"F1BF14D4BB4563CA28371621CAD3324B6A2D392145BEBFAC748805236F5CA2FE" +
"92B871CD8F9C36D3292B5509CA8CAA77A2ADFC7BFD77DDA6F71125A7456FEA15" +
"3E433256A2261C6A06ED3693797E7995FAD5AABBCFBE3EDA2741E375404AE25B",
Generator: "5C7FF6B06F8F143FE8288433493E4769C4D988ACE5BE25A0E24809670716C613" +
"D7B0CEE6932F8FAA7C44D2CB24523DA53FBE4F6EC3595892D1AA58C4328A06C4" +
"6A15662E7EAA703A1DECF8BBB2D05DBE2EB956C142A338661D10461C0D135472" +
"085057F3494309FFA73C611F78B32ADBB5740C361C9F35BE90997DB2014E2EF5" +
"AA61782F52ABEB8BD6432C4DD097BC5423B285DAFB60DC364E8161F4A2A35ACA" +
"3A10B1C4D203CC76A470A33AFDCBDD92959859ABD8B56E1725252D78EAC66E71" +
"BA9AE3F1DD2487199874393CD4D832186800654760E1E34C09E4D155179F9EC0" +
"DC4473F996BDCE6EED1CABED8B6F116F7AD9CF505DF0F998E34AB27514B0FFE7",
},
}
}
///////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 xx network SEZC //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file //
///////////////////////////////////////////////////////////////////////////////
package ephemeral
import (
"github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/stoppable"
"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/client/storage/reception"
"gitlab.com/elixxir/client/storage/versioned"
"gitlab.com/elixxir/comms/network"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"time"
)
const validityGracePeriod = 5 * time.Minute
const TimestampKey = "IDTrackingTimestamp"
const ephemeralStoppable = "EphemeralCheck"
// Track runs a thread which checks for past and present ephemeral ids
func Track(session *storage.Session, instance *network.Instance, ourId *id.ID) stoppable.Stoppable {
stop := stoppable.NewSingle(ephemeralStoppable)
go track(session, instance, ourId, stop)
return stop
}
// track is a thread which continuously processes ephemeral ids.
// If any error occurs, the thread crashes
func track(session *storage.Session, instance *network.Instance, ourId *id.ID, stop *stoppable.Single) {
identityStore := session.Reception()
// Check that there is a timestamp in store at all
err := checkTimestampStore(session)
if err != nil {
jww.FATAL.Panicf("Could not store timestamp "+
"for ephemeral ID tracking: %v", err)
}
// Get the latest timestamp from store
lastTimestampObj, err := session.Get(TimestampKey)
if err != nil {
globals.Log.FATAL.Panicf("Could not get timestamp: %v", err)
}
lastCheck, err := unmarshalTimestamp(lastTimestampObj)
if err != nil {
globals.Log.FATAL.Panicf("Could not parse stored timestamp: %v", err)
}
for true {
now := time.Now()
// Generates the IDs since the last track
protoIds, err := ephemeral.GetIdsByRange(ourId, session.Reception().GetIDSize(),
now.UnixNano(), now.Sub(lastCheck))
if err != nil {
globals.Log.FATAL.Panicf("Could not generate "+
"upcoming IDs: %v", err)
}
// Generate identities off of that list
identities := generateIdentities(protoIds, ourId)
// Add identities to storage if unique
for _, identity := range identities {
// Track if identity has been generated already
if identity.StartValid.After(lastCheck) {
// If not not, insert identity into store
if err = identityStore.AddIdentity(identity); err != nil {
globals.Log.FATAL.Panicf("Could not insert "+
"identity: %v", err)
}
}
}
// Generate the time stamp for storage
vo, err := marshalTimestamp(now)
if err != nil {
globals.Log.FATAL.Panicf("Could not marshal "+
"timestamp for storage: %v", err)
}
// Store the timestamp
if err = session.Set(TimestampKey, vo); err != nil {
globals.Log.FATAL.Panicf("Could not store timestamp: %v", err)
}
// Sleep until the last Id has expired
timeToSleep := calculateTickerTime(protoIds)
t := time.NewTimer(timeToSleep)
select {
case <-t.C:
case <-stop.Quit():
return
}
}
}
// generateIdentities is a constructor which generates a list of
// identities off of the list of protoIdentities passed in
func generateIdentities(protoIds []ephemeral.ProtoIdentity,
ourId *id.ID) []reception.Identity {
identities := make([]reception.Identity, 0)
// Add identities for every ephemeral id
for _, eid := range protoIds {
// Expand the grace period for both start and end
eid.End.Add(validityGracePeriod)
eid.Start.Add(-validityGracePeriod)
identities = append(identities, reception.Identity{
EphId: eid.Id,
Source: ourId,
End: eid.End,
StartValid: eid.Start,
EndValid: eid.End,
Ephemeral: false,
})
}
return identities
}
// Sanitation check of timestamp store. If a value has not been stored yet
// then the current time is stored
func checkTimestampStore(session *storage.Session) error {
if _, err := session.Get(TimestampKey); err != nil {
now, err := marshalTimestamp(time.Now())
if err != nil {
return errors.Errorf("Could not marshal new timestamp for storage: %v", err)
}
return session.Set(TimestampKey, now)
}
return nil
}
// Takes the stored timestamp and unmarshal into a time object
func unmarshalTimestamp(lastTimestampObj *versioned.Object) (time.Time, error) {
if lastTimestampObj == nil || lastTimestampObj.Data == nil {
return time.Now(), nil
}
lastTimestamp := time.Time{}
err := lastTimestamp.UnmarshalBinary(lastTimestampObj.Data)
return lastTimestamp, err
}
// Marshals the timestamp for ekv storage. Generates a storable object
func marshalTimestamp(timeToStore time.Time) (*versioned.Object, error) {
data, err := timeToStore.MarshalBinary()
return &versioned.Object{
Version: 0,
Timestamp: time.Now(),
Data: data,
}, err
}
// Helper function which calculates the time for the ticker based
// off of the last ephemeral ID to expire
func calculateTickerTime(baseIDs []ephemeral.ProtoIdentity) time.Duration {
// Get the last identity in the list
index := 0
if len(baseIDs)-1 > 0 {
index = len(baseIDs) - 1
}
lastIdentity := baseIDs[index]
// Factor out the grace period previously expanded upon.
// Calculate and return that duration
gracePeriod := lastIdentity.End.Add(-validityGracePeriod)
return lastIdentity.End.Sub(gracePeriod)
}
///////////////////////////////////////////////////////////////////////////////
// Copyright © 2020 xx network SEZC //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file //
///////////////////////////////////////////////////////////////////////////////
package ephemeral
import (
"github.com/pkg/errors"
"gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/stoppable"
"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/elixxir/comms/testkeys"
"gitlab.com/elixxir/crypto/fastRNG"
"gitlab.com/xx_network/comms/signature"
"gitlab.com/xx_network/crypto/csprng"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"gitlab.com/xx_network/primitives/utils"
"testing"
"time"
)
// Smoke test for Track function
func TestCheck(t *testing.T) {
session := storage.InitTestingSession(t)
instance := NewTestNetworkManager(t)
if err := setupInstance(instance); err != nil {
t.Errorf("Could not set up instance: %v", err)
}
/// Store a mock initial timestamp the store
now := time.Now()
twoDaysAgo := now.Add(-2 * 24 * time.Hour)
twoDaysTimestamp, err := marshalTimestamp(twoDaysAgo)
if err != nil {
t.Errorf("Could not marshal timestamp for test setup: %v", err)
}
err = session.Set(TimestampKey, twoDaysTimestamp)
if err != nil {
t.Errorf("Could not set mock timestamp for test setup: %v", err)
}
ourId := id.NewIdFromBytes([]byte("Sauron"), t)
stop := Track(session, instance.GetInstance(), ourId)
err = stop.Close(3 * time.Second)
if err != nil {
t.Errorf("Could not close thread: %v", err)
}
}
// Unit test for track
func TestCheck_Thread(t *testing.T) {
session := storage.InitTestingSession(t)
instance := NewTestNetworkManager(t)
if err := setupInstance(instance); err != nil {
t.Errorf("Could not set up instance: %v", err)
}
ourId := id.NewIdFromBytes([]byte("Sauron"), t)
stop := stoppable.NewSingle(ephemeralStoppable)
/// Store a mock initial timestamp the store
now := time.Now()
yesterday := now.Add(-24 * time.Hour)
yesterdayTimestamp, err := marshalTimestamp(yesterday)
if err != nil {
t.Errorf("Could not marshal timestamp for test setup: %v", err)
}
err = session.Set(TimestampKey, yesterdayTimestamp)
if err != nil {
t.Errorf("Could not set mock timestamp for test setup: %v", err)
}
// Run the tracker
go func() {
track(session, instance.GetInstance(), ourId, stop)
}()
time.Sleep(1 * time.Second)
// Manually generate identities
eids, err := ephemeral.GetIdsByRange(ourId, 64, now.UnixNano(), now.Sub(yesterday))
if err != nil {
t.Errorf("Could not generate upcoming ids: %v", err)
}
identities := generateIdentities(eids, ourId)
rngStreamGen := fastRNG.NewStreamGenerator(12, 3, csprng.NewSystemRNG)
retrieved, err := session.Reception().GetIdentity(rngStreamGen.GetStream())
if err != nil {
t.Errorf("Could not retrieve identity: %v", err)
}
// Check if store has been updated for new identities
if identities[0].String() != retrieved.String() {
t.Errorf("Store was not updated for newly generated identies")
}
err = stop.Close(3 * time.Second)
if err != nil {
t.Errorf("Could not close thread: %v", err)
}
}
func setupInstance(instance interfaces.NetworkManager) error {
cert, err := utils.ReadFile(testkeys.GetNodeKeyPath())
if err != nil {
return errors.Errorf("Failed to read cert from from file: %v", err)
}
ri := &mixmessages.RoundInfo{
ID: 1,
AddressSpaceSize: 64,
}
testCert, err := rsa.LoadPrivateKeyFromPem(cert)
if err != nil {
return errors.Errorf("Failed to load cert from from file: %v", err)
}
if err = signature.Sign(ri, testCert); err != nil {
return errors.Errorf("Failed to sign round info: %v", err)
}
if err = instance.GetInstance().RoundUpdate(ri); err != nil {
return errors.Errorf("Failed to RoundUpdate from from file: %v", err)
}
ri = &mixmessages.RoundInfo{
ID: 2,
AddressSpaceSize: 64,
}
if err = signature.Sign(ri, testCert); err != nil {
return errors.Errorf("Failed to sign round info: %v", err)
}
if err = instance.GetInstance().RoundUpdate(ri); err != nil {
return errors.Errorf("Failed to RoundUpdate from from file: %v", err)
}
return nil
}
...@@ -25,8 +25,8 @@ package network ...@@ -25,8 +25,8 @@ package network
import ( import (
"bytes" "bytes"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
bloom "gitlab.com/elixxir/bloomfilter"
"gitlab.com/elixxir/client/network/gateway" "gitlab.com/elixxir/client/network/gateway"
"gitlab.com/elixxir/client/network/rounds"
pb "gitlab.com/elixxir/comms/mixmessages" pb "gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/elixxir/primitives/knownRounds" "gitlab.com/elixxir/primitives/knownRounds"
"gitlab.com/elixxir/primitives/states" "gitlab.com/elixxir/primitives/states"
...@@ -36,9 +36,6 @@ import ( ...@@ -36,9 +36,6 @@ import (
"time" "time"
) )
const bloomFilterSize = 71888 // In Bits
const bloomFilterHashes = 8
//comms interface makes testing easier //comms interface makes testing easier
type followNetworkComms interface { type followNetworkComms interface {
GetHost(hostId *id.ID) (*connect.Host, bool) GetHost(hostId *id.ID) (*connect.Host, bool)
...@@ -71,6 +68,13 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -71,6 +68,13 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
jww.TRACE.Printf("follow: %d", followCnt) jww.TRACE.Printf("follow: %d", followCnt)
followCnt++ followCnt++
//get the identity we will poll for
identity, err := m.Session.Reception().GetIdentity(rng)
if err != nil {
jww.FATAL.Panicf("Failed to get an ideneity, this should be "+
"impossible: %+v", err)
}
//randomly select a gateway to poll //randomly select a gateway to poll
//TODO: make this more intelligent //TODO: make this more intelligent
gwHost, err := gateway.Get(m.Instance.GetPartialNdf().Get(), comms, rng) gwHost, err := gateway.Get(m.Instance.GetPartialNdf().Get(), comms, rng)
...@@ -85,7 +89,9 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -85,7 +89,9 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
Hash: m.Instance.GetPartialNdf().GetHash(), Hash: m.Instance.GetPartialNdf().GetHash(),
}, },
LastUpdate: uint64(m.Instance.GetLastUpdateID()), LastUpdate: uint64(m.Instance.GetLastUpdateID()),
ClientID: m.Uid.Bytes(), ReceptionID: identity.EphId[:],
StartTimestamp: identity.StartRequest.UnixNano(),
EndTimestamp: identity.EndRequest.UnixNano(),
} }
jww.TRACE.Printf("Polling %s for NDF...", gwHost) jww.TRACE.Printf("Polling %s for NDF...", gwHost)
pollResp, err := comms.SendPoll(gwHost, &pollReq) pollResp, err := comms.SendPoll(gwHost, &pollReq)
...@@ -94,33 +100,13 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -94,33 +100,13 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
return return
} }
// ---- Process Update Data ---- // ---- Process Network State Update Data ----
lastTrackedRound := id.Round(pollResp.LastTrackedRound)
gwRoundsState := &knownRounds.KnownRounds{} gwRoundsState := &knownRounds.KnownRounds{}
err = gwRoundsState.Unmarshal(pollResp.KnownRounds) err = gwRoundsState.Unmarshal(pollResp.KnownRounds)
if err != nil { if err != nil {
jww.ERROR.Printf("Failed to unmarshal: %+v", err) jww.ERROR.Printf("Failed to unmarshal: %+v", err)
return return
} }
var filterList []*bloom.Ring
for _, f := range pollResp.BloomFilters {
jww.DEBUG.Printf("Bloom Filter size: %d, hashes: %d",
bloomFilterSize, bloomFilterHashes)
filter, err := bloom.InitByParameters(bloomFilterSize,
bloomFilterHashes)
if err != nil {
jww.INFO.Printf("Bloom Filter Data: %v", f)
jww.FATAL.Panicf("Unable to create a bloom filter: %+v",
err)
}
if err := filter.UnmarshalBinary(f); err != nil {
jww.WARN.Printf("Failed to unmarshal filter: %+v", err)
jww.INFO.Printf("Bloom Filter Unmarshal Data: %v", f)
continue
}
filterList = append(filterList, filter)
}
jww.INFO.Printf("Bloom filters found in response: %d", len(filterList))
// ---- Node Events ---- // ---- Node Events ----
// NOTE: this updates the structure, AND sends events over the node // NOTE: this updates the structure, AND sends events over the node
...@@ -139,6 +125,9 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -139,6 +125,9 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
} }
} }
//check that the stored address space is correct
m.Session.Reception().UpdateIdSize(uint(m.Instance.GetPartialNdf().Get().AddressSpaceSize))
// NOTE: this updates rounds and updates the tracking of the health of the // NOTE: this updates rounds and updates the tracking of the health of the
// network // network
if pollResp.Updates != nil { if pollResp.Updates != nil {
...@@ -187,20 +176,37 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -187,20 +176,37 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
} }
} }
// ---- Round Processing ----- // ---- Identity Specific Round Processing -----
if identity.Fake {
return
}
//get the range fo filters which are valid for the identity
filtersStart, filtersEnd := rounds.ValidFilterRange(identity, pollResp.Filters)
//check if there are any valid filters returned
if !(filtersEnd > filtersStart) {
return
}
//prepare the filter objects for processing
filterList := make([]*rounds.RemoteFilter, filtersEnd-filtersStart)
for i := filtersStart; i < filtersEnd; i++ {
filterList[i-filtersStart] = rounds.NewRemoteFilter(pollResp.Filters.Filters[i])
}
jww.INFO.Printf("Bloom filters found in response: %d, num filters used: %d",
len(pollResp.Filters.Filters), len(filterList))
// check rounds using the round checker function which determines if there // check rounds using the round checker function which determines if there
// are messages waiting in rounds and then sends signals to the appropriate // are messages waiting in rounds and then sends signals to the appropriate
// handling threads // handling threads
roundChecker := func(rid id.Round) bool { roundChecker := func(rid id.Round) bool {
return m.round.Checker(rid, filterList) return m.round.Checker(rid, filterList, identity)
} }
// get the bit vector of rounds that have been checked // get the bit vector of rounds that have been checked
checkedRounds := m.Session.GetCheckedRounds() checkedRounds := m.Session.GetCheckedRounds()
// cleave off old state in the bit vector which is deprecated from the
// network
jww.DEBUG.Printf("lastCheckedRound: %v", lastTrackedRound)
checkedRounds.Forward(lastTrackedRound)
jww.TRACE.Printf("gwRoundState: %+v", gwRoundsState) jww.TRACE.Printf("gwRoundState: %+v", gwRoundsState)
jww.TRACE.Printf("pollResp.KnownRounds: %s", string(pollResp.KnownRounds)) jww.TRACE.Printf("pollResp.KnownRounds: %s", string(pollResp.KnownRounds))
...@@ -208,6 +214,7 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -208,6 +214,7 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
// loop through all rounds the client does not know about and the gateway // loop through all rounds the client does not know about and the gateway
// does, checking the bloom filter for the user to see if there are // does, checking the bloom filter for the user to see if there are
// messages for the user (bloom not implemented yet) // messages for the user (bloom not implemented yet)
checkedRounds.RangeUncheckedMasked(gwRoundsState, roundChecker, checkedRounds.RangeUncheckedMaskedRange(gwRoundsState, roundChecker,
filterList[0].FirstRound(), filterList[len(filterList)-1].LastRound(),
int(m.param.MaxCheckedRounds)) int(m.param.MaxCheckedRounds))
} }
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
package network package network
// manager.go controls access to network resources. Interprocess communications // tracker.go controls access to network resources. Interprocess communications
// and intraclient state are accessible through the context object. // and intraclient state are accessible through the context object.
import ( import (
"github.com/pkg/errors" "github.com/pkg/errors"
"gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/elixxir/client/network/ephemeral"
"gitlab.com/elixxir/client/network/health" "gitlab.com/elixxir/client/network/health"
"gitlab.com/elixxir/client/network/internal" "gitlab.com/elixxir/client/network/internal"
"gitlab.com/elixxir/client/network/message" "gitlab.com/elixxir/client/network/message"
...@@ -44,7 +45,6 @@ type manager struct { ...@@ -44,7 +45,6 @@ type manager struct {
//sub-managers //sub-managers
round *rounds.Manager round *rounds.Manager
message *message.Manager message *message.Manager
//atomic denotes if the network is running //atomic denotes if the network is running
running *uint32 running *uint32
} }
...@@ -96,6 +96,7 @@ func NewManager(session *storage.Session, switchboard *switchboard.Switchboard, ...@@ -96,6 +96,7 @@ func NewManager(session *storage.Session, switchboard *switchboard.Switchboard,
// - Health Tracker (/network/health) // - Health Tracker (/network/health)
// - Garbled Messages (/network/message/garbled.go) // - Garbled Messages (/network/message/garbled.go)
// - Critical Messages (/network/message/critical.go) // - Critical Messages (/network/message/critical.go)
// - Ephemeral ID tracking (network/ephemeral/tracker.go)
func (m *manager) Follow() (stoppable.Stoppable, error) { func (m *manager) Follow() (stoppable.Stoppable, error) {
if !atomic.CompareAndSwapUint32(m.running, 0, 1) { if !atomic.CompareAndSwapUint32(m.running, 0, 1) {
return nil, errors.Errorf("network routines are already running") return nil, errors.Errorf("network routines are already running")
...@@ -127,6 +128,8 @@ func (m *manager) Follow() (stoppable.Stoppable, error) { ...@@ -127,6 +128,8 @@ func (m *manager) Follow() (stoppable.Stoppable, error) {
// Round processing // Round processing
multi.Add(m.round.StartProcessors()) multi.Add(m.round.StartProcessors())
multi.Add(ephemeral.Track(m.Session, m.Instance, m.Comms.Id))
//set the running status back to 0 so it can be started again //set the running status back to 0 so it can be started again
closer := stoppable.NewCleanup(multi, func(time.Duration) error { closer := stoppable.NewCleanup(multi, func(time.Duration) error {
if !atomic.CompareAndSwapUint32(m.running, 1, 0) { if !atomic.CompareAndSwapUint32(m.running, 1, 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment