From 644089db0ff9ffceb5c9a8287f48092c43f92ae0 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 25 Jan 2024 14:27:52 +0100 Subject: [PATCH 01/75] add first index storage interface draft --- storage/index.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 storage/index.go diff --git a/storage/index.go b/storage/index.go new file mode 100644 index 000000000..9ba1e8f12 --- /dev/null +++ b/storage/index.go @@ -0,0 +1,13 @@ +package storage + +type BlockIndex interface { + Store(block any, height uint64) error + Get(height uint64) (any, error) + LatestHeight() (uint64, error) + FirstHeight() (uint64, error) +} + +type LogsIndex interface { + Store(any) error + Get(topic string) (any, error) +} From 1d27c05c7b21fa2324937eb036953b9233426039 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 25 Jan 2024 15:45:43 +0100 Subject: [PATCH 02/75] update index interface --- go.mod | 7 ++++--- go.sum | 5 +++++ storage/index.go | 13 +++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 83f7b3b4d..c4f814cd6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.20 require ( github.com/ethereum/go-ethereum v1.13.5 github.com/gorilla/websocket v1.5.0 - github.com/onflow/cadence v0.42.6 github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 @@ -64,8 +63,10 @@ require ( github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.6.0 // indirect + github.com/onflow/cadence v0.42.7 // indirect github.com/onflow/crypto v0.24.9 // indirect - github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2 // indirect + github.com/onflow/flow-go v0.33.1 // indirect + github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -87,7 +88,7 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/blake3 v0.2.3 // indirect go.opentelemetry.io/otel v1.16.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect diff --git a/go.sum b/go.sum index 5c8489678..79584abc9 100644 --- a/go.sum +++ b/go.sum @@ -265,12 +265,16 @@ github.com/onflow/atree v0.6.0 h1:j7nQ2r8npznx4NX39zPpBYHmdy45f4xwoi+dm37Jk7c= github.com/onflow/atree v0.6.0/go.mod h1:gBHU0M05qCbv9NN0kijLWMgC47gHVNBIp4KmsVFi0tc= github.com/onflow/cadence v0.42.6 h1:VtI0EpKrdbfqITRMsvyZC4dhgcW1x1LNUQuEpdMDzus= github.com/onflow/cadence v0.42.6/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= +github.com/onflow/cadence v0.42.7/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= github.com/onflow/crypto v0.24.9 h1:jYP1qdwid0qCineFzBFlxBchg710A7RuSWpTqxaOdog= github.com/onflow/crypto v0.24.9/go.mod h1:J/V7IEVaqjDajvF8K0B/SJPJDgAOP2G+LVLeb0hgmbg= +github.com/onflow/flow-go v0.33.1 h1:g0HHVs3LgP5uc0xbgiiIXFne4g0hY1SwfOz/CseskZA= +github.com/onflow/flow-go v0.33.1/go.mod h1:blOWH/Ska65YZwDc3I1JXNvJNhgR87OBVUKgCKiX3G4= github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 h1:ur8TAN76HbnETyYD63j0y+xphQNZ39HZrqEnSfJdOG0= github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228/go.mod h1:LIOqc9CiuVRbPNmxSsf8+nPzon/71wYZbII2wC4RClc= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2 h1:qZjl4wSTG/E9znEjkHF0nNaEdlBLJoOEAtr7xUsTNqc= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onsi/ginkgo v1.6.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= @@ -396,6 +400,7 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= diff --git a/storage/index.go b/storage/index.go index 9ba1e8f12..95ae0f2f2 100644 --- a/storage/index.go +++ b/storage/index.go @@ -1,13 +1,18 @@ package storage +import ( + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-go/fvm/evm/types" +) + type BlockIndex interface { - Store(block any, height uint64) error - Get(height uint64) (any, error) + Store(block *types.Block, height uint64) error + Get(height uint64) (*types.Block, error) LatestHeight() (uint64, error) FirstHeight() (uint64, error) } type LogsIndex interface { - Store(any) error - Get(topic string) (any, error) + Store(logs []*gethTypes.Log) error + Get(topic string) ([]*gethTypes.Log, error) } From a5e783cc106d520367622c30d08f05ab6a30b001 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 13:35:02 +0100 Subject: [PATCH 03/75] update interfaces --- storage/index.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/storage/index.go b/storage/index.go index 95ae0f2f2..527a99e49 100644 --- a/storage/index.go +++ b/storage/index.go @@ -1,18 +1,24 @@ package storage import ( + "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-go/fvm/evm/types" ) -type BlockIndex interface { - Store(block *types.Block, height uint64) error +type BlockIndexer interface { + Store(block *types.Block) error Get(height uint64) (*types.Block, error) LatestHeight() (uint64, error) FirstHeight() (uint64, error) } -type LogsIndex interface { - Store(logs []*gethTypes.Log) error - Get(topic string) ([]*gethTypes.Log, error) +type ReceiptIndexer interface { + Store(receipt *gethTypes.ReceiptForStorage) error + Get(txID common.Hash) *gethTypes.ReceiptForStorage +} + +type TransactionIndexer interface { + Store(tx *gethTypes.Transaction) error + Get(txID common.Hash) *gethTypes.Transaction } From af395182182048bf2eb5268bc58fe25ebf9da88b Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 13:40:23 +0100 Subject: [PATCH 04/75] add bloom methods --- storage/index.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/index.go b/storage/index.go index 527a99e49..5cf4a5c25 100644 --- a/storage/index.go +++ b/storage/index.go @@ -15,10 +15,12 @@ type BlockIndexer interface { type ReceiptIndexer interface { Store(receipt *gethTypes.ReceiptForStorage) error - Get(txID common.Hash) *gethTypes.ReceiptForStorage + GetByTransactionID(ID common.Hash) *gethTypes.ReceiptForStorage + GetByBlockID(ID common.Hash) *gethTypes.ReceiptForStorage + BloomForBlockRange() gethTypes.Bloom } type TransactionIndexer interface { Store(tx *gethTypes.Transaction) error - Get(txID common.Hash) *gethTypes.Transaction + Get(ID common.Hash) *gethTypes.Transaction } From ad74e37a9fba63a0194200b2cedde16954f8298a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 13:48:32 +0100 Subject: [PATCH 05/75] update range bloom api --- storage/index.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/index.go b/storage/index.go index 5cf4a5c25..f22abed16 100644 --- a/storage/index.go +++ b/storage/index.go @@ -8,7 +8,8 @@ import ( type BlockIndexer interface { Store(block *types.Block) error - Get(height uint64) (*types.Block, error) + GetByHeight(height uint64) (*types.Block, error) + GetByID(ID common.Hash) (*types.Block, error) LatestHeight() (uint64, error) FirstHeight() (uint64, error) } @@ -17,7 +18,7 @@ type ReceiptIndexer interface { Store(receipt *gethTypes.ReceiptForStorage) error GetByTransactionID(ID common.Hash) *gethTypes.ReceiptForStorage GetByBlockID(ID common.Hash) *gethTypes.ReceiptForStorage - BloomForBlockRange() gethTypes.Bloom + BloomForBlockRange(start, end uint64) gethTypes.Bloom } type TransactionIndexer interface { From e9b5c71833e0bd6857dcc84bc8d81c472a0b1ed6 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 13:49:38 +0100 Subject: [PATCH 06/75] update bloom type --- storage/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/index.go b/storage/index.go index f22abed16..17cae477b 100644 --- a/storage/index.go +++ b/storage/index.go @@ -18,7 +18,7 @@ type ReceiptIndexer interface { Store(receipt *gethTypes.ReceiptForStorage) error GetByTransactionID(ID common.Hash) *gethTypes.ReceiptForStorage GetByBlockID(ID common.Hash) *gethTypes.ReceiptForStorage - BloomForBlockRange(start, end uint64) gethTypes.Bloom + BloomForBlockRange(start, end uint64) *gethTypes.Bloom } type TransactionIndexer interface { From 4c74da80f2d20e04293135401021ac78053ddaf9 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 14:35:33 +0100 Subject: [PATCH 07/75] update index methods --- storage/index.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/index.go b/storage/index.go index 17cae477b..3de982da7 100644 --- a/storage/index.go +++ b/storage/index.go @@ -16,12 +16,12 @@ type BlockIndexer interface { type ReceiptIndexer interface { Store(receipt *gethTypes.ReceiptForStorage) error - GetByTransactionID(ID common.Hash) *gethTypes.ReceiptForStorage - GetByBlockID(ID common.Hash) *gethTypes.ReceiptForStorage - BloomForBlockRange(start, end uint64) *gethTypes.Bloom + GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) + GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) + BloomForBlockRange(start, end uint64) []*gethTypes.Bloom } type TransactionIndexer interface { Store(tx *gethTypes.Transaction) error - Get(ID common.Hash) *gethTypes.Transaction + Get(ID common.Hash) (*gethTypes.Transaction, error) } From 8cbed5456c55d8e557dcf0e842928fe18e92175c Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 14:35:38 +0100 Subject: [PATCH 08/75] add errors --- storage/error.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 storage/error.go diff --git a/storage/error.go b/storage/error.go new file mode 100644 index 000000000..d89ce7c0c --- /dev/null +++ b/storage/error.go @@ -0,0 +1,8 @@ +package storage + +import "errors" + +var ( + NotInitialized = errors.New("storage not initialized") + NotFound = errors.New("entity not found") +) From 9db753281c005963b5a4ac73d4d3f8d9ed7c60df Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 14:38:40 +0100 Subject: [PATCH 09/75] add errors --- storage/error.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/error.go b/storage/error.go index d89ce7c0c..350f20478 100644 --- a/storage/error.go +++ b/storage/error.go @@ -3,6 +3,8 @@ package storage import "errors" var ( + // NotInitialized indicates storage instance was not correctly initialized and contains empty required values. NotInitialized = errors.New("storage not initialized") - NotFound = errors.New("entity not found") + // NotFound indicates the resource does not exist. + NotFound = errors.New("entity not found") ) From f56e98424727198c62b5c6a6dade90dd452f90f1 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 14:39:19 +0100 Subject: [PATCH 10/75] fix typo --- storage/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/index.go b/storage/index.go index 3de982da7..6d0ef309c 100644 --- a/storage/index.go +++ b/storage/index.go @@ -18,7 +18,7 @@ type ReceiptIndexer interface { Store(receipt *gethTypes.ReceiptForStorage) error GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) - BloomForBlockRange(start, end uint64) []*gethTypes.Bloom + BloomsForBlockRange(start, end uint64) []*gethTypes.Bloom } type TransactionIndexer interface { From cc510c143458b22876caf2a578c03055fc6d15ea Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 14:41:36 +0100 Subject: [PATCH 11/75] add locks --- storage/memory/storage.go | 246 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 storage/memory/storage.go diff --git a/storage/memory/storage.go b/storage/memory/storage.go new file mode 100644 index 000000000..e74300a2a --- /dev/null +++ b/storage/memory/storage.go @@ -0,0 +1,246 @@ +package memory + +import ( + "errors" + "fmt" + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-evm-gateway/storage" + "github.com/onflow/flow-go/fvm/evm/types" + "sync" +) + +const ( + unknownHeight = uint64(0) - 1 +) + +type baseStorage struct { + mu sync.RWMutex + + blocksIDs map[common.Hash]*types.Block + blockHeightsIDs map[uint64]common.Hash + firstHeight uint64 + lastHeight uint64 + + receiptsTxIDs map[common.Hash]*gethTypes.ReceiptForStorage + receiptBlockIDTxIDs map[common.Hash]common.Hash + bloomHeight map[uint64]*gethTypes.Bloom + + transactionsIDs map[common.Hash]*gethTypes.Transaction +} + +var store *baseStorage + +func baseStorageFactory() *baseStorage { + if store == nil { + store = &baseStorage{ + blocksIDs: make(map[common.Hash]*types.Block), + blockHeightsIDs: make(map[uint64]common.Hash), + firstHeight: unknownHeight, + lastHeight: unknownHeight, + receiptsTxIDs: make(map[common.Hash]*gethTypes.ReceiptForStorage), + receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), + bloomHeight: make(map[uint64]*gethTypes.Bloom), + } + } + return store +} + +var _ storage.BlockIndexer = &BlockStorage{} + +type BlockStorage struct { + base *baseStorage +} + +func NewBlockStorage() *BlockStorage { + return &BlockStorage{ + base: baseStorageFactory(), + } +} + +func (s BlockStorage) GetByHeight(height uint64) (*types.Block, error) { + s.base.mu.RLock() + defer s.base.mu.RUnlock() + + // Check if the requested height is within the known range + if height < s.base.firstHeight || height > s.base.lastHeight { + return nil, storage.NotFound + } + + // Retrieve the block using the blockHeightsIDs map + blockID, exists := s.base.blockHeightsIDs[height] + if !exists { + return nil, storage.NotFound + } + + // Retrieve the block using the blocksIDs map + block, exists := s.base.blocksIDs[blockID] + if !exists { + return nil, storage.NotFound + } + + return block, nil +} + +func (s BlockStorage) GetByID(ID common.Hash) (*types.Block, error) { + s.base.mu.RLock() + defer s.base.mu.RUnlock() + + // Retrieve the block using the blocksIDs map + block, exists := s.base.blocksIDs[ID] + if !exists { + return nil, storage.NotFound + } + + return block, nil +} + +func (s BlockStorage) Store(block *types.Block) error { + s.base.mu.Lock() + defer s.base.mu.Unlock() + + ID, err := block.Hash() + if err != nil { + return fmt.Errorf("block hash error: %w", err) + } + + // Check if the block already exists + _, exists := s.base.blocksIDs[ID] + if exists { + return errors.New("block already exists") + } + + // Store the block in blocksIDs map and update blockHeightsIDs map + s.base.blocksIDs[ID] = block + s.base.blockHeightsIDs[block.Height] = ID + + // Update firstHeight and lastHeight if necessary + if s.base.firstHeight == unknownHeight { + s.base.firstHeight = block.Height + } + if s.base.lastHeight == unknownHeight || block.Height > s.base.lastHeight { + s.base.lastHeight = block.Height + } + + return nil +} + +func (s BlockStorage) LatestHeight() (uint64, error) { + s.base.mu.RLock() + defer s.base.mu.RUnlock() + + if s.base.lastHeight == unknownHeight { + return 0, storage.NotInitialized + } + return s.base.lastHeight, nil +} + +func (s BlockStorage) FirstHeight() (uint64, error) { + s.base.mu.RLock() + defer s.base.mu.RUnlock() + + if s.base.firstHeight == unknownHeight { + return 0, storage.NotInitialized + } + return s.base.firstHeight, nil +} + +var _ storage.ReceiptIndexer = &ReceiptStorage{} + +type ReceiptStorage struct { + base *baseStorage +} + +func NewReceiptStorage() *ReceiptStorage { + return &ReceiptStorage{ + base: baseStorageFactory(), + } +} + +func (r ReceiptStorage) Store(receipt *gethTypes.ReceiptForStorage) error { + r.base.mu.Lock() + defer r.base.mu.Unlock() + + r.base.receiptsTxIDs[receipt.TxHash] = receipt + r.base.receiptBlockIDTxIDs[receipt.BlockHash] = receipt.TxHash + + return nil +} + +func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) { + r.base.mu.RLock() + defer r.base.mu.RUnlock() + + receipt, exists := r.base.receiptsTxIDs[ID] + if !exists { + return nil, storage.NotFound + } + + return receipt, nil +} + +func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) { + r.base.mu.RLock() + defer r.base.mu.RUnlock() + + txID, exists := r.base.receiptBlockIDTxIDs[ID] + if !exists { + return nil, storage.NotFound + } + + receipt, exists := r.base.receiptsTxIDs[txID] + if !exists { + return nil, storage.NotFound + } + + return receipt, nil +} + +func (r ReceiptStorage) BloomsForBlockRange(start, end uint64) []*gethTypes.Bloom { + r.base.mu.RLock() + defer r.base.mu.RUnlock() + + blooms := make([]*gethTypes.Bloom, 0) + + // Iterate through the range of block heights and add the blooms to the result + for height := start; height <= end; height++ { + b, exists := r.base.bloomHeight[height] + if exists { + blooms = append(blooms, b) + } + } + + return blooms +} + +var _ storage.TransactionIndexer = &TransactionStorage{} + +type TransactionStorage struct { + base *baseStorage +} + +func NewTransactionStorage() *TransactionStorage { + return &TransactionStorage{ + base: baseStorageFactory(), + } +} + +func (t TransactionStorage) Store(tx *gethTypes.Transaction) error { + t.base.mu.Lock() + defer t.base.mu.Unlock() + + t.base.transactionsIDs[tx.Hash()] = tx + return nil +} + +func (t TransactionStorage) Get(ID common.Hash) (*gethTypes.Transaction, error) { + t.base.mu.RLock() + defer t.base.mu.RUnlock() + + tx, exists := t.base.transactionsIDs[ID] + if !exists { + return nil, storage.NotFound + } + + return tx, nil +} From 373e142fff0ad66a97b02f7ea1f86a28e449bf34 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 15:07:58 +0100 Subject: [PATCH 12/75] add basic test suite --- storage/index_test.go | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 storage/index_test.go diff --git a/storage/index_test.go b/storage/index_test.go new file mode 100644 index 000000000..91fd5ba7a --- /dev/null +++ b/storage/index_test.go @@ -0,0 +1,57 @@ +package storage + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/flow-evm-gateway/storage/memory" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "testing" +) + +type blockStorageSuite struct { + suite.Suite + blocks BlockIndexer +} + +func (b *blockStorageSuite) Get(t *testing.T) { + t.Run("existing block", func(t *testing.T) { + block := newBlock(1) + err := b.blocks.Store(block) + require.NoError(t, err) + + ID, err := block.Hash() + require.NoError(t, err) + + retBlock, err := b.blocks.GetByID(ID) + require.NoError(t, err) + require.Equal(t, block.Height, retBlock.Height) + }) + + t.Run("non-existing block", func(t *testing.T) { + retBlock, err := b.blocks.GetByID(common.HexToHash("0x10")) + require.Nil(t, retBlock) + require.ErrorIs(t, err, NotFound) + }) +} + +func TestStorageSuite(t *testing.T) { + suite.Run(t, &blockStorageSuite{blocks: memory.NewBlockStorage()}) +} + +func TestBlockStorage(t *testing.T) { + + t.Run("GetByID", func(t *testing.T) { + t.Run("Found", func(t *testing.T) { + + }) + + t.Run("Not Found", func(t *testing.T) { + + }) + }) + + t.Run("Get By Height", func(t *testing.T) { + + }) + +} From d3cdbf724622e28d03ca8da086b774f3e6ecfad9 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 15:08:05 +0100 Subject: [PATCH 13/75] add block mock --- storage/mocks.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 storage/mocks.go diff --git a/storage/mocks.go b/storage/mocks.go new file mode 100644 index 000000000..9ab39b5d1 --- /dev/null +++ b/storage/mocks.go @@ -0,0 +1,22 @@ +package storage + +import ( + "fmt" + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/flow-go/fvm/evm/types" +) + +func newBlock(height uint64) *types.Block { + parent := common.HexToHash(fmt.Sprintf("0x0%d", height-1)) + if height == 0 { + parent = common.Hash{} + } + + return &types.Block{ + ParentBlockHash: parent, + Height: height, + TotalSupply: 1000, + ReceiptRoot: common.HexToHash(fmt.Sprintf("0x1337%d", height)), + TransactionHashes: nil, + } +} From 838b74c2c536d3a20c9b1652c08678064071e393 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 15:08:09 +0100 Subject: [PATCH 14/75] mod tidy --- go.mod | 90 +++++- go.sum | 872 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 947 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index c4f814cd6..a1640b794 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,8 @@ go 1.20 require ( github.com/ethereum/go-ethereum v1.13.5 github.com/gorilla/websocket v1.5.0 + github.com/onflow/cadence v0.42.7 + github.com/onflow/flow-go v0.33.1 github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 @@ -20,6 +22,8 @@ require ( github.com/bits-and-blooms/bitset v1.7.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -28,16 +32,24 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/coreos/go-semver v0.3.0 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect + github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ef-ds/deque v1.0.4 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect github.com/fxamacker/circlehash v0.3.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/gofrs/flock v0.8.1 // indirect @@ -45,39 +57,92 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/uuid v1.3.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/ipfs/bbloom v0.0.4 // indirect + github.com/ipfs/go-block-format v0.1.2 // indirect + github.com/ipfs/go-cid v0.4.1 // indirect + github.com/ipfs/go-datastore v0.6.0 // indirect + github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect + github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect + github.com/ipfs/go-ipfs-util v0.0.2 // indirect + github.com/ipfs/go-ipld-format v0.5.0 // indirect + github.com/ipfs/go-log v1.0.5 // indirect + github.com/ipfs/go-log/v2 v2.5.1 // indirect + github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jbenet/goprocess v0.1.4 // indirect github.com/k0kubun/pp/v3 v3.2.0 // indirect + github.com/kevinburke/go-bindata v3.23.0+incompatible // indirect github.com/klauspost/compress v1.16.5 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/libp2p/go-libp2p v0.28.1 // indirect github.com/logrusorgru/aurora/v4 v4.0.0 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect + github.com/multiformats/go-base32 v0.1.0 // indirect + github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/multiformats/go-multiaddr v0.9.0 // indirect + github.com/multiformats/go-multibase v0.2.0 // indirect + github.com/multiformats/go-multicodec v0.9.0 // indirect + github.com/multiformats/go-multihash v0.2.3 // indirect + github.com/multiformats/go-multistream v0.4.1 // indirect + github.com/multiformats/go-varint v0.0.7 // indirect + github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.6.0 // indirect - github.com/onflow/cadence v0.42.7 // indirect github.com/onflow/crypto v0.24.9 // indirect - github.com/onflow/flow-go v0.33.1 // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da // indirect + github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 // indirect + github.com/onflow/flow-go/crypto v0.25.0 // indirect + github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect + github.com/onflow/sdks v0.5.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/psiemens/sconfig v0.1.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sethvargo/go-retry v0.2.3 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/slok/go-http-metrics v0.10.0 // indirect + github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/spf13/afero v1.10.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.15.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect @@ -85,9 +150,22 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect + github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect + github.com/vmihailenco/msgpack/v4 v4.3.11 // indirect + github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/blake3 v0.2.3 // indirect go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/sdk v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect golang.org/x/mod v0.14.0 // indirect @@ -97,8 +175,14 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + gonum.org/v1/gonum v0.13.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/protobuf v1.31.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 79584abc9..9d0c2f268 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,68 @@ 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= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +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.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= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +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 v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +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= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +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/kms v1.0.0/go.mod h1:nhUehi+w7zht2XrUfvTRNpxrfayBHqP4lu2NSywui/0= +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/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= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +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= +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= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +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/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= @@ -8,30 +70,75 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +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= +github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +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/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E= github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/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/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bytecodealliance/wasmtime-go v0.22.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= +github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +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.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +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/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= @@ -50,46 +157,81 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/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 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/ef-ds/deque v1.0.4 h1:iFAZNmveMT9WERAkqLJ+oaABF9AcVQ5AjXem/hroniI= +github.com/ef-ds/deque v1.0.4/go.mod h1:gXDnTC3yqvBcHbq2lcExjtAcVrOnJCbMcZXmuj8Z4tg= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= 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/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.9.9/go.mod h1:a9TqabFudpDu1nucId+k9S8R9whYaHnGBLKFouA5EAo= github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fxamacker/cbor/v2 v2.2.1-0.20210927235116-3d6d5d1de29b/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c h1:5tm/Wbs9d9r+qZaUFXk59CWDD0+77PBqDREffYkyi5c= github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/fxamacker/circlehash v0.1.0/go.mod h1:3aq3OfVvsWtkWMb6A1owjOQFA+TLsD5FgJflnaQwtMM= github.com/fxamacker/circlehash v0.3.0 h1:XKdvTtIJV9t7DDUtsf0RIpC1OcxZtPbmgIH7ekx28WA= github.com/fxamacker/circlehash v0.3.0/go.mod h1:3aq3OfVvsWtkWMb6A1owjOQFA+TLsD5FgJflnaQwtMM= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -98,18 +240,32 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +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-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-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +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= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +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-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -118,18 +274,40 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +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.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +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 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= 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-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -137,73 +315,192 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/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-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-20201218002935-b9804c9f04c2/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/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +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.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/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/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/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-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= +github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 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.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +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/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= +github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= +github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= +github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo= +github.com/ipfs/go-block-format v0.1.2/go.mod h1:mACVcrxarQKstUU3Yf/RdwbC4DzPV6++rO2a3d+a/KE= +github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= +github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= +github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= +github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= +github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= +github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= +github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +github.com/ipfs/go-ipfs-blockstore v1.3.0 h1:m2EXaWgwTzAfsmt5UdJ7Is6l4gJcaM/A12XwJyvYvMM= +github.com/ipfs/go-ipfs-blockstore v1.3.0/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= +github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= +github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= +github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= +github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= +github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= +github.com/ipfs/go-ipld-format v0.5.0 h1:WyEle9K96MSrvr47zZHKKcDxJ/vlpET6PSiQsAFO+Ds= +github.com/ipfs/go-ipld-format v0.5.0/go.mod h1:ImdZqJQaEouMjCvqCe0ORUS+uoBmf7Hf+EO/jh+nk3M= +github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= +github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= +github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= +github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= +github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= +github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +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 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= +github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +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.9/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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/k0kubun/pp/v3 v3.2.0 h1:h33hNTZ9nVFNP3u2Fsgz8JXiF5JINoZfFq4SvKJwNcs= github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= +github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= +github.com/kevinburke/go-bindata v3.23.0+incompatible h1:rqNOXZlqrYhMVVAsQx8wuc+LaA73YcfbQ407wAykyS8= +github.com/kevinburke/go-bindata v3.23.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/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.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -212,33 +509,65 @@ 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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-libp2p v0.28.1 h1:YurK+ZAI6cKfASLJBVFkpVBdl3wGhFi6fusOt725ii8= +github.com/libp2p/go-libp2p v0.28.1/go.mod h1:s3Xabc9LSwOcnv9UD4nORnXKTsWkPMkIMB/JIGXVnzk= +github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= +github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= +github.com/libp2p/go-libp2p-pubsub v0.9.3 h1:ihcz9oIBMaCK9kcx+yHWm3mLAFBMAUsM4ux42aikDxo= +github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= +github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.0/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.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +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.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +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/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= 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/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -252,6 +581,34 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ 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/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= +github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= +github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= +github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= +github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= +github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= +github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= +github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= +github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= +github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= +github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= +github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= +github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= +github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= +github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= +github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +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= +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/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -259,91 +616,184 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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/onflow/atree v0.1.0-beta1.0.20211027184039-559ee654ece9/go.mod h1:+6x071HgCF/0v5hQcaE5qqjc2UqN5gCU8h5Mk6uqpOg= github.com/onflow/atree v0.6.0 h1:j7nQ2r8npznx4NX39zPpBYHmdy45f4xwoi+dm37Jk7c= github.com/onflow/atree v0.6.0/go.mod h1:gBHU0M05qCbv9NN0kijLWMgC47gHVNBIp4KmsVFi0tc= -github.com/onflow/cadence v0.42.6 h1:VtI0EpKrdbfqITRMsvyZC4dhgcW1x1LNUQuEpdMDzus= -github.com/onflow/cadence v0.42.6/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= +github.com/onflow/cadence v0.20.1/go.mod h1:7mzUvPZUIJztIbr9eTvs+fQjWWHTF8veC+yk4ihcNIA= +github.com/onflow/cadence v0.42.7 h1:Qp9VYX901saO7wPwF/rwV4cMS+0mfWxnm9EqbYElYy4= github.com/onflow/cadence v0.42.7/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= github.com/onflow/crypto v0.24.9 h1:jYP1qdwid0qCineFzBFlxBchg710A7RuSWpTqxaOdog= github.com/onflow/crypto v0.24.9/go.mod h1:J/V7IEVaqjDajvF8K0B/SJPJDgAOP2G+LVLeb0hgmbg= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da h1:8CEioYNnP0rwjnRbKDgs8SmiQTsdaroeX4d/Q3pQuh4= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da/go.mod h1:WHp24VkUQfcfZi0XjI1uRVRt5alM5SHVkwOil1U2Tpc= +github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da h1:V2zI6AfDtPykMGhgw69ZEGcvyMudRUFOVHYCMN4BbQo= +github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da/go.mod h1:c09d6sNyF/j5/pAynK7sNPb1XKqJqk1rxZPEqEL+dUo= +github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 h1:B4ll7e3j+MqTJv2122Enq3RtDNzmIGRu9xjV7fo7un0= +github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13/go.mod h1:kTMFIySzEJJeupk+7EmXs0EJ6CBWY/MV9fv9iYQk+RU= github.com/onflow/flow-go v0.33.1 h1:g0HHVs3LgP5uc0xbgiiIXFne4g0hY1SwfOz/CseskZA= github.com/onflow/flow-go v0.33.1/go.mod h1:blOWH/Ska65YZwDc3I1JXNvJNhgR87OBVUKgCKiX3G4= +github.com/onflow/flow-go-sdk v0.24.0/go.mod h1:IoptMLPyFXWvyd9yYA6/4EmSeeozl6nJoIv4FaEMg74= github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 h1:ur8TAN76HbnETyYD63j0y+xphQNZ39HZrqEnSfJdOG0= github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228/go.mod h1:LIOqc9CiuVRbPNmxSsf8+nPzon/71wYZbII2wC4RClc= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2 h1:qZjl4wSTG/E9znEjkHF0nNaEdlBLJoOEAtr7xUsTNqc= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/flow-go/crypto v0.21.3/go.mod h1:vI6V4CY3R6c4JKBxdcRiR/AnjBfL8OSD97bJc60cLuQ= +github.com/onflow/flow-go/crypto v0.25.0 h1:6lmoiAQ3APCF+nV7f4f2AXL3PuDKqQiWqRJXmjrMEq4= +github.com/onflow/flow-go/crypto v0.25.0/go.mod h1:OOb2vYcS8AOCajBClhHTJ0NKftFl1RQgTQ0+Vh4nbqk= +github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0= +github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY= +github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= +github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/sdks v0.5.0 h1:2HCRibwqDaQ1c9oUApnkZtEAhWiNY2GTpRD5+ftdkN8= +github.com/onflow/sdks v0.5.0/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= 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/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +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/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +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= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/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.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/psiemens/sconfig v0.1.0 h1:xfWqW+TRpih7mXZIqKYTmpRhlZLQ1kbxV8EjllPv76s= +github.com/psiemens/sconfig v0.1.0/go.mod h1:+MLKqdledP/8G3rOBpknbLh0IclCf4WneJUtS26JB2U= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +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.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= 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/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/schollz/progressbar/v3 v3.8.3/go.mod h1:pWnVCjSBZsT2X3nx9HfRdnCDrpbevliMeoEVhStwHko= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sethvargo/go-retry v0.2.3 h1:oYlgvIvsju3jNbottWABtbnoLC+GDtLdBHxKWxQm/iU= +github.com/sethvargo/go-retry v0.2.3/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/slok/go-http-metrics v0.10.0 h1:rh0LaYEKza5eaYRGDXujKrOln57nHBi4TtVhmNEpbgM= +github.com/slok/go-http-metrics v0.10.0/go.mod h1:lFqdaS4kWMfUKCSukjC47PdCeTk+hXDUVm8kLHRqJ38= 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/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +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= +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.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/supranational/blst v0.3.4/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c h1:HelZ2kAFadG0La9d+4htN4HzQ68Bm2iM9qKMSMES6xg= @@ -352,14 +802,18 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d h1:5JInRQbk5UBX8JfUvKh2oYTLMVwj3p6n+wapDDm7hko= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d/go.mod h1:Nlx5Y115XQvNcIdIy7dZXaNSUpzwBSge4/Ivk93/Yog= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -367,111 +821,294 @@ github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBn 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/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= +github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.11 h1:Q47CePddpNGNhk4GCnAx9DDtASi2rasatE0cd26cZoE= +github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= 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/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/blake3 v0.2.0/go.mod h1:G9pM4qQwjRzF1/v7+vabMj/c5mWpGZ2Wzo3Eb4z0pb4= github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= +github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/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.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +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-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/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-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-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-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-20190827160401-ba9fcec4b297/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= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-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= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +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-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= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= 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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +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-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/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/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-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= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-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-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-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/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-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-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-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-20191228213918-04cbcbbfeed8/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-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-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-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-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201014080544-cc95f250f6bc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/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-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -485,29 +1122,86 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +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-20201208040808-7e3f01d25324/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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +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-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/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-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-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +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-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +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-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/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-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +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.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -516,23 +1210,150 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.1/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/gonum v0.13.0 h1:a0T3bh+7fhRyqeNbiC3qVHYmkiQgit3wnNan/2c0HMM= +gonum.org/v1/gonum v0.13.0/go.mod h1:/WPYRckkfWrhWefxyYTfrTtQR0KH4iyHNuzxqXAKyAU= +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.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.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= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +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.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.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 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.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 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/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-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-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= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +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-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-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211007155348-82e027067bd4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +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.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +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 v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +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= @@ -541,11 +1362,14 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 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= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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= @@ -555,12 +1379,23 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +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-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= 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/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.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -568,9 +1403,22 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= 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= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +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= +lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= +lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= +pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +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= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From d2aec38c875d083b1a8566c2be1cc9abb95d9a67 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 15:12:45 +0100 Subject: [PATCH 15/75] add base block test suite --- storage/index_test.go | 57 ---------------------------------- storage/index_testsuite.go | 38 +++++++++++++++++++++++ storage/memory/storage_test.go | 11 +++++++ 3 files changed, 49 insertions(+), 57 deletions(-) delete mode 100644 storage/index_test.go create mode 100644 storage/index_testsuite.go create mode 100644 storage/memory/storage_test.go diff --git a/storage/index_test.go b/storage/index_test.go deleted file mode 100644 index 91fd5ba7a..000000000 --- a/storage/index_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package storage - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/onflow/flow-evm-gateway/storage/memory" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - "testing" -) - -type blockStorageSuite struct { - suite.Suite - blocks BlockIndexer -} - -func (b *blockStorageSuite) Get(t *testing.T) { - t.Run("existing block", func(t *testing.T) { - block := newBlock(1) - err := b.blocks.Store(block) - require.NoError(t, err) - - ID, err := block.Hash() - require.NoError(t, err) - - retBlock, err := b.blocks.GetByID(ID) - require.NoError(t, err) - require.Equal(t, block.Height, retBlock.Height) - }) - - t.Run("non-existing block", func(t *testing.T) { - retBlock, err := b.blocks.GetByID(common.HexToHash("0x10")) - require.Nil(t, retBlock) - require.ErrorIs(t, err, NotFound) - }) -} - -func TestStorageSuite(t *testing.T) { - suite.Run(t, &blockStorageSuite{blocks: memory.NewBlockStorage()}) -} - -func TestBlockStorage(t *testing.T) { - - t.Run("GetByID", func(t *testing.T) { - t.Run("Found", func(t *testing.T) { - - }) - - t.Run("Not Found", func(t *testing.T) { - - }) - }) - - t.Run("Get By Height", func(t *testing.T) { - - }) - -} diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go new file mode 100644 index 000000000..9f1517ae0 --- /dev/null +++ b/storage/index_testsuite.go @@ -0,0 +1,38 @@ +package storage + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "testing" +) + +type BlockTestSuite struct { + suite.Suite + Blocks BlockIndexer +} + +func (b *BlockTestSuite) Get(t *testing.T) { + t.Run("existing block", func(t *testing.T) { + block := newBlock(1) + err := b.Blocks.Store(block) + require.NoError(t, err) + + ID, err := block.Hash() + require.NoError(t, err) + + retBlock, err := b.Blocks.GetByID(ID) + require.NoError(t, err) + require.Equal(t, block.Height, retBlock.Height) + }) + + t.Run("non-existing block", func(t *testing.T) { + retBlock, err := b.Blocks.GetByID(common.HexToHash("0x10")) + require.Nil(t, retBlock) + require.ErrorIs(t, err, NotFound) + }) +} + +func (b *BlockTestSuite) Store() { + +} diff --git a/storage/memory/storage_test.go b/storage/memory/storage_test.go new file mode 100644 index 000000000..e3448d454 --- /dev/null +++ b/storage/memory/storage_test.go @@ -0,0 +1,11 @@ +package memory + +import ( + "github.com/onflow/flow-evm-gateway/storage" + "github.com/stretchr/testify/suite" + "testing" +) + +func TestStorageSuite(t *testing.T) { + suite.Run(t, &storage.BlockTestSuite{Blocks: NewBlockStorage()}) +} From a90373ce7960281e6f9128e8bf3c9db52c82499a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 15:48:20 +0100 Subject: [PATCH 16/75] update deps --- go.mod | 9 ++++----- go.sum | 20 +++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index a1640b794..7b7f983bc 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/ethereum/go-ethereum v1.13.5 github.com/gorilla/websocket v1.5.0 github.com/onflow/cadence v0.42.7 - github.com/onflow/flow-go v0.33.1 - github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 + github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420 + github.com/onflow/flow-go-sdk v0.44.0 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 google.golang.org/grpc v1.59.0 @@ -56,7 +56,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect @@ -109,11 +109,10 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.6.0 // indirect - github.com/onflow/crypto v0.24.9 // indirect + github.com/onflow/crypto v0.25.0 // indirect github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da // indirect github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da // indirect github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 // indirect - github.com/onflow/flow-go/crypto v0.25.0 // indirect github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect github.com/onflow/sdks v0.5.0 // indirect diff --git a/go.sum b/go.sum index 9d0c2f268..85e93cf36 100644 --- a/go.sum +++ b/go.sum @@ -341,7 +341,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/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/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -367,8 +367,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= 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.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.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= @@ -627,22 +627,20 @@ github.com/onflow/atree v0.6.0/go.mod h1:gBHU0M05qCbv9NN0kijLWMgC47gHVNBIp4KmsVF github.com/onflow/cadence v0.20.1/go.mod h1:7mzUvPZUIJztIbr9eTvs+fQjWWHTF8veC+yk4ihcNIA= github.com/onflow/cadence v0.42.7 h1:Qp9VYX901saO7wPwF/rwV4cMS+0mfWxnm9EqbYElYy4= github.com/onflow/cadence v0.42.7/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= -github.com/onflow/crypto v0.24.9 h1:jYP1qdwid0qCineFzBFlxBchg710A7RuSWpTqxaOdog= -github.com/onflow/crypto v0.24.9/go.mod h1:J/V7IEVaqjDajvF8K0B/SJPJDgAOP2G+LVLeb0hgmbg= +github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg= +github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da h1:8CEioYNnP0rwjnRbKDgs8SmiQTsdaroeX4d/Q3pQuh4= github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231219201108-fbdb10b0a2da/go.mod h1:WHp24VkUQfcfZi0XjI1uRVRt5alM5SHVkwOil1U2Tpc= github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da h1:V2zI6AfDtPykMGhgw69ZEGcvyMudRUFOVHYCMN4BbQo= github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20231219201108-fbdb10b0a2da/go.mod h1:c09d6sNyF/j5/pAynK7sNPb1XKqJqk1rxZPEqEL+dUo= github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 h1:B4ll7e3j+MqTJv2122Enq3RtDNzmIGRu9xjV7fo7un0= github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13/go.mod h1:kTMFIySzEJJeupk+7EmXs0EJ6CBWY/MV9fv9iYQk+RU= -github.com/onflow/flow-go v0.33.1 h1:g0HHVs3LgP5uc0xbgiiIXFne4g0hY1SwfOz/CseskZA= -github.com/onflow/flow-go v0.33.1/go.mod h1:blOWH/Ska65YZwDc3I1JXNvJNhgR87OBVUKgCKiX3G4= +github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420 h1:NJpfFoQarMd6WsAMaIi42YiBnYi8OWZ8RCjKR9uO8J0= +github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420/go.mod h1:wCxVsiqd1A3P23JWIhUbbWbxQGkYZOIj2KsZE4//eiQ= github.com/onflow/flow-go-sdk v0.24.0/go.mod h1:IoptMLPyFXWvyd9yYA6/4EmSeeozl6nJoIv4FaEMg74= -github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228 h1:ur8TAN76HbnETyYD63j0y+xphQNZ39HZrqEnSfJdOG0= -github.com/onflow/flow-go-sdk v0.44.1-0.20231220221922-58fb441b7228/go.mod h1:LIOqc9CiuVRbPNmxSsf8+nPzon/71wYZbII2wC4RClc= +github.com/onflow/flow-go-sdk v0.44.0 h1:gVRLcZ6LUNs/5mzHDx0mp4mEnBAWD62O51P4/nYm4rE= +github.com/onflow/flow-go-sdk v0.44.0/go.mod h1:mm1Fi2hiMrexNMwRzTrAN2zwTvlP8iQ5CF2JSAgJR8U= github.com/onflow/flow-go/crypto v0.21.3/go.mod h1:vI6V4CY3R6c4JKBxdcRiR/AnjBfL8OSD97bJc60cLuQ= -github.com/onflow/flow-go/crypto v0.25.0 h1:6lmoiAQ3APCF+nV7f4f2AXL3PuDKqQiWqRJXmjrMEq4= -github.com/onflow/flow-go/crypto v0.25.0/go.mod h1:OOb2vYcS8AOCajBClhHTJ0NKftFl1RQgTQ0+Vh4nbqk= github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0= github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY= github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= From 05c6c5cf304f044fd33f97bcee8585986ba4fa0a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:15:28 +0100 Subject: [PATCH 17/75] comment expected behaviour of indexers --- storage/index.go | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/storage/index.go b/storage/index.go index 6d0ef309c..212e1a5d6 100644 --- a/storage/index.go +++ b/storage/index.go @@ -7,21 +7,64 @@ import ( ) type BlockIndexer interface { + // Store provided block. + // Expected errors: + // - errors.Duplicate if the block already exists Store(block *types.Block) error + + // GetByHeight returns a block stored by height. + // Expected errors: + // - errors.NotFound if the block is not found GetByHeight(height uint64) (*types.Block, error) + + // GetByID returns a block stored by ID. + // Expected errors: + // - errors.NotFound if the block is not found GetByID(ID common.Hash) (*types.Block, error) + + // LatestHeight returns the latest stored block height. + // Expected errors: + // - errors.NotInitialized if the storage was not initialized LatestHeight() (uint64, error) + + // FirstHeight returns the first stored block height. + // Expected errors: + // - errors.NotInitialized if the storage was not initialized FirstHeight() (uint64, error) } type ReceiptIndexer interface { + // Store provided receipt. + // Expected errors: + // - errors.Duplicate if the block already exists. Store(receipt *gethTypes.ReceiptForStorage) error + + // GetByTransactionID returns the receipt for the transaction ID. + // Expected errors: + // - errors.NotFound if the receipt is not found GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) + + // GetByBlockID returns the receipt for the block ID. + // Expected errors: + // - errors.NotFound if the receipt is not found + // TODO right now one transaction per block, but this might change in future so the API needs to be updated. GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) - BloomsForBlockRange(start, end uint64) []*gethTypes.Bloom + + // BloomsForBlockRange returns bloom values for the block height range. + // Goes through all the blocks in the range if the range is valid and returns the bloom values. + // Expected errors: + // - errors.InvalidRange if the provided height range is invalid. + BloomsForBlockRange(start, end uint64) ([]*gethTypes.Bloom, error) } type TransactionIndexer interface { + // Store provided transaction. + // Expected errors: + // - errors.Duplicate if the transaction with the ID already exists. Store(tx *gethTypes.Transaction) error + + // Get transaction by the ID. + // Expected errors: + // - errors.NotFound if the transaction with the ID is not found. Get(ID common.Hash) (*gethTypes.Transaction, error) } From b96979a67ad6b427bdf403e719c61c5c53ce13c7 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:15:37 +0100 Subject: [PATCH 18/75] add new error --- storage/error.go | 10 ---------- storage/errors/error.go | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) delete mode 100644 storage/error.go create mode 100644 storage/errors/error.go diff --git a/storage/error.go b/storage/error.go deleted file mode 100644 index 350f20478..000000000 --- a/storage/error.go +++ /dev/null @@ -1,10 +0,0 @@ -package storage - -import "errors" - -var ( - // NotInitialized indicates storage instance was not correctly initialized and contains empty required values. - NotInitialized = errors.New("storage not initialized") - // NotFound indicates the resource does not exist. - NotFound = errors.New("entity not found") -) diff --git a/storage/errors/error.go b/storage/errors/error.go new file mode 100644 index 000000000..c96b4101e --- /dev/null +++ b/storage/errors/error.go @@ -0,0 +1,14 @@ +package errors + +import "errors" + +var ( + // NotInitialized indicates storage instance was not correctly initialized and contains empty required values. + NotInitialized = errors.New("storage not initialized") + // NotFound indicates the resource does not exist. + NotFound = errors.New("entity not found") + // Duplicate indicates that the entity can not be stored due to an already existing same entity. + Duplicate = errors.New("entity duplicate") + // InvalidRange indicates that the block range provided as start and end height is invalid. + InvalidRange = errors.New("invalid block height range") +) From 1643ac5d123ef5c3906264a29e720051174d174a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:15:44 +0100 Subject: [PATCH 19/75] add more test suite --- storage/index_testsuite.go | 57 +++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 9f1517ae0..70ff8f5d4 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -2,9 +2,8 @@ package storage import ( "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" + "github.com/onflow/flow-evm-gateway/storage/errors" "github.com/stretchr/testify/suite" - "testing" ) type BlockTestSuite struct { @@ -12,27 +11,59 @@ type BlockTestSuite struct { Blocks BlockIndexer } -func (b *BlockTestSuite) Get(t *testing.T) { - t.Run("existing block", func(t *testing.T) { - block := newBlock(1) +func (b *BlockTestSuite) TestGet() { + b.Run("existing block", func() { + height := uint64(1) + block := newBlock(height) err := b.Blocks.Store(block) - require.NoError(t, err) + b.Require().NoError(err) ID, err := block.Hash() - require.NoError(t, err) + b.Require().NoError(err) retBlock, err := b.Blocks.GetByID(ID) - require.NoError(t, err) - require.Equal(t, block.Height, retBlock.Height) + b.Require().NoError(err) + b.Require().Equal(block, retBlock) + + retBlock, err = b.Blocks.GetByHeight(height) + b.Require().Equal(block, retBlock) }) - t.Run("non-existing block", func(t *testing.T) { + b.Run("non-existing block", func() { retBlock, err := b.Blocks.GetByID(common.HexToHash("0x10")) - require.Nil(t, retBlock) - require.ErrorIs(t, err, NotFound) + b.Require().Nil(retBlock) + b.Require().ErrorIs(err, errors.NotFound) + }) +} + +func (b *BlockTestSuite) TestStore() { + block := newBlock(10) + + b.Run("success", func() { + err := b.Blocks.Store(block) + b.Require().NoError(err) + }) + + b.Run("failed to store same block", func() { + err := b.Blocks.Store(block) + b.Require().ErrorIs(err, errors.Duplicate) }) } -func (b *BlockTestSuite) Store() { +func (b *BlockTestSuite) TestHeights() { + b.Run("first height", func() { + first, err := b.Blocks.FirstHeight() + b.Require().NoError(err) + b.Require().Equal(uint64(1), first) + }) + + b.Run("last height", func() { + lastHeight := uint64(100) + err := b.Blocks.Store(newBlock(lastHeight)) + b.Require().NoError(err) + last, err := b.Blocks.LatestHeight() + b.Require().NoError(err) + b.Require().Equal(lastHeight, last) + }) } From 6848596c1d5d7a00595ed6e60c4fd852f653d5ff Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:15:49 +0100 Subject: [PATCH 20/75] add mocks for block --- storage/mocks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/mocks.go b/storage/mocks.go index 9ab39b5d1..2df0ab00d 100644 --- a/storage/mocks.go +++ b/storage/mocks.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" "github.com/onflow/flow-go/fvm/evm/types" + "math/big" ) func newBlock(height uint64) *types.Block { @@ -15,7 +16,7 @@ func newBlock(height uint64) *types.Block { return &types.Block{ ParentBlockHash: parent, Height: height, - TotalSupply: 1000, + TotalSupply: big.NewInt(1000), ReceiptRoot: common.HexToHash(fmt.Sprintf("0x1337%d", height)), TransactionHashes: nil, } From 4d4610d5ba152ac305d55a3bf3b3810d48355b66 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:15:55 +0100 Subject: [PATCH 21/75] update behaviour --- storage/memory/storage.go | 45 ++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index e74300a2a..868230944 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -1,17 +1,18 @@ package memory import ( - "errors" "fmt" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/storage" + "github.com/onflow/flow-evm-gateway/storage/errors" "github.com/onflow/flow-go/fvm/evm/types" "sync" ) const ( - unknownHeight = uint64(0) - 1 + unknownHeight = math.MaxUint64 - 1 ) type baseStorage struct { @@ -64,19 +65,19 @@ func (s BlockStorage) GetByHeight(height uint64) (*types.Block, error) { // Check if the requested height is within the known range if height < s.base.firstHeight || height > s.base.lastHeight { - return nil, storage.NotFound + return nil, errors.NotFound } // Retrieve the block using the blockHeightsIDs map blockID, exists := s.base.blockHeightsIDs[height] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } // Retrieve the block using the blocksIDs map block, exists := s.base.blocksIDs[blockID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } return block, nil @@ -89,7 +90,7 @@ func (s BlockStorage) GetByID(ID common.Hash) (*types.Block, error) { // Retrieve the block using the blocksIDs map block, exists := s.base.blocksIDs[ID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } return block, nil @@ -107,7 +108,7 @@ func (s BlockStorage) Store(block *types.Block) error { // Check if the block already exists _, exists := s.base.blocksIDs[ID] if exists { - return errors.New("block already exists") + return errors.Duplicate } // Store the block in blocksIDs map and update blockHeightsIDs map @@ -130,7 +131,7 @@ func (s BlockStorage) LatestHeight() (uint64, error) { defer s.base.mu.RUnlock() if s.base.lastHeight == unknownHeight { - return 0, storage.NotInitialized + return 0, errors.NotInitialized } return s.base.lastHeight, nil } @@ -140,7 +141,7 @@ func (s BlockStorage) FirstHeight() (uint64, error) { defer s.base.mu.RUnlock() if s.base.firstHeight == unknownHeight { - return 0, storage.NotInitialized + return 0, errors.NotInitialized } return s.base.firstHeight, nil } @@ -161,6 +162,11 @@ func (r ReceiptStorage) Store(receipt *gethTypes.ReceiptForStorage) error { r.base.mu.Lock() defer r.base.mu.Unlock() + _, exists := r.base.receiptsTxIDs[receipt.TxHash] + if exists { + return errors.Duplicate + } + r.base.receiptsTxIDs[receipt.TxHash] = receipt r.base.receiptBlockIDTxIDs[receipt.BlockHash] = receipt.TxHash @@ -173,7 +179,7 @@ func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptFo receipt, exists := r.base.receiptsTxIDs[ID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } return receipt, nil @@ -185,21 +191,25 @@ func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStora txID, exists := r.base.receiptBlockIDTxIDs[ID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } receipt, exists := r.base.receiptsTxIDs[txID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } return receipt, nil } -func (r ReceiptStorage) BloomsForBlockRange(start, end uint64) []*gethTypes.Bloom { +func (r ReceiptStorage) BloomsForBlockRange(start, end uint64) ([]*gethTypes.Bloom, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() + if start >= end { + return nil, errors.InvalidRange + } + blooms := make([]*gethTypes.Bloom, 0) // Iterate through the range of block heights and add the blooms to the result @@ -210,7 +220,7 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end uint64) []*gethTypes.Bloo } } - return blooms + return blooms, nil } var _ storage.TransactionIndexer = &TransactionStorage{} @@ -229,6 +239,11 @@ func (t TransactionStorage) Store(tx *gethTypes.Transaction) error { t.base.mu.Lock() defer t.base.mu.Unlock() + tx, exists := t.base.transactionsIDs[tx.Hash()] + if exists { + return errors.Duplicate + } + t.base.transactionsIDs[tx.Hash()] = tx return nil } @@ -239,7 +254,7 @@ func (t TransactionStorage) Get(ID common.Hash) (*gethTypes.Transaction, error) tx, exists := t.base.transactionsIDs[ID] if !exists { - return nil, storage.NotFound + return nil, errors.NotFound } return tx, nil From 93aca83e415617fa31d1e9e399ddac15aff3b3d2 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:16:01 +0100 Subject: [PATCH 22/75] update tests --- storage/memory/storage_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/memory/storage_test.go b/storage/memory/storage_test.go index e3448d454..7630f3012 100644 --- a/storage/memory/storage_test.go +++ b/storage/memory/storage_test.go @@ -6,6 +6,7 @@ import ( "testing" ) +// tests that make sure the implementation conform to the interface expected behaviour func TestStorageSuite(t *testing.T) { suite.Run(t, &storage.BlockTestSuite{Blocks: NewBlockStorage()}) } From a0f2d57509f12b0e23c6ad33c861a8e55d6bf34a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:36:26 +0100 Subject: [PATCH 23/75] update receipt type --- storage/index.go | 6 ++-- storage/index_testsuite.go | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/storage/index.go b/storage/index.go index 212e1a5d6..0a4c1d298 100644 --- a/storage/index.go +++ b/storage/index.go @@ -37,18 +37,18 @@ type ReceiptIndexer interface { // Store provided receipt. // Expected errors: // - errors.Duplicate if the block already exists. - Store(receipt *gethTypes.ReceiptForStorage) error + Store(receipt *gethTypes.Receipt) error // GetByTransactionID returns the receipt for the transaction ID. // Expected errors: // - errors.NotFound if the receipt is not found - GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) + GetByTransactionID(ID common.Hash) (*gethTypes.Receipt, error) // GetByBlockID returns the receipt for the block ID. // Expected errors: // - errors.NotFound if the receipt is not found // TODO right now one transaction per block, but this might change in future so the API needs to be updated. - GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) + GetByBlockID(ID common.Hash) (*gethTypes.Receipt, error) // BloomsForBlockRange returns bloom values for the block height range. // Goes through all the blocks in the range if the range is valid and returns the bloom values. diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 70ff8f5d4..4cd919e53 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -67,3 +67,60 @@ func (b *BlockTestSuite) TestHeights() { b.Require().Equal(lastHeight, last) }) } + +type ReceiptTestSuite struct { + suite.Suite + ReceiptIndexer ReceiptIndexer +} + +func (s *ReceiptTestSuite) TestStoreReceipt() { + receipt := newReceipt() + + s.Run("store receipt successfully", func() { + err := s.ReceiptIndexer.Store(receipt) + s.Require().NoError(err) + }) + + s.Run("store duplicate receipt", func() { + err := s.ReceiptIndexer.Store(receipt) + s.Require().ErrorIs(err, errors.Duplicate) + }) +} + +func (s *ReceiptTestSuite) TestGetReceiptByTransactionID() { + s.Run("existing transaction ID", func() { + receipt := newReceipt() + err := s.ReceiptIndexer.Store(receipt) + s.Require().NoError(err) + + retReceipt, err := s.ReceiptIndexer.GetByTransactionID(receipt.TxHash) + s.Require().NoError(err) + s.Require().Equal(receipt, retReceipt) + }) + + s.Run("non-existing transaction ID", func() { + nonExistingTxHash := common.HexToHash("0x123") + retReceipt, err := s.ReceiptIndexer.GetByTransactionID(nonExistingTxHash) + s.Require().Nil(retReceipt) + s.Require().ErrorIs(err, errors.NotFound) + }) +} + +func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { + s.Run("existing block ID", func() { + receipt := newReceipt() + err := s.ReceiptIndexer.Store(receipt) + s.Require().NoError(err) + + retReceipt, err := s.ReceiptIndexer.GetByBlockID(receipt.BlockHash) + s.Require().NoError(err) + s.Require().Equal(receipt, retReceipt) + }) + + s.Run("non-existing block ID", func() { + nonExistingBlockHash := common.HexToHash("0x456") + retReceipt, err := s.ReceiptIndexer.GetByBlockID(nonExistingBlockHash) + s.Require().Nil(retReceipt) + s.Require().ErrorIs(err, errors.NotFound) + }) +} From 752b8d3a45c061bdda026aeb70a43c8dcd052d34 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:47:22 +0100 Subject: [PATCH 24/75] add receipt test suite --- storage/index_testsuite.go | 9 +++++---- storage/memory/storage.go | 10 +++++----- storage/memory/storage_test.go | 6 +++++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 4cd919e53..c1edb30ef 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -74,7 +74,7 @@ type ReceiptTestSuite struct { } func (s *ReceiptTestSuite) TestStoreReceipt() { - receipt := newReceipt() + receipt := newReceipt(1, common.HexToHash("0xf1")) s.Run("store receipt successfully", func() { err := s.ReceiptIndexer.Store(receipt) @@ -89,7 +89,7 @@ func (s *ReceiptTestSuite) TestStoreReceipt() { func (s *ReceiptTestSuite) TestGetReceiptByTransactionID() { s.Run("existing transaction ID", func() { - receipt := newReceipt() + receipt := newReceipt(2, common.HexToHash("0xf2")) err := s.ReceiptIndexer.Store(receipt) s.Require().NoError(err) @@ -108,11 +108,12 @@ func (s *ReceiptTestSuite) TestGetReceiptByTransactionID() { func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { s.Run("existing block ID", func() { - receipt := newReceipt() + ID := common.HexToHash("0x1") + receipt := newReceipt(3, ID) err := s.ReceiptIndexer.Store(receipt) s.Require().NoError(err) - retReceipt, err := s.ReceiptIndexer.GetByBlockID(receipt.BlockHash) + retReceipt, err := s.ReceiptIndexer.GetByBlockID(ID) s.Require().NoError(err) s.Require().Equal(receipt, retReceipt) }) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 868230944..2c18175df 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -23,7 +23,7 @@ type baseStorage struct { firstHeight uint64 lastHeight uint64 - receiptsTxIDs map[common.Hash]*gethTypes.ReceiptForStorage + receiptsTxIDs map[common.Hash]*gethTypes.Receipt receiptBlockIDTxIDs map[common.Hash]common.Hash bloomHeight map[uint64]*gethTypes.Bloom @@ -39,7 +39,7 @@ func baseStorageFactory() *baseStorage { blockHeightsIDs: make(map[uint64]common.Hash), firstHeight: unknownHeight, lastHeight: unknownHeight, - receiptsTxIDs: make(map[common.Hash]*gethTypes.ReceiptForStorage), + receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), bloomHeight: make(map[uint64]*gethTypes.Bloom), } @@ -158,7 +158,7 @@ func NewReceiptStorage() *ReceiptStorage { } } -func (r ReceiptStorage) Store(receipt *gethTypes.ReceiptForStorage) error { +func (r ReceiptStorage) Store(receipt *gethTypes.Receipt) error { r.base.mu.Lock() defer r.base.mu.Unlock() @@ -173,7 +173,7 @@ func (r ReceiptStorage) Store(receipt *gethTypes.ReceiptForStorage) error { return nil } -func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) { +func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.Receipt, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() @@ -185,7 +185,7 @@ func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.ReceiptFo return receipt, nil } -func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.ReceiptForStorage, error) { +func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.Receipt, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() diff --git a/storage/memory/storage_test.go b/storage/memory/storage_test.go index 7630f3012..4550f42e3 100644 --- a/storage/memory/storage_test.go +++ b/storage/memory/storage_test.go @@ -7,6 +7,10 @@ import ( ) // tests that make sure the implementation conform to the interface expected behaviour -func TestStorageSuite(t *testing.T) { +func TestBlocks(t *testing.T) { suite.Run(t, &storage.BlockTestSuite{Blocks: NewBlockStorage()}) } + +func TestReceipts(t *testing.T) { + suite.Run(t, &storage.ReceiptTestSuite{ReceiptIndexer: NewReceiptStorage()}) +} From c3ceb8e99ee7ecdc7599f1bbf8464f2796854d91 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:47:27 +0100 Subject: [PATCH 25/75] add receipt mock --- storage/mocks.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/storage/mocks.go b/storage/mocks.go index 2df0ab00d..4404150f3 100644 --- a/storage/mocks.go +++ b/storage/mocks.go @@ -3,6 +3,7 @@ package storage import ( "fmt" "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-go/fvm/evm/types" "math/big" ) @@ -21,3 +22,37 @@ func newBlock(height uint64) *types.Block { TransactionHashes: nil, } } + +func newReceipt(height uint64, ID common.Hash) *gethTypes.Receipt { + txHash := common.HexToHash(fmt.Sprintf("0xff%d", height)) + return &gethTypes.Receipt{ + PostState: common.Hash{2}.Bytes(), + CumulativeGasUsed: 3, + Logs: []*gethTypes.Log{ + { + Address: common.BytesToAddress([]byte{0x22}), + Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("bravo")}, + BlockNumber: height, + TxHash: txHash, + TxIndex: 1, + BlockHash: ID, + Index: 2, + }, + { + Address: common.BytesToAddress([]byte{0x02, 0x22}), + Topics: []common.Hash{common.HexToHash("charlie"), common.HexToHash("delta")}, + BlockNumber: height, + TxHash: txHash, + TxIndex: 1, + BlockHash: ID, + Index: 3, + }, + }, + TxHash: txHash, + GasUsed: 2, + EffectiveGasPrice: big.NewInt(22), + BlockHash: ID, + BlockNumber: big.NewInt(int64(height)), + TransactionIndex: 1, + } +} From 80f34d72acb9f59e3bae40360ab2530d84305b61 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:56:31 +0100 Subject: [PATCH 26/75] add transaction test suite --- storage/index_testsuite.go | 38 ++++++++++++++++++++++++++++++++++ storage/memory/storage_test.go | 4 ++++ 2 files changed, 42 insertions(+) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index c1edb30ef..af398f759 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -125,3 +125,41 @@ func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { s.Require().ErrorIs(err, errors.NotFound) }) } + +type TransactionTestSuite struct { + suite.Suite + TransactionIndexer TransactionIndexer +} + +func (s *TransactionTestSuite) TestStoreTransaction() { + tx := newTransaction(0) + + s.Run("store transaction successfully", func() { + err := s.TransactionIndexer.Store(tx) + s.Require().NoError(err) + }) + + s.Run("store duplicate transaction", func() { + err := s.TransactionIndexer.Store(tx) + s.Require().ErrorIs(err, errors.Duplicate) + }) +} + +func (s *TransactionTestSuite) TestGetTransaction() { + s.Run("existing transaction", func() { + tx := newTransaction(1) + err := s.TransactionIndexer.Store(tx) + s.Require().NoError(err) + + retTx, err := s.TransactionIndexer.Get(tx.Hash()) + s.Require().NoError(err) + s.Require().Equal(tx, retTx) + }) + + s.Run("non-existing transaction", func() { + nonExistingTxHash := common.HexToHash("0x789") + retTx, err := s.TransactionIndexer.Get(nonExistingTxHash) + s.Require().Nil(retTx) + s.Require().ErrorIs(err, errors.NotFound) + }) +} diff --git a/storage/memory/storage_test.go b/storage/memory/storage_test.go index 4550f42e3..0dce0eb41 100644 --- a/storage/memory/storage_test.go +++ b/storage/memory/storage_test.go @@ -14,3 +14,7 @@ func TestBlocks(t *testing.T) { func TestReceipts(t *testing.T) { suite.Run(t, &storage.ReceiptTestSuite{ReceiptIndexer: NewReceiptStorage()}) } + +func TestTransactions(t *testing.T) { + suite.Run(t, &storage.TransactionTestSuite{TransactionIndexer: NewTransactionStorage()}) +} From 00734c5a975e98ccc013113b76a63e2927732b3b Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:56:36 +0100 Subject: [PATCH 27/75] add tx mock --- storage/mocks.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/storage/mocks.go b/storage/mocks.go index 4404150f3..13a9fc0bd 100644 --- a/storage/mocks.go +++ b/storage/mocks.go @@ -56,3 +56,15 @@ func newReceipt(height uint64, ID common.Hash) *gethTypes.Receipt { TransactionIndex: 1, } } + +func newTransaction(nonce uint64) *gethTypes.Transaction { + return gethTypes.NewTx(&gethTypes.DynamicFeeTx{ + ChainID: big.NewInt(1), + Nonce: nonce, + To: &common.Address{0x01, 0x02}, + Gas: 123457, + GasFeeCap: big.NewInt(13), + GasTipCap: big.NewInt(0), + Data: []byte{}, + }) +} From cbfb2fa669fef9bd84c5821d48496ebe41cb64f4 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 16:56:42 +0100 Subject: [PATCH 28/75] fix storage bug --- storage/memory/storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 2c18175df..9a1b933e9 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -42,6 +42,7 @@ func baseStorageFactory() *baseStorage { receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), bloomHeight: make(map[uint64]*gethTypes.Bloom), + transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), } } return store @@ -239,7 +240,7 @@ func (t TransactionStorage) Store(tx *gethTypes.Transaction) error { t.base.mu.Lock() defer t.base.mu.Unlock() - tx, exists := t.base.transactionsIDs[tx.Hash()] + _, exists := t.base.transactionsIDs[tx.Hash()] if exists { return errors.Duplicate } From 3b0cd01a103ba81e76cfefc30c6170889884f857 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 17:17:31 +0100 Subject: [PATCH 29/75] update range type --- storage/index.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/index.go b/storage/index.go index 0a4c1d298..562c8082c 100644 --- a/storage/index.go +++ b/storage/index.go @@ -4,6 +4,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-go/fvm/evm/types" + "math/big" ) type BlockIndexer interface { @@ -53,8 +54,8 @@ type ReceiptIndexer interface { // BloomsForBlockRange returns bloom values for the block height range. // Goes through all the blocks in the range if the range is valid and returns the bloom values. // Expected errors: - // - errors.InvalidRange if the provided height range is invalid. - BloomsForBlockRange(start, end uint64) ([]*gethTypes.Bloom, error) + // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. + BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, error) } type TransactionIndexer interface { From b53a816f7f1e5a352492567f52518629bfa84ca6 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 18:26:06 +0100 Subject: [PATCH 30/75] fix tests --- storage/index_testsuite.go | 37 +++++++++++++++++++++++++++++++++++++ storage/memory/storage.go | 22 ++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index af398f759..e6b5b6b0a 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -1,7 +1,9 @@ package storage import ( + "fmt" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/storage/errors" "github.com/stretchr/testify/suite" ) @@ -126,6 +128,41 @@ func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { }) } +func (s *ReceiptTestSuite) TestBloomsForBlockRange() { + + s.Run("valid block range", func() { + start := uint64(10) + end := uint64(15) + testBlooms := make([]types.Bloom, end-start+1) + + for i := start; i <= end; i++ { + r := newReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) + testBlooms = append(testBlooms, r.Bloom) + } + + blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + s.Require().NoError(err) + s.Require().Len(blooms, len(testBlooms)) + s.Require().Equal(testBlooms, blooms) + }) + + s.Run("invalid block range", func() { + start := uint64(10) + end := uint64(5) // end is less than start + blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + s.Require().ErrorIs(err, errors.InvalidRange) + s.Require().Nil(blooms) + }) + + s.Run("non-existing block range", func() { + start := uint64(100) + end := uint64(105) + blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + s.Require().NoError(err) + s.Require().Len(blooms, 0) + }) +} + type TransactionTestSuite struct { suite.Suite TransactionIndexer TransactionIndexer diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 9a1b933e9..563f13c71 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -8,6 +8,7 @@ import ( "github.com/onflow/flow-evm-gateway/storage" "github.com/onflow/flow-evm-gateway/storage/errors" "github.com/onflow/flow-go/fvm/evm/types" + "math/big" "sync" ) @@ -25,7 +26,7 @@ type baseStorage struct { receiptsTxIDs map[common.Hash]*gethTypes.Receipt receiptBlockIDTxIDs map[common.Hash]common.Hash - bloomHeight map[uint64]*gethTypes.Bloom + bloomHeight map[*big.Int]gethTypes.Bloom transactionsIDs map[common.Hash]*gethTypes.Transaction } @@ -41,7 +42,7 @@ func baseStorageFactory() *baseStorage { lastHeight: unknownHeight, receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), - bloomHeight: make(map[uint64]*gethTypes.Bloom), + bloomHeight: make(map[*big.Int]gethTypes.Bloom), transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), } } @@ -163,14 +164,19 @@ func (r ReceiptStorage) Store(receipt *gethTypes.Receipt) error { r.base.mu.Lock() defer r.base.mu.Unlock() - _, exists := r.base.receiptsTxIDs[receipt.TxHash] - if exists { + if _, ok := r.base.receiptsTxIDs[receipt.TxHash]; ok { return errors.Duplicate } r.base.receiptsTxIDs[receipt.TxHash] = receipt r.base.receiptBlockIDTxIDs[receipt.BlockHash] = receipt.TxHash + if _, ok := r.base.bloomHeight[receipt.BlockNumber]; ok { + return errors.Duplicate + } + + r.base.bloomHeight[receipt.BlockNumber] = receipt.Bloom + return nil } @@ -203,21 +209,21 @@ func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.Receipt, error) return receipt, nil } -func (r ReceiptStorage) BloomsForBlockRange(start, end uint64) ([]*gethTypes.Bloom, error) { +func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() - if start >= end { + if start.Cmp(end) != -1 { return nil, errors.InvalidRange } blooms := make([]*gethTypes.Bloom, 0) // Iterate through the range of block heights and add the blooms to the result - for height := start; height <= end; height++ { + for height := start; height.Cmp(end) < 1; height = height.Add(height, big.NewInt(1)) { b, exists := r.base.bloomHeight[height] if exists { - blooms = append(blooms, b) + blooms = append(blooms, &b) } } From 2175eec75130ac60bd43e455fec2aa4cbc23975d Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 18:56:03 +0100 Subject: [PATCH 31/75] fix tests --- storage/index_testsuite.go | 19 ++++++++++--------- storage/memory/storage.go | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index e6b5b6b0a..f2b8bd58f 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/storage/errors" "github.com/stretchr/testify/suite" + "math/big" ) type BlockTestSuite struct { @@ -131,12 +132,12 @@ func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { func (s *ReceiptTestSuite) TestBloomsForBlockRange() { s.Run("valid block range", func() { - start := uint64(10) - end := uint64(15) - testBlooms := make([]types.Bloom, end-start+1) + start := big.NewInt(10) + end := big.NewInt(15) + testBlooms := make([]types.Bloom, 0) - for i := start; i <= end; i++ { - r := newReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) + for i := start; i.Cmp(end) < 0; i = i.Add(i, big.NewInt(1)) { + r := newReceipt(i.Uint64(), common.HexToHash(fmt.Sprintf("0xf1%d", i))) testBlooms = append(testBlooms, r.Bloom) } @@ -147,16 +148,16 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { }) s.Run("invalid block range", func() { - start := uint64(10) - end := uint64(5) // end is less than start + start := big.NewInt(10) + end := big.NewInt(5) // end is less than start blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.InvalidRange) s.Require().Nil(blooms) }) s.Run("non-existing block range", func() { - start := uint64(100) - end := uint64(105) + start := big.NewInt(100) + end := big.NewInt(105) blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) s.Require().Len(blooms, 0) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 563f13c71..3b6c2569c 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -213,7 +213,7 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B r.base.mu.RLock() defer r.base.mu.RUnlock() - if start.Cmp(end) != -1 { + if start.Cmp(end) < -1 { return nil, errors.InvalidRange } From 77130e5a4bb310e515855bc72811d307e6a94df2 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 19:26:09 +0100 Subject: [PATCH 32/75] fix tests --- storage/index_testsuite.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index f2b8bd58f..54d8d4c5e 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -134,11 +134,13 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { s.Run("valid block range", func() { start := big.NewInt(10) end := big.NewInt(15) - testBlooms := make([]types.Bloom, 0) + testBlooms := make([]*types.Bloom, 0) - for i := start; i.Cmp(end) < 0; i = i.Add(i, big.NewInt(1)) { - r := newReceipt(i.Uint64(), common.HexToHash(fmt.Sprintf("0xf1%d", i))) - testBlooms = append(testBlooms, r.Bloom) + for i := start.Uint64(); i < end.Uint64(); i++ { + r := newReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) + testBlooms = append(testBlooms, &r.Bloom) + err := s.ReceiptIndexer.Store(r) + s.Require().NoError(err) } blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) From 54e8baea2e8a238cf32c52e063a0829213d45f00 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Mon, 29 Jan 2024 19:31:18 +0100 Subject: [PATCH 33/75] fix tests --- storage/memory/storage.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 3b6c2569c..97b501f47 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -26,7 +26,7 @@ type baseStorage struct { receiptsTxIDs map[common.Hash]*gethTypes.Receipt receiptBlockIDTxIDs map[common.Hash]common.Hash - bloomHeight map[*big.Int]gethTypes.Bloom + bloomHeight map[int64]gethTypes.Bloom transactionsIDs map[common.Hash]*gethTypes.Transaction } @@ -42,7 +42,7 @@ func baseStorageFactory() *baseStorage { lastHeight: unknownHeight, receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), - bloomHeight: make(map[*big.Int]gethTypes.Bloom), + bloomHeight: make(map[int64]gethTypes.Bloom), transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), } } @@ -171,11 +171,11 @@ func (r ReceiptStorage) Store(receipt *gethTypes.Receipt) error { r.base.receiptsTxIDs[receipt.TxHash] = receipt r.base.receiptBlockIDTxIDs[receipt.BlockHash] = receipt.TxHash - if _, ok := r.base.bloomHeight[receipt.BlockNumber]; ok { + if _, ok := r.base.bloomHeight[receipt.BlockNumber.Int64()]; ok { return errors.Duplicate } - r.base.bloomHeight[receipt.BlockNumber] = receipt.Bloom + r.base.bloomHeight[receipt.BlockNumber.Int64()] = receipt.Bloom return nil } @@ -213,15 +213,15 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B r.base.mu.RLock() defer r.base.mu.RUnlock() - if start.Cmp(end) < -1 { + if start.Cmp(end) > -1 { return nil, errors.InvalidRange } blooms := make([]*gethTypes.Bloom, 0) // Iterate through the range of block heights and add the blooms to the result - for height := start; height.Cmp(end) < 1; height = height.Add(height, big.NewInt(1)) { - b, exists := r.base.bloomHeight[height] + for i := start.Int64(); i < end.Int64(); i++ { + b, exists := r.base.bloomHeight[i] if exists { blooms = append(blooms, &b) } From fa259542f64d30d0845d286bbf7aa21c02662d9a Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:11:16 +0100 Subject: [PATCH 34/75] update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7b7f983bc..5b4a1bc1f 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/onflow/cadence v0.42.7 github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420 - github.com/onflow/flow-go-sdk v0.44.0 + github.com/onflow/flow-go-sdk v0.44.1-0.20231223194516-344ba7015faa github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 google.golang.org/grpc v1.59.0 diff --git a/go.sum b/go.sum index 85e93cf36..230ef75a3 100644 --- a/go.sum +++ b/go.sum @@ -638,8 +638,8 @@ github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13/ github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420 h1:NJpfFoQarMd6WsAMaIi42YiBnYi8OWZ8RCjKR9uO8J0= github.com/onflow/flow-go v0.33.2-0.20240126233840-ed23d2193420/go.mod h1:wCxVsiqd1A3P23JWIhUbbWbxQGkYZOIj2KsZE4//eiQ= github.com/onflow/flow-go-sdk v0.24.0/go.mod h1:IoptMLPyFXWvyd9yYA6/4EmSeeozl6nJoIv4FaEMg74= -github.com/onflow/flow-go-sdk v0.44.0 h1:gVRLcZ6LUNs/5mzHDx0mp4mEnBAWD62O51P4/nYm4rE= -github.com/onflow/flow-go-sdk v0.44.0/go.mod h1:mm1Fi2hiMrexNMwRzTrAN2zwTvlP8iQ5CF2JSAgJR8U= +github.com/onflow/flow-go-sdk v0.44.1-0.20231223194516-344ba7015faa h1:t2Vs66WfV4hjvzBzPmBtq5xj0XZ6QAnCineyYUtVnJA= +github.com/onflow/flow-go-sdk v0.44.1-0.20231223194516-344ba7015faa/go.mod h1:sjQHi88PQ+LQY9Yg6sMNtZAO5ptbtA3t85Lj9mCRhZM= github.com/onflow/flow-go/crypto v0.21.3/go.mod h1:vI6V4CY3R6c4JKBxdcRiR/AnjBfL8OSD97bJc60cLuQ= github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0= github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY= From ff168113d9473774b10a36b3a526952540d5a3df Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:46:43 +0100 Subject: [PATCH 35/75] change receipt getter to block height --- storage/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/index.go b/storage/index.go index 562c8082c..033fb44e2 100644 --- a/storage/index.go +++ b/storage/index.go @@ -45,11 +45,11 @@ type ReceiptIndexer interface { // - errors.NotFound if the receipt is not found GetByTransactionID(ID common.Hash) (*gethTypes.Receipt, error) - // GetByBlockID returns the receipt for the block ID. + // GetByBlockHeight returns the receipt for the block height. // Expected errors: // - errors.NotFound if the receipt is not found // TODO right now one transaction per block, but this might change in future so the API needs to be updated. - GetByBlockID(ID common.Hash) (*gethTypes.Receipt, error) + GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, error) // BloomsForBlockRange returns bloom values for the block height range. // Goes through all the blocks in the range if the range is valid and returns the bloom values. From 2105329484ff88dc1dd3dbacdbc3700c786fc5ba Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:46:56 +0100 Subject: [PATCH 36/75] update change in receipt indexer api --- storage/memory/storage.go | 40 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 97b501f47..87e1a3d32 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -24,9 +24,9 @@ type baseStorage struct { firstHeight uint64 lastHeight uint64 - receiptsTxIDs map[common.Hash]*gethTypes.Receipt - receiptBlockIDTxIDs map[common.Hash]common.Hash - bloomHeight map[int64]gethTypes.Bloom + receiptsTxIDs map[common.Hash]*gethTypes.Receipt + receiptBlockHeightTxID map[*big.Int]common.Hash + bloomHeight map[*big.Int]gethTypes.Bloom transactionsIDs map[common.Hash]*gethTypes.Transaction } @@ -36,14 +36,14 @@ var store *baseStorage func baseStorageFactory() *baseStorage { if store == nil { store = &baseStorage{ - blocksIDs: make(map[common.Hash]*types.Block), - blockHeightsIDs: make(map[uint64]common.Hash), - firstHeight: unknownHeight, - lastHeight: unknownHeight, - receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), - receiptBlockIDTxIDs: make(map[common.Hash]common.Hash), - bloomHeight: make(map[int64]gethTypes.Bloom), - transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), + blocksIDs: make(map[common.Hash]*types.Block), + blockHeightsIDs: make(map[uint64]common.Hash), + firstHeight: unknownHeight, + lastHeight: unknownHeight, + receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), + receiptBlockHeightTxID: make(map[*big.Int]common.Hash), + bloomHeight: make(map[*big.Int]gethTypes.Bloom), + transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), } } return store @@ -169,13 +169,8 @@ func (r ReceiptStorage) Store(receipt *gethTypes.Receipt) error { } r.base.receiptsTxIDs[receipt.TxHash] = receipt - r.base.receiptBlockIDTxIDs[receipt.BlockHash] = receipt.TxHash - - if _, ok := r.base.bloomHeight[receipt.BlockNumber.Int64()]; ok { - return errors.Duplicate - } - - r.base.bloomHeight[receipt.BlockNumber.Int64()] = receipt.Bloom + r.base.receiptBlockHeightTxID[receipt.BlockNumber] = receipt.TxHash + r.base.bloomHeight[receipt.BlockNumber] = receipt.Bloom return nil } @@ -192,11 +187,11 @@ func (r ReceiptStorage) GetByTransactionID(ID common.Hash) (*gethTypes.Receipt, return receipt, nil } -func (r ReceiptStorage) GetByBlockID(ID common.Hash) (*gethTypes.Receipt, error) { +func (r ReceiptStorage) GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() - txID, exists := r.base.receiptBlockIDTxIDs[ID] + txID, exists := r.base.receiptBlockHeightTxID[height] if !exists { return nil, errors.NotFound } @@ -213,14 +208,15 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B r.base.mu.RLock() defer r.base.mu.RUnlock() - if start.Cmp(end) > -1 { + // make sure start is not bigger than end + if start.Cmp(end) > 0 { return nil, errors.InvalidRange } blooms := make([]*gethTypes.Bloom, 0) // Iterate through the range of block heights and add the blooms to the result - for i := start.Int64(); i < end.Int64(); i++ { + for i := start.Int64(); i <= end.Int64(); i++ { b, exists := r.base.bloomHeight[i] if exists { blooms = append(blooms, &b) From e19e27887fd65859b0a0001dcf4952e831a30c3e Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:47:43 +0100 Subject: [PATCH 37/75] update tests --- storage/index_testsuite.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 54d8d4c5e..3322ccb81 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -111,19 +111,17 @@ func (s *ReceiptTestSuite) TestGetReceiptByTransactionID() { func (s *ReceiptTestSuite) TestGetReceiptByBlockID() { s.Run("existing block ID", func() { - ID := common.HexToHash("0x1") - receipt := newReceipt(3, ID) + receipt := newReceipt(3, common.HexToHash("0x1")) err := s.ReceiptIndexer.Store(receipt) s.Require().NoError(err) - retReceipt, err := s.ReceiptIndexer.GetByBlockID(ID) + retReceipt, err := s.ReceiptIndexer.GetByBlockHeight(receipt.BlockNumber) s.Require().NoError(err) s.Require().Equal(receipt, retReceipt) }) s.Run("non-existing block ID", func() { - nonExistingBlockHash := common.HexToHash("0x456") - retReceipt, err := s.ReceiptIndexer.GetByBlockID(nonExistingBlockHash) + retReceipt, err := s.ReceiptIndexer.GetByBlockHeight(big.NewInt(1337)) s.Require().Nil(retReceipt) s.Require().ErrorIs(err, errors.NotFound) }) From 032a58b5009e88c29e9529a9bab04da36b6b32e9 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:48:18 +0100 Subject: [PATCH 38/75] fix typo --- storage/memory/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 87e1a3d32..c50996000 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -217,7 +217,7 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B // Iterate through the range of block heights and add the blooms to the result for i := start.Int64(); i <= end.Int64(); i++ { - b, exists := r.base.bloomHeight[i] + b, exists := r.base.bloomHeight[big.NewInt(i)] if exists { blooms = append(blooms, &b) } From ec2fa846d4c280ecab7f90a7fe06439ecb965182 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 15:51:46 +0100 Subject: [PATCH 39/75] fix storage type --- storage/memory/storage.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/storage/memory/storage.go b/storage/memory/storage.go index c50996000..473062c78 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -25,8 +25,8 @@ type baseStorage struct { lastHeight uint64 receiptsTxIDs map[common.Hash]*gethTypes.Receipt - receiptBlockHeightTxID map[*big.Int]common.Hash - bloomHeight map[*big.Int]gethTypes.Bloom + receiptBlockHeightTxID map[uint64]common.Hash + bloomHeight map[uint64]gethTypes.Bloom transactionsIDs map[common.Hash]*gethTypes.Transaction } @@ -41,8 +41,8 @@ func baseStorageFactory() *baseStorage { firstHeight: unknownHeight, lastHeight: unknownHeight, receiptsTxIDs: make(map[common.Hash]*gethTypes.Receipt), - receiptBlockHeightTxID: make(map[*big.Int]common.Hash), - bloomHeight: make(map[*big.Int]gethTypes.Bloom), + receiptBlockHeightTxID: make(map[uint64]common.Hash), + bloomHeight: make(map[uint64]gethTypes.Bloom), transactionsIDs: make(map[common.Hash]*gethTypes.Transaction), } } @@ -169,8 +169,8 @@ func (r ReceiptStorage) Store(receipt *gethTypes.Receipt) error { } r.base.receiptsTxIDs[receipt.TxHash] = receipt - r.base.receiptBlockHeightTxID[receipt.BlockNumber] = receipt.TxHash - r.base.bloomHeight[receipt.BlockNumber] = receipt.Bloom + r.base.receiptBlockHeightTxID[receipt.BlockNumber.Uint64()] = receipt.TxHash + r.base.bloomHeight[receipt.BlockNumber.Uint64()] = receipt.Bloom return nil } @@ -191,7 +191,7 @@ func (r ReceiptStorage) GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, e r.base.mu.RLock() defer r.base.mu.RUnlock() - txID, exists := r.base.receiptBlockHeightTxID[height] + txID, exists := r.base.receiptBlockHeightTxID[height.Uint64()] if !exists { return nil, errors.NotFound } @@ -216,8 +216,8 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B blooms := make([]*gethTypes.Bloom, 0) // Iterate through the range of block heights and add the blooms to the result - for i := start.Int64(); i <= end.Int64(); i++ { - b, exists := r.base.bloomHeight[big.NewInt(i)] + for i := start.Uint64(); i <= end.Uint64(); i++ { + b, exists := r.base.bloomHeight[i] if exists { blooms = append(blooms, &b) } From 4a6c9feb7640940ec83715ba6f40ec1a9ed33e41 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:03:17 +0100 Subject: [PATCH 40/75] define provider interface --- services/logs/provider.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 services/logs/provider.go diff --git a/services/logs/provider.go b/services/logs/provider.go new file mode 100644 index 000000000..aa107efbd --- /dev/null +++ b/services/logs/provider.go @@ -0,0 +1,17 @@ +package logs + +import ( + gethTypes "github.com/ethereum/go-ethereum/core/types" + "math/big" +) + +// Provider defines all the log providers no matter the source. +// +// Currently, we have two sources of logs, one is the index storage and the other is from the network stream. +type Provider interface { + // Get all the logs that match the bloom filter within the start and end block height range. + // Start and end have special values "latest", if both are set to "latest" that means we want + // to get all the upcoming new logs that match the bloom filter. If the start and end are + // defined as anything else we fetch already indexed logs. + Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) +} From b2d7ec621edbf37e9222cf3d15815968cd5a4f60 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:03:36 +0100 Subject: [PATCH 41/75] add storage and stream provider dummy code --- services/logs/provider.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/services/logs/provider.go b/services/logs/provider.go index aa107efbd..025042818 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -2,6 +2,7 @@ package logs import ( gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-evm-gateway/storage" "math/big" ) @@ -15,3 +16,22 @@ type Provider interface { // defined as anything else we fetch already indexed logs. Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) } + +var _ Provider = &StorageProvider{} + +type StorageProvider struct { + receipts storage.ReceiptIndexer +} + +func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) chan []*gethTypes.Log { + s.receipts.BloomsForBlockRange(start, end) +} + +var _ Provider = &StreamProvider{} + +type StreamProvider struct{} + +func (s StreamProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) chan []*gethTypes.Log { + //TODO implement me + panic("implement me") +} From 39d11d50fb31d7303a59ba7492c940f722e41018 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:08:17 +0100 Subject: [PATCH 42/75] add get storage naive impl --- services/logs/provider.go | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/services/logs/provider.go b/services/logs/provider.go index 025042818..028d6f77e 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -1,6 +1,7 @@ package logs import ( + "bytes" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/storage" "math/big" @@ -23,15 +24,35 @@ type StorageProvider struct { receipts storage.ReceiptIndexer } -func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) chan []*gethTypes.Log { - s.receipts.BloomsForBlockRange(start, end) +func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) { + rangeBlooms, err := s.receipts.BloomsForBlockRange(start, end) + if err != nil { + return nil, err + } + + logs := make(chan []*gethTypes.Log, 0) + defer close(logs) + + for _, b := range rangeBlooms { + // todo add correct bloom matching using composed blooms + if bytes.Equal(b.Bytes(), bloom.Bytes()) { + receipt, err := s.receipts.GetByBlockHeight(x) + if err != nil { + return nil, err + } + + logs <- receipt.Logs + } + } + + return logs, nil } var _ Provider = &StreamProvider{} type StreamProvider struct{} -func (s StreamProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) chan []*gethTypes.Log { +func (s StreamProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) { //TODO implement me panic("implement me") } From eb263e11f94fdd6519cc1e1db1aa6c2dcce81dfc Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:09:10 +0100 Subject: [PATCH 43/75] update comment --- services/logs/provider.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/logs/provider.go b/services/logs/provider.go index 028d6f77e..ed5717a67 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -20,6 +20,7 @@ type Provider interface { var _ Provider = &StorageProvider{} +// StorageProvider uses the indexer storage to fetch matching logs. type StorageProvider struct { receipts storage.ReceiptIndexer } @@ -50,6 +51,7 @@ func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan [ var _ Provider = &StreamProvider{} +// StreamProvider uses stream of logs as they come in to retrieve matching logs. type StreamProvider struct{} func (s StreamProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) { From c1ea686cddb0780049f8e2841c9b6f38a6f8111d Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:13:55 +0100 Subject: [PATCH 44/75] change bloom to return map of heights --- storage/index.go | 5 ++--- storage/memory/storage.go | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/storage/index.go b/storage/index.go index 033fb44e2..9a9a659ef 100644 --- a/storage/index.go +++ b/storage/index.go @@ -51,11 +51,10 @@ type ReceiptIndexer interface { // TODO right now one transaction per block, but this might change in future so the API needs to be updated. GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, error) - // BloomsForBlockRange returns bloom values for the block height range. - // Goes through all the blocks in the range if the range is valid and returns the bloom values. + // BloomsForBlockRange returns a map of bloom filters as values and block height as keys. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, error) + BloomsForBlockRange(start, end *big.Int) (map[*big.Int]*gethTypes.Bloom, error) } type TransactionIndexer interface { diff --git a/storage/memory/storage.go b/storage/memory/storage.go index 473062c78..a6a6052f4 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -204,7 +204,7 @@ func (r ReceiptStorage) GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, e return receipt, nil } -func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, error) { +func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]*gethTypes.Bloom, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() @@ -213,14 +213,15 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.B return nil, errors.InvalidRange } - blooms := make([]*gethTypes.Bloom, 0) + blooms := make(map[*big.Int]*gethTypes.Bloom) // Iterate through the range of block heights and add the blooms to the result for i := start.Uint64(); i <= end.Uint64(); i++ { b, exists := r.base.bloomHeight[i] - if exists { - blooms = append(blooms, &b) + if !exists { + return nil, fmt.Errorf("bloom by height not found") // this should not happen } + blooms[big.NewInt(int64(i))] = &b } return blooms, nil From cc4358cfe654e0ff0d812ad9a0d30554a553d1b6 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:14:06 +0100 Subject: [PATCH 45/75] update provider --- services/logs/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/logs/provider.go b/services/logs/provider.go index ed5717a67..7437dd4b5 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -34,10 +34,10 @@ func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan [ logs := make(chan []*gethTypes.Log, 0) defer close(logs) - for _, b := range rangeBlooms { + for height, b := range rangeBlooms { // todo add correct bloom matching using composed blooms if bytes.Equal(b.Bytes(), bloom.Bytes()) { - receipt, err := s.receipts.GetByBlockHeight(x) + receipt, err := s.receipts.GetByBlockHeight(height) if err != nil { return nil, err } From 824bd845e211dc053d7370c42aa4d8980532de7c Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:35:05 +0100 Subject: [PATCH 46/75] change bloom slice type --- storage/index.go | 2 +- storage/memory/storage.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/index.go b/storage/index.go index 9a9a659ef..55ca07d65 100644 --- a/storage/index.go +++ b/storage/index.go @@ -54,7 +54,7 @@ type ReceiptIndexer interface { // BloomsForBlockRange returns a map of bloom filters as values and block height as keys. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) (map[*big.Int]*gethTypes.Bloom, error) + BloomsForBlockRange(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) } type TransactionIndexer interface { diff --git a/storage/memory/storage.go b/storage/memory/storage.go index a6a6052f4..fb4e0cf30 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -204,7 +204,7 @@ func (r ReceiptStorage) GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, e return receipt, nil } -func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]*gethTypes.Bloom, error) { +func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() @@ -213,7 +213,7 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]* return nil, errors.InvalidRange } - blooms := make(map[*big.Int]*gethTypes.Bloom) + blooms := make(map[*big.Int]gethTypes.Bloom) // Iterate through the range of block heights and add the blooms to the result for i := start.Uint64(); i <= end.Uint64(); i++ { @@ -221,7 +221,7 @@ func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]* if !exists { return nil, fmt.Errorf("bloom by height not found") // this should not happen } - blooms[big.NewInt(int64(i))] = &b + blooms[big.NewInt(int64(i))] = b } return blooms, nil From da7eb8c09b8c9f2ea3fccf74d03d405d2e51bfc5 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:37:27 +0100 Subject: [PATCH 47/75] update storage provider to enable block id search --- services/logs/provider.go | 44 ++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/services/logs/provider.go b/services/logs/provider.go index 7437dd4b5..ec01d3b16 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -2,6 +2,7 @@ package logs import ( "bytes" + "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/storage" "math/big" @@ -15,7 +16,7 @@ type Provider interface { // Start and end have special values "latest", if both are set to "latest" that means we want // to get all the upcoming new logs that match the bloom filter. If the start and end are // defined as anything else we fetch already indexed logs. - Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) + Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan []*gethTypes.Log, error) } var _ Provider = &StorageProvider{} @@ -23,20 +24,42 @@ var _ Provider = &StorageProvider{} // StorageProvider uses the indexer storage to fetch matching logs. type StorageProvider struct { receipts storage.ReceiptIndexer + blocks storage.BlockIndexer } -func (s StorageProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) { +func (s StorageProvider) Get( + bloom gethTypes.Bloom, + hash *common.Hash, + start, end *big.Int, +) (chan []*gethTypes.Log, error) { + logs := make(chan []*gethTypes.Log, 0) + defer close(logs) + + // if we need to search in a single block provided by ID + if hash != nil { + bl, err := s.blocks.GetByID(*hash) + if err != nil { + return nil, err + } + receipt, err := s.receipts.GetByBlockHeight(big.NewInt(int64(bl.Height))) + if err != nil { + return nil, err + } + + if matchBloom(receipt.Bloom, bloom) { + logs <- receipt.Logs + return logs, nil + } + } + + // if we are searching in block range defined by start and end rangeBlooms, err := s.receipts.BloomsForBlockRange(start, end) if err != nil { return nil, err } - logs := make(chan []*gethTypes.Log, 0) - defer close(logs) - for height, b := range rangeBlooms { - // todo add correct bloom matching using composed blooms - if bytes.Equal(b.Bytes(), bloom.Bytes()) { + if matchBloom(b, bloom) { receipt, err := s.receipts.GetByBlockHeight(height) if err != nil { return nil, err @@ -54,7 +77,12 @@ var _ Provider = &StreamProvider{} // StreamProvider uses stream of logs as they come in to retrieve matching logs. type StreamProvider struct{} -func (s StreamProvider) Get(bloom gethTypes.Bloom, start, end *big.Int) (chan []*gethTypes.Log, error) { +func (s StreamProvider) Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan []*gethTypes.Log, error) { //TODO implement me panic("implement me") } + +func matchBloom(match, with gethTypes.Bloom) bool { + // todo add correct bloom matching using composed blooms + return bytes.Equal(match.Bytes(), with.Bytes()) +} From e66a0c6dc76c925bc50f5a32a79be8389c8fc50f Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 16:40:20 +0100 Subject: [PATCH 48/75] add wip filter impl --- services/logs/filter.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 services/logs/filter.go diff --git a/services/logs/filter.go b/services/logs/filter.go new file mode 100644 index 000000000..0d3db48dc --- /dev/null +++ b/services/logs/filter.go @@ -0,0 +1,33 @@ +package logs + +import ( + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "math/big" +) + +type Filter struct { + addresses []common.Address + topics [][]common.Hash + + blockID *common.Hash // Block hash if filtering a single block + start, end *big.Int // Range interval if filtering multiple blocks + + provider Provider +} + +func (f *Filter) match() error { + bloom := gethTypes.Bloom{} // create bloom + + logs, err := f.provider.Get(bloom, f.blockID, f.start, f.end) + if err != nil { + return err + } + + for { + select { + case l := <-logs: + + } + } +} From 44b2e1b84db88c47c3e119ae6a5d2f146d681b86 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 17:11:09 +0100 Subject: [PATCH 49/75] change provider log chan type --- services/logs/provider.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/services/logs/provider.go b/services/logs/provider.go index ec01d3b16..998854255 100644 --- a/services/logs/provider.go +++ b/services/logs/provider.go @@ -16,7 +16,7 @@ type Provider interface { // Start and end have special values "latest", if both are set to "latest" that means we want // to get all the upcoming new logs that match the bloom filter. If the start and end are // defined as anything else we fetch already indexed logs. - Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan []*gethTypes.Log, error) + Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan *gethTypes.Log, error) } var _ Provider = &StorageProvider{} @@ -31,8 +31,8 @@ func (s StorageProvider) Get( bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int, -) (chan []*gethTypes.Log, error) { - logs := make(chan []*gethTypes.Log, 0) +) (chan *gethTypes.Log, error) { + logs := make(chan *gethTypes.Log, 0) defer close(logs) // if we need to search in a single block provided by ID @@ -47,7 +47,9 @@ func (s StorageProvider) Get( } if matchBloom(receipt.Bloom, bloom) { - logs <- receipt.Logs + for _, log := range receipt.Logs { + logs <- log + } return logs, nil } } @@ -65,7 +67,9 @@ func (s StorageProvider) Get( return nil, err } - logs <- receipt.Logs + for _, log := range receipt.Logs { + logs <- log + } } } @@ -77,7 +81,7 @@ var _ Provider = &StreamProvider{} // StreamProvider uses stream of logs as they come in to retrieve matching logs. type StreamProvider struct{} -func (s StreamProvider) Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan []*gethTypes.Log, error) { +func (s StreamProvider) Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan *gethTypes.Log, error) { //TODO implement me panic("implement me") } From b58ac1503c58130b7943976e9f74387aa6634495 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 17:11:17 +0100 Subject: [PATCH 50/75] add filter match --- services/logs/filter.go | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index 0d3db48dc..bf5ec4d9a 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -4,19 +4,21 @@ import ( "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "math/big" + "slices" ) type Filter struct { - addresses []common.Address - topics [][]common.Hash + address common.Address + topics []common.Hash + // todo maybe move to get method blockID *common.Hash // Block hash if filtering a single block start, end *big.Int // Range interval if filtering multiple blocks provider Provider } -func (f *Filter) match() error { +func (f *Filter) get() error { bloom := gethTypes.Bloom{} // create bloom logs, err := f.provider.Get(bloom, f.blockID, f.start, f.end) @@ -27,7 +29,27 @@ func (f *Filter) match() error { for { select { case l := <-logs: + if f.matches(l) { + } } } } + +func (f *Filter) matches(log *gethTypes.Log) bool { + if len(f.topics) > len(log.Topics) { + return false + } + + for _, topic := range f.topics { + if !slices.Contains(log.Topics, topic) { + return false + } + } + + if f.address.Cmp(log.Address) != 0 { + return false + } + + return true +} From 6455a0087c671d8d3a9dd980af5440fbac305140 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 30 Jan 2024 17:16:28 +0100 Subject: [PATCH 51/75] add todo --- services/logs/filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index bf5ec4d9a..b219d6f73 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -30,7 +30,7 @@ func (f *Filter) get() error { select { case l := <-logs: if f.matches(l) { - + // todo } } } From 9c3e7e1fd7b2fcda836c4d350d149f2b5b365fc5 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 15:20:34 +0100 Subject: [PATCH 52/75] implement filters --- services/logs/filter.go | 201 +++++++++++++++++++++++++++++++++++----- 1 file changed, 179 insertions(+), 22 deletions(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index b219d6f73..6b759bb2f 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -1,55 +1,212 @@ package logs import ( + "fmt" "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-evm-gateway/storage" "math/big" "slices" ) -type Filter struct { - address common.Address - topics []common.Hash +type FilterCriteria struct { + Addresses []common.Address + Topics [][]common.Hash +} - // todo maybe move to get method - blockID *common.Hash // Block hash if filtering a single block - start, end *big.Int // Range interval if filtering multiple blocks +// todo think about creating an interface for all the filters +// Filter interface { Match() (chan *gethTypes.Log, error) } - provider Provider +// RangeFilter matches all the indexed logs within the range defined as +// start and end block height. The start must be strictly smaller than end value. +type RangeFilter struct { + start, end *big.Int + criteria FilterCriteria + receipts storage.ReceiptIndexer } -func (f *Filter) get() error { - bloom := gethTypes.Bloom{} // create bloom +func NewRangeFilter( + start, end big.Int, + criteria FilterCriteria, + receipts storage.ReceiptIndexer, +) *RangeFilter { + return &RangeFilter{ + start: &start, + end: &end, + criteria: criteria, + receipts: receipts, + } +} - logs, err := f.provider.Get(bloom, f.blockID, f.start, f.end) +func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { + if r.start.Cmp(r.end) != -1 { + return nil, fmt.Errorf("invalid start and end block height, start must be smaller than end value") + } + + blooms, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { - return err + return nil, err } - for { - select { - case l := <-logs: - if f.matches(l) { - // todo + logs := make([]*gethTypes.Log, 0) + for height, bloom := range blooms { + if !bloomMatch(bloom, r.criteria) { + continue + } + + // todo do this concurrently + receipt, err := r.receipts.GetByBlockHeight(height) + if err != nil { + return nil, err + } + + for _, log := range receipt.Logs { + if exactMatch(log, r.criteria) { + logs = append(logs, log) } } } + + return logs, nil +} + +// IDFilter matches all logs against the criteria found in a single block identified +// by the provided block ID. +type IDFilter struct { + id common.Hash + criteria FilterCriteria + blocks storage.BlockIndexer + receipts storage.ReceiptIndexer +} + +func NewIDFilter( + id common.Hash, + criteria FilterCriteria, + blocks storage.BlockIndexer, + receipts storage.ReceiptIndexer, +) *IDFilter { + return &IDFilter{ + id: id, + criteria: criteria, + blocks: blocks, + receipts: receipts, + } +} + +func (i *IDFilter) Match() ([]*gethTypes.Log, error) { + blk, err := i.blocks.GetByID(i.id) + if err != nil { + return nil, err + } + + receipt, err := i.receipts.GetByBlockHeight(big.NewInt(int64(blk.Height))) + if err != nil { + return nil, err + } + + logs := make([]*gethTypes.Log, 0) + for _, log := range receipt.Logs { + if exactMatch(log, i.criteria) { + logs = append(logs, log) + } + } + + return logs, nil +} + +// StreamFilter matches all the logs against the criteria from the receipt channel. +type StreamFilter struct { + criteria FilterCriteria + receiptStream chan *gethTypes.Receipt } -func (f *Filter) matches(log *gethTypes.Log) bool { - if len(f.topics) > len(log.Topics) { +func NewStreamFilter(criteria FilterCriteria, receipts chan *gethTypes.Receipt) *StreamFilter { + return &StreamFilter{ + criteria: criteria, + receiptStream: receipts, + } +} + +func (s *StreamFilter) Match() (chan *gethTypes.Log, error) { + logs := make(chan *gethTypes.Log) + // todo close logs + go func() { + defer close(logs) + + for { + select { + case receipt, ok := <-s.receiptStream: + if !ok { + return // exit the goroutine if receiptStream is closed + } + + if !bloomMatch(receipt.Bloom, s.criteria) { + continue + } + + for _, log := range receipt.Logs { + if exactMatch(log, s.criteria) { + logs <- log + } + } + } + } + }() + + return logs, nil +} + +// exactMatch checks the topic and address values of the log match the filer exactly. +func exactMatch(log *gethTypes.Log, criteria FilterCriteria) bool { + if len(criteria.Topics) > len(log.Topics) { return false } - for _, topic := range f.topics { - if !slices.Contains(log.Topics, topic) { - return false + for _, sub := range criteria.Topics { + for _, topic := range sub { + if !slices.Contains(log.Topics, topic) { + return false + } } } - if f.address.Cmp(log.Address) != 0 { + if !slices.Contains(criteria.Addresses, log.Address) { return false } return true } + +// bloomMatch takes a bloom value and tests if the addresses and topics provided pass the bloom filter. +// This acts as a fast probabilistic test that might produce false-positives but not false-negatives. +// If true is returned we should further check against the exactMatch to really make sure the log is matched. +// +// source: https://github.com/ethereum/go-ethereum/blob/8d1db1601d3a9e4fd067558a49db6f0b879c9b48/eth/filters/filter.go#L395 +func bloomMatch(bloom gethTypes.Bloom, criteria FilterCriteria) bool { + if len(criteria.Addresses) > 0 { + var included bool + for _, addr := range criteria.Addresses { + if gethTypes.BloomLookup(bloom, addr) { + included = true + break + } + } + if !included { + return false + } + } + + for _, sub := range criteria.Topics { + included := len(sub) == 0 // empty rule set == wildcard + for _, topic := range sub { + if gethTypes.BloomLookup(bloom, topic) { + included = true + break + } + } + if !included { + return false + } + } + return true +} From ffcf6cf947b17d615ae1c9bae0a492c52605c84c Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 15:20:50 +0100 Subject: [PATCH 53/75] delete providers --- services/logs/provider.go | 92 --------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 services/logs/provider.go diff --git a/services/logs/provider.go b/services/logs/provider.go deleted file mode 100644 index 998854255..000000000 --- a/services/logs/provider.go +++ /dev/null @@ -1,92 +0,0 @@ -package logs - -import ( - "bytes" - "github.com/ethereum/go-ethereum/common" - gethTypes "github.com/ethereum/go-ethereum/core/types" - "github.com/onflow/flow-evm-gateway/storage" - "math/big" -) - -// Provider defines all the log providers no matter the source. -// -// Currently, we have two sources of logs, one is the index storage and the other is from the network stream. -type Provider interface { - // Get all the logs that match the bloom filter within the start and end block height range. - // Start and end have special values "latest", if both are set to "latest" that means we want - // to get all the upcoming new logs that match the bloom filter. If the start and end are - // defined as anything else we fetch already indexed logs. - Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan *gethTypes.Log, error) -} - -var _ Provider = &StorageProvider{} - -// StorageProvider uses the indexer storage to fetch matching logs. -type StorageProvider struct { - receipts storage.ReceiptIndexer - blocks storage.BlockIndexer -} - -func (s StorageProvider) Get( - bloom gethTypes.Bloom, - hash *common.Hash, - start, end *big.Int, -) (chan *gethTypes.Log, error) { - logs := make(chan *gethTypes.Log, 0) - defer close(logs) - - // if we need to search in a single block provided by ID - if hash != nil { - bl, err := s.blocks.GetByID(*hash) - if err != nil { - return nil, err - } - receipt, err := s.receipts.GetByBlockHeight(big.NewInt(int64(bl.Height))) - if err != nil { - return nil, err - } - - if matchBloom(receipt.Bloom, bloom) { - for _, log := range receipt.Logs { - logs <- log - } - return logs, nil - } - } - - // if we are searching in block range defined by start and end - rangeBlooms, err := s.receipts.BloomsForBlockRange(start, end) - if err != nil { - return nil, err - } - - for height, b := range rangeBlooms { - if matchBloom(b, bloom) { - receipt, err := s.receipts.GetByBlockHeight(height) - if err != nil { - return nil, err - } - - for _, log := range receipt.Logs { - logs <- log - } - } - } - - return logs, nil -} - -var _ Provider = &StreamProvider{} - -// StreamProvider uses stream of logs as they come in to retrieve matching logs. -type StreamProvider struct{} - -func (s StreamProvider) Get(bloom gethTypes.Bloom, hash *common.Hash, start, end *big.Int) (chan *gethTypes.Log, error) { - //TODO implement me - panic("implement me") -} - -func matchBloom(match, with gethTypes.Bloom) bool { - // todo add correct bloom matching using composed blooms - return bytes.Equal(match.Bytes(), with.Bytes()) -} From deea612970421c9bc55b29fd394b8852b0c1af9b Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 15:38:13 +0100 Subject: [PATCH 54/75] add generate for storage mocks --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 91536c465..7159ea138 100644 --- a/Makefile +++ b/Makefile @@ -8,5 +8,10 @@ check-tidy: go mod tidy git diff --exit-code +.PHONY: generate +generate: + go get -d github.com/vektra/mockery/v2@v2.21.4 + mockery --all --dir=storage --output=storage/mocks + .PHONY: ci ci: check-tidy test From 07abe918f1ba25e57e3923c59baf6edd7e9f85eb Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 15:38:33 +0100 Subject: [PATCH 55/75] add generated mocks --- storage/mocks/BlockIndexer.go | 144 ++++++++++++++++++++++++++++ storage/mocks/ReceiptIndexer.go | 124 ++++++++++++++++++++++++ storage/mocks/TransactionIndexer.go | 70 ++++++++++++++ 3 files changed, 338 insertions(+) create mode 100644 storage/mocks/BlockIndexer.go create mode 100644 storage/mocks/ReceiptIndexer.go create mode 100644 storage/mocks/TransactionIndexer.go diff --git a/storage/mocks/BlockIndexer.go b/storage/mocks/BlockIndexer.go new file mode 100644 index 000000000..7812d57d5 --- /dev/null +++ b/storage/mocks/BlockIndexer.go @@ -0,0 +1,144 @@ +// Code generated by mockery v2.21.4. DO NOT EDIT. + +package mocks + +import ( + common "github.com/ethereum/go-ethereum/common" + mock "github.com/stretchr/testify/mock" + + types "github.com/onflow/flow-go/fvm/evm/types" +) + +// BlockIndexer is an autogenerated mock type for the BlockIndexer type +type BlockIndexer struct { + mock.Mock +} + +// FirstHeight provides a mock function with given fields: +func (_m *BlockIndexer) FirstHeight() (uint64, error) { + ret := _m.Called() + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetByHeight provides a mock function with given fields: height +func (_m *BlockIndexer) GetByHeight(height uint64) (*types.Block, error) { + ret := _m.Called(height) + + var r0 *types.Block + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (*types.Block, error)); ok { + return rf(height) + } + if rf, ok := ret.Get(0).(func(uint64) *types.Block); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Block) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetByID provides a mock function with given fields: ID +func (_m *BlockIndexer) GetByID(ID common.Hash) (*types.Block, error) { + ret := _m.Called(ID) + + var r0 *types.Block + var r1 error + if rf, ok := ret.Get(0).(func(common.Hash) (*types.Block, error)); ok { + return rf(ID) + } + if rf, ok := ret.Get(0).(func(common.Hash) *types.Block); ok { + r0 = rf(ID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Block) + } + } + + if rf, ok := ret.Get(1).(func(common.Hash) error); ok { + r1 = rf(ID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LatestHeight provides a mock function with given fields: +func (_m *BlockIndexer) LatestHeight() (uint64, error) { + ret := _m.Called() + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Store provides a mock function with given fields: block +func (_m *BlockIndexer) Store(block *types.Block) error { + ret := _m.Called(block) + + var r0 error + if rf, ok := ret.Get(0).(func(*types.Block) error); ok { + r0 = rf(block) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type mockConstructorTestingTNewBlockIndexer interface { + mock.TestingT + Cleanup(func()) +} + +// NewBlockIndexer creates a new instance of BlockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBlockIndexer(t mockConstructorTestingTNewBlockIndexer) *BlockIndexer { + mock := &BlockIndexer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/storage/mocks/ReceiptIndexer.go b/storage/mocks/ReceiptIndexer.go new file mode 100644 index 000000000..6bbeb0d90 --- /dev/null +++ b/storage/mocks/ReceiptIndexer.go @@ -0,0 +1,124 @@ +// Code generated by mockery v2.21.4. DO NOT EDIT. + +package mocks + +import ( + big "math/big" + + common "github.com/ethereum/go-ethereum/common" + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// ReceiptIndexer is an autogenerated mock type for the ReceiptIndexer type +type ReceiptIndexer struct { + mock.Mock +} + +// BloomsForBlockRange provides a mock function with given fields: start, end +func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) (map[*big.Int]types.Bloom, error) { + ret := _m.Called(start, end) + + var r0 map[*big.Int]types.Bloom + var r1 error + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) (map[*big.Int]types.Bloom, error)); ok { + return rf(start, end) + } + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) map[*big.Int]types.Bloom); ok { + r0 = rf(start, end) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[*big.Int]types.Bloom) + } + } + + if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) error); ok { + r1 = rf(start, end) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetByBlockHeight provides a mock function with given fields: height +func (_m *ReceiptIndexer) GetByBlockHeight(height *big.Int) (*types.Receipt, error) { + ret := _m.Called(height) + + var r0 *types.Receipt + var r1 error + if rf, ok := ret.Get(0).(func(*big.Int) (*types.Receipt, error)); ok { + return rf(height) + } + if rf, ok := ret.Get(0).(func(*big.Int) *types.Receipt); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Receipt) + } + } + + if rf, ok := ret.Get(1).(func(*big.Int) error); ok { + r1 = rf(height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetByTransactionID provides a mock function with given fields: ID +func (_m *ReceiptIndexer) GetByTransactionID(ID common.Hash) (*types.Receipt, error) { + ret := _m.Called(ID) + + var r0 *types.Receipt + var r1 error + if rf, ok := ret.Get(0).(func(common.Hash) (*types.Receipt, error)); ok { + return rf(ID) + } + if rf, ok := ret.Get(0).(func(common.Hash) *types.Receipt); ok { + r0 = rf(ID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Receipt) + } + } + + if rf, ok := ret.Get(1).(func(common.Hash) error); ok { + r1 = rf(ID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Store provides a mock function with given fields: receipt +func (_m *ReceiptIndexer) Store(receipt *types.Receipt) error { + ret := _m.Called(receipt) + + var r0 error + if rf, ok := ret.Get(0).(func(*types.Receipt) error); ok { + r0 = rf(receipt) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type mockConstructorTestingTNewReceiptIndexer interface { + mock.TestingT + Cleanup(func()) +} + +// NewReceiptIndexer creates a new instance of ReceiptIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewReceiptIndexer(t mockConstructorTestingTNewReceiptIndexer) *ReceiptIndexer { + mock := &ReceiptIndexer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/storage/mocks/TransactionIndexer.go b/storage/mocks/TransactionIndexer.go new file mode 100644 index 000000000..22c04b181 --- /dev/null +++ b/storage/mocks/TransactionIndexer.go @@ -0,0 +1,70 @@ +// Code generated by mockery v2.21.4. DO NOT EDIT. + +package mocks + +import ( + common "github.com/ethereum/go-ethereum/common" + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// TransactionIndexer is an autogenerated mock type for the TransactionIndexer type +type TransactionIndexer struct { + mock.Mock +} + +// Get provides a mock function with given fields: ID +func (_m *TransactionIndexer) Get(ID common.Hash) (*types.Transaction, error) { + ret := _m.Called(ID) + + var r0 *types.Transaction + var r1 error + if rf, ok := ret.Get(0).(func(common.Hash) (*types.Transaction, error)); ok { + return rf(ID) + } + if rf, ok := ret.Get(0).(func(common.Hash) *types.Transaction); ok { + r0 = rf(ID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Transaction) + } + } + + if rf, ok := ret.Get(1).(func(common.Hash) error); ok { + r1 = rf(ID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Store provides a mock function with given fields: tx +func (_m *TransactionIndexer) Store(tx *types.Transaction) error { + ret := _m.Called(tx) + + var r0 error + if rf, ok := ret.Get(0).(func(*types.Transaction) error); ok { + r0 = rf(tx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type mockConstructorTestingTNewTransactionIndexer interface { + mock.TestingT + Cleanup(func()) +} + +// NewTransactionIndexer creates a new instance of TransactionIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTransactionIndexer(t mockConstructorTestingTNewTransactionIndexer) *TransactionIndexer { + mock := &TransactionIndexer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From c09f2a3c1305919363693dd7910c399d2a810209 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 15:38:39 +0100 Subject: [PATCH 56/75] add mockery --- go.mod | 8 +++++++- go.sum | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5b4a1bc1f..b199b8cb8 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chigopher/pathlib v0.12.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect @@ -66,7 +67,7 @@ require ( github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-block-format v0.1.2 // indirect github.com/ipfs/go-cid v0.4.1 // indirect @@ -80,6 +81,7 @@ require ( github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/goprocess v0.1.4 // indirect + github.com/jinzhu/copier v0.3.5 // indirect github.com/k0kubun/pp/v3 v3.2.0 // indirect github.com/kevinburke/go-bindata v3.23.0+incompatible // indirect github.com/klauspost/compress v1.16.5 // indirect @@ -95,6 +97,7 @@ require ( github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/sha256-simd v1.0.1 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -149,6 +152,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect + github.com/vektra/mockery/v2 v2.21.4 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.11 // indirect github.com/vmihailenco/tagparser v0.1.1 // indirect @@ -171,6 +175,7 @@ require ( golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -181,6 +186,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 230ef75a3..191a9d38f 100644 --- a/go.sum +++ b/go.sum @@ -126,6 +126,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= +github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= 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= @@ -418,6 +420,8 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= @@ -460,6 +464,8 @@ github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5D github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= 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= @@ -568,6 +574,7 @@ github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1 github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -677,6 +684,7 @@ 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/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -747,6 +755,7 @@ github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIa github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.4.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -819,6 +828,8 @@ github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBn 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/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vektra/mockery/v2 v2.21.4 h1:QInaL4ma4Bz/cVipKeBLggB5XyPenpksiz8sJpgBZSE= +github.com/vektra/mockery/v2 v2.21.4/go.mod h1:le9nnD50TkeV8QGwrkza7v/xd3DA7YbSZYBEyiuAlsI= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.11 h1:Q47CePddpNGNhk4GCnAx9DDtASi2rasatE0cd26cZoE= @@ -903,6 +914,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1121,6 +1133,8 @@ golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1396,6 +1410,7 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 2b4a1a7080be06ce24afd7f0e4cbb6ea1bac0bea Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 16:43:04 +0100 Subject: [PATCH 57/75] add mocks and single ID test --- services/logs/filter_test.go | 146 +++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 services/logs/filter_test.go diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go new file mode 100644 index 000000000..f900effd4 --- /dev/null +++ b/services/logs/filter_test.go @@ -0,0 +1,146 @@ +package logs + +import ( + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-evm-gateway/storage" + "github.com/onflow/flow-evm-gateway/storage/errors" + "github.com/onflow/flow-evm-gateway/storage/mocks" + "github.com/onflow/flow-go/fvm/evm/types" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "math/big" + "testing" +) + +var blocks = []*types.Block{ + {Height: 0}, {Height: 1}, {Height: 2}, {Height: 3}, {Height: 4}, {Height: 5}, +} + +func mustHash(b *types.Block) common.Hash { + h, err := b.Hash() + if err != nil { + panic(err) + } + return h +} + +var receipts = []*gethTypes.Receipt{ + { + BlockNumber: big.NewInt(int64(blocks[0].Height)), + BlockHash: mustHash(blocks[0]), + Logs: []*gethTypes.Log{ + { + Address: common.BytesToAddress([]byte{0x22}), + Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("bravo")}, + }, + { + Address: common.BytesToAddress([]byte{0x22}), + Topics: []common.Hash{common.HexToHash("charlie"), common.HexToHash("delta")}, + }, + { + Address: common.BytesToAddress([]byte{0x33}), + Topics: []common.Hash{common.HexToHash("echo"), common.HexToHash("foxtrot")}, + }, + }, + }, { + BlockNumber: big.NewInt(int64(blocks[1].Height)), + BlockHash: mustHash(blocks[1]), + Logs: []*gethTypes.Log{ + { + Address: common.BytesToAddress([]byte{0x22}), + Topics: []common.Hash{common.HexToHash("charlie"), common.HexToHash("hotel")}, + }, + { + Address: common.BytesToAddress([]byte{0x55}), + Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("hotel")}, + }, + }, + }, { + BlockNumber: big.NewInt(int64(blocks[2].Height)), + BlockHash: mustHash(blocks[2]), + Logs: []*gethTypes.Log{}, + }, { + BlockNumber: big.NewInt(int64(blocks[3].Height)), + BlockHash: mustHash(blocks[3]), + Logs: []*gethTypes.Log{ + { + Address: common.BytesToAddress([]byte{0x66}), + Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("bravo"), common.HexToHash("india")}, + }, + { + Address: common.BytesToAddress([]byte{0x22}), + Topics: []common.Hash{common.HexToHash("alfa")}, + }, + }, + }, { + BlockNumber: big.NewInt(int64(blocks[4].Height)), + BlockHash: mustHash(blocks[4]), + Logs: []*gethTypes.Log{ + { + Address: common.BytesToAddress([]byte{0x88}), + Topics: []common.Hash{common.HexToHash("juliet"), common.HexToHash("kilo"), common.HexToHash("lima")}, + }, + }, + }, +} + +func blockStorage() storage.BlockIndexer { + blockStorage := &mocks.BlockIndexer{} + blockStorage. + On("GetByID", mock.AnythingOfType("common.Hash")). + Return(func(id common.Hash) (*types.Block, error) { + for _, b := range blocks { + if mustHash(b).Cmp(id) == 0 { + return b, nil + } + } + return nil, errors.NotFound + }) + + return blockStorage +} + +func receiptStorage() storage.ReceiptIndexer { + receiptStorage := &mocks.ReceiptIndexer{} + receiptStorage. + On("GetByBlockHeight", mock.AnythingOfType("*big.Int")). + Return(func(height *big.Int) (*gethTypes.Receipt, error) { + for _, r := range receipts { + if r.BlockNumber.Cmp(height) == 0 { + return r, nil + } + } + return nil, errors.NotFound + }) + + return receiptStorage +} + +func TestIDFilter(t *testing.T) { + blockStorage := blockStorage() + receiptStorage := receiptStorage() + + t.Run("single topic, single address", func(t *testing.T) { + id, _ := blocks[0].Hash() + log := receipts[0].Logs[0] + criteria := FilterCriteria{ + Addresses: []common.Address{log.Address}, + Topics: [][]common.Hash{{log.Topics[0]}}, + } + filter := NewIDFilter(id, criteria, blockStorage, receiptStorage) + logs, err := filter.Match() + + require.NoError(t, err) + require.Len(t, logs, 1) + require.Equal(t, logs[0], log) + }) +} + +func TestRangeFilter(t *testing.T) { + +} + +func TestStreamFilter(t *testing.T) { + +} From bd96346bcb2f17fcc999e703a18ef6a21d600886 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 16:52:40 +0100 Subject: [PATCH 58/75] add more table tests --- services/logs/filter_test.go | 72 +++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index f900effd4..ed8245135 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -32,15 +32,15 @@ var receipts = []*gethTypes.Receipt{ Logs: []*gethTypes.Log{ { Address: common.BytesToAddress([]byte{0x22}), - Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("bravo")}, + Topics: []common.Hash{common.HexToHash("aa"), common.HexToHash("bb")}, }, { Address: common.BytesToAddress([]byte{0x22}), - Topics: []common.Hash{common.HexToHash("charlie"), common.HexToHash("delta")}, + Topics: []common.Hash{common.HexToHash("cc"), common.HexToHash("dd")}, }, { Address: common.BytesToAddress([]byte{0x33}), - Topics: []common.Hash{common.HexToHash("echo"), common.HexToHash("foxtrot")}, + Topics: []common.Hash{common.HexToHash("ee"), common.HexToHash("ff")}, }, }, }, { @@ -49,11 +49,11 @@ var receipts = []*gethTypes.Receipt{ Logs: []*gethTypes.Log{ { Address: common.BytesToAddress([]byte{0x22}), - Topics: []common.Hash{common.HexToHash("charlie"), common.HexToHash("hotel")}, + Topics: []common.Hash{common.HexToHash("cc"), common.HexToHash("11")}, }, { Address: common.BytesToAddress([]byte{0x55}), - Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("hotel")}, + Topics: []common.Hash{common.HexToHash("aa"), common.HexToHash("11")}, }, }, }, { @@ -66,11 +66,11 @@ var receipts = []*gethTypes.Receipt{ Logs: []*gethTypes.Log{ { Address: common.BytesToAddress([]byte{0x66}), - Topics: []common.Hash{common.HexToHash("alfa"), common.HexToHash("bravo"), common.HexToHash("india")}, + Topics: []common.Hash{common.HexToHash("aa"), common.HexToHash("bb"), common.HexToHash("22")}, }, { Address: common.BytesToAddress([]byte{0x22}), - Topics: []common.Hash{common.HexToHash("alfa")}, + Topics: []common.Hash{common.HexToHash("aa")}, }, }, }, { @@ -79,7 +79,7 @@ var receipts = []*gethTypes.Receipt{ Logs: []*gethTypes.Log{ { Address: common.BytesToAddress([]byte{0x88}), - Topics: []common.Hash{common.HexToHash("juliet"), common.HexToHash("kilo"), common.HexToHash("lima")}, + Topics: []common.Hash{common.HexToHash("33"), common.HexToHash("44"), common.HexToHash("55")}, }, }, }, @@ -121,20 +121,48 @@ func TestIDFilter(t *testing.T) { blockStorage := blockStorage() receiptStorage := receiptStorage() - t.Run("single topic, single address", func(t *testing.T) { - id, _ := blocks[0].Hash() - log := receipts[0].Logs[0] - criteria := FilterCriteria{ - Addresses: []common.Address{log.Address}, - Topics: [][]common.Hash{{log.Topics[0]}}, - } - filter := NewIDFilter(id, criteria, blockStorage, receiptStorage) - logs, err := filter.Match() - - require.NoError(t, err) - require.Len(t, logs, 1) - require.Equal(t, logs[0], log) - }) + // both topics no address + // only address + // multiple addresses + + tests := []struct { + desc string + id common.Hash + expectLogs []*gethTypes.Log + criteria FilterCriteria + }{{ + desc: "single topic, single address match single log", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Addresses: []common.Address{receipts[0].Logs[0].Address}, + Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + }, + expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + }, { + desc: "single topic match single log", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + }, + expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + }, { + desc: "invalid topic match no logs", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Topics: [][]common.Hash{{common.HexToHash("123")}}, + }, + expectLogs: []*gethTypes.Log{}, + }} + + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + filter := NewIDFilter(tt.id, tt.criteria, blockStorage, receiptStorage) + logs, err := filter.Match() + + require.NoError(t, err) + require.Equal(t, tt.expectLogs, logs) + }) + } } func TestRangeFilter(t *testing.T) { From c7d4aa7c958a5704865203aaec442df1553f6a60 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 17:41:34 +0100 Subject: [PATCH 59/75] added id tests --- services/logs/filter_test.go | 75 +++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 14 deletions(-) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index ed8245135..3a3aa86c6 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -118,13 +118,7 @@ func receiptStorage() storage.ReceiptIndexer { } func TestIDFilter(t *testing.T) { - blockStorage := blockStorage() - receiptStorage := receiptStorage() - - // both topics no address - // only address - // multiple addresses - + lgs := receipts[0].Logs tests := []struct { desc string id common.Hash @@ -134,17 +128,25 @@ func TestIDFilter(t *testing.T) { desc: "single topic, single address match single log", id: mustHash(blocks[0]), criteria: FilterCriteria{ - Addresses: []common.Address{receipts[0].Logs[0].Address}, - Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + Addresses: []common.Address{lgs[0].Address}, + Topics: [][]common.Hash{lgs[0].Topics[:1]}, }, - expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + expectLogs: lgs[:1], }, { - desc: "single topic match single log", + desc: "single address no topic match two logs", id: mustHash(blocks[0]), criteria: FilterCriteria{ - Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + Addresses: []common.Address{lgs[0].Address}, }, - expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + expectLogs: lgs[:2], + }, { + desc: "single address, both topics match single log", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Addresses: []common.Address{lgs[0].Address}, + Topics: [][]common.Hash{lgs[0].Topics}, + }, + expectLogs: lgs[:1], }, { desc: "invalid topic match no logs", id: mustHash(blocks[0]), @@ -154,9 +156,19 @@ func TestIDFilter(t *testing.T) { expectLogs: []*gethTypes.Log{}, }} + /* todo check if empty address with only topics provided is a valid query + { + desc: "single topic match single log", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + }, + expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + } */ + for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { - filter := NewIDFilter(tt.id, tt.criteria, blockStorage, receiptStorage) + filter := NewIDFilter(tt.id, tt.criteria, blockStorage(), receiptStorage()) logs, err := filter.Match() require.NoError(t, err) @@ -166,7 +178,42 @@ func TestIDFilter(t *testing.T) { } func TestRangeFilter(t *testing.T) { + lgs := receipts[0].Logs + tests := []struct { + desc string + start, end *big.Int + expectLogs []*gethTypes.Log + criteria FilterCriteria + }{{ + desc: "single topic, single address match single log", + start: big.NewInt(0), + end: big.NewInt(1), + criteria: FilterCriteria{ + Addresses: []common.Address{lgs[0].Address}, + Topics: [][]common.Hash{lgs[0].Topics[:1]}, + }, + expectLogs: lgs[:1], + }} + /* todo check if empty address with only topics provided is a valid query + { + desc: "single topic match single log", + id: mustHash(blocks[0]), + criteria: FilterCriteria{ + Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + }, + expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, + } */ + + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + filter := NewRangeFilter(*tt.start, *tt.end, tt.criteria, receiptStorage()) + logs, err := filter.Match() + + require.NoError(t, err) + require.Equal(t, tt.expectLogs, logs) + }) + } } func TestStreamFilter(t *testing.T) { From d0729ded2ae80d63910d11bd091ee9abc688c0ae Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 17:58:30 +0100 Subject: [PATCH 60/75] add bloom mocks --- services/logs/filter_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 3a3aa86c6..907b5a270 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -102,6 +102,10 @@ func blockStorage() storage.BlockIndexer { } func receiptStorage() storage.ReceiptIndexer { + for _, r := range receipts { // calculate bloom filters + r.Bloom = gethTypes.CreateBloom(gethTypes.Receipts{r}) + } + receiptStorage := &mocks.ReceiptIndexer{} receiptStorage. On("GetByBlockHeight", mock.AnythingOfType("*big.Int")). @@ -114,6 +118,19 @@ func receiptStorage() storage.ReceiptIndexer { return nil, errors.NotFound }) + receiptStorage. + On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). + Return(func(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) { + blooms := make(map[*big.Int]gethTypes.Bloom) + for _, r := range receipts { + if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { + blooms[r.BlockNumber] = r.Bloom + } + } + + return blooms, nil + }) + return receiptStorage } From 12347bdc5542bbe6f794087582c98d6d11436de2 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 18:22:29 +0100 Subject: [PATCH 61/75] change bloom getter to return bloom and heights as two slices --- storage/index.go | 5 +++-- storage/index_testsuite.go | 11 +++++++---- storage/memory/storage.go | 14 ++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/storage/index.go b/storage/index.go index 55ca07d65..992133f1b 100644 --- a/storage/index.go +++ b/storage/index.go @@ -51,10 +51,11 @@ type ReceiptIndexer interface { // TODO right now one transaction per block, but this might change in future so the API needs to be updated. GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, error) - // BloomsForBlockRange returns a map of bloom filters as values and block height as keys. + // BloomsForBlockRange returns slice of bloom values and a slice of block heights + // corresponding to each item in the bloom slice. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) + BloomsForBlockRange(start, end *big.Int) ([]gethTypes.Bloom, []*big.Int, error) } type TransactionIndexer interface { diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 3322ccb81..20e535896 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -141,26 +141,29 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { s.Require().NoError(err) } - blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) s.Require().Len(blooms, len(testBlooms)) + s.Require().Len(heights, len(testBlooms)) s.Require().Equal(testBlooms, blooms) }) s.Run("invalid block range", func() { start := big.NewInt(10) end := big.NewInt(5) // end is less than start - blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.InvalidRange) + s.Require().Nil(heights) s.Require().Nil(blooms) }) s.Run("non-existing block range", func() { start := big.NewInt(100) end := big.NewInt(105) - blooms, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(blooms, 0) + s.Require().Nil(blooms) + s.Require().Nil(heights) }) } diff --git a/storage/memory/storage.go b/storage/memory/storage.go index fb4e0cf30..5e1567853 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -204,27 +204,29 @@ func (r ReceiptStorage) GetByBlockHeight(height *big.Int) (*gethTypes.Receipt, e return receipt, nil } -func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) { +func (r ReceiptStorage) BloomsForBlockRange(start, end *big.Int) ([]gethTypes.Bloom, []*big.Int, error) { r.base.mu.RLock() defer r.base.mu.RUnlock() // make sure start is not bigger than end if start.Cmp(end) > 0 { - return nil, errors.InvalidRange + return nil, nil, errors.InvalidRange } - blooms := make(map[*big.Int]gethTypes.Bloom) + blooms := make([]gethTypes.Bloom, 0) + heights := make([]*big.Int, 0) // Iterate through the range of block heights and add the blooms to the result for i := start.Uint64(); i <= end.Uint64(); i++ { b, exists := r.base.bloomHeight[i] if !exists { - return nil, fmt.Errorf("bloom by height not found") // this should not happen + return nil, nil, fmt.Errorf("bloom by height not found") // this should not happen } - blooms[big.NewInt(int64(i))] = b + blooms = append(blooms, b) + heights = append(heights, big.NewInt(int64(i))) } - return blooms, nil + return blooms, heights, nil } var _ storage.TransactionIndexer = &TransactionStorage{} From a51ad7c6df621e1c92deb9d775944fcc4cc104e9 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 18:23:49 +0100 Subject: [PATCH 62/75] update tests with bloom api change --- services/logs/filter_test.go | 75 +++++++++++++++++++++------------ storage/mocks/ReceiptIndexer.go | 27 ++++++++---- 2 files changed, 65 insertions(+), 37 deletions(-) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 907b5a270..844c6f173 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -120,20 +120,25 @@ func receiptStorage() storage.ReceiptIndexer { receiptStorage. On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). - Return(func(start, end *big.Int) (map[*big.Int]gethTypes.Bloom, error) { - blooms := make(map[*big.Int]gethTypes.Bloom) + Return(func(start, end *big.Int) ([]gethTypes.Bloom, []*big.Int, error) { + blooms := make([]gethTypes.Bloom, 0) + heights := make([]*big.Int, 0) + for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { - blooms[r.BlockNumber] = r.Bloom + blooms = append(blooms, r.Bloom) + heights = append(heights, r.BlockNumber) } } - return blooms, nil + return blooms, heights, nil }) return receiptStorage } +// todo check if empty address with only topics provided is a valid query + func TestIDFilter(t *testing.T) { lgs := receipts[0].Logs tests := []struct { @@ -173,16 +178,6 @@ func TestIDFilter(t *testing.T) { expectLogs: []*gethTypes.Log{}, }} - /* todo check if empty address with only topics provided is a valid query - { - desc: "single topic match single log", - id: mustHash(blocks[0]), - criteria: FilterCriteria{ - Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, - }, - expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, - } */ - for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { filter := NewIDFilter(tt.id, tt.criteria, blockStorage(), receiptStorage()) @@ -195,32 +190,56 @@ func TestIDFilter(t *testing.T) { } func TestRangeFilter(t *testing.T) { - lgs := receipts[0].Logs + lgs := [][]*gethTypes.Log{receipts[0].Logs, receipts[1].Logs, receipts[2].Logs, receipts[3].Logs, receipts[4].Logs} + tests := []struct { desc string start, end *big.Int expectLogs []*gethTypes.Log criteria FilterCriteria }{{ - desc: "single topic, single address match single log", + desc: "single topic, single address, single block match single log", start: big.NewInt(0), end: big.NewInt(1), criteria: FilterCriteria{ - Addresses: []common.Address{lgs[0].Address}, - Topics: [][]common.Hash{lgs[0].Topics[:1]}, + Addresses: []common.Address{lgs[0][0].Address}, + Topics: [][]common.Hash{lgs[0][0].Topics[:1]}, }, - expectLogs: lgs[:1], - }} - - /* todo check if empty address with only topics provided is a valid query - { - desc: "single topic match single log", - id: mustHash(blocks[0]), + expectLogs: lgs[0][:1], + }, { + desc: "single topic, single address, all blocks match multiple logs", + start: big.NewInt(0), + end: big.NewInt(4), + criteria: FilterCriteria{ + Addresses: []common.Address{lgs[0][0].Address}, + Topics: [][]common.Hash{lgs[0][0].Topics[:1]}, + }, + expectLogs: []*gethTypes.Log{lgs[0][0], lgs[3][1]}, + }, { + desc: "single address, all blocks match multiple logs", + start: big.NewInt(0), + end: big.NewInt(4), + criteria: FilterCriteria{ + Addresses: []common.Address{lgs[0][0].Address}, + }, + expectLogs: []*gethTypes.Log{lgs[0][0], lgs[0][1], lgs[1][0], lgs[3][1]}, + }, { + desc: "invalid address, all blocks no match", + start: big.NewInt(0), + end: big.NewInt(4), + criteria: FilterCriteria{ + Addresses: []common.Address{common.HexToAddress("0x123")}, + }, + expectLogs: []*gethTypes.Log{}, + }, { + desc: "single address, non-existing range no match", + start: big.NewInt(5), + end: big.NewInt(10), criteria: FilterCriteria{ - Topics: [][]common.Hash{{receipts[0].Logs[0].Topics[0]}}, + Addresses: []common.Address{lgs[0][0].Address}, }, - expectLogs: []*gethTypes.Log{receipts[0].Logs[0]}, - } */ + expectLogs: []*gethTypes.Log{}, + }} for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { diff --git a/storage/mocks/ReceiptIndexer.go b/storage/mocks/ReceiptIndexer.go index 6bbeb0d90..76ffbe5f9 100644 --- a/storage/mocks/ReceiptIndexer.go +++ b/storage/mocks/ReceiptIndexer.go @@ -17,29 +17,38 @@ type ReceiptIndexer struct { } // BloomsForBlockRange provides a mock function with given fields: start, end -func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) (map[*big.Int]types.Bloom, error) { +func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]types.Bloom, []*big.Int, error) { ret := _m.Called(start, end) - var r0 map[*big.Int]types.Bloom - var r1 error - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) (map[*big.Int]types.Bloom, error)); ok { + var r0 []types.Bloom + var r1 []*big.Int + var r2 error + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]types.Bloom, []*big.Int, error)); ok { return rf(start, end) } - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) map[*big.Int]types.Bloom); ok { + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []types.Bloom); ok { r0 = rf(start, end) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(map[*big.Int]types.Bloom) + r0 = ret.Get(0).([]types.Bloom) } } - if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) error); ok { + if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) []*big.Int); ok { r1 = rf(start, end) } else { - r1 = ret.Error(1) + if ret.Get(1) != nil { + r1 = ret.Get(1).([]*big.Int) + } } - return r0, r1 + if rf, ok := ret.Get(2).(func(*big.Int, *big.Int) error); ok { + r2 = rf(start, end) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 } // GetByBlockHeight provides a mock function with given fields: height From 872bcc9dcb19ef657c8f409224f9be557785f829 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Wed, 31 Jan 2024 18:25:58 +0100 Subject: [PATCH 63/75] update filters with bloom change --- services/logs/filter.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index 6b759bb2f..c56ab8bd0 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -43,19 +43,23 @@ func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { return nil, fmt.Errorf("invalid start and end block height, start must be smaller than end value") } - blooms, err := r.receipts.BloomsForBlockRange(r.start, r.end) + blooms, heights, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { return nil, err } + if len(blooms) != len(heights) { + return nil, fmt.Errorf("bloom values don't match height values") // this should never happen + } + logs := make([]*gethTypes.Log, 0) - for height, bloom := range blooms { + for i, bloom := range blooms { if !bloomMatch(bloom, r.criteria) { continue } // todo do this concurrently - receipt, err := r.receipts.GetByBlockHeight(height) + receipt, err := r.receipts.GetByBlockHeight(heights[i]) if err != nil { return nil, err } @@ -129,7 +133,7 @@ func NewStreamFilter(criteria FilterCriteria, receipts chan *gethTypes.Receipt) func (s *StreamFilter) Match() (chan *gethTypes.Log, error) { logs := make(chan *gethTypes.Log) - // todo close logs + go func() { defer close(logs) From 58a26494610d7583353d156fb10d20b1f168c69f Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 1 Feb 2024 15:25:14 +0100 Subject: [PATCH 64/75] add block type and decoder --- models/block.go | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 models/block.go diff --git a/models/block.go b/models/block.go new file mode 100644 index 000000000..c2c18e965 --- /dev/null +++ b/models/block.go @@ -0,0 +1,51 @@ +package models + +import ( + "fmt" + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/cadence" + cdcCommon "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/types" +) + +var blockExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeBlockExecuted)) + +type blockEventPayload struct { + Height uint64 `cadence:"height"` + Hash string `cadence:"hash"` + TotalSupply cadence.Int `cadence:"totalSupply"` + ParentBlockHash string `cadence:"parentHash"` + ReceiptRoot string `cadence:"receiptRoot"` + TransactionHashes []cadence.String `cadence:"transactionHashes"` +} + +// DecodeBlock takes a cadence event that contains executed block payload and +// decodes it into the Block type. +func DecodeBlock(event cadence.Event) (*types.Block, error) { + if cdcCommon.TypeID(event.EventType.ID()) != blockExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into block executed event, received %s expected %s", + event.Type().ID(), + types.EventTypeBlockExecuted, + ) + } + + b := blockEventPayload{} + err := cadence.DecodeFields(event, &b) + if err != nil { + return nil, err + } + + hashes := make([]common.Hash, len(b.TransactionHashes)) + for i, h := range b.TransactionHashes { + hashes[i] = common.HexToHash(h.ToGoValue().(string)) + } + + return &types.Block{ + ParentBlockHash: common.HexToHash(b.ParentBlockHash), + Height: b.Height, + TotalSupply: b.TotalSupply.Value, + ReceiptRoot: common.HexToHash(b.ReceiptRoot), + TransactionHashes: hashes, + }, nil +} From 963d3f3417f2933cff265f1baa7010fff9726b04 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 1 Feb 2024 15:25:21 +0100 Subject: [PATCH 65/75] add block decode test --- models/block_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 models/block_test.go diff --git a/models/block_test.go b/models/block_test.go new file mode 100644 index 000000000..540cad679 --- /dev/null +++ b/models/block_test.go @@ -0,0 +1,30 @@ +package models + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/flow-go/fvm/evm/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "math/big" + "testing" +) + +func Test_DecodeBlockExecutedEvent(t *testing.T) { + block := &types.Block{ + ParentBlockHash: common.HexToHash("0x1"), + Height: 100, + TotalSupply: big.NewInt(100), + ReceiptRoot: common.HexToHash("0x2"), + TransactionHashes: []common.Hash{ + common.HexToHash("0xf1"), + }, + } + ev := types.NewBlockExecutedEvent(block) + + encEv, err := ev.Payload.CadenceEvent() + require.NoError(t, err) + + decBlock, err := DecodeBlock(encEv) + require.NoError(t, err) + assert.Equal(t, block, decBlock) +} From 18c98ffaff9a9bdb2c450a486c63628312e4e508 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 1 Feb 2024 16:40:58 +0100 Subject: [PATCH 66/75] add transaction and receipt decoders --- models/transaction.go | 95 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 models/transaction.go diff --git a/models/transaction.go b/models/transaction.go new file mode 100644 index 000000000..a38ad9189 --- /dev/null +++ b/models/transaction.go @@ -0,0 +1,95 @@ +package models + +import ( + "fmt" + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/onflow/cadence" + cdcCommon "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/types" + "math/big" + "strings" +) + +var txExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeTransactionExecuted)) + +type txEventPayload struct { + BlockHeight uint64 `cadence:"blockHeight"` + TransactionHash string `cadence:"transactionHash"` + Transaction string `cadence:"transaction"` + TransactionType int `cadence:"transactionType"` + Failed bool `cadence:"failed"` + GasConsumed uint64 `cadence:"gasConsumed"` + DeployedContractAddress string `cadence:"deployedContractAddress"` + ReturnedValue string `cadence:"returnedValue"` + Logs string `cadence:"logs"` +} + +// DecodeReceipt takes a cadence event for transaction executed and decodes it into the receipt. +func DecodeReceipt(event cadence.Event) (*gethTypes.Receipt, error) { + if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into receipt, received %s expected %s", + event.Type().ID(), + types.EventTypeTransactionExecuted, + ) + } + + var tx txEventPayload + err := cadence.DecodeFields(event, &tx) + if err != nil { + return nil, err + } + + var logs []*gethTypes.Log + err = rlp.DecodeBytes([]byte(tx.Logs), &logs) + if err != nil { + return nil, err + } + + receipt := &gethTypes.Receipt{ + Type: 0, // todo check + Status: 0, // todo check + CumulativeGasUsed: tx.GasConsumed, // todo check + Logs: logs, + TxHash: common.HexToHash(tx.TransactionHash), + ContractAddress: common.HexToAddress(tx.DeployedContractAddress), + GasUsed: tx.GasConsumed, + EffectiveGasPrice: nil, // todo check + BlobGasUsed: 0, // todo check + BlobGasPrice: nil, // todo check + BlockHash: common.Hash{}, // todo check + BlockNumber: big.NewInt(int64(tx.BlockHeight)), + TransactionIndex: 0, // todo check + } + + receipt.Bloom = gethTypes.CreateBloom([]*gethTypes.Receipt{receipt}) + + return receipt, nil +} + +// DecodeTransaction takes a cadence event for transaction executed and decodes it into the transaction. +func DecodeTransaction(event cadence.Event) (*gethTypes.Transaction, error) { + if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into receipt, received %s expected %s", + event.Type().ID(), + types.EventTypeTransactionExecuted, + ) + } + + var t txEventPayload + err := cadence.DecodeFields(event, &t) + if err != nil { + return nil, err + } + + tx := gethTypes.Transaction{} + err = tx.DecodeRLP(rlp.NewStream( + strings.NewReader(t.Transaction), + uint64(len(t.Transaction)), + )) + + return &tx, nil +} From 6b74bcd7cc2599c749ab2f179c75462ee3b40f99 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 1 Feb 2024 16:41:05 +0100 Subject: [PATCH 67/75] fix block decoding --- models/block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/block.go b/models/block.go index c2c18e965..3a04f2396 100644 --- a/models/block.go +++ b/models/block.go @@ -24,13 +24,13 @@ type blockEventPayload struct { func DecodeBlock(event cadence.Event) (*types.Block, error) { if cdcCommon.TypeID(event.EventType.ID()) != blockExecutedType { return nil, fmt.Errorf( - "invalid event type for decoding into block executed event, received %s expected %s", + "invalid event type for decoding into block, received %s expected %s", event.Type().ID(), types.EventTypeBlockExecuted, ) } - b := blockEventPayload{} + var b blockEventPayload err := cadence.DecodeFields(event, &b) if err != nil { return nil, err From 315183bdb7985a3a181e1944464a8a6b24bc6ffd Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Thu, 1 Feb 2024 16:56:15 +0100 Subject: [PATCH 68/75] adding transaction tests --- models/transaction_test.go | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 models/transaction_test.go diff --git a/models/transaction_test.go b/models/transaction_test.go new file mode 100644 index 000000000..c98ebef43 --- /dev/null +++ b/models/transaction_test.go @@ -0,0 +1,52 @@ +package models + +import ( + "bytes" + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/flow-go/fvm/evm/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "math/big" + "testing" +) + +func Test_DecodeTransaction(t *testing.T) { + res := &types.Result{ + Failed: false, + TxType: 1, + GasConsumed: 1337, + DeployedContractAddress: types.Address{0x5, 0x6, 0x7}, + ReturnedValue: []byte{0x55}, + Logs: []*gethTypes.Log{{ + Address: common.Address{0x1, 0x2}, + Topics: []common.Hash{{0x5, 0x6}, {0x7, 0x8}}, + }, { + Address: common.Address{0x3, 0x5}, + Topics: []common.Hash{{0x2, 0x66}, {0x7, 0x1}}, + }}, + } + + tx := gethTypes.NewTx(&gethTypes.AccessListTx{ + ChainID: big.NewInt(1), + Nonce: 1, + GasPrice: big.NewInt(24), + Gas: 1337, + To: &common.Address{0x01}, + Value: big.NewInt(5), + Data: []byte{0x2, 0x3}, + }) + + var txEnc []byte + err := tx.EncodeRLP(bytes.NewBuffer(txEnc)) + require.NoError(t, err) + + ev := types.NewTransactionExecutedEvent(1, txEnc, tx.Hash(), res) + + cdcEv, err := ev.Payload.CadenceEvent() + require.NoError(t, err) + + decTx, err := DecodeTransaction(cdcEv) + require.NoError(t, err) + assert.Equal(t, tx, decTx) +} From 6abf5edd43dc32edd7c85df4bd4e8b39b45f45ee Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Fri, 2 Feb 2024 14:05:00 +0100 Subject: [PATCH 69/75] fix tx decoder --- models/transaction.go | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/models/transaction.go b/models/transaction.go index a38ad9189..76745908c 100644 --- a/models/transaction.go +++ b/models/transaction.go @@ -1,6 +1,8 @@ package models import ( + "bytes" + "encoding/hex" "fmt" "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" @@ -9,7 +11,6 @@ import ( cdcCommon "github.com/onflow/cadence/runtime/common" "github.com/onflow/flow-go/fvm/evm/types" "math/big" - "strings" ) var txExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeTransactionExecuted)) @@ -42,8 +43,13 @@ func DecodeReceipt(event cadence.Event) (*gethTypes.Receipt, error) { return nil, err } + encLogs, err := hex.DecodeString(tx.Logs) + if err != nil { + return nil, err + } + var logs []*gethTypes.Log - err = rlp.DecodeBytes([]byte(tx.Logs), &logs) + err = rlp.Decode(bytes.NewReader(encLogs), &logs) if err != nil { return nil, err } @@ -85,11 +91,16 @@ func DecodeTransaction(event cadence.Event) (*gethTypes.Transaction, error) { return nil, err } + encTx, err := hex.DecodeString(t.Transaction) + if err != nil { + return nil, err + } + tx := gethTypes.Transaction{} - err = tx.DecodeRLP(rlp.NewStream( - strings.NewReader(t.Transaction), - uint64(len(t.Transaction)), - )) + err = tx.DecodeRLP(rlp.NewStream(bytes.NewReader(encTx), uint64(len(encTx)))) + if err != nil { + return nil, err + } return &tx, nil } From 7ad0c7529958d80c74d8f9b46cda3cb65ed55a26 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Fri, 2 Feb 2024 14:05:12 +0100 Subject: [PATCH 70/75] add test for decoder --- models/transaction_test.go | 39 +++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/models/transaction_test.go b/models/transaction_test.go index c98ebef43..5e9c85065 100644 --- a/models/transaction_test.go +++ b/models/transaction_test.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/cadence" "github.com/onflow/flow-go/fvm/evm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -11,7 +12,7 @@ import ( "testing" ) -func Test_DecodeTransaction(t *testing.T) { +func createTestEvent(t *testing.T) (cadence.Event, *gethTypes.Transaction, *types.Result) { res := &types.Result{ Failed: false, TxType: 1, @@ -37,16 +38,44 @@ func Test_DecodeTransaction(t *testing.T) { Data: []byte{0x2, 0x3}, }) - var txEnc []byte - err := tx.EncodeRLP(bytes.NewBuffer(txEnc)) + var txEnc bytes.Buffer + err := tx.EncodeRLP(&txEnc) require.NoError(t, err) - ev := types.NewTransactionExecutedEvent(1, txEnc, tx.Hash(), res) + ev := types.NewTransactionExecutedEvent(1, txEnc.Bytes(), tx.Hash(), res) cdcEv, err := ev.Payload.CadenceEvent() require.NoError(t, err) + return cdcEv, tx, res +} + +func Test_DecodeTransaction(t *testing.T) { + cdcEv, tx, _ := createTestEvent(t) + decTx, err := DecodeTransaction(cdcEv) require.NoError(t, err) - assert.Equal(t, tx, decTx) + assert.Equal(t, tx.Hash(), decTx.Hash()) + assert.Equal(t, tx.Type(), decTx.Type()) + assert.Equal(t, tx.To(), decTx.To()) + assert.Equal(t, tx.Value(), decTx.Value()) + assert.Equal(t, tx.Nonce(), decTx.Nonce()) + assert.Equal(t, tx.Data(), decTx.Data()) + assert.Equal(t, tx.GasPrice(), decTx.GasPrice()) + assert.Equal(t, tx.BlobGas(), decTx.BlobGas()) + assert.Equal(t, tx.Size(), decTx.Size()) +} + +func Test_DecodeReceipts(t *testing.T) { + cdcEv, _, rec := createTestEvent(t) + + receipt, err := DecodeReceipt(cdcEv) + require.NoError(t, err) + + for i, l := range rec.Logs { + assert.ObjectsAreEqualValues(l, receipt.Logs[i]) + for j, tt := range l.Topics { + assert.EqualValues(t, tt, receipt.Logs[i].Topics[j]) + } + } } From 5a272bbdb45e3accfb4c008afcdd7d4ce245e7fd Mon Sep 17 00:00:00 2001 From: Gregor G <75445744+sideninja@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:33:19 +0100 Subject: [PATCH 71/75] Revert "[Indexer] Decoding of event values" --- models/block.go | 51 ------------------ models/block_test.go | 30 ----------- models/transaction.go | 106 ------------------------------------- models/transaction_test.go | 81 ---------------------------- 4 files changed, 268 deletions(-) delete mode 100644 models/block.go delete mode 100644 models/block_test.go delete mode 100644 models/transaction.go delete mode 100644 models/transaction_test.go diff --git a/models/block.go b/models/block.go deleted file mode 100644 index 3a04f2396..000000000 --- a/models/block.go +++ /dev/null @@ -1,51 +0,0 @@ -package models - -import ( - "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/onflow/cadence" - cdcCommon "github.com/onflow/cadence/runtime/common" - "github.com/onflow/flow-go/fvm/evm/types" -) - -var blockExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeBlockExecuted)) - -type blockEventPayload struct { - Height uint64 `cadence:"height"` - Hash string `cadence:"hash"` - TotalSupply cadence.Int `cadence:"totalSupply"` - ParentBlockHash string `cadence:"parentHash"` - ReceiptRoot string `cadence:"receiptRoot"` - TransactionHashes []cadence.String `cadence:"transactionHashes"` -} - -// DecodeBlock takes a cadence event that contains executed block payload and -// decodes it into the Block type. -func DecodeBlock(event cadence.Event) (*types.Block, error) { - if cdcCommon.TypeID(event.EventType.ID()) != blockExecutedType { - return nil, fmt.Errorf( - "invalid event type for decoding into block, received %s expected %s", - event.Type().ID(), - types.EventTypeBlockExecuted, - ) - } - - var b blockEventPayload - err := cadence.DecodeFields(event, &b) - if err != nil { - return nil, err - } - - hashes := make([]common.Hash, len(b.TransactionHashes)) - for i, h := range b.TransactionHashes { - hashes[i] = common.HexToHash(h.ToGoValue().(string)) - } - - return &types.Block{ - ParentBlockHash: common.HexToHash(b.ParentBlockHash), - Height: b.Height, - TotalSupply: b.TotalSupply.Value, - ReceiptRoot: common.HexToHash(b.ReceiptRoot), - TransactionHashes: hashes, - }, nil -} diff --git a/models/block_test.go b/models/block_test.go deleted file mode 100644 index 540cad679..000000000 --- a/models/block_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package models - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/onflow/flow-go/fvm/evm/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "math/big" - "testing" -) - -func Test_DecodeBlockExecutedEvent(t *testing.T) { - block := &types.Block{ - ParentBlockHash: common.HexToHash("0x1"), - Height: 100, - TotalSupply: big.NewInt(100), - ReceiptRoot: common.HexToHash("0x2"), - TransactionHashes: []common.Hash{ - common.HexToHash("0xf1"), - }, - } - ev := types.NewBlockExecutedEvent(block) - - encEv, err := ev.Payload.CadenceEvent() - require.NoError(t, err) - - decBlock, err := DecodeBlock(encEv) - require.NoError(t, err) - assert.Equal(t, block, decBlock) -} diff --git a/models/transaction.go b/models/transaction.go deleted file mode 100644 index 76745908c..000000000 --- a/models/transaction.go +++ /dev/null @@ -1,106 +0,0 @@ -package models - -import ( - "bytes" - "encoding/hex" - "fmt" - "github.com/ethereum/go-ethereum/common" - gethTypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rlp" - "github.com/onflow/cadence" - cdcCommon "github.com/onflow/cadence/runtime/common" - "github.com/onflow/flow-go/fvm/evm/types" - "math/big" -) - -var txExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeTransactionExecuted)) - -type txEventPayload struct { - BlockHeight uint64 `cadence:"blockHeight"` - TransactionHash string `cadence:"transactionHash"` - Transaction string `cadence:"transaction"` - TransactionType int `cadence:"transactionType"` - Failed bool `cadence:"failed"` - GasConsumed uint64 `cadence:"gasConsumed"` - DeployedContractAddress string `cadence:"deployedContractAddress"` - ReturnedValue string `cadence:"returnedValue"` - Logs string `cadence:"logs"` -} - -// DecodeReceipt takes a cadence event for transaction executed and decodes it into the receipt. -func DecodeReceipt(event cadence.Event) (*gethTypes.Receipt, error) { - if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { - return nil, fmt.Errorf( - "invalid event type for decoding into receipt, received %s expected %s", - event.Type().ID(), - types.EventTypeTransactionExecuted, - ) - } - - var tx txEventPayload - err := cadence.DecodeFields(event, &tx) - if err != nil { - return nil, err - } - - encLogs, err := hex.DecodeString(tx.Logs) - if err != nil { - return nil, err - } - - var logs []*gethTypes.Log - err = rlp.Decode(bytes.NewReader(encLogs), &logs) - if err != nil { - return nil, err - } - - receipt := &gethTypes.Receipt{ - Type: 0, // todo check - Status: 0, // todo check - CumulativeGasUsed: tx.GasConsumed, // todo check - Logs: logs, - TxHash: common.HexToHash(tx.TransactionHash), - ContractAddress: common.HexToAddress(tx.DeployedContractAddress), - GasUsed: tx.GasConsumed, - EffectiveGasPrice: nil, // todo check - BlobGasUsed: 0, // todo check - BlobGasPrice: nil, // todo check - BlockHash: common.Hash{}, // todo check - BlockNumber: big.NewInt(int64(tx.BlockHeight)), - TransactionIndex: 0, // todo check - } - - receipt.Bloom = gethTypes.CreateBloom([]*gethTypes.Receipt{receipt}) - - return receipt, nil -} - -// DecodeTransaction takes a cadence event for transaction executed and decodes it into the transaction. -func DecodeTransaction(event cadence.Event) (*gethTypes.Transaction, error) { - if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { - return nil, fmt.Errorf( - "invalid event type for decoding into receipt, received %s expected %s", - event.Type().ID(), - types.EventTypeTransactionExecuted, - ) - } - - var t txEventPayload - err := cadence.DecodeFields(event, &t) - if err != nil { - return nil, err - } - - encTx, err := hex.DecodeString(t.Transaction) - if err != nil { - return nil, err - } - - tx := gethTypes.Transaction{} - err = tx.DecodeRLP(rlp.NewStream(bytes.NewReader(encTx), uint64(len(encTx)))) - if err != nil { - return nil, err - } - - return &tx, nil -} diff --git a/models/transaction_test.go b/models/transaction_test.go deleted file mode 100644 index 5e9c85065..000000000 --- a/models/transaction_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package models - -import ( - "bytes" - "github.com/ethereum/go-ethereum/common" - gethTypes "github.com/ethereum/go-ethereum/core/types" - "github.com/onflow/cadence" - "github.com/onflow/flow-go/fvm/evm/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "math/big" - "testing" -) - -func createTestEvent(t *testing.T) (cadence.Event, *gethTypes.Transaction, *types.Result) { - res := &types.Result{ - Failed: false, - TxType: 1, - GasConsumed: 1337, - DeployedContractAddress: types.Address{0x5, 0x6, 0x7}, - ReturnedValue: []byte{0x55}, - Logs: []*gethTypes.Log{{ - Address: common.Address{0x1, 0x2}, - Topics: []common.Hash{{0x5, 0x6}, {0x7, 0x8}}, - }, { - Address: common.Address{0x3, 0x5}, - Topics: []common.Hash{{0x2, 0x66}, {0x7, 0x1}}, - }}, - } - - tx := gethTypes.NewTx(&gethTypes.AccessListTx{ - ChainID: big.NewInt(1), - Nonce: 1, - GasPrice: big.NewInt(24), - Gas: 1337, - To: &common.Address{0x01}, - Value: big.NewInt(5), - Data: []byte{0x2, 0x3}, - }) - - var txEnc bytes.Buffer - err := tx.EncodeRLP(&txEnc) - require.NoError(t, err) - - ev := types.NewTransactionExecutedEvent(1, txEnc.Bytes(), tx.Hash(), res) - - cdcEv, err := ev.Payload.CadenceEvent() - require.NoError(t, err) - - return cdcEv, tx, res -} - -func Test_DecodeTransaction(t *testing.T) { - cdcEv, tx, _ := createTestEvent(t) - - decTx, err := DecodeTransaction(cdcEv) - require.NoError(t, err) - assert.Equal(t, tx.Hash(), decTx.Hash()) - assert.Equal(t, tx.Type(), decTx.Type()) - assert.Equal(t, tx.To(), decTx.To()) - assert.Equal(t, tx.Value(), decTx.Value()) - assert.Equal(t, tx.Nonce(), decTx.Nonce()) - assert.Equal(t, tx.Data(), decTx.Data()) - assert.Equal(t, tx.GasPrice(), decTx.GasPrice()) - assert.Equal(t, tx.BlobGas(), decTx.BlobGas()) - assert.Equal(t, tx.Size(), decTx.Size()) -} - -func Test_DecodeReceipts(t *testing.T) { - cdcEv, _, rec := createTestEvent(t) - - receipt, err := DecodeReceipt(cdcEv) - require.NoError(t, err) - - for i, l := range rec.Logs { - assert.ObjectsAreEqualValues(l, receipt.Logs[i]) - for j, tt := range l.Topics { - assert.EqualValues(t, tt, receipt.Logs[i].Topics[j]) - } - } -} From 26113d1801a173929d50a3286900d6e0b9bfb202 Mon Sep 17 00:00:00 2001 From: Gregor G <75445744+sideninja@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:17:13 +0100 Subject: [PATCH 72/75] Revert "[Indexer] Decoding of event values" --- models/block.go | 51 ++++++++++++++++++ models/block_test.go | 30 +++++++++++ models/transaction.go | 106 +++++++++++++++++++++++++++++++++++++ models/transaction_test.go | 81 ++++++++++++++++++++++++++++ 4 files changed, 268 insertions(+) create mode 100644 models/block.go create mode 100644 models/block_test.go create mode 100644 models/transaction.go create mode 100644 models/transaction_test.go diff --git a/models/block.go b/models/block.go new file mode 100644 index 000000000..3a04f2396 --- /dev/null +++ b/models/block.go @@ -0,0 +1,51 @@ +package models + +import ( + "fmt" + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/cadence" + cdcCommon "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/types" +) + +var blockExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeBlockExecuted)) + +type blockEventPayload struct { + Height uint64 `cadence:"height"` + Hash string `cadence:"hash"` + TotalSupply cadence.Int `cadence:"totalSupply"` + ParentBlockHash string `cadence:"parentHash"` + ReceiptRoot string `cadence:"receiptRoot"` + TransactionHashes []cadence.String `cadence:"transactionHashes"` +} + +// DecodeBlock takes a cadence event that contains executed block payload and +// decodes it into the Block type. +func DecodeBlock(event cadence.Event) (*types.Block, error) { + if cdcCommon.TypeID(event.EventType.ID()) != blockExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into block, received %s expected %s", + event.Type().ID(), + types.EventTypeBlockExecuted, + ) + } + + var b blockEventPayload + err := cadence.DecodeFields(event, &b) + if err != nil { + return nil, err + } + + hashes := make([]common.Hash, len(b.TransactionHashes)) + for i, h := range b.TransactionHashes { + hashes[i] = common.HexToHash(h.ToGoValue().(string)) + } + + return &types.Block{ + ParentBlockHash: common.HexToHash(b.ParentBlockHash), + Height: b.Height, + TotalSupply: b.TotalSupply.Value, + ReceiptRoot: common.HexToHash(b.ReceiptRoot), + TransactionHashes: hashes, + }, nil +} diff --git a/models/block_test.go b/models/block_test.go new file mode 100644 index 000000000..540cad679 --- /dev/null +++ b/models/block_test.go @@ -0,0 +1,30 @@ +package models + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/onflow/flow-go/fvm/evm/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "math/big" + "testing" +) + +func Test_DecodeBlockExecutedEvent(t *testing.T) { + block := &types.Block{ + ParentBlockHash: common.HexToHash("0x1"), + Height: 100, + TotalSupply: big.NewInt(100), + ReceiptRoot: common.HexToHash("0x2"), + TransactionHashes: []common.Hash{ + common.HexToHash("0xf1"), + }, + } + ev := types.NewBlockExecutedEvent(block) + + encEv, err := ev.Payload.CadenceEvent() + require.NoError(t, err) + + decBlock, err := DecodeBlock(encEv) + require.NoError(t, err) + assert.Equal(t, block, decBlock) +} diff --git a/models/transaction.go b/models/transaction.go new file mode 100644 index 000000000..76745908c --- /dev/null +++ b/models/transaction.go @@ -0,0 +1,106 @@ +package models + +import ( + "bytes" + "encoding/hex" + "fmt" + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/onflow/cadence" + cdcCommon "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/types" + "math/big" +) + +var txExecutedType = (types.EVMLocation{}).TypeID(nil, string(types.EventTypeTransactionExecuted)) + +type txEventPayload struct { + BlockHeight uint64 `cadence:"blockHeight"` + TransactionHash string `cadence:"transactionHash"` + Transaction string `cadence:"transaction"` + TransactionType int `cadence:"transactionType"` + Failed bool `cadence:"failed"` + GasConsumed uint64 `cadence:"gasConsumed"` + DeployedContractAddress string `cadence:"deployedContractAddress"` + ReturnedValue string `cadence:"returnedValue"` + Logs string `cadence:"logs"` +} + +// DecodeReceipt takes a cadence event for transaction executed and decodes it into the receipt. +func DecodeReceipt(event cadence.Event) (*gethTypes.Receipt, error) { + if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into receipt, received %s expected %s", + event.Type().ID(), + types.EventTypeTransactionExecuted, + ) + } + + var tx txEventPayload + err := cadence.DecodeFields(event, &tx) + if err != nil { + return nil, err + } + + encLogs, err := hex.DecodeString(tx.Logs) + if err != nil { + return nil, err + } + + var logs []*gethTypes.Log + err = rlp.Decode(bytes.NewReader(encLogs), &logs) + if err != nil { + return nil, err + } + + receipt := &gethTypes.Receipt{ + Type: 0, // todo check + Status: 0, // todo check + CumulativeGasUsed: tx.GasConsumed, // todo check + Logs: logs, + TxHash: common.HexToHash(tx.TransactionHash), + ContractAddress: common.HexToAddress(tx.DeployedContractAddress), + GasUsed: tx.GasConsumed, + EffectiveGasPrice: nil, // todo check + BlobGasUsed: 0, // todo check + BlobGasPrice: nil, // todo check + BlockHash: common.Hash{}, // todo check + BlockNumber: big.NewInt(int64(tx.BlockHeight)), + TransactionIndex: 0, // todo check + } + + receipt.Bloom = gethTypes.CreateBloom([]*gethTypes.Receipt{receipt}) + + return receipt, nil +} + +// DecodeTransaction takes a cadence event for transaction executed and decodes it into the transaction. +func DecodeTransaction(event cadence.Event) (*gethTypes.Transaction, error) { + if cdcCommon.TypeID(event.EventType.ID()) != txExecutedType { + return nil, fmt.Errorf( + "invalid event type for decoding into receipt, received %s expected %s", + event.Type().ID(), + types.EventTypeTransactionExecuted, + ) + } + + var t txEventPayload + err := cadence.DecodeFields(event, &t) + if err != nil { + return nil, err + } + + encTx, err := hex.DecodeString(t.Transaction) + if err != nil { + return nil, err + } + + tx := gethTypes.Transaction{} + err = tx.DecodeRLP(rlp.NewStream(bytes.NewReader(encTx), uint64(len(encTx)))) + if err != nil { + return nil, err + } + + return &tx, nil +} diff --git a/models/transaction_test.go b/models/transaction_test.go new file mode 100644 index 000000000..5e9c85065 --- /dev/null +++ b/models/transaction_test.go @@ -0,0 +1,81 @@ +package models + +import ( + "bytes" + "github.com/ethereum/go-ethereum/common" + gethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/onflow/cadence" + "github.com/onflow/flow-go/fvm/evm/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "math/big" + "testing" +) + +func createTestEvent(t *testing.T) (cadence.Event, *gethTypes.Transaction, *types.Result) { + res := &types.Result{ + Failed: false, + TxType: 1, + GasConsumed: 1337, + DeployedContractAddress: types.Address{0x5, 0x6, 0x7}, + ReturnedValue: []byte{0x55}, + Logs: []*gethTypes.Log{{ + Address: common.Address{0x1, 0x2}, + Topics: []common.Hash{{0x5, 0x6}, {0x7, 0x8}}, + }, { + Address: common.Address{0x3, 0x5}, + Topics: []common.Hash{{0x2, 0x66}, {0x7, 0x1}}, + }}, + } + + tx := gethTypes.NewTx(&gethTypes.AccessListTx{ + ChainID: big.NewInt(1), + Nonce: 1, + GasPrice: big.NewInt(24), + Gas: 1337, + To: &common.Address{0x01}, + Value: big.NewInt(5), + Data: []byte{0x2, 0x3}, + }) + + var txEnc bytes.Buffer + err := tx.EncodeRLP(&txEnc) + require.NoError(t, err) + + ev := types.NewTransactionExecutedEvent(1, txEnc.Bytes(), tx.Hash(), res) + + cdcEv, err := ev.Payload.CadenceEvent() + require.NoError(t, err) + + return cdcEv, tx, res +} + +func Test_DecodeTransaction(t *testing.T) { + cdcEv, tx, _ := createTestEvent(t) + + decTx, err := DecodeTransaction(cdcEv) + require.NoError(t, err) + assert.Equal(t, tx.Hash(), decTx.Hash()) + assert.Equal(t, tx.Type(), decTx.Type()) + assert.Equal(t, tx.To(), decTx.To()) + assert.Equal(t, tx.Value(), decTx.Value()) + assert.Equal(t, tx.Nonce(), decTx.Nonce()) + assert.Equal(t, tx.Data(), decTx.Data()) + assert.Equal(t, tx.GasPrice(), decTx.GasPrice()) + assert.Equal(t, tx.BlobGas(), decTx.BlobGas()) + assert.Equal(t, tx.Size(), decTx.Size()) +} + +func Test_DecodeReceipts(t *testing.T) { + cdcEv, _, rec := createTestEvent(t) + + receipt, err := DecodeReceipt(cdcEv) + require.NoError(t, err) + + for i, l := range rec.Logs { + assert.ObjectsAreEqualValues(l, receipt.Logs[i]) + for j, tt := range l.Topics { + assert.EqualValues(t, tt, receipt.Logs[i].Topics[j]) + } + } +} From 82fd232f54893a1f5096b11b77dd32f38586cb59 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 27 Feb 2024 15:24:40 +0100 Subject: [PATCH 73/75] update start end range --- services/logs/filter.go | 14 +++++++------- services/logs/filter_test.go | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index c56ab8bd0..abd54fe3f 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -18,7 +18,7 @@ type FilterCriteria struct { // Filter interface { Match() (chan *gethTypes.Log, error) } // RangeFilter matches all the indexed logs within the range defined as -// start and end block height. The start must be strictly smaller than end value. +// start and end block height. The start must be strictly smaller or equal than end value. type RangeFilter struct { start, end *big.Int criteria FilterCriteria @@ -29,20 +29,20 @@ func NewRangeFilter( start, end big.Int, criteria FilterCriteria, receipts storage.ReceiptIndexer, -) *RangeFilter { +) (*RangeFilter, error) { + if start.Cmp(&end) > 0 { + return nil, fmt.Errorf("invalid start and end block height, start must be smaller or equal than end value") + } + return &RangeFilter{ start: &start, end: &end, criteria: criteria, receipts: receipts, - } + }, nil } func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { - if r.start.Cmp(r.end) != -1 { - return nil, fmt.Errorf("invalid start and end block height, start must be smaller than end value") - } - blooms, heights, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { return nil, err diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 844c6f173..ac469d99e 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -243,7 +243,9 @@ func TestRangeFilter(t *testing.T) { for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { - filter := NewRangeFilter(*tt.start, *tt.end, tt.criteria, receiptStorage()) + filter, err := NewRangeFilter(*tt.start, *tt.end, tt.criteria, receiptStorage()) + require.NoError(t, err) + logs, err := filter.Match() require.NoError(t, err) From 54bb7dbc3e7b0dd0956ed23889bc142e54413be7 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 27 Feb 2024 15:25:29 +0100 Subject: [PATCH 74/75] only receiver --- services/logs/filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index abd54fe3f..afea7a479 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -131,7 +131,7 @@ func NewStreamFilter(criteria FilterCriteria, receipts chan *gethTypes.Receipt) } } -func (s *StreamFilter) Match() (chan *gethTypes.Log, error) { +func (s *StreamFilter) Match() (<-chan *gethTypes.Log, error) { logs := make(chan *gethTypes.Log) go func() { From 1f5704127c60721014a0ca3b14e9658ed9379663 Mon Sep 17 00:00:00 2001 From: Gregor Gololicic Date: Tue, 27 Feb 2024 15:27:38 +0100 Subject: [PATCH 75/75] only receiver --- services/logs/filter.go | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/services/logs/filter.go b/services/logs/filter.go index afea7a479..a0400aaa3 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -138,20 +138,18 @@ func (s *StreamFilter) Match() (<-chan *gethTypes.Log, error) { defer close(logs) for { - select { - case receipt, ok := <-s.receiptStream: - if !ok { - return // exit the goroutine if receiptStream is closed - } + receipt, ok := <-s.receiptStream + if !ok { + return // exit the goroutine if receiptStream is closed + } - if !bloomMatch(receipt.Bloom, s.criteria) { - continue - } + if !bloomMatch(receipt.Bloom, s.criteria) { + continue + } - for _, log := range receipt.Logs { - if exactMatch(log, s.criteria) { - logs <- log - } + for _, log := range receipt.Logs { + if exactMatch(log, s.criteria) { + logs <- log } } } @@ -160,8 +158,9 @@ func (s *StreamFilter) Match() (<-chan *gethTypes.Log, error) { return logs, nil } -// exactMatch checks the topic and address values of the log match the filer exactly. +// exactMatch checks the topic and address values of the log match the filter exactly. func exactMatch(log *gethTypes.Log, criteria FilterCriteria) bool { + // check criteria doesn't have more topics than the log, but it can have less due to wildcards if len(criteria.Topics) > len(log.Topics) { return false }