diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..03ce3f2f34129931075fb1ead5eaeac7b9746c57 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +Copyright (c) 2020, xx network SEZC + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 809c8a0144349c9759a7628fb3188f6425585a4f..11575e9101d46fe23e000664dda88b3d9e143c7b 100644 --- a/README.md +++ b/README.md @@ -1,157 +1,443 @@ -# elixxir/client +# XX Network Client [](https://gitlab.com/elixxir/client/commits/master) [](https://gitlab.com/elixxir/client/commits/master) -This repo contains the Elixxir command-line client (used for integration -testing) and related libraries that facilitate making more full-featured -clients for all platforms. - -##Running the Command Line Client - -First, make sure dependencies are installed into the vendor folder by running -`glide up`. Then, in the project directory, run `go run main.go`. - -If what you're working on requires you to change other repos, you can remove -the other repo from the vendor folder and Go's build tools will look for those -packages in your Go path instead. Knowing which dependencies to remove can be -really helpful if you're changing a lot of repos at once. - -If glide isn't working and you don't know why, try removing glide.lock and -~/.glide to brutally cleanse the cache. - - -Mutually exclusive (almost) required args: - -|Long flag|Short flag|Effect|Example| -|---|---|---|---| -|--userid|-i|ID of precanned user to use|-i 5| -|--regcode|-e|Registration code to use for logging in a new user|-e AAAA| - -The above args are mutually exclusive and are not fully required. - -For example, to login as canned user 18, use `-i 18` and any registration code specified with `-e` will be ignored. -To login as a new user, `-i` MUST not be specified, and `-e` will be the registration code to be used. - -NOTE: There is a third way of starting the client, which ONLY works without specifying any of the above args. -This will internally ignore the registration address, if specified, and will do registration directly on the Nodes -only. - -Optional args: - -|Long flag|Short flag|Effect|Example| -|---|---|---|---| -|--message|-m|Message to send|-m "top of the morning"| -|--messageTimeout|-t|The number of seconds to wait for 'waitForMessages' messages to arrive (default 45)|-t 42| -|--ndf|-n|Path to the network definition JSON file (default "ndf.json")| -n "ndf.json"| -|--SearchForUser|-s|Sets the email to search for to find a user with user discovery| -s "david@chaum.com| -|--dest64| |Sets the destination user id encoded in base 64| --dest64 "yCvV6AsEK3l+45Gn4awBJ4lpb+hT2sO6yzxjeraRor0="| -|--destid|-d|ID to send message to| -d 69| -|--email|-E|Email to register for User Discovery| -e "david@chaum.com"| -|--end2end| |Send messages with E2E encryption to destination user. Must have found each other via UDB first| -end2end| -|--help| |help for client| --help| -|--keyParams| |Define key generation parameters. Pass values in comma separated list in the following order: MinKeys,MaxKeys,NumRekeys,TTLScalar,MinNumKeys| | -|--ndfPubKey|-p|Path to the public key for the network definition JSON file| -|--nick| |Nickname to register for User Discovery (default "Default")| --nick "zezima"| -|--noBlockingTransmission| |Sets if transmitting messages blocks or not. Defaults to true if unset.|--noBlockingTransmission| -|--noTLS| |Set to ignore TLS. Connections will fail if the network requires TLS. For debugging|--noTLS| -|--privateKey| |The path for a PEM encoded private key which will be used to create the user|--privateKey "key.pem"| -|--rateLimiting| |Sets the amount of time, in ms, that the client waits between sending messages. set to zero to disable. Automatically disabled if 'blockingTransmission' is false (default 1000)| --rateLimiting 100| -|--regcode string|-r|Registration Code with the registration server |--regcode "AAAA"| -|--sessionfile|-f|Passes a file path for loading a session. If the file doesnt exist the code will register the user and store it there. If not passed the session will be stored to ram and lost when the cli finishes| -s "user.session"| -|--skipNDFVerification| |Specifies if the NDF should be loaded without the signature|--skipNDFVerification| -|--userid|-i|ID to sign in as. Does not register, must be an available precanned user |-i 32| -|--verbose|-v|Verbose mode for debugging|-v| -|--version|-V|Show the client version information|-V| -|--waitForMessages|-w|Denotes the number of messages the client should receive before closing (default 1)|-w 7| - -Runs a client for cMix anonymous communication platform +The XX Network client is a library and related command line tool +that facilitate making full-featured XX clients for all platforms. The +command line tool can be built for any platform supported by +golang. The libraries are built for iOS and Android using +[gomobile](https://godoc.org/golang.org/x/mobile/cmd/gomobile). + +This repository contains everything necessary to implement all of the +XX Network messaging features. These include the end-to-end encryption +and metadata protection. It also contains features to extend the base +messaging protocols. + +For library writers, the client requires a writable folder to store +data, functions for receiving and approving requests for creating +secure end-to-end messaging channels, for discovering users, and for +receiving different types of messages. Details for implementing these +features are in the Library Overview section below. + +The client is open source software released under the simplified BSD License. + +## Command Line Usage + +The command line tool is intended for testing XX network functionality and not +for regular user use. + +Compilation (assuming golang 1.13 or newer): + +``` +git clone https://gitlab.com/elixxir/client.git client +cd client +go mod vendor -v +go mod tidy +go test ./... +# Linux 64 bit binary +GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o client.linux64 main.go +# Windows 64 bit binary +GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o client.win64 main.go +# Windows 32 big binary +GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/client.win32 main.go +# Mac OSX 64 bit binary (intel) +GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/client.darwin64 main.go +``` + +Basic command line usage, sending unsafe, unencrypted messages to yourself: + +``` +client --password user-password --ndf ndf.json -l client.log -s session-directory --writeContact user-contact.json --unsafe -m \"Hello World, without E2E Encryption\" +``` + +* `--password` is the password used to encrypt and load the session. +* `--ndf` is the network definition file, downloadable from the XX network + website when available. +* `-l` the file to write logs (user messages are still printed to stdout) +* `--writeContact` Output the user's contact information to this file. +* `--unsafe` Send message without encryption (necessary whenever you have not + already established an e2e channel) +* `-m` The message to send + +The client defaults to sending to itself when not supplied. + +Sending unsafe messages between 2 users: + +``` +# Get user contact jsons +client --password user1-password --ndf ndf.json -l client1.log -s user1session --writeContact user1-contact.json --unsafe -m "Hi" +client --password user2-password --ndf ndf.json -l client2.log -s user2session --writeContact user2-contact.json --unsafe -m "Hi" + +# Send messages to each other, run them in the background so they both receive +# each other's messages +client --password user1-password --ndf ndf.json -l client1.log -s user1session --destfile user2-contact.json --unsafe -m "Hi User 2, from User 1 without E2E Encryption" & +client --password user2-password --ndf ndf.json -l client2.log -s user2session --destfile user1-contact.json --unsafe -m "Hi User 1, from User 2 without E2E Encryption" & +``` + +* `--destfile` is used to specify the recipient. You can also use + `--destid b64:...` using the user's base64 id which is printed in the logs. + +To send with end to end encryption, you must first establish a connection +with the other user: + +``` +# Get user contact jsons +client --password user1-password --ndf ndf.json -l client1.log -s user1session --writeContact user1-contact.json --unsafe -m "Hi" +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 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" & +``` + +Note that we have dropped the `--unsafe` in exchange for: +* `--unsafe-channel-creation` Auto-create and auto-accept channel requests. + +To be considered "safe" the user should be prompted. You can do this +with the command line by explicitly accepting the channel creation +when sending and/or explicitly accepting a request with +`--accept-channel`. + +Full usage of client can be found with `client --help`: + +``` +$ ./client --help +Usage: + client [flags] + client [command] + +Available Commands: + generate Generates version and dependency information for the + Elixxir binary + help Help about any command + version Print the version and dependency information for the + Elixxir binary + +Flags: + --accept-channel Accept the channel request for the + corresponding recipient ID + --destfile string Read this contact file for the destination id + -d, --destid string ID to send message to (if below 40, will be + precanned. Use '0x' or 'b64:' for hex and + base64 representations) (default "0") + -h, --help help for client + -l, --log string Path to the log output path (- is stdout) + (default "-") + -m, --message string Message to send + -n, --ndf string Path to the network definition JSON file + (default "ndf.json") + -p, --password string Password to the session file + --receiveCount uint How many messages we should wait for before + quitting (default 1) + --regcode string Registration code (optional) + --sendCount uint The number of times to send the message + (default 1) + --sendDelay uint The delay between sending the messages in ms + (default 500) + --sendid uint Use precanned user id (must be between 1 and + 40, inclusive) + -s, --session string Sets the initial directory for client storage + --unsafe Send raw, unsafe messages without e2e + encryption. + --unsafe-channel-creation Turns off the user identity authenticated + channel check, automatically approving + authenticated channels + -v, --verbose Verbose mode for debugging + --waitTimeout uint The number of seconds to wait for messages to + arrive (default 15) + -w, --writeContact string Write the contact file for this user to this + file Use "client [command] --help" for more information about a command. - - - -##Project Structure - -`api` package contains functions that clients written in Go should call to do -all of the main interactions with the client library. - -`bindings` package exists for compatibility with Gomobile. All functions and -structs in the `bindings` package must be able to be bound with `$ gomobile bind` -or they will be unceremoniously removed. There are many requirements for -this, and if you're writing bindings, you should check the `gomobile` -documentation listed below. - -In general, clients written in Go should use the `api` package and clients -written in other languages should use the `bindings` package. - -`bots` contains code for interacting with bots. If the amount of code required -to easily interact with a bot is reasonably small, it should go in this package. - -`cmd` contains the command line client itself, including the dummy messaging -prototype that sends messages at a constant rate. - -`crypto` contains code for encrypting and decrypting individual messages with -the client's part of the cipher. - -`globals` contains a few global variables. Avoid putting more things in here -without seriously considering the alternatives. Most important is the Log -variable: - -globals.Log.ERROR.Println("this is an error") - -Using this global Log variable allows external users of jww logging, like the -console UI, to see and print log messages from the client library if they need -to, so please use globals.Log for all logging messages to make this behavior -work consistently. - -If you think you can come up with a better design to deal with this problem, -please go ahead and implement it. Anything that moves towards the globals -package no longer existing is probably a win. - -`io` contains functions for communicating between the client and the gateways. -It's also currently responsible for putting fragmented messages back together. - -`parse` contains functions for serializing and deserializing various specialized -information into messages. This includes message types and fragmenting messages -that are too long. - -`payment` deals with the wallet and payments, and keeping track of all related -data in non-volatile storage. - -`switchboard` includes a structure that you can use to listen to incoming -messages and dispatch them to the correct handlers. - -`user` includes objects that deal with the user's identity and the session -and session storage. - -##Gomobile - -We bind all exported symbols from the bindings package for use on mobile -platforms. To set up Gomobile for Android, install the NDK and -pass the -ndk flag to ` $ gomobile init`. Other repositories that use Gomobile -for binding should include a shell script that creates the bindings. - -###Recommended Reading for Gomobile - -https://godoc.org/golang.org/x/mobile/cmd/gomobile (setup and available -subcommands) - -https://godoc.org/golang.org/x/mobile/cmd/gobind (reference cycles, type -restrictions) - -Currently we aren't using reverse bindings, i.e. calling mobile from Go. - -###Testing Bindings via Gomobile - -The separate `bindings-integration` repository exists to make it easier to -automatically test bindings. Writing instrumented tests from Android allows -you to create black-box tests that also prove that all the methods you think -are getting bound are indeed bound, rather than silently getting skipped. - -You can also verify that all symbols got bound by unzipping `bindings-sources.jar` -and inspecting the resulting source files. - -Every time you make a change to the client or bindings, you must rebuild the -client bindings into a .aar to propagate those changes to the app. There's a -script that runs gomobile for you in the `bindings-integration` repository. +``` + +Note that the client cannot be used on the betanet with precanned user ids. + +## Library Overview + +The XX client is designed to be used as a go library (and by extension a +c library). + +Support is also present for go mobile to build Android and iOS libraries. We +bind all exported symbols from the bindings package for use on mobile +platforms. + +### Implementation Notes + +Clients need to perform the same actions *in the same order* as shown in +`cmd/root.go`. Specifically, certain handlers need to be registered and +set up before starting network threads (i.e., before StartNetworkFollowers +-- #2 below) and you cannot perform certain actions until the network +connection reaches the "healthy" state. Below are relevant code listings for +how to do these actions. + +the ndf is the network definition file, downloadable from the XX network +website when available. + +1. Creating and/or Loading a client: +``` + //create a new client if none exist + if _, err := os.Stat(storeDir); os.IsNotExist(err) { + // Load NDF + ndfPath := viper.GetString("ndf") + ndfJSON, err := ioutil.ReadFile(ndfPath) + if err != nil { + jww.FATAL.Panicf(err.Error()) + } + err = api.NewClient(string(ndfJSON), storeDir, + []byte(pass), regCode) + } + + if err != nil { + jww.FATAL.Panicf("%+v", err) + } + } + + //load the client + client, err := api.Login(storeDir, []byte(pass)) + if err != nil { + jww.FATAL.Panicf("%+v", err) + } +``` +2. Set up registration, authorization request handlers +``` + user := client.GetUser() + + // Set up reception handler + swboard := client.GetSwitchboard() + recvCh := make(chan message.Receive, 10000) // Needs to be large + // Note the name below is arbitrary + listenerID := swboard.RegisterChannel("DefaultCLIReceiver", + switchboard.AnyUser(), message.Text, recvCh) + jww.INFO.Printf("Message ListenerID: %v", listenerID) + + // Set up auth request handler, which simply prints the + // user id of the requestor. + authMgr := client.GetAuthRegistrar() + authMgr.AddGeneralRequestCallback(printChanRequest) +... +func printChanRequest(requestor contact.Contact, message string) { + msg := fmt.Sprintf("Authentication channel request from: %s\n", + requestor.ID) + jww.INFO.Printf(msg) + fmt.Printf(msg) + msg = fmt.Sprintf("Authentication channel request message: %s\n", message) + jww.INFO.Printf(msg) + fmt.Printf(msg) + // Or you can auto confirm with: + // err := client.ConfirmAuthenticatedChannel( + // requestor) + +} +``` + +3. Start network threads and wait until network is healthy: +``` + err = client.StartNetworkFollower() + if err != nil { + jww.FATAL.Panicf("%+v", err) + } + + // Wait until connected or crash on timeout + connected := make(chan bool, 10) + client.GetHealth().AddChannel(connected) + waitUntilConnected(connected) +... +func waitUntilConnected(connected chan bool) { + waitTimeout := time.Duration(viper.GetUint("waitTimeout")) + timeoutTimer := time.NewTimer(waitTimeout * time.Second) + isConnected := false + //Wait until we connect or panic if we can't by a timeout + for !isConnected { + select { + case isConnected = <-connected: + jww.INFO.Printf("Network Status: %v\n", + isConnected) + break + case <-timeoutTimer.C: + jww.FATAL.Panic("timeout on connection") + } + } +} +``` + +4. Adding authenticated channels (if we haven't done it yet) +``` + if client.HasAuthenticatedChannel(recipientID) { + jww.INFO.Printf("Authenticated channel already in place for %s", + recipientID) + return + } + // Check if a channel exists for this recipientID + recipientContact, err := client.GetAuthenticatedChannelRequest( + recipientID) + if err == nil { + jww.INFO.Printf("Accepting existing channel request for %s", + recipientID) + err := client.ConfirmAuthenticatedChannel(recipientContact) + if err != nil { + jww.FATAL.Panicf("%+v", err) + } + return + } else { + recipientContact = recipient + } + + me := client.GetUser().GetContact() + jww.INFO.Printf("Requesting auth channel from: %s", + recipientID) + err := client.RequestAuthenticatedChannel(recipientContact, + me, msg) + if err != nil { + jww.FATAL.Panicf("%+v", err) + } +``` + +5. Sending E2E and Unsafe Messages +``` + msg := message.Send{ + Recipient: recipientID, + Payload: []byte(msgBody), + MessageType: message.Text, + } + paramsE2E := params.GetDefaultE2E() + paramsUnsafe := params.GetDefaultUnsafe() + + fmt.Printf("Sending to %s: %s\n", recipientID, msgBody) + var roundIDs []id.Round + if unsafe { + roundIDs, err = client.SendUnsafe(msg, + paramsUnsafe) + } else { + roundIDs, _, err = client.SendE2E(msg, + paramsE2E) + } + if err != nil { + jww.FATAL.Panicf("%+v", err) + } + jww.INFO.Printf("RoundIDs: %+v\n", roundIDs) +``` +The "RoundIDs" are the rounds in which your message parts were sent. After those +rounds have completed on the network, you can assume that the message has "sent" +successfully. See the client interface section for info on how to access round +state changes. + +6. Receiving Messages (assuming you set the receiver above in step 2) +``` + timeoutTimer := time.NewTimer(waitTimeout * time.Second) + select { + case <-timeoutTimer.C: + fmt.Println("Timed out!") + break + case m := <-recvCh: + fmt.Printf("Message received: %s\n", string( + m.Payload)) + break + } +``` + +The main entry point for developing with the client is `api/client` (or +`bindings/client`). We recommend using go doc to explore: + +``` +go doc -all ./api +go doc -all ./interfaces +``` + +Looking at the API will, for example, show you there is a RoundEvents callback +registration function, which lets your client see round events: + +``` +func (c *Client) GetRoundEvents() interfaces.RoundEvents + RegisterRoundEventsCb registers a callback for round events. +``` + +and then inside interfaces: + +``` +type RoundEvents interface { + // designates a callback to call on the specified event + // rid is the id of the round the event occurs on + // callback is the callback the event is triggered on + // timeout is the amount of time before an error event is returned + // valid states are the states which the event should trigger on + AddRoundEvent(rid id.Round, callback ds.RoundEventCallback, + timeout time.Duration, validStates ...states.Round) *ds.EventCallback + + // designates a go channel to signal the specified event + // rid is the id of the round the event occurs on + // eventChan is the channel the event is triggered on + // timeout is the amount of time before an error event is returned + // valid states are the states which the event should trigger on + AddRoundEventChan(rid id.Round, eventChan chan ds.EventReturn, + timeout time.Duration, validStates ...states.Round) *ds.EventCallback + + //Allows the un-registration of a round event before it triggers + Remove(rid id.Round, e *ds.EventCallback) +} +``` + +Which, when investigated, yields the following prototype: + +``` +// Callbacks must use this function signature +type RoundEventCallback func(ri *pb.RoundInfo, timedOut bool) +``` + +showing that you can receive a full RoundInfo object for any round event +received by the client library on the network. + +### Building the Library for iOS and Android + +To set up Gomobile for Android, install the NDK and pass the -ndk flag +to ` $ gomobile init`. Other repositories that use Gomobile for +binding should include a shell script that creates the bindings. For +iOS, gomobile must be run on an OS X machine with Xcode installed. + +Important reference info: +1. [Setting up Gomobile and subcommands](https://godoc.org/golang.org/x/mobile/cmd/gomobile) +2. [Reference cycles, type restrictions](https://godoc.org/golang.org/x/mobile/cmd/gobind) + +To clone and build: + +``` +# Go mobile install +go get -u golang.org/x/mobile/cmd/gomobile +go get -u golang.org/x/mobile/bind +gomobile init... # Note this line will be different depending on sdk/target! +# Get and test code +git clone https://gitlab.com/elixxir/client.git client +cd client +go mod vendor -v +go mod tidy +go test ./... +# Android +gomobile bind -target android -androidapi 21 gitlab.com/elixxir/client/bindings +# iOS +gomobile bind -target ios gitlab.com/elixxir/client/bindings +zip -r iOS.zip Bindings.framework +``` + +You can verify that all symbols got bound by unzipping +`bindings-sources.jar` and inspecting the resulting source files. + +Every time you make a change to the client or bindings, you must +rebuild the client bindings into a .aar or iOS.zip to propagate those +changes to the app. There's a script that runs gomobile for you in the +`bindings-integration` repository. + +## Roadmap + +See the larger network documentation for more, but there are 2 specific +parts of the roadmap that are intended for the client: + +* Ephemeral IDs - Sending messages to users with temporal/ephemeral recipient + user identities. +* User Discovery - A bot that will allow the user to look for others on the + network. +* Notifications - An optional notifications system which uses firebase +* Efficiency improvements - mechanisms for message pickup and network tracking +* will evolve to allow tradeoffs and options for use + +We also are always looking at how to simplify and improve the library interface. diff --git a/api/authenticatedChannel.go b/api/authenticatedChannel.go index a9125a0306b5f4bcbb0229320dd495c25bffb103..9d26304009a4be8bc55471edca3c66da1f9ef5ec 100644 --- a/api/authenticatedChannel.go +++ b/api/authenticatedChannel.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( @@ -11,7 +18,6 @@ import ( "gitlab.com/xx_network/primitives/id" ) - // RequestAuthenticatedChannel sends a request to another party to establish an // authenticated channel // It will not run if the network status is not healthy @@ -113,4 +119,4 @@ func (c *Client) MakePrecannedContact(precannedID uint) contact.Contact { OwnershipProof: nil, Facts: make([]fact.Fact, 0), } -} \ No newline at end of file +} diff --git a/api/client.go b/api/client.go index 43f94c4dd97ee339122e6aae977b221aa01ead98..02a2c7073fd85c3ca20034737831c1111d1ead16 100644 --- a/api/client.go +++ b/api/client.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package api diff --git a/api/notifications.go b/api/notifications.go index 119b675f86ffc0e6f76e39d2dc06d5d77f4a9612..dff1977765b31b98297feaa75827e1b2edc71fd6 100644 --- a/api/notifications.go +++ b/api/notifications.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import jww "github.com/spf13/jwalterweatherman" diff --git a/api/permissioning.go b/api/permissioning.go index 1d0fe051f7d5f8b6ea43667652e53e8248139035..c9d018d89f1b94df03aefd20f9b6c4dfd6daebab 100644 --- a/api/permissioning.go +++ b/api/permissioning.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package api diff --git a/api/send.go b/api/send.go index e1a9bd231e8cc0c8b5747532c44a88c41ab7c6d4..84256b206d71db926818cc5c93b8e0269ce14eef 100644 --- a/api/send.go +++ b/api/send.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( diff --git a/api/status.go b/api/status.go index cebfac0f4a9d9958955198a95dad5e81eb7923b9..7fd31ae937955d12cb76e8471182c7a406df5b76 100644 --- a/api/status.go +++ b/api/status.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( diff --git a/api/user.go b/api/user.go index de6f8354763888b2d1498f67881f990cf4541647..604aa796cf3f4cc4d4402b0fdbd5d75a03ab3a25 100644 --- a/api/user.go +++ b/api/user.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( diff --git a/api/userDiscovery.go b/api/userDiscovery.go index b51fef51d3cc11eb08837b98ccc9290d7b4acff5..077d6399166709b7482e169d671936ed8cf3d156 100644 --- a/api/userDiscovery.go +++ b/api/userDiscovery.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( diff --git a/api/version.go b/api/version.go index 30ddb01b686346e1f3d28442ded20f2ad3ab6294..a8c26beae37b2c4cc19e1a53ee03b79cc2fe3799 100644 --- a/api/version.go +++ b/api/version.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package api import ( diff --git a/auth/callback.go b/auth/callback.go index 060d74030f73fdf7e91e23827635b3ec3e8dfcd0..a5ccef9fdd6a57aea045baf05c3bb0e980072c33 100644 --- a/auth/callback.go +++ b/auth/callback.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/auth/callbacks.go b/auth/callbacks.go index 6eb758af2a1aad2030387e238ca6ca8f98d1958d..2168c82d3636bdd9ff25c9d1c4c4cddf606b2445 100644 --- a/auth/callbacks.go +++ b/auth/callbacks.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/auth/confirm.go b/auth/confirm.go index 2ffa7a979f3c547c16928c08ca692eab85fda8bd..a58306c2da8dce6017c96af1d10888652f67ea73 100644 --- a/auth/confirm.go +++ b/auth/confirm.go @@ -1,21 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( "github.com/pkg/errors" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces/contact" "gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/interfaces/utility" "gitlab.com/elixxir/client/storage" "gitlab.com/elixxir/client/storage/e2e" + ds "gitlab.com/elixxir/comms/network/dataStructures" "gitlab.com/elixxir/crypto/diffieHellman" + cAuth "gitlab.com/elixxir/crypto/e2e/auth" "gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/states" "io" - cAuth "gitlab.com/elixxir/crypto/e2e/auth" "time" - ds "gitlab.com/elixxir/comms/network/dataStructures" - jww "github.com/spf13/jwalterweatherman" ) func ConfirmRequestAuth(partner contact.Contact, rng io.Reader, diff --git a/auth/fmt.go b/auth/fmt.go index 04605c95772077de79b2392763330991424e7335..deb1dad1acf77f196fbda05c90153758cb3bc289 100644 --- a/auth/fmt.go +++ b/auth/fmt.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/auth/manager.go b/auth/manager.go index 16222cbbb65aa2ee38106a18d0e3635330189eec..b5803d69feb7ae67073e351b1c7fd24c3ac5b597 100644 --- a/auth/manager.go +++ b/auth/manager.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/auth/request.go b/auth/request.go index ff2811c493a4be0df86c72df69e21241a1dab1e7..906aa953995afd3af8b24cc028fe7aaac7dec5e0 100644 --- a/auth/request.go +++ b/auth/request.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/auth/verify.go b/auth/verify.go index c456d738d96df7c3fa04d83c1aa11cbecd3088db..76850a17dfc6728c10b5c7304e04d7f2437f2545 100644 --- a/auth/verify.go +++ b/auth/verify.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/bindings/authenticatedChannels.go b/bindings/authenticatedChannels.go index 512e8de5eb1674098037f74cf1f7c32c231c63bd..70ff0285173740f5ef302e1a678ffe127318a002 100644 --- a/bindings/authenticatedChannels.go +++ b/bindings/authenticatedChannels.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( @@ -105,4 +112,4 @@ func (c *Client) VerifyOwnership(receivedMarshaled, verifiedMarshaled []byte) (b } return c.api.VerifyOwnership(received, verified), nil -} \ No newline at end of file +} diff --git a/bindings/callback.go b/bindings/callback.go index 5f6ed82d17c902b7f34e5c0d6c4babff0beb28d9..68ca5646e0122f8a08b1d5d27ca580e2783e603c 100644 --- a/bindings/callback.go +++ b/bindings/callback.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( @@ -24,7 +31,6 @@ type NetworkHealthCallback interface { Callback(bool) } - // RoundEventHandler handles round events happening on the cMix network. type RoundEventCallback interface { EventCallback(rid, state int, timedOut bool) diff --git a/bindings/client.go b/bindings/client.go index 0b96819f34905fa61b2944664e98d76f6f2ad490..2789061f4119519698a8263daa5db0252ef7300f 100644 --- a/bindings/client.go +++ b/bindings/client.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package bindings @@ -121,9 +122,6 @@ func LogLevel(level int) error { return nil } - - - //Unmarshals a marshaled contact object, returns an error if it fails func UnmarshalContact(b []byte) (*Contact, error) { c, err := contact.Unmarshal(b) @@ -248,7 +246,7 @@ func (c *Client) RegisterListener(uid []byte, msgType int, mt := message.Type(msgType) f := func(item message.Receive) { - listener.Hear(&Message{r:item}) + listener.Hear(&Message{r: item}) } lid := c.api.GetSwitchboard().RegisterFunc(name, u, mt, f) diff --git a/bindings/contact.go b/bindings/contact.go index 2bcc1d2b9c627a27ef0f091709fb4d458efe669e..cfebb078270de5a36baa7f341e4cbbfdfb5d39a9 100644 --- a/bindings/contact.go +++ b/bindings/contact.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( @@ -19,7 +26,6 @@ func (f *Fact) Type() int { return int(f.f.T) } - /* contact object*/ type Contact struct { c *contact.Contact diff --git a/bindings/interfaces.go b/bindings/interfaces.go index 5e5970d2057be07248ef6b09cfa19b5278296593..f827aefb50265cbec7b9f7463e86f737febd0394 100644 --- a/bindings/interfaces.go +++ b/bindings/interfaces.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package bindings diff --git a/bindings/list.go b/bindings/list.go index 0edfb41be5402cba75e7123d1445b159bfa399ba..5657bcb456706c28905a9c58f33e891eae61fba3 100644 --- a/bindings/list.go +++ b/bindings/list.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( diff --git a/bindings/message.go b/bindings/message.go index 01d807aba1fc49c70ca0c6cdb1692d1d14b7a0dd..978a62743dbd823062f1c4a961e20d74f386c496 100644 --- a/bindings/message.go +++ b/bindings/message.go @@ -1,10 +1,17 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import "gitlab.com/elixxir/client/interfaces/message" // Message is a message received from the cMix network in the clear // or that has been decrypted using established E2E keys. -type Message struct{ +type Message struct { r message.Receive } diff --git a/bindings/send.go b/bindings/send.go index a554017877b666eab5b9126a700c516b5852a7af..f9c116d5bcf71246f57c8eda450c0d2bda49aeaf 100644 --- a/bindings/send.go +++ b/bindings/send.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( @@ -75,7 +82,6 @@ func (c *Client) SendUnsafe(recipient, payload []byte, return &RoundList{list: rids}, nil } - // SendE2E sends an end-to-end payload to the provided recipient with // the provided msgType. Returns the list of rounds in which parts of // the message were sent or an error if it fails. @@ -123,4 +129,4 @@ func (sr *SendReport) GetMessageID() []byte { func (sr *SendReport) Marshal() ([]byte, error) { return json.Marshal(sr) -} \ No newline at end of file +} diff --git a/bindings/user.go b/bindings/user.go index e006f0c1e20d7f0a6055cd0d5612ee57e719a3a8..56942464027782001a5d242f90818ef50e7a1f40 100644 --- a/bindings/user.go +++ b/bindings/user.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( diff --git a/cmd/root.go b/cmd/root.go index 1405882e7c45f04d41fa79ad2503f03c97f3792d..26aa6f2769cc6e11d18c9a6db6e6b3d89e487bc6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Package cmd initializes the CLI and config parsers as well as the logger. package cmd @@ -187,7 +188,7 @@ var rootCmd = &cobra.Command{ waitTimeout := time.Duration(viper.GetUint("waitTimeout")) timeoutTimer := time.NewTimer(waitTimeout * time.Second) done := false - for !done { + for !done && expectedCnt != 0 { select { case <-timeoutTimer.C: fmt.Println("Timed out!") @@ -205,6 +206,11 @@ var rootCmd = &cobra.Command{ } } fmt.Printf("Received %d\n", receiveCnt) + client.StopNetworkFollower(1 * time.Second) + /*if err!=nil{ + fmt.Printf("Failed to cleanly close threads: %+v\n", err) + }*/ + time.Sleep(10 * time.Second) }, } diff --git a/cmd/udb.go b/cmd/udb.go index a0c5982af243d63e006f8ad9bbc076389acbbb03..6f11250dba48e4b956dca426feca886f9b2a931f 100644 --- a/cmd/udb.go +++ b/cmd/udb.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package cmd diff --git a/cmd/version.go b/cmd/version.go index c623faf132b6c74c57310ef67ff3ccf3c70dee7a..17ca3b7041e5e0ec2b0944f05c50e1d642f5d61e 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Handles command-line version functionality diff --git a/cmix.go b/cmix.go index 06ab7d0f9a35a7d1070711496d6ca1cb892a258f..69ee456715006686934cd8b27cbc3dccd8a976a1 100644 --- a/cmix.go +++ b/cmix.go @@ -1 +1,8 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package main diff --git a/globals/log.go b/globals/log.go index e9bfc4a45df68296c87ff7eebc42727fd8f73a35..cbcdce07b2ed6a47f49bdf5368508b75e65c3ccf 100644 --- a/globals/log.go +++ b/globals/log.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package globals diff --git a/globals/statusEvents.go b/globals/statusEvents.go index 834db9f61d9ab557c127c09ac83209c41ff64b77..9695871da46a8252d42bd838996b1bb7a30330c2 100644 --- a/globals/statusEvents.go +++ b/globals/statusEvents.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package globals //Registration diff --git a/globals/storage.go b/globals/storage.go index aecd54789a000a50eb0fc766db9937a8cd00f6a3..63f5b2b360b7842cbbb435cf5495568b80c48549 100644 --- a/globals/storage.go +++ b/globals/storage.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package globals diff --git a/globals/storage_test.go b/globals/storage_test.go index 96abc9532bd258097ffd73da5c4430def403fe5d..f7bd60f34ce90f1a474faf83b0918cb7a4b9eae3 100644 --- a/globals/storage_test.go +++ b/globals/storage_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package globals diff --git a/globals/terminator.go b/globals/terminator.go index 5b17199f2a3d75466da1e17088135d7620d572fe..0b3155e19db73add793dad56fa45abc43a924724 100644 --- a/globals/terminator.go +++ b/globals/terminator.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package globals diff --git a/globals/terminator_test.go b/globals/terminator_test.go index b43c8cc03cb4e315c945f1e2983c5f85f555bc8c..8d18841de618d2f66407aae3e6fdd96bdc9688f9 100644 --- a/globals/terminator_test.go +++ b/globals/terminator_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package globals diff --git a/go.mod b/go.mod index cdf783e1189dc84d3143dc9128adf3353880330f..f875fbd90bf73968b22017f476e913f59d30bdfc 100644 --- a/go.mod +++ b/go.mod @@ -26,6 +26,10 @@ require ( gitlab.com/xx_network/crypto v0.0.5-0.20201124194022-366c10b1bce0 gitlab.com/xx_network/primitives v0.0.3-0.20201209182507-be7e190879a6 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 + golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect + golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect + google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 // indirect + google.golang.org/grpc v1.33.2 // indirect google.golang.org/protobuf v1.25.0 gopkg.in/ini.v1 v1.61.0 // indirect ) diff --git a/go.sum b/go.sum index 68badd9a83ec106f001e0bafebd1dc438a0dd942..0e06bdc84e4a89eb081dba4aac0ae33a6cd6a5e5 100644 --- a/go.sum +++ b/go.sum @@ -252,26 +252,14 @@ 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.3 h1:7cFvBZddX/8JSY5MvfPpg21niV88IpeqQkoKs15erZM= -gitlab.com/elixxir/comms v0.0.3/go.mod h1:5p7oz4yFrK037rPap6ooaWrloJrzuVZ4jnzOdvgyqnU= -gitlab.com/elixxir/comms v0.0.4-0.20201124200043-8031463a4843 h1:KYcfQnnmc1oBAodVi3gMCXNWS6zoSCeyLhrrRzQP40Y= -gitlab.com/elixxir/comms v0.0.4-0.20201124200043-8031463a4843/go.mod h1:dRTzI+YApY9QZ2+eP9+0n5+KzxziZY24SyW31O4QWgM= -gitlab.com/elixxir/comms v0.0.4-0.20201125010058-1bd873622e92 h1:YAcb6IV0WfF2Y4jP2NRKUff9lMZmw7y07C5Ml0VIIjE= -gitlab.com/elixxir/comms v0.0.4-0.20201125010058-1bd873622e92/go.mod h1:MeyRkpCZZrMqI/uE4wfcJKZxemQfT0rqnfmYuz6HuBM= +gitlab.com/elixxir/comms v0.0.4-0.20201201195523-61ba033e1daa h1:b5F2rTq0sT5mS1VLn/ePrndQ+Zxw55l5RFfMWAphYDs= +gitlab.com/elixxir/comms v0.0.4-0.20201201195523-61ba033e1daa/go.mod h1:UhXItTZXnA284//dhxT/HYn0JQl1gLtkqg+ixPssSIA= +gitlab.com/elixxir/comms v0.0.4-0.20201215214310-78b71bb2bee0 h1:0l2HIt7Iw78j93j4qtQkNwSFon1EGI6aOQSr8FKsNiY= +gitlab.com/elixxir/comms v0.0.4-0.20201215214310-78b71bb2bee0/go.mod h1:F5wQaxr3uG2LgFrRrG/fDK8nxhpVUhHkJkNAxuWjEHw= 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.4 h1:8eWjvUepCU2PiqZM2NFYo6rFg1w8KWO1hMDwMNFEqoI= -gitlab.com/elixxir/crypto v0.0.4/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= -gitlab.com/elixxir/crypto v0.0.5-0.20201109234712-7e64de16970d h1:9Peb/peftTVeO5gYqi37sZycMEiu05+2VZ/j8d5lldI= -gitlab.com/elixxir/crypto v0.0.5-0.20201109234712-7e64de16970d/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= -gitlab.com/elixxir/crypto v0.0.5-0.20201124195819-54be458a0dac h1:JXtuads5nAgrSku7klahF8n+CF+dmupmm0DHsL0CCEM= -gitlab.com/elixxir/crypto v0.0.5-0.20201124195819-54be458a0dac/go.mod h1:V8lricBRpa8v1ySymXQ1/lsb+8/lSak5S7ZWRT6OACY= -gitlab.com/elixxir/crypto v0.0.5-0.20201125005532-52b3e59dddbd h1:+AmHcjwo6M5f2cbFfbJrJw822bG6Bcw6+Hl/+D2HXhg= -gitlab.com/elixxir/crypto v0.0.5-0.20201125005532-52b3e59dddbd/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= -gitlab.com/elixxir/crypto v0.0.5-0.20201125005724-bcc603df02d3 h1:TXorNuWA1udEpIlVBG2Wpd91KKYQY9Q5wXiHpgpitgM= -gitlab.com/elixxir/crypto v0.0.5-0.20201125005724-bcc603df02d3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/crypto v0.0.6 h1:c94CGzBTV7LgInGHfmeJHrqq9nIc/WEOLUd9OeQBN74= gitlab.com/elixxir/crypto v0.0.6/go.mod h1:V8lricBRpa8v1ySymXQ1/lsb+8/lSak5S7ZWRT6OACY= gitlab.com/elixxir/ekv v0.1.3 h1:OE+LBMIhjGUMwc6hHJzYvEPNJQV7t1vMnJyIgxUMUo8= @@ -281,20 +269,27 @@ 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.2 h1:PvyOOp/A6tCtmU7YnGhCCPRdmEogEzCi0Li/WfiVjGo= -gitlab.com/elixxir/primitives v0.0.2/go.mod h1:3fxFHSlQhkV4vs+S0dZEz3Om3m+40WX8L806yvSnNFc= gitlab.com/elixxir/primitives v0.0.3-0.20201116174806-97f190989704 h1:JkFREumz8skDqkCjjzZnlf5tg+PBiMB9kfVn9z0VEfE= gitlab.com/elixxir/primitives v0.0.3-0.20201116174806-97f190989704/go.mod h1:3fxFHSlQhkV4vs+S0dZEz3Om3m+40WX8L806yvSnNFc= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= -gitlab.com/xx_network/comms v0.0.3 h1:ch1eJI4WXUE/Kz0Kp9uDWX16B+hfVFmdHY+EOai4Wzc= -gitlab.com/xx_network/comms v0.0.3/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= gitlab.com/xx_network/comms v0.0.4-0.20201119231004-a67d08045535 h1:3KoNUndePTAUMlX1xc+zk0wuOZMb/xJMUVuhS+HisdA= gitlab.com/xx_network/comms v0.0.4-0.20201119231004-a67d08045535/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.20201202184223-c22375bd1e6d/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= +gitlab.com/xx_network/comms v0.0.4-0.20201203181401-3e7646e39ffd h1:rbk0gz/cRsMBvZ3SC59XgGdUIFym2W0lpitlykcCWdk= +gitlab.com/xx_network/comms v0.0.4-0.20201203181401-3e7646e39ffd/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= +gitlab.com/xx_network/comms v0.0.4-0.20201215221519-b4c92324b090 h1:7J8iMiX7B6tNwbinP00GIARZy+O0L9P0IM8KcxXMK8g= +gitlab.com/xx_network/comms v0.0.4-0.20201215221519-b4c92324b090/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= +gitlab.com/xx_network/comms v0.0.4-0.20201216015955-de7276bf8fb0 h1:+nspVlOrB2BrkoLPNBbDm5hm/1pco1g3ezDuZNcU0zk= +gitlab.com/xx_network/comms v0.0.4-0.20201216015955-de7276bf8fb0/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8= 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.20201124194022-366c10b1bce0 h1:v2xX/bl9lyZJZXXFZ6glDs7F/GNGIeKAH6hzafUNi5w= gitlab.com/xx_network/crypto v0.0.5-0.20201124194022-366c10b1bce0/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= +gitlab.com/xx_network/crypto v0.0.5-0.20201203175549-582fde7fcbe1/go.mod h1:NM4Lk3//mOSlWwySpaH8FMmYZNm8qtjr6EawfaAHzH4= +gitlab.com/xx_network/crypto v0.0.5-0.20201209162436-bc2308a94174 h1:KpVvbYTWFpEz7MgzbG3YzIcOsNQrUBCCLwRDC2sDqv8= +gitlab.com/xx_network/crypto v0.0.5-0.20201209162436-bc2308a94174/go.mod h1:NM4Lk3//mOSlWwySpaH8FMmYZNm8qtjr6EawfaAHzH4= 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= @@ -362,8 +357,9 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d h1:dOiJ2n2cMwGLce/74I/QHMbnpk5GfY7InR8rczoMqRM= golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -390,8 +386,9 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7 golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200917073148-efd3b9a0ff20/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201029080932-201ba4db2418 h1:HlFl4V6pEMziuLXyRkm5BIYq1y1GAbb02pRlWvI54OM= golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -441,8 +438,9 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3 h1:sg8vLDNIxFPHTchfhH1E3AI32BL3f23oie38xUWnJM8= google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 h1:Rt0FRalMgdSlXAVJvX4pr65KfqaxHXSLkSJRD9pw6g0= +google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/interfaces/auth.go b/interfaces/auth.go index 04751e8964a7132f66da2a956554051fc74cddbe..68e18be6fc51bb90a67b082f396582bb79b88625 100644 --- a/interfaces/auth.go +++ b/interfaces/auth.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package interfaces import ( diff --git a/interfaces/contact/contact.go b/interfaces/contact/contact.go index 6c6e070d055a093c71f796cf284ffc5558c71e17..c060a74a167e5d6377077ee38ccc5b49284c40c1 100644 --- a/interfaces/contact/contact.go +++ b/interfaces/contact/contact.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package contact import ( @@ -11,7 +18,6 @@ import ( const factDelimiter = "," const factBreak = ";" - // Contact implements the Contact interface defined in interface/contact.go, // in go, the structure is meant to be edited directly, the functions are for // bindings compatibility @@ -39,4 +45,4 @@ func Unmarshal(b []byte) (Contact, error) { } } return c, nil -} \ No newline at end of file +} diff --git a/interfaces/healthTracker.go b/interfaces/healthTracker.go index 6208e6cdca6ae7ca08ac68a29922f48c611bad2f..faa31e8e48a2c072063f5aebf63a05cd297121f6 100644 --- a/interfaces/healthTracker.go +++ b/interfaces/healthTracker.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package interfaces type HealthTracker interface { diff --git a/interfaces/message/encryptionType.go b/interfaces/message/encryptionType.go index 5afdd855a60f68dbf89a2e331edc05c3c7907384..7d74694e80a35a3711057170015e92b70a935f42 100644 --- a/interfaces/message/encryptionType.go +++ b/interfaces/message/encryptionType.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message type EncryptionType uint8 diff --git a/interfaces/message/receiveMessage.go b/interfaces/message/receiveMessage.go index 3ecf1b138cb96493a3a60adb089425cf67e6518a..faa61d61f0a375eae5506c55b10dfb7b99b83a32 100644 --- a/interfaces/message/receiveMessage.go +++ b/interfaces/message/receiveMessage.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( @@ -13,4 +20,4 @@ type Receive struct { Sender *id.ID Timestamp time.Time Encryption EncryptionType -} \ No newline at end of file +} diff --git a/interfaces/message/sendMessage.go b/interfaces/message/sendMessage.go index 1e639669f607ba0b9dbc26918bca3e6b0617d5b9..88795e95ca1aa7a906a2ef953ee059b0fc8af325 100644 --- a/interfaces/message/sendMessage.go +++ b/interfaces/message/sendMessage.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import "gitlab.com/xx_network/primitives/id" diff --git a/interfaces/message/type.go b/interfaces/message/type.go index cab493bb927754e2ca16395e1934ceff87445b6d..71a1c72ff431ab1c6164856fe892e72af8c21a68 100644 --- a/interfaces/message/type.go +++ b/interfaces/message/type.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message const TypeLen = 4 diff --git a/interfaces/networkManager.go b/interfaces/networkManager.go index 90fa41485906c7cb76495843077e2dda9118b549..541dc5b147d64440b3507ec28f72f735086cd37b 100644 --- a/interfaces/networkManager.go +++ b/interfaces/networkManager.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package interfaces import ( diff --git a/interfaces/params/CMIX.go b/interfaces/params/CMIX.go index dc8658ea7a0d4b01c224ba071ffb96198ae17395..8c55059999f117da1239baa0e9b33ef6c0623eb2 100644 --- a/interfaces/params/CMIX.go +++ b/interfaces/params/CMIX.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "time" diff --git a/interfaces/params/CMIX_test.go b/interfaces/params/CMIX_test.go index 5af967495b140e43fa102d2f1dd074192e1c8b96..01af75d68875ba2b1b0572d8a9debdbb8f0a7e2a 100644 --- a/interfaces/params/CMIX_test.go +++ b/interfaces/params/CMIX_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import ( diff --git a/interfaces/params/E2E.go b/interfaces/params/E2E.go index 22d6cd98b3a187d18751cbc9ed8844d027100afb..a62b5ad58e0e14113d295d0de09905890a65dcbe 100644 --- a/interfaces/params/E2E.go +++ b/interfaces/params/E2E.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "fmt" diff --git a/interfaces/params/E2E_test.go b/interfaces/params/E2E_test.go index 06db149a421265640bca05da9f5a6111bd0a51fd..09230e135d3576761d38211a9a53f913661892bf 100644 --- a/interfaces/params/E2E_test.go +++ b/interfaces/params/E2E_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "testing" diff --git a/interfaces/params/Unsafe.go b/interfaces/params/Unsafe.go index b18c8c03162240b08d591ea50308e046199aa786..19654d88e9ae6fb84e9b2ab9a99ee4de08089d96 100644 --- a/interfaces/params/Unsafe.go +++ b/interfaces/params/Unsafe.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params type Unsafe struct { diff --git a/interfaces/params/keyExchange.go b/interfaces/params/keyExchange.go index 712b16580c59198a963bb05e4b665607c628ef8a..203703d22f12fc3943786c9f770b4d7626208206 100644 --- a/interfaces/params/keyExchange.go +++ b/interfaces/params/keyExchange.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "time" diff --git a/interfaces/params/message.go b/interfaces/params/message.go index 2e1f3858fc9355056de551545a90c964a503ee19..cc452a85f680b09629818cd1973abb6d5821ffaf 100644 --- a/interfaces/params/message.go +++ b/interfaces/params/message.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "time" diff --git a/interfaces/params/network.go b/interfaces/params/network.go index 6c369a9cc126a359376cc8db93c1046c68dc3d38..cf7a2b1a1b4cda2623e23ced93adf70213e02445 100644 --- a/interfaces/params/network.go +++ b/interfaces/params/network.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import ( @@ -14,7 +21,6 @@ type Network struct { // the network is in a bad state NetworkHealthTimeout time.Duration - Rounds Messages } diff --git a/interfaces/params/node.go b/interfaces/params/node.go index 86de80d779f1ca425a080fe671aa744e68c0ba5c..150cc71f3d9773ef93892310ad4046ba4fb841cd 100644 --- a/interfaces/params/node.go +++ b/interfaces/params/node.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params //import ( diff --git a/interfaces/params/rounds.go b/interfaces/params/rounds.go index 9cd03e4c72cd7c5c32d3ebb36609494ce0fb9820..73e5ac613afcf8e3bc343be6252a72ccd1c75628 100644 --- a/interfaces/params/rounds.go +++ b/interfaces/params/rounds.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package params import "time" diff --git a/interfaces/roundEvents.go b/interfaces/roundEvents.go index a3f27f76331dec24b73cea6af6bd3c99d1a54514..7228649def38a6199a7650df1b811373ad7f0307 100644 --- a/interfaces/roundEvents.go +++ b/interfaces/roundEvents.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package interfaces import ( diff --git a/interfaces/switchboard.go b/interfaces/switchboard.go index 3ebb9d8b23779c0d8d024d330e078dc1748c6b01..a90cee09f23190e385bc8dca63518e121c4d3d66 100644 --- a/interfaces/switchboard.go +++ b/interfaces/switchboard.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package interfaces import ( diff --git a/interfaces/user/user.go b/interfaces/user/user.go index 094f9386abcd5298ce9cb09da1ea8f378783d3f9..0f59bf81bbf4ec509d62ff99e933403736eab784 100644 --- a/interfaces/user/user.go +++ b/interfaces/user/user.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/interfaces/utility/trackResults.go b/interfaces/utility/trackResults.go index 5f1fc6453888ba70e7e6e3814288232410de7924..70b5e43f4d762aba8b99957b6b7e1efb4d852695 100644 --- a/interfaces/utility/trackResults.go +++ b/interfaces/utility/trackResults.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/keyExchange/confirm.go b/keyExchange/confirm.go index 8083b3d8a68a1a01710c37a9a6df89c6f5067864..ce31c0c6fa933b3fccd203bf6b0bfdbd968818c5 100644 --- a/keyExchange/confirm.go +++ b/keyExchange/confirm.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/confirm_test.go b/keyExchange/confirm_test.go index d9fd6aa61f37d9730261e184918a81bb5502fd99..188a58686d72ba9ae8d306002f6229173b017db6 100644 --- a/keyExchange/confirm_test.go +++ b/keyExchange/confirm_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/exchange.go b/keyExchange/exchange.go index d58b59ac8baf53588414653c79f18f8b1b54f385..caf7c7a596762c95ea9da22e1cb5825dc80d566f 100644 --- a/keyExchange/exchange.go +++ b/keyExchange/exchange.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/exchange_test.go b/keyExchange/exchange_test.go index 9607b6bd174dd3fcd24c51f95c1ab49769c12f72..40265bc30389f6c81bc91c188af9978f4e44c743 100644 --- a/keyExchange/exchange_test.go +++ b/keyExchange/exchange_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/rekey.go b/keyExchange/rekey.go index 4092aaa5472d521d56f8d3a09f22bc7c291ee300..8391f2653ebca789d875f4f79044ac67af91cacd 100644 --- a/keyExchange/rekey.go +++ b/keyExchange/rekey.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package keyExchange diff --git a/keyExchange/rekey_test.go b/keyExchange/rekey_test.go index e44693aab9c5602e9bb42e5d03e58df9ac4d7b14..3e7d585328135b54a50366257a1b72891c425fbf 100644 --- a/keyExchange/rekey_test.go +++ b/keyExchange/rekey_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange /* diff --git a/keyExchange/trigger.go b/keyExchange/trigger.go index 105c0b436f34b79f4c63467f3e59673c88f8770b..5019dc05f936b85bea9a9f2d19bb436f8f199032 100644 --- a/keyExchange/trigger.go +++ b/keyExchange/trigger.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/trigger_test.go b/keyExchange/trigger_test.go index d0d007376c5804b20ad13d4c11437a6f9b3f1321..60c7b4c65e4137ffab880498030b68ca845f1ccf 100644 --- a/keyExchange/trigger_test.go +++ b/keyExchange/trigger_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/utils_test.go b/keyExchange/utils_test.go index 2e1ef81e47d5f33cbde467054509d500ddc9b2d2..4fc72a604e50891d56c748a9c84272b7e7c1b2aa 100644 --- a/keyExchange/utils_test.go +++ b/keyExchange/utils_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package keyExchange import ( diff --git a/keyExchange/xchange.pb.go b/keyExchange/xchange.pb.go index c7923f4730105260369b5a07635df6b6edae9d2d..27a276b4c1a9538e767adb1994b684bb65369d1b 100644 --- a/keyExchange/xchange.pb.go +++ b/keyExchange/xchange.pb.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2018 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Call ./generate.sh to generate the protocol buffer code diff --git a/keyExchange/xchange.proto b/keyExchange/xchange.proto index 76dac5e960f539e95d56a56624c6f7eaff34cd5d..633c79224c267de1a8325c208897a60fcb2428be 100644 --- a/keyExchange/xchange.proto +++ b/keyExchange/xchange.proto @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2018 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Call ./generate.sh to generate the protocol buffer code diff --git a/main.go b/main.go index a39e9f5c9e113859986a2102f4e9f043698085b4..47a38ce28d8f06cb2c16d1aba035b3a9c393caad 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2019 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package main diff --git a/network/follow.go b/network/follow.go index e0bbe4d43493b748a53502eb9181d040c4b09620..b5ff8ea198a388329b83a90c1e5bf72a8b9d4ed5 100644 --- a/network/follow.go +++ b/network/follow.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package network @@ -49,11 +50,12 @@ func (m *manager) followNetwork(quitCh <-chan struct{}) { ticker := time.NewTicker(m.param.TrackNetworkPeriod) rng := m.Rng.GetStream() - for { + done := false + for !done{ select { case <-quitCh: rng.Close() - break + done=true case <-ticker.C: m.follow(rng, m.Comms) } diff --git a/network/gateway/gateway.go b/network/gateway/gateway.go index af977178aceaf5e09871a5427b97e3a239ed4a5b..1c2c247f33eb64993da2bd1288f979e454e5a9a9 100644 --- a/network/gateway/gateway.go +++ b/network/gateway/gateway.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package gateway import ( diff --git a/network/health/tracker.go b/network/health/tracker.go index c7d94ce7f01b1e0125ed0d9ac8731da622c10dad..c153cedfa1176565c8546ff9f1c1e451abf3afb5 100644 --- a/network/health/tracker.go +++ b/network/health/tracker.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Contains functionality related to the event model driven network health tracker diff --git a/network/health/tracker_test.go b/network/health/tracker_test.go index f8fb2c8250265baec3bc7e934cb02115857de952..318a69f79d599f09444470efb702a6a340767913 100644 --- a/network/health/tracker_test.go +++ b/network/health/tracker_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package health diff --git a/network/internal/internal.go b/network/internal/internal.go index 290b328c9ee8ac62b64cb43617647c636eb26acf..ae0580da5d72bbe83cd8e84e3d61485a80bdc933 100644 --- a/network/internal/internal.go +++ b/network/internal/internal.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package internal import ( diff --git a/network/manager.go b/network/manager.go index eaa1ec7d636932a04c6dad591ee278242c92bfdd..fff66d50055f45ad80cbe27c9dd6b0542d7141bf 100644 --- a/network/manager.go +++ b/network/manager.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package network diff --git a/network/message/bundle.go b/network/message/bundle.go index af35baf9e4409bc0f5b178107061b19346d282d8..84962ded31793e5600eefa1bb425a04cc3a5e881 100644 --- a/network/message/bundle.go +++ b/network/message/bundle.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( diff --git a/network/message/critical.go b/network/message/critical.go index f4e7971de759a855af68834ab069c67e47edfc14..c6dbfbd9f8efc24b3d9e644136b7325340cdd9ce 100644 --- a/network/message/critical.go +++ b/network/message/critical.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( diff --git a/network/message/garbled.go b/network/message/garbled.go index 56d20bd27f3d63bfd6782753a40c51a3a90b31de..b5ddc1b0f4c51a55a833d2961a19949977002b20 100644 --- a/network/message/garbled.go +++ b/network/message/garbled.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( diff --git a/network/message/handler.go b/network/message/handler.go index 8ee9972593bb72884092e5ca93828acb91ad4cb1..6a3d5bb2ae73e3806316e14f21b2db28a1fad2d2 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( @@ -92,4 +99,4 @@ func (m *Manager) handleMessage(ecrMsg format.Message) { m.Switchboard.Speak(xxMsg) } } -} \ No newline at end of file +} diff --git a/network/message/manager.go b/network/message/manager.go index 42b8f24074b6cba0d63c72f60474d935ebab7481..ca4a1c0f40bbc57e54925b0c742063df59f34218 100644 --- a/network/message/manager.go +++ b/network/message/manager.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( diff --git a/network/message/parse/firstMessagePart.go b/network/message/parse/firstMessagePart.go index 1d928536a4a105446ec1bc87b255138980b027f0..958a386992f161f007921476f52eb9749ea628bf 100644 --- a/network/message/parse/firstMessagePart.go +++ b/network/message/parse/firstMessagePart.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package parse import ( diff --git a/network/message/parse/messagePart.go b/network/message/parse/messagePart.go index ac9b8f1140489ed1ebe68cd89ad2a57b0a40ebe4..815544be80370e2c4f66482c903ae0cbe9e9ad92 100644 --- a/network/message/parse/messagePart.go +++ b/network/message/parse/messagePart.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package parse import ( diff --git a/network/message/parse/partition.go b/network/message/parse/partition.go index 6f77165d654133faef8c1ceead63cbbad73f62bc..0b690a5bef804dd269cd62cbcc0ecac6d2667439 100644 --- a/network/message/parse/partition.go +++ b/network/message/parse/partition.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package parse import ( diff --git a/network/message/sendCmix.go b/network/message/sendCmix.go index 162ff37ce868c5670dc727f9b3c0faad97a09894..3c1c4ba9127b94a74833fff7dcbce86961479019 100644 --- a/network/message/sendCmix.go +++ b/network/message/sendCmix.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package message import ( @@ -15,7 +22,7 @@ import ( "time" ) -const sendTimeBuffer = uint64(100*time.Millisecond) +const sendTimeBuffer = uint64(100 * time.Millisecond) // WARNING: Potentially Unsafe // Payloads send are not End to End encrypted, MetaData is NOT protected with @@ -41,9 +48,12 @@ func (m *Manager) SendCMIX(msg format.Message, param params.CMIX) (id.Round, err jww.TRACE.Printf("SendCMIX GetUpcommingRealtime") //find the best round to send to, excluding attempted rounds bestRound, _ := m.Instance.GetWaitingRounds().GetUpcomingRealtime(remainingTime, attempted) + if bestRound == nil{ + continue + } - if (bestRound.Timestamps[states.REALTIME]+sendTimeBuffer)> - uint64(time.Now().UnixNano()){ + if (bestRound.Timestamps[states.REALTIME] + sendTimeBuffer) > + uint64(time.Now().UnixNano()) { jww.WARN.Println("Round received which has already started" + " realtime") continue diff --git a/network/message/sendE2E.go b/network/message/sendE2E.go index 2d92de042195ad55ca86f909b70a1468623a0e47..04e24e8e435d7871c6512b0a90abb329c2efa101 100644 --- a/network/message/sendE2E.go +++ b/network/message/sendE2E.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package message diff --git a/network/message/sendUnsafe.go b/network/message/sendUnsafe.go index 88a1ef2d0a965427a1a4446c5c3117204d9ea052..b4be55bd59dc39290fedcb916d4d8a4c3fd49457 100644 --- a/network/message/sendUnsafe.go +++ b/network/message/sendUnsafe.go @@ -1,3 +1,9 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package message import ( diff --git a/network/node/register.go b/network/node/register.go index 51ec459a70473b4e226d452f82e09dfd9aa4a8cf..b0a32b611a9948b2d5677080a036e2e925dc3e5b 100644 --- a/network/node/register.go +++ b/network/node/register.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package node import ( diff --git a/network/node/register_test.go b/network/node/register_test.go index 07c388885d84d9e20585d4298aebeeb6fed096ff..95d0765bfdfa47d2443ff45245d770d1eafaeb8b 100644 --- a/network/node/register_test.go +++ b/network/node/register_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package node import ( diff --git a/network/rounds/check.go b/network/rounds/check.go index d6ddf537e3f43b651d3615d78dce24cc0acfdeb0..72d31bed5d1840f6d2b5f7b00f8b24607a7963a8 100644 --- a/network/rounds/check.go +++ b/network/rounds/check.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package rounds import ( diff --git a/network/rounds/historical.go b/network/rounds/historical.go index d582ba20476126567c7cb656089031668ed806ef..6b8fd8a53b2101b47b817bc3ec0341a1986ca9ef 100644 --- a/network/rounds/historical.go +++ b/network/rounds/historical.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package rounds diff --git a/network/rounds/manager.go b/network/rounds/manager.go index ccd0ec6d7a2c54e27ef0b82c6dee55fa9aea547c..3c3221474d3124b9de4ab1e688c7eeda118e8a52 100644 --- a/network/rounds/manager.go +++ b/network/rounds/manager.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package rounds import ( diff --git a/network/rounds/processingRounds.go b/network/rounds/processingRounds.go index 436736812bfaa215bd7b1b5826790f737b4303df..8058154ff9b225e48ac994e1e7c22f9e234619c0 100644 --- a/network/rounds/processingRounds.go +++ b/network/rounds/processingRounds.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package rounds // File for storing info about which rounds are processing diff --git a/network/rounds/processingRounds_test.go b/network/rounds/processingRounds_test.go index 8b61ad6d76a050134a03246df47c6e7996af4ed8..8f0dd893422b8779f5b62000530bbb75e1f92177 100644 --- a/network/rounds/processingRounds_test.go +++ b/network/rounds/processingRounds_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package rounds // Testing functions for Processing Round structure diff --git a/network/rounds/retrieve.go b/network/rounds/retrieve.go index 5c35408673a0a4abd21f71820d488a5c08d4685f..0762c3a197061273993e5a57ff056f6c041d51f0 100644 --- a/network/rounds/retrieve.go +++ b/network/rounds/retrieve.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package rounds import ( diff --git a/network/send.go b/network/send.go index 2d15eb377865e60da20871391e65736c91ee712d..cd3d13da43cd97ab8a610dd05e12e7776645dd49 100644 --- a/network/send.go +++ b/network/send.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package network import ( diff --git a/permissioning/permissioning.go b/permissioning/permissioning.go index 51d8803a97275e541b90a824dfc995c41cdf5336..ebe00b3c3d41c3c9fcaf844e65d87fc6033dd829 100644 --- a/permissioning/permissioning.go +++ b/permissioning/permissioning.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/permissioning/permissioning_test.go b/permissioning/permissioning_test.go index 7b34f522bdd90019b6bca1bf41d9d02489ba0ee1..7f691f3a419f5a43109206da5a802b3bb2029be3 100644 --- a/permissioning/permissioning_test.go +++ b/permissioning/permissioning_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/permissioning/register.go b/permissioning/register.go index b7a186937a9810fd3ca170e1409dfc38b0ad4d2e..5d50680539098fe8eb140ed93af26477e9b2aa9d 100644 --- a/permissioning/register.go +++ b/permissioning/register.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/permissioning/register_test.go b/permissioning/register_test.go index c6a70f185052fbe3557eb0cd520b2442a65ed5e5..3f63afff2a290a393a699c969223c9a99d104684 100644 --- a/permissioning/register_test.go +++ b/permissioning/register_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/permissioning/remoteVersion.go b/permissioning/remoteVersion.go index a424139ba5031dc1c22db39cd1a048da418b992b..95bf44fc5a1e840de3e68e1e9dc8bf569e9e3974 100644 --- a/permissioning/remoteVersion.go +++ b/permissioning/remoteVersion.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/permissioning/remoteVersion_test.go b/permissioning/remoteVersion_test.go index e2ae1f4d39e0783c5ea98ab4bb1b48db67a99032..68c76466af94db46c191fc3195e98132dddc8da9 100644 --- a/permissioning/remoteVersion_test.go +++ b/permissioning/remoteVersion_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package permissioning import ( diff --git a/stoppable/bindings.go b/stoppable/bindings.go index 73e879f557a5b91a3cbc96d88c7c28f0269d6131..55784d6522bcb0567d8eb86b282bb9895302ab57 100644 --- a/stoppable/bindings.go +++ b/stoppable/bindings.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import "time" diff --git a/stoppable/cleanup.go b/stoppable/cleanup.go index a733d74bc175d09403d2a681c8108b528a31d9f2..c721f3605aa6d5ef1323a9e01dc2b80b7cb3684c 100644 --- a/stoppable/cleanup.go +++ b/stoppable/cleanup.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/cleanup_test.go b/stoppable/cleanup_test.go index 3d808212a09754692d8c573d74034610f88bcb45..8bc7fe0be09e69b0809cbd97194dbbe58902918f 100644 --- a/stoppable/cleanup_test.go +++ b/stoppable/cleanup_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/multi.go b/stoppable/multi.go index 061be492dd4efd2d6c618d7f9772a18fb8cc7ab7..0636b84fa6e4a3d17e5a74431e42e796d84de45b 100644 --- a/stoppable/multi.go +++ b/stoppable/multi.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/multi_test.go b/stoppable/multi_test.go index 70f90e286da556ab736308f490edce3b8f620d3e..5999f838ae44d0b64a96cd27c0fc1d8e28ee49fd 100644 --- a/stoppable/multi_test.go +++ b/stoppable/multi_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/single.go b/stoppable/single.go index c5eadaefa40e8070ebb4b85ae710ff65d0f8fab6..8821db88eb4934a06db4f96484ef700b2c6beeff 100644 --- a/stoppable/single.go +++ b/stoppable/single.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/single_test.go b/stoppable/single_test.go index 0a6aac66748ab23289dc753a2beaccba6dd65a49..ceb5a9ecf6235a5de1884ed4d469f0a46aa0c0f4 100644 --- a/stoppable/single_test.go +++ b/stoppable/single_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import ( diff --git a/stoppable/stoppable.go b/stoppable/stoppable.go index e4436d5a6f971ae0f648e0fe7e16c0472cd8a2ab..06947eb3bf5ff5ae3523b927e8fb7792848fd762 100644 --- a/stoppable/stoppable.go +++ b/stoppable/stoppable.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package stoppable import "time" diff --git a/storage/auth/fingerprint.go b/storage/auth/fingerprint.go index 7dda9ae083e3a1f99c8d561ff48445103ca72993..04d0571c852f0ca359e303d69f41e1085f57bd14 100644 --- a/storage/auth/fingerprint.go +++ b/storage/auth/fingerprint.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import "gitlab.com/elixxir/crypto/cyclic" diff --git a/storage/auth/request.go b/storage/auth/request.go index e54632c2b806d3b68a6662a86844be2410003911..c33d9b02cbe2477725438903052102fdf18d11ff 100644 --- a/storage/auth/request.go +++ b/storage/auth/request.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/storage/auth/sentRequest.go b/storage/auth/sentRequest.go index 94a7a6ed36c976c9223eff6d17aae26789d0cd40..d96fcaf0ce79d847f806ed32bbdbf5a52d74e35b 100644 --- a/storage/auth/sentRequest.go +++ b/storage/auth/sentRequest.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/storage/auth/store.go b/storage/auth/store.go index fe129a7877e9c18771e6088b9c543a8183571db7..9da7cb1cd6798965173d20c6fb07d7e17df9b025 100644 --- a/storage/auth/store.go +++ b/storage/auth/store.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( diff --git a/storage/auth/store_test.go b/storage/auth/store_test.go index dc938688e091f524bc46c6fac3a70659e8a82cc5..25fd59ccb8b70634486288f4adc6aba7f02389d5 100644 --- a/storage/auth/store_test.go +++ b/storage/auth/store_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package auth import ( @@ -23,7 +30,7 @@ func TestNewStore(t *testing.T) { pubKeys := make([]*cyclic.Int, 10) for i := range privKeys { privKeys[i] = grp.NewInt(rand.Int63n(172)) - pubKeys[i] = grp.ExpG(privKeys[i],grp.NewInt(1)) + pubKeys[i] = grp.ExpG(privKeys[i], grp.NewInt(1)) } store, err := NewStore(kv, grp, privKeys) @@ -35,8 +42,8 @@ func TestNewStore(t *testing.T) { rq, ok := store.fingerprints[auth.MakeRequestFingerprint(pubKeys[i])] if !ok { t.Errorf("Key not found in map (%d): %s", i, pubKeys[i].Text(16)) - }else if rq.PrivKey.Cmp(key)!=0{ - t.Errorf("Key found in map (%d) does not match private: " + + } else if rq.PrivKey.Cmp(key) != 0 { + t.Errorf("Key found in map (%d) does not match private: "+ "%s vs %s", i, key.Text(10), rq.PrivKey.Text(10)) } } @@ -178,7 +185,7 @@ func TestStore_AddReceived_PartnerAlreadyExistsError(t *testing.T) { func TestStore_GetFingerprint_GeneralFingerprintType(t *testing.T) { s, _, privKeys := makeTestStore(t) - pubkey := s.grp.ExpG(privKeys[0],s.grp.NewInt(1)) + pubkey := s.grp.ExpG(privKeys[0], s.grp.NewInt(1)) fp := auth.MakeRequestFingerprint(pubkey) fpType, request, key, err := s.GetFingerprint(fp) if err != nil { diff --git a/storage/cmix/key.go b/storage/cmix/key.go index f1a61fa5531fe36512665ae98315163223c7db1f..ae57a4d774ce02cd5cb9e7aa0911bb9c77c02a92 100644 --- a/storage/cmix/key.go +++ b/storage/cmix/key.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package cmix import ( diff --git a/storage/cmix/key_test.go b/storage/cmix/key_test.go index 2dac7c4c9c406286006129f7575d63eee545d812..27e53eaa0ccb3971085ea4f11d42b56849eed47f 100644 --- a/storage/cmix/key_test.go +++ b/storage/cmix/key_test.go @@ -1,7 +1,8 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package cmix diff --git a/storage/cmix/roundKeys.go b/storage/cmix/roundKeys.go index 2c051b8d6cec906e7627936d40babbc7f780393d..825c1ccfe645472b1769f084d18dacc5d69777bc 100644 --- a/storage/cmix/roundKeys.go +++ b/storage/cmix/roundKeys.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package cmix import ( diff --git a/storage/cmix/roundKeys_test.go b/storage/cmix/roundKeys_test.go index 441d0f02565965e4ba31d8b1039374d18d4b831f..433c6ddbd85ff27ec914d3c584ea0d9bb271611f 100644 --- a/storage/cmix/roundKeys_test.go +++ b/storage/cmix/roundKeys_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package cmix import ( diff --git a/storage/cmix/store.go b/storage/cmix/store.go index 1a9e352265cd83e838153cf331c77ace7d012903..a6383c4d9346ba755d9a6333f1406ea0031a3876 100644 --- a/storage/cmix/store.go +++ b/storage/cmix/store.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package cmix diff --git a/storage/cmix/store_test.go b/storage/cmix/store_test.go index 6c1784a8c97c19707fa23a00ce93d9e94bea8dc3..eed3869f0996e824ffbe4b0d457fe1521341fa3c 100644 --- a/storage/cmix/store_test.go +++ b/storage/cmix/store_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package cmix diff --git a/storage/conversation/partner.go b/storage/conversation/partner.go index e1bd682ded5fae688bf6858ce1d96fe63ef4c61c..50650a1acd25dbe7812115efcc755ad9eae4e952 100644 --- a/storage/conversation/partner.go +++ b/storage/conversation/partner.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package conversation import ( @@ -20,33 +27,35 @@ const ( ) type Conversation struct { - // Public & stored data + // Public and stored data lastReceivedID uint32 numReceivedRevolutions uint32 nextSentID uint64 - // Private, unstored data + // Private and non-stored data partner *id.ID kv *versioned.KV mux sync.Mutex } +// conversationDisk stores the public data of Conversation for saving to disk. type conversationDisk struct { - // Public & stored data + // Public and stored data LastReceivedID uint32 NumReceivedRevolutions uint32 NextSendID uint64 } -// LoadOrMakeConversation returns the Conversation if it can be found, otherwise -// returns a new partner. +// LoadOrMakeConversation returns the Conversation with the given ID, if it can +// be found in KV. Otherwise, a new conversation with the given ID is generated, +// saved to KV, and returned. func LoadOrMakeConversation(kv *versioned.KV, partner *id.ID) *Conversation { - c, err := loadConversation(kv, partner) if err != nil && !strings.Contains(err.Error(), "Failed to Load conversation") { jww.FATAL.Panicf("Failed to loadOrMakeConversation: %s", err) } + // Create new conversation and save to KV if one does not exist if c == nil { c = &Conversation{ lastReceivedID: 0, @@ -55,6 +64,7 @@ func LoadOrMakeConversation(kv *versioned.KV, partner *id.ID) *Conversation { partner: partner, kv: kv, } + if err = c.save(); err != nil { jww.FATAL.Panicf("Failed to save new conversation: %s", err) } @@ -79,6 +89,7 @@ func (c *Conversation) ProcessReceivedMessageID(mid uint32) uint64 { "Received ID in a conversation: %s", err) } high = c.numReceivedRevolutions + case 0: if mid > c.lastReceivedID { c.lastReceivedID = mid @@ -88,6 +99,7 @@ func (c *Conversation) ProcessReceivedMessageID(mid uint32) uint64 { } } high = c.numReceivedRevolutions + case -1: high = c.numReceivedRevolutions - 1 } @@ -117,6 +129,7 @@ func (c *Conversation) GetNextSendID() (uint64, uint32) { return old, uint32(old & 0x00000000FFFFFFFF) } +// loadConversation returns the Conversation with the given ID from KV storage. func loadConversation(kv *versioned.KV, partner *id.ID) (*Conversation, error) { key := makeConversationKey(partner) @@ -137,6 +150,7 @@ func loadConversation(kv *versioned.KV, partner *id.ID) (*Conversation, error) { return c, nil } +// save saves the Conversation to KV storage. func (c *Conversation) save() error { data, err := c.marshal() if err != nil { @@ -153,6 +167,12 @@ func (c *Conversation) save() error { return c.kv.Set(key, &obj) } +// delete removes the Conversation from KV storage. +func (c *Conversation) delete() error { + key := makeConversationKey(c.partner) + return c.kv.Delete(key) +} + func (c *Conversation) unmarshal(b []byte) error { cd := conversationDisk{} diff --git a/storage/conversation/partner_test.go b/storage/conversation/partner_test.go index caad5518c49fe4e14f6df69a53116f237e8ef828..b2381e77bf6ced1f871c949d79bc59fb943e2680 100644 --- a/storage/conversation/partner_test.go +++ b/storage/conversation/partner_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package conversation import ( @@ -178,6 +185,29 @@ func TestConversation_save_load(t *testing.T) { } } +// Happy path. +func TestConversation_Delete(t *testing.T) { + kv := versioned.NewKV(make(ekv.Memstore)) + partner := id.NewIdFromString("partner ID", id.User, t) + conv := makeRandomConv(kv, partner) + + if err := conv.save(); err != nil { + t.Fatalf("Failed to save conversation to storage: %+v", err) + } + + if _, err := loadConversation(kv, partner); err != nil { + t.Fatalf("Failed to load conversation from storage: %v", err) + } + + if err := conv.delete(); err != nil { + t.Errorf("delete() produced an error: %+v", err) + } + + if _, err := loadConversation(kv, partner); err == nil { + t.Error("Object found in storage when it should be deleted.") + } +} + // Tests the happy path of marshal() and unmarshal(). func TestConversation_marshal_unmarshal(t *testing.T) { expectedConv := makeRandomConv(versioned.NewKV(make(ekv.Memstore)), diff --git a/storage/conversation/store.go b/storage/conversation/store.go index 9a8201c694fc5d07929c37990fb25875019c3328..9e6dfae045bed7339efcc357a9f5b35f3352f64a 100644 --- a/storage/conversation/store.go +++ b/storage/conversation/store.go @@ -1,6 +1,14 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package conversation import ( + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/xx_network/primitives/id" "sync" @@ -14,7 +22,7 @@ type Store struct { mux sync.RWMutex } -//Returns a new conversation store made off of the KV +// NewStore returns a new conversation store made off of the KV. func NewStore(kv *versioned.KV) *Store { kv = kv.Prefix(conversationKeyPrefix) return &Store{ @@ -23,12 +31,13 @@ func NewStore(kv *versioned.KV) *Store { } } -// Gets the conversation with the partner from ram if it is there, otherwise -// loads it from disk +// Get gets the conversation with the given partner ID from RAM, if it is there. +// Otherwise, it loads it from disk. func (s *Store) Get(partner *id.ID) *Conversation { s.mux.RLock() c, ok := s.loadedConversations[*partner] s.mux.RUnlock() + if !ok { s.mux.Lock() c, ok = s.loadedConversations[*partner] @@ -40,3 +49,26 @@ func (s *Store) Get(partner *id.ID) *Conversation { } return c } + +// Delete deletes the conversation with the given partner ID from memory and +// storage. Panics if the object cannot be deleted from storage. +func (s *Store) Delete(partner *id.ID) { + s.mux.Lock() + defer s.mux.Unlock() + + // Get contact from memory + c, exists := s.loadedConversations[*partner] + if !exists { + return + } + + // Delete contact from storage + err := c.delete() + if err != nil { + jww.FATAL.Panicf("Failed to remover conversation with ID %s from "+ + "storage: %+v", partner, err) + } + + // Delete contact from memory + delete(s.loadedConversations, *partner) +} diff --git a/storage/conversation/store_test.go b/storage/conversation/store_test.go index e391f3949648a9c9cf1429375cb35f43b40be4e7..fe9882af5f2050f15596e9c721cb9281922684df 100644 --- a/storage/conversation/store_test.go +++ b/storage/conversation/store_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package conversation import ( @@ -5,6 +12,7 @@ import ( "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/elixxir/ekv" "gitlab.com/xx_network/primitives/id" + "math/rand" "testing" ) @@ -19,3 +27,39 @@ func TestStore_Get_Prefix(t *testing.T) { conv := store.Get(id.NewIdFromUInt(8, id.User, t)) t.Log(conv) } + +// Happy path. +func TestStore_Delete(t *testing.T) { + kv := versioned.NewKV(make(ekv.Memstore)) + store := NewStore(kv) + pids := make([]*id.ID, 10) + + // Generate list of IDs + for i := range pids { + pids[i] = id.NewIdFromUInt(rand.Uint64(), id.User, t) + } + + // Add IDs to storage and memory + for _, pid := range pids { + store.Get(pid) + } + + // Delete conversations with IDs with even numbered indexes + for i := 0; i < len(pids); i += 2 { + store.Delete(pids[i]) + } + + // Ensure even numbered conversation were deleted and all others still exist + for i, pid := range pids { + _, exists := store.loadedConversations[*pid] + if i%2 == 0 { + if exists { + t.Errorf("%d. Delete() failed to delete the conversation "+ + "(ID %s) from memory.", i, pid) + } + } else if !exists { + t.Errorf("%d. Delete() unexpetedly deleted the conversation "+ + "(ID %s) from memory.", i, pid) + } + } +} diff --git a/storage/e2e/context.go b/storage/e2e/context.go index 800c32519ed61498b43e90a42be4d02e18823f07..beb7211ed6f8b1caca614a46bb76a03c76651c84 100644 --- a/storage/e2e/context.go +++ b/storage/e2e/context.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/fingerprintAccess.go b/storage/e2e/fingerprintAccess.go index a0dde429058295f2274992e375c7901c3c6a5ff3..82e130ed4da604ffe310f1f81362d08ab1c01130 100644 --- a/storage/e2e/fingerprintAccess.go +++ b/storage/e2e/fingerprintAccess.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e type fingerprintAccess interface { diff --git a/storage/e2e/key.go b/storage/e2e/key.go index ead73ff230cabde2efb177bda5714552de9e0855..49900a09acd032bdbae55c1e90bbc7a69a357c4f 100644 --- a/storage/e2e/key.go +++ b/storage/e2e/key.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/key_test.go b/storage/e2e/key_test.go index 1794aa2fca08a087a9d08b8fed0b94856cc3d55f..d74f53e174685483666c37150be86aef2d3a69a9 100644 --- a/storage/e2e/key_test.go +++ b/storage/e2e/key_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e diff --git a/storage/e2e/manager.go b/storage/e2e/manager.go index 1ee1445551b6d0caf7cb59e51f6e5f6a73c45fa7..5ca2dd58ef76b97aa98ee2afc8806eb0fc2f93dd 100644 --- a/storage/e2e/manager.go +++ b/storage/e2e/manager.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e @@ -54,8 +55,7 @@ func newManager(ctx *context, kv *versioned.KV, partnerID *id.ID, myPrivKey, err) } - if err := utility.StoreCyclicKey(kv, partnerPubKey, originPartnerPubKey); - err != nil { + if err := utility.StoreCyclicKey(kv, partnerPubKey, originPartnerPubKey); err != nil { jww.FATAL.Panicf("Failed to store %s: %+v", originPartnerPubKey, err) } @@ -174,7 +174,6 @@ func (m *Manager) GetSendRelationshipFingerprint() []byte { return m.send.fingerprint } - // GetReceiveSession gets the Receive session of the passed ID. Returns nil if // no session is found. func (m *Manager) GetReceiveSession(sid SessionID) *Session { diff --git a/storage/e2e/manager_test.go b/storage/e2e/manager_test.go index 6471228aa3c305a660cd29f949d134bb20ce11da..ad58f483bf0cc3efb326a783438a2a14959d184e 100644 --- a/storage/e2e/manager_test.go +++ b/storage/e2e/manager_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/negotiation.go b/storage/e2e/negotiation.go index 2b7b8df993257b7597fa356be5f464dae550b0b9..988bfee4d38d873445df238d1930d8528b01cf50 100644 --- a/storage/e2e/negotiation.go +++ b/storage/e2e/negotiation.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import "fmt" diff --git a/storage/e2e/params.go b/storage/e2e/params.go index f9672c636857cef651599f2a6f6a9e4bc042591c..f06484a3d8ccc2fd4a207f1abd10a6042f417283 100644 --- a/storage/e2e/params.go +++ b/storage/e2e/params.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e diff --git a/storage/e2e/params_test.go b/storage/e2e/params_test.go index 616947cf180c6cb5d1e8af98fe1ab0ea09c5d6cc..bf92604d3d42368910a53d25f732f8041a1e25d5 100644 --- a/storage/e2e/params_test.go +++ b/storage/e2e/params_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e // Testing file for the params.go functions diff --git a/storage/e2e/relationship.go b/storage/e2e/relationship.go index 111576e425632cf70262ab087bf37d746ffd2651..77effe1661faacafae281fb4b011d1fe8e2367d6 100644 --- a/storage/e2e/relationship.go +++ b/storage/e2e/relationship.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e @@ -355,4 +356,3 @@ func (r *relationship) clean() { } } } - diff --git a/storage/e2e/relationshipFingerprint.go b/storage/e2e/relationshipFingerprint.go index 19f01a1d9e801729e10cb598ffcc6f648769fa55..5da1762990f5729a4d0189c0dbb21f414cf8cc77 100644 --- a/storage/e2e/relationshipFingerprint.go +++ b/storage/e2e/relationshipFingerprint.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/relationshipType.go b/storage/e2e/relationshipType.go index a0542720fa371e63c4282c0a9cd6c843cf73f835..5fb5980f1f1affde2165328aa719fb16ff40b1d4 100644 --- a/storage/e2e/relationshipType.go +++ b/storage/e2e/relationshipType.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/relationship_test.go b/storage/e2e/relationship_test.go index aa5af76f8ea68ee9bb417ae1aa9fcca06cbe592b..5c5f262079ecadf7a53b374b9e8b930470229667 100644 --- a/storage/e2e/relationship_test.go +++ b/storage/e2e/relationship_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( @@ -221,7 +228,6 @@ func TestRelationship_GetNewestRekeyableSession(t *testing.T) { t.Error("didn't get the expected session") } - // make the very newest session unrekeyable: the previous session //sb.sessions[1].negotiationStatus = Confirmed sb.sessions[0].negotiationStatus = Unconfirmed @@ -498,4 +504,3 @@ func relationshipsEqual(buff *relationship, buff2 *relationship) bool { } return true } - diff --git a/storage/e2e/session.go b/storage/e2e/session.go index 6643d1eb1b9d074820d5b60010e0fc7a4aa0c1c0..bcea1ff782e45d742dd1a7429e7df4f9a90983f6 100644 --- a/storage/e2e/session.go +++ b/storage/e2e/session.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e @@ -117,16 +118,16 @@ func newSession(ship *relationship, t RelationshipType, myPrivKey, partnerPubKey session.kv = session.generate(ship.kv) - jww.INFO.Printf("New Session with Partner %s:\n\tType: %s" + - "\n\tBaseKey: %s\n\tRelationship Fingerprint: %v\n\tNumKeys: %d" + + jww.INFO.Printf("New Session with Partner %s:\n\tType: %s"+ + "\n\tBaseKey: %s\n\tRelationship Fingerprint: %v\n\tNumKeys: %d"+ "\n\tMy Private Key: %s\n\tPartner Public Key: %s", ship.manager.partner, t, session.baseKey.TextVerbose(16, 0), session.relationshipFingerprint, session.ttl, - session.myPrivKey.TextVerbose(16,0), - session.partnerPubKey.TextVerbose(16,0)) + session.myPrivKey.TextVerbose(16, 0), + session.partnerPubKey.TextVerbose(16, 0)) err := session.save() if err != nil { diff --git a/storage/e2e/sessionID.go b/storage/e2e/sessionID.go index 85c52a0d2e87413b651b40453474b2b8cc498156..00b8ebca5c4709dc12d06da89c247eafbb09894d 100644 --- a/storage/e2e/sessionID.go +++ b/storage/e2e/sessionID.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/session_test.go b/storage/e2e/session_test.go index 12b6366006b1be09e91654f370b7bc53820ffc2c..ec3c51bc9e3d261cdb881f5e05e079e936b36268 100644 --- a/storage/e2e/session_test.go +++ b/storage/e2e/session_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/stateVector.go b/storage/e2e/stateVector.go index 8329ce6e6c4fb34f10e0cf875a183c9da8d0f441..d72d5c28f02e7f423bc3702e57b762ff86c74730 100644 --- a/storage/e2e/stateVector.go +++ b/storage/e2e/stateVector.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e diff --git a/storage/e2e/stateVector_test.go b/storage/e2e/stateVector_test.go index 12da879450106ca7a303d90edbb9f52aaee823ea..99fd5cf606088b3d55ddda3f3e6045a04effe9af 100644 --- a/storage/e2e/stateVector_test.go +++ b/storage/e2e/stateVector_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/e2e/status.go b/storage/e2e/status.go index 6e65a004affa93ed22f4f848da85ba556c676c84..63633724d0ad1b3faa2488198fdd4280041b028c 100644 --- a/storage/e2e/status.go +++ b/storage/e2e/status.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import "fmt" diff --git a/storage/e2e/status_test.go b/storage/e2e/status_test.go index c7475900fb6a23a25c7053b91957abedf9724f36..a81894bae53b808ddc632a7881d5945b5b0c2d24 100644 --- a/storage/e2e/status_test.go +++ b/storage/e2e/status_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e // Testing file for the status.go functions diff --git a/storage/e2e/store.go b/storage/e2e/store.go index 3eb69bcaf6d5f3ed0dfcdd4600bc7c61a3144006..03d0abac178c99410462d84e920cf3c7564b2a06 100644 --- a/storage/e2e/store.go +++ b/storage/e2e/store.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package e2e @@ -32,7 +33,6 @@ const ( var NoPartnerErrorStr = "No relationship with partner found" - type Store struct { managers map[id.ID]*Manager mux sync.RWMutex @@ -158,7 +158,7 @@ func (s *Store) AddPartner(partnerID *id.ID, partnerPubKey, myPrivKey *cyclic.In s.mux.Lock() defer s.mux.Unlock() - jww.INFO.Printf("Adding Partner %s:\n\tMy Private Key: %s" + + jww.INFO.Printf("Adding Partner %s:\n\tMy Private Key: %s"+ "\n\tPartner Public Key: %s", partnerID, myPrivKey.TextVerbose(16, 0), diff --git a/storage/e2e/store_test.go b/storage/e2e/store_test.go index 300fac37f6b0ba983f21972d3babb27164c7ae13..fccb11fe3a0d5bb2c8f94597d7e4a25e43532b2c 100644 --- a/storage/e2e/store_test.go +++ b/storage/e2e/store_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package e2e import ( diff --git a/storage/messages.go b/storage/messages.go index f5b6e43a8d11251c0fe866a1bf5fa14c221c4fa9..31f518fbd6433278b994d72192edc4bcdc69897e 100644 --- a/storage/messages.go +++ b/storage/messages.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package storage const ( diff --git a/storage/ndf.go b/storage/ndf.go index f92336de562a1a439d9884ed2f96083e940dbd2a..14cb4147b89a4fa53de52e505627c12dbd3abc15 100644 --- a/storage/ndf.go +++ b/storage/ndf.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package storage import ( diff --git a/storage/partition/multiPartMessage.go b/storage/partition/multiPartMessage.go index b43f0d39978454aa0227403d6a87d61d27e56dad..9aa583c7a78a9616035a8df43ba713b57a34a107 100644 --- a/storage/partition/multiPartMessage.go +++ b/storage/partition/multiPartMessage.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( @@ -187,7 +194,6 @@ func (mpm *multiPartMessage) IsComplete(relationshipFingerprint []byte) (message mid = e2e.NewMessageID(relationshipFingerprint, mpm.MessageID) } - // Return the message m := message.Receive{ Payload: reconstructed, diff --git a/storage/partition/multiPartMessage_test.go b/storage/partition/multiPartMessage_test.go index 35e5b02772477ca7f91b47124565a0d5a0c805ba..103351af6b2d75e1086117cf79ace3e7bc682431 100644 --- a/storage/partition/multiPartMessage_test.go +++ b/storage/partition/multiPartMessage_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( diff --git a/storage/partition/part.go b/storage/partition/part.go index c38ca4597dd9e48b4fdc76cbbb4eb35019c463e9..307dbfb4005cdd1994f832fa0591ee07e9ab87a2 100644 --- a/storage/partition/part.go +++ b/storage/partition/part.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( diff --git a/storage/partition/part_test.go b/storage/partition/part_test.go index a7929e61bb4e684d6303ef648c186d125247f068..f9298ca925fa467d80f607b106e8933388bdc80e 100644 --- a/storage/partition/part_test.go +++ b/storage/partition/part_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( diff --git a/storage/partition/store.go b/storage/partition/store.go index 46b26229095e31f16c0f44a7a0f95b3d8d4303d7..de601693828ccd159dbdaefad11139942df2c15c 100644 --- a/storage/partition/store.go +++ b/storage/partition/store.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( diff --git a/storage/partition/store_test.go b/storage/partition/store_test.go index 251b64702a065117fcad392e8d036998f46a4803..c150d026d55389793dd32952b2fe209a29192e8b 100644 --- a/storage/partition/store_test.go +++ b/storage/partition/store_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package partition import ( diff --git a/storage/regCode.go b/storage/regCode.go index 80c36676ede39140ec13632109d543b53e6860ca..8e9533395ede948ca495b6660e8d9c4a17cdb212 100644 --- a/storage/regCode.go +++ b/storage/regCode.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package storage import ( @@ -17,7 +24,7 @@ func (s *Session) SetRegCode(regCode string) { Version: regCodeVersion, Data: []byte(regCode), Timestamp: time.Now(), - }); err!=nil{ + }); err != nil { jww.FATAL.Panicf("Failed to set the registration code: %s", err) } } diff --git a/storage/regStatus.go b/storage/regStatus.go index 2df2672ca81fcc51a457e21bd39ed9e1812f0f14..52f74dd10bf98631892237b1820ba31b105c8ecd 100644 --- a/storage/regStatus.go +++ b/storage/regStatus.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package storage diff --git a/storage/session.go b/storage/session.go index 25145a2a59a53247c400584200eda7aeae4767c6..771def537344d8386d28c5b5e09efd24f049d2e0 100644 --- a/storage/session.go +++ b/storage/session.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Session object definition diff --git a/storage/session_test.go b/storage/session_test.go index efdce6e08471a892be586cab2ace4df8540caf0c..7b0d5ebc78c3f888d800d0506169f65a64c289f4 100644 --- a/storage/session_test.go +++ b/storage/session_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package storage diff --git a/storage/user.go b/storage/user.go index a4fb8742b9bacc16a254168ce643bff5473010d9..b6003cdba1a5eb4fe1d9f9a69549e16632513eb4 100644 --- a/storage/user.go +++ b/storage/user.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package storage import "gitlab.com/elixxir/client/interfaces/user" diff --git a/storage/user/cryptographic.go b/storage/user/cryptographic.go index 9a78f4ef638502228fc299a06ba9f0d5ff211230..2790d4d72b2d15785023ba16083b0bbaf3167168 100644 --- a/storage/user/cryptographic.go +++ b/storage/user/cryptographic.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/cryptographic_test.go b/storage/user/cryptographic_test.go index 71c2dff95230612ee249c5363c274c52b8c2c3b6..19c9034cd6c554d0b2274b4a57b4e6a6cc66575e 100644 --- a/storage/user/cryptographic_test.go +++ b/storage/user/cryptographic_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/regValidationSig.go b/storage/user/regValidationSig.go index fe189198161cc8da55c65cd21264f262d9ba6095..e70b636d2ac4ba1be168c18b069ce07bfddc6bc1 100644 --- a/storage/user/regValidationSig.go +++ b/storage/user/regValidationSig.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/regValidationSig_test.go b/storage/user/regValidationSig_test.go index d2c3f758ec4de5cbb01b30faae38a32231674c97..09c73fdd9ccd92cf02b9a8064dcb23968c5c2269 100644 --- a/storage/user/regValidationSig_test.go +++ b/storage/user/regValidationSig_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/user.go b/storage/user/user.go index 8e62c933cc2a741a791c096f80f0696b07ccb32c..e79928d93b55c2787604fbd9d44fb31b0b20e9ec 100644 --- a/storage/user/user.go +++ b/storage/user/user.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( @@ -45,4 +52,4 @@ func LoadUser(kv *versioned.KV) (*User, error) { func (u *User) GetCryptographicIdentity() *CryptographicIdentity { return u.ci -} \ No newline at end of file +} diff --git a/storage/user/user_test.go b/storage/user/user_test.go index eab18d6f49720299af764d6e4e39a85d3a9fad8f..0473138dc7eaea4ef806dfcbc7ecc76fd0a66f2b 100644 --- a/storage/user/user_test.go +++ b/storage/user/user_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/username.go b/storage/user/username.go index 9127eae18731431b14cfaeec3149f5eb4d79e6b0..3e6862c398174db8ccaf644fe198d33e27851a91 100644 --- a/storage/user/username.go +++ b/storage/user/username.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/user/username_test.go b/storage/user/username_test.go index 21a720593fcfb458fc8d1d913d5152b30d80db50..db2f399c313e8038dd9ce33709f7a256373b6481 100644 --- a/storage/user/username_test.go +++ b/storage/user/username_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package user import ( diff --git a/storage/utility/NDF.go b/storage/utility/NDF.go index be827bee86fa84bd151eb459d3b95c65b11872a9..5222b4526bdd234e3c86d8ad2d82cc97ecdf5b3d 100644 --- a/storage/utility/NDF.go +++ b/storage/utility/NDF.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/cmixMessageBuffer.go b/storage/utility/cmixMessageBuffer.go index ca93a11845b81f56930651352ef7ba91b472435f..d3c5f5ce9f98473aa1428eafbda142b3af50ee62 100644 --- a/storage/utility/cmixMessageBuffer.go +++ b/storage/utility/cmixMessageBuffer.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/cmixMessageBuffer_test.go b/storage/utility/cmixMessageBuffer_test.go index fff9ed7c35aba0eb5bedf7184fc19d9edddf50c4..c5f544edf249d93824a89f4d36a39c1eec066eac 100644 --- a/storage/utility/cmixMessageBuffer_test.go +++ b/storage/utility/cmixMessageBuffer_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/contact.go b/storage/utility/contact.go index 70fa9d23c24e18d32acde173c0a646ae3ed9f074..57e987c2992649716989580e322616baa34cc77e 100644 --- a/storage/utility/contact.go +++ b/storage/utility/contact.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/dh.go b/storage/utility/dh.go index 0a892020c29bc991e72081cbf2ea9d68a06a8d28..2a840489d6f3257e40d69492faa9a68734a5f9e4 100644 --- a/storage/utility/dh.go +++ b/storage/utility/dh.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/dh_test.go b/storage/utility/dh_test.go index c6b02c1d640e1edf5282a78b60e38e5c942f7445..4d4a31941faee3467f029ffca4dbc57f8fa9dafe 100644 --- a/storage/utility/dh_test.go +++ b/storage/utility/dh_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/e2eMessageBuffer.go b/storage/utility/e2eMessageBuffer.go index 2600016e881361f67c47a986b32c4f8faddea5a3..28537e09883c5b1873e4e5131e0b25974d9b88c2 100644 --- a/storage/utility/e2eMessageBuffer.go +++ b/storage/utility/e2eMessageBuffer.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/e2eMessageBuffer_test.go b/storage/utility/e2eMessageBuffer_test.go index c5bc81013c41c032197fd6b0a5b9b831defb5104..7232ca0a17b3225ecaeb7651e4d0b7a435bac668 100644 --- a/storage/utility/e2eMessageBuffer_test.go +++ b/storage/utility/e2eMessageBuffer_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/group.go b/storage/utility/group.go index 60cce18318f8114d42393c9ee4a2e65a8128bf00..fbe18db68ec70920cab0f55a5b69d315d6a49a17 100644 --- a/storage/utility/group.go +++ b/storage/utility/group.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/group_test.go b/storage/utility/group_test.go index eb6e64bd92bf1e482f6d32e8f6f006c4dfdf8b5d..ef8ed3ea22dead0c1764d094513a22ccf53e931f 100644 --- a/storage/utility/group_test.go +++ b/storage/utility/group_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/knownRounds.go b/storage/utility/knownRounds.go index 472206074e4ccc56cf4e5ecf03b0cadcdbbd00de..767ad917c4e57f7e8040deb58713e069fd2b6596 100644 --- a/storage/utility/knownRounds.go +++ b/storage/utility/knownRounds.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/knownRounds_test.go b/storage/utility/knownRounds_test.go index 624079da5afe7fb6de5e5c2fa4fd751760db74d0..73f0cb5a38d2ef39b33d57ea1ae2892d335d015c 100644 --- a/storage/utility/knownRounds_test.go +++ b/storage/utility/knownRounds_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/messageBuffer.go b/storage/utility/messageBuffer.go index b6bcde652dffa2dbb4938bf066a355e1e791ea0e..5464881caf40e48df6a5f44bd6c60259b956b6bf 100644 --- a/storage/utility/messageBuffer.go +++ b/storage/utility/messageBuffer.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/messageBuffer_test.go b/storage/utility/messageBuffer_test.go index 212c16ad477215431e54b09bb60c89fb4c8db808..6aff00a4c456ad711ef4eb51b13954fcd50e7511 100644 --- a/storage/utility/messageBuffer_test.go +++ b/storage/utility/messageBuffer_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/meteredCmixMessageBuffer.go b/storage/utility/meteredCmixMessageBuffer.go index 2ccf9c11115eeb031e1aa2fc82b663ab365e56bf..584f6e2252d6b5840ae11dbe6db69a452e7ca36a 100644 --- a/storage/utility/meteredCmixMessageBuffer.go +++ b/storage/utility/meteredCmixMessageBuffer.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/utility/meteredCmixMessageBuffer_test.go b/storage/utility/meteredCmixMessageBuffer_test.go index 9266b0cd713fbcb49475bbad87885ba5bc5a7e7d..d21f3ca6dd2d28efc26553327f87458915128477 100644 --- a/storage/utility/meteredCmixMessageBuffer_test.go +++ b/storage/utility/meteredCmixMessageBuffer_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package utility import ( diff --git a/storage/versioned/kv.go b/storage/versioned/kv.go index 1fd48d13e7cbcd198ce74680f2fe6ab7b95cf2e4..f9391b7a4acce3f3b7d1c15833561ed866b06654 100644 --- a/storage/versioned/kv.go +++ b/storage/versioned/kv.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package versioned diff --git a/storage/versioned/kv_test.go b/storage/versioned/kv_test.go index 096a50ad172c2eee8940455346b96e01856e3ec1..db8d691d8d6336af6d99a4a1a625bbd54f3fc39b 100644 --- a/storage/versioned/kv_test.go +++ b/storage/versioned/kv_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package versioned diff --git a/storage/versioned/object.go b/storage/versioned/object.go index 36bc545dcbc67a8a93914cca7b56c3f38cbc4f61..8cdec88c27c59dc99284089996fbcd2e2c6394a0 100644 --- a/storage/versioned/object.go +++ b/storage/versioned/object.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package versioned import ( diff --git a/storage/versioned/object_test.go b/storage/versioned/object_test.go index 0a3234afcfa4f2b95de42d91c0c47c8529124809..4ba12575a327269b2094ff7c73d90fa2a7873f2c 100644 --- a/storage/versioned/object_test.go +++ b/storage/versioned/object_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package versioned import ( diff --git a/switchboard/any.go b/switchboard/any.go index b460ecac01ba20f5c453d1f90d157bb13bd0ed5f..8853200814ab135f340c2354a79e4cf2ee4e51b4 100644 --- a/switchboard/any.go +++ b/switchboard/any.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/any_test.go b/switchboard/any_test.go index 1f31bccd885ee97d19213812fb2b0cbfc1fd6a2a..557faa519e97c0bf44a05b19b8c90b8aeef20bbb 100644 --- a/switchboard/any_test.go +++ b/switchboard/any_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/byID.go b/switchboard/byID.go index ad7197452e80db9220a589f5c4a880caf15532e4..9048f527c122f20abf5ad7930148e66be5055653 100644 --- a/switchboard/byID.go +++ b/switchboard/byID.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/byID_test.go b/switchboard/byID_test.go index 683a68f0a8ab3a10d989ba3425d87f9451e6c94b..52c294b7c570321c45ad07f285d1a6f35ec4af7e 100644 --- a/switchboard/byID_test.go +++ b/switchboard/byID_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/byType.go b/switchboard/byType.go index 7bf703d75bd1212896c96864ba90d2c71a750273..ccf0c8c7375a6e7f4f9428e1a8b371c62f0fd267 100644 --- a/switchboard/byType.go +++ b/switchboard/byType.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/byType_test.go b/switchboard/byType_test.go index 2570f6a3360efe446aa6ff4957ecd33363e76826..9abc45d24f571e6ddab79d0d606c0709d3072411 100644 --- a/switchboard/byType_test.go +++ b/switchboard/byType_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/listener.go b/switchboard/listener.go index 8bc313f51789016bbc23adba454df77b42043934..630ddc150a0c0ee4a733641a66437a2e1838c145 100644 --- a/switchboard/listener.go +++ b/switchboard/listener.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 xx network SEZC // -// // -// Use of this source code is governed by a license that can be found in the LICENSE file // -//////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package switchboard diff --git a/switchboard/listener_test.go b/switchboard/listener_test.go index 11ea5159902121be678a632db76e196bd0f52682..7541072b639558ee730fe485dcc6803a0fa911b4 100644 --- a/switchboard/listener_test.go +++ b/switchboard/listener_test.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////////////////// -// Copyright © 2020 xx network SEZC // -// // -// Use of this source code is governed by a license that can be found in the LICENSE file // -//////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package switchboard diff --git a/switchboard/switchboard.go b/switchboard/switchboard.go index 2c4eb69cee13a1724f911ca3504900b46f36117f..21695f10c93b9b248cf8b1a6edcd70b794b6d2c7 100644 --- a/switchboard/switchboard.go +++ b/switchboard/switchboard.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/switchboard/switchboard_test.go b/switchboard/switchboard_test.go index 5c097cdfa05a2686fd571258c290765d62cc8741..2a726c73cf55a5771db525ac8e86a75168abe596 100644 --- a/switchboard/switchboard_test.go +++ b/switchboard/switchboard_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package switchboard import ( diff --git a/ud/udMessages.proto b/ud/udMessages.proto index 2e3d47c904535deed50a82b2bcd7d3cca0660e49..fba57dcf6c35db303cb24e477042304d895e482b 100644 --- a/ud/udMessages.proto +++ b/ud/udMessages.proto @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2018 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// // Call ./generate.sh to generate the protocol buffer code