Skip to content
Snippets Groups Projects
Commit dfb89f0f authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

debugging info, and make sure to 'check' round id 0

parent 6e81b432
Branches
Tags
No related merge requests found
......@@ -13,10 +13,10 @@ require (
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/viper v1.7.1
gitlab.com/elixxir/comms v0.0.0-20200924225440-76e02f95fb92
gitlab.com/elixxir/crypto v0.0.0-20201002151111-280700c6e774
gitlab.com/elixxir/comms v0.0.0-20201006010513-3353fb46569a
gitlab.com/elixxir/crypto v0.0.0-20201006010428-67a8782d097e
gitlab.com/elixxir/ekv v0.1.3
gitlab.com/elixxir/primitives v0.0.0-20200915190719-f4586ec93f50
gitlab.com/elixxir/primitives v0.0.0-20201006010327-c2f93eb587e3
gitlab.com/xx_network/comms v0.0.0-20200924225518-0c867207b1e6
gitlab.com/xx_network/crypto v0.0.0-20200812183430-c77a5281c686
gitlab.com/xx_network/primitives v0.0.0-20200915204206-eb0287ed0031
......
......@@ -285,6 +285,14 @@ gitlab.com/elixxir/comms v0.0.0-20200924210331-d7903c023fa6 h1:ctVsHyiabgRls3esA
gitlab.com/elixxir/comms v0.0.0-20200924210331-d7903c023fa6/go.mod h1:9+Jj7K8HOTgBjPuiP69VtTKTv7GvAK6bWlh4lgMAqrk=
gitlab.com/elixxir/comms v0.0.0-20200924225440-76e02f95fb92 h1:KwqVzHpqYg1l1/KG6uRqnl7HBgvrzuknMVCeEvRsbow=
gitlab.com/elixxir/comms v0.0.0-20200924225440-76e02f95fb92/go.mod h1:3i4o6ie4LFC+EVN68l9tdt9JxJlAd3+pNNnKBFubKSg=
gitlab.com/elixxir/comms v0.0.0-20201005195431-e03b4d775579 h1:MVoaBYAKk8MSGjSSOnei74E7Pztx7MUSzRoG5Z8JTh4=
gitlab.com/elixxir/comms v0.0.0-20201005195431-e03b4d775579/go.mod h1:kH0R58vcPFyDAmgDBLgIGWefb8yQhHQUennXrWLdfak=
gitlab.com/elixxir/comms v0.0.0-20201005220411-8cca01932aaf h1:E3SWgP8ab6iAd2JzLo5QE1E8DHCjFV6pjHSV4XAaJ+Y=
gitlab.com/elixxir/comms v0.0.0-20201005220411-8cca01932aaf/go.mod h1:S/nvLrstCGUENReuz/atX/rDI2fbjsZCucgcgTX53/A=
gitlab.com/elixxir/comms v0.0.0-20201005232129-4fcbcb1b8720 h1:xfwI2qQLsfnDr0Q/J3akHHAc9cNOS2O343sC4v0g+Qc=
gitlab.com/elixxir/comms v0.0.0-20201005232129-4fcbcb1b8720/go.mod h1:dPnkkC3b+lPIh/nzpGN8VoDieKUj+lmWTGDRsA7Rwns=
gitlab.com/elixxir/comms v0.0.0-20201006010513-3353fb46569a h1:pEqtyTf9h1tPem2O4BXTDCVF8KOJMQKxUkvQz2qgl9Y=
gitlab.com/elixxir/comms v0.0.0-20201006010513-3353fb46569a/go.mod h1:ISDCOoSsgkzKJj69UUXQf0TVeJOmrdOYv9MofxEJWcg=
gitlab.com/elixxir/crypto v0.0.0-20200707005343-97f868cbd930/go.mod h1:LHBAaEf48a0/AjU118rjoworH0LgXifhAqmNX3ZRvME=
gitlab.com/elixxir/crypto v0.0.0-20200731174640-0503cf80524a/go.mod h1:LHBAaEf48a0/AjU118rjoworH0LgXifhAqmNX3ZRvME=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4 h1:28ftZDeYEko7xptCZzeFWS1Iam95dj46TWFVVlKmw6A=
......@@ -326,6 +334,14 @@ gitlab.com/elixxir/crypto v0.0.0-20201001175928-ce7312789eb7 h1:bmi0wc0m9qq+5aEi
gitlab.com/elixxir/crypto v0.0.0-20201001175928-ce7312789eb7/go.mod h1:1P3IMJ6i3L+5si0PiMvoo/qQXMsEhNVjn0yMUrm3eiA=
gitlab.com/elixxir/crypto v0.0.0-20201002151111-280700c6e774 h1:Ph3OiDgRQJ5Ac9VnFiv/Dk4COw2+jUjGnF7Cal5Q5W4=
gitlab.com/elixxir/crypto v0.0.0-20201002151111-280700c6e774/go.mod h1:1P3IMJ6i3L+5si0PiMvoo/qQXMsEhNVjn0yMUrm3eiA=
gitlab.com/elixxir/crypto v0.0.0-20201005195400-f1f9c773c332 h1:zDBp9J5muvATFEx7NhF39xqD9bKwKOBIQ8Mf6FsJSi8=
gitlab.com/elixxir/crypto v0.0.0-20201005195400-f1f9c773c332/go.mod h1:IWqcgmrUXHg1+lUM9CbNIvCDm6ySeHEpVaXuiMUK35M=
gitlab.com/elixxir/crypto v0.0.0-20201005220333-86bc10616e5d h1:9csJlj5uzarXq4VUnaT8TbdL9aT3MkfFfqXTXNRrULs=
gitlab.com/elixxir/crypto v0.0.0-20201005220333-86bc10616e5d/go.mod h1:SdvcSJvuFNcdk7eUcRnq6zn2mcsU3Ks5ywVAgw0V2f8=
gitlab.com/elixxir/crypto v0.0.0-20201005231932-7d290c959bdb h1:dGnOhkotUPp+RYZRFquEMtTVesgDfGeKQsrQs7PsdLE=
gitlab.com/elixxir/crypto v0.0.0-20201005231932-7d290c959bdb/go.mod h1:gK5V2MmeMFouEIxQdQ0MsYrWlvArKfFKm3XMgIc0CYs=
gitlab.com/elixxir/crypto v0.0.0-20201006010428-67a8782d097e h1:EcK8J7n0QJ5UhDqkDKt/TW5maUFbBVMIn0gAO9Y/HOs=
gitlab.com/elixxir/crypto v0.0.0-20201006010428-67a8782d097e/go.mod h1:W/lkTsgaqA+8A1FKZnXFtetNLHV9VNn6IPzMYzgOiBY=
gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842 h1:m1zDQ6UadpuMnV7nvnyR+DUXE3AisRnVjajTb1xZE4c=
gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842/go.mod h1:bXY0kgbV5BHYda4YY5/hiG5bjimGK+R3PYub5yM9C/s=
gitlab.com/elixxir/ekv v0.1.1 h1:Em3rF8sv+tNbQGXbcpYzAS2blWRAP708JGhYlkN74Kg=
......@@ -345,6 +361,14 @@ gitlab.com/elixxir/primitives v0.0.0-20200915190719-f4586ec93f50 h1:J0A2JsYlb0He
gitlab.com/elixxir/primitives v0.0.0-20200915190719-f4586ec93f50/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.0-20200916172343-37503735c7a1 h1:51FDjTwXKVadID7xRxQxMKequpEjoKAIxaMpAn/YCP0=
gitlab.com/elixxir/primitives v0.0.0-20200916172343-37503735c7a1/go.mod h1:pJx2DZk9s8vVMnLN7x0hIPngDjbNSdOP6kk3RLlRxHg=
gitlab.com/elixxir/primitives v0.0.0-20201005195316-d848a5322745 h1:MVnRYO9YAEtr6ZU+73OcajZhRol1zKwAHF7E7Skx3L0=
gitlab.com/elixxir/primitives v0.0.0-20201005195316-d848a5322745/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.0-20201005220254-0ed72e5ce087 h1:tC81v3hxiGsChxjJpSP/kS69xF8JwmWaabzcLBYjJds=
gitlab.com/elixxir/primitives v0.0.0-20201005220254-0ed72e5ce087/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.0-20201005231810-020916f67bd6 h1:ZE7ee4VIr7j4pabISupi/jln8WXdztmQNB6Fy6BIP4I=
gitlab.com/elixxir/primitives v0.0.0-20201005231810-020916f67bd6/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.0-20201006010327-c2f93eb587e3 h1:nQG+LWzYfXiDT+4xPQ2U9sHUM6J51zmL220aSjIEvx4=
gitlab.com/elixxir/primitives v0.0.0-20201006010327-c2f93eb587e3/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw=
gitlab.com/xx_network/comms v0.0.0-20200806235452-3a82720833ba h1:7nozLSNBX0CfP53DDiDNLJx9obhYGfGf5na0/c9rMso=
gitlab.com/xx_network/comms v0.0.0-20200806235452-3a82720833ba/go.mod h1:idLzPGYig57XE7xuU93OlIF9s6NgSJj7OArQvsd5DjY=
......
......@@ -23,7 +23,7 @@ package network
import (
"gitlab.com/elixxir/client/network/gateway"
"gitlab.com/elixxir/client/storage"
//"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/crypto/csprng"
"gitlab.com/elixxir/primitives/knownRounds"
"gitlab.com/xx_network/comms/connect"
......@@ -62,7 +62,7 @@ var followCnt int = 0
// executes each iteration of the follower
func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
jww.TRACE.Printf("follow: %d", followCnt)
jww.INFO.Printf("follow: %d", followCnt)
followCnt++
//randomly select a gateway to poll
......@@ -90,7 +90,7 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
// ---- Process Update Data ----
lastTrackedRound := id.Round(pollResp.LastTrackedRound)
gwRoundsState := knownRounds.NewKnownRound(storage.CheckRoundsMaxSize + 1)
gwRoundsState := &knownRounds.KnownRounds{}
err = gwRoundsState.Unmarshal(pollResp.KnownRounds)
if err != nil {
jww.ERROR.Printf("Failed to unmartial: %+v", err)
......@@ -137,10 +137,19 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
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("pollResp.KnownRounds: %s", string(pollResp.KnownRounds))
// 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
// messages for the user (bloom not implemented yet)
checkedRounds.RangeUncheckedMasked(gwRoundsState, roundChecker,
int(m.param.MaxCheckedRounds))
wr := m.Instance.GetWaitingRounds()
jww.INFO.Printf("WaitingRounds: %+v, %d", wr.GetSlice(), wr.Len())
}
......@@ -122,7 +122,7 @@ func (t *Tracker) start(quitCh <-chan struct{}) {
// Handle thread kill
break
case heartbeat = <-t.heartbeat:
jww.INFO.Printf("heartbeat: %v", heartbeat)
jww.DEBUG.Printf("heartbeat: %v", heartbeat)
if healthy(heartbeat) {
// Stop and reset timer
if !timer.Stop() {
......
......@@ -17,6 +17,7 @@ import (
// sent to Message Retrieval Workers, otherwise it is sent to Historical Round
// Retrieval
func (m *Manager) Checker(roundID id.Round) bool {
jww.INFO.Printf("Checking round ID: %d", roundID)
// Set round to processing, if we can
processing, count := m.p.Process(roundID)
if !processing {
......@@ -38,9 +39,11 @@ func (m *Manager) Checker(roundID id.Round) bool {
// Go get the round from the round infos, if it exists
ri, err := m.Instance.GetRound(roundID)
if err != nil {
jww.INFO.Printf("Historical Round: %d", roundID)
// If we didn't find it, send to Historical Rounds Retrieval
m.historicalRounds <- roundID
} else {
jww.INFO.Printf("Looking up Round: %d", roundID)
// IF found, send to Message Retrieval Workers
m.lookupRoundMessages <- ri
}
......
......@@ -51,6 +51,9 @@ func (m *Manager) getMessagesFromGateway(roundInfo *pb.RoundInfo,
"to request from")
}
jww.INFO.Printf("Getting messages for RoundID %v via Gateway: %s", rid,
gwHost.GetId())
// send the request
msgReq := &pb.GetMessages{
ClientID: m.Uid.Marshal(),
......
......@@ -111,6 +111,8 @@ func New(baseDir, password string, u userInterface.User, cmixGrp,
if err != nil {
return nil, errors.WithMessage(err, "Failed to create checkedRounds")
}
// There is no round id 0
s.checkedRounds.Check(0)
s.criticalMessages, err = utility.NewE2eMessageBuffer(s.kv, criticalMessagesKey)
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment