diff --git a/app/cmd/cli/root.go b/app/cmd/cli/root.go index 28d4b5c58..39a67c783 100644 --- a/app/cmd/cli/root.go +++ b/app/cmd/cli/root.go @@ -61,7 +61,9 @@ func init() { startCmd.Flags().BoolVar(&profileApp, "profileApp", false, "expose cpu & memory profiling") startCmd.Flags().BoolVar(&useCache, "useCache", false, "use cache") startCmd.Flags().BoolVar(&forceSetValidatorsLean, "forceSetValidators", false, "reads your lean_pocket_user_key_file (lean_nodes_keys.json) and updates your last signed state/validator files before starting your node") + meshCmd.Flags().BoolVar(&simulateRelay, "simulateRelay", false, "would you like to be able to test your relays") rootCmd.AddCommand(startCmd) + rootCmd.AddCommand(meshCmd) rootCmd.AddCommand(resetCmd) rootCmd.AddCommand(version) rootCmd.AddCommand(stopCmd) @@ -96,7 +98,7 @@ func start(cmd *cobra.Command, args []string) { genesisType = app.TestnetGenesisType } tmNode := app.InitApp(datadir, tmNode, persistentPeers, seeds, remoteCLIURL, keybase, genesisType, useCache, forceSetValidatorsLean) - go rpc.StartRPC(app.GlobalConfig.PocketConfig.RPCPort, app.GlobalConfig.PocketConfig.RPCTimeout, simulateRelay, profileApp, allBlockTxs, app.GlobalConfig.PocketConfig.ChainsHotReload) + go rpc.StartRPC(app.GlobalConfig.PocketConfig.RPCPort, app.GlobalConfig.PocketConfig.RPCTimeout, simulateRelay, profileApp, allBlockTxs, app.GlobalConfig.PocketConfig.ChainsHotReload, app.GlobalConfig.PocketConfig.MeshNode) // trap kill signals (2,3,15,9) signalChannel := make(chan os.Signal, 1) signal.Notify(signalChannel, @@ -120,6 +122,26 @@ func start(cmd *cobra.Command, args []string) { }() } +var meshCmd = &cobra.Command{ + Use: "start-mesh", + Short: "starts pocket-mesh daemon", + Long: `Starts the Pocket mesh node, picks up the config from the assigned `, + Run: func(cmd *cobra.Command, args []string) { + t := time.Unix(1625263200, 0) // Friday, July 2, 2021 6:00:00 PM GMT-04:00 + sleepDuration := time.Until(t) + if time.Now().Before(t) { + fmt.Println("Sleeping for ", sleepDuration) + time.Sleep(sleepDuration) + } + startMesh(cmd, args) + }, +} + +func startMesh(cmd *cobra.Command, args []string) { + app.InitMeshConfig(datadir) + rpc.StartMeshRPC(simulateRelay) +} + // resetCmd represents the reset command var resetCmd = &cobra.Command{ Use: "reset", diff --git a/app/cmd/rpc/client.go b/app/cmd/rpc/client.go index 1f2b2d765..bd0e3496d 100644 --- a/app/cmd/rpc/client.go +++ b/app/cmd/rpc/client.go @@ -65,7 +65,7 @@ func Relay(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { WriteJSONResponseWithCode(w, string(j), r.URL.Path, r.Host, 400) return } - res, dispatch, err := app.PCA.HandleRelay(relay) + res, dispatch, err := app.PCA.HandleRelay(relay, false) if err != nil { response := RPCRelayErrorResponse{ Error: err, diff --git a/app/cmd/rpc/mesh.go b/app/cmd/rpc/mesh.go new file mode 100644 index 000000000..6a861061a --- /dev/null +++ b/app/cmd/rpc/mesh.go @@ -0,0 +1,1788 @@ +package rpc + +import ( + "bytes" + "context" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "github.com/akrylysov/pogreb" + "github.com/alitto/pond" + "github.com/fsnotify/fsnotify" + kitlevel "github.com/go-kit/kit/log/level" + "github.com/go-kit/kit/log/term" + "github.com/hashicorp/go-retryablehttp" + "github.com/julienschmidt/httprouter" + "github.com/pokt-network/pocket-core/app" + types4 "github.com/pokt-network/pocket-core/app/cmd/rpc/types" + "github.com/pokt-network/pocket-core/crypto" + sdk "github.com/pokt-network/pocket-core/types" + nodesTypes "github.com/pokt-network/pocket-core/x/nodes/types" + pocketTypes "github.com/pokt-network/pocket-core/x/pocketcore/types" + "github.com/robfig/cron/v3" + "github.com/tendermint/tendermint/libs/cli/flags" + "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/privval" + "io" + "io/ioutil" + log2 "log" + "net/http" + "net/http/httputil" + "net/url" + "os" + "os/signal" + "strings" + "sync" + "syscall" + "time" +) + +const ( + ModuleName = "pocketcore" +) + +type appCache struct { + PublicKey string + Chain string + Dispatch *dispatchResponse + IsValid bool + Error *sdkErrorResponse +} + +type meshRPCRelayResult struct { + Success bool `json:"signature"` + Error error `json:"error"` + Dispatch *pocketTypes.DispatchResponse `json:"dispatch"` +} + +type meshRPCRelayResponse struct { + Success bool `json:"signature"` + Error *sdkErrorResponse `json:"error"` + Dispatch *dispatchResponse `json:"dispatch"` +} + +type sdkErrorResponse struct { + Code sdk.CodeType `json:"code"` + Codespace sdk.CodespaceType `json:"codespace"` + Error string `json:"message"` +} + +type transport struct { + http.RoundTripper +} + +type reusableReader struct { + io.Reader + readBuf *bytes.Buffer + backBuf *bytes.Buffer +} + +// handle /v1/client/dispatch response due to was unable to inflate it using pocket core struct +// it was throwing an error about Nodes unmarshalling +type dispatchResponse struct { + BlockHeight int64 `json:"block_height"` + Session struct { + Header pocketTypes.SessionHeader `json:"header"` + Key string `json:"key"` + Nodes []struct { + Address string `json:"address"` + Chains []string `json:"chains"` + Jailed bool `json:"jailed"` + OutputAddress string `json:"output_address"` + PublicKey string `json:"public_key"` + ServiceUrl string `json:"service_url"` + Status int `json:"status"` + Tokens string `json:"tokens"` + UnstakingTime time.Time `json:"unstaking_time"` + } `json:"nodes"` + } `json:"session"` +} + +var ( + srv *http.Server + logger log.Logger + chainsClient *http.Client + servicerClient *http.Client + relaysClient *retryablehttp.Client + sessionCache sync.Map + relaysCacheDb *pogreb.DB + sessionCacheDb *pogreb.DB + servicerStatus *app.HealthResponse + servicerAddress sdk.Address + servicerPK crypto.PrivateKey + chains *pocketTypes.HostedBlockchains + meshAuthToken sdk.AuthToken + servicerAuthToken sdk.AuthToken + workerPool *pond.WorkerPool + dispatchInterceptorTaskGroup *pond.TaskGroup + heightInterceptorTaskGroup *pond.TaskGroup + healthInterceptorTaskGroup *pond.TaskGroup + notifyRelayTaskGroup *pond.TaskGroup + + // validate payload + // modulename: pocketcore CodeEmptyPayloadDataError = 25 + // ensures the block height is within the acceptable range + // modulename: pocketcore CodeOutOfSyncRequestError = 75 + // validate the relay merkleHash = request merkleHash + // modulename: pocketcore CodeRequestHash = 74 + // ensure the blockchain is supported locally + // CodeUnsupportedBlockchainNodeError = 26 + // ensure session block height == one in the relay proof + // CodeInvalidBlockHeightError = 60 + // get the session context + // CodeInternal CodeType = 1 + // get the application that staked on behalf of the client + // CodeAppNotFoundError = 45 + // validate unique relay + // CodeEvidenceSealed = 90 + // get evidence key by proof + // CodeDuplicateProofError = 37 + // validate not over service + // CodeOverServiceError = 71 + // "ValidateLocal" - Validates the proof object, where the owner of the proof is the local node + // CodeInvalidBlockHeightError = 60 + // CodePublKeyDecodeError = 6 + // CodePubKeySizeError = 42 + // CodeNewHexDecodeError = 52 + // CodeEmptyBlockHashError = 23 + // CodeInvalidHashLengthError = 62 + // CodeInvalidEntropyError = 29 + // CodeInvalidTokenError = 4 + // CodeSigDecodeError = 39 + // CodeInvalidSignatureSizeError = 38 + // CodePublKeyDecodeError = 6 + // CodeMsgDecodeError = 40 + // CodeInvalidSigError = 41 + // CodeInvalidEntropyError = 29 + // CodeInvalidNodePubKeyError = 34 + // CodeUnsupportedBlockchainAppError = 13 + invalidCodes = []sdk.CodeType{ + pocketTypes.CodeRequestHash, + pocketTypes.CodeEvidenceSealed, + pocketTypes.CodeOverServiceError, + pocketTypes.CodeOutOfSyncRequestError, + pocketTypes.CodeInvalidBlockHeightError, + } +) + +// newReusableReader - create new Reader that allow to be read multiple times. +func newReusableReader(r io.Reader) (io.Reader, error) { + readBuf := bytes.Buffer{} + _, err := readBuf.ReadFrom(r) + if err != nil { + return nil, err + } // error handling ignored for brevity + backBuf := bytes.Buffer{} + + return reusableReader{ + io.TeeReader(&readBuf, &backBuf), + &readBuf, + &backBuf, + }, nil +} + +func (r reusableReader) Read(p []byte) (int, error) { + n, err := r.Reader.Read(p) + if err == io.EOF { + r.reset() + } + return n, err +} + +func (r reusableReader) reset() { + _, _ = io.Copy(r.readBuf, r.backBuf) +} + +func (sn dispatchResponse) Contains(addr sdk.Address) bool { + // if nil return + if addr == nil { + return false + } + // loop over the nodes + for _, node := range sn.Session.Nodes { + // There is reference to node address so that way we don't have to recreate address twice for pre-leanpokt + address, err := sdk.AddressFromHex(node.Address) + if err != nil { + log2.Fatal(err) + } + if address.Equals(servicerAddress) { + return true + } + } + return false +} + +func (t *transport) RoundTrip(r *http.Request) (w *http.Response, err error) { + w, err = t.RoundTripper.RoundTrip(r) + if err != nil { + return nil, err + } + + if w.StatusCode != 200 { + return w, nil + } + + rr, err := newReusableReader(w.Body) + if err != nil { + return nil, err + } + + w.Body = io.NopCloser(rr) + + switch r.URL.Path { + case "/v1/health": + healthInterceptorTaskGroup.Submit(func() { + handleQueryHealthResponse(r, w) + }) + case "/v1/client/dispatch": + dispatchInterceptorTaskGroup.Submit(func() { + handleDispatchResponse(r, w) + }) + case "/v1/query/height": + heightInterceptorTaskGroup.Submit(func() { + handleQueryHeightResponse(r, w) + }) + default: + logger.Debug(fmt.Sprintf("Request to=%s can be ignored.\n", r.URL.Path)) + } + + return w, nil +} + +// isInvalidRelayCode - check if the error code is someone that block incoming relays for current session. +func isInvalidRelayCode(code sdk.CodeType) bool { + for _, c := range invalidCodes { + if c == code { + return true + } + } + + return false +} + +// handleDispatchResponse - callback to keep updated our known session information +func handleDispatchResponse(r *http.Request, w *http.Response) { + d := pocketTypes.SessionHeader{} + if err := popRequestModel(r, &d); err != nil { + return + } + + result := dispatchResponse{} + err := popResponseModel(w, &result) + if err != nil { + return + } + + // omit any dispatch call that return a session where this node is not in the list + if !result.Contains(servicerAddress) { + return + } + + key := d.Hash() + + if appSession, ok := loadAppSession(key); ok { + // update node height only if block height is greater than last know by this process. + if appSession.Dispatch.BlockHeight > servicerStatus.Height { + servicerStatus.Height = appSession.Dispatch.BlockHeight + } + + if appSession.Dispatch.Session.Header.SessionBlockHeight < result.Session.Header.SessionBlockHeight { + appSession.Dispatch = &result + storeAppSession(key, appSession) + } + } else { + storeAppSession(key, &appCache{ + PublicKey: d.ApplicationPubKey, + Chain: d.Chain, + Dispatch: &result, + IsValid: false, + }) + } +} + +// handleQueryHeightResponse - callback to keep updated our known servicer height without call from someone else call response +func handleQueryHeightResponse(_ *http.Request, w *http.Response) { + result := HeightParams{} + err := popResponseModel(w, &result) + if err != nil { + return + } + + if result.Height > servicerStatus.Height { + servicerStatus.Height = result.Height + } +} + +// handleQueryHealthResponse - no one except us maybe call this +func handleQueryHealthResponse(_ *http.Request, w *http.Response) { + result := app.HealthResponse{} + err := popResponseModel(w, &result) + if err != nil { + return + } + + if result.Height > servicerStatus.Height { + servicerStatus = &result + } +} + +// popRequestModel - inflate request body into an struct +func popRequestModel(r *http.Request, model interface{}) error { + body, err := ioutil.ReadAll(io.LimitReader(r.Body, 1048576)) + if err != nil { + return err + } + if len(body) == 0 { + return nil + } + if err := r.Body.Close(); err != nil { + return err + } + if err := json.Unmarshal(body, model); err != nil { + return err + } + return nil +} + +// popResponseModel - inflate response payload into an struct +func popResponseModel(w *http.Response, model interface{}) error { + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + logger.Error(fmt.Sprintf("error in RPC Handler WriteErrorResponse: %v", err)) + return + } + }(w.Body) + + err := json.NewDecoder(w.Body).Decode(&model) + if err != nil { + log2.Fatal(err) + return err + } + + return nil +} + +// serveReverseProxy - forward request to ServicerURL +func serveReverseProxy(target string, res http.ResponseWriter, req *http.Request) { + // parse the url + u, _ := url.Parse(target) + + // create the reverse proxy + proxy := httputil.NewSingleHostReverseProxy(u) + proxy.Transport = &transport{http.DefaultTransport} + + // Update the headers to allow for SSL redirection + req.URL.Host = u.Host + req.URL.Scheme = u.Scheme + req.Header.Set("X-Forwarded-Host", req.Header.Get("Host")) + req.Host = u.Host + + // Note that ServeHttp is non-blocking and uses a go routine under the hood + proxy.ServeHTTP(res, req) +} + +// reuseBody - transform request body in a reusable reader to allow multiple source read it. +func reuseBody(handler httprouter.Handle) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + rr, err := newReusableReader(r.Body) + if err != nil { + WriteErrorResponse(w, 500, fmt.Sprintf("error in RPC Handler WriteErrorResponse: %v", err)) + } else { + r.Body = io.NopCloser(rr) + handler(w, r, ps) + } + } +} + +// getMainNodeHealthStatus - call ServicerURL health endpoint to understand current node status. +func getMainNodeHealthStatus() (res *app.HealthResponse, err error) { + logger.Debug("checking servicer health status") + requestURL := fmt.Sprintf("%s/v1/health", app.GlobalMeshConfig.ServicerURL) + resp, err := servicerClient.Get(requestURL) + + if err != nil { + return + } + + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + return // add log here + } + }(resp.Body) + + if resp.StatusCode != 200 || !strings.Contains(resp.Header.Get("Content-Type"), "application/json") { + if resp.StatusCode != 200 { + err = errors.New("servicer is returning a non 200 code response from /v1/health") + } else { + err = errors.New("servicer is returning a non json response from /v1/health") + } + + return + } + + err = json.NewDecoder(resp.Body).Decode(&res) + if err != nil { + return + } + + return +} + +// getAppSession - call ServicerURL to get an application session using retrieve header +func getAppSession(query pocketTypes.SessionHeader, model interface{}) *sdkErrorResponse { + logger.Debug("reading session from servicer") + + jsonData, e := json.Marshal(query) + if e != nil { + return newSdkErrorFromPocketSdkError(sdk.ErrInternal(e.Error())) + } + + requestURL := fmt.Sprintf("%s/v1/client/dispatch", app.GlobalMeshConfig.ServicerURL) + resp, e := servicerClient.Post(requestURL, "application/json", bytes.NewBuffer(jsonData)) + + if e != nil { + return newSdkErrorFromPocketSdkError(sdk.ErrInternal(e.Error())) + } + + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + return // add log here + } + }(resp.Body) + + isSuccess := resp.StatusCode == 200 + + if !isSuccess { + result := sdkErrorResponse{} + e = json.NewDecoder(resp.Body).Decode(&result) + if e != nil { + return newSdkErrorFromPocketSdkError(sdk.ErrInternal(e.Error())) + } + return nil + } else { + e = json.NewDecoder(resp.Body).Decode(model) + if e != nil { + return newSdkErrorFromPocketSdkError(sdk.ErrInternal(e.Error())) + } + return nil + } +} + +// proxyRequest - proxy request to ServicerURL +func proxyRequest(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + serveReverseProxy(app.GlobalMeshConfig.ServicerURL, w, r) +} + +// updateChains - update chainName file with the retrieve chains value. +func updateChains(chains []pocketTypes.HostedBlockchain) { + var chainsPath = app.GlobalMeshConfig.DataDir + app.FS + sdk.ConfigDirName + app.FS + app.GlobalMeshConfig.ChainsName + var jsonFile *os.File + if _, err := os.Stat(chainsPath); err != nil && os.IsNotExist(err) { + logger.Error(fmt.Sprintf("no chains.json found @ %s, defaulting to empty chains", chainsPath)) + return + } + // reopen the file to read into the variable + jsonFile, err := os.OpenFile(chainsPath, os.O_RDONLY|os.O_CREATE, os.ModePerm) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // create dummy input for the file + res, err := json.MarshalIndent(chains, "", " ") + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // write to the file + _, err = jsonFile.Write(res) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // close the file + err = jsonFile.Close() + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } +} + +// hotReloadChains - re-evaluate chainName file every 1-minute and update chains variable. +func hotReloadChains(chains *pocketTypes.HostedBlockchains, watcher *fsnotify.Watcher) { + var chainsPath = app.GlobalMeshConfig.DataDir + app.FS + app.GlobalMeshConfig.ChainsName + err := watcher.Add(chainsPath) + if err != nil { + log2.Fatal(err) + } + + go func() { + for { + select { + case event, ok := <-watcher.Events: + if !ok { + return + } + + logger.Debug(fmt.Sprintf("event: %s", event)) + if event.Op == fsnotify.Write { + logger.Debug(fmt.Sprintf("event %s detected on %s; reloading...", event.Name, chainsPath)) + // if file exists open, else create and open + var jsonFile *os.File + var bz []byte + if _, err := os.Stat(chainsPath); err != nil && os.IsNotExist(err) { + log2.Println(fmt.Sprintf("no chains.json found @ %s, defaulting to empty chains", chainsPath)) + return + } + // reopen the file to read into the variable + jsonFile, err := os.OpenFile(chainsPath, os.O_RDONLY|os.O_CREATE, os.ModePerm) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + bz, err = ioutil.ReadAll(jsonFile) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // unmarshal into the structure + var hostedChainsSlice []pocketTypes.HostedBlockchain + err = json.Unmarshal(bz, &hostedChainsSlice) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // close the file + err = jsonFile.Close() + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + m := make(map[string]pocketTypes.HostedBlockchain) + for _, chain := range hostedChainsSlice { + if err := nodesTypes.ValidateNetworkIdentifier(chain.ID); err != nil { + log2.Fatal(fmt.Sprintf("invalid ID: %s in network identifier in %s file", chain.ID, app.GlobalMeshConfig.ChainsName)) + } + m[chain.ID] = chain + } + chains.L.Lock() + chains.M = m + chains.L.Unlock() + } + case err, ok := <-watcher.Errors: + if !ok { + return + } + logger.Error("watch file error " + err.Error()) + } + } + }() +} + +// loadHostedChains - load chainName file and read the content of it. +func loadHostedChains() *pocketTypes.HostedBlockchains { + // create the chains path + var chainsPath = app.GlobalMeshConfig.DataDir + app.FS + app.GlobalMeshConfig.ChainsName + logger.Debug("reading chains from path=" + chainsPath) + // if file exists open, else create and open + var jsonFile *os.File + var bz []byte + if _, err := os.Stat(chainsPath); err != nil && os.IsNotExist(err) { + log2.Fatal(fmt.Sprintf("no chains.json found @ %s", chainsPath)) + } + // reopen the file to read into the variable + jsonFile, err := os.OpenFile(chainsPath, os.O_RDONLY|os.O_CREATE, os.ModePerm) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + bz, err = ioutil.ReadAll(jsonFile) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // unmarshal into the structure + var hostedChainsSlice []pocketTypes.HostedBlockchain + err = json.Unmarshal(bz, &hostedChainsSlice) + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + // close the file + err = jsonFile.Close() + if err != nil { + log2.Fatal(app.NewInvalidChainsError(err)) + } + m := make(map[string]pocketTypes.HostedBlockchain) + for _, chain := range hostedChainsSlice { + if err := nodesTypes.ValidateNetworkIdentifier(chain.ID); err != nil { + log2.Fatal(fmt.Sprintf("invalid ID: %s in network identifier in %s file", chain.ID, app.GlobalMeshConfig.ChainsName)) + } + m[chain.ID] = chain + } + // return the map + return &pocketTypes.HostedBlockchains{ + M: m, + L: sync.RWMutex{}, + } +} + +// storeRelay - persist relay to disk +func storeRelay(relay *pocketTypes.Relay) { + hash := relay.RequestHash() + rb, err := json.Marshal(relay) + if err != nil { + logger.Error(err.Error()) + return + } + + err = relaysCacheDb.Put(hash, rb) + if err != nil { + logger.Error("error adding relay to cache" + err.Error()) + } + + return +} + +// decodeCacheRelay - decode []byte relay from cache to pocketTypes.Relay +func decodeCacheRelay(body []byte) (relay *pocketTypes.Relay) { + if err := json.Unmarshal(body, &relay); err != nil { + logger.Error("error decoding cache relay") + // todo: delete key from cache? + return nil + } + return +} + +// deleteCacheRelay - delete a key from relay cache +func deleteCacheRelay(relay *pocketTypes.Relay) { + hash := relay.RequestHash() + err := relaysCacheDb.Delete(hash) + if err != nil { + logger.Error("error deleting relay from cache %s", hex.EncodeToString(hash)) + return + } + + return +} + +// loadAppSession - retrieve from cache (memory or persistent) an app session cache +func loadAppSession(hash []byte) (*appCache, bool) { + sHash := hex.EncodeToString(hash) + if v, ok := sessionCache.Load(sHash); ok { + if !ok { + return nil, ok + } + + return v.(*appCache), ok + } + + if ok, err := sessionCacheDb.Has(hash); err != nil || !ok { + if err != nil { + logger.Error("error checking session cache key" + err.Error()) + } + return nil, ok + } + + payload, err := sessionCacheDb.Get(hash) + if err != nil { + logger.Error("error loading session cache key" + err.Error()) + return nil, false + } + + appSession := decodeAppSession(payload) + ok := appSession != nil + + if ok { + sessionCache.Store(sHash, appSession) + } + + return appSession, ok +} + +// decodeAppSession - decode []byte app session cache to appCache +func decodeAppSession(body []byte) (appSession *appCache) { + if err := json.Unmarshal(body, &appSession); err != nil { + logger.Error("error decoding app session from cache") + return nil + } + return appSession +} + +// storeAppSession - store in cache (memory and persistent) an appCache +func storeAppSession(hash []byte, appSession *appCache) { + hashString := hex.EncodeToString(hash) + sessionCache.Store(hashString, appSession) + + rb, err := json.Marshal(appSession) + if err != nil { + logger.Error(err.Error()) + return + } + + err = sessionCacheDb.Put(hash, rb) + if err != nil { + logger.Error("error adding app session to cache" + err.Error()) + } + + return +} + +// deleteAppSession - delete an app session from cache (memory and persistent) +func deleteAppSession(hash []byte) { + sHash := hex.EncodeToString(hash) + sessionCache.Delete(sHash) + + if ok, _ := sessionCacheDb.Has(hash); ok { + err := sessionCacheDb.Delete(hash) + if err != nil { + logger.Error("error deleting app session from cache " + sHash) + } + } +} + +// evaluateServicerError - this will change internalCache[hash].IsValid bool depending on the result of the evaluation +func evaluateServicerError(hash []byte, err *sdkErrorResponse) (isSessionStillValid bool) { + isSessionStillValid = !isInvalidRelayCode(err.Code) // we should not retry if is invalid + + if isSessionStillValid { + return isSessionStillValid + } + + if appSession, ok := loadAppSession(hash); ok { + appSession.IsValid = isSessionStillValid + appSession.Error = err + storeAppSession(hash, appSession) + } else { + logger.Error(fmt.Sprintf("missing session cache hash=%s but it should be there.", hash)) + } + + return +} + +// getSessionHashFromRelay - calculate the session header and late the hash of it +func getSessionHashFromRelay(r *pocketTypes.Relay) []byte { + header := pocketTypes.SessionHeader{ + ApplicationPubKey: r.Proof.Token.ApplicationPublicKey, + Chain: r.Proof.Blockchain, + SessionBlockHeight: r.Proof.SessionBlockHeight, + } + + return header.Hash() +} + +// notifyServicer - call servicer to ack about the processed relay. todo: should this add to a queue/cache? +func notifyServicer(r *pocketTypes.Relay) { + result := meshRPCRelayResponse{} + ctx := context.WithValue(context.Background(), "result", &result) + jsonData, err := json.Marshal(r) + if err != nil { + logger.Error(fmt.Sprintf("error encoding relay for Servicer: %v", err)) + return + } + + requestURL := fmt.Sprintf( + "%s/v1/private/mesh/relay?authtoken=%s", + app.GlobalMeshConfig.ServicerURL, + servicerAuthToken.Value, + ) + req, err := retryablehttp.NewRequestWithContext(ctx, "POST", requestURL, bytes.NewBuffer(jsonData)) + req.Header.Set("Content-Type", "application/json") + resp, err := relaysClient.Do(req) + //resp, err := relaysClient.Post(requestURL, "application/json", bytes.NewBuffer(jsonData)) + + if err != nil { + // todo. maybe retry? + logger.Error(fmt.Sprintf("error dispatching relay to Servicer: %v", err)) + return + } + + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + logger.Error(err.Error()) + return + } + }(resp.Body) + + isSuccess := resp.StatusCode == 200 + + if result.Dispatch != nil && result.Dispatch.BlockHeight > servicerStatus.Height { + servicerStatus.Height = result.Dispatch.BlockHeight + } + + if !isSuccess { + logger.Debug(fmt.Sprintf("evaluate relay error response: code=%d codespace=%s message=%s", result.Error.Code, result.Error.Codespace, result.Error.Error)) + if !evaluateServicerError(getSessionHashFromRelay(r), result.Error) { + // if session is not valid for handle more relay we should discard this relay. + deleteCacheRelay(r) + } + } else { + logger.Debug("relay notified") + deleteCacheRelay(r) + } + + return +} + +// validate - evaluate relay to understand if should or not processed. +func validate(r *pocketTypes.Relay) (err sdk.Error) { + // validate payload + if err := r.Payload.Validate(); err != nil { + return pocketTypes.NewEmptyPayloadDataError(ModuleName) + } + // validate appPubKey + if err := pocketTypes.PubKeyVerification(r.Proof.Token.ApplicationPublicKey); err != nil { + return err + } + // validate chain + if err := pocketTypes.NetworkIdentifierVerification(r.Proof.Blockchain); err != nil { + return pocketTypes.NewEmptyChainError(ModuleName) + } + + header := pocketTypes.SessionHeader{ + ApplicationPubKey: r.Proof.Token.ApplicationPublicKey, + Chain: r.Proof.Blockchain, + SessionBlockHeight: r.Proof.SessionBlockHeight, + } + + hash := header.Hash() + + if appSession, ok := loadAppSession(hash); !ok { + // TBD: + // ADD ENDPOINT ON SERVICER NODE TO ENSURE SESSION/NODE RELATION + // VS + // FIRST RELAY FREE + result := &dispatchResponse{} + e := getAppSession(header, result) + + if e != nil { + return newPocketSdkErrorFromSdkError(e) + } + + if !result.Contains(servicerAddress) { + return pocketTypes.NewInvalidSessionError(ModuleName) + } + + retrieveHash := result.Session.Header.HashString() + logger.Debug(fmt.Sprintf("relay header hash: %s session header response hash: %s", hex.EncodeToString(hash), retrieveHash)) + + storeAppSession(header.Hash(), &appCache{ + PublicKey: header.ApplicationPubKey, + Chain: header.Chain, + Dispatch: result, + IsValid: true, + }) + } else { + if !appSession.IsValid { + if appSession.Error != nil { + return newPocketSdkErrorFromSdkError(appSession.Error) + } else { + return sdk.ErrInternal("invalid session") + } + } + } + + // is needed we call the node and validate if there is not a validation already in place get done by the cron? + return nil +} + +func addServiceMetricErrorFor(blockchain string, address *sdk.Address) { + pocketTypes.GlobalServiceMetric().AddErrorFor(blockchain, address) +} + +// executeMeshHTTPRequest - run the non-native blockchain http request reusing chains http client. +func executeMeshHTTPRequest(payload, url, userAgent string, basicAuth pocketTypes.BasicAuth, method string, headers map[string]string) (string, error) { + // generate an http request + req, err := http.NewRequest(method, url, bytes.NewBuffer([]byte(payload))) + if err != nil { + return "", err + } + if basicAuth.Username != "" { + req.SetBasicAuth(basicAuth.Username, basicAuth.Password) + } + if userAgent == "" { + req.Header.Set("User-Agent", userAgent) + } + // add headers if needed + if len(headers) == 0 { + req.Header.Set("Content-Type", "application/json") + } else { + for k, v := range headers { + req.Header.Set(k, v) + } + } + // execute the request + resp, err := (chainsClient).Do(req) + if err != nil { + return payload, err + } + // ensure code is 200 + if resp.StatusCode != 200 { + return "", fmt.Errorf("expected Code 200 from Request got %v", resp.StatusCode) + } + // read all bz + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + return + } + }(resp.Body) + // return + return string(body), nil +} + +// execute - Attempts to do a request on the non-native blockchain specified +func execute(r *pocketTypes.Relay, hostedBlockchains *pocketTypes.HostedBlockchains, address *sdk.Address) (string, sdk.Error) { + // retrieve the hosted blockchain url requested + chain, err := hostedBlockchains.GetChain(r.Proof.Blockchain) + if err != nil { + // metric track + addServiceMetricErrorFor(r.Proof.Blockchain, address) + return "", err + } + _url := strings.Trim(chain.URL, `/`) + if len(r.Payload.Path) > 0 { + _url = _url + "/" + strings.Trim(r.Payload.Path, `/`) + } + + // do basic http request on the relay + res, er := executeMeshHTTPRequest( + r.Payload.Data, _url, + app.GlobalMeshConfig.UserAgent, chain.BasicAuth, + r.Payload.Method, r.Payload.Headers, + ) + if er != nil { + // metric track + addServiceMetricErrorFor(r.Proof.Blockchain, address) + return res, pocketTypes.NewHTTPExecutionError(ModuleName, er) + } + return res, nil +} + +// processRelay - call execute and create RelayResponse or Error in case. Also trigger relay metrics. +func processRelay(relay pocketTypes.Relay) (*pocketTypes.RelayResponse, sdk.Error) { + relayTimeStart := time.Now() + // attempt to execute + respPayload, err := execute(&relay, chains, &servicerAddress) + if err != nil { + logger.Error(fmt.Sprintf("could not send relay with error: %s", err.Error())) + return nil, err + } + // generate response object + resp := &pocketTypes.RelayResponse{ + Response: respPayload, + Proof: relay.Proof, + } + // sign the response + sig, er := servicerPK.Sign(resp.Hash()) + if er != nil { + logger.Error( + fmt.Sprintf("could not sign response for address: %s with hash: %v, with error: %s", + servicerAddress, resp.HashString(), er.Error()), + ) + return nil, pocketTypes.NewKeybaseError(pocketTypes.ModuleName, er) + } + // attach the signature in hex to the response + resp.Signature = hex.EncodeToString(sig) + // track the relay time + relayTime := time.Since(relayTimeStart) + // add to metrics + addRelayMetricsFunc := func() { + pocketTypes.GlobalServiceMetric().AddRelayTimingFor(relay.Proof.Blockchain, float64(relayTime.Milliseconds()), &servicerAddress) + pocketTypes.GlobalServiceMetric().AddRelayFor(relay.Proof.Blockchain, &servicerAddress) + } + go addRelayMetricsFunc() + return resp, nil +} + +// handleRelay - evaluate node status, validate relay payload and call processRelay +func handleRelay(r pocketTypes.Relay) (res *pocketTypes.RelayResponse, dispatch *pocketTypes.DispatchResponse, err error) { + if servicerStatus == nil { + return nil, nil, fmt.Errorf("pocket node is currently unavailable") + } + + if servicerStatus.IsStarting { + return nil, nil, fmt.Errorf("pocket node is unable to retrieve synced status from tendermint node, cannot service in this state") + } + + if servicerStatus.IsCatchingUp { + return nil, nil, fmt.Errorf("pocket node is currently syncing to the blockchain, cannot service in this state") + } + + err = validate(&r) + + if err != nil { + logger.Error( + fmt.Sprintf("could not validate relay for app: %s for chainID: %v with error: %s", + r.Proof.ServicerPubKey, + r.Proof.Blockchain, + err.Error(), + ), + ) + logger.Debug( + fmt.Sprintf( + "could not validate relay for app: %s, for chainID %v on node %s, at session height: %v, with error: %s", + r.Proof.ServicerPubKey, + r.Proof.Blockchain, + servicerAddress, + r.Meta.BlockHeight, + err.Error(), + ), + ) + + return + } + + // store relay on cache; once we hit this point this relay will be processed so should be notified to servicer even + // if process is shutdown + storeRelay(&r) + + res, err = processRelay(r) + + if err != nil && pocketTypes.ErrorWarrantsDispatch(err) { + // TODO: check if for request header hash we have the dispatch + err1 := getAppSession(r.Proof.SessionHeader(), &dispatch) + if err1 != nil { + return + } + } + + // add to task group pool + notifyRelayTaskGroup.Submit(func() { + notifyServicer(&r) + }) + + return +} + +// meshNodeRelay - handle mesh node relay request, call handleRelay +func meshNodeRelay(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + if cors(&w, r) { + return + } + logger.Debug("/v1/client/relay received") + var relay = pocketTypes.Relay{} + + if err := PopModel(w, r, ps, &relay); err != nil { + response := RPCRelayErrorResponse{ + Error: err, + } + j, _ := json.Marshal(response) + WriteJSONResponseWithCode(w, string(j), r.URL.Path, r.Host, 400) + return + } + + res, dispatch, err := handleRelay(relay) + + if err != nil { + response := RPCRelayErrorResponse{ + Error: err, + Dispatch: dispatch, + } + j, _ := json.Marshal(response) + WriteJSONResponseWithCode(w, string(j), r.URL.Path, r.Host, 400) + return + } + + response := RPCRelayResponse{ + Signature: res.Signature, + Response: res.Response, + } + + j, er := json.Marshal(response) + if er != nil { + WriteErrorResponse(w, 400, er.Error()) + return + } + + WriteJSONResponse(w, string(j), r.URL.Path, r.Host) + logger.Debug("/v1/client/relay done") +} + +// meshSimulateRelay - handle a simulated relay to test connectivity to the chains that this should be serving. +func meshSimulateRelay(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + var params = simRelayParams{} + + if err := PopModel(w, r, ps, ¶ms); err != nil { + WriteErrorResponse(w, 400, err.Error()) + return + } + + chain, err := chains.GetChain(params.RelayNetworkID) + if err != nil { + WriteErrorResponse(w, 400, err.Error()) + return + } + + _url := strings.Trim(chain.URL, `/`) + if len(params.Payload.Path) > 0 { + _url = _url + "/" + strings.Trim(params.Payload.Path, `/`) + } + + // do basic http request on the relay + res, er := executeMeshHTTPRequest( + params.Payload.Data, _url, app.GlobalMeshConfig.UserAgent, + chain.BasicAuth, params.Payload.Method, params.Payload.Headers, + ) + if er != nil { + WriteErrorResponse(w, 400, er.Error()) + return + } + WriteResponse(w, res, r.URL.Path, r.Host) +} + +// newSdkErrorFromPocketSdkError - return a mesh node sdkErrorResponse from a pocketcore sdk.Error +func newSdkErrorFromPocketSdkError(e sdk.Error) *sdkErrorResponse { + return &sdkErrorResponse{ + Code: e.Code(), + Codespace: e.Codespace(), + Error: e.Error(), + } +} + +// newPocketSdkErrorFromSdkError - return a pocketcore sdk.Error from a mesh node sdkErrorResponse +func newPocketSdkErrorFromSdkError(e *sdkErrorResponse) sdk.Error { + return sdk.NewError(e.Codespace, e.Code, errors.New(e.Error).Error()) +} + +// meshServicerNodeRelay - receive relays that was processed by mesh node on /v1/client/relay +func meshServicerNodeRelay(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + var relay = pocketTypes.Relay{} + + if cors(&w, r) { + return + } + + token := r.URL.Query().Get("authtoken") + if token != app.AuthToken.Value { + WriteErrorResponse(w, 401, "wrong authtoken: "+token) + return + } + + if err := PopModel(w, r, ps, &relay); err != nil { + response := RPCRelayErrorResponse{ + Error: err, + } + j, _ := json.Marshal(response) + WriteJSONResponseWithCode(w, string(j), r.URL.Path, r.Host, 400) + return + } + + _, dispatch, err := app.PCA.HandleRelay(relay, true) + if err != nil { + response := meshRPCRelayResult{ + Success: false, + Error: err, + Dispatch: dispatch, + } + j, _ := json.Marshal(response) + WriteJSONResponseWithCode(w, string(j), r.URL.Path, r.Host, 400) + return + } + + response := meshRPCRelayResult{ + Success: true, + Dispatch: dispatch, + } + j, er := json.Marshal(response) + if er != nil { + WriteErrorResponse(w, 400, er.Error()) + return + } + + WriteJSONResponse(w, string(j), r.URL.Path, r.Host) +} + +// isAuthorized - check if the request is authorized using authToken of the auth.json file +func isAuthorized(w http.ResponseWriter, r *http.Request) bool { + token := r.URL.Query().Get("authtoken") + if token == meshAuthToken.Value { + return true + } else { + WriteErrorResponse(w, 401, "wrong authtoken: "+token) + return false + } +} + +// meshStop - gracefully stop mesh rpc server. Also, this should stop new relays and wait/flush all pending relays, otherwise they will get loose. +func meshStop(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + if !isAuthorized(w, r) { + return + } + StopMeshRPC() + fmt.Println("Stop Successful, PID:" + fmt.Sprint(os.Getpid())) + os.Exit(0) +} + +// meshChains - return load chains from app.GlobalMeshConfig.ChainsName file +func meshChains(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + if !isAuthorized(w, r) { + return + } + + j, err := app.Codec().MarshalJSON(chains) + if err != nil { + WriteErrorResponse(w, 400, err.Error()) + return + } + WriteJSONResponse(w, string(j), r.URL.Path, r.Host) +} + +// meshServicerNode - return servicer node configured by servicer_priv_key.json - return address +func meshServicerNode(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + if !isAuthorized(w, r) { + return + } + + j, err := json.Marshal(types4.PublicPocketNode{ + Address: servicerAddress.String(), + }) + + if err != nil { + WriteErrorResponse(w, 400, err.Error()) + return + } + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + _, err = w.Write(j) + if err != nil { + WriteErrorResponse(w, 400, err.Error()) + } +} + +// meshUpdateChains - update chains in memory and also chains.json file. +func meshUpdateChains(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + if !isAuthorized(w, r) { + return + } + + var hostedChainsSlice []pocketTypes.HostedBlockchain + if err := PopModel(w, r, ps, &hostedChainsSlice); err != nil { + WriteErrorResponse(w, 400, err.Error()) + return + } + m := make(map[string]pocketTypes.HostedBlockchain) + for _, chain := range hostedChainsSlice { + if err := nodesTypes.ValidateNetworkIdentifier(chain.ID); err != nil { + WriteErrorResponse(w, 400, fmt.Sprintf("invalid ID: %s in network identifier in json", chain.ID)) + return + } + } + chains = &pocketTypes.HostedBlockchains{ + M: m, + L: sync.RWMutex{}, + } + + j, er := json.Marshal(chains.M) + if er != nil { + WriteErrorResponse(w, 400, er.Error()) + return + } + + WriteJSONResponse(w, string(j), r.URL.Path, r.Host) + + updateChains(hostedChainsSlice) +} + +// getMeshRoutes - return routes that will be handled/proxied by mesh rpc server +func getMeshRoutes(simulation bool) Routes { + // with reusable body + proxied := reuseBody(proxyRequest) + routes := Routes{ + // Proxy + Route{Name: "AppVersion", Method: "GET", Path: "/v1", HandlerFunc: proxyRequest}, + Route{Name: "Health", Method: "GET", Path: "/v1/health", HandlerFunc: proxied}, + Route{Name: "Challenge", Method: "POST", Path: "/v1/client/challenge", HandlerFunc: proxyRequest}, + Route{Name: "ChallengeCORS", Method: "OPTIONS", Path: "/v1/client/challenge", HandlerFunc: proxyRequest}, + Route{Name: "HandleDispatch", Method: "POST", Path: "/v1/client/dispatch", HandlerFunc: proxied}, + Route{Name: "HandleDispatchCORS", Method: "OPTIONS", Path: "/v1/client/dispatch", HandlerFunc: proxyRequest}, + Route{Name: "SendRawTx", Method: "POST", Path: "/v1/client/rawtx", HandlerFunc: proxyRequest}, + Route{Name: "Stop", Method: "POST", Path: "/v1/private/stop", HandlerFunc: proxyRequest}, + Route{Name: "QueryChains", Method: "POST", Path: "/v1/private/chains", HandlerFunc: proxyRequest}, + Route{Name: "QueryAccount", Method: "POST", Path: "/v1/query/account", HandlerFunc: proxyRequest}, + Route{Name: "QueryAccounts", Method: "POST", Path: "/v1/query/accounts", HandlerFunc: proxyRequest}, + Route{Name: "QueryAccountTxs", Method: "POST", Path: "/v1/query/accounttxs", HandlerFunc: proxyRequest}, + Route{Name: "QueryACL", Method: "POST", Path: "/v1/query/acl", HandlerFunc: proxyRequest}, + Route{Name: "QueryAllParams", Method: "POST", Path: "/v1/query/allparams", HandlerFunc: proxyRequest}, + Route{Name: "QueryApp", Method: "POST", Path: "/v1/query/app", HandlerFunc: proxyRequest}, + Route{Name: "QueryAppParams", Method: "POST", Path: "/v1/query/appparams", HandlerFunc: proxyRequest}, + Route{Name: "QueryApps", Method: "POST", Path: "/v1/query/apps", HandlerFunc: proxyRequest}, + Route{Name: "QueryBalance", Method: "POST", Path: "/v1/query/balance", HandlerFunc: proxyRequest}, + Route{Name: "QueryBlock", Method: "POST", Path: "/v1/query/block", HandlerFunc: proxyRequest}, + Route{Name: "QueryBlockTxs", Method: "POST", Path: "/v1/query/blocktxs", HandlerFunc: proxyRequest}, + Route{Name: "QueryDAOOwner", Method: "POST", Path: "/v1/query/daoowner", HandlerFunc: proxyRequest}, + Route{Name: "QueryHeight", Method: "POST", Path: "/v1/query/height", HandlerFunc: proxied}, + Route{Name: "QueryNode", Method: "POST", Path: "/v1/query/node", HandlerFunc: proxyRequest}, + Route{Name: "QueryNodeClaim", Method: "POST", Path: "/v1/query/nodeclaim", HandlerFunc: proxyRequest}, + Route{Name: "QueryNodeClaims", Method: "POST", Path: "/v1/query/nodeclaims", HandlerFunc: proxyRequest}, + Route{Name: "QueryNodeParams", Method: "POST", Path: "/v1/query/nodeparams", HandlerFunc: proxyRequest}, + Route{Name: "QueryNodes", Method: "POST", Path: "/v1/query/nodes", HandlerFunc: proxyRequest}, + Route{Name: "QueryParam", Method: "POST", Path: "/v1/query/param", HandlerFunc: proxyRequest}, + Route{Name: "QueryPocketParams", Method: "POST", Path: "/v1/query/pocketparams", HandlerFunc: proxyRequest}, + Route{Name: "QueryState", Method: "POST", Path: "/v1/query/state", HandlerFunc: proxyRequest}, + Route{Name: "QuerySupply", Method: "POST", Path: "/v1/query/supply", HandlerFunc: proxyRequest}, + Route{Name: "QuerySupportedChains", Method: "POST", Path: "/v1/query/supportedchains", HandlerFunc: proxyRequest}, + Route{Name: "QueryTX", Method: "POST", Path: "/v1/query/tx", HandlerFunc: proxyRequest}, + Route{Name: "QueryUpgrade", Method: "POST", Path: "/v1/query/upgrade", HandlerFunc: proxyRequest}, + Route{Name: "QuerySigningInfo", Method: "POST", Path: "/v1/query/signinginfo", HandlerFunc: proxyRequest}, + Route{Name: "LocalNodes", Method: "POST", Path: "/v1/private/nodes", HandlerFunc: proxyRequest}, + Route{Name: "QueryUnconfirmedTxs", Method: "POST", Path: "/v1/query/unconfirmedtxs", HandlerFunc: proxyRequest}, + Route{Name: "QueryUnconfirmedTx", Method: "POST", Path: "/v1/query/unconfirmedtx", HandlerFunc: proxyRequest}, + // start mesh things + Route{Name: "MeshService", Method: "POST", Path: "/v1/client/relay", HandlerFunc: reuseBody(meshNodeRelay)}, + Route{Name: "StopMeshNode", Method: "POST", Path: "/v1/private/mesh/stop", HandlerFunc: meshStop}, + Route{Name: "QueryMeshNodeChains", Method: "POST", Path: "/v1/private/mesh/chains", HandlerFunc: meshChains}, + Route{Name: "MeshNodeServicer", Method: "POST", Path: "/v1/private/mesh/servicer", HandlerFunc: meshServicerNode}, + Route{Name: "UpdateMeshNodeChains", Method: "POST", Path: "/v1/private/mesh/updatechains", HandlerFunc: meshUpdateChains}, + } + + // check if simulation is turn on + if simulation { + simRoute := Route{Name: "SimulateRequest", Method: "POST", Path: "/v1/client/sim", HandlerFunc: meshSimulateRelay} + routes = append(routes, simRoute) + } + + return routes +} + +// nodeHealthStatusPooling - schedule a node heal pooling +func nodeHealthStatusPooling(c *cron.Cron) { + var err error + // run one time and schedule next one + result, err := getMainNodeHealthStatus() + + if err != nil { + logger.Error(fmt.Sprintf("servicer /v1/health result in an error %v", err)) + } else { + servicerStatus = result + } + + _, err = c.AddFunc("@every 30s", func() { + result, e := getMainNodeHealthStatus() + + if e != nil { + logger.Error(fmt.Sprintf("servicer /v1/health result in an error %v", e)) + return + } + + servicerStatus = result + }) + + if err != nil { + log2.Fatal(err) + } +} + +// cleanOldSessions - clean up sessions that are longer than 50 blocks (just to be sure they are not needed) +func cleanOldSessions(c *cron.Cron) { + _, err := c.AddFunc("@every 5s", func() { + toDelete := make([]string, 0) + + sessionCache.Range(func(key any, value any) bool { + appSession := value.(*appCache) + + if appSession.Dispatch.Session.Header.SessionBlockHeight < (servicerStatus.Height - 16) { + // this session is secure to be removed + toDelete = append(toDelete, key.(string)) + } + + return true + }) + + for _, key := range toDelete { + hash, err := hex.DecodeString(key) + if err != nil { + logger.Error("error decoding session hash to delete from cache " + err.Error()) + return + } + deleteAppSession(hash) + } + }) + + if err != nil { + log2.Fatal(err) + } +} + +// loadServicer - read servicer address and cast to sdk.Address +func loadServicer() { + path := app.GlobalMeshConfig.DataDir + app.FS + app.GlobalMeshConfig.ServicerPrivateKeyFile + logger.Debug("reading private key path=" + path) + var readPk privval.PrivateKeyFile + data, err := os.ReadFile(path) + + if err := json.Unmarshal(data, &readPk); err != nil { + log2.Fatal(fmt.Errorf("an error occurred attempting to read the key file: %s", err.Error())) + } + + pk, err := crypto.NewPrivateKey(readPk.PrivateKey) + if err != nil { + log2.Fatal(err) + } + + address, err := sdk.AddressFromHex(pk.PubKey().Address().String()) + if err != nil { + log2.Fatal(err) + } + + servicerPK = pk + servicerAddress = address +} + +// getAuthTokenFromFile - read from path a json that match sdk.AuthToken struct +func getAuthTokenFromFile(path string) sdk.AuthToken { + logger.Debug("reading authtoken from path=" + path) + t := sdk.AuthToken{} + + var jsonFile *os.File + defer func(jsonFile *os.File) { + err := jsonFile.Close() + if err != nil { + return + } + }(jsonFile) + + if _, err := os.Stat(path); err == nil { + jsonFile, err = os.OpenFile(path, os.O_RDONLY, os.ModePerm) + if err != nil { + log2.Fatalf("cannot open auth token json file: " + err.Error()) + } + b, err := ioutil.ReadAll(jsonFile) + if err != nil { + log2.Fatalf("cannot read auth token json file: " + err.Error()) + } + err = json.Unmarshal(b, &t) + if err != nil { + log2.Fatalf("cannot read auth token json file into json: " + err.Error()) + } + } + + return t +} + +// loadAuthTokens - load mesh node authtoken and servicer authtoken +func loadAuthTokens() { + dataDir := app.GlobalMeshConfig.DataDir + meshNodeAuthFile := dataDir + app.FS + app.GlobalMeshConfig.AuthTokenFile + servicerAuthFile := dataDir + app.FS + app.GlobalMeshConfig.ServicerAuthTokenFile + // used to authenticate request to mesh node on /v1/private paths + meshAuthToken = getAuthTokenFromFile(meshNodeAuthFile) + // used to call servicer node on private path to notify about relays + servicerAuthToken = getAuthTokenFromFile(servicerAuthFile) +} + +func retryRelaysPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { + if err != nil { + logger.Error(fmt.Sprintf("error dispatching relay to Servicer: %v", err)) + return true, nil + } + + if resp.StatusCode != 200 { + if resp.StatusCode == 401 || resp.StatusCode == 500 { + // 401 could be fixed between restart and reload of cache. + // 500 mean something go wrong on servicer node and after a restart could be fixed? + return true, nil + } + + //rr, err2 := newReusableReader(resp.Body) + //if err2 != nil { + // return true, err2 + //} + + //resp.Body = io.NopCloser(rr) + result := meshRPCRelayResponse{} + err = json.NewDecoder(resp.Body).Decode(&result) + + if err != nil { + logger.Error(fmt.Sprintf("error decoding Servicer relay response: %v", err)) + return true, err + } + + ctxResult := ctx.Value("result").(*meshRPCRelayResponse) + ctxResult.Success = result.Success + ctxResult.Dispatch = result.Dispatch + ctxResult.Error = result.Error + + if ctxResult.Error.Code == pocketTypes.CodeDuplicateProofError { + return false, nil + } + + return !isInvalidRelayCode(result.Error.Code), nil + } + + return false, nil +} + +// prepareHttpClients - prepare http clients & transports +func prepareHttpClients() { + logger.Debug("initializing http clients") + chainsTransport := http.DefaultTransport.(*http.Transport).Clone() + chainsTransport.MaxIdleConns = 100 + chainsTransport.MaxConnsPerHost = 100 + chainsTransport.MaxIdleConnsPerHost = 100 + + servicerTransport := http.DefaultTransport.(*http.Transport).Clone() + servicerTransport.MaxIdleConns = 20 + servicerTransport.MaxConnsPerHost = 20 + servicerTransport.MaxIdleConnsPerHost = 20 + + chainsClient = &http.Client{ + Timeout: time.Duration(app.GlobalMeshConfig.RPCTimeout) * time.Second, + Transport: chainsTransport, + } + servicerClient = &http.Client{ + Timeout: time.Duration(app.GlobalMeshConfig.RPCTimeout) * time.Second, + Transport: servicerTransport, + } + relaysClient = retryablehttp.NewClient() + relaysClient.RetryMax = app.GlobalMeshConfig.ServicerRetryMaxTimes + relaysClient.HTTPClient = servicerClient + relaysClient.RetryWaitMin = time.Duration(app.GlobalMeshConfig.ServicerRetryWaitMin) * time.Millisecond + relaysClient.RetryWaitMax = time.Duration(app.GlobalMeshConfig.ServicerRetryWaitMax) * time.Millisecond + relaysClient.CheckRetry = retryRelaysPolicy +} + +// initLogger - initialize logger +func initLogger() (logger log.Logger) { + logger = log.NewTMLoggerWithColorFn(log.NewSyncWriter(os.Stdout), func(keyvals ...interface{}) term.FgBgColor { + if keyvals[0] != kitlevel.Key() { + fmt.Printf("expected level key to be first, got %v", keyvals[0]) + log2.Fatal(1) + } + switch keyvals[1].(kitlevel.Value).String() { + case "info": + return term.FgBgColor{Fg: term.Green} + case "debug": + return term.FgBgColor{Fg: term.DarkBlue} + case "error": + return term.FgBgColor{Fg: term.Red} + default: + return term.FgBgColor{} + } + }) + logger, err := flags.ParseLogLevel(app.GlobalMeshConfig.LogLevel, logger, "info") + if err != nil { + log2.Fatal(err) + } + return +} + +// catchSignal - catch system signals and process them +func catchSignal() { + terminateSignals := make(chan os.Signal, 1) + reloadSignals := make(chan os.Signal, 1) + + signal.Notify(terminateSignals, syscall.SIGINT, syscall.SIGKILL, syscall.SIGTERM, os.Kill, os.Interrupt) //NOTE:: syscall.SIGKILL we cannot catch kill -9 as its force kill signal. + + signal.Notify(reloadSignals, syscall.SIGUSR1) + + for { // We are looping here because config reload can happen multiple times. + select { + case s := <-terminateSignals: + logger.Info("Got one of stop signals, shutting down server gracefully, SIGNAL NAME :", s) + StopMeshRPC() + break //break is not necessary to add here as if server is closed our main function will end. + case <-reloadSignals: + logger.Debug("Got reload signal, will reload") + // todo: reload config? reload chains? reload auth/key? is really this needed? + } + } +} + +// initWorkers - initialize pond worker and task workers +func initWorkers() { + logger.Debug("initializing worker pool") + panicHandler := func(p interface{}) { + logger.Error(fmt.Sprintf("Task panicked: %v", p)) + } + + var strategy pond.ResizingStrategy + + switch app.GlobalMeshConfig.WorkerStrategy { + case "lazy": + strategy = pond.Lazy() + break + case "eager": + strategy = pond.Eager() + break + case "balanced": + strategy = pond.Balanced() + break + default: + log2.Fatal(fmt.Sprintf("strategy %s is not a valid option; allowed values are: lazy|eager|balanced", app.GlobalMeshConfig.WorkerStrategy)) + } + + workerPool = pond.New( + app.GlobalMeshConfig.MaxWorkers, app.GlobalMeshConfig.MaxWorkersCapacity, + pond.IdleTimeout(time.Duration(app.GlobalMeshConfig.WorkersIdleTimeout)*time.Millisecond), + pond.PanicHandler(panicHandler), + pond.Strategy(strategy), + ) + + dispatchInterceptorTaskGroup = workerPool.Group() + heightInterceptorTaskGroup = workerPool.Group() + healthInterceptorTaskGroup = workerPool.Group() + notifyRelayTaskGroup = workerPool.Group() +} + +// initCache - initialize cache +func initCache() { + var err error + logger.Debug("initializing session cache") + sessionCacheFilePath := app.GlobalMeshConfig.DataDir + app.FS + app.GlobalMeshConfig.SessionCacheFile + sessionCacheDb, err = pogreb.Open(sessionCacheFilePath, nil) + if err != nil { + log2.Fatal(err) + return + } + + logger.Debug("resuming relays in cache") + it := sessionCacheDb.Items() + for { + key, val, err := it.Next() + if err == pogreb.ErrIterationDone { + break + } + if err != nil { + log2.Fatal(err) + } + + appSession := decodeAppSession(val) + if appSession != nil { + storeAppSession(key, appSession) + } + } + + logger.Debug("initializing relays cache") + relaysCacheFilePath := app.GlobalMeshConfig.DataDir + app.FS + app.GlobalMeshConfig.RelayCacheFile + relaysCacheDb, err = pogreb.Open(relaysCacheFilePath, nil) + if err != nil { + log2.Fatal(err) + return + } + + logger.Debug("resuming relays in cache") + it = relaysCacheDb.Items() + for { + key, val, err := it.Next() + if err == pogreb.ErrIterationDone { + break + } + if err != nil { + log2.Fatal(err) + } + + log2.Printf("loading relay hash=%s", hex.EncodeToString(key)) + relay := decodeCacheRelay(val) + + if relay != nil { + notifyRelayTaskGroup.Submit(func() { + notifyServicer(relay) + }) + } + } +} + +// initCrons - initialize in memory cron jobs +func initCrons() { + // start cron for height pooling + c := cron.New() + + logger.Debug("initializing servicer health cron job") + // check node status before start and schedule job + nodeHealthStatusPooling(c) + + logger.Debug("initializing session cache clean up") + // schedule clean old session job + cleanOldSessions(c) + + // start all the cron jobs + c.Start() +} + +// GetServicerMeshRoutes - return routes that need to be added to servicer to allow mesh node to communicate with. +func GetServicerMeshRoutes() Routes { + routes := Routes{ + {Name: "MeshService", Method: "POST", Path: "/v1/private/mesh/relay", HandlerFunc: meshServicerNodeRelay}, + } + + return routes +} + +// StopMeshRPC - stop http server +func StopMeshRPC() { + // stop receiving new requests + if err := srv.Shutdown(context.Background()); err != nil { + logger.Error("HTTP Server Shutdown Error: %v", err) + } + + // close relays cache db + if err := relaysCacheDb.Close(); err != nil { + logger.Error("Relays Cache DB Shutdown Error: %v", err) + } + + // close session cache db + if err := sessionCacheDb.Close(); err != nil { + logger.Error("Session DB Shutdown Error: %v", err) + } + + // stop accepting new tasks and signal all workers to stop processing new tasks. Tasks being processed by workers + // will continue until completion unless the process is terminated. + workerPool.Stop() +} + +// StartMeshRPC - Start mesh rpc server +func StartMeshRPC(simulation bool) { + logger = initLogger() + sessionCache = sync.Map{} + servicerStatus = &app.HealthResponse{ + IsStarting: true, + IsCatchingUp: true, + Height: 1, + } + // watch chains.json to reload them on changes. + watcher, err := fsnotify.NewWatcher() + if err != nil { + log2.Fatal(err) + } + defer func(watcher *fsnotify.Watcher) { + err := watcher.Close() + if err != nil { + logger.Error(fmt.Sprintf("error closing file watcher %s", err.Error())) + } + }(watcher) + // read servicer + loadServicer() + // load auth token files (servicer and mesh node) + loadAuthTokens() + // retrieve the nonNative blockchains your node is hosting + chains = loadHostedChains() + // turn on chains hot reload + hotReloadChains(chains, watcher) + // initialize prometheus metrics + pocketTypes.InitGlobalServiceMetric(chains, logger, app.GlobalMeshConfig.PrometheusAddr, app.GlobalMeshConfig.PrometheusMaxOpenfiles) + // instantiate all the http clients used to call Chains and Servicer + prepareHttpClients() + // read mesh node routes + routes := getMeshRoutes(simulation) + // initialize crons + initCrons() + // initialize worker pools + initWorkers() + // bootstrap cache + initCache() + + srv = &http.Server{ + ReadTimeout: 30 * time.Second, + ReadHeaderTimeout: 20 * time.Second, + WriteTimeout: 60 * time.Second, + Addr: ":" + app.GlobalMeshConfig.RPCPort, + Handler: http.TimeoutHandler( + Router(routes), + time.Duration(app.GlobalMeshConfig.RPCTimeout)*time.Millisecond, + "Server Timeout Handling Request", + ), + } + + go catchSignal() + + logger.Debug("start serving relay as mesh node of address=" + servicerAddress.String()) + log2.Fatal(srv.ListenAndServe()) +} diff --git a/app/cmd/rpc/query.go b/app/cmd/rpc/query.go index 92fdf55f8..5168ae979 100644 --- a/app/cmd/rpc/query.go +++ b/app/cmd/rpc/query.go @@ -26,6 +26,16 @@ func Version(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { WriteResponse(w, APIVersion, r.URL.Path, r.Host) } +func Health(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + res := app.PCA.QueryHealth(APIVersion) + j, er := json.Marshal(res) + if er != nil { + WriteErrorResponse(w, 400, er.Error()) + return + } + WriteJSONResponse(w, string(j), r.URL.Path, r.Host) +} + func LocalNodes(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { value := r.URL.Query().Get("authtoken") if value != app.AuthToken.Value { diff --git a/app/cmd/rpc/server.go b/app/cmd/rpc/server.go index 2c1493272..29a0a52d6 100644 --- a/app/cmd/rpc/server.go +++ b/app/cmd/rpc/server.go @@ -18,7 +18,7 @@ import ( var APIVersion = app.AppVersion -func StartRPC(port string, timeout int64, simulation, debug, allBlockTxs, hotReloadChains bool) { +func StartRPC(port string, timeout int64, simulation, debug, allBlockTxs, hotReloadChains, meshNode bool) { routes := GetRoutes() if simulation { simRoute := Route{Name: "SimulateRequest", Method: "POST", Path: "/v1/client/sim", HandlerFunc: SimRequest} @@ -50,6 +50,11 @@ func StartRPC(port string, timeout int64, simulation, debug, allBlockTxs, hotRel routes = append(routes, Route{Name: "UpdateChains", Method: "POST", Path: "/v1/private/updatechains", HandlerFunc: UpdateChains}) } + if meshNode { + // allow mesh node to notify servicer node + routes = append(routes, GetServicerMeshRoutes()...) + } + srv := &http.Server{ ReadTimeout: 30 * time.Second, ReadHeaderTimeout: 20 * time.Second, @@ -87,6 +92,7 @@ type Routes []Route func GetRoutes() Routes { routes := Routes{ Route{Name: "AppVersion", Method: "GET", Path: "/v1", HandlerFunc: Version}, + Route{Name: "Health", Method: "GET", Path: "/v1/health", HandlerFunc: Health}, Route{Name: "Challenge", Method: "POST", Path: "/v1/client/challenge", HandlerFunc: Challenge}, Route{Name: "ChallengeCORS", Method: "OPTIONS", Path: "/v1/client/challenge", HandlerFunc: Challenge}, Route{Name: "HandleDispatch", Method: "POST", Path: "/v1/client/dispatch", HandlerFunc: Dispatch}, diff --git a/app/common_test.go b/app/common_test.go index 74adfa4e0..089857d28 100644 --- a/app/common_test.go +++ b/app/common_test.go @@ -103,6 +103,7 @@ func NewInMemoryTendermintNodeAminoWithValidators(t *testing.T, genesisState []b panic(err) } pocketTypes.CleanPocketNodes() + pocketTypes.StopEvidenceWorker() PCA = nil inMemKB = nil err := inMemDB.Close() @@ -168,6 +169,7 @@ func NewInMemoryTendermintNodeProtoWithValidators(t *testing.T, genesisState []b } pocketTypes.CleanPocketNodes() + pocketTypes.StopEvidenceWorker() PCA = nil inMemKB = nil diff --git a/app/config.go b/app/config.go index cf5afa06a..5ce655e15 100644 --- a/app/config.go +++ b/app/config.go @@ -88,6 +88,9 @@ func InitApp(datadir, tmNode, persistentPeers, seeds, remoteCLIURL string, keyba } // create logger logger := InitLogger() + if GlobalConfig.PocketConfig.MeshNode && GlobalConfig.PocketConfig.GenerateTokenOnStart { + logger.Error("start node with mesh_node and generate_token_on_start both on true could lead to issues on mesh node side after node restart.") + } // prestart hook, so users don't have to create their own set-validator prestart script if GlobalConfig.PocketConfig.LeanPocket { userProvidedKeyPath := GlobalConfig.PocketConfig.GetLeanPocketUserKeyFilePath() @@ -471,6 +474,7 @@ func InitPocketCoreConfig(chains *types.HostedBlockchains, logger log.Logger) { } func ShutdownPocketCore() { + types.StopEvidenceWorker() types.FlushSessionCache() types.StopServiceMetrics() } diff --git a/app/mesh.go b/app/mesh.go new file mode 100644 index 000000000..4d2fbb884 --- /dev/null +++ b/app/mesh.go @@ -0,0 +1,141 @@ +package app + +import ( + "encoding/json" + sdk "github.com/pokt-network/pocket-core/types" + "io/ioutil" + log2 "log" + "os" +) + +var ( + GlobalMeshConfig MeshConfig +) + +type MeshConfig struct { + // Mesh Node + DataDir string `json:"data_dir"` + RPCPort string `json:"rpc_port"` + ChainsName string `json:"chains_name"` + RPCTimeout int64 `json:"rpc_timeout"` + LogLevel string `json:"log_level"` + UserAgent string `json:"user_agent"` + AuthTokenFile string `json:"auth_token_file"` + // Prometheus + PrometheusAddr string `json:"pocket_prometheus_port"` + PrometheusMaxOpenfiles int `json:"prometheus_max_open_files"` + // Cache + RelayCacheFile string `json:"relay_cache_file"` + SessionCacheFile string `json:"session_cache_file"` + // Workers + WorkerStrategy string `json:"worker_strategy"` + MaxWorkers int `json:"max_workers"` + MaxWorkersCapacity int `json:"max_workers_capacity"` + WorkersIdleTimeout int `json:"workers_idle_timeout"` + // Servicer + ServicerPrivateKeyFile string `json:"servicer_private_key_file"` + ServicerURL string `json:"servicer_url"` + ServicerRPCTimeout int64 `json:"servicer_rpc_timeout"` + ServicerAuthTokenFile string `json:"servicer_auth_token_file"` + ServicerRetryMaxTimes int `json:"servicer_retry_max_times"` + ServicerRetryWaitMin int `json:"servicer_retry_wait_min"` + ServicerRetryWaitMax int `json:"servicer_retry_wait_max"` +} + +func defaultMeshConfig(dataDir string) MeshConfig { + c := MeshConfig{ + // Mesh Node + DataDir: dataDir, + RPCPort: sdk.DefaultRPCPort, + ChainsName: sdk.DefaultChainsName, + RPCTimeout: sdk.DefaultRPCTimeout, + LogLevel: "*:info, *:error", + UserAgent: sdk.DefaultUserAgent, + AuthTokenFile: "auth" + FS + "mesh.json", + // Prometheus + PrometheusAddr: sdk.DefaultPocketPrometheusListenAddr, + PrometheusMaxOpenfiles: sdk.DefaultPrometheusMaxOpenFile, + // Cache + RelayCacheFile: "data" + FS + "relays.pkt", + SessionCacheFile: "data" + FS + "session.pkt", + // Worker + WorkerStrategy: "balanced", + MaxWorkers: 10, + MaxWorkersCapacity: 1000, + WorkersIdleTimeout: 100, + // Servicer + ServicerPrivateKeyFile: "key" + FS + "key.json", + ServicerURL: sdk.DefaultRemoteCLIURL, + ServicerRPCTimeout: sdk.DefaultRPCTimeout, + ServicerAuthTokenFile: "auth" + FS + "servicer.json", + ServicerRetryMaxTimes: 10, + ServicerRetryWaitMin: 5, + ServicerRetryWaitMax: 180, + } + + return c +} + +func InitMeshConfig(datadir string) { + log2.Println("Initializing Pocket Datadir") + // set up the codec + MakeCodec() + if datadir == "" { + home, err := os.UserHomeDir() + if err != nil { + log2.Fatal("could not get home directory for data dir creation: " + err.Error()) + } + datadir = home + FS + sdk.DefaultDDName + log2.Println("datadir = " + datadir) + } + c := defaultMeshConfig(datadir) + // read from ccnfig file + configFilepath := datadir + FS + sdk.ConfigDirName + FS + sdk.ConfigFileName + if _, err := os.Stat(configFilepath); os.IsNotExist(err) { + log2.Println("no config file found... creating the datadir @ "+c.DataDir+FS+sdk.ConfigDirName, os.ModePerm) + // ensure directory path made + err = os.MkdirAll(c.DataDir+FS+sdk.ConfigDirName, os.ModePerm) + if err != nil { + log2.Fatal(err) + } + } + var jsonFile *os.File + defer func(jsonFile *os.File) { + err := jsonFile.Close() + if err != nil { + return + } + }(jsonFile) + // if file exists open, else create and open + if _, err := os.Stat(configFilepath); err == nil { + jsonFile, err = os.OpenFile(configFilepath, os.O_RDONLY, os.ModePerm) + if err != nil { + log2.Fatalf("cannot open config json file: " + err.Error()) + } + b, err := ioutil.ReadAll(jsonFile) + if err != nil { + log2.Fatalf("cannot read config file: " + err.Error()) + } + err = json.Unmarshal(b, &c) + if err != nil { + log2.Fatalf("cannot read config file into json: " + err.Error()) + } + } else if os.IsNotExist(err) { + // if does not exist create one + jsonFile, err = os.OpenFile(configFilepath, os.O_RDWR|os.O_CREATE, os.ModePerm) + if err != nil { + log2.Fatalf("canot open/create config json file: " + err.Error()) + } + b, err := json.MarshalIndent(c, "", " ") + if err != nil { + log2.Fatalf("cannot marshal default config into json: " + err.Error()) + } + // write to the file + _, err = jsonFile.Write(b) + if err != nil { + log2.Fatalf("cannot write default config to json file: " + err.Error()) + } + } + + GlobalMeshConfig = c +} diff --git a/app/query.go b/app/query.go index 3e8ee78f3..fe11d478c 100644 --- a/app/query.go +++ b/app/query.go @@ -26,6 +26,37 @@ const ( txHeightQuery = "tx.height=%d" ) +type HealthResponse struct { + Version string `json:"version"` + IsStarting bool `json:"is_starting"` + IsCatchingUp bool `json:"is_catching_up"` + Height int64 `json:"height"` +} + +func (app PocketCoreApp) QueryHealth(version string) (res HealthResponse) { + res = HealthResponse{ + Version: version, + IsStarting: true, + IsCatchingUp: false, + Height: 0, + } + res.Height = app.LastBlockHeight() + _, err := app.NewContext(res.Height) + + if err != nil { + return + } + + status, sErr := app.pocketKeeper.TmNode.ConsensusReactorStatus() + if sErr != nil { + return + } + + res.IsStarting = false + res.IsCatchingUp = status.IsCatchingUp + return +} + // zero for height = latest func (app PocketCoreApp) QueryBlock(height *int64) (blockJSON []byte, err error) { tmClient := app.GetClient() @@ -575,7 +606,7 @@ func (app PocketCoreApp) HandleDispatch(header pocketTypes.SessionHeader) (res * return app.pocketKeeper.HandleDispatch(ctx, header) } -func (app PocketCoreApp) HandleRelay(r pocketTypes.Relay) (res *pocketTypes.RelayResponse, dispatch *pocketTypes.DispatchResponse, err error) { +func (app PocketCoreApp) HandleRelay(r pocketTypes.Relay, isMesh bool) (res *pocketTypes.RelayResponse, dispatch *pocketTypes.DispatchResponse, err error) { ctx, err := app.NewContext(app.LastBlockHeight()) if err != nil { @@ -591,7 +622,7 @@ func (app PocketCoreApp) HandleRelay(r pocketTypes.Relay) (res *pocketTypes.Rela return nil, nil, fmt.Errorf("pocket node is currently syncing to the blockchain, cannot service in this state") } - res, err = app.pocketKeeper.HandleRelay(ctx, r) + res, err = app.pocketKeeper.HandleRelay(ctx, r, isMesh) var err1 error if err != nil && pocketTypes.ErrorWarrantsDispatch(err) { dispatch, err1 = app.HandleDispatch(r.Proof.SessionHeader()) diff --git a/app/query_test.go b/app/query_test.go index 2a20c1986..8eaf37cb4 100644 --- a/app/query_test.go +++ b/app/query_test.go @@ -720,9 +720,13 @@ func TestQueryRelay(t *testing.T) { name string memoryNodeFn func(t *testing.T, genesisState []byte) (tendermint *node.Node, keybase keys.Keybase, cleanup func()) *upgrades + isMesh bool }{ - {name: "query relay amino", memoryNodeFn: NewInMemoryTendermintNodeAmino, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}}, - {name: "query relay proto", memoryNodeFn: NewInMemoryTendermintNodeProto, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}}, + {name: "query relay amino", memoryNodeFn: NewInMemoryTendermintNodeAmino, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}, isMesh: false}, + {name: "query relay proto", memoryNodeFn: NewInMemoryTendermintNodeProto, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}, isMesh: false}, + // mesh_node=true + {name: "query relay amino", memoryNodeFn: NewInMemoryTendermintNodeAmino, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}, isMesh: true}, + {name: "query relay proto", memoryNodeFn: NewInMemoryTendermintNodeProto, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}, isMesh: true}, } for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { @@ -780,17 +784,29 @@ func TestQueryRelay(t *testing.T) { relay.Proof.Signature = hex.EncodeToString(sig) _, _, evtChan := subscribeTo(t, tmTypes.EventNewBlock) <-evtChan // Wait for block - res, _, err := PCA.HandleRelay(relay) + res, _, err := PCA.HandleRelay(relay, tc.isMesh) assert.Nil(t, err, err) - assert.Equal(t, expectedResponse, res.Response) - gock.New(sdk.PlaceholderURL). - Post(""). - BodyString(expectedRequest). - Reply(200). - BodyString(expectedResponse) + if tc.isMesh { + assert.Nil(t, res) // mesh does not need a "payload" response, just the 200 code to understand it works. + gock.New(sdk.PlaceholderURL). + Post(""). + BodyString(expectedRequest). + // tbd: check if there is a better way to validate that executeHttp was not called. + Reply(500). + BodyString(expectedResponse) + } else { + assert.Equal(t, expectedResponse, res.Response) + gock.New(sdk.PlaceholderURL). + Post(""). + BodyString(expectedRequest). + Reply(200). + BodyString(expectedResponse) + } + _, stopCli, evtChan := subscribeTo(t, tmTypes.EventNewBlock) select { case <-evtChan: + assert.Equal(t, uint64(1), types.GlobalEvidenceWorker.SuccessfulTasks()) inv, err := types.GetEvidence(types.SessionHeader{ ApplicationPubKey: aat.ApplicationPublicKey, Chain: relay.Proof.Blockchain, @@ -808,7 +824,7 @@ func TestQueryRelay(t *testing.T) { } } -func TestQueryRelayMultipleNodes(t *testing.T) { +func TestQueryMeshRelayMultipleNodes(t *testing.T) { const headerKey = "foo" const headerVal = "bar" @@ -818,9 +834,13 @@ func TestQueryRelayMultipleNodes(t *testing.T) { name string memoryNodeFn func(t *testing.T, genesisState []byte, validators []crypto.PrivateKey) (tendermint *node.Node, keybase keys.Keybase, cleanup func()) *upgrades + isMesh bool }{ - {name: "query relay multiple validators amino", memoryNodeFn: NewInMemoryTendermintNodeAminoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}}, - {name: "query relay multiple validators proto", memoryNodeFn: NewInMemoryTendermintNodeProtoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}}, + {name: "query relay multiple validators amino", memoryNodeFn: NewInMemoryTendermintNodeAminoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}, isMesh: false}, + {name: "query relay multiple validators proto", memoryNodeFn: NewInMemoryTendermintNodeProtoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}, isMesh: false}, + // mesh_node=true + {name: "query relay multiple validators amino", memoryNodeFn: NewInMemoryTendermintNodeAminoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{false, 7000}}, isMesh: true}, + {name: "query relay multiple validators proto", memoryNodeFn: NewInMemoryTendermintNodeProtoWithValidators, upgrades: &upgrades{codecUpgrade: codecUpgrade{true, 2}}, isMesh: true}, } for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { @@ -837,7 +857,7 @@ func TestQueryRelayMultipleNodes(t *testing.T) { Post(""). BodyString(expectedRequest). MatchHeader(headerKey, headerVal). - Reply(200). + Reply(500). BodyString(expectedResponse) _, _, cleanup := tc.memoryNodeFn(t, genBz, validators) // setup AAT @@ -858,6 +878,9 @@ func TestQueryRelayMultipleNodes(t *testing.T) { } _, stopCli, evtChan := subscribeTo(t, tmTypes.EventNewBlock) <-evtChan // Wait for block + + chain := sdk.PlaceholderHash + sessionBlockHeight := int64(1) // setup relay for _, v := range validators { relay := types.Relay{ @@ -865,9 +888,9 @@ func TestQueryRelayMultipleNodes(t *testing.T) { Meta: types.RelayMeta{BlockHeight: 5}, // todo race condition here Proof: types.RelayProof{ Entropy: 32598345349034509, - SessionBlockHeight: 1, + SessionBlockHeight: sessionBlockHeight, ServicerPubKey: v.PublicKey().RawString(), - Blockchain: sdk.PlaceholderHash, + Blockchain: chain, Token: aat, Signature: "", }, @@ -878,31 +901,51 @@ func TestQueryRelayMultipleNodes(t *testing.T) { panic(err) } relay.Proof.Signature = hex.EncodeToString(sig) - res, _, err := PCA.HandleRelay(relay) + res, _, err := PCA.HandleRelay(relay, tc.isMesh) assert.Nil(t, err, err) - assert.Equal(t, expectedResponse, res.Response) - gock.New(sdk.PlaceholderURL). - Post(""). - BodyString(expectedRequest). - Reply(200). - BodyString(expectedResponse) + if tc.isMesh { + assert.Nil(t, res) // mesh does not need a "payload" response, just the 200 code to understand it works. + gock.New(sdk.PlaceholderURL). + Post(""). + BodyString(expectedRequest). + // tbd: check if there is a better way to validate that executeHttp was not called. + Reply(500). + BodyString(expectedResponse) + } else { + assert.Equal(t, expectedResponse, res.Response) + gock.New(sdk.PlaceholderURL). + Post(""). + BodyString(expectedRequest). + Reply(200). + BodyString(expectedResponse) + } + } - validatorAddress := sdk.GetAddress(v.PublicKey()) - node, nodeErr := types.GetPocketNodeByAddress(&validatorAddress) + select { + case <-evtChan: + // verify that each store task was successful + assert.Equal(t, uint64(len(validators)), types.GlobalEvidenceWorker.SuccessfulTasks()) + // check the evidence store of each node. + for _, v := range validators { + validatorAddress := sdk.GetAddress(v.PublicKey()) + _node, nodeErr := types.GetPocketNodeByAddress(&validatorAddress) + + assert.Nil(t, nodeErr) + inv, err := types.GetEvidence(types.SessionHeader{ + ApplicationPubKey: aat.ApplicationPublicKey, + Chain: chain, + SessionBlockHeight: sessionBlockHeight, + }, types.RelayEvidence, sdk.NewInt(10000), _node.EvidenceStore) + assert.Nil(t, err) + assert.NotNil(t, inv) + assert.Equal(t, int64(1), inv.NumOfProofs) + } - assert.Nil(t, nodeErr) - inv, err := types.GetEvidence(types.SessionHeader{ - ApplicationPubKey: aat.ApplicationPublicKey, - Chain: relay.Proof.Blockchain, - SessionBlockHeight: relay.Proof.SessionBlockHeight, - }, types.RelayEvidence, sdk.NewInt(10000), node.EvidenceStore) - assert.Nil(t, err) - assert.NotNil(t, inv) - assert.Equal(t, inv.NumOfProofs, int64(1)) + cleanup() + stopCli() + gock.Off() } - cleanup() - stopCli() - gock.Off() + return }) } diff --git a/doc/SUMMARY.md b/doc/SUMMARY.md index 3281d76c8..170574bb3 100644 --- a/doc/SUMMARY.md +++ b/doc/SUMMARY.md @@ -23,6 +23,7 @@ * [Portable Private Key](specs/portable-private-key-spec.md) * [Application Authentication Token](specs/application-auth-token.md) * [Metrics](specs/metrics.md) +* [Mesh](specs/mesh.md) ## Releases diff --git a/doc/specs/cli/default.md b/doc/specs/cli/default.md index 1241f8793..76d9cfe08 100644 --- a/doc/specs/cli/default.md +++ b/doc/specs/cli/default.md @@ -57,6 +57,18 @@ Reset the Pocket node. Deletes the following files/folders: * priv\_val\_state * node\_keys +## Start Mesh Node + +```text +pocket start-mesh [--datadir] [--simulateRelay=(true | false)] +``` + +Starts the Mesh Pocket Node, picks up the config from the assigned ``. + +Options: + +* `--simulateRelay`: Would you like to be able to test your relays. + ## Show CLI Help ```text diff --git a/doc/specs/mesh.md b/doc/specs/mesh.md new file mode 100644 index 000000000..348dea30c --- /dev/null +++ b/doc/specs/mesh.md @@ -0,0 +1,150 @@ +### Summary + +This client allows all node-runners to take advantage of relay traffic in locations around the world without having a full Pocket node at these locations. + +### Nomenclature + +* Servicer Node: Current implementation of the Pocket Node (with all the features, even Lean Node) +* Mesh Node: Lightweight Pocket Node Proxy + +### What it does? + +This allows to receive relays in name of a **Servicer** in a different geolocation, serve it with the minimum validation and later notify the **Servicer** node. +At the end of the session process the **Servicer** node will post a single claim transaction for all the relays. + +To achieve this you need to deploy your Servicer Node and your Mesh Node behind a proxy like you are currently doing to set up your SSL. +Also, you need to set both of them behind a Global DNS provider. The Global DNS will provide the IP address of the closest **Servicer** OR **Mesh** node, based on the request location. + +### Features + +* Relay Approach: First Free + * this mean that mesh node will serve first relay for free and check the servicer notify response to understand it should keep servicing or not. +* Proxy any request to servicer +* Monitor Servicer health using /v1/health and in memory cron jobs +* Keep sessions in local cache +* Keep relays in local cache until they are notified + * this ensures that even if the mesh node is restarted and the relay was not yet notified, they will be after node startup again +* Auto clean up old serve session from cache +* Servicer relays notification has a retry mechanism just in case the Servicer node is not responsive for a while. + * this will only retry in some scenarios. +* Implements a worker queue for the notification to keep the process simple and secure event under crash circumstances. +* Handle minimum mesh node side validations using response get from Health monitor about Height, Starting and Catching Up (same of pocket node) +* Handle minimum relay validations about payload format (same of pocket node) + +### Included Branches: + +* [Lean Node](https://github.com/pokt-network/pocket-core/tree/ethereal-wombat) +* [Fix #1457 & Memory enhance](https://github.com/pokt-scan/pocket-core/tree/fix-1457) - RELEASE SOON +* [Feature #1456](https://github.com/pokt-scan/pocket-core/tree/fix-1456) - RELEASE SOON + +### Hardware Requirements +(we are expecting your feedback on this!) +* CPU: 1 vcpu or less +* Memory: 200mb or less + +### Software Requirements +* Reverse Proxy (SSL) +* Global DNS + +### How to use it? + +#### Pre-requisites: + +This guide assume you already have a Servicer properly setup and running. If not, please refer to our docs to understand [how](cli/default.md) + +1. Global DNS that handle your domain and forward to proper region node (servicer or mesh) +2. Chains on each region you want to deploy (servicer or mesh) +3. Servicer in one region +4. Mesh in the other N regions + +#### Prepare Servicer: + +1. (optional) Create auth.json if it does not exist on your pocket node. +```json +{ + "Value": "", + "Issued": "2022-09-29T00:00:00.000000000-00:00" +} +``` +2. Update your `config.json` + 1. add `mesh_node` option as `true` into the section `pocket_config` + 2. change `generate_token_on_start` option to `false` into the section `pocket_config` +3. If your proxy has all the endpoints closed except `/v1` and `/v1/client`, please add: + 1. `/v1/private/mesh/relay` - allow mesh node to notify about relays done + 2. `/v1/health` - return node status: version, height, starting, catching_up +4. Start your node as you were doing. + +#### Setup Mesh Node: + +1. Set up your proxy in the same way for a Servicer +2. Create the following `config.json` file inside the `--datadir` directory +```json +{ + "data_dir": "/home/app/.pocket/mesh", + "rpc_port": "8081", // mesh node listening port + "chains_name": "chains/chains.json", // chains for mesh node. This should be a filename path relative to --datadir + "rpc_timeout": 30000, // chains rpc timeout + "log_level": "*:info", // log level, you can try with *:error or even *:debug (this print a lot) + "user_agent": "mesh-node", // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent + "auth_token_file": "key/auth.json", // authtoken for mesh private endpoints. This should be a filename path relative to --datadir + "pocket_prometheus_port": "8083", + "prometheus_max_open_files": 3, + "relay_cache_file": "data/relays.pkt", + "session_cache_file": "data/session.pkt", + // Worker options match with: https://github.com/alitto/pond#resizing-strategies + // These are used for the relay report queue + "worker_strategy": "balanced", // Kind of worker strategy, could be: balanced | eager | lazy + "max_workers": 20, + "max_workers_capacity": 100, + "workers_idle_timeout": 1000, + "servicer_private_key_file": "key/key.json", // servicer private key to sign proof message on relay response. This should be a filename path relative to --datadir + "servicer_url": "http://localhost:8081", // servicer url/ip where mesh node can reach the servicer node to check health, proxy requests and notify relays + "servicer_rpc_timeout": 30000, // servicer rpc timeout + "servicer_auth_token_file": "key/auth.json", // authtoken used to call servicer. This should be a filename path relative to --datadir + // Servicer relay notification has a retry mechanism, refer to: https://github.com/hashicorp/go-retryablehttp + "servicer_retry_max_times": 10, + "servicer_retry_wait_min": 10, + "servicer_retry_wait_max": 180000 +} +``` +3. Create Servicer private key file with following format into the path you set on `config.json`: +```json +{ + "priv_key": "" +} +``` +4. Create auth.json files into the path you set on `config.json` for `auth_token_file` and `servicer_auth_token_file`: +```json +{ + "Value": "", + "Issued": "2022-09-29T00:00:00.000000000-00:00" +} +``` +5. Create chains.json files into the path you set on `config.json` + * IMPORTANT: this need to handle all the chains that servicer support. + * NOTE: If you want to support a subset of chains in a region, you will need set the chains here too but point them to the closest chain you have. +6. Start your mesh node: `pocket start-mesh --datadir ` + +### How to Test? + +You can test the Mesh node as any other kind of node. The Mesh node support the --simulateRelay parameter as Servicer does, so you can use it. + +Also, you can use [LocalNet Repository](https://github.com/pokt-scan/pocket-localnet) to deploy a local network and test all this together locally. + +### TODO/Enhancements: +* Validate chains with servicer /v1/private/chains endpoint +* Support "Always Bill" approach + * Allow mesh node to have a Remote CLI url (this should be a Pocket Node, close to mesh, not need to be stake) that will be used + by the mesh node to run any kind of validations about relays before service them, grab session/response in cache to reduce next call response times, and finally resolve the request. + * On this we may need a bit more of assistance from Pocket Core team to run the best possible validations for each relay using a cache from mesh side. +* Lean Mesh node: support multiple address under the same Mesh Node process. +* Community feedback, issues, etc. + +### Resources: + +* Dockerhub Image: +* New external libraries: + * Worker Pool: [pond](https://github.com/alitto/pond) + * INotify: [inotify](https://github.com/fsnotify/fsnotify) + * Http Retry: [httpretryable](https://github.com/hashicorp/go-retryablehttp) + * Fastest Key/Value Cache: [pogreb](https://github.com/akrylysov/pogreb) diff --git a/doc/specs/rpc-spec.yaml b/doc/specs/rpc-spec.yaml index 286dae637..c1855c7a3 100644 --- a/doc/specs/rpc-spec.yaml +++ b/doc/specs/rpc-spec.yaml @@ -8,7 +8,7 @@ info: license: name: MIT License url: 'https://github.com/pokt-network/pocket-core/LICENSE.md' - version: 0.6.0 + version: BETA-0.9.2 externalDocs: description: Find out more about Pocket Network url: 'https://pokt.network' @@ -17,10 +17,16 @@ servers: tags: - name: version description: Version of the Pocket API + - name: health + description: Health of the Pocket Node - name: client description: Dispatch and relay services - name: query description: Blockchain queries + - name: private + description: Private Node that help node runner to manage it remotely. Require Authentication. + - name: mesh + description: Mesh Node endpoints, mostly private that help node runner to manage it remotely. Require Authentication. paths: /: get: @@ -35,6 +41,19 @@ paths: schema: type: string example: 0.0.1 + /health: + get: + tags: + - health + summary: Get current node version, height, starting and running state + responses: + '200': + description: Health status of the node + content: + application/json: + schema: + $ref: '#/components/schemas/Health' + /client/dispatch: post: tags: @@ -1457,6 +1476,172 @@ paths: message: type: string description: The error msg. + /private/mesh/relay: + post: + tags: + - private + parameters: + - in: query + name: authtoken + schema: + type: string + description: Current Authorization Token from pocket core. + responses: + '200': + description: Return result of mesh relay operation + content: + application/json: + schema: + $ref: '#/components/schemas/MeshRelay' + '401': + description: Wrong Auth token + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: The error code. + message: + type: string + description: The error msg. + /private/mesh/stop: + post: + tags: + - private + - mesh + parameters: + - in: query + name: authtoken + schema: + type: string + description: Current Authorization Token from pocket core. + responses: + '200': + description: Successful Stop + content: + text/plain: + schema: + type: string + example: "" + '401': + description: Wrong Auth Token + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: The error code. + message: + type: string + description: The error msg. + /private/mesh/chains: + post: + tags: + - private + - mesh + parameters: + - in: query + name: authtoken + schema: + type: string + description: Current Authorization Token from pocket core. + responses: + '200': + description: Return the Current Hosted Chains map + content: + application/json: + schema: + type: object + additionalProperties: true + + '401': + description: Wrong Auth token + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: The error code. + message: + type: string + description: The error msg. + /private/mesh/updatechains: + post: + tags: + - private + - mesh + parameters: + - in: query + name: authtoken + schema: + type: string + description: Current Authorization Token from pocket core. + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Chain' + required: true + responses: + '200': + description: Return the Current Hosted Chains map + content: + application/json: + schema: + type: object + additionalProperties: true + '401': + description: Wrong Auth token + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: The error code. + message: + type: string + description: The error msg. + /private/mesh/servicer: + post: + tags: + - private + - mesh + parameters: + - in: query + name: authtoken + schema: + type: string + description: Current Authorization Token from pocket core. + responses: + '200': + description: Return the json array of pocket core client's current set validators' addresses + content: + application/json: + schema: + $ref: '#/components/schemas/LocalNode' + '401': + description: Wrong Auth token + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: The error code. + message: + type: string + description: The error msg. components: schemas: LocalNode: @@ -1464,6 +1649,17 @@ components: properties: address: type: string + Health: + type: object + properties: + version: + type: string + height: + type: integer + is_starting: + type: boolean + is_catching_up: + type: boolean Chain: type: object properties: @@ -1970,6 +2166,16 @@ components: $ref: '#/components/schemas/SessionHeader' merkle_root: $ref: '#/components/schemas/HashSum' + MeshRelay: + type: object + properties: + success: + type: boolean + error: + type: string + description: Amino JSON Error String + dispatch: + $ref: '#/components/schemas/QueryDispatchResponse' SigningInfo: type: object @@ -2541,7 +2747,7 @@ components: type: integer prove: type: boolean - order: + order:MeshRelay type: string required: - height diff --git a/go.mod b/go.mod index 892c2b5d2..4ffccf516 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,22 @@ module github.com/pokt-network/pocket-core -go 1.17 +go 1.18 require ( + github.com/akrylysov/pogreb v0.10.1 + github.com/alitto/pond v1.8.1 + github.com/fsnotify/fsnotify v1.4.9 github.com/go-kit/kit v0.12.0 github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 + github.com/hashicorp/go-retryablehttp v0.7.1 github.com/hashicorp/golang-lru v0.5.4 github.com/jordanorelli/lexnum v0.0.0-20141216151731-460eeb125754 github.com/julienschmidt/httprouter v1.3.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.11.0 github.com/regen-network/cosmos-proto v0.3.0 + github.com/robfig/cron/v3 v3.0.1 github.com/spf13/cobra v1.4.0 github.com/stretchr/testify v1.7.0 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 @@ -42,6 +47,7 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index 91a3f6a6a..30fed99d5 100644 --- a/go.sum +++ b/go.sum @@ -35,65 +35,36 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/akrylysov/pogreb v0.10.1 h1:FqlR8VR7uCbJdfUob916tPM+idpKgeESDXOA1K0DK4w= +github.com/akrylysov/pogreb v0.10.1/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YTWyqJZ7+lI= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alitto/pond v1.8.1 h1:GzrU4ZERX0JDNMmAY2k5y1Wqgmul77nt3bsDgvwVgO4= +github.com/alitto/pond v1.8.1/go.mod h1:CmvIIGd5jKLasGI3D87qDkQxjzChdKMmnXMg3fG6M6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -101,51 +72,22 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= @@ -154,17 +96,8 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojt github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fiagdao/tendermint v0.32.11-0.20220824195748-2087fcc480c1 h1:L1dbcsGeC1syYCTrhpsQ/GJrysPhZczZf9BF/vVJyPg= -github.com/fiagdao/tendermint v0.32.11-0.20220824195748-2087fcc480c1/go.mod h1:9Q8P/AXsxZ2BxD4irxhueg4HxHKSVK2r9jTUDpqDWjI= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -174,7 +107,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -185,27 +117,16 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -231,9 +152,7 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -246,7 +165,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= @@ -264,23 +182,11 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= @@ -289,152 +195,65 @@ github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uM github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= +github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= +github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jordanorelli/lexnum v0.0.0-20141216151731-460eeb125754 h1:ovgRFhVUYZWz6KnWPrnV7HBxrK0ErOeyXtlVvh0Rr5k= github.com/jordanorelli/lexnum v0.0.0-20141216151731-460eeb125754/go.mod h1:f1WdQhB98V35bULPsZUMFP9U1XWhpaHrO6myMijgMhU= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= -github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= @@ -442,10 +261,6 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -457,122 +272,58 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pokt-network/tendermint v0.32.11-0.20220824215059-3214a152d8d4 h1:xH58BhZBHCCxslhvxvzX5t5lu0IAlxsSMtr3xEyiTj4= github.com/pokt-network/tendermint v0.32.11-0.20220824215059-3214a152d8d4/go.mod h1:K0FjOLKFgqlDB/fy/2cx3BoMgFg6JD2FP3EK/9M3Tlk= github.com/pokt-network/tm-db v0.5.2-0.20220118210553-9b2300f289ba h1:u2yqCF5l3Kaz8fra6A023nx9Bsfj+KCm2t5xEO4weOo= github.com/pokt-network/tm-db v0.5.2-0.20220118210553-9b2300f289ba/go.mod h1:7TGWH92hEbEFVzNJxGi8Ka0O+OohcLLjZCxco/xMrWY= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.0 h1:24dVpPrPi0GDoPVLesf2Ug98iK5QgVscPl0ga4Eoub0= github.com/regen-network/cosmos-proto v0.3.0/go.mod h1:zuP2jVPHab6+IIyOx3nXHFN+euFNeS3W8XQkcdd4s7A= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -580,10 +331,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -591,76 +340,34 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bloom v2.0.3+incompatible h1:QDacWdqcAUI1MPOwIQZRy9kOR7yxfyEmxX8Wdm2/JPA= github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 h1:3erb+vDS8lU1sxfDHF4/hhWyaXnhIaO+7RgL4fDZORA= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -670,7 +377,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -696,25 +402,18 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -732,12 +431,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf h1:R150MpwJIv1MpS0N/pc+NhTM8ajzvlmxlY5OYsrevXQ= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -757,17 +453,12 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -776,23 +467,15 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -812,14 +495,10 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= @@ -833,24 +512,16 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -858,11 +529,8 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -870,7 +538,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -892,18 +559,12 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -921,7 +582,6 @@ google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -933,7 +593,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -959,31 +618,22 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 h1:ysnBoUyeL/H6RCvNRhWHjKoDEmguI+mPU+qHgK8qv/w= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1006,32 +656,23 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1040,9 +681,5 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/types/config.go b/types/config.go index 885830200..01df8a5c0 100644 --- a/types/config.go +++ b/types/config.go @@ -48,6 +48,7 @@ type PocketConfig struct { GenerateTokenOnStart bool `json:"generate_token_on_start"` LeanPocket bool `json:"lean_pocket"` LeanPocketUserKeyFileName string `json:"lean_pocket_user_key_file"` + MeshNode bool `json:"mesh_node"` } func (c PocketConfig) GetLeanPocketUserKeyFilePath() string { @@ -111,6 +112,7 @@ const ( DefaultGenerateTokenOnStart = true DefaultLeanPocket = false DefaultLeanPocketUserKeyFileName = "lean_nodes_keys.json" + DefaultMeshNode = false ) func DefaultConfig(dataDir string) Config { @@ -146,6 +148,7 @@ func DefaultConfig(dataDir string) Config { GenerateTokenOnStart: DefaultGenerateTokenOnStart, LeanPocket: DefaultLeanPocket, LeanPocketUserKeyFileName: DefaultLeanPocketUserKeyFileName, + MeshNode: DefaultMeshNode, }, } c.TendermintConfig.LevelDBOptions = config.DefaultLevelDBOpts() diff --git a/x/pocketcore/keeper/querier.go b/x/pocketcore/keeper/querier.go index 3e315f766..c5825ca6e 100644 --- a/x/pocketcore/keeper/querier.go +++ b/x/pocketcore/keeper/querier.go @@ -65,7 +65,7 @@ func queryRelay(ctx sdk.Ctx, req abci.RequestQuery, k Keeper) ([]byte, sdk.Error return nil, sdk.ErrInternal(fmt.Sprintf("failed to parse params: %s", err)) } // handle the relay from the params - response, er := k.HandleRelay(ctx, params.Relay) + response, er := k.HandleRelay(ctx, params.Relay, false) if er != nil { return nil, er } diff --git a/x/pocketcore/keeper/service.go b/x/pocketcore/keeper/service.go index f2d437df8..4f65ce00f 100644 --- a/x/pocketcore/keeper/service.go +++ b/x/pocketcore/keeper/service.go @@ -10,7 +10,7 @@ import ( ) // HandleRelay handles an api (read/write) request to a non-native (external) blockchain -func (k Keeper) HandleRelay(ctx sdk.Ctx, relay pc.Relay) (*pc.RelayResponse, sdk.Error) { +func (k Keeper) HandleRelay(ctx sdk.Ctx, relay pc.Relay, isMesh bool) (*pc.RelayResponse, sdk.Error) { relayTimeStart := time.Now() // get the latest session block height because this relay will correspond with the latest session sessionBlockHeight := k.GetLatestSessionBlockHeight(ctx) @@ -61,30 +61,43 @@ func (k Keeper) HandleRelay(ctx sdk.Ctx, relay pc.Relay) (*pc.RelayResponse, sdk } return nil, err } + // move this to a worker that will insert this proof in a serie style to avoid memory consumption and relay proof race conditions + // https://github.com/pokt-network/pocket-core/issues/1457 + pc.GlobalEvidenceWorker.Submit(func() { + // store the proof before execution, because the proof corresponds to the previous relay + relay.Proof.Store(maxPossibleRelays, node.EvidenceStore) + }) + // store the proof before execution, because the proof corresponds to the previous relay - relay.Proof.Store(maxPossibleRelays, node.EvidenceStore) - // attempt to execute - respPayload, err := relay.Execute(hostedBlockchains, &nodeAddress) - if err != nil { - ctx.Logger().Error(fmt.Sprintf("could not send relay with error: %s", err.Error())) - return nil, err - } - // generate response object - resp := &pc.RelayResponse{ - Response: respPayload, - Proof: relay.Proof, - } - // sign the response - sig, er := node.PrivateKey.Sign(resp.Hash()) - if er != nil { - ctx.Logger().Error( - fmt.Sprintf("could not sign response for address: %s with hash: %v, with error: %s", - nodeAddress.String(), resp.HashString(), er.Error()), - ) - return nil, pc.NewKeybaseError(pc.ModuleName, er) + //relay.Proof.Store(maxPossibleRelays, node.EvidenceStore) + + var resp *pc.RelayResponse + + if !isMesh { + // attempt to execute + respPayload, err := relay.Execute(hostedBlockchains, &nodeAddress) + if err != nil { + ctx.Logger().Error(fmt.Sprintf("could not send relay with error: %s", err.Error())) + return nil, err + } + // generate response object + resp = &pc.RelayResponse{ + Response: respPayload, + Proof: relay.Proof, + } + // sign the response + sig, er := node.PrivateKey.Sign(resp.Hash()) + if er != nil { + ctx.Logger().Error( + fmt.Sprintf("could not sign response for address: %s with hash: %v, with error: %s", + nodeAddress.String(), resp.HashString(), er.Error()), + ) + return nil, pc.NewKeybaseError(pc.ModuleName, er) + } + // attach the signature in hex to the response + resp.Signature = hex.EncodeToString(sig) } - // attach the signature in hex to the response - resp.Signature = hex.EncodeToString(sig) + // track the relay time relayTime := time.Since(relayTimeStart) // add to metrics diff --git a/x/pocketcore/keeper/service_test.go b/x/pocketcore/keeper/service_test.go index 4b24bd51d..c0d8488f4 100644 --- a/x/pocketcore/keeper/service_test.go +++ b/x/pocketcore/keeper/service_test.go @@ -82,7 +82,7 @@ func TestKeeper_HandleRelay(t *testing.T) { mockCtx.On("PrevCtx", keeper.GetLatestSessionBlockHeight(mockCtx)).Return(ctx, nil) mockCtx.On("Logger").Return(ctx.Logger()) - resp, err := keeper.HandleRelay(mockCtx, validRelay) + resp, err := keeper.HandleRelay(mockCtx, validRelay, false) assert.Nil(t, err, err) assert.NotNil(t, resp) assert.NotEmpty(t, resp) diff --git a/x/pocketcore/types/config.go b/x/pocketcore/types/config.go index 782400a45..115e789bb 100644 --- a/x/pocketcore/types/config.go +++ b/x/pocketcore/types/config.go @@ -3,6 +3,7 @@ package types import ( "encoding/hex" "fmt" + "github.com/alitto/pond" "github.com/pokt-network/pocket-core/crypto" "github.com/pokt-network/pocket-core/types" "github.com/tendermint/tendermint/config" @@ -20,6 +21,7 @@ var ( globalRPCTimeout time.Duration GlobalPocketConfig types.PocketConfig GlobalTenderMintConfig config.Config + GlobalEvidenceWorker *pond.WorkerPool ) func InitConfig(chains *HostedBlockchains, logger log.Logger, c types.Config) { @@ -27,6 +29,7 @@ func InitConfig(chains *HostedBlockchains, logger log.Logger, c types.Config) { InitGlobalServiceMetric(chains, logger, c.PocketConfig.PrometheusAddr, c.PocketConfig.PrometheusMaxOpenfiles) }) InitPocketNodeCaches(c, logger) + InitEvidenceWorker(c, logger) GlobalPocketConfig = c.PocketConfig GlobalTenderMintConfig = c.TendermintConfig if GlobalPocketConfig.LeanPocket { @@ -37,6 +40,18 @@ func InitConfig(chains *HostedBlockchains, logger log.Logger, c types.Config) { SetRPCTimeout(c.PocketConfig.RPCTimeout) } +func InitEvidenceWorker(c types.Config, logger log.Logger) { + panicHandler := func(p interface{}) { + logger.Error(fmt.Sprintf("evidence storage task panicked: %v", p)) + } + GlobalEvidenceWorker = pond.New( + 1, 0, + pond.IdleTimeout(100), + pond.PanicHandler(panicHandler), + pond.Strategy(pond.Balanced()), + ) +} + func ConvertEvidenceToProto(config types.Config) error { // we have to add a random pocket node so that way lean pokt can still support getting the global evidence cache node := AddPocketNode(crypto.GenerateEd25519PrivKey().GenPrivateKey(), log.NewNopLogger()) @@ -67,6 +82,13 @@ func ConvertEvidenceToProto(config types.Config) error { return nil } +func StopEvidenceWorker() { + if !GlobalEvidenceWorker.Stopped() { + GlobalEvidenceWorker.StopAndWait() + } + GlobalEvidenceWorker = nil +} + func FlushSessionCache() { for _, k := range GlobalPocketNodes { if k.SessionStore != nil { diff --git a/x/pocketcore/types/service.go b/x/pocketcore/types/service.go index c37b6232e..145ff3ad6 100644 --- a/x/pocketcore/types/service.go +++ b/x/pocketcore/types/service.go @@ -17,6 +17,10 @@ import ( const DEFAULTHTTPMETHOD = "POST" +var ( + chainHttpClient *http.Client +) + // "Relay" - A read / write API request from a hosted (non native) external blockchain type Relay struct { Payload Payload `json:"payload"` // the data payload of the request @@ -24,6 +28,31 @@ type Relay struct { Proof RelayProof `json:"proof"` // the authentication scheme needed for work } +func getClient() *http.Client { + if chainHttpClient == nil { + var chainsTransport *http.Transport + t, ok := http.DefaultTransport.(*http.Transport) + if ok { + chainsTransport = t.Clone() + // this params may could be handled by config.json, but how much people know about this? + // tbd: figure out the right values to this, rn the priority is stop recreating new http client and connections. + chainsTransport.MaxIdleConns = 1000 + chainsTransport.MaxConnsPerHost = 1000 + chainsTransport.MaxIdleConnsPerHost = 1000 + } // if not ok, probably is because is *gock.Transport - test only + + chainHttpClient = &http.Client{ + Timeout: globalRPCTimeout * time.Second, + } + + if chainsTransport != nil { + chainHttpClient.Transport = chainsTransport + } + } + + return chainHttpClient +} + // "Validate" - Checks the validity of a relay request using store data func (r *Relay) Validate(ctx sdk.Ctx, posKeeper PosKeeper, appsKeeper AppsKeeper, pocketKeeper PocketKeeper, hb *HostedBlockchains, sessionBlockHeight int64, node *PocketNode) (maxPossibleRelays sdk.BigInt, err sdk.Error) { // validate payload @@ -316,7 +345,7 @@ func executeHTTPRequest(payload, url, userAgent string, basicAuth BasicAuth, met } } // execute the request - resp, err := (&http.Client{Timeout: globalRPCTimeout * time.Millisecond}).Do(req) + resp, err := getClient().Do(req) if err != nil { return "", err }