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

Merge branch 'windowSize' into 'release'

GRPC Update

See merge request elixxir/notifications-bot!37
parents 70f1d423 eda9d527
No related branches found
No related tags found
1 merge request!5Release
......@@ -7,26 +7,23 @@ require (
cloud.google.com/go/firestore v1.1.1 // indirect
cloud.google.com/go/pubsub v1.3.1 // indirect
firebase.google.com/go v3.12.0+incompatible
github.com/golang/protobuf v1.4.3 // indirect
github.com/jonahh-yeti/apns v0.0.1
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/viper v1.7.0
gitlab.com/elixxir/comms v0.0.4-0.20210527192434-4f4f53730861
gitlab.com/elixxir/crypto v0.0.7-0.20210526002540-1fb51df5b4b2
gitlab.com/elixxir/primitives v0.0.3-0.20210526002350-b9c947fec050 // indirect
gitlab.com/xx_network/comms v0.0.4-0.20210526002311-2b5a66af0eac
gitlab.com/xx_network/crypto v0.0.5-0.20210526002149-9c08ccb202be
gitlab.com/xx_network/primitives v0.0.4-0.20210525232109-3f99a04adcfd
gitlab.com/xx_network/ring v0.0.3-0.20210527191221-ce3f170aabd5 // indirect
golang.org/x/net v0.0.0-20210510120150-4163338589ed
gitlab.com/elixxir/comms v0.0.4-0.20210601193829-9a626b0c8a56
gitlab.com/elixxir/crypto v0.0.7-0.20210601193549-039f62f2d81a
gitlab.com/xx_network/comms v0.0.4-0.20210601193357-717527f3a1ff
gitlab.com/xx_network/crypto v0.0.5-0.20210601193257-27ba5d088733
gitlab.com/xx_network/primitives v0.0.4-0.20210601193218-658388fcaa81
golang.org/x/net v0.0.0-20210525063256-abc453219eb5
golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3 // indirect
google.golang.org/grpc v1.33.1 // indirect
gopkg.in/ini.v1 v1.56.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/driver/postgres v1.0.8
gorm.io/gorm v1.20.12
)
This diff is collapsed.
......@@ -56,7 +56,8 @@ func (nb *Impl) initCreator() {
func (nb *Impl) addEphemerals(start time.Time) {
currentOffset, epoch := ephemeral.HandleQuantization(start)
def := nb.inst.GetPartialNdf()
err := nb.Storage.AddEphemeralsForOffset(currentOffset, epoch, uint(def.Get().AddressSpaceSize), start)
// FIXME: Does the address space need more logic here?
err := nb.Storage.AddEphemeralsForOffset(currentOffset, epoch, uint(def.Get().AddressSpace[0].Size), start)
if err != nil {
jww.WARN.Printf("failed to update ephemerals: %+v", err)
}
......
......@@ -23,6 +23,7 @@ import (
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"gitlab.com/xx_network/primitives/ndf"
"gitlab.com/xx_network/primitives/netTime"
"gitlab.com/xx_network/primitives/utils"
"gorm.io/gorm"
"strings"
......@@ -128,7 +129,7 @@ func StartNotifications(params Params, noTLS, noFirebase bool) (*Impl, error) {
handler := NewImplementation(impl)
comms := notificationBot.StartNotificationBot(&id.NotificationBot, params.Address, handler, cert, key)
impl.Comms = comms
i, err := network.NewInstance(impl.Comms.ProtoComms, &ndf.NetworkDefinition{AddressSpaceSize: 16}, nil, nil, network.None, false)
i, err := network.NewInstance(impl.Comms.ProtoComms, &ndf.NetworkDefinition{AddressSpace: []ndf.AddressSpace{{Size: 16, Timestamp: netTime.Now()}}}, nil, nil, network.None, false)
if err != nil {
return nil, errors.WithMessage(err, "Failed to start instance")
}
......@@ -259,7 +260,8 @@ func (nb *Impl) RegisterForNotifications(request *pb.NotificationRegisterRequest
}
_, epoch := ephemeral.HandleQuantization(time.Now())
def := nb.inst.GetPartialNdf()
e, err := nb.Storage.AddLatestEphemeral(u, epoch, uint(def.Get().AddressSpaceSize))
// FIXME: Does the address space need more logic here?
e, err := nb.Storage.AddLatestEphemeral(u, epoch, uint(def.Get().AddressSpace[0].Size))
if err != nil {
return errors.WithMessage(err, "Failed to add ephemeral ID for user")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment