From 5b5674b8e22cb6e2466d8a6b02123b7c0d243f03 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Mon, 5 Apr 2021 12:05:30 -0700 Subject: [PATCH] Integrate fast gateway polling --- go.mod | 2 +- go.sum | 4 ++++ interfaces/params/network.go | 5 +++++ network/follow.go | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 14d509875..a2b1bbd73 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( 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.20210402222700-7fac5f85c596 + gitlab.com/elixxir/comms v0.0.4-0.20210405183148-930ea17a1b5f gitlab.com/elixxir/crypto v0.0.7-0.20210401210040-b7f1da24ef13 gitlab.com/elixxir/ekv v0.1.4 gitlab.com/elixxir/primitives v0.0.3-0.20210401175645-9b7b92f74ec4 diff --git a/go.sum b/go.sum index 91e103b40..36ac983b0 100644 --- a/go.sum +++ b/go.sum @@ -262,6 +262,10 @@ gitlab.com/elixxir/comms v0.0.4-0.20210402205854-0ea056917a98 h1:6GF+txzdbf5EKZK gitlab.com/elixxir/comms v0.0.4-0.20210402205854-0ea056917a98/go.mod h1:Hd9NbUwdRXFcs5ZgukPYsChmM8AqxJRjzMNvQuUXqh4= gitlab.com/elixxir/comms v0.0.4-0.20210402222700-7fac5f85c596 h1:jX6H4vu//StDLKZn5lcmxp9S3IhzS/8Uttg0K5r7Iqo= gitlab.com/elixxir/comms v0.0.4-0.20210402222700-7fac5f85c596/go.mod h1:jqqUYnsftpfQXJ57BPYp5A+i7qfA5IXhKUE9ZOSrqaE= +gitlab.com/elixxir/comms v0.0.4-0.20210405170210-0aa75aa7fefd h1:0wkkIeKyZ9SW+0MpxpZnypTOpePze8/r4USw1hooAJs= +gitlab.com/elixxir/comms v0.0.4-0.20210405170210-0aa75aa7fefd/go.mod h1:jqqUYnsftpfQXJ57BPYp5A+i7qfA5IXhKUE9ZOSrqaE= +gitlab.com/elixxir/comms v0.0.4-0.20210405183148-930ea17a1b5f h1:ZUY46FcnA7BOd9pCggproSRBqycV0X+zKyai3eTL2ys= +gitlab.com/elixxir/comms v0.0.4-0.20210405183148-930ea17a1b5f/go.mod h1:jqqUYnsftpfQXJ57BPYp5A+i7qfA5IXhKUE9ZOSrqaE= 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= diff --git a/interfaces/params/network.go b/interfaces/params/network.go index b84c38a09..95e3bad0c 100644 --- a/interfaces/params/network.go +++ b/interfaces/params/network.go @@ -25,6 +25,10 @@ type Network struct { ParallelNodeRegistrations uint //How far back in rounds the network should actually check KnownRoundsThreshold uint + // Determines verbosity of network updates while polling + // If true, client receives a filtered set of updates + // If false, client receives the full list of network updates + FastPolling bool Rounds Messages @@ -42,6 +46,7 @@ func GetDefaultNetwork() Network { E2EParams: GetDefaultE2ESessionParams(), ParallelNodeRegistrations: 8, KnownRoundsThreshold: 1500, //5 rounds/sec * 60 sec/min * 5 min + FastPolling: true, } n.Rounds = GetDefaultRounds() n.Messages = GetDefaultMessage() diff --git a/network/follow.go b/network/follow.go index a555874ad..8e345bba4 100644 --- a/network/follow.go +++ b/network/follow.go @@ -103,6 +103,7 @@ func (m *manager) follow(report interfaces.ClientErrorReport, rng csprng.Source, StartTimestamp: identity.StartRequest.UnixNano(), EndTimestamp: identity.EndRequest.UnixNano(), ClientVersion: []byte(version.String()), + FastPolling: m.param.FastPolling, } jww.TRACE.Printf("Executing poll for %v(%s) range: %s-%s(%s) from %s", identity.EphId.Int64(), identity.Source, identity.StartRequest, -- GitLab