From a6b77f9dfe410b2dc8c04a9101dd0fe06a8b1b58 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 21 Mar 2022 21:33:31 -0400 Subject: [PATCH 01/16] Initial confirmation manager code Signed-off-by: Peter Broadhurst --- internal/contractgateway/smartcontractgw.go | 2 +- internal/events/block_confirmations.go | 468 ++++++++++++++++++++ internal/events/eventstream_test.go | 6 +- internal/events/logprocessor.go | 64 ++- internal/events/submanager.go | 27 +- internal/events/submanager_test.go | 7 +- internal/events/subscription.go | 4 +- internal/events/subscription_test.go | 6 +- 8 files changed, 550 insertions(+), 34 deletions(-) create mode 100644 internal/events/block_confirmations.go diff --git a/internal/contractgateway/smartcontractgw.go b/internal/contractgateway/smartcontractgw.go index 769267a3..1ce7a63f 100644 --- a/internal/contractgateway/smartcontractgw.go +++ b/internal/contractgateway/smartcontractgw.go @@ -164,7 +164,7 @@ func NewSmartContractGateway(conf *SmartContractGatewayConf, txnConf *tx.TxnProc } syncDispatcher := newSyncDispatcher(processor) if conf.EventLevelDBPath != "" { - gw.sm = events.NewSubscriptionManager(&conf.SubscriptionManagerConf, rpc, gw.cs, gw.ws) + gw.sm, _ = events.NewSubscriptionManager(&conf.SubscriptionManagerConf, rpc, gw.cs, gw.ws) err = gw.sm.Init() if err != nil { return nil, errors.Errorf(errors.RESTGatewayEventManagerInitFailed, err) diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go new file mode 100644 index 00000000..f21d9969 --- /dev/null +++ b/internal/events/block_confirmations.go @@ -0,0 +1,468 @@ +// Copyright 2019 Kaleido + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package events + +import ( + "context" + "fmt" + "sort" + "strconv" + "strings" + "time" + + lru "github.com/hashicorp/golang-lru" + "github.com/hyperledger/firefly-ethconnect/internal/errors" + "github.com/hyperledger/firefly-ethconnect/internal/eth" + ethbinding "github.com/kaleido-io/ethbinding/pkg" + log "github.com/sirupsen/logrus" +) + +// blockConfirmationManager listens to the blocks on the chain, and attributes confirmations to +// pending events. Once those events meet a threshold they are considered final and +// dispatched to the relevant listener. +type blockConfirmationManager struct { + ctx context.Context + log *log.Entry + filterID ethbinding.HexBigInt + filterStale bool + rpc eth.RPCClient + requiredConfirmations int + pollingInterval time.Duration + blockCache *lru.Cache + eventNotifications chan *eventNotification + highestBlockSeen uint64 + includeInPayload bool + pending map[string]*pendingEvent +} + +const ( + defaultConfirmations = 35 + defaultBlockCacheSize = 1000 + defaultEventQueueLength = 100 + defaultPollingInterval = 1 * time.Second +) + +type blockConfirmationConf struct { + Enabled bool `json:"enabled,omitempty"` + RequiredConfirmations *int `json:"requiredConfirmations,omitempty"` + BlockCacheSize *int `json:"blockCacheSize,omitempty"` + BlockPollingIntervalSec *int `json:"pollingIntervalSec,omitempty"` + EventQueueLength *int `json:"eventQueueLength,omitempty"` + IncludeInPayload bool `json:"includeInPayload,omitempty"` +} + +type pendingEvent struct { + key string + added time.Time + confirmations []blockConfirmation + blockNumber uint64 + event *eventData + eventStream *eventStream +} + +type blockConfirmation struct { + BlockNumber uint64 `json:"number"` + BlockHash string `json:"hash"` +} + +type pendingEvents []*pendingEvent + +func (pe pendingEvents) Len() int { return len(pe) } +func (pe pendingEvents) Swap(i, j int) { pe[i], pe[j] = pe[j], pe[i] } +func (pe pendingEvents) Less(i, j int) bool { + return pe[i].event.BlockNumber < pe[j].event.BlockNumber || + (pe[i].event.BlockNumber == pe[j].event.BlockNumber && pe[i].event.LogIndex < pe[j].event.LogIndex) +} + +type eventNotification struct { + removed bool + event *eventData + eventStream *eventStream +} + +// blockInfo is the information we cache for a block +// We omit some information that's not used and potentially large: +// - extraData +// - uncles +type blockInfo struct { + Number ethbinding.HexUint64 `json:"number"` + Hash ethbinding.Hash `json:"hash"` + ParentHash ethbinding.Hash `json:"parentHash"` + Nonce ethbinding.BlockNonce `json:"nonce"` + SHA3Uncles ethbinding.Hash `json:"sha3Uncles"` + TransactionsRoot ethbinding.Hash `json:"transactionsRoot"` + StateRoot ethbinding.Hash `json:"stateRoot"` + ReceiptsRoot ethbinding.Hash `json:"receiptsRoot"` + Miner ethbinding.Address `json:"miner"` + Difficulty ethbinding.HexBigInt `json:"difficulty"` + TotalDifficulty ethbinding.HexBigInt `json:"totalDifficulty"` + Size ethbinding.HexUint64 `json:"size"` + GasLimit ethbinding.HexUint64 `json:"gasLimit"` + GasUsed ethbinding.HexUint64 `json:"gasUsed"` + Timestamp ethbinding.HexUint64 `json:"timestamp"` + Transactions []*ethbinding.Hash `json:"transactions"` +} + +func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *blockConfirmationConf) (bcm *blockConfirmationManager, err error) { + requiredConfirmations := defaultConfirmations + if conf.RequiredConfirmations != nil { + requiredConfirmations = *conf.RequiredConfirmations + } + blockCacheSize := defaultBlockCacheSize + if conf.BlockCacheSize != nil { + blockCacheSize = *conf.BlockCacheSize + } + pollingInterval := defaultPollingInterval + if conf.BlockPollingIntervalSec != nil { + pollingInterval = time.Duration(*conf.BlockPollingIntervalSec) * time.Second + } + eventQueueLength := defaultEventQueueLength + if conf.EventQueueLength != nil { + eventQueueLength = *conf.EventQueueLength + } + + bcm = &blockConfirmationManager{ + ctx: ctx, + rpc: rpc, + log: log.WithField("job", "blockConfirmationManager"), + requiredConfirmations: requiredConfirmations, + pollingInterval: pollingInterval, + filterStale: true, + eventNotifications: make(chan *eventNotification, eventQueueLength), + pending: make(map[string]*pendingEvent), + includeInPayload: conf.IncludeInPayload, + } + if bcm.blockCache, err = lru.New(blockCacheSize); err != nil { + return nil, errors.Errorf(errors.EventStreamsCreateStreamResourceErr, err) + } + go bcm.confirmationsListener() + return bcm, nil +} + +// Notify is used to notify the confirmation manager of detection of a new logEntry addition or removal +func (bcm *blockConfirmationManager) notify(ev *eventNotification) { + bcm.eventNotifications <- ev +} + +func (bcm *blockConfirmationManager) createBlockFilter() error { + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) + defer cancel() + err := bcm.rpc.CallContext(ctx, &bcm.filterID, "eth_newBlockFilter") + if err != nil { + return errors.Errorf(errors.RPCCallReturnedError, "eth_newBlockFilter", err) + } + bcm.filterStale = false + bcm.log.Infof("Created block filter: %s", bcm.filterID.String()) + return err +} + +func (bcm *blockConfirmationManager) pollBlockFilter() ([]*ethbinding.Hash, error) { + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) + defer cancel() + var blockHashes []*ethbinding.Hash + if err := bcm.rpc.CallContext(ctx, &blockHashes, "eth_getFilterChanges", bcm.filterID); err != nil { + if strings.Contains(err.Error(), "filter not found") { + bcm.filterStale = true + } + return nil, err + } + return blockHashes, nil +} + +func (bcm *blockConfirmationManager) getBlockByHash(blockHash *ethbinding.Hash) (*blockInfo, error) { + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) + defer cancel() + + var blockInfo *blockInfo + err := bcm.rpc.CallContext(ctx, &blockInfo, "eth_getBlockByHash", blockHash, false /* only the txn hashes */) + if err != nil { + return nil, errors.Errorf(errors.RPCCallReturnedError, "eth_getBlockByHash", err) + } + if blockInfo == nil { + return nil, nil + } + bcm.blockCache.Add(blockInfo.Hash.String(), blockInfo) + bcm.log.Debugf("Downloded block header: %d / %s (by hash)", blockInfo.Number, blockInfo.Hash) + + // Store it by number in the cache we use for walking the chain + bcm.blockCache.Add(blockInfo.Number, blockInfo) + + return blockInfo, nil +} + +func (bcm *blockConfirmationManager) getBlockByNumber(number uint64) (*blockInfo, error) { + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) + defer cancel() + var blockInfo *blockInfo + err := bcm.rpc.CallContext(ctx, &blockInfo, "eth_getBlockByNumber", ethbinding.HexUint64(number), false /* only the txn hashes */) + if err != nil { + return nil, errors.Errorf(errors.RPCCallReturnedError, "eth_getBlockByNumber", err) + } + if blockInfo == nil { + return nil, nil + } + bcm.log.Debugf("Downloded block header: %d / %s (by number)", blockInfo.Number, blockInfo.Hash) + + // Store it by number in the cache we use for walking the chain + bcm.blockCache.Add(blockInfo.Number, blockInfo) + + return blockInfo, nil +} + +func (bcm *blockConfirmationManager) confirmationsListener() { + pollTimer := time.NewTimer(0) + notifications := make([]*eventNotification, 0) + for { + timedOut := false + for !timedOut { + select { + case <-pollTimer.C: + timedOut = true + case <-bcm.ctx.Done(): + bcm.log.Debugf("Block confirmation listener stopping") + return + case ev := <-bcm.eventNotifications: + notifications = append(notifications, ev) + } + } + pollTimer = time.NewTimer(bcm.pollingInterval) + + // Setup a filter if we're missing one + if bcm.filterStale { + if err := bcm.createBlockFilter(); err != nil { + bcm.log.Errorf("Failed to create block filter: %s", err) + continue + } + + if err := bcm.walkChain(); err != nil { + bcm.log.Errorf("Failed to create walk chain after restoring filter: %s", err) + continue + } + } + + // Do the poll + blockHashes, err := bcm.pollBlockFilter() + if err != nil { + bcm.log.Errorf("Failed to retrieve blocks from filter: %s", err) + continue + } + + // Process each new block + bcm.processBlockHashes(blockHashes) + + // Process any new notifications - we do this at the end, so it can benefit + // from knowing the latest highestBlockSeen + if err := bcm.processNotifications(notifications); err != nil { + bcm.log.Errorf("Failed processing notifications: %s", err) + continue + } + + // Clear the notifications array now we've processed them (we keep the slice memory) + notifications = notifications[:0] + + } + +} + +func (bcm *blockConfirmationManager) keyForEvent(event *eventData) string { + return fmt.Sprintf("TX:%s|BLOCK:%s/%s|IDX:%s", event.TransactionHash, event.BlockNumber, event.BlockHash, event.LogIndex) +} + +func (bcm *blockConfirmationManager) processNotifications(notifications []*eventNotification) error { + + for _, n := range notifications { + if n.removed { + bcm.removeEvent(n.event) + } else { + pending := bcm.addEvent(n.event, n.eventStream) + if err := bcm.walkChainForEvent(pending); err != nil { + return err + } + } + } + + return nil +} + +// addEvent is called by the goroutine on receipt of a new event notification +func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eventStream) *pendingEvent { + // We have settled on a string for block number on the external interface, but need to compare it here + blockNumber, _ := strconv.ParseUint(event.BlockNumber, 10, 64) + + // Add the event + eventKey := bcm.keyForEvent(event) + pending := &pendingEvent{ + key: bcm.keyForEvent(event), + added: time.Now(), + confirmations: make([]blockConfirmation, 0, bcm.requiredConfirmations), + blockNumber: blockNumber, + event: event, + eventStream: eventStream, + } + bcm.pending[eventKey] = pending + bcm.log.Infof("Added pending event %s", eventKey) + return pending +} + +// removeEvent is called by the goroutine on receipt of a remove event notification +func (bcm *blockConfirmationManager) removeEvent(event *eventData) { + bcm.log.Infof("Removing stale event %s", bcm.keyForEvent(event)) + delete(bcm.pending, bcm.keyForEvent(event)) +} + +func (bcm *blockConfirmationManager) processBlockHashes(blockHashes []*ethbinding.Hash) { + for _, blockHash := range blockHashes { + // Get the block header + block, err := bcm.getBlockByHash(blockHash) + if err != nil || block == nil { + bcm.log.Errorf("Failed to retrieve block %s: %s", blockHash, err) + continue + } + + // Get the block header + if err = bcm.processBlock(block); err != nil { + bcm.log.Errorf("Failed to process block %d / %s: %s", block.Number, block.Hash, err) + continue + } + + // Update the highest block (used for efficiency in chain walks) + if uint64(block.Number) > bcm.highestBlockSeen { + bcm.highestBlockSeen = uint64(block.Number) + } + } +} + +func (bcm *blockConfirmationManager) processBlock(block *blockInfo) error { + + // Go through all the events, adding in the confirmations, and popping any out + // that have reached their threshold. Then drop the log before logging/processing them. + parentStr := block.ParentHash.String() + blockNumber := uint64(block.Number) + var confirmed pendingEvents + for eventKey, pending := range bcm.pending { + // The block might appear at any point in the confirmation list + expectedParentHash := pending.event.BlockHash + expectedBlockNumber := pending.blockNumber + 1 + for i := 0; i < (len(pending.confirmations) + 1); i++ { + if parentStr == expectedParentHash && blockNumber == expectedBlockNumber { + pending.confirmations = append(pending.confirmations[0:i], blockConfirmation{ + BlockNumber: blockNumber, + BlockHash: block.Hash.String(), + }) + bcm.log.Infof("Confirmation %d at block %d / %s event=%s", + len(pending.confirmations), block.Number, block.Hash.String(), bcm.keyForEvent(pending.event)) + break + } + if i < len(pending.confirmations) { + expectedParentHash = pending.confirmations[i].BlockHash + } + expectedBlockNumber++ + } + if len(pending.confirmations) >= bcm.requiredConfirmations { + delete(bcm.pending, eventKey) + confirmed = append(confirmed, pending) + } + } + + // Sort the events to dispatch them in the correct order + sort.Sort(confirmed) + for _, c := range confirmed { + bcm.dispatchConfirmed(c) + } + return nil + +} + +// dispatchConfirmed drive the event stream for any events that are confirmed, and prunes the state +func (bcm *blockConfirmationManager) dispatchConfirmed(confirmed *pendingEvent) { + eventKey := bcm.keyForEvent(confirmed.event) + bcm.log.Infof("Confirmed with %d confirmations event=%s", len(confirmed.confirmations), eventKey) + delete(bcm.pending, eventKey) + + confirmed.event.Confirmations = confirmed.confirmations + confirmed.eventStream.handleEvent(confirmed.event) +} + +// walkChain goes through each event and sees whether it's valid, +// purging any stale confirmations - or whole events if the filter is invalid +// We do this each time our filter is invalidated +func (bcm *blockConfirmationManager) walkChain() error { + + // Grab a copy of all the pending in order + pendingEvents := make(pendingEvents, 0, len(bcm.pending)) + for _, pending := range bcm.pending { + pendingEvents = append(pendingEvents, pending) + } + sort.Sort(pendingEvents) + + // Go through them in order - using the cache for efficiency + for _, pending := range pendingEvents { + if err := bcm.walkChainForEvent(pending); err != nil { + return err + } + } + + return nil + +} + +func (bcm *blockConfirmationManager) walkChainForEvent(pending *pendingEvent) (err error) { + + eventKey := bcm.keyForEvent(pending.event) + + blockNumber := pending.blockNumber + 1 + expectedParentHash := pending.event.BlockHash + pending.confirmations = pending.confirmations[:0] + for { + // No point in walking past the highest block we've seen via the notifier + if bcm.highestBlockSeen > 0 && blockNumber >= bcm.highestBlockSeen { + bcm.log.Debugf("Waiting for confirmation after block %d event=%s", blockNumber, eventKey) + return nil + } + var block *blockInfo + cached, ok := bcm.blockCache.Get(blockNumber) + if ok { + block = cached.(*blockInfo) + } + // Treat a missing block, or a mismatched block, both as a cache miss and query the node + if block == nil || block.ParentHash.String() != expectedParentHash { + block, err = bcm.getBlockByNumber(blockNumber) + if err != nil { + return err + } + } + if block == nil { + bcm.log.Infof("Block %d unavailable walking chain event=%s", blockNumber, eventKey) + return nil + } + candidateParentHash := block.ParentHash.String() + if candidateParentHash != expectedParentHash { + bcm.log.Infof("Block mismatch in confirmations: block=%d expected=%s actual=%s confirmations=%d event=%s", blockNumber, expectedParentHash, candidateParentHash, len(pending.confirmations), eventKey) + return nil + } + pending.confirmations = append(pending.confirmations, blockConfirmation{ + BlockNumber: uint64(block.Number), + BlockHash: block.Hash.String(), + }) + if len(pending.confirmations) >= bcm.requiredConfirmations { + // Ready for dispatch + bcm.dispatchConfirmed(pending) + return nil + } + blockNumber++ + expectedParentHash = block.Hash.String() + } + +} diff --git a/internal/events/eventstream_test.go b/internal/events/eventstream_test.go index 0abf5339..18cca7f1 100644 --- a/internal/events/eventstream_test.go +++ b/internal/events/eventstream_test.go @@ -421,14 +421,16 @@ func TestBuildup(t *testing.T) { func TestWebSocketUnconfigured(t *testing.T) { assert := assert.New(t) - sm := NewSubscriptionManager(&SubscriptionManagerConf{}, nil, nil, nil).(*subscriptionMGR) + s, _ := NewSubscriptionManager(&SubscriptionManagerConf{}, nil, nil, nil) + sm := s.(*subscriptionMGR) _, err := sm.AddStream(context.Background(), &StreamInfo{Type: "websocket"}) assert.Regexp("WebSocket listener not configured", err) } func TestBadTimestampCacheSize(t *testing.T) { assert := assert.New(t) - sm := NewSubscriptionManager(&SubscriptionManagerConf{}, nil, nil, nil).(*subscriptionMGR) + s, _ := NewSubscriptionManager(&SubscriptionManagerConf{}, nil, nil, nil) + sm := s.(*subscriptionMGR) _, err := sm.AddStream(context.Background(), &StreamInfo{ TimestampCacheSize: -1, }) diff --git a/internal/events/logprocessor.go b/internal/events/logprocessor.go index 0c06f2c7..05d73048 100644 --- a/internal/events/logprocessor.go +++ b/internal/events/logprocessor.go @@ -30,6 +30,7 @@ import ( type logEntry struct { Address ethbinding.Address `json:"address"` BlockNumber ethbinding.HexBigInt `json:"blockNumber"` + BlockHash ethbinding.Hash `json:"blockHash"` TransactionIndex ethbinding.HexUint `json:"transactionIndex"` TransactionHash ethbinding.Hash `json:"transactionHash"` Data string `json:"data"` @@ -38,11 +39,13 @@ type logEntry struct { InputMethod string `json:"inputMethod,omitempty"` InputArgs map[string]interface{} `json:"inputArgs,omitempty"` InputSigner string `json:"inputSigner,omitempty"` + Removed bool `json:"removed,omitempty"` } type eventData struct { Address string `json:"address"` BlockNumber string `json:"blockNumber"` + BlockHash string `json:"blockHash"` TransactionIndex string `json:"transactionIndex"` TransactionHash string `json:"transactionHash"` Data map[string]interface{} `json:"data"` @@ -53,24 +56,27 @@ type eventData struct { InputMethod string `json:"inputMethod,omitempty"` InputArgs map[string]interface{} `json:"inputArgs,omitempty"` InputSigner string `json:"inputSigner,omitempty"` + Confirmations []blockConfirmation `json:"confirmations,omitempty"` // Used for callback handling batchComplete func(*eventData) } type logProcessor struct { - subID string - event *ethbinding.ABIEvent - stream *eventStream - blockHWM big.Int - highestDispatched big.Int - hwnSync sync.Mutex + subID string + event *ethbinding.ABIEvent + stream *eventStream + confirmationManager *blockConfirmationManager + blockHWM big.Int + highestDispatched big.Int + hwnSync sync.Mutex } -func newLogProcessor(subID string, event *ethbinding.ABIEvent, stream *eventStream) *logProcessor { +func newLogProcessor(subID string, event *ethbinding.ABIEvent, stream *eventStream, confirmationManager *blockConfirmationManager) *logProcessor { lp := &logProcessor{ - subID: subID, - event: event, - stream: stream, + subID: subID, + event: event, + stream: stream, + confirmationManager: confirmationManager, } lp.highestDispatched.SetInt64(-1) return lp @@ -112,18 +118,11 @@ func (lp *logProcessor) initBlockHWM(intVal *big.Int) { func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int) (err error) { - var data []byte - if strings.HasPrefix(entry.Data, "0x") { - data, err = ethbind.API.HexDecode(entry.Data) - if err != nil { - return errors.Errorf(errors.EventStreamsLogDecode, subInfo, err) - } - } - blockNumber := entry.BlockNumber.ToInt() result := &eventData{ Address: entry.Address.String(), BlockNumber: blockNumber.String(), + BlockHash: entry.BlockHash.String(), TransactionIndex: entry.TransactionIndex.String(), TransactionHash: entry.TransactionHash.String(), Signature: ethbind.API.ABIEventSignature(lp.event), @@ -135,6 +134,25 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int InputSigner: entry.InputSigner, batchComplete: lp.batchComplete, } + + if entry.Removed { + if lp.confirmationManager != nil { + lp.confirmationManager.notify(&eventNotification{ + removed: true, + event: result, + }) + } + return nil + } + + var data []byte + if strings.HasPrefix(entry.Data, "0x") { + data, err = ethbind.API.HexDecode(entry.Data) + if err != nil { + return errors.Errorf(errors.EventStreamsLogDecode, subInfo, err) + } + } + if lp.stream.spec.Timestamps { result.Timestamp = strconv.FormatUint(entry.Timestamp, 10) } @@ -180,7 +198,15 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int lp.highestDispatched.Set(blockNumber) } lp.hwnSync.Unlock() - lp.stream.handleEvent(result) + + if lp.confirmationManager != nil { + lp.confirmationManager.notify(&eventNotification{ + event: result, + eventStream: lp.stream, + }) + } else { + lp.stream.handleEvent(result) + } return nil } diff --git a/internal/events/submanager.go b/internal/events/submanager.go index 05e19a4d..aa91ccf3 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -74,15 +74,17 @@ type subscriptionManager interface { subscriptionsForStream(string) []*subscription loadCheckpoint(string) (map[string]*big.Int, error) storeCheckpoint(string, map[string]*big.Int) error + confirmationManager() *blockConfirmationManager } // SubscriptionManagerConf configuration type SubscriptionManagerConf struct { - EventLevelDBPath string `json:"eventsDB"` - EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` - CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` - CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` - WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` + EventLevelDBPath string `json:"eventsDB"` + EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` + CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` + CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` + WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` + Confirmations blockConfirmationConf `json:"confirmations,omitempty"` } type subscriptionMGR struct { @@ -90,6 +92,7 @@ type subscriptionMGR struct { db kvstore.KVStore rpc eth.RPCClient subscriptions map[string]*subscription + bcm *blockConfirmationManager streams map[string]*eventStream closed bool cr contractregistry.ContractResolver @@ -104,7 +107,7 @@ func CobraInitSubscriptionManager(cmd *cobra.Command, conf *SubscriptionManagerC } // NewSubscriptionManager constructor -func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr contractregistry.ContractResolver, wsChannels ws.WebSocketChannels) SubscriptionManager { +func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr contractregistry.ContractResolver, wsChannels ws.WebSocketChannels) (s SubscriptionManager, err error) { sm := &subscriptionMGR{ conf: conf, rpc: rpc, @@ -126,7 +129,13 @@ func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr log.Warnf("catchupModeBlockGap=%d must be >= catchupModePageSize=%d - setting to %d", conf.CatchupModeBlockGap, conf.CatchupModePageSize, conf.CatchupModePageSize) conf.CatchupModeBlockGap = conf.CatchupModePageSize } - return sm + if conf.Confirmations.Enabled { + sm.bcm, err = newBlockConfirmationManager(context.Background(), sm.rpc, &conf.Confirmations) + if err != nil { + return nil, err + } + } + return SubscriptionManager(sm), nil } // SubscriptionByID used externally to get serializable details @@ -488,3 +497,7 @@ func (s *subscriptionMGR) Close(wait bool) { } s.closed = true } + +func (s *subscriptionMGR) confirmationManager() *blockConfirmationManager { + return s.bcm +} diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index b73e7a94..68757785 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -72,7 +72,8 @@ func newTestSubscriptionManager() *subscriptionMGR { smconf := &SubscriptionManagerConf{} rpc := ðmocks.RPCClient{} cr := &contractregistrymocks.ContractStore{} - sm := NewSubscriptionManager(smconf, rpc, cr, newMockWebSocket()).(*subscriptionMGR) + s, _ := NewSubscriptionManager(smconf, rpc, cr, newMockWebSocket()) + sm := s.(*subscriptionMGR) sm.db = kvstore.NewMockKV(nil) sm.config().WebhooksAllowPrivateIPs = true sm.config().EventPollingIntervalSec = 0 @@ -86,7 +87,9 @@ func TestNestSubscriptionManagerBlockGapValidation(t *testing.T) { } rpc := ðmocks.RPCClient{} cr := &contractregistrymocks.ContractStore{} - sm := NewSubscriptionManager(smconf, rpc, cr, newMockWebSocket()).(*subscriptionMGR) + s, err := NewSubscriptionManager(smconf, rpc, cr, newMockWebSocket()) + assert.NoError(t, err) + sm := s.(*subscriptionMGR) assert.Equal(t, int64(1000), sm.conf.CatchupModeBlockGap) } diff --git a/internal/events/subscription.go b/internal/events/subscription.go index 7d0731d5..e5d5cdc1 100644 --- a/internal/events/subscription.go +++ b/internal/events/subscription.go @@ -100,7 +100,7 @@ func newSubscription(sm subscriptionManager, rpc eth.RPCClient, cr contractregis info: i, rpc: rpc, cr: cr, - lp: newLogProcessor(i.ID, event, stream), + lp: newLogProcessor(i.ID, event, stream, sm.confirmationManager()), logName: i.ID + ":" + ethbind.API.ABIEventSignature(event), filterStale: true, catchupModeBlockGap: sm.config().CatchupModeBlockGap, @@ -165,7 +165,7 @@ func restoreSubscription(sm subscriptionManager, rpc eth.RPCClient, cr contractr rpc: rpc, cr: cr, info: i, - lp: newLogProcessor(i.ID, event, stream), + lp: newLogProcessor(i.ID, event, stream, sm.confirmationManager()), logName: i.ID + ":" + ethbind.API.ABIEventSignature(event), filterStale: true, catchupModeBlockGap: sm.config().CatchupModeBlockGap, diff --git a/internal/events/subscription_test.go b/internal/events/subscription_test.go index 7c1e539b..0b947f3d 100644 --- a/internal/events/subscription_test.go +++ b/internal/events/subscription_test.go @@ -61,6 +61,10 @@ func (m *mockSubMgr) loadCheckpoint(string) (map[string]*big.Int, error) { retur func (m *mockSubMgr) storeCheckpoint(string, map[string]*big.Int) error { return nil } +func (m *mockSubMgr) confirmationManager() *blockConfirmationManager { + return nil +} + func newTestStream() *eventStream { a, _ := newEventStream(newTestSubscriptionManager(), &StreamInfo{ ID: "123", @@ -212,7 +216,7 @@ func TestProcessEventsCannotProcess(t *testing.T) { rpc.On("CallContext", mock.Anything, mock.Anything, "eth_uninstallFilter", mock.Anything).Return(nil) s := &subscription{ rpc: rpc, - lp: newLogProcessor("", ðbinding.ABIEvent{}, newTestStream()), + lp: newLogProcessor("", ðbinding.ABIEvent{}, newTestStream(), nil), } err := s.processNewEvents(context.Background()) // We swallow the error in this case - as we simply couldn't read the event From 48b9f754bcd8ce0df805bdafb3dc670b5cf13934 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Tue, 22 Mar 2022 00:41:16 -0400 Subject: [PATCH 02/16] More consistent formatting Signed-off-by: Peter Broadhurst --- internal/events/block_confirmations.go | 55 ++++++++++---------------- internal/events/logprocessor.go | 2 +- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index f21d9969..a0090c0b 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -16,6 +16,7 @@ package events import ( "context" + "encoding/json" "fmt" "sort" "strconv" @@ -66,17 +67,12 @@ type blockConfirmationConf struct { type pendingEvent struct { key string added time.Time - confirmations []blockConfirmation + confirmations []*blockInfo blockNumber uint64 event *eventData eventStream *eventStream } -type blockConfirmation struct { - BlockNumber uint64 `json:"number"` - BlockHash string `json:"hash"` -} - type pendingEvents []*pendingEvent func (pe pendingEvents) Len() int { return len(pe) } @@ -93,26 +89,21 @@ type eventNotification struct { } // blockInfo is the information we cache for a block -// We omit some information that's not used and potentially large: -// - extraData -// - uncles type blockInfo struct { - Number ethbinding.HexUint64 `json:"number"` - Hash ethbinding.Hash `json:"hash"` - ParentHash ethbinding.Hash `json:"parentHash"` - Nonce ethbinding.BlockNonce `json:"nonce"` - SHA3Uncles ethbinding.Hash `json:"sha3Uncles"` - TransactionsRoot ethbinding.Hash `json:"transactionsRoot"` - StateRoot ethbinding.Hash `json:"stateRoot"` - ReceiptsRoot ethbinding.Hash `json:"receiptsRoot"` - Miner ethbinding.Address `json:"miner"` - Difficulty ethbinding.HexBigInt `json:"difficulty"` - TotalDifficulty ethbinding.HexBigInt `json:"totalDifficulty"` - Size ethbinding.HexUint64 `json:"size"` - GasLimit ethbinding.HexUint64 `json:"gasLimit"` - GasUsed ethbinding.HexUint64 `json:"gasUsed"` - Timestamp ethbinding.HexUint64 `json:"timestamp"` - Transactions []*ethbinding.Hash `json:"transactions"` + Number ethbinding.HexUint `json:"number"` + Hash ethbinding.Hash `json:"hash"` + ParentHash ethbinding.Hash `json:"parentHash"` + Timestamp ethbinding.HexUint `json:"timestamp"` +} + +// MarshalJSON for more consistent JSON output in confirmations array of event +func (bi *blockInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(map[string]interface{}{ + "number": strconv.FormatUint(uint64(bi.Number), 10), + "hash": bi.Hash, + "parentHash": bi.ParentHash, + "timestamp": strconv.FormatUint(uint64(bi.Timestamp), 10), + }) } func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *blockConfirmationConf) (bcm *blockConfirmationManager, err error) { @@ -306,7 +297,7 @@ func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eve pending := &pendingEvent{ key: bcm.keyForEvent(event), added: time.Now(), - confirmations: make([]blockConfirmation, 0, bcm.requiredConfirmations), + confirmations: make([]*blockInfo, 0, bcm.requiredConfirmations), blockNumber: blockNumber, event: event, eventStream: eventStream, @@ -357,16 +348,13 @@ func (bcm *blockConfirmationManager) processBlock(block *blockInfo) error { expectedBlockNumber := pending.blockNumber + 1 for i := 0; i < (len(pending.confirmations) + 1); i++ { if parentStr == expectedParentHash && blockNumber == expectedBlockNumber { - pending.confirmations = append(pending.confirmations[0:i], blockConfirmation{ - BlockNumber: blockNumber, - BlockHash: block.Hash.String(), - }) + pending.confirmations = append(pending.confirmations[0:i], block) bcm.log.Infof("Confirmation %d at block %d / %s event=%s", len(pending.confirmations), block.Number, block.Hash.String(), bcm.keyForEvent(pending.event)) break } if i < len(pending.confirmations) { - expectedParentHash = pending.confirmations[i].BlockHash + expectedParentHash = pending.confirmations[i].Hash.String() } expectedBlockNumber++ } @@ -452,10 +440,7 @@ func (bcm *blockConfirmationManager) walkChainForEvent(pending *pendingEvent) (e bcm.log.Infof("Block mismatch in confirmations: block=%d expected=%s actual=%s confirmations=%d event=%s", blockNumber, expectedParentHash, candidateParentHash, len(pending.confirmations), eventKey) return nil } - pending.confirmations = append(pending.confirmations, blockConfirmation{ - BlockNumber: uint64(block.Number), - BlockHash: block.Hash.String(), - }) + pending.confirmations = append(pending.confirmations, block) if len(pending.confirmations) >= bcm.requiredConfirmations { // Ready for dispatch bcm.dispatchConfirmed(pending) diff --git a/internal/events/logprocessor.go b/internal/events/logprocessor.go index 05d73048..3e630d55 100644 --- a/internal/events/logprocessor.go +++ b/internal/events/logprocessor.go @@ -56,7 +56,7 @@ type eventData struct { InputMethod string `json:"inputMethod,omitempty"` InputArgs map[string]interface{} `json:"inputArgs,omitempty"` InputSigner string `json:"inputSigner,omitempty"` - Confirmations []blockConfirmation `json:"confirmations,omitempty"` + Confirmations []*blockInfo `json:"confirmations,omitempty"` // Used for callback handling batchComplete func(*eventData) } From 69be456a764831ae24d7db6cf82112dae472c24e Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Tue, 22 Mar 2022 08:11:10 -0400 Subject: [PATCH 03/16] Drain on suspend Signed-off-by: Peter Broadhurst --- internal/events/block_confirmations.go | 65 +++++++++++++++++++------- internal/events/eventstream.go | 17 +++++++ internal/events/logprocessor.go | 9 ++-- 3 files changed, 70 insertions(+), 21 deletions(-) diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index a0090c0b..fe19b93c 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -42,7 +42,7 @@ type blockConfirmationManager struct { requiredConfirmations int pollingInterval time.Duration blockCache *lru.Cache - eventNotifications chan *eventNotification + bcmNotifications chan *bcmNotification highestBlockSeen uint64 includeInPayload bool pending map[string]*pendingEvent @@ -82,10 +82,19 @@ func (pe pendingEvents) Less(i, j int) bool { (pe[i].event.BlockNumber == pe[j].event.BlockNumber && pe[i].event.LogIndex < pe[j].event.LogIndex) } -type eventNotification struct { - removed bool +type bcmEventType int + +const ( + bcmNewLog bcmEventType = iota + bcmRemovedLog + bcmStopStream +) + +type bcmNotification struct { + nType bcmEventType event *eventData eventStream *eventStream + complete chan struct{} // for bcmStopStream only } // blockInfo is the information we cache for a block @@ -131,7 +140,7 @@ func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *b requiredConfirmations: requiredConfirmations, pollingInterval: pollingInterval, filterStale: true, - eventNotifications: make(chan *eventNotification, eventQueueLength), + bcmNotifications: make(chan *bcmNotification, eventQueueLength), pending: make(map[string]*pendingEvent), includeInPayload: conf.IncludeInPayload, } @@ -143,8 +152,8 @@ func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *b } // Notify is used to notify the confirmation manager of detection of a new logEntry addition or removal -func (bcm *blockConfirmationManager) notify(ev *eventNotification) { - bcm.eventNotifications <- ev +func (bcm *blockConfirmationManager) notify(ev *bcmNotification) { + bcm.bcmNotifications <- ev } func (bcm *blockConfirmationManager) createBlockFilter() error { @@ -214,18 +223,24 @@ func (bcm *blockConfirmationManager) getBlockByNumber(number uint64) (*blockInfo func (bcm *blockConfirmationManager) confirmationsListener() { pollTimer := time.NewTimer(0) - notifications := make([]*eventNotification, 0) + notifications := make([]*bcmNotification, 0) for { - timedOut := false - for !timedOut { + popped := false + for !popped { select { case <-pollTimer.C: - timedOut = true + popped = true case <-bcm.ctx.Done(): bcm.log.Debugf("Block confirmation listener stopping") return - case ev := <-bcm.eventNotifications: - notifications = append(notifications, ev) + case notification := <-bcm.bcmNotifications: + if notification.nType == bcmStopStream { + // Handle stream notifications immediately + bcm.streamStopped(notification) + } else { + // Defer until after we've got new logs + notifications = append(notifications, notification) + } } } pollTimer = time.NewTimer(bcm.pollingInterval) @@ -271,22 +286,36 @@ func (bcm *blockConfirmationManager) keyForEvent(event *eventData) string { return fmt.Sprintf("TX:%s|BLOCK:%s/%s|IDX:%s", event.TransactionHash, event.BlockNumber, event.BlockHash, event.LogIndex) } -func (bcm *blockConfirmationManager) processNotifications(notifications []*eventNotification) error { +func (bcm *blockConfirmationManager) processNotifications(notifications []*bcmNotification) error { for _, n := range notifications { - if n.removed { - bcm.removeEvent(n.event) - } else { + switch n.nType { + case bcmNewLog: pending := bcm.addEvent(n.event, n.eventStream) if err := bcm.walkChainForEvent(pending); err != nil { return err } + case bcmRemovedLog: + bcm.removeEvent(n.event) + default: + // Note that streamStopped is handled in the polling loop directly + bcm.log.Warnf("Unexpected notification type: %d", n.nType) } } return nil } +// streamStopped removes all pending work for a given stream, and notifies once done +func (bcm *blockConfirmationManager) streamStopped(notification *bcmNotification) { + for eventKey, pending := range bcm.pending { + if pending.eventStream == notification.eventStream { + delete(bcm.pending, eventKey) + } + } + close(notification.complete) +} + // addEvent is called by the goroutine on receipt of a new event notification func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eventStream) *pendingEvent { // We have settled on a string for block number on the external interface, but need to compare it here @@ -379,7 +408,9 @@ func (bcm *blockConfirmationManager) dispatchConfirmed(confirmed *pendingEvent) bcm.log.Infof("Confirmed with %d confirmations event=%s", len(confirmed.confirmations), eventKey) delete(bcm.pending, eventKey) - confirmed.event.Confirmations = confirmed.confirmations + if bcm.includeInPayload { + confirmed.event.Confirmations = confirmed.confirmations + } confirmed.eventStream.handleEvent(confirmed.event) } diff --git a/internal/events/eventstream.go b/internal/events/eventstream.go index 08093709..1479badd 100644 --- a/internal/events/eventstream.go +++ b/internal/events/eventstream.go @@ -231,9 +231,25 @@ func (a *eventStream) preUpdateStream() error { close(a.updateInterrupt) a.batchCond.Broadcast() a.batchCond.L.Unlock() + + a.drainBlockConfirmationManager() + return nil } +func (a *eventStream) drainBlockConfirmationManager() { + bcm := a.sm.confirmationManager() + if bcm != nil { + n := &bcmNotification{ + nType: bcmStopStream, + eventStream: a, + complete: make(chan struct{}), + } + bcm.notify(n) + <-n.complete + } +} + // postUpdateStream resets flags and kicks off a fresh round of handler go routines func (a *eventStream) postUpdateStream() { a.batchCond.L.Lock() @@ -384,6 +400,7 @@ func (a *eventStream) suspend() { a.spec.Suspended = true a.batchCond.Broadcast() a.batchCond.L.Unlock() + a.drainBlockConfirmationManager() <-a.eventPollerDone <-a.batchProcessorDone } diff --git a/internal/events/logprocessor.go b/internal/events/logprocessor.go index 3e630d55..9025cca0 100644 --- a/internal/events/logprocessor.go +++ b/internal/events/logprocessor.go @@ -137,9 +137,9 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int if entry.Removed { if lp.confirmationManager != nil { - lp.confirmationManager.notify(&eventNotification{ - removed: true, - event: result, + lp.confirmationManager.notify(&bcmNotification{ + nType: bcmRemovedLog, + event: result, }) } return nil @@ -200,7 +200,8 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int lp.hwnSync.Unlock() if lp.confirmationManager != nil { - lp.confirmationManager.notify(&eventNotification{ + lp.confirmationManager.notify(&bcmNotification{ + nType: bcmNewLog, event: result, eventStream: lp.stream, }) From 9467911683de2e65ef553ad2165ad9f127f7ddc1 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 11:12:19 -0400 Subject: [PATCH 04/16] Fix concurrent map write when adding multiple subscriptions in parallel Signed-off-by: Nicko Guyer --- internal/events/submanager.go | 25 ++++++++++++-------- internal/events/submanager_test.go | 37 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 10 deletions(-) diff --git a/internal/events/submanager.go b/internal/events/submanager.go index aa91ccf3..286b4f4f 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -19,6 +19,7 @@ import ( "encoding/json" "math/big" "strings" + "sync" "time" "github.com/spf13/cobra" @@ -88,15 +89,16 @@ type SubscriptionManagerConf struct { } type subscriptionMGR struct { - conf *SubscriptionManagerConf - db kvstore.KVStore - rpc eth.RPCClient - subscriptions map[string]*subscription - bcm *blockConfirmationManager - streams map[string]*eventStream - closed bool - cr contractregistry.ContractResolver - wsChannels ws.WebSocketChannels + conf *SubscriptionManagerConf + db kvstore.KVStore + rpc eth.RPCClient + subscriptions map[string]*subscription + bcm *blockConfirmationManager + streams map[string]*eventStream + closed bool + cr contractregistry.ContractResolver + wsChannels ws.WebSocketChannels + subscriptionsMutex sync.Mutex } // CobraInitSubscriptionManager standard naming for cobra command params @@ -220,8 +222,11 @@ func (s *subscriptionMGR) addSubscriptionCommon(ctx context.Context, abi *ABIRef if err != nil { return nil, err } + s.subscriptionsMutex.Lock() s.subscriptions[sub.info.ID] = sub - return s.storeSubscription(sub.info) + subInfo, err := s.storeSubscription(sub.info) + s.subscriptionsMutex.Unlock() + return subInfo, err } func (s *subscriptionMGR) config() *SubscriptionManagerConf { diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index 68757785..ae0860b3 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -22,6 +22,7 @@ import ( "net/http/httptest" "os" "path" + "sync" "testing" "time" @@ -402,3 +403,39 @@ func TestRecoverErrors(t *testing.T) { assert.Equal(0, len(sm.streams)) assert.Equal(0, len(sm.subscriptions)) } + +func TestAddSubscriptionConcurrently(t *testing.T) { + assert := assert.New(t) + dir := tempdir(t) + defer cleanup(t, dir) + sm := newTestSubscriptionManager() + ctx := context.Background() + + stream, err := sm.AddStream(ctx, &StreamInfo{ + Type: "webhook", + Webhook: &webhookActionInfo{URL: "http://test.invalid"}, + }) + assert.NoError(err) + + abi := &ABIRefOrInline{ + Inline: ethbinding.ABIMarshaling{ + ethbinding.ABIElementMarshaling{Name: "ping"}, + }, + } + + dto := &SubscriptionCreateDTO{ + Stream: stream.ID, + Event: ðbinding.ABIElementMarshaling{Name: "ping"}, + } + + var wg sync.WaitGroup + for i := 0; i < 100; i++ { + wg.Add(1) + go func() { + defer wg.Done() + _, err := sm.addSubscriptionCommon(ctx, abi, dto) + assert.NoError(err) + }() + } + wg.Wait() +} From 8dd4d4f5c2bcd838aa05328f29e7036db4db0a0b Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 12:08:54 -0400 Subject: [PATCH 05/16] Add RPC mock to subscription test Signed-off-by: Nicko Guyer --- internal/events/submanager_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index ae0860b3..8aba781b 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -411,6 +411,14 @@ func TestAddSubscriptionConcurrently(t *testing.T) { sm := newTestSubscriptionManager() ctx := context.Background() + rpc := ðmocks.RPCClient{} + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_blockNumber").Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newFilter", mock.Anything).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterLogs", mock.Anything).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_uninstallFilter", mock.Anything).Return(nil) + + sm.rpc = rpc + stream, err := sm.AddStream(ctx, &StreamInfo{ Type: "webhook", Webhook: &webhookActionInfo{URL: "http://test.invalid"}, From 772e76883b2c5c364c939dbc8d10c6d6919c6a7e Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 13:13:02 -0400 Subject: [PATCH 06/16] Use RWMutex on subscriptions Signed-off-by: Nicko Guyer --- internal/events/submanager.go | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/internal/events/submanager.go b/internal/events/submanager.go index 286b4f4f..dcf7c9af 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -98,7 +98,7 @@ type subscriptionMGR struct { closed bool cr contractregistry.ContractResolver wsChannels ws.WebSocketChannels - subscriptionsMutex sync.Mutex + subscriptionsMutex sync.RWMutex } // CobraInitSubscriptionManager standard naming for cobra command params @@ -151,10 +151,12 @@ func (s *subscriptionMGR) SubscriptionByID(ctx context.Context, id string) (*Sub // Subscriptions used externally to get list subscriptions func (s *subscriptionMGR) Subscriptions(ctx context.Context) []*SubscriptionInfo { + s.subscriptionsMutex.RLock() l := make([]*SubscriptionInfo, 0, len(s.subscriptions)) for _, sub := range s.subscriptions { l = append(l, sub.info) } + s.subscriptionsMutex.RUnlock() return l } @@ -265,11 +267,13 @@ func (s *subscriptionMGR) DeleteSubscription(ctx context.Context, id string) err } func (s *subscriptionMGR) deleteSubscription(ctx context.Context, sub *subscription) error { + s.subscriptionsMutex.Lock() delete(s.subscriptions, sub.info.ID) _ = sub.unsubscribe(ctx, true) if err := s.db.Delete(sub.info.ID); err != nil { return err } + s.subscriptionsMutex.Unlock() return nil } @@ -292,7 +296,7 @@ func (s *subscriptionMGR) StreamByID(ctx context.Context, id string) (*StreamInf // Streams used externally to get list streams func (s *subscriptionMGR) Streams(ctx context.Context) []*StreamInfo { - l := make([]*StreamInfo, 0, len(s.subscriptions)) + l := make([]*StreamInfo, 0, len(s.streams)) for _, stream := range s.streams { l = append(l, stream.spec) } @@ -333,18 +337,26 @@ func (s *subscriptionMGR) storeStream(spec *StreamInfo) (*StreamInfo, error) { return spec, nil } -// DeleteStream deletes a streamm +// DeleteStream deletes a stream func (s *subscriptionMGR) DeleteStream(ctx context.Context, id string) error { stream, err := s.streamByID(id) if err != nil { return err } // We have to clean up all the associated subs + s.subscriptionsMutex.RLock() + subs := make([]*subscription, 0) for _, sub := range s.subscriptions { if sub.info.Stream == stream.spec.ID { - _ = s.deleteSubscription(ctx, sub) + subs = append(subs, sub) } } + s.subscriptionsMutex.RUnlock() + + for _, sub := range subs { + _ = s.deleteSubscription(ctx, sub) + } + delete(s.streams, stream.spec.ID) stream.stop(false) if err = s.db.Delete(stream.spec.ID); err != nil { @@ -355,16 +367,18 @@ func (s *subscriptionMGR) DeleteStream(ctx context.Context, id string) error { } func (s *subscriptionMGR) subscriptionsForStream(id string) []*subscription { + s.subscriptionsMutex.RLock() subIDs := make([]*subscription, 0) for _, sub := range s.subscriptions { if sub.info.Stream == id { subIDs = append(subIDs, sub) } } + s.subscriptionsMutex.RUnlock() return subIDs } -// SuspendStream suspends a streamm from firing +// SuspendStream suspends a stream from firing func (s *subscriptionMGR) SuspendStream(ctx context.Context, id string) error { stream, err := s.streamByID(id) if err != nil { @@ -392,7 +406,9 @@ func (s *subscriptionMGR) ResumeStream(ctx context.Context, id string) error { // subscriptionByID used internally to lookup full objects func (s *subscriptionMGR) subscriptionByID(id string) (*subscription, error) { + s.subscriptionsMutex.RLock() sub, exists := s.subscriptions[id] + s.subscriptionsMutex.RUnlock() if !exists { return nil, errors.Errorf(errors.EventStreamsSubscriptionNotFound, id) } @@ -486,7 +502,9 @@ func (s *subscriptionMGR) recoverSubscriptions() { if err != nil { log.Errorf("Failed to recover subscription '%s': %s", subInfo.ID, err) } else { + s.subscriptionsMutex.RLock() s.subscriptions[subInfo.ID] = sub + s.subscriptionsMutex.RUnlock() } } } From 06203cd76ac5a2c9781cca7610e0a0e69b2056fe Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 13:59:28 -0400 Subject: [PATCH 07/16] Add write lock on recoverSubscriptions Signed-off-by: Nicko Guyer --- internal/events/submanager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/events/submanager.go b/internal/events/submanager.go index dcf7c9af..18a47066 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -502,9 +502,9 @@ func (s *subscriptionMGR) recoverSubscriptions() { if err != nil { log.Errorf("Failed to recover subscription '%s': %s", subInfo.ID, err) } else { - s.subscriptionsMutex.RLock() + s.subscriptionsMutex.Lock() s.subscriptions[subInfo.ID] = sub - s.subscriptionsMutex.RUnlock() + s.subscriptionsMutex.Unlock() } } } From 0f19286d848118c96f9e92605bf8e8423789ae89 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 14:46:05 -0400 Subject: [PATCH 08/16] Close subscription manager in tests Signed-off-by: Nicko Guyer --- internal/events/submanager_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index 8aba781b..86d64692 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -446,4 +446,5 @@ func TestAddSubscriptionConcurrently(t *testing.T) { }() } wg.Wait() + sm.Close(true) } From 95526ad65d92ea1dda2a998374a6f4e496e9d362 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 30 Mar 2022 17:17:34 -0400 Subject: [PATCH 09/16] Add missing mock to unit test Signed-off-by: Nicko Guyer --- internal/events/submanager_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index 86d64692..71258f3c 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -226,6 +226,7 @@ func TestActionChildCleanup(t *testing.T) { blockCall := make(chan struct{}) rpc := ðmocks.RPCClient{} rpc.On("CallContext", mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { <-blockCall }).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newFilter", mock.Anything).Return(nil) sm.rpc = rpc sm.db, _ = kvstore.NewLDBKeyValueStore(path.Join(dir, "db")) From a2f6e8738940d9669b9464ebd8f5a176fcb562d4 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 4 Apr 2022 00:42:24 -0400 Subject: [PATCH 10/16] Add e2e test of confirmations Signed-off-by: Peter Broadhurst --- .vscode/settings.json | 8 +- go.mod | 1 + go.sum | 573 -------------------- internal/events/block_confirmations.go | 74 ++- internal/events/block_confirmations_test.go | 168 ++++++ internal/events/submanager.go | 18 +- 6 files changed, 239 insertions(+), 603 deletions(-) create mode 100644 internal/events/block_confirmations_test.go diff --git a/.vscode/settings.json b/.vscode/settings.json index c9c75b32..f9c0e520 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,9 @@ { - "go.lintTool": "golangci-lint" + "go.lintTool": "golangci-lint", + "cSpell.words": [ + "Debugf", + "hashicorp", + "Infof", + "Warnf" + ] } \ No newline at end of file diff --git a/go.mod b/go.mod index 0d1bcab4..467beaac 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ require ( github.com/Shopify/sarama v1.30.0 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/dsnet/compress v0.0.1 // indirect + github.com/ethereum/go-ethereum v1.10.12 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 github.com/go-openapi/jsonreference v0.19.6 github.com/go-openapi/spec v0.20.4 diff --git a/go.sum b/go.sum index f423a124..84bac2ed 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -15,7 +13,6 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -23,11 +20,6 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -38,23 +30,17 @@ cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Antonboom/errname v0.1.5/go.mod h1:DugbBstvPFQbv/5uLcRRzfrNqKE9tVdVCqWCLp6Cifo= -github.com/Antonboom/nilnil v0.1.0/go.mod h1:PhHLvRPSghY5Y7mX4TW+BHZQYo1A8flE5H20D3IPZBo= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -69,26 +55,15 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.30.0 h1:TOZL6r37xJBDEMLx4yjB77jxbZYXPaDow08TSK6vIL0= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae h1:ePgznFqEG1v3AjMklnK8H7BSc++FDSo7xfK9K7Af+0Y= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -96,40 +71,19 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= 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/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= 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/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -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-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/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= @@ -141,15 +95,10 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxq github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= 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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/blizzy78/varnamelen v0.3.0/go.mod h1:hbwRdBvoBqxk34XyQ6HA0UH3G0/1TKuv5AC4eaBT0Ec= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/breml/bidichk v0.1.1/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= @@ -163,50 +112,30 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/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/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= 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 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= 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/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/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 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/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -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-20190620071333-e64a0ec8b42a/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/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= 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/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -217,7 +146,6 @@ github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14y github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -228,9 +156,6 @@ github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -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-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= @@ -239,39 +164,25 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= 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.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 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.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.3/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4= github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= 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.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= 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/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= 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= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -281,17 +192,12 @@ github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0 github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-critic/go-critic v0.6.1/go.mod h1:SdNCfU0yF3UBjtaZGw6586/WocupMOJuiqgom5DsQxM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 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 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -306,42 +212,19 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -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.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= 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-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= @@ -353,8 +236,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -376,21 +257,9 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l 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/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.43.0/go.mod h1:VIFlUqidx5ggxDfQagdvd9E67UjMXtTHBkBQ7sHoC5Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -404,134 +273,75 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/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/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= -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/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 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/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -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.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -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-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/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-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= 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-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/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/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/icza/dyno v0.0.0-20210726202311-f1bafe5d9996 h1:ReG4j9+RbIOX2sR0cwPRpPXPaN+O/Hf59Npw3Iv118E= github.com/icza/dyno v0.0.0-20210726202311-f1bafe5d9996/go.mod h1:c1tRKs5Tx7E2+uHGSyyncziFjvGpgv4H2HrqXeUQ/Uk= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= @@ -556,48 +366,29 @@ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJk github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -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/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= 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.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= 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/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -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/errcheck v1.6.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.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= @@ -605,197 +396,101 @@ github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgo github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= 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.2/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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= 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/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/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/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -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/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -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.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -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.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= 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.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -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 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -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-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.1.2/go.mod h1:bnXsMr+ZTH09V5rssEI+jHAZ4z+ZdyhgO/zsy3EhK+0= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= 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.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= 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/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= 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-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= 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.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -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/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -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/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M= github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -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 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -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.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -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/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -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/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -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/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -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/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -803,124 +498,61 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= 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 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.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 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/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.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 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.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/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.13/go.mod h1:Ul8wwdqR6kBVOCt2dipDBkE+T6vAV/iixkrKuRTN1oQ= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.10/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210428214800-545e0d2e0bf7/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 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/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.9.1/go.mod h1:oDcDLcatOJxkCGaCaq8lua1jTnYf6Sou4wdiJ1n4iHc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.10+incompatible h1:AL2kpVykjkqeN+MFe1WcwSBVUjGjvdU8/ubvCuXAjrU= github.com/shirou/gopsutil v3.21.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.21.10/go.mod h1:t75NhzCZ/dYyPQjyQmrAYP6c8+LCdFANeBMdLPCNnew= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= 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.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= 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/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -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.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -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/handy v0.0.0-20190108123426-d5acb3125c2a/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= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -930,20 +562,14 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= 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= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.11.0 h1:C16pk7tQNiH6VlCrtIXL1w8GaOsi1X3W8KDkE1BuYd4= github.com/tidwall/gjson v1.11.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= @@ -951,30 +577,14 @@ github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -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/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.4.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -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/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= @@ -983,30 +593,15 @@ github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= 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= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= 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.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= -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= @@ -1014,32 +609,20 @@ 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.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 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/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.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -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= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/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-20181203042331-505ab145d0a9/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-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/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-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1048,10 +631,7 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1067,7 +647,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/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= 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= @@ -1094,7 +673,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -1102,9 +680,7 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r 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= @@ -1115,9 +691,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL 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-20191002035440-2ec189313ef0/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= @@ -1125,7 +698,6 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -1145,9 +717,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1165,15 +734,10 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1188,51 +752,39 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h 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-20181205085412-a5c9d58dba9a/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= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20190813064441-fde4db37ae7a/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-20190916202348-b4ddaad3f8a3/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-20200107162124-548cf772de50/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= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1241,7 +793,6 @@ 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-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1256,20 +807,9 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/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-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/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-20210616094352-59db8d763f22/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-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1286,29 +826,20 @@ 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-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/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-20190110163146-51295c7ec13a/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-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/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-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/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= @@ -1317,28 +848,18 @@ 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-20190910044552-dd2b5c81c578/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-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/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-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/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= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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-20200108203644-89082a384178/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-20200117220505-0cba7a3a9ee9/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= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1348,56 +869,23 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= 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= @@ -1409,12 +897,10 @@ gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= 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= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1433,34 +919,22 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= 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= -google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 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-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 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= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1475,15 +949,12 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 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= @@ -1497,35 +968,16 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -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.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= 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.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 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= @@ -1536,13 +988,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1555,36 +1001,25 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/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/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -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/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -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.6/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= @@ -1594,7 +1029,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -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= @@ -1603,14 +1037,7 @@ 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= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= 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= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index fe19b93c..f62ab5fa 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -35,6 +35,7 @@ import ( // dispatched to the relevant listener. type blockConfirmationManager struct { ctx context.Context + cancelFunc func() log *log.Entry filterID ethbinding.HexBigInt filterStale bool @@ -46,16 +47,18 @@ type blockConfirmationManager struct { highestBlockSeen uint64 includeInPayload bool pending map[string]*pendingEvent + done chan struct{} } const ( - defaultConfirmations = 35 + defaultConfirmations = 20 /* no perfect answer here for a default, as it's chain and risk assessment dependent */ defaultBlockCacheSize = 1000 defaultEventQueueLength = 100 defaultPollingInterval = 1 * time.Second ) -type blockConfirmationConf struct { +// bcmConfExternal is the YAML/JSON parsable external configuration, with pointers to allow defaults to be applied, and units +type bcmConfExternal struct { Enabled bool `json:"enabled,omitempty"` RequiredConfirmations *int `json:"requiredConfirmations,omitempty"` BlockCacheSize *int `json:"blockCacheSize,omitempty"` @@ -64,6 +67,15 @@ type blockConfirmationConf struct { IncludeInPayload bool `json:"includeInPayload,omitempty"` } +// bcmConfInternal is the parsed config ready to use +type bcmConfInternal struct { + requiredConfirmations int + blockCacheSize int + pollingInterval time.Duration + eventQueueLength int + includeInPayload bool +} + type pendingEvent struct { key string added time.Time @@ -115,42 +127,59 @@ func (bi *blockInfo) MarshalJSON() ([]byte, error) { }) } -func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *blockConfirmationConf) (bcm *blockConfirmationManager, err error) { - requiredConfirmations := defaultConfirmations +func parseBCMConfig(conf *bcmConfExternal) *bcmConfInternal { + intConf := &bcmConfInternal{ + requiredConfirmations: defaultConfirmations, + blockCacheSize: defaultBlockCacheSize, + pollingInterval: defaultPollingInterval, + eventQueueLength: defaultEventQueueLength, + } if conf.RequiredConfirmations != nil { - requiredConfirmations = *conf.RequiredConfirmations + intConf.requiredConfirmations = *conf.RequiredConfirmations } - blockCacheSize := defaultBlockCacheSize if conf.BlockCacheSize != nil { - blockCacheSize = *conf.BlockCacheSize + intConf.blockCacheSize = *conf.BlockCacheSize } - pollingInterval := defaultPollingInterval if conf.BlockPollingIntervalSec != nil { - pollingInterval = time.Duration(*conf.BlockPollingIntervalSec) * time.Second + intConf.pollingInterval = time.Duration(*conf.BlockPollingIntervalSec) * time.Second } - eventQueueLength := defaultEventQueueLength if conf.EventQueueLength != nil { - eventQueueLength = *conf.EventQueueLength + intConf.eventQueueLength = *conf.EventQueueLength } + return intConf +} + +func newBlockConfirmationManager(ctx context.Context, rpc eth.RPCClient, conf *bcmConfInternal) (bcm *blockConfirmationManager, err error) { + bcmCtx, cancelFunc := context.WithCancel(ctx) bcm = &blockConfirmationManager{ - ctx: ctx, + ctx: bcmCtx, + cancelFunc: cancelFunc, rpc: rpc, log: log.WithField("job", "blockConfirmationManager"), - requiredConfirmations: requiredConfirmations, - pollingInterval: pollingInterval, + requiredConfirmations: conf.requiredConfirmations, + pollingInterval: conf.pollingInterval, filterStale: true, - bcmNotifications: make(chan *bcmNotification, eventQueueLength), + bcmNotifications: make(chan *bcmNotification, conf.eventQueueLength), pending: make(map[string]*pendingEvent), - includeInPayload: conf.IncludeInPayload, + includeInPayload: conf.includeInPayload, } - if bcm.blockCache, err = lru.New(blockCacheSize); err != nil { + if bcm.blockCache, err = lru.New(conf.blockCacheSize); err != nil { return nil, errors.Errorf(errors.EventStreamsCreateStreamResourceErr, err) } - go bcm.confirmationsListener() return bcm, nil } +func (bcm *blockConfirmationManager) start() { + bcm.done = make(chan struct{}) + go bcm.confirmationsListener() +} + +func (bcm *blockConfirmationManager) stop() { + bcm.cancelFunc() + <-bcm.done +} + // Notify is used to notify the confirmation manager of detection of a new logEntry addition or removal func (bcm *blockConfirmationManager) notify(ev *bcmNotification) { bcm.bcmNotifications <- ev @@ -194,7 +223,7 @@ func (bcm *blockConfirmationManager) getBlockByHash(blockHash *ethbinding.Hash) return nil, nil } bcm.blockCache.Add(blockInfo.Hash.String(), blockInfo) - bcm.log.Debugf("Downloded block header: %d / %s (by hash)", blockInfo.Number, blockInfo.Hash) + bcm.log.Debugf("Downloaded block header: %d / %s (by hash)", blockInfo.Number, blockInfo.Hash) // Store it by number in the cache we use for walking the chain bcm.blockCache.Add(blockInfo.Number, blockInfo) @@ -213,7 +242,7 @@ func (bcm *blockConfirmationManager) getBlockByNumber(number uint64) (*blockInfo if blockInfo == nil { return nil, nil } - bcm.log.Debugf("Downloded block header: %d / %s (by number)", blockInfo.Number, blockInfo.Hash) + bcm.log.Debugf("Downloaded block header: %d / %s (by number)", blockInfo.Number, blockInfo.Hash) // Store it by number in the cache we use for walking the chain bcm.blockCache.Add(blockInfo.Number, blockInfo) @@ -222,6 +251,7 @@ func (bcm *blockConfirmationManager) getBlockByNumber(number uint64) (*blockInfo } func (bcm *blockConfirmationManager) confirmationsListener() { + defer close(bcm.done) pollTimer := time.NewTimer(0) notifications := make([]*bcmNotification, 0) for { @@ -351,7 +381,7 @@ func (bcm *blockConfirmationManager) processBlockHashes(blockHashes []*ethbindin continue } - // Get the block header + // Process the block for confirmations if err = bcm.processBlock(block); err != nil { bcm.log.Errorf("Failed to process block %d / %s: %s", block.Number, block.Hash, err) continue @@ -446,7 +476,7 @@ func (bcm *blockConfirmationManager) walkChainForEvent(pending *pendingEvent) (e pending.confirmations = pending.confirmations[:0] for { // No point in walking past the highest block we've seen via the notifier - if bcm.highestBlockSeen > 0 && blockNumber >= bcm.highestBlockSeen { + if bcm.highestBlockSeen > 0 && blockNumber > bcm.highestBlockSeen { bcm.log.Debugf("Waiting for confirmation after block %d event=%s", blockNumber, eventKey) return nil } diff --git a/internal/events/block_confirmations_test.go b/internal/events/block_confirmations_test.go new file mode 100644 index 00000000..c17aa668 --- /dev/null +++ b/internal/events/block_confirmations_test.go @@ -0,0 +1,168 @@ +// Copyright 2019 Kaleido + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package events + +import ( + "context" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/hyperledger/firefly-ethconnect/internal/ethbind" + "github.com/hyperledger/firefly-ethconnect/mocks/ethmocks" + ethbinding "github.com/kaleido-io/ethbinding/pkg" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func newTestBlockConfirmationManager(t *testing.T, enabled bool) (*blockConfirmationManager, *ethmocks.RPCClient) { + return newTestBlockConfirmationManagerConf(t, &bcmConfInternal{ + requiredConfirmations: 3, + blockCacheSize: defaultBlockCacheSize, + pollingInterval: 1 * time.Millisecond, + eventQueueLength: 1, + includeInPayload: true, + }) +} + +func newTestBlockConfirmationManagerConf(t *testing.T, conf *bcmConfInternal) (*blockConfirmationManager, *ethmocks.RPCClient) { + logrus.SetLevel(logrus.DebugLevel) + rpc := ðmocks.RPCClient{} + bcm, err := newBlockConfirmationManager(context.Background(), rpc, conf) + assert.NoError(t, err) + return bcm, rpc +} + +func TestBCMInitError(t *testing.T) { + badNumber := -1 + _, err := newBlockConfirmationManager(context.Background(), nil, parseBCMConfig(&bcmConfExternal{ + BlockCacheSize: &badNumber, + })) + assert.Regexp(t, "FFEC100041", err) +} + +func TestBlockConfirmationManagerE2E(t *testing.T) { + bcm, rpc := newTestBlockConfirmationManager(t, true) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + lastBlockDetected := false + + // Establish the block filter + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Once() + + // First poll for changes gives nothing, but we load up the event at this point for the next round + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + + bcm.notify(&bcmNotification{ + nType: bcmNewLog, + event: eventToConfirm, + eventStream: testStream, + }) + }).Return(nil).Once() + + // Next time round gives a block that is in the confirmation chain, but one block ahead + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + blockHash := ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df") // block 1003 + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ + &blockHash, + } + }).Return(nil).Once() + + // The next filter gives us 1003 - which is two blocks ahead of our notified log + block1003 := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + ParentHash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + } + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df" // block 1003 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003 + }).Return(nil).Once() + + // Then we should walk the chain by number to fill in 1002/1003, because our HWM is 1003 + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), + } + }).Return(nil).Once() + + // Then we should walk the chain by number to fill in 1002, because our HWM is 1003 + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1003 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003 + }).Return(nil).Once() + + // Then we get notified of 1004 to complete the last confirmation + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + blockHash := ethbinding.EthAPIShim.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8") + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ + &blockHash, + } + }).Return(nil).Once() + + // Which then gets downloaded, and should complete the confirmation + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == "0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8" // block 1004 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = &blockInfo{ + Number: 1004, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + lastBlockDetected = true + }).Return(nil).Once() + + // Subsequent calls get nothing, and blocks until close anyway + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + if lastBlockDetected { + <-bcm.ctx.Done() + } + }).Return(nil) + + bcm.start() + + dispatched := <-testStream.eventStream + assert.Equal(t, eventToConfirm, dispatched) + + bcm.stop() + <-bcm.done +} diff --git a/internal/events/submanager.go b/internal/events/submanager.go index 18a47066..f22ac2a0 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -80,12 +80,12 @@ type subscriptionManager interface { // SubscriptionManagerConf configuration type SubscriptionManagerConf struct { - EventLevelDBPath string `json:"eventsDB"` - EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` - CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` - CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` - WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` - Confirmations blockConfirmationConf `json:"confirmations,omitempty"` + EventLevelDBPath string `json:"eventsDB"` + EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` + CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` + CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` + WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` + Confirmations bcmConfExternal `json:"confirmations,omitempty"` } type subscriptionMGR struct { @@ -132,10 +132,11 @@ func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr conf.CatchupModeBlockGap = conf.CatchupModePageSize } if conf.Confirmations.Enabled { - sm.bcm, err = newBlockConfirmationManager(context.Background(), sm.rpc, &conf.Confirmations) + sm.bcm, err = newBlockConfirmationManager(context.Background(), sm.rpc, parseBCMConfig(&conf.Confirmations)) if err != nil { return nil, err } + sm.bcm.start() } return SubscriptionManager(sm), nil } @@ -518,6 +519,9 @@ func (s *subscriptionMGR) Close(wait bool) { if !s.closed && s.db != nil { s.db.Close() } + if s.bcm != nil { + s.bcm.stop() + } s.closed = true } From 8c04f619cdc4f2558b724532124db9201cf90b04 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 4 Apr 2022 14:46:43 -0400 Subject: [PATCH 11/16] Additional tests for confirmations manager component Signed-off-by: Peter Broadhurst --- internal/events/block_confirmations.go | 78 ++- internal/events/block_confirmations_test.go | 678 +++++++++++++++++++- internal/events/submanager_test.go | 1 + 3 files changed, 696 insertions(+), 61 deletions(-) diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index f62ab5fa..3063c00c 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -81,6 +81,7 @@ type pendingEvent struct { added time.Time confirmations []*blockInfo blockNumber uint64 + logIndex uint64 event *eventData eventStream *eventStream } @@ -90,8 +91,8 @@ type pendingEvents []*pendingEvent func (pe pendingEvents) Len() int { return len(pe) } func (pe pendingEvents) Swap(i, j int) { pe[i], pe[j] = pe[j], pe[i] } func (pe pendingEvents) Less(i, j int) bool { - return pe[i].event.BlockNumber < pe[j].event.BlockNumber || - (pe[i].event.BlockNumber == pe[j].event.BlockNumber && pe[i].event.LogIndex < pe[j].event.LogIndex) + return pe[i].blockNumber < pe[j].blockNumber || + (pe[i].blockNumber == pe[j].blockNumber && pe[i].logIndex < pe[j].logIndex) } type bcmEventType int @@ -210,7 +211,17 @@ func (bcm *blockConfirmationManager) pollBlockFilter() ([]*ethbinding.Hash, erro return blockHashes, nil } +func (bcm *blockConfirmationManager) addToCache(blockInfo *blockInfo) { + bcm.blockCache.Add(blockInfo.Hash.String(), blockInfo) + bcm.blockCache.Add(strconv.FormatUint(uint64(blockInfo.Number), 10), blockInfo) +} + func (bcm *blockConfirmationManager) getBlockByHash(blockHash *ethbinding.Hash) (*blockInfo, error) { + cached, ok := bcm.blockCache.Get(blockHash.String()) + if ok { + return cached.(*blockInfo), nil + } + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) defer cancel() @@ -222,31 +233,38 @@ func (bcm *blockConfirmationManager) getBlockByHash(blockHash *ethbinding.Hash) if blockInfo == nil { return nil, nil } - bcm.blockCache.Add(blockInfo.Hash.String(), blockInfo) - bcm.log.Debugf("Downloaded block header: %d / %s (by hash)", blockInfo.Number, blockInfo.Hash) - - // Store it by number in the cache we use for walking the chain - bcm.blockCache.Add(blockInfo.Number, blockInfo) + bcm.log.Debugf("Downloaded block header by hash: %d / %s parent=%s", blockInfo.Number, blockInfo.Hash, blockInfo.ParentHash) + bcm.addToCache(blockInfo) return blockInfo, nil } -func (bcm *blockConfirmationManager) getBlockByNumber(number uint64) (*blockInfo, error) { +func (bcm *blockConfirmationManager) getBlockByNumber(blockNumber uint64, expectedParentHash string) (*blockInfo, error) { + cached, ok := bcm.blockCache.Get(strconv.FormatUint(blockNumber, 10)) + if ok { + blockInfo := cached.(*blockInfo) + parentHash := blockInfo.ParentHash.String() + if parentHash != expectedParentHash { + // Treat a missing block, or a mismatched block, both as a cache miss and query the node + bcm.log.Debugf("Block cache miss due to parent hash mismatch: %d / %s parent=%s required=%s ", blockInfo.Number, blockInfo.Hash, parentHash, expectedParentHash) + } else { + return blockInfo, nil + } + } + ctx, cancel := context.WithTimeout(bcm.ctx, 30*time.Second) defer cancel() var blockInfo *blockInfo - err := bcm.rpc.CallContext(ctx, &blockInfo, "eth_getBlockByNumber", ethbinding.HexUint64(number), false /* only the txn hashes */) + err := bcm.rpc.CallContext(ctx, &blockInfo, "eth_getBlockByNumber", ethbinding.HexUint64(blockNumber), false /* only the txn hashes */) if err != nil { return nil, errors.Errorf(errors.RPCCallReturnedError, "eth_getBlockByNumber", err) } if blockInfo == nil { return nil, nil } - bcm.log.Debugf("Downloaded block header: %d / %s (by number)", blockInfo.Number, blockInfo.Hash) - - // Store it by number in the cache we use for walking the chain - bcm.blockCache.Add(blockInfo.Number, blockInfo) + bcm.log.Debugf("Downloaded block header by number: %d / %s parent=%s", blockInfo.Number, blockInfo.Hash, blockInfo.ParentHash) + bcm.addToCache(blockInfo) return blockInfo, nil } @@ -348,8 +366,9 @@ func (bcm *blockConfirmationManager) streamStopped(notification *bcmNotification // addEvent is called by the goroutine on receipt of a new event notification func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eventStream) *pendingEvent { - // We have settled on a string for block number on the external interface, but need to compare it here + // We have settled on a string for block number / log index on the external interface, but need to compare & sort it here blockNumber, _ := strconv.ParseUint(event.BlockNumber, 10, 64) + logIndex, _ := strconv.ParseUint(event.LogIndex, 10, 64) // Add the event eventKey := bcm.keyForEvent(event) @@ -358,6 +377,7 @@ func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eve added: time.Now(), confirmations: make([]*blockInfo, 0, bcm.requiredConfirmations), blockNumber: blockNumber, + logIndex: logIndex, event: event, eventStream: eventStream, } @@ -373,19 +393,20 @@ func (bcm *blockConfirmationManager) removeEvent(event *eventData) { } func (bcm *blockConfirmationManager) processBlockHashes(blockHashes []*ethbinding.Hash) { + if len(blockHashes) > 0 { + bcm.log.Debugf("New block notifications %v", blockHashes) + } + for _, blockHash := range blockHashes { // Get the block header block, err := bcm.getBlockByHash(blockHash) if err != nil || block == nil { - bcm.log.Errorf("Failed to retrieve block %s: %s", blockHash, err) + bcm.log.Errorf("Failed to retrieve block %s: %v", blockHash, err) continue } // Process the block for confirmations - if err = bcm.processBlock(block); err != nil { - bcm.log.Errorf("Failed to process block %d / %s: %s", block.Number, block.Hash, err) - continue - } + bcm.processBlock(block) // Update the highest block (used for efficiency in chain walks) if uint64(block.Number) > bcm.highestBlockSeen { @@ -394,7 +415,7 @@ func (bcm *blockConfirmationManager) processBlockHashes(blockHashes []*ethbindin } } -func (bcm *blockConfirmationManager) processBlock(block *blockInfo) error { +func (bcm *blockConfirmationManager) processBlock(block *blockInfo) { // Go through all the events, adding in the confirmations, and popping any out // that have reached their threshold. Then drop the log before logging/processing them. @@ -428,7 +449,6 @@ func (bcm *blockConfirmationManager) processBlock(block *blockInfo) error { for _, c := range confirmed { bcm.dispatchConfirmed(c) } - return nil } @@ -477,20 +497,12 @@ func (bcm *blockConfirmationManager) walkChainForEvent(pending *pendingEvent) (e for { // No point in walking past the highest block we've seen via the notifier if bcm.highestBlockSeen > 0 && blockNumber > bcm.highestBlockSeen { - bcm.log.Debugf("Waiting for confirmation after block %d event=%s", blockNumber, eventKey) + bcm.log.Debugf("Waiting for confirmation after block %d event=%s", bcm.highestBlockSeen, eventKey) return nil } - var block *blockInfo - cached, ok := bcm.blockCache.Get(blockNumber) - if ok { - block = cached.(*blockInfo) - } - // Treat a missing block, or a mismatched block, both as a cache miss and query the node - if block == nil || block.ParentHash.String() != expectedParentHash { - block, err = bcm.getBlockByNumber(blockNumber) - if err != nil { - return err - } + block, err := bcm.getBlockByNumber(blockNumber, expectedParentHash) + if err != nil { + return err } if block == nil { bcm.log.Infof("Block %d unavailable walking chain event=%s", blockNumber, eventKey) diff --git a/internal/events/block_confirmations_test.go b/internal/events/block_confirmations_test.go index c17aa668..658a23e8 100644 --- a/internal/events/block_confirmations_test.go +++ b/internal/events/block_confirmations_test.go @@ -16,6 +16,9 @@ package events import ( "context" + "encoding/json" + "fmt" + "sort" "testing" "time" @@ -54,7 +57,27 @@ func TestBCMInitError(t *testing.T) { assert.Regexp(t, "FFEC100041", err) } -func TestBlockConfirmationManagerE2E(t *testing.T) { +func TestParseBCMConfig(t *testing.T) { + requiredConfirmations := 32 + blockCacheSize := 100 + blockPollingIntervalSec := 15 + eventQueueLength := 1 + conf := parseBCMConfig(&bcmConfExternal{ + Enabled: true, + RequiredConfirmations: &requiredConfirmations, + BlockCacheSize: &blockCacheSize, + BlockPollingIntervalSec: &blockPollingIntervalSec, + EventQueueLength: &eventQueueLength, + }) + assert.Equal(t, &bcmConfInternal{ + requiredConfirmations: 32, + blockCacheSize: 100, + pollingInterval: 15 * time.Second, + eventQueueLength: 1, + }, conf) +} + +func TestBlockConfirmationManagerE2ENewEvent(t *testing.T) { bcm, rpc := newTestBlockConfirmationManager(t, true) testStream := &eventStream{ @@ -87,64 +110,60 @@ func TestBlockConfirmationManagerE2E(t *testing.T) { }).Return(nil).Once() // Next time round gives a block that is in the confirmation chain, but one block ahead + block1003 := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + ParentHash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + } rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { return i.ToInt().Int64() == int64(1977) })).Run(func(args mock.Arguments) { - blockHash := ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df") // block 1003 *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ - &blockHash, + &block1003.Hash, } }).Return(nil).Once() // The next filter gives us 1003 - which is two blocks ahead of our notified log - block1003 := &blockInfo{ - Number: 1003, - Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), - ParentHash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), - } rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { - return b.String() == "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df" // block 1003 + return b.String() == block1003.Hash.String() }), false).Run(func(args mock.Arguments) { *(args[1].(**blockInfo)) = block1003 }).Return(nil).Once() // Then we should walk the chain by number to fill in 1002/1003, because our HWM is 1003 + block1002 := &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), + } rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { return uint64(i) == 1002 }), false).Run(func(args mock.Arguments) { - *(args[1].(**blockInfo)) = &blockInfo{ - Number: 1002, - Hash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), - ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), - } + *(args[1].(**blockInfo)) = block1002 }).Return(nil).Once() - // Then we should walk the chain by number to fill in 1002, because our HWM is 1003 - rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { - return uint64(i) == 1003 - }), false).Run(func(args mock.Arguments) { - *(args[1].(**blockInfo)) = block1003 - }).Return(nil).Once() + // Then we should walk the chain by number to fill in 1002, because our HWM is 1003. + // Note this doesn't result in any RPC calls, as we just cached the block and it matches // Then we get notified of 1004 to complete the last confirmation + block1004 := &blockInfo{ + Number: 1004, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { return i.ToInt().Int64() == int64(1977) })).Run(func(args mock.Arguments) { - blockHash := ethbinding.EthAPIShim.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8") *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ - &blockHash, + &block1004.Hash, } }).Return(nil).Once() // Which then gets downloaded, and should complete the confirmation rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { - return b.String() == "0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8" // block 1004 + return b.String() == block1004.Hash.String() }), false).Run(func(args mock.Arguments) { - *(args[1].(**blockInfo)) = &blockInfo{ - Number: 1004, - Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), - ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), - } + *(args[1].(**blockInfo)) = block1004 lastBlockDetected = true }).Return(nil).Once() @@ -156,8 +175,192 @@ func TestBlockConfirmationManagerE2E(t *testing.T) { if lastBlockDetected { <-bcm.ctx.Done() } + }).Return(nil).Maybe() + + bcm.start() + + dispatched := <-testStream.eventStream + assert.Equal(t, eventToConfirm, dispatched) + + bcm.stop() + <-bcm.done + + rpc.AssertExpectations(t) +} + +func TestBlockConfirmationManagerE2EFork(t *testing.T) { + bcm, rpc := newTestBlockConfirmationManager(t, true) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + lastBlockDetected := false + + // Establish the block filter + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Once() + + // The next filter gives us 1002, and a first 1003 block - which will later be removed + block1002 := &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), + } + block1003a := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ + &block1002.Hash, + &block1003a.Hash, + } + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == block1002.Hash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1002 + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == block1003a.Hash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003a + }).Return(nil).Once() + + // Then we get the final fork up to our confirmation + block1003b := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + block1004 := &blockInfo{ + Number: 1004, + Hash: ethbind.API.HexToHash("0x110282339db2dfe4bfd13d78375f7883048cac6bc12f8393bd080a4e263d5d21"), + ParentHash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + } + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{ + &block1003b.Hash, + &block1004.Hash, + } + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == block1003b.Hash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003b + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == block1004.Hash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1004 + }).Return(nil).Once() + + // Subsequent calls get nothing, and blocks until close anyway + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + if lastBlockDetected { + <-bcm.ctx.Done() + } + }).Return(nil) + + bcm.start() + + bcm.notify(&bcmNotification{ + nType: bcmNewLog, + event: eventToConfirm, + eventStream: testStream, + }) + + dispatched := <-testStream.eventStream + assert.Equal(t, eventToConfirm, dispatched) + assert.Len(t, eventToConfirm.Confirmations, 3) + assert.Equal(t, block1002.Hash.String(), eventToConfirm.Confirmations[0].Hash.String()) + assert.Equal(t, block1003b.Hash.String(), eventToConfirm.Confirmations[1].Hash.String()) + assert.Equal(t, block1004.Hash.String(), eventToConfirm.Confirmations[2].Hash.String()) + + bcm.stop() + <-bcm.done + + rpc.AssertExpectations(t) + +} + +func TestBlockConfirmationManagerE2EHistoricalEvent(t *testing.T) { + bcm, rpc := newTestBlockConfirmationManager(t, true) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + bcm.notify(&bcmNotification{ + nType: bcmNewLog, + event: eventToConfirm, + eventStream: testStream, + }) + + // Establish the block filter + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Once() + + // We don't notify of any new blocks + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} }).Return(nil) + // Then we should walk the chain by number to fill in 1002/1003, because our HWM is 1003 + block1002 := &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), + } + block1003 := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + ParentHash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + } + block1004 := &blockInfo{ + Number: 1004, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1002 + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1003 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003 + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1004 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1004 + }).Return(nil).Once() + bcm.start() dispatched := <-testStream.eventStream @@ -165,4 +368,423 @@ func TestBlockConfirmationManagerE2E(t *testing.T) { bcm.stop() <-bcm.done + + rpc.AssertExpectations(t) +} + +func TestSortPendingEvents(t *testing.T) { + events := pendingEvents{ + {blockNumber: 1000, logIndex: 10}, + {blockNumber: 1003, logIndex: 10}, + {blockNumber: 1000, logIndex: 5}, + {blockNumber: 1002, logIndex: 0}, + } + sort.Sort(events) + assert.Equal(t, pendingEvents{ + {blockNumber: 1000, logIndex: 5}, + {blockNumber: 1000, logIndex: 10}, + {blockNumber: 1002, logIndex: 0}, + {blockNumber: 1003, logIndex: 10}, + }, events) +} + +func TestMarshalJSONBlockInfo(t *testing.T) { + bi := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + Timestamp: 1649077248, + } + d, err := json.Marshal(&bi) + assert.NoError(t, err) + assert.JSONEq(t, ` + { + "hash":"0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8", + "number":"1003", + "parentHash":"0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df", + "timestamp":"1649077248" + }`, string(d)) +} + +func TestCreateBlockFilterFail(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + bcm.cancelFunc() + }).Return(fmt.Errorf("pop")).Once() + + bcm.confirmationsListener() + + rpc.AssertExpectations(t) +} + +func TestConfirmationsListenerFailWalkingChain(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + bcm.addEvent(eventToConfirm, testStream) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + bcm.cancelFunc() + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Return(fmt.Errorf("pop")).Once() + + bcm.confirmationsListener() + + rpc.AssertExpectations(t) +} + +func TestConfirmationsListenerFailPollingBlocks(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + bcm.cancelFunc() + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == 1977 + })).Return(fmt.Errorf("pop")).Once() + + bcm.confirmationsListener() + + rpc.AssertExpectations(t) +} + +func TestConfirmationsListenerLostFilterReestablish(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Twice() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == 1977 + })).Return(fmt.Errorf("filter not found")).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + bcm.cancelFunc() + return i.ToInt().Int64() == 1977 + })).Return(nil).Once() + + bcm.confirmationsListener() + + rpc.AssertExpectations(t) +} + +func TestConfirmationsListenerFailWalkingChainForNewEvent(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + bcm.notify(&bcmNotification{ + nType: bcmNewLog, + event: eventToConfirm, + eventStream: testStream, + }) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + bcm.cancelFunc() + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + }).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Return(fmt.Errorf("pop")).Once() + + bcm.confirmationsListener() + + rpc.AssertExpectations(t) +} + +func TestConfirmationsListenerStopStream(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + eventToConfirm := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + completed := make(chan struct{}) + bcm.addEvent(eventToConfirm, testStream) + bcm.notify(&bcmNotification{ + nType: bcmStopStream, + eventStream: testStream, + complete: completed, + }) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + }).Return(nil) + + bcm.start() + + <-completed + assert.Empty(t, bcm.pending) + + bcm.stop() + rpc.AssertExpectations(t) +} + +func TestConfirmationsRemoveEvent(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + bcm.done = make(chan struct{}) + + testStream := &eventStream{ + eventStream: make(chan *eventData, 1), + } + event := &eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + } + bcm.addEvent(event, testStream) + bcm.notify(&bcmNotification{ + nType: bcmRemovedLog, + event: event, + }) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Maybe() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + bcm.cancelFunc() + }).Return(nil).Maybe() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = nil + }).Return(nil).Once() + + bcm.start() + <-bcm.done + + assert.Empty(t, bcm.pending) + rpc.AssertExpectations(t) +} + +func TestWalkChainForEventBlockNotAvailable(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + testStream := &eventStream{} + pendingEvent := bcm.addEvent(&eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + }, testStream) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = nil + }).Return(nil).Once() + + err := bcm.walkChainForEvent(pendingEvent) + assert.NoError(t, err) + + rpc.AssertExpectations(t) +} + +func TestWalkChainForEventBlockNotInConfirmationChain(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + testStream := &eventStream{} + pendingEvent := bcm.addEvent(&eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + }, testStream) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + }).Return(nil).Once() + + err := bcm.walkChainForEvent(pendingEvent) + assert.NoError(t, err) + + rpc.AssertExpectations(t) +} + +func TestWalkChainForEventBlockLookupFail(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + testStream := &eventStream{} + pendingEvent := bcm.addEvent(&eventData{ + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockNumber: "1001", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + LogIndex: "10", + }, testStream) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Return(fmt.Errorf("pop")).Once() + + err := bcm.walkChainForEvent(pendingEvent) + assert.Regexp(t, "pop", err) + + rpc.AssertExpectations(t) +} + +func TestProcessBlockHashesLookupFail(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + blockHash := ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8") + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == blockHash.String() + }), false).Return(fmt.Errorf("pop")).Once() + + bcm.processBlockHashes([]*ethbinding.Hash{ + &blockHash, + }) + + rpc.AssertExpectations(t) +} + +func TestProcessNotificationsSwallowsUnknownType(t *testing.T) { + + bcm, _ := newTestBlockConfirmationManager(t, false) + bcm.processNotifications([]*bcmNotification{ + {nType: bcmEventType(999)}, + }) +} + +func TestGetBlockByNumberForceLookupMismatchedBlockType(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0xed21f4f73d150f16f922ae82b7485cd936ae1eca4c027516311b928360a347e8"), + ParentHash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + } + }).Return(nil).Once() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { + return uint64(i) == 1002 + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = &blockInfo{ + Number: 1002, + Hash: ethbind.API.HexToHash("0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7"), + ParentHash: ethbind.API.HexToHash("0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542"), + } + }).Return(nil).Once() + + // Make the first call that caches + blockInfo, err := bcm.getBlockByNumber(1002, "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df") + assert.NoError(t, err) + assert.Equal(t, "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df", blockInfo.ParentHash.String()) + + // Make second call that is cached as parent matches + blockInfo, err = bcm.getBlockByNumber(1002, "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df") + assert.NoError(t, err) + assert.Equal(t, "0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df", blockInfo.ParentHash.String()) + + // Make third call that does not as parent mismatched + blockInfo, err = bcm.getBlockByNumber(1002, "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542") + assert.NoError(t, err) + assert.Equal(t, "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", blockInfo.ParentHash.String()) + +} + +func TestGetBlockByHashCached(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + block1003 := &blockInfo{ + Number: 1003, + Hash: ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df"), + ParentHash: ethbind.API.HexToHash("0x46210d224888265c269359529618bf2f6adb2697ff52c63c10f16a2391bdd295"), + } + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == block1003.Hash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = block1003 + }).Return(nil).Once() + + blockInfo, err := bcm.getBlockByHash(&block1003.Hash) + assert.NoError(t, err) + assert.Equal(t, block1003, blockInfo) + + // Get again cached + blockInfo, err = bcm.getBlockByHash(&block1003.Hash) + assert.NoError(t, err) + assert.Equal(t, block1003, blockInfo) + +} + +func TestGetBlockNotFound(t *testing.T) { + + bcm, rpc := newTestBlockConfirmationManager(t, false) + + blockHash := ethbind.API.HexToHash("0x64fd8179b80dd255d52ce60d7f265c0506be810e2f3df52463fadeb44bb4d2df") + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByHash", mock.MatchedBy(func(b *ethbinding.Hash) bool { + return b.String() == blockHash.String() + }), false).Run(func(args mock.Arguments) { + *(args[1].(**blockInfo)) = nil + }).Return(nil).Once() + + blockInfo, err := bcm.getBlockByHash(&blockHash) + assert.NoError(t, err) + assert.Nil(t, blockInfo) + } diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index 71258f3c..122c805e 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -226,6 +226,7 @@ func TestActionChildCleanup(t *testing.T) { blockCall := make(chan struct{}) rpc := ðmocks.RPCClient{} rpc.On("CallContext", mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { <-blockCall }).Return(nil) + rpc.On("CallContext", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { <-blockCall }).Return(nil) rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newFilter", mock.Anything).Return(nil) sm.rpc = rpc From d41052cd6509a9cbcc4236c1ec5b1bb14c94085a Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 4 Apr 2022 17:59:45 -0400 Subject: [PATCH 12/16] Close out tests, and add fix for config typo with migration Signed-off-by: Peter Broadhurst --- .vscode/settings.json | 4 + internal/events/block_confirmations.go | 18 ++-- internal/events/block_confirmations_test.go | 108 +++++++++++--------- internal/events/eventstream.go | 94 ++++++++++------- internal/events/eventstream_test.go | 69 +++++++++++-- internal/events/logprocessor.go | 11 +- internal/events/logprocessor_test.go | 88 ++++++++++++++++ internal/events/submanager.go | 22 ++-- internal/events/submanager_test.go | 4 +- 9 files changed, 307 insertions(+), 111 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f9c0e520..f3f56225 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,10 @@ "Debugf", "hashicorp", "Infof", + "kvstore", + "smconf", + "stretchr", + "Unconfigured", "Warnf" ] } \ No newline at end of file diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index 3063c00c..a216b57a 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -80,8 +80,6 @@ type pendingEvent struct { key string added time.Time confirmations []*blockInfo - blockNumber uint64 - logIndex uint64 event *eventData eventStream *eventStream } @@ -91,8 +89,9 @@ type pendingEvents []*pendingEvent func (pe pendingEvents) Len() int { return len(pe) } func (pe pendingEvents) Swap(i, j int) { pe[i], pe[j] = pe[j], pe[i] } func (pe pendingEvents) Less(i, j int) bool { - return pe[i].blockNumber < pe[j].blockNumber || - (pe[i].blockNumber == pe[j].blockNumber && pe[i].logIndex < pe[j].logIndex) + return pe[i].event.blockNumber < pe[j].event.blockNumber || + (pe[i].event.blockNumber == pe[j].event.blockNumber && (pe[i].event.transactionIndex < pe[j].event.transactionIndex || + (pe[i].event.transactionIndex == pe[j].event.transactionIndex && pe[i].event.logIndex < pe[j].event.logIndex))) } type bcmEventType int @@ -331,7 +330,7 @@ func (bcm *blockConfirmationManager) confirmationsListener() { } func (bcm *blockConfirmationManager) keyForEvent(event *eventData) string { - return fmt.Sprintf("TX:%s|BLOCK:%s/%s|IDX:%s", event.TransactionHash, event.BlockNumber, event.BlockHash, event.LogIndex) + return fmt.Sprintf("TX:%s|BLOCK:%s/%s|INDEX:%s|LOG:%s", event.TransactionHash, event.BlockNumber, event.BlockHash, event.TransactionIndex, event.LogIndex) } func (bcm *blockConfirmationManager) processNotifications(notifications []*bcmNotification) error { @@ -366,9 +365,6 @@ func (bcm *blockConfirmationManager) streamStopped(notification *bcmNotification // addEvent is called by the goroutine on receipt of a new event notification func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eventStream) *pendingEvent { - // We have settled on a string for block number / log index on the external interface, but need to compare & sort it here - blockNumber, _ := strconv.ParseUint(event.BlockNumber, 10, 64) - logIndex, _ := strconv.ParseUint(event.LogIndex, 10, 64) // Add the event eventKey := bcm.keyForEvent(event) @@ -376,8 +372,6 @@ func (bcm *blockConfirmationManager) addEvent(event *eventData, eventStream *eve key: bcm.keyForEvent(event), added: time.Now(), confirmations: make([]*blockInfo, 0, bcm.requiredConfirmations), - blockNumber: blockNumber, - logIndex: logIndex, event: event, eventStream: eventStream, } @@ -425,7 +419,7 @@ func (bcm *blockConfirmationManager) processBlock(block *blockInfo) { for eventKey, pending := range bcm.pending { // The block might appear at any point in the confirmation list expectedParentHash := pending.event.BlockHash - expectedBlockNumber := pending.blockNumber + 1 + expectedBlockNumber := pending.event.blockNumber + 1 for i := 0; i < (len(pending.confirmations) + 1); i++ { if parentStr == expectedParentHash && blockNumber == expectedBlockNumber { pending.confirmations = append(pending.confirmations[0:i], block) @@ -491,7 +485,7 @@ func (bcm *blockConfirmationManager) walkChainForEvent(pending *pendingEvent) (e eventKey := bcm.keyForEvent(pending.event) - blockNumber := pending.blockNumber + 1 + blockNumber := pending.event.blockNumber + 1 expectedParentHash := pending.event.BlockHash pending.confirmations = pending.confirmations[:0] for { diff --git a/internal/events/block_confirmations_test.go b/internal/events/block_confirmations_test.go index 658a23e8..b42ada13 100644 --- a/internal/events/block_confirmations_test.go +++ b/internal/events/block_confirmations_test.go @@ -84,10 +84,11 @@ func TestBlockConfirmationManagerE2ENewEvent(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } lastBlockDetected := false @@ -195,10 +196,11 @@ func TestBlockConfirmationManagerE2EFork(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } lastBlockDetected := false @@ -306,10 +308,11 @@ func TestBlockConfirmationManagerE2EHistoricalEvent(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } bcm.notify(&bcmNotification{ nType: bcmNewLog, @@ -374,17 +377,19 @@ func TestBlockConfirmationManagerE2EHistoricalEvent(t *testing.T) { func TestSortPendingEvents(t *testing.T) { events := pendingEvents{ - {blockNumber: 1000, logIndex: 10}, - {blockNumber: 1003, logIndex: 10}, - {blockNumber: 1000, logIndex: 5}, - {blockNumber: 1002, logIndex: 0}, + {event: &eventData{blockNumber: 1000, transactionIndex: 10, logIndex: 2}}, + {event: &eventData{blockNumber: 1003, transactionIndex: 0, logIndex: 10}}, + {event: &eventData{blockNumber: 1000, transactionIndex: 5, logIndex: 5}}, + {event: &eventData{blockNumber: 1000, transactionIndex: 10, logIndex: 0}}, + {event: &eventData{blockNumber: 1002, transactionIndex: 0, logIndex: 0}}, } sort.Sort(events) assert.Equal(t, pendingEvents{ - {blockNumber: 1000, logIndex: 5}, - {blockNumber: 1000, logIndex: 10}, - {blockNumber: 1002, logIndex: 0}, - {blockNumber: 1003, logIndex: 10}, + {event: &eventData{blockNumber: 1000, transactionIndex: 5, logIndex: 5}}, + {event: &eventData{blockNumber: 1000, transactionIndex: 10, logIndex: 0}}, + {event: &eventData{blockNumber: 1000, transactionIndex: 10, logIndex: 2}}, + {event: &eventData{blockNumber: 1002, transactionIndex: 0, logIndex: 0}}, + {event: &eventData{blockNumber: 1003, transactionIndex: 0, logIndex: 10}}, }, events) } @@ -429,10 +434,11 @@ func TestConfirmationsListenerFailWalkingChain(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } bcm.addEvent(eventToConfirm, testStream) @@ -497,10 +503,11 @@ func TestConfirmationsListenerFailWalkingChainForNewEvent(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } bcm.notify(&bcmNotification{ nType: bcmNewLog, @@ -535,10 +542,11 @@ func TestConfirmationsListenerStopStream(t *testing.T) { eventStream: make(chan *eventData, 1), } eventToConfirm := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } completed := make(chan struct{}) bcm.addEvent(eventToConfirm, testStream) @@ -575,10 +583,11 @@ func TestConfirmationsRemoveEvent(t *testing.T) { eventStream: make(chan *eventData, 1), } event := &eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, } bcm.addEvent(event, testStream) bcm.notify(&bcmNotification{ @@ -614,10 +623,11 @@ func TestWalkChainForEventBlockNotAvailable(t *testing.T) { testStream := &eventStream{} pendingEvent := bcm.addEvent(&eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, }, testStream) rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { @@ -638,10 +648,11 @@ func TestWalkChainForEventBlockNotInConfirmationChain(t *testing.T) { testStream := &eventStream{} pendingEvent := bcm.addEvent(&eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, }, testStream) rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { @@ -666,10 +677,11 @@ func TestWalkChainForEventBlockLookupFail(t *testing.T) { testStream := &eventStream{} pendingEvent := bcm.addEvent(&eventData{ - TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", - BlockNumber: "1001", - BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", - LogIndex: "10", + TransactionHash: "0x531e219d98d81dc9f9a14811ac537479f5d77a74bdba47629bfbebe2d7663ce7", + BlockHash: "0x0e32d749a86cfaf551d528b5b121cea456f980a39e5b8136eb8e85dbc744a542", + blockNumber: 1001, + transactionIndex: 5, + logIndex: 10, }, testStream) rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getBlockByNumber", mock.MatchedBy(func(i hexutil.Uint64) bool { diff --git a/internal/events/eventstream.go b/internal/events/eventstream.go index 1479badd..bcd5ffe3 100644 --- a/internal/events/eventstream.go +++ b/internal/events/eventstream.go @@ -20,6 +20,7 @@ import ( "math/big" "net" "net/url" + "strconv" "strings" "sync" "time" @@ -28,6 +29,7 @@ import ( "github.com/hyperledger/firefly-ethconnect/internal/errors" "github.com/hyperledger/firefly-ethconnect/internal/messages" "github.com/hyperledger/firefly-ethconnect/internal/ws" + ethbinding "github.com/kaleido-io/ethbinding/pkg" lru "github.com/hashicorp/golang-lru" log "github.com/sirupsen/logrus" @@ -69,7 +71,8 @@ type StreamInfo struct { BatchTimeoutMS uint64 `json:"batchTimeoutMS,omitempty"` ErrorHandling string `json:"errorHandling,omitempty"` RetryTimeoutSec uint64 `json:"retryTimeoutSec,omitempty"` - BlockedRetryDelaySec uint64 `json:"blockedReryDelaySec,omitempty"` + TypoReryDelaySec uint64 `json:"blockedReryDelaySec,omitempty"` + BlockedRetryDelaySec *uint64 `json:"blockedRetryDelaySec,omitempty"` Webhook *webhookActionInfo `json:"webhook,omitempty"` WebSocket *webSocketActionInfo `json:"websocket,omitempty"` Timestamps bool `json:"timestamps,omitempty"` // Include block timestamps in the events generated @@ -90,23 +93,24 @@ type webSocketActionInfo struct { } type eventStream struct { - sm subscriptionManager - allowPrivateIPs bool - spec *StreamInfo - eventStream chan *eventData - stopped bool - pollingInterval time.Duration - inFlight uint64 - batchCond *sync.Cond - batchQueue *list.List - batchCount uint64 - initialRetryDelay time.Duration - backoffFactor float64 - updateInProgress bool - updateInterrupt chan struct{} // a zero-sized struct used only for signaling (hand rolled alternative to context) - blockTimestampCache *lru.Cache - action eventStreamAction - wsChannels ws.WebSocketChannels + sm subscriptionManager + allowPrivateIPs bool + spec *StreamInfo + eventStream chan *eventData + stopped bool + pollingInterval time.Duration + inFlight uint64 + batchCond *sync.Cond + batchQueue *list.List + batchCount uint64 + initialRetryDelay time.Duration + backoffFactor float64 + updateInProgress bool + updateInterrupt chan struct{} // a zero-sized struct used only for signaling (hand rolled alternative to context) + blockTimestampCache *lru.Cache + action eventStreamAction + wsChannels ws.WebSocketChannels + hexFormatTransactionIndex bool eventPollerDone chan struct{} batchProcessorDone chan struct{} @@ -141,9 +145,6 @@ func newEventStream(sm subscriptionManager, spec *StreamInfo, wsChannels ws.WebS if spec.BatchTimeoutMS == 0 { spec.BatchTimeoutMS = 5000 } - if spec.BlockedRetryDelaySec == 0 { - spec.BlockedRetryDelaySec = 30 - } if strings.ToLower(spec.ErrorHandling) == ErrorHandlingBlock { spec.ErrorHandling = ErrorHandlingBlock } else { @@ -154,16 +155,17 @@ func newEventStream(sm subscriptionManager, spec *StreamInfo, wsChannels ws.WebS } a = &eventStream{ - sm: sm, - spec: spec, - allowPrivateIPs: sm.config().WebhooksAllowPrivateIPs, - eventStream: make(chan *eventData), - batchCond: sync.NewCond(&sync.Mutex{}), - batchQueue: list.New(), - initialRetryDelay: DefaultExponentialBackoffInitial, - backoffFactor: DefaultExponentialBackoffFactor, - pollingInterval: time.Duration(sm.config().EventPollingIntervalSec) * time.Second, - wsChannels: wsChannels, + sm: sm, + spec: spec, + allowPrivateIPs: sm.config().WebhooksAllowPrivateIPs, + eventStream: make(chan *eventData), + batchCond: sync.NewCond(&sync.Mutex{}), + batchQueue: list.New(), + initialRetryDelay: DefaultExponentialBackoffInitial, + backoffFactor: DefaultExponentialBackoffFactor, + pollingInterval: time.Duration(sm.config().EventPollingIntervalSec) * time.Second, + wsChannels: wsChannels, + hexFormatTransactionIndex: *sm.config().HexFormatTransactionIndex, } if a.blockTimestampCache, err = lru.New(spec.TimestampCacheSize); err != nil { @@ -199,6 +201,16 @@ func newEventStream(sm subscriptionManager, spec *StreamInfo, wsChannels ws.WebS return a, nil } +// formatTransactionIndex honors the configuration for whether transactionIndex should be an `0x` +// hex string on the return. This was a bug in earlier version of ethconnect, and an option +// is provided to restore the old behavior in case an application was depending on it. +func (a *eventStream) formatTransactionIndex(txIndex ethbinding.HexUint) string { + if a.hexFormatTransactionIndex { + return txIndex.String() + } + return strconv.FormatUint(uint64(txIndex), 10) +} + // helper to kick off go routines and any tracking entities func (a *eventStream) startEventHandlers(resume bool) { // create a context that can be used to indicate an update to the eventstream @@ -219,6 +231,17 @@ func (spec *StreamInfo) GetID() string { return spec.ID } +func (spec *StreamInfo) blockedRetryDelaySec() uint64 { + if spec.BlockedRetryDelaySec == nil { + if spec.TypoReryDelaySec > 0 { + return spec.TypoReryDelaySec + } else { + return 30 + } + } + return *spec.BlockedRetryDelaySec +} + // preUpdateStream sets a flag to indicate updateInProgress and wakes up goroutines waiting on condition variable func (a *eventStream) preUpdateStream() error { a.batchCond.L.Lock() @@ -314,8 +337,9 @@ func (a *eventStream) checkUpdate(newSpec *StreamInfo) (updatedSpec *StreamInfo, if specCopy.BatchTimeoutMS != newSpec.BatchTimeoutMS && newSpec.BatchTimeoutMS != 0 { setUpdated().BatchTimeoutMS = newSpec.BatchTimeoutMS } - if specCopy.BlockedRetryDelaySec != newSpec.BlockedRetryDelaySec && newSpec.BlockedRetryDelaySec != 0 { - setUpdated().BlockedRetryDelaySec = newSpec.BlockedRetryDelaySec + if newSpec.BlockedRetryDelaySec != nil && specCopy.blockedRetryDelaySec() != newSpec.blockedRetryDelaySec() { + blockedRetryDelaySec := newSpec.blockedRetryDelaySec() + setUpdated().BlockedRetryDelaySec = &blockedRetryDelaySec } if newSpec.ErrorHandling != "" && newSpec.ErrorHandling != specCopy.ErrorHandling { if strings.ToLower(newSpec.ErrorHandling) == ErrorHandlingBlock { @@ -654,7 +678,7 @@ func (a *eventStream) batchProcessor() { // processBatch is the blocking function to process a batch of events // It never returns an error, and uses the chosen block/skip ErrorHandling -// behaviour combined with the parameters on the event itself +// behavior combined with the parameters on the event itself func (a *eventStream) processBatch(batchNumber uint64, events []*eventData) { if len(events) == 0 { return @@ -668,7 +692,7 @@ func (a *eventStream) processBatch(batchNumber uint64, events []*eventData) { // we were notified by the caller about an ongoing update, no need to continue log.Infof("%s: Notified of an ongoing stream update, terminating process batch", a.spec.ID) return - case <-time.After(time.Duration(a.spec.BlockedRetryDelaySec) * time.Second): //fall through and continue + case <-time.After(time.Duration(a.spec.blockedRetryDelaySec()) * time.Second): //fall through and continue } } attempt++ diff --git a/internal/events/eventstream_test.go b/internal/events/eventstream_test.go index 18cca7f1..8ee9bf94 100644 --- a/internal/events/eventstream_test.go +++ b/internal/events/eventstream_test.go @@ -26,6 +26,7 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/hyperledger/firefly-ethconnect/internal/contractregistry" "github.com/hyperledger/firefly-ethconnect/internal/errors" "github.com/hyperledger/firefly-ethconnect/internal/eth" @@ -96,6 +97,44 @@ func testEvent(subID string) *eventData { } } +func newTestStreamForConfirmations(t *testing.T) (*eventStream, func()) { + db := kvstore.NewMockKV(nil) + sm := newTestSubscriptionManagerConf(&SubscriptionManagerConf{ + Confirmations: bcmConfExternal{ + Enabled: true, + }, + }) + + // Mock the RPC calls for the block confirmations manager that will just spin returning no results + rpc := sm.rpc.(*ethmocks.RPCClient) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newBlockFilter").Run(func(args mock.Arguments) { + args[1].(*hexutil.Big).ToInt().SetString("1977", 10) + }).Return(nil).Maybe() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterChanges", mock.MatchedBy(func(i hexutil.Big) bool { + return i.ToInt().Int64() == int64(1977) + })).Run(func(args mock.Arguments) { + *(args[1].(*[]*ethbinding.Hash)) = []*ethbinding.Hash{} + }).Return(nil).Maybe() + + // Lock the event poller, so it doesn't do anything, until close + blockEventPollerThread := make(chan struct{}) + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newFilter", mock.Anything).Run(func(args mock.Arguments) { + <-blockEventPollerThread + }).Return(fmt.Errorf("test complete")).Maybe() + + sm.config().EventPollingIntervalSec = 0 + sm.db = db + ctx := context.Background() + stream, err := sm.AddStream(ctx, &StreamInfo{ + Type: "websocket", + }) + assert.NoError(t, err) + return sm.streams[stream.ID], func() { + close(blockEventPollerThread) + sm.Close(true) + } +} + func newTestStreamForBatching(spec *StreamInfo, db kvstore.KVStore, status ...int) (*subscriptionMGR, *eventStream, *httptest.Server, chan []*eventData) { mux := http.NewServeMux() eventStream := make(chan []*eventData) @@ -249,12 +288,13 @@ func TestStreamName(t *testing.T) { func TestBlockingBehavior(t *testing.T) { assert := assert.New(t) + one := uint64(1) _, stream, svr, eventStream := newTestStreamForBatching( &StreamInfo{ BatchSize: 1, Webhook: &webhookActionInfo{}, ErrorHandling: ErrorHandlingBlock, - BlockedRetryDelaySec: 1, + BlockedRetryDelaySec: &one, }, nil, 404) defer close(eventStream) defer svr.Close() @@ -274,12 +314,13 @@ func TestBlockingBehavior(t *testing.T) { } func TestSkippingBehavior(t *testing.T) { + one := uint64(1) _, stream, svr, eventStream := newTestStreamForBatching( &StreamInfo{ BatchSize: 1, Webhook: &webhookActionInfo{}, ErrorHandling: ErrorHandlingSkip, - BlockedRetryDelaySec: 1, + BlockedRetryDelaySec: &one, }, nil, 404 /* fail the requests */) defer close(eventStream) defer svr.Close() @@ -302,13 +343,14 @@ func TestSkippingBehavior(t *testing.T) { func TestBackoffRetry(t *testing.T) { assert := assert.New(t) + one := uint64(1) _, stream, svr, eventStream := newTestStreamForBatching( &StreamInfo{ BatchSize: 1, Webhook: &webhookActionInfo{}, ErrorHandling: ErrorHandlingBlock, RetryTimeoutSec: 1, - BlockedRetryDelaySec: 1, + BlockedRetryDelaySec: &one, }, nil, 404, 500, 503, 504, 200) defer close(eventStream) defer svr.Close() @@ -722,7 +764,7 @@ func TestProcessEventsEnd2EndWebSocket(t *testing.T) { WebSocket: &webSocketActionInfo{}, Timestamps: false, }, db, 200) - mockWebSocket.receiver <- fmt.Errorf("Spurious ack from a previvous socket - to be ignored") + mockWebSocket.receiver <- fmt.Errorf("Spurious ack from a previous socket - to be ignored") s := setupTestSubscription(assert, sm, stream, "mySubName") assert.Equal("mySubName", s.Name) @@ -1282,10 +1324,11 @@ func TestUpdateStream(t *testing.T) { ctx := context.Background() headers := make(map[string]string) headers["test-h1"] = "val1" + five := uint64(5) updateSpec := &StreamInfo{ BatchSize: 4, BatchTimeoutMS: 10000, - BlockedRetryDelaySec: 5, + BlockedRetryDelaySec: &five, ErrorHandling: ErrorHandlingBlock, Name: "new-name", Webhook: &webhookActionInfo{ @@ -1303,7 +1346,7 @@ func TestUpdateStream(t *testing.T) { assert.Equal(updatedStream.Inputs, true) assert.Equal(updatedStream.BatchSize, uint64(4)) assert.Equal(updatedStream.BatchTimeoutMS, uint64(10000)) - assert.Equal(updatedStream.BlockedRetryDelaySec, uint64(5)) + assert.Equal(*updatedStream.BlockedRetryDelaySec, uint64(5)) assert.Equal(updatedStream.ErrorHandling, ErrorHandlingBlock) assert.Equal(updatedStream.Webhook.URL, "http://foo.url") assert.Equal(updatedStream.Webhook.Headers["test-h1"], "val1") @@ -1320,6 +1363,13 @@ func TestUpdateStreamFail(t *testing.T) { assert.Nil(updatedStream) } +func TestTypoMigration(t *testing.T) { + typoConf := &StreamInfo{ + TypoReryDelaySec: 999, + } + assert.Equal(t, uint64(999), typoConf.blockedRetryDelaySec()) +} + func TestUpdateStreamSwapType(t *testing.T) { assert := assert.New(t) dir := tempdir(t) @@ -1531,3 +1581,10 @@ func TestIsDone(t *testing.T) { close(c) assert.True(t, isChannelDone(c)) } + +func TestDrainBlockConfirmationManager(t *testing.T) { + stream, cancel := newTestStreamForConfirmations(t) + defer cancel() + + stream.drainBlockConfirmationManager() +} diff --git a/internal/events/logprocessor.go b/internal/events/logprocessor.go index 9025cca0..1b847dbe 100644 --- a/internal/events/logprocessor.go +++ b/internal/events/logprocessor.go @@ -59,6 +59,11 @@ type eventData struct { Confirmations []*blockInfo `json:"confirmations,omitempty"` // Used for callback handling batchComplete func(*eventData) + + // Used to avoid string serialization/de-serialization to block confirmation manager + blockNumber uint64 + transactionIndex uint64 + logIndex uint64 } type logProcessor struct { @@ -123,7 +128,7 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int Address: entry.Address.String(), BlockNumber: blockNumber.String(), BlockHash: entry.BlockHash.String(), - TransactionIndex: entry.TransactionIndex.String(), + TransactionIndex: lp.stream.formatTransactionIndex(entry.TransactionIndex), TransactionHash: entry.TransactionHash.String(), Signature: ethbind.API.ABIEventSignature(lp.event), Data: make(map[string]interface{}), @@ -133,6 +138,10 @@ func (lp *logProcessor) processLogEntry(subInfo string, entry *logEntry, idx int InputArgs: entry.InputArgs, InputSigner: entry.InputSigner, batchComplete: lp.batchComplete, + + blockNumber: blockNumber.Uint64(), + transactionIndex: uint64(entry.TransactionIndex), + logIndex: uint64(idx), } if entry.Removed { diff --git a/internal/events/logprocessor_test.go b/internal/events/logprocessor_test.go index 4a90c7ea..2c33c926 100644 --- a/internal/events/logprocessor_test.go +++ b/internal/events/logprocessor_test.go @@ -16,6 +16,7 @@ package events import ( "encoding/json" + "math/big" "testing" "github.com/hyperledger/firefly-ethconnect/internal/ethbind" @@ -183,3 +184,90 @@ func TestProcessLogSampleEvent(t *testing.T) { "data2": "1000", }, ev.Data) } + +func TestProcessLogEntryRemovedWithConfirmationManager(t *testing.T) { + assert := assert.New(t) + + bcm, _ := newTestBlockConfirmationManager(t, false) + + spec := &StreamInfo{ + Timestamps: false, + } + stream := &eventStream{ + spec: spec, + hexFormatTransactionIndex: true, + } + + eventABI := `{ + "name": "testEvent", + "anonymous": true, + "inputs": [] + }` + var marshaling ethbinding.ABIElementMarshaling + json.Unmarshal([]byte(eventABI), &marshaling) + event, err := ethbind.API.ABIElementMarshalingToABIEvent(&marshaling) + assert.NoError(err) + + lp := &logProcessor{ + event: event, + stream: stream, + confirmationManager: bcm, + } + err = lp.processLogEntry("ut", &logEntry{ + BlockNumber: ethbinding.HexBigInt(*big.NewInt(255)), + TransactionIndex: ethbinding.HexUint(10), + Removed: true, + }, 2) + assert.NoError(err) + notification := <-bcm.bcmNotifications + assert.Equal(bcmRemovedLog, notification.nType) + assert.Equal("255", notification.event.BlockNumber) + assert.Equal("0xa", notification.event.TransactionIndex) + assert.Equal("2", notification.event.LogIndex) + assert.Equal(uint64(255), notification.event.blockNumber) + assert.Equal(uint64(10), notification.event.transactionIndex) + assert.Equal(uint64(2), notification.event.logIndex) +} + +func TestProcessLogEntryDispatchWithConfirmationManager(t *testing.T) { + assert := assert.New(t) + + bcm, _ := newTestBlockConfirmationManager(t, false) + + spec := &StreamInfo{ + Timestamps: false, + } + stream := &eventStream{ + spec: spec, + hexFormatTransactionIndex: false, + } + + eventABI := `{ + "name": "testEvent", + "anonymous": true, + "inputs": [] + }` + var marshaling ethbinding.ABIElementMarshaling + json.Unmarshal([]byte(eventABI), &marshaling) + event, err := ethbind.API.ABIElementMarshalingToABIEvent(&marshaling) + assert.NoError(err) + + lp := &logProcessor{ + event: event, + stream: stream, + confirmationManager: bcm, + } + err = lp.processLogEntry("ut", &logEntry{ + BlockNumber: ethbinding.HexBigInt(*big.NewInt(255)), + TransactionIndex: ethbinding.HexUint(10), + }, 2) + assert.NoError(err) + notification := <-bcm.bcmNotifications + assert.Equal(bcmNewLog, notification.nType) + assert.Equal("255", notification.event.BlockNumber) + assert.Equal("10", notification.event.TransactionIndex) + assert.Equal("2", notification.event.LogIndex) + assert.Equal(uint64(255), notification.event.blockNumber) + assert.Equal(uint64(10), notification.event.transactionIndex) + assert.Equal(uint64(2), notification.event.logIndex) +} diff --git a/internal/events/submanager.go b/internal/events/submanager.go index f22ac2a0..5cac9f64 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -45,8 +45,9 @@ const ( streamIDPrefix = "es-" checkpointIDPrefix = "cp-" - defaultCatchupModeBlockGap = int64(250) - defaultCatchupModePageSize = int64(250) + defaultCatchupModeBlockGap = int64(250) + defaultCatchupModePageSize = int64(250) + defaultHexFormatTransactionIndex = true // for backwards compatibility ) // SubscriptionManager provides REST APIs for managing events @@ -80,12 +81,13 @@ type subscriptionManager interface { // SubscriptionManagerConf configuration type SubscriptionManagerConf struct { - EventLevelDBPath string `json:"eventsDB"` - EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` - CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` - CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` - WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` - Confirmations bcmConfExternal `json:"confirmations,omitempty"` + EventLevelDBPath string `json:"eventsDB"` + EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` + CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` + CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` + WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` + HexFormatTransactionIndex *bool `json:"hexFormatTransactionIndex"` + Confirmations bcmConfExternal `json:"confirmations,omitempty"` } type subscriptionMGR struct { @@ -131,6 +133,10 @@ func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr log.Warnf("catchupModeBlockGap=%d must be >= catchupModePageSize=%d - setting to %d", conf.CatchupModeBlockGap, conf.CatchupModePageSize, conf.CatchupModePageSize) conf.CatchupModeBlockGap = conf.CatchupModePageSize } + if conf.HexFormatTransactionIndex == nil { + hexFormatTransactionIndex := defaultHexFormatTransactionIndex + conf.HexFormatTransactionIndex = &hexFormatTransactionIndex + } if conf.Confirmations.Enabled { sm.bcm, err = newBlockConfirmationManager(context.Background(), sm.rpc, parseBCMConfig(&conf.Confirmations)) if err != nil { diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index 122c805e..7989376e 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -70,7 +70,9 @@ func newMockWebSocket() *mockWebSocket { } func newTestSubscriptionManager() *subscriptionMGR { - smconf := &SubscriptionManagerConf{} + return newTestSubscriptionManagerConf(&SubscriptionManagerConf{}) +} +func newTestSubscriptionManagerConf(smconf *SubscriptionManagerConf) *subscriptionMGR { rpc := ðmocks.RPCClient{} cr := &contractregistrymocks.ContractStore{} s, _ := NewSubscriptionManager(smconf, rpc, cr, newMockWebSocket()) From 6739ce9d398c12eb1afa87e84d981f10d07ed3be Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 4 Apr 2022 18:04:18 -0400 Subject: [PATCH 13/16] Update dependencies Signed-off-by: Peter Broadhurst --- go.mod | 24 ++++++--- go.sum | 75 +++++++++++++++++++++++++++++ mocks/saramamocks/consumer_group.go | 20 ++++++++ 3 files changed, 112 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 467beaac..8fc8aaa0 100644 --- a/go.mod +++ b/go.mod @@ -1,33 +1,43 @@ module github.com/hyperledger/firefly-ethconnect require ( - github.com/Shopify/sarama v1.30.0 + github.com/Shopify/sarama v1.32.0 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 + github.com/btcsuite/btcd/btcec/v2 v2.1.3 // indirect github.com/dsnet/compress v0.0.1 // indirect - github.com/ethereum/go-ethereum v1.10.12 + github.com/ethereum/go-ethereum v1.10.17 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 github.com/go-openapi/jsonreference v0.19.6 github.com/go-openapi/spec v0.20.4 - github.com/gorilla/websocket v1.4.2 + github.com/go-openapi/swag v0.21.1 // indirect + github.com/gorilla/websocket v1.5.0 github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/icza/dyno v0.0.0-20210726202311-f1bafe5d9996 github.com/julienschmidt/httprouter v1.3.0 github.com/kaleido-io/ethbinding v0.0.0-20220104211806-1a198c06124a + github.com/klauspost/compress v1.15.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/mholt/archiver v3.1.1+incompatible github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/nwaples/rardecode v1.1.2 // indirect + github.com/nwaples/rardecode v1.1.3 // indirect github.com/oklog/ulid/v2 v2.0.2 + github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.8.1 - github.com/spf13/cobra v1.2.1 + github.com/spf13/cobra v1.4.0 + github.com/spf13/viper v1.8.1 // indirect github.com/stretchr/testify v1.7.0 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tidwall/gjson v1.11.0 + github.com/tidwall/gjson v1.14.0 + github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/x-cray/logrus-prefixed-formatter v0.5.2 github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect - golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4 // indirect + github.com/yusufpapurcu/wmi v1.2.2 // indirect + golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect + golang.org/x/net v0.0.0-20220403103023-749bd193bc2b // indirect + golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 84bac2ed..2f2d0eaa 100644 --- a/go.sum +++ b/go.sum @@ -43,6 +43,9 @@ collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= @@ -64,8 +67,12 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.30.0 h1:TOZL6r37xJBDEMLx4yjB77jxbZYXPaDow08TSK6vIL0= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/sarama v1.32.0 h1:P+RUjEaRU0GMMbYexGMDyrMkLhbbBVUVISDywi+IlFU= +github.com/Shopify/sarama v1.32.0/go.mod h1:+EmJJKZWVT/faR9RcOxJerP+LId4iWdQPBGLy1Y1Njs= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae h1:ePgznFqEG1v3AjMklnK8H7BSc++FDSo7xfK9K7Af+0Y= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= +github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= +github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= @@ -102,6 +109,10 @@ github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx2 github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= 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.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= @@ -133,6 +144,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 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.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -143,6 +155,11 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= @@ -150,6 +167,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= @@ -173,6 +192,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4= github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= +github.com/ethereum/go-ethereum v1.10.17 h1:XEcumY+qSr1cZQaWsQs5Kck3FHB0V2RiMHPdTBJ+oT8= +github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -180,6 +201,8 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2 h1:SPb1KFFmM+ybpEjPUhCCkZOM5xlovT5UbrMvWnXyBns= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= 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= @@ -212,6 +235,8 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -222,6 +247,7 @@ github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.3.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/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -273,6 +299,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -292,6 +319,7 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/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= @@ -300,7 +328,10 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= 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/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -332,6 +363,7 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -351,6 +383,7 @@ github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bS github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -383,6 +416,7 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= 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= @@ -391,6 +425,9 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= @@ -401,6 +438,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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= @@ -422,6 +461,8 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -430,6 +471,8 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -454,6 +497,7 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ 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/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= @@ -463,6 +507,8 @@ github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/ github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M= github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc= +github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -521,8 +567,10 @@ github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1 github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= 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/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= 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/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -531,6 +579,8 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.10+incompatible h1:AL2kpVykjkqeN+MFe1WcwSBVUjGjvdU8/ubvCuXAjrU= github.com/shirou/gopsutil v3.21.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= 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.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= @@ -544,6 +594,8 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +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.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= 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= @@ -566,6 +618,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tidwall/gjson v1.11.0 h1:C16pk7tQNiH6VlCrtIXL1w8GaOsi1X3W8KDkE1BuYd4= github.com/tidwall/gjson v1.11.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.0 h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w= +github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= @@ -574,9 +628,13 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= @@ -590,6 +648,7 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJ github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.0/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= @@ -599,6 +658,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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= +github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= 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= @@ -634,6 +695,9 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 h1:tkVvjkPTB7pnW3jnid7kNyAMPVWllTNOf/qKDze4p9o= +golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 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= @@ -707,6 +771,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 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-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -717,11 +782,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4 h1:DZshvxDdVoeKIbudAdFEKi+f70l51luSy/7b76ibTY0= golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220403103023-749bd193bc2b h1:vI32FkLJNAWtGD4BwkThwEy6XS7ZLLMHkSkYfF8M0W0= +golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -808,10 +877,16 @@ golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7w 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-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-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo= +golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= diff --git a/mocks/saramamocks/consumer_group.go b/mocks/saramamocks/consumer_group.go index 230f95f4..f17dac93 100644 --- a/mocks/saramamocks/consumer_group.go +++ b/mocks/saramamocks/consumer_group.go @@ -57,3 +57,23 @@ func (_m *ConsumerGroup) Errors() <-chan error { return r0 } + +// Pause provides a mock function with given fields: partitions +func (_m *ConsumerGroup) Pause(partitions map[string][]int32) { + _m.Called(partitions) +} + +// PauseAll provides a mock function with given fields: +func (_m *ConsumerGroup) PauseAll() { + _m.Called() +} + +// Resume provides a mock function with given fields: partitions +func (_m *ConsumerGroup) Resume(partitions map[string][]int32) { + _m.Called(partitions) +} + +// ResumeAll provides a mock function with given fields: +func (_m *ConsumerGroup) ResumeAll() { + _m.Called() +} From 318dc3173f120e54f739d1cbb2d4ca5870515243 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Mon, 4 Apr 2022 18:22:00 -0400 Subject: [PATCH 14/16] Invert bool for clarity Signed-off-by: Peter Broadhurst --- internal/events/eventstream.go | 64 ++++++++++++++-------------- internal/events/logprocessor_test.go | 8 ++-- internal/events/submanager.go | 24 +++++------ 3 files changed, 46 insertions(+), 50 deletions(-) diff --git a/internal/events/eventstream.go b/internal/events/eventstream.go index bcd5ffe3..49a38295 100644 --- a/internal/events/eventstream.go +++ b/internal/events/eventstream.go @@ -93,24 +93,24 @@ type webSocketActionInfo struct { } type eventStream struct { - sm subscriptionManager - allowPrivateIPs bool - spec *StreamInfo - eventStream chan *eventData - stopped bool - pollingInterval time.Duration - inFlight uint64 - batchCond *sync.Cond - batchQueue *list.List - batchCount uint64 - initialRetryDelay time.Duration - backoffFactor float64 - updateInProgress bool - updateInterrupt chan struct{} // a zero-sized struct used only for signaling (hand rolled alternative to context) - blockTimestampCache *lru.Cache - action eventStreamAction - wsChannels ws.WebSocketChannels - hexFormatTransactionIndex bool + sm subscriptionManager + allowPrivateIPs bool + spec *StreamInfo + eventStream chan *eventData + stopped bool + pollingInterval time.Duration + inFlight uint64 + batchCond *sync.Cond + batchQueue *list.List + batchCount uint64 + initialRetryDelay time.Duration + backoffFactor float64 + updateInProgress bool + updateInterrupt chan struct{} // a zero-sized struct used only for signaling (hand rolled alternative to context) + blockTimestampCache *lru.Cache + action eventStreamAction + wsChannels ws.WebSocketChannels + decimalTransactionIndex bool eventPollerDone chan struct{} batchProcessorDone chan struct{} @@ -155,17 +155,17 @@ func newEventStream(sm subscriptionManager, spec *StreamInfo, wsChannels ws.WebS } a = &eventStream{ - sm: sm, - spec: spec, - allowPrivateIPs: sm.config().WebhooksAllowPrivateIPs, - eventStream: make(chan *eventData), - batchCond: sync.NewCond(&sync.Mutex{}), - batchQueue: list.New(), - initialRetryDelay: DefaultExponentialBackoffInitial, - backoffFactor: DefaultExponentialBackoffFactor, - pollingInterval: time.Duration(sm.config().EventPollingIntervalSec) * time.Second, - wsChannels: wsChannels, - hexFormatTransactionIndex: *sm.config().HexFormatTransactionIndex, + sm: sm, + spec: spec, + allowPrivateIPs: sm.config().WebhooksAllowPrivateIPs, + eventStream: make(chan *eventData), + batchCond: sync.NewCond(&sync.Mutex{}), + batchQueue: list.New(), + initialRetryDelay: DefaultExponentialBackoffInitial, + backoffFactor: DefaultExponentialBackoffFactor, + pollingInterval: time.Duration(sm.config().EventPollingIntervalSec) * time.Second, + wsChannels: wsChannels, + decimalTransactionIndex: sm.config().DecimalTransactionIndex, } if a.blockTimestampCache, err = lru.New(spec.TimestampCacheSize); err != nil { @@ -205,10 +205,10 @@ func newEventStream(sm subscriptionManager, spec *StreamInfo, wsChannels ws.WebS // hex string on the return. This was a bug in earlier version of ethconnect, and an option // is provided to restore the old behavior in case an application was depending on it. func (a *eventStream) formatTransactionIndex(txIndex ethbinding.HexUint) string { - if a.hexFormatTransactionIndex { - return txIndex.String() + if a.decimalTransactionIndex { + return strconv.FormatUint(uint64(txIndex), 10) } - return strconv.FormatUint(uint64(txIndex), 10) + return txIndex.String() } // helper to kick off go routines and any tracking entities diff --git a/internal/events/logprocessor_test.go b/internal/events/logprocessor_test.go index 2c33c926..da313e36 100644 --- a/internal/events/logprocessor_test.go +++ b/internal/events/logprocessor_test.go @@ -194,8 +194,8 @@ func TestProcessLogEntryRemovedWithConfirmationManager(t *testing.T) { Timestamps: false, } stream := &eventStream{ - spec: spec, - hexFormatTransactionIndex: true, + spec: spec, + decimalTransactionIndex: false, } eventABI := `{ @@ -238,8 +238,8 @@ func TestProcessLogEntryDispatchWithConfirmationManager(t *testing.T) { Timestamps: false, } stream := &eventStream{ - spec: spec, - hexFormatTransactionIndex: false, + spec: spec, + decimalTransactionIndex: true, } eventABI := `{ diff --git a/internal/events/submanager.go b/internal/events/submanager.go index 5cac9f64..0bc741ef 100644 --- a/internal/events/submanager.go +++ b/internal/events/submanager.go @@ -45,9 +45,9 @@ const ( streamIDPrefix = "es-" checkpointIDPrefix = "cp-" - defaultCatchupModeBlockGap = int64(250) - defaultCatchupModePageSize = int64(250) - defaultHexFormatTransactionIndex = true // for backwards compatibility + defaultCatchupModeBlockGap = int64(250) + defaultCatchupModePageSize = int64(250) + defaultDecimalTransactionIndex = false // for backwards compatibility ) // SubscriptionManager provides REST APIs for managing events @@ -81,13 +81,13 @@ type subscriptionManager interface { // SubscriptionManagerConf configuration type SubscriptionManagerConf struct { - EventLevelDBPath string `json:"eventsDB"` - EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` - CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` - CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` - WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` - HexFormatTransactionIndex *bool `json:"hexFormatTransactionIndex"` - Confirmations bcmConfExternal `json:"confirmations,omitempty"` + EventLevelDBPath string `json:"eventsDB"` + EventPollingIntervalSec uint64 `json:"eventPollingIntervalSec,omitempty"` + CatchupModeBlockGap int64 `json:"catchupModeBlockGap,omitempty"` + CatchupModePageSize int64 `json:"catchupModePageSize,omitempty"` + WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` + DecimalTransactionIndex bool `json:"decimalTransactionIndex,omitempty"` + Confirmations bcmConfExternal `json:"confirmations,omitempty"` } type subscriptionMGR struct { @@ -133,10 +133,6 @@ func NewSubscriptionManager(conf *SubscriptionManagerConf, rpc eth.RPCClient, cr log.Warnf("catchupModeBlockGap=%d must be >= catchupModePageSize=%d - setting to %d", conf.CatchupModeBlockGap, conf.CatchupModePageSize, conf.CatchupModePageSize) conf.CatchupModeBlockGap = conf.CatchupModePageSize } - if conf.HexFormatTransactionIndex == nil { - hexFormatTransactionIndex := defaultHexFormatTransactionIndex - conf.HexFormatTransactionIndex = &hexFormatTransactionIndex - } if conf.Confirmations.Enabled { sm.bcm, err = newBlockConfirmationManager(context.Background(), sm.rpc, parseBCMConfig(&conf.Confirmations)) if err != nil { From db25f970b5cf543bac33de5c5e0480bc2c8326bf Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Tue, 19 Apr 2022 22:32:01 -0400 Subject: [PATCH 15/16] Address review comments Signed-off-by: Peter Broadhurst --- internal/events/block_confirmations.go | 5 ++--- internal/events/block_confirmations_test.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/events/block_confirmations.go b/internal/events/block_confirmations.go index a216b57a..715a7089 100644 --- a/internal/events/block_confirmations.go +++ b/internal/events/block_confirmations.go @@ -1,4 +1,4 @@ -// Copyright 2019 Kaleido +// Copyright 2022 Kaleido // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -318,7 +318,7 @@ func (bcm *blockConfirmationManager) confirmationsListener() { // Process any new notifications - we do this at the end, so it can benefit // from knowing the latest highestBlockSeen if err := bcm.processNotifications(notifications); err != nil { - bcm.log.Errorf("Failed processing notifications: %s", err) + bcm.log.Errorf("Failed to process notifications: %s", err) continue } @@ -450,7 +450,6 @@ func (bcm *blockConfirmationManager) processBlock(block *blockInfo) { func (bcm *blockConfirmationManager) dispatchConfirmed(confirmed *pendingEvent) { eventKey := bcm.keyForEvent(confirmed.event) bcm.log.Infof("Confirmed with %d confirmations event=%s", len(confirmed.confirmations), eventKey) - delete(bcm.pending, eventKey) if bcm.includeInPayload { confirmed.event.Confirmations = confirmed.confirmations diff --git a/internal/events/block_confirmations_test.go b/internal/events/block_confirmations_test.go index b42ada13..9985e7c8 100644 --- a/internal/events/block_confirmations_test.go +++ b/internal/events/block_confirmations_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Kaleido +// Copyright 2022 Kaleido // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 2faf053ab2e518b62a81c38af4b377950256c317 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Tue, 19 Apr 2022 22:37:37 -0400 Subject: [PATCH 16/16] Add fix for intermittent error Signed-off-by: Peter Broadhurst --- internal/events/submanager_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/events/submanager_test.go b/internal/events/submanager_test.go index cf7edbba..adc15c91 100644 --- a/internal/events/submanager_test.go +++ b/internal/events/submanager_test.go @@ -262,6 +262,7 @@ func TestStreamAndSubscriptionErrors(t *testing.T) { blockCall := make(chan struct{}) rpc := ðmocks.RPCClient{} rpc.On("CallContext", mock.Anything, mock.Anything, "eth_newFilter", mock.Anything).Return(nil).Maybe() + rpc.On("CallContext", mock.Anything, mock.Anything, "eth_getFilterLogs", mock.Anything).Return(nil).Maybe() rpc.On("CallContext", mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { <-blockCall }).Return(nil) sm.rpc = rpc