From 2622efe2cb4a2785bd306ef9c37830d15d403087 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Mon, 15 Apr 2024 01:13:24 +0200 Subject: [PATCH 01/34] fix: missing first elem in tx iterator Signed-off-by: Norman Meier --- storage/pebble.go | 9 ++------- storage/pebble_test.go | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/storage/pebble.go b/storage/pebble.go index f6f37a8b..3ae7fe83 100644 --- a/storage/pebble.go +++ b/storage/pebble.go @@ -261,17 +261,12 @@ type PebbleTxIter struct { func (pi *PebbleTxIter) Next() bool { for { if !pi.init { - pi.init = true if !pi.i.First() { return false } - } - - if !pi.i.Valid() { - return false - } - if !pi.i.Next() { + pi.init = true + } else if !pi.i.Next() { return false } diff --git a/storage/pebble_test.go b/storage/pebble_test.go index eb26a686..bc054a1a 100644 --- a/storage/pebble_test.go +++ b/storage/pebble_test.go @@ -145,7 +145,7 @@ func TestStorageIters(t *testing.T) { txCount++ } - require.Equal(t, 2, txCount) + require.Equal(t, 3, txCount) defer require.NoError(t, it.Close()) From 984b8a9d0db2651f8fb6773412bf87dc86afe032 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Mon, 15 Apr 2024 01:42:22 +0200 Subject: [PATCH 02/34] feat: index genesis Signed-off-by: Norman Meier --- client/http.go | 9 +++ fetch/fetch.go | 181 ++++++++++++++++++++++++++++++++------------ fetch/mocks_test.go | 4 + fetch/types.go | 3 + 4 files changed, 149 insertions(+), 48 deletions(-) diff --git a/client/http.go b/client/http.go index 561d29f8..959a13f7 100644 --- a/client/http.go +++ b/client/http.go @@ -48,6 +48,15 @@ func (c *Client) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) { return block, nil } +func (c *Client) GetGenesisBlock() (*core_types.ResultGenesis, error) { + genesis, err := c.client.Genesis() + if err != nil { + return nil, fmt.Errorf("unable to get genesis block, %w", err) + } + + return genesis, nil +} + func (c *Client) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResults, error) { bn := int64(blockNum) diff --git a/fetch/fetch.go b/fetch/fetch.go index 16024f78..442efc34 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -11,6 +11,9 @@ import ( queue "github.com/madz-lab/insertion-queue" "go.uber.org/zap" + "github.com/gnolang/gno/gno.land/pkg/gnoland" + "github.com/gnolang/gno/tm2/pkg/amino" + bftTypes "github.com/gnolang/gno/tm2/pkg/bft/types" "github.com/gnolang/tx-indexer/storage" storageErrors "github.com/gnolang/tx-indexer/storage/errors" "github.com/gnolang/tx-indexer/types" @@ -70,6 +73,10 @@ func New( // FetchChainData starts the fetching process that indexes // blockchain data func (f *Fetcher) FetchChainData(ctx context.Context) error { + if err := f.maybeFetchGenesis(); err != nil { + return fmt.Errorf("unable to index genesis block, %w", err) + } + collectorCh := make(chan *workerResponse, DefaultMaxSlots) // attemptRangeFetch compares local and remote state @@ -178,68 +185,146 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Pop the next chunk f.chunkBuffer.PopFront() - wb := f.storage.WriteBatch() + if err := f.processSlot(item); err != nil { + return fmt.Errorf("unable to process slot, %w", err) + } + } + } + } +} - // Save the fetched data - for blockIndex, block := range item.chunk.blocks { - if saveErr := wb.SetBlock(block); saveErr != nil { - // This is a design choice that really highlights the strain - // of keeping legacy testnets running. Current TM2 testnets - // have blocks / transactions that are no longer compatible - // with latest "master" changes for Amino, so these blocks / txs are ignored, - // as opposed to this error being a show-stopper for the fetcher - f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) +func (f *Fetcher) maybeFetchGenesis() error { + // Check if genesis block has already been indexed (latest height is set) + _, err := f.storage.GetLatestHeight() + if err == nil { + return nil + } else if !errors.Is(err, storageErrors.ErrNotFound) { + return fmt.Errorf("unable to fetch latest block height, %w", err) + } - continue - } + // Fetch genesis + iGenesisBlock, err := f.client.GetGenesisBlock() + if err != nil { + return fmt.Errorf("unable to fetch genesis block, %w", err) + } - f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) + genesisState, ok := iGenesisBlock.Genesis.AppState.(gnoland.GnoGenesisState) + if !ok { + return errors.New("unable to cast genesis block to GnoGenesisState") + } - // Get block results - txResults := item.chunk.results[blockIndex] + // Convert genesis to normal block + bftTxs := make([]bftTypes.Tx, len(genesisState.Txs)) + for i, tx := range genesisState.Txs { + bftTxs[i], err = amino.Marshal(tx) + if err != nil { + return fmt.Errorf("unable to marshal tx, %w", err) + } + } - // Save the fetched transaction results - for _, txResult := range txResults { - if err := wb.SetTx(txResult); err != nil { - f.logger.Error("unable to save tx", zap.String("err", err.Error())) + block := &bftTypes.Block{ + Header: bftTypes.Header{ + AppHash: iGenesisBlock.Genesis.AppHash, + ChainID: iGenesisBlock.Genesis.ChainID, + Time: iGenesisBlock.Genesis.GenesisTime, + Height: 0, + NumTxs: int64(len(bftTxs)), + TotalTxs: int64(len(bftTxs)), + }, + Data: bftTypes.Data{ + Txs: bftTxs, + }, + } - continue - } + txResults := make([]*bftTypes.TxResult, len(bftTxs)) + for i, tx := range bftTxs { + txResults[i] = &bftTypes.TxResult{ + Height: 0, + Index: uint32(i), + Tx: tx, + } + } - f.logger.Debug( - "Added tx to batch", - zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), - ) - } + slot := &slot{ + chunk: &chunk{ + blocks: []*bftTypes.Block{block}, + results: [][]*bftTypes.TxResult{txResults}, + }, + chunkRange: chunkRange{ + from: 0, // should be -1, but we're using 0 to avoid underflow + to: 0, + }, + } - // Alert any listeners of a new saved block - event := &types.NewBlock{ - Block: block, - Results: txResults, - } + if err := f.processSlot(slot); err != nil { + return fmt.Errorf("unable to process genesis slot, %w", err) + } - f.events.SignalEvent(event) - } + return nil +} - f.logger.Info( - "Added to batch block and tx data for range", - zap.Uint64("from", item.chunkRange.from), - zap.Uint64("to", item.chunkRange.to), - ) +func (f *Fetcher) processSlot(slot *slot) error { + wb := f.storage.WriteBatch() - // Save the latest height data - if err := wb.SetLatestHeight(item.chunkRange.to); err != nil { - if rErr := wb.Rollback(); rErr != nil { - return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) - } + // Save the fetched data + for blockIndex, block := range slot.chunk.blocks { + if saveErr := wb.SetBlock(block); saveErr != nil { + // This is a design choice that really highlights the strain + // of keeping legacy testnets running. Current TM2 testnets + // have blocks / transactions that are no longer compatible + // with latest "master" changes for Amino, so these blocks / txs are ignored, + // as opposed to this error being a show-stopper for the fetcher + f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) - return fmt.Errorf("unable to save latest height info, %w", err) - } + continue + } - if err := wb.Commit(); err != nil { - return fmt.Errorf("error persisting block information into storage, %w", err) - } + f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) + + // Get block results + txResults := slot.chunk.results[blockIndex] + + // Save the fetched transaction results + for _, txResult := range txResults { + if err := wb.SetTx(txResult); err != nil { + f.logger.Error("unable to save tx", zap.String("err", err.Error())) + + continue } + + f.logger.Debug( + "Added tx to batch", + zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), + ) + } + + // Alert any listeners of a new saved block + event := &types.NewBlock{ + Block: block, + Results: txResults, + } + + f.events.SignalEvent(event) + } + + f.logger.Info( + "Added to batch block and tx data for range", + zap.Uint64("from", slot.chunkRange.from), + zap.Uint64("to", slot.chunkRange.to), + ) + + // Save the latest height data + if err := wb.SetLatestHeight(slot.chunkRange.to); err != nil { + if rErr := wb.Rollback(); rErr != nil { + return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) } + + return fmt.Errorf("unable to save latest height info, %w", err) } + + if err := wb.Commit(); err != nil { + return fmt.Errorf("error persisting block information into storage, %w", err) + } + + return nil } diff --git a/fetch/mocks_test.go b/fetch/mocks_test.go index 91f9a1e9..99edb878 100644 --- a/fetch/mocks_test.go +++ b/fetch/mocks_test.go @@ -39,6 +39,10 @@ func (m *mockClient) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) return nil, nil } +func (m *mockClient) GetGenesisBlock() (*core_types.ResultGenesis, error) { + return nil, nil +} + func (m *mockClient) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResults, error) { if m.getBlockResultsFn != nil { return m.getBlockResultsFn(blockNum) diff --git a/fetch/types.go b/fetch/types.go index cb75e844..5f585105 100644 --- a/fetch/types.go +++ b/fetch/types.go @@ -15,6 +15,9 @@ type Client interface { // GetBlock returns specified block GetBlock(uint64) (*core_types.ResultBlock, error) + // GetGenesisBlock returns the genesis block + GetGenesisBlock() (*core_types.ResultGenesis, error) + // GetBlockResults returns the results of executing the transactions // for the specified block GetBlockResults(uint64) (*core_types.ResultBlockResults, error) From 35cd374e09fa041b4c95b0006b4c0abd22798bae Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 17 Apr 2024 16:15:35 +0200 Subject: [PATCH 03/34] feat: get genesis tx results and allow consumers to easily replay txs Signed-off-by: Norman Meier --- fetch/fetch.go | 8 +- go.mod | 58 +++-- go.sum | 210 ++++++++---------- serve/graph/generated.go | 131 ++++++++++- serve/graph/model/models_gen.go | 3 +- serve/graph/model/transaction.go | 14 ++ serve/graph/query.resolvers.go | 8 + .../schema/filter/transaction_filter.graphql | 2 + serve/graph/schema/types/transaction.graphql | 10 + storage/pebble.go | 41 +--- 10 files changed, 305 insertions(+), 180 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 442efc34..a8498413 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -238,10 +238,12 @@ func (f *Fetcher) maybeFetchGenesis() error { txResults := make([]*bftTypes.TxResult, len(bftTxs)) for i, tx := range bftTxs { + r := iGenesisBlock.Response.TxResponses[i] txResults[i] = &bftTypes.TxResult{ - Height: 0, - Index: uint32(i), - Tx: tx, + Height: 0, + Index: uint32(i), + Tx: tx, + Response: r, } } diff --git a/go.mod b/go.mod index 23b3b69c..c25f6081 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,10 @@ go 1.21 require ( github.com/99designs/gqlgen v0.17.45 github.com/cockroachdb/pebble v1.1.0 + github.com/glebarez/sqlite v1.11.0 github.com/go-chi/chi/v5 v5.0.12 github.com/google/uuid v1.6.0 + github.com/hasura/go-graphql-client v0.12.1 github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a github.com/olahol/melody v1.2.0 github.com/peterbourgon/ff/v3 v3.4.0 @@ -16,13 +18,15 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 + gorm.io/gorm v1.25.9 ) require ( + dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash v1.1.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.1 // indirect @@ -31,25 +35,25 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dgraph-io/badger/v3 v3.2103.4 // indirect - github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect - github.com/gnolang/goleveldb v0.0.9 // indirect + github.com/glebarez/go-sqlite v1.21.2 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/flatbuffers v1.12.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/jmhodges/levigo v1.0.0 // indirect + github.com/jaekwon/testify v1.6.1 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/klauspost/compress v1.17.6 // 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/linxGnu/grocksdb v1.8.5 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -57,31 +61,47 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sosodev/duration v1.2.0 // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/urfave/cli/v2 v2.27.1 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - go.etcd.io/bbolt v1.3.8 // indirect - go.opencensus.io v0.22.5 // indirect - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + modernc.org/libc v1.22.5 // indirect + modernc.org/mathutil v1.5.0 // indirect + modernc.org/memory v1.5.0 // indirect + modernc.org/sqlite v1.23.1 // indirect + nhooyr.io/websocket v1.8.10 // indirect ) require ( - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/btcsuite/btcd/btcutil v1.1.3 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect + github.com/btcsuite/btcd/btcutil v1.1.5 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/gnolang/gno v0.0.0-20231215125729-9262c1a8f949 github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect github.com/go-chi/httprate v0.9.0 - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.21.0 google.golang.org/protobuf v1.33.0 // indirect ) + +replace github.com/gnolang/gno => github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972 diff --git a/go.sum b/go.sum index 58b5acdf..86111374 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,13 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/99designs/gqlgen v0.17.45 h1:bH0AH67vIJo8JKNKPJP+pOPpQhZeuVRQLf53dKIpDik= github.com/99designs/gqlgen v0.17.45/go.mod h1:Bas0XQ+Jiu/Xm5E33jC8sES3G+iC2esHBMXcq0fUPs0= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= +github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972 h1:wm0u/QAYf88UyTpSiFGhWRI/DwOHTqHSa9RoluhQPU0= +github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972/go.mod h1:tQ/V1MAo6iRMJE/gG5oK8S+OUGzApzlRw0Vb7KzoBIc= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= @@ -17,25 +17,24 @@ github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsVi github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.0 h1:V2/ZgjfDFIygAX3ZapeigkVBoVUtOJKSwrhZdlpSvaA= -github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd h1:js1gPwhcFflTZ7Nzl7WHaOTlTr5hIrR4n1NM4v9n4Kw= +github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0= +github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8= +github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -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/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= @@ -45,12 +44,10 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= @@ -65,10 +62,6 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -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/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= 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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -80,25 +73,13 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -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/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/dgraph-io/badger/v3 v3.2103.4 h1:WE1B07YNTTJTtG9xjBcSW2wn0RJLyiV99h959RKZqM4= -github.com/dgraph-io/badger/v3 v3.2103.4/go.mod h1:4MPiseMeDQ3FNCYwRbbcBOGJLf5jsE0PPFzRiKjtcdw= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -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/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -106,10 +87,10 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gnolang/gno v0.0.0-20231215125729-9262c1a8f949 h1:SSGQQALkDP3E0cMTuOw8/EH0HupmSl/TOTLt1BK8hFE= -github.com/gnolang/gno v0.0.0-20231215125729-9262c1a8f949/go.mod h1:qkXjIwBdGdIxxgP16m9jcYwNabj7luBNLGT42EaF2DY= -github.com/gnolang/goleveldb v0.0.9 h1:Q7rGko9oXMKtQA+Apeeed5a3sjba/mcDhzJGoTVLCKE= -github.com/gnolang/goleveldb v0.0.9/go.mod h1:Dz6p9bmpy/FBESTgduiThZt5mToVDipcHGzj/zUOo8E= +github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo= +github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= +github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= +github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 h1:GKvsK3oLWG9B1GL7WP/VqwM6C92j5tIvB844oggL9Lk= github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:xJhtEL7ahjM1WJipt89gel8tHzfIl/LyMY+lCYh38d8= github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= @@ -118,66 +99,61 @@ github.com/go-chi/httprate v0.9.0 h1:21A+4WDMDA5FyWcg7mNrhj63aNT8CGh+Z1alOE/piU8 github.com/go-chi/httprate v0.9.0/go.mod h1:6GOYBSwnpra4CQfAKXu8sQZg+nZ0M1g9QnyFvxrAB8A= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= -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/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.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= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -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.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= 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.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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hasura/go-graphql-client v0.12.1 h1:tL+BCoyubkYYyaQ+tJz+oPe/pSxYwOJHwe5SSqqi6WI= +github.com/hasura/go-graphql-client v0.12.1/go.mod h1:F4N4kR6vY8amio3gEu3tjSZr8GPOXJr3zj72DKixfLE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jaekwon/testify v1.6.1 h1:4AtAJcR9GzXN5W4DdY7ie74iCPiJV1JJUJL90t2ZUyw= github.com/jaekwon/testify v1.6.1/go.mod h1:Oun0RXIHI7osufabQ60i4Lqkj0GXLbqI1I7kgzBNm1U= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= 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.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= @@ -188,9 +164,8 @@ github.com/linxGnu/grocksdb v1.8.5 h1:Okfk5B1h0ikCYdDM7Tc5yJUS8LTwAmMBq5IPWTmOLP github.com/linxGnu/grocksdb v1.8.5/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a h1:KxTVE11SAJzp+PnqaCw0Rzb/of6mQexpTIyZwM/JTJU= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a/go.mod h1:kWWMMyVnsC79rIkENl7FQUU2EQql12s8ETwjsDBiMtA= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -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/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -208,7 +183,6 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa 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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/ff/v3 v3.4.0 h1:QBvM/rizZM1cB0p0lGMdmR7HxZeI/ZrBWB4DqLkMUBc= @@ -228,50 +202,51 @@ github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqSc github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 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/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.2.0 h1:pqK/FLSjsAADWY74SyWDCjOcd5l7H8GSnnOGEB9A1Us= github.com/sosodev/duration v1.2.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= -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/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= +go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -279,51 +254,36 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= -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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= 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.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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-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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.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-20180909124046-d0be0721c37e/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -331,7 +291,7 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -340,9 +300,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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/tools v0.0.0-20180917221912-90fa682c2a6e/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-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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -353,31 +310,29 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -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/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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/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.4/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= @@ -385,4 +340,15 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8= +gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= +modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= +modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= +modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= +modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= diff --git a/serve/graph/generated.go b/serve/graph/generated.go index a72f4ee6..6d77491a 100644 --- a/serve/graph/generated.go +++ b/serve/graph/generated.go @@ -107,11 +107,13 @@ type ComplexityRoot struct { Transaction struct { BlockHeight func(childComplexity int) int + Code func(childComplexity int) int ContentRaw func(childComplexity int) int GasUsed func(childComplexity int) int GasWanted func(childComplexity int) int Hash func(childComplexity int) int Index func(childComplexity int) int + Log func(childComplexity int) int Memo func(childComplexity int) int Messages func(childComplexity int) int } @@ -391,6 +393,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Transaction.BlockHeight(childComplexity), true + case "Transaction.code": + if e.complexity.Transaction.Code == nil { + break + } + + return e.complexity.Transaction.Code(childComplexity), true + case "Transaction.content_raw": if e.complexity.Transaction.ContentRaw == nil { break @@ -426,6 +435,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Transaction.Index(childComplexity), true + case "Transaction.log": + if e.complexity.Transaction.Log == nil { + break + } + + return e.complexity.Transaction.Log(childComplexity), true + case "Transaction.memo": if e.complexity.Transaction.Memo == nil { break @@ -1863,6 +1879,10 @@ func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, return ec.fieldContext_Transaction_messages(ctx, field) case "memo": return ec.fieldContext_Transaction_memo(ctx, field) + case "code": + return ec.fieldContext_Transaction_code(ctx, field) + case "log": + return ec.fieldContext_Transaction_log(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Transaction", field.Name) }, @@ -2187,6 +2207,10 @@ func (ec *executionContext) fieldContext_Subscription_transactions(ctx context.C return ec.fieldContext_Transaction_messages(ctx, field) case "memo": return ec.fieldContext_Transaction_memo(ctx, field) + case "code": + return ec.fieldContext_Transaction_code(ctx, field) + case "log": + return ec.fieldContext_Transaction_log(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Transaction", field.Name) }, @@ -2646,6 +2670,94 @@ func (ec *executionContext) fieldContext_Transaction_memo(ctx context.Context, f return fc, nil } +func (ec *executionContext) _Transaction_code(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Transaction_code(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Code(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Transaction_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Transaction", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Transaction_log(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Transaction_log(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Log(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Transaction_log(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Transaction", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _TransactionMessage_typeUrl(ctx context.Context, field graphql.CollectedField, obj *model.TransactionMessage) (ret graphql.Marshaler) { fc, err := ec.fieldContext_TransactionMessage_typeUrl(ctx, field) if err != nil { @@ -5059,7 +5171,7 @@ func (ec *executionContext) unmarshalInputTransactionFilter(ctx context.Context, asMap[k] = v } - fieldsInOrder := [...]string{"from_block_height", "to_block_height", "from_index", "to_index", "from_gas_wanted", "to_gas_wanted", "from_gas_used", "to_gas_used", "hash", "message", "memo"} + fieldsInOrder := [...]string{"from_block_height", "to_block_height", "from_index", "to_index", "from_gas_wanted", "to_gas_wanted", "from_gas_used", "to_gas_used", "hash", "message", "memo", "limit"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -5143,6 +5255,13 @@ func (ec *executionContext) unmarshalInputTransactionFilter(ctx context.Context, return it, err } it.Memo = data + case "limit": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Limit = data } } @@ -5825,6 +5944,16 @@ func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionS if out.Values[i] == graphql.Null { out.Invalids++ } + case "code": + out.Values[i] = ec._Transaction_code(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "log": + out.Values[i] = ec._Transaction_log(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } diff --git a/serve/graph/model/models_gen.go b/serve/graph/model/models_gen.go index 20bd7425..219f5d44 100644 --- a/serve/graph/model/models_gen.go +++ b/serve/graph/model/models_gen.go @@ -239,7 +239,8 @@ type TransactionFilter struct { // `memo` are string information stored within a transaction. // `memo` can be utilized to find or distinguish transactions. // For example, when trading a specific exchange, you would utilize the memo field of the transaction. - Memo *string `json:"memo,omitempty"` + Memo *string `json:"memo,omitempty"` + Limit *int `json:"limit,omitempty"` } // Transaction's message to filter Transactions. diff --git a/serve/graph/model/transaction.go b/serve/graph/model/transaction.go index 77e80aff..8fb5bce8 100644 --- a/serve/graph/model/transaction.go +++ b/serve/graph/model/transaction.go @@ -59,6 +59,20 @@ func (t *Transaction) ContentRaw() string { return t.txResult.Tx.String() } +func (t *Transaction) Code() int { + if t.txResult.Response.Error == nil { + return 0 + } + return 1 +} + +func (t *Transaction) Log() string { + if t.txResult == nil { + return "" + } + return t.txResult.Response.Log +} + func (t *Transaction) Memo() string { if t.getStdTx() == nil { return "" diff --git a/serve/graph/query.resolvers.go b/serve/graph/query.resolvers.go index 1abfb9a3..d09b64d5 100644 --- a/serve/graph/query.resolvers.go +++ b/serve/graph/query.resolvers.go @@ -22,6 +22,11 @@ func (r *queryResolver) Transactions(ctx context.Context, filter model.Transacti return []*model.Transaction{model.NewTransaction(tx)}, nil } + limit := maxElementsPerQuery + if filter.Limit != nil { + limit = *filter.Limit + } + it, err := r. store. TxIterator( @@ -64,6 +69,9 @@ func (r *queryResolver) Transactions(ctx context.Context, filter model.Transacti } out = append(out, transaction) i++ + if i >= limit { + return out, nil + } } } } diff --git a/serve/graph/schema/filter/transaction_filter.graphql b/serve/graph/schema/filter/transaction_filter.graphql index d9b8aeb2..3a7e52e6 100644 --- a/serve/graph/schema/filter/transaction_filter.graphql +++ b/serve/graph/schema/filter/transaction_filter.graphql @@ -59,6 +59,8 @@ input TransactionFilter { For example, when trading a specific exchange, you would utilize the memo field of the transaction. """ memo: String + + limit: Int } """ diff --git a/serve/graph/schema/types/transaction.graphql b/serve/graph/schema/types/transaction.graphql index 7dc2f291..21e89b4d 100644 --- a/serve/graph/schema/types/transaction.graphql +++ b/serve/graph/schema/types/transaction.graphql @@ -44,6 +44,16 @@ type Transaction { For example, when trading a specific exchange, you would utilize the memo field of the transaction. """ memo: String! + + """ + `code` is the status code of the transaction. + """ + code: Int! + + """ + `log` log of tx result + """ + log: String! } """ diff --git a/storage/pebble.go b/storage/pebble.go index 3ae7fe83..59a05245 100644 --- a/storage/pebble.go +++ b/storage/pebble.go @@ -259,44 +259,17 @@ type PebbleTxIter struct { } func (pi *PebbleTxIter) Next() bool { - for { - if !pi.init { - if !pi.i.First() { - return false - } - - pi.init = true - } else if !pi.i.Next() { - return false - } - - var buf []byte - - key, _, err := decodeUnsafeStringAscending(pi.i.Key(), buf) - if err != nil { - pi.nextError = err - - return false - } - - key, _, err = decodeUint64Ascending(key) - if err != nil { - pi.nextError = err - - return false - } - - _, txIdx, err := decodeUint32Ascending(key) - if err != nil { - pi.nextError = err - + if !pi.init { + if !pi.i.First() { return false } - if txIdx >= pi.fromIndex && txIdx < pi.toIndex { - return true - } + pi.init = true + } else if !pi.i.Next() { + return false } + + return true } func (pi *PebbleTxIter) Error() error { From 0a55c90631d9e2243d5e883c44be87ca39ad5173 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Fri, 26 Apr 2024 16:42:23 +0200 Subject: [PATCH 04/34] tmp Signed-off-by: Norman Meier --- go.mod | 2 +- go.sum | 2 - log.txt | 5 + richcmd/db.go | 17 +++ richcmd/duplicate_realms.sql | 3 + richcmd/main.go | 198 +++++++++++++++++++++++++++++ richcmd/names.sql | 1 + richlog.txt | 236 +++++++++++++++++++++++++++++++++++ 8 files changed, 461 insertions(+), 3 deletions(-) create mode 100644 log.txt create mode 100644 richcmd/db.go create mode 100644 richcmd/duplicate_realms.sql create mode 100644 richcmd/main.go create mode 100644 richcmd/names.sql create mode 100644 richlog.txt diff --git a/go.mod b/go.mod index c25f6081..ae617ef0 100644 --- a/go.mod +++ b/go.mod @@ -104,4 +104,4 @@ require ( google.golang.org/protobuf v1.33.0 // indirect ) -replace github.com/gnolang/gno => github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972 +replace github.com/gnolang/gno => /Users/norman/Code/gno diff --git a/go.sum b/go.sum index 86111374..c33b1100 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,6 @@ github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= -github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972 h1:wm0u/QAYf88UyTpSiFGhWRI/DwOHTqHSa9RoluhQPU0= -github.com/TERITORI/gno v0.0.0-20240417140052-667f8bde8972/go.mod h1:tQ/V1MAo6iRMJE/gG5oK8S+OUGzApzlRw0Vb7KzoBIc= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= diff --git a/log.txt b/log.txt new file mode 100644 index 00000000..72305a09 --- /dev/null +++ b/log.txt @@ -0,0 +1,5 @@ +2024-04-18T13:18:24.990+0200 INFO http-server serve/server.go:46 HTTP server started {"address": "[::]:8546"} +2024-04-18T13:18:24.991+0200 INFO http-server serve/server.go:61 HTTP server to be shut down +2024-04-18T13:18:24.991+0200 INFO http-server serve/server.go:55 HTTP server shut down +unable to index genesis block, unable to fetch genesis block, unable to get genesis block, Post "http://127.0.0.1:26657": dial tcp 127.0.0.1:26657: connect: connection refused +sync /dev/stderr: bad file descriptorexit status 1 diff --git a/richcmd/db.go b/richcmd/db.go new file mode 100644 index 00000000..594f1391 --- /dev/null +++ b/richcmd/db.go @@ -0,0 +1,17 @@ +package main + +type Realm struct { + Address string `gorm:"index"` + PackagePath string `gorm:"primaryKey"` + CodeHash []byte `gorm:"index"` +} + +type User struct { + Address string `gorm:"primaryKey"` + Name string `gorm:"index"` +} + +var allModels = []interface{}{ + &Realm{}, + &User{}, +} diff --git a/richcmd/duplicate_realms.sql b/richcmd/duplicate_realms.sql new file mode 100644 index 00000000..e5c2ddaa --- /dev/null +++ b/richcmd/duplicate_realms.sql @@ -0,0 +1,3 @@ +WITH agg as ( + SELECT code_hash, group_concat(package_path) AS paths, COUNT(1) AS count FROM realms GROUP BY code_hash ORDER BY count DESC +) SELECT * FROM agg WHERE count > 1; \ No newline at end of file diff --git a/richcmd/main.go b/richcmd/main.go new file mode 100644 index 00000000..34d4fbb7 --- /dev/null +++ b/richcmd/main.go @@ -0,0 +1,198 @@ +package main + +import ( + "context" + "database/sql" + "encoding/hex" + "slices" + "strings" + "time" + + _ "embed" + + "github.com/glebarez/sqlite" + _ "github.com/gnolang/gno/gno.land/pkg/gnoland" + "github.com/gnolang/gno/gno.land/pkg/sdk/vm" + "github.com/gnolang/gno/gnovm/pkg/gnolang" + "github.com/gnolang/gno/tm2/pkg/amino" + _ "github.com/gnolang/gno/tm2/pkg/bft/types" + "github.com/gnolang/gno/tm2/pkg/std" + tm2 "github.com/gnolang/gno/tm2/pkg/std" + "github.com/hasura/go-graphql-client" + "github.com/pkg/errors" + "go.uber.org/zap" + "golang.org/x/crypto/sha3" + "gorm.io/gorm" +) + +//go:embed duplicate_realms.sql +var duplicateRealmsSQL string + +//go:embed names.sql +var namesSQL string + +func main() { + logger, err := zap.NewDevelopment() + if err != nil { + panic(errors.Wrap(err, "failed to create logger")) + } + + db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{}) + if err != nil { + panic(errors.Wrap(err, "failed to open db")) + } + if err := db.AutoMigrate(allModels...); err != nil { + panic(errors.Wrap(err, "failed to sync db schema")) + } + + client := graphql.NewClient("http://localhost:8546/graphql/query", nil) + + lastHeight := int64(0) + lastIndex := int64(-1) + limit := 10000 + + for newTxs := true; newTxs; { + nextIndex := lastIndex + 1 + + logger.Info("query", zap.Int64("lastHeight", lastHeight), zap.Int64("nextIndex", nextIndex)) + + var txQuery struct { + Transactions []struct { + BlockHeight int64 `graphql:"block_height"` + Index int64 + Code int + ContentRaw string `graphql:"content_raw"` + } `graphql:"transactions(filter: { from_block_height: $fromHeight, from_index: $fromIndex, limit: $limit })"` + } + + // FIXME: need to filter txs that succeeded + if err := client.Query(context.TODO(), &txQuery, map[string]any{ + "fromHeight": lastHeight, + "fromIndex": nextIndex, + "limit": limit, + }); err != nil { + panic(errors.Wrap(err, "failed to query")) + } + + for _, tx := range txQuery.Transactions { + if tx.Code != 0 { + logger.Debug("ignored tx", zap.Int64("height", tx.BlockHeight), zap.Int64("index", tx.Index)) + continue + } + + txBytes, err := hex.DecodeString(tx.ContentRaw[3 : len(tx.ContentRaw)-1]) + if err != nil { + panic(errors.Wrap(err, "failed to decode tx")) + } + var tm2Tx tm2.Tx + if err := amino.Unmarshal(txBytes, &tm2Tx); err != nil { + panic(errors.Wrap(err, "failed to unmarshal tx")) + } + for _, msg := range tm2Tx.GetMsgs() { + switch msg.Route() { + case "vm": + switch msg.Type() { + case "exec": + msg := msg.(vm.MsgCall) + // logger.Debug("vm.exec", zap.String("type", msg.Type()), zap.String("realm", msg.PkgPath)) + switch msg.PkgPath { + case "gno.land/r/demo/users": + switch msg.Func { + case "Register": + name := msg.Args[1] + addr := msg.Caller.String() + if err := db.Save(&User{Name: name, Address: addr}).Error; err != nil { + panic(errors.Wrap(err, "failed to save user")) + } + logger.Debug("maybe registered user", zap.String("name", name), zap.String("address", addr)) + default: + // logger.Debug("vm.exec", zap.String("type", msg.Type()), zap.String("realm", msg.PkgPath), zap.String("func", msg.Func), zap.Any("args", msg.Args)) + } + } + continue + case "add_package": + msg := msg.(vm.MsgAddPackage) + addr := gnolang.DerivePkgAddr(msg.Package.Path) + codeHash, err := hashCode(msg.Package.Files) + if err != nil { + panic(errors.Wrap(err, "failed to hash code")) + } + realm := &Realm{ + Address: addr.String(), + PackagePath: msg.Package.Path, + CodeHash: codeHash, + } + if err := db.Save(realm).Error; err != nil { + panic(errors.Wrap(err, "failed to save realm")) + } + logger.Debug("maybe instantiated realm", zap.String("package", msg.Package.Path), zap.String("code_hash", hex.EncodeToString(codeHash)), zap.String("address", addr.String())) + // logger.Debug("indexed message", zap.String("fqtype", "vm.add_package"), zap.Any("realm", realm)) + continue + case "run": + // msg := msg.(vm.MsgRun) + // logger.Debug("vm.run", zap.String("type", msg.Type()), zap.String("pkg", msg.Package.Path)) + continue + } + case "bank": + switch msg.Type() { + case "send": + // msg := msg.(bank.MsgSend) + // logger.Debug("bank.send", zap.String("type", msg.Type()), zap.String("from", msg.FromAddress.String()), zap.String("to", msg.ToAddress.String()), zap.Any("amount", msg.Amount)) + continue + } + } + logger.Debug("unknown", zap.String("route", msg.Route()), zap.String("type", msg.Type()), zap.Any("msg", msg)) + } + + lastHeight = tx.BlockHeight + lastIndex = int64(tx.Index) + } + + if len(txQuery.Transactions) <= 0 { + newTxs = false + } else { + time.Sleep(2 * time.Second) // would be better to use a sub + } + } + + var results []queryResult + if err := db.Raw(duplicateRealmsSQL).Scan(&results).Error; err != nil { + panic(errors.Wrap(err, "failed to query")) + } + for _, result := range results { + paths := strings.Split(result.Paths, ",") + logger.Debug("maybe found duplicate code", zap.String("code_hash", result.CodeHash), zap.Int("count", result.Count), zap.Any("paths", paths)) + } + + var users []User + if err := db.Raw(namesSQL, sql.Named("search", "u")).Scan(&users).Error; err != nil { + panic(errors.Wrap(err, "failed to query")) + } + for _, user := range users { + logger.Debug("maybe found user with u", zap.String("name", user.Name), zap.String("address", user.Address)) + } +} + +type queryResult struct { + CodeHash string + Count int + Paths string +} + +func hashCode(pkgFiles []*tm2.MemFile) ([]byte, error) { + files := make([]*tm2.MemFile, len(pkgFiles)) + copy(files, pkgFiles) + slices.SortFunc(files, func(i, j *std.MemFile) int { + return strings.Compare(i.Name, j.Name) + }) + hasher := sha3.New256() + for _, file := range files { + if _, err := hasher.Write([]byte(file.Name)); err != nil { + return nil, errors.Wrap(err, "failed to hash file name") + } + if _, err := hasher.Write([]byte(file.Body)); err != nil { + return nil, errors.Wrap(err, "failed to hash file body") + } + } + return hasher.Sum(nil), nil +} diff --git a/richcmd/names.sql b/richcmd/names.sql new file mode 100644 index 00000000..2328cb72 --- /dev/null +++ b/richcmd/names.sql @@ -0,0 +1 @@ +SELECT * FROM users WHERE name LIKE '%' || @search || '%' \ No newline at end of file diff --git a/richlog.txt b/richlog.txt new file mode 100644 index 00000000..10048417 --- /dev/null +++ b/richlog.txt @@ -0,0 +1,236 @@ +2024-04-15T19:21:22.547+0200 INFO richcmd/main.go:57 query {"lastHeight": 0, "nextIndex": 0} +2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/avl", "code_hash": "4e8737dd4a1e01d2d3bcf64d4b23502af2ea5ece71ce20ac7d1dcdd04e16520d", "address": "g1hldhdj0hjydv0tplsz65cch3eanncskls4unx3"} +2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/testutils", "code_hash": "4914ef883165457ac0feea056a95eced45ec3697d07b51c4cf2e131b7af37065", "address": "g1ssrgtfce6pzs8tp7s6y8473yrffqs9xlgntk0h"} +2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/acl", "code_hash": "ff6832a05e0020154544172a20ff2e80d7296b50e29adda7e716855b8fbf8cf1", "address": "g1nrzg5q7vstjt4r2ls28s6wgeljucwecp4un9zc"} +2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/bank", "code_hash": "4a4616aa282c2532fa4c9f2cce7624082049c72c831ceac5237efabf3796c23b", "address": "g1ks2t3lk6qd6dmptlr6xfyyql2utfaruhd20j7c"} +2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/bf", "code_hash": "992a88e11da14caacc864cd931f85d9723784ffade22321cc44a4a07acf93f5c", "address": "g1k38srsk69usfavh2rnx72yqpdh7wnf045eehgw"} +2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/mux", "code_hash": "e74457fbee999ef43b824e3b85d54087920620664be477488a15f317dd595ef9", "address": "g1yvjqlsvaqp2wkvqnrk9yl3u4maysevzgq3qhzn"} +2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ufmt", "code_hash": "851654972d4847e218c1a11745ec901ffbaa7c0cf5da27eefcd56c2cca87fada", "address": "g1x5wkpp74awt76tzm5d4feen7hlxu47gjh3nhef"} +2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/blog", "code_hash": "ca059bdf19cd0afaabb73c5613626ba06667ce60a9dd579861de176b3d8cf29b", "address": "g19ey3gpjgt22lhe424auvfgv2sxcqluqd0vfsss"} +2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/cford32", "code_hash": "bbf82eaa9cc6b0fd65bda890692f3b15438eb0c2aa4d19124543d3c307691612", "address": "g13wr2aansqqg2q4ud78qnn5447jzua9sdsg5296"} +2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/dom", "code_hash": "ecc425d6e6423efcb56ecee7019493ab6b312b69e5d0fd227599acc4d448b3e6", "address": "g10ft70wut3dxe34au67weu4g0l3nlh5sd5whqq4"} +2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/flow", "code_hash": "4a0f20a8834eb4b9172e1b8579878dce8cf3ddd0923ba50218c53f9d9295c9ba", "address": "g19ym6hawzlu85wgn2eqjnwc6u6rp7nauh24an5v"} +2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/gnode", "code_hash": "e3cdb7fef543a2929c2488d77b06fe7e93945e4de43364edf3857fc38c47ad4b", "address": "g139tm6xgpyxzujkqla9g08n7tksk9tecak3tgyy"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/exts", "code_hash": "f822df3c21a083a7070e59446f5280aff25faecfdb71f20e8da00b8751be697f", "address": "g1vlvqg4vdcy08w6h4xpkj2hynkyccak7afs952m"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc20", "code_hash": "eefef16a1337507665a3cd65b266f6088875169f00d5cf8d03d543459300bd7c", "address": "g1zz9npml7mtyhh94w8scyrpgk7upex5ymk0h3lg"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/exts/vault", "code_hash": "7b5b84a640d73e2da385f890150d2b036f645fe1e26dedd1f878b6b4937b034d", "address": "g1uqzpddrg7n9yrzwg8wgha8vz9frv74tk27fhfz"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/users", "code_hash": "ac58be9cc2d3979f50298384077fed26aabc189db63e6f05d1047bc030771c9f", "address": "g1rdpadmmz5hqmpecrmxvxqqj8knrfhlxvnhgzxp"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc1155", "code_hash": "471aae516963572389d3a11fe32870556870b24794da3db28cc649dc4790d5be", "address": "g1sqxucdn5tjk0700r5p2fshc2ft27pqfer5lz2d"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc721", "code_hash": "3a691989f73ea30a1a4cd9c9acb073f12576d01d36f7798790165a07cc2aab45", "address": "g1y4vnhs93wcple5uz8h9z2y9pf3uulpr8939xr2"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc777", "code_hash": "d6c3a6ec2296606b78f2a0a3eb0235b4e622455040e8f024396a082ce1e6d22f", "address": "g1u5epl67daj67y6u243n2xkxmh0k84azl0gq4ge"} +2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/maths", "code_hash": "561edcbd1987289b8643ef51eafd47396f17f01d84366a983bd95801bc8d223b", "address": "g1yxaff6ljvre44ksdwz59xqlkexgw69llwjdpe0"} +2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/users", "code_hash": "fda5f578459862e595925b09f5ed43bb77af80b3e22056671440eb00499b0bb2", "address": "g17m4ga9t9dxn8uf06p3cahdavzfexe33ecg8v2s"} +2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/boards", "code_hash": "e5674f65ca51514a40c9fa9b632b6513c6458033e27aa4a13b42566d356db8c7", "address": "g1ek4j3le4d9h3rsq6u5vkgvtqczfvellgfpz6ld"} +2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/groups", "code_hash": "b43b244091b06fa12a296ad69facb73aef5c7c6d65ce4716ffc817d2ed3565e0", "address": "g17kys3ku4gcl8n2z8v5gj0daqpdkd2u55zqjxxl"} +2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/uint256", "code_hash": "dd2c0f24b20f68d513eb4f208163dcfd21170ff111442dab741accfbafac6e64", "address": "g1uurmwrtyp8d0zfguq5ezvw0swxyhj4zfdf6l8z"} +2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/int256", "code_hash": "a01314142dd654f77a25d458e37ed82fe45ff3cc7e1c1d1fa714a3232a89ac8b", "address": "g1kkwttd3mts7ac9kx2uf6lfzp66enzlesjelgdc"} +2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json/eisel_lemire", "code_hash": "443debafdbfb509279c375c796f936d8b52d24f4ddc3b4dceb15d64da8279d61", "address": "g1rn4a2vgvkw50m92j20vtvzwr3a0n40v4pkyc30"} +2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json/ryu", "code_hash": "66fba1b9cfb220b935270229df9972d9e0018a682ca420903d4ca9e58df853ee", "address": "g187a37m4a8jvm497ry8u6tr2l8my5whhxhdewy9"} +2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json", "code_hash": "0e788b01bc62802fbf63f3eb7356aa6d5c36ff5ace21c62b517bad382a6d906f", "address": "g1yk5ztajskjswpuurlfefc4lqfkda47cz7g2mt6"} +2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/math_eval/int32", "code_hash": "94634d2f27e0a6f3a6c7b29f8506b16e5232a178fada32aa9e9dcfd686e2e1ca", "address": "g1ppk342vyy25axugd47s6w375cvv2hm7rcqscp0"} +2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ownable", "code_hash": "d752a89cc981eb95b42969b204c5dabe97eb7e69ab79ba0ed8866291060efde4", "address": "g1gufzdwlq94f79wd842qg5ksr8w8xntf8xep3uu"} +2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/seqid", "code_hash": "afcfaa10c9dbbbc6dcd45c9275b65e93f9f628502d4ff4741052bda1a1e8b73a", "address": "g195tjzkh5nw93hj3m75tqtnzmfu2rak2mwkzpx4"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/memeland", "code_hash": "abcd1603b09fe6b1c4b65fab864c6e67b5dacce93352eea39b0d428af695daf9", "address": "g15ymwcq9a0uqzrt3pqwpv6uu6fxsjv5s96vxpnf"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/merkle", "code_hash": "47ca605e767c1777a0b6c0ddadba527aaaa3817d3ad8e20aca5403982aff8033", "address": "g1hd5m95ep5mwkdlenrjajmjkz99dgh7tf874v8a"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/microblog", "code_hash": "fc773e5bbb7efb2ffb7f920ba0466fbe74894824eba40d61fd5c4047bd117536", "address": "g1wgehsq6zn8x78el7feel88pv4lsmwdvn8vk5kh"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/pausable", "code_hash": "c79558f0ca860900e8883bf14180fce81f32d30b71d616cd1f452ec1511e0d0c", "address": "g1cc37pe53v07pyc6fcevtm5an6d8vazcrex0fuh"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/releases", "code_hash": "d91756d9a2bb226a4b4fba0b758ddf83d5eaa61466407d9d86aedf4b3ad7acea", "address": "g18ne0hnct2exsd2990ytxwukzxmm2h8vpygw4c6"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/stack", "code_hash": "8125f1886a1816d155fb6e20c36283f9cb29b9ad3b2976979c3d7f3a92cbd81f", "address": "g187de8z6wlhhhku5cvj0umyslvwnkdd4avxv5xx"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/svg", "code_hash": "da0088c89055877c85558e6ed7b3147b69b8068de0a8e6edf4c54c7ecff5a941", "address": "g1z3fj364f8f5rg2e6zemd9r3rl6jhp454gfkfjd"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tamagotchi", "code_hash": "a6275d66cdc9e496a8408ea8a490c687ee676bf2d89944f4695aa46d4a766d20", "address": "g198qg3ktjp40ykj2l3nekmdsg84alquke7rgndh"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tests/subtests", "code_hash": "e296ffb859badd366d39560a40918d073ac3194b6654d4dccd1af749533e464a", "address": "g1lth85t2v9w3wt2se92gmeu46nnnrapf2yzkvnc"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests/subtests", "code_hash": "fb6cce0fecc4777c1d8c6389486d09c01921161807451efbff5e6ffd761a36fc", "address": "g13g48xnr7lzxsrvny0uf6lhx0cfaxy4n0n5geuf"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests", "code_hash": "bdec79c213f59bb149625959c0bbca5a8e7f4608b6efac8bc4e487f02fd1a182", "address": "g1gz4ycmx0s6ln2wdrsh4e00l9fsel2wskqa3snq"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tests", "code_hash": "0fa4e02455a2aa719b7d2e6350ccb767da19a1e61718d33f34689a5599820c0b", "address": "g1lc7c8nv62nqyyhhxe88tpxx786gwq68prx3f6e"} +2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/todolist", "code_hash": "80fe7e7a02199d558965aaf5faca1483f3c343266bf8ad2dc1de188f6c06c7e0", "address": "g1kppqvr5krndv2xsj9fe2e0hnm64csy6c720jst"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ui", "code_hash": "c85c0be4c462130af9366dcc1092f34aabf9d4f5686a9330479c82feae9981d6", "address": "g1xhy55q7aw3vp5mmdv2x7nxutyl06hd5epgyff3"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/art/millipede", "code_hash": "0d6ad6019a95a26d80f2110d21b7f0a1cb99e9db8dc4b4894787e346ca3e291e", "address": "g1uxtlve2qdevfrc3vqhud3y5sysvfnajn3nygzk"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/banktest", "code_hash": "402ccb65f981b37a1dc8c5ba12de2ecb669dfd00324097eb6572bc4ffba95ba7", "address": "g1dv3435088tlrgggf745kaud0ptrkc9v42k8llz"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/deep/very/deep", "code_hash": "530e12e3dbc509dffd324953a710b1cef4ff4abd0aa711d02726ebff47f76f8d", "address": "g1lg3s0dueulh4d787ztfqcrkrhct39lkkzclfuf"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/echo", "code_hash": "8e04a734c411cbe0cf8bbcbcf78878e8065c415ed002677315aab3691f8afa94", "address": "g1uygynp4uvt4qykpvxte7h0lqu23gpfk8vhuyqy"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo1155", "code_hash": "734e27eb1d3cf199baa4074964c86119c21a65173f734dc059c7b474f1fde6cb", "address": "g1c5ale6a5g6q2298t6245qp9kp60450j2u0lare"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo20", "code_hash": "80fc891c06eacc456d61b2961236f770e63dac114f3bdd07053dd548730a725b", "address": "g1uy45fxt6keu49v4t00z7f6yzmxujkhsugg8zct"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo721", "code_hash": "53ed0a3c97c2ac1276da46c908a1367b95a18aa34ddd6f9c8d4457cddeb1099a", "address": "g13j6sturdn3a989vx2uh5s0vc0s72v7nt6gkhy4"} +2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/groups", "code_hash": "91bf526cf136d34c2f29e03102fdb9b7382ead4a5a8f706fb7acda642c029664", "address": "g1r0mlnkc05z0fv49km99z60qnp95tengyqfdr02"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/keystore", "code_hash": "f935530a3b54db10b2c405cf6192670e136b86cb23471a477a7bd7c0d3929b08", "address": "g1z66mk3xp00mu995eqhcz0d7yg6xzreltwt58sz"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/markdown_test", "code_hash": "a0b9f001646ec67a987512ece95b00046fdb3d6a052d0a0e7571dbf53fff425d", "address": "g1sh3ax3544zn5r0yk2rvh04lk2nkpq3waxmh5ut"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/math_eval", "code_hash": "566ab85c24dd480c2b5bb447c869da316c7288b7df6ebaadc178b8607d08986d", "address": "g1vqraszu73qqlpevvyzpw7ae6m6azpc220ltgwv"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/memeland", "code_hash": "d39fae1a83bbd3b1f8a262b9c46990d763aa5c497572709dd77c9eeb6e590498", "address": "g1qseh326qz9znq2nugljn33esnf68t5pt94fhat"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/microblog", "code_hash": "72d1324ae4b436fb7d1e29df0d928c98cf5af7be07429ef0a38471d1a625e888", "address": "g14uaqre50rg7ddwp8lhmjkkz7fvxgamkpxuhuxz"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/nft", "code_hash": "4669a3d93914b75be2bd117137a7e3d6d1bf83bfbf04149b739a0d7b5259bce0", "address": "g1k3zrrmsczuche5d4h3aswzy5z5sw4zmqtf3mhm"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/releases_example", "code_hash": "3302a79a1d00c7cbad4292523872a6007f029fb351c8fde3dd4189e36bc75007", "address": "g1dwraf3yxp8pd438k5yz3cy4uyuhjnc49hffwgj"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tamagotchi", "code_hash": "44869bdf02249f6eff84df2724192e9bcb4e682be96af36a345f5422a7dcd988", "address": "g1a3tu874agjlkrpzt9x90xv3uzncapcn959yte4"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests_foo", "code_hash": "9fb8dc8ded2f841e09bd38834c567e1a46ed788f03cf362e326ec136d0e400c6", "address": "g12yc8000f7g3wncpzun0jdh0sn30esx2t9ky8hp"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/todolist", "code_hash": "903f7d9eaabbd8d9ab440b4096225aac3bc51da2368bb09c2248a00a4c8901ae", "address": "g14wt3l376qj202qr7nuxypsdm8snl5ew37jt9xa"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/types", "code_hash": "71fe4e34fad9955ac70790b1f5af149069f30aed419d8202c2515a8700d5fa8a", "address": "g15s087x8zvqzsg66cr6qfpjk0kxtahsq64f5led"} +2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/ui", "code_hash": "dfe6d5c5b6e4881c1ed1cc72ac063e5ca0b36e814b427172e5a134f3a415f3c1", "address": "g19jngzxfm0d7hag89fma4unvltzpl2lyj9x5af2"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/wugnot", "code_hash": "916a03e5cb7adc2bec97703fdca7b19b7654df33cc74a180c4fb9796691ca74e", "address": "g1pf6dv9fjk3rn0m4jjcne306ga4he3mzmupfjl6"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/blog", "code_hash": "23ec075629c5a7e9d9f3ca7a81cb0bec208dca2ad103a12d367c60e39c2647d2", "address": "g1n2j0gdyv45aem9p0qsfk5d2gqjupv5z536na3d"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/faucet", "code_hash": "6d4feec1912d73f99d71d119aaef76afc2ab820a2776640d7cbe87b613eed62c", "address": "g1ttrq7mp4zy6dssnmgyyktnn4hcj3ys8xhju0n7"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/home", "code_hash": "49ca9906d0458b7b5d0f7edf920f8a23d83a8f259b7a40a8f799f77322e2af43", "address": "g1tw3zxg7fp84tahgy4pvdwjryah5ulc53v2uvda"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/pages", "code_hash": "5b2e5577f95144895bac92746089e211342489448eeb5c355ce5637716729857", "address": "g1glruyh3wmf5e6k89gd334qsftqx6wqxnpy7u2q"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/config", "code_hash": "3e05ad47e4f942212d76f11960ada5ab2714359c80a778f73dc4edda57237a56", "address": "g1wzudpvt0392w4twgfzw8ummrym320y7klk3c6y"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/home", "code_hash": "48fb1a084b86802aeecfe4ce1cde4b334873db2b18c4a9df74f1b99494aa7c40", "address": "g1cmpaw50gzurrt8k97qt4y7dxwat2ndzaxldnv6"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/present", "code_hash": "3747d2c59ce46df9f878357986b79cc58e0589a5d4e19e5c09ff4a96de951e68", "address": "g1un5dc7dpg2ksj07t6wymgpnp6c2lnqwlmng66d"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/names", "code_hash": "d9761edb76e333ca64d5b1f667511d6481ea0f4a60310d173447eae9c64c5f6c", "address": "g12fu84em88yh848uu2lheqfkdduwp6mn038te77"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/rewards", "code_hash": "7a47c8392f9322c785db293149ac478915e0e21a867ad86b4486c6acce5d525c", "address": "g1amw5gxw4yvpwttyfqeh3qg7j47rrehm7yaeqsq"} +2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/validators", "code_hash": "8b533bf030ee4201f70dd087b401d2b98a608fe118a8caf5a9094d07fa205c44", "address": "g1q64q49lsgdjsd9pdp537p6kz29mzlzr7dl6tv9"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "administrator", "address": "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "zo_oma", "address": "g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "manfred", "address": "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "piupiu", "address": "g1fj9jccm3zjnqspq7lp2g7lj4czyfq0s35600g9"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "anarcher", "address": "g1ds24jj9kqjcskd0gzu24r9e4n62ggye230zuv5"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "ideamour", "address": "g15gdm49ktawvkrl88jadqpucng37yxutucuwaef"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/albttx/me", "code_hash": "67774a3b8bc7e52edfaffb647364b638d5d48471efe65eae71314183720c2cbc", "address": "g14fsf05s955j7qlsg5u4za55hjw9vukzh9ja0u3"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/portal/counter", "code_hash": "950220eb1b3faf93419ff97b7a73e7091714023b7526016f2c6d3d4f5cc856b5", "address": "g1n46eg5dccgjmug2qhqa03jm7mkju7dtzuqxd8s"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/portal/counter", "code_hash": "950220eb1b3faf93419ff97b7a73e7091714023b7526016f2c6d3d4f5cc856b5", "address": "g1n46eg5dccgjmug2qhqa03jm7mkju7dtzuqxd8s"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "morgan.land/hello", "code_hash": "13555d5f0060de2cf1ef77ffd436e55b72b7e1422f86a4b0f23730ec4f3c3eb3", "address": "g146rmhhlqghz4g0nr7wx9wqgtzfsgg22l79d0kk"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "morgan.land/hello", "code_hash": "75e1e5dfbc942a5ad3983c52801a515089c3b0c3b768f6d1b1c616d643ea5a23", "address": "g146rmhhlqghz4g0nr7wx9wqgtzfsgg22l79d0kk"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/hello", "code_hash": "75e1e5dfbc942a5ad3983c52801a515089c3b0c3b768f6d1b1c616d643ea5a23", "address": "g1kqcar6amk63xwzpu27lsvaw42sly3ydf29zakt"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/morgan/variadic", "code_hash": "66a60d6167592082ec527c56be4a7922f3868d78f40134d9223722b0c9945955", "address": "g1wsvgfg2lq4xp59kpcm0ag94f0322xxq6kchmww"} +2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/morgan/variadic", "code_hash": "66a60d6167592082ec527c56be4a7922f3868d78f40134d9223722b0c9945955", "address": "g1wsvgfg2lq4xp59kpcm0ag94f0322xxq6kchmww"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.916+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.916+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} +2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/utf16", "code_hash": "c93df4516ce11fd65c66643d77fda5cec5ab33a5fad248e54229d3d531ac472e", "address": "g125gal32ygku8fpw3t6r6pfd0rzc8w8v7wavhe5"} +2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "3164d2a536964e5c1cc313816b1abf2dd767354b7adf62a266fcde31df5e15cd", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} +2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "3164d2a536964e5c1cc313816b1abf2dd767354b7adf62a266fcde31df5e15cd", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} +2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "373ac18c5af70813baab2055739b94a7295d9e48f6b143c09a1fe38cce0ba3c6", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} +2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/flags_index", "code_hash": "6c9ae3b28962a8af75a4356b56d632cfb8bc23563864747a323958c20970672e", "address": "g13k9hddlltfded6nhkhjaa7yvq5upccqg67rul0"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_interfaces", "code_hash": "04545660c8063a4d811d640d474a2f3653f432aa6577ee6390558107ad4a1cea", "address": "g19mvaqy9w306ra29sm46rs6g4897fexremrs4nh"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/social_feeds", "code_hash": "7a531dc2a8ec9b8f8a8e8bab6b661c4b772c5327511652df2fdf6bf6e81aa3e6", "address": "g18le5q4czm6xmdy3yascvqzjc4x8fe4scysuwsx"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/havl", "code_hash": "f0677a8ffc467b23ebab6550359bdb91e8f75f0f81d43c85ce2f9cdc31388d38", "address": "g17dyzn9v989twy2anauuzkn389fc9wmx4w36vy4"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/groups", "code_hash": "6dda42bfba38f6d2fb93b59a958cfbbdef806a97c936f6a6251f442970e99fce", "address": "g1c533rcawzmc5u7yhd9v3sn2mkzea978v7p20v3"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/markdown_utils", "code_hash": "b6ee8e35a9553176b81d6caf90d65eef4fdc112b1e1ca2f590980d687a378151", "address": "g1xnayydddtcryczp0afktg8htp0pdlv9e27swr7"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_core", "code_hash": "05bd0864a54ddba2e0d956488dc1bedaab95bcee165306c26806e61b9523f684", "address": "g12hzz044myz94sk949l4myjc5w0ke9sra2d6a5y"} +2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_utils", "code_hash": "de72e731af3072152d43bf7ef7613d327f14ce8d1bbc169e5530c44ea3ed65b9", "address": "g19rcs8467rmktwjkqd9r4nu5ptpyy20tzm2dhtt"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_proposal_single", "code_hash": "e9029fc0d670fbd490cf1999c7b2dd0c1cf34d1ec50e892937288412216877d4", "address": "g1yr9w8k02uyv80vfvdq8sn6ehyumn9dalmz8jy6"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_voting_group", "code_hash": "d44b3a3b346726ae600be39c34973cfe5c0a2b5116876ce9af2a31e241f071ad", "address": "g10ntq5apq4svlum89fr3m2kxhrc9ew595yw4y6x"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/dao_registry", "code_hash": "9b77d10c54c1fc29fe71737b9c02d6ca919d4ebd0c59f27e8d3c565f1bb40dad", "address": "g12gkss9j9jzxa84kpxpaewqxs5aatu338505sc7"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/social_feeds_dao", "code_hash": "e446f1b6a4b0d54df673bf44ea1e29540c7da0b74cb54412f54719de2e1d7d06", "address": "g17r2jq7r78cjfu54xnddg69gw0ky36yl9lv97c0"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "leon", "address": "g125em6arxsnj49vx35f0n0z34putv5ty3376fg5"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "leohhhn", "address": "g125em6arxsnj49vx35f0n0z34putv5ty3376fg5"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/postit/v1", "code_hash": "ce9375c8f3f62edea3f19291ff7bf462a5be09a973d401560cfe7f6f7ca147cc", "address": "g1y0axemz8tdqnz0c5mev05ysqk90l5e0lzw4c5v"} +2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/postit/v1", "code_hash": "ce9375c8f3f62edea3f19291ff7bf462a5be09a973d401560cfe7f6f7ca147cc", "address": "g1y0axemz8tdqnz0c5mev05ysqk90l5e0lzw4c5v"} +2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/staging/memeland/v1", "code_hash": "740386ff8ad07f4c26adb5aa2f90da9843492606dc6b2fc33f209fcfd1669984", "address": "g13jsxerdt777h0ttltpxkf26n2y8am5wxml9ef7"} +2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v1", "code_hash": "58d26f146612465dac406bccff2fe1f5b33ec55b8538c596e2405a0be96359fe", "address": "g1k54djlujz8vjs8tytxlna3750fftm8ussawt2e"} +2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v1", "code_hash": "d707228dca6a9d7e2af34a3557eff4f74a8b9f2da6062cca49e0597629b0035a", "address": "g1k54djlujz8vjs8tytxlna3750fftm8ussawt2e"} +2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "reggaesoul", "address": "g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d"} +2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "reggaesoul", "address": "g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d"} +2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/test21/b64", "code_hash": "dd45845560333a13c85e0c6e212d655067d349c3e7b13f2aae5646a72948c825", "address": "g1grg9ugcgplcuj9dvktl2nlldndk2ejyyuk8cjc"} +2024-04-15T19:21:22.926+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/test21/b64", "code_hash": "dd45845560333a13c85e0c6e212d655067d349c3e7b13f2aae5646a72948c825", "address": "g1grg9ugcgplcuj9dvktl2nlldndk2ejyyuk8cjc"} +2024-04-15T19:21:22.926+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/b64123ff", "code_hash": "3784af973145b0e0405d76b0fb6aaa3fd58d90175b95d12b50fc4920aa56c362", "address": "g1tql3emaksrsu5lll5782r63drkzjzwqu7qx4h5"} +2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} +2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/hellow", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g1dkny9lt6ygq5wlrplrdcvyuxt94v5vuu83kded"} +2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/hellow", "code_hash": "ffb2fd43bd7d40f376ba521e505b4373a3d7c907ab4d9200aaaed533dfc4ca29", "address": "g1dkny9lt6ygq5wlrplrdcvyuxt94v5vuu83kded"} +2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/totallyrandomtapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g1pvgfdwu6w7al0au2j8mfvh6ed63x08thafzjqs"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g1dr70egpsyhfwr98e0lnrhas9vaz7jry2nneevu"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/staging/memeland/v2", "code_hash": "2251fcc1b8e3c549872b4ef60a2e7bc58a3eda8f71801961970c7b007a8675c5", "address": "g1j959mcwxctfe2pfnxtfp5amc7apqu8qfuncq07"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "d39fae1a83bbd3b1f8a262b9c46990d763aa5c497572709dd77c9eeb6e590498", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "d5a9423152fc7e4fc9346f63864f44df24a7060f5b7933c34d09697e2d0aabd9", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "c921be660142cc9c8b5c091da6f4a9d8efed160612c045e6cd01afe21081b4f8", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "07dd368024bf88cd3812fe45ad41ea764d85475740c143b006a9aff21e5d3483", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/howtosimplelib", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g10qmu7nq28xvf203v4dfsr05avzl0ck0skf4yxd"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tapas", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g1dg7jmkytwh5qdp80l3addcy7c9lgazg8at94xx"} +2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/poll", "code_hash": "a609a199cb96d097913fe8e08c38bdc8ff1621735d6e07d0664d0888db3d09d6", "address": "g13ulaujf56pmsaddgvt4sv6da9p2zzs84wu8cmx"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/poll", "code_hash": "2aa8dc8a0980b5920d7131ae289f60d295bd200373b16bc3443ff069b41c86b3", "address": "g1z4snfqvfm6xkgvsdpa0kwy47yh8jd4zj7a99w9"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/poll", "code_hash": "73989ba9a151deb619694ed18ea4b2eb5c17c781f15a7c66d500ec751202121a", "address": "g1z4snfqvfm6xkgvsdpa0kwy47yh8jd4zj7a99w9"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "890d8019c5966da9173e3ce390214723362fe7cb0fcf5eb8e54c664ec354b04c", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "87323b50ed5d64fc52fb78e22b5804c4aac6954bcc3b86a37f3ebdb149ea4b7f", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "9d4f939affabb5669423748b4bace691263ff204eebfebc590a740d21c977117", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/mytoken", "code_hash": "b14e1e9d05f581564da92563be2ec0b27f9b12ea25885ac9d2d07ff1f6a86977", "address": "g18440ea83zlvn5wuwvgrwentlc3p3pltwgu75dp"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/decimaltest", "code_hash": "90df7e89faac9c333c3edb649d8d28a9bc1ce5cc84d00a71e4f85305a622b29b", "address": "g13hwucstqg4stc92mfm5svy3v8zzyc27902ud7c"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/decimaltest", "code_hash": "53ff74a394f7df0497fe8191e3503b5522867e6344c5ef2e29eea76749adfdab", "address": "g13hwucstqg4stc92mfm5svy3v8zzyc27902ud7c"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken1", "code_hash": "7552f0f428969b19a0585dea35f4825c28b81c78b4432f6d3c439de2e7b86bf9", "address": "g16mh033f37kqp3v8hmcc3ruwkhfmpcvqffmj0mv"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "a7af646b0e0b2c593ba512b26911ed1b4a3dcaa2e128b85e0c2e89a4efca911b", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "c1424a5e0d4d2bc0db3803765ba03e91b425d1fd4e8192fa2cd6d93a3d15f354", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "887025b0740f94f7a2d0d9c9a02248e78dc813f9462d27ada420258f63dcafa7", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} +2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "137d1416f1fa420fa7897b8a6d7c1bfef9eeb6def55c39775bbcedd87697d843", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} +2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/32/sdf", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g1qtctm2dysg9gvznggsq7s82ffuqzuqn8u9y0h3"} +2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter", "code_hash": "d886e78b3ad169018a90f27af8c947a5a350462462f6658bb436e6120c286ec3", "address": "g1xrje99427n0jrsg4ctzume87g2lrnd56uh7p8t"} +2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter1", "code_hash": "c188163feac650b1ef6d46d35b14ca88c973b467f400b4b3a7406b9c51c0a6a7", "address": "g1sm3805z7ynnsjrhu0xl95pv80jhmx0e7sm4fsn"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter1", "code_hash": "d21ed18455a523147969bd4e6890cb27ae98b48b3b8592fd568155554c807342", "address": "g1sm3805z7ynnsjrhu0xl95pv80jhmx0e7sm4fsn"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter2", "code_hash": "c708771f15af6aff59288bb2eb72e3295c169b750f00c2bfbcc7f9668e3538f6", "address": "g1mnt6ym3lurqt8drxwtwmks4w3n2v4u78jdjkxu"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter3", "code_hash": "d04135dca819c3d9c0562cc2d49239fcc6cfafcd2119067ad572090d81831217", "address": "g1cwwfh3z6ydxacy7x33sye0z6h9uj2ml5cp7w52"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/leongrc20", "code_hash": "6d54a39316ae1ed4b94b38589295d79f72a60b13bd31e8af8ce98596876039b1", "address": "g1ymt7ag96k70jy35l4qwx4k9g7ctsfvxkgzucy6"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "7dc7160377f4915c6cfe1e9aad43b4c2e1509ecd3e8575a22f915f18fae9643f", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "ba5b9a24e3654f83cbc32987ad1ee8fd8d5c2894742e98937331247b24176dab", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "36d3f2b6f9ae73ef9b60c987c5b3306513a3e0765839e81d7b5a687bbc036096", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "786ac035b6728b729462bf2e0b6c68a8d5e88f1062d31375968a57f00d3cb948", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "b57aced840eedbfa29ff92559420326929eec21b8007632cdca9019ed113bef7", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "4e27600854907af14e3839c4f7f528715eeb36d7a481b517a499780640d107a2", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltestv1", "code_hash": "ea6a8091b36a9bfb96bf36486e3df54a03030e2d33b54b9572b56101926fb6c0", "address": "g1k9cpnjwhrujkujpv50xm25s4fda0vqfmu0dct6"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "d85d06809e0004b4026f611ce0953cc23cbad524213602c836da5e393cc7c38c", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} +2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "6460db8070dc3cbd2722342f3f96cdce2b3e6fa8bb7157c7b9e32a28667a71db", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/testing/whitelist", "code_hash": "b707faa0350c818ac87188487e2919965e268b79a4dfbb7846b0d9edd85c6c77", "address": "g1gwctt57nkvxc5cnvy7ua2tnyds9h0yeyrhm5p4"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/test/test/whitelist", "code_hash": "a0719b73bf9da685103b1285114ea9b4615cd560e0d602eed1c28a20ff31b109", "address": "g1hnmnqdw98m3lcmeku96ufgtn7p0403z85ml2wj"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/test/whitelistfactory", "code_hash": "7019fa6a317bce6a18bddfb40e7fdb1bcff24be093221c65a041b5a5f3758466", "address": "g103fg5yjt0yz683avanvxeccr7u27zjzegw72k9"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/test1/whitelistfactory", "code_hash": "654a37cde68346472580d1ce99d7d10bc04c4ee29c0101cced6a63601bcbf31a", "address": "g17y7rdy5gacpnn7fvu33mmrph0qdhj5m0v7rpxv"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe/12345", "code_hash": "2a80e5a6d81bde0ca11ec4f2fe6647e343d20955a33afba1733ad7053aec87d2", "address": "g1spee4ffgxeesqnva4fwl4fe0z9pu7e50u6nara"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe/he11", "code_hash": "31a5c350cd5e2aed9d49597b445338ce440fc22cb10c7b5a64f934e010f53bd3", "address": "g10y8pyvm5sdmwwyjyjln090fss2cwhqj8wzmecr"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "2a9bbe25ef7ebed3e3568ffcf4e853a3aeaba8bfad7405185a45db98e0abac40", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "92ff0f90f8273eae80e33eb842bd78388b0bdac09c533e2621c1ba848796ebea", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "3b81370db2c97581ef4907837c7d3821782f927a255ae0d45595396afb5b6d69", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "6956d494c7ae9114b7b41e925db74b992d81c436107ab982f66826723e8642c8", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hhh123/hhh123", "code_hash": "bda74db4ef7790f2a41db341b8b2da41ac38915a89e19ae08a8c85f1f5f3f580", "address": "g1svch04vcesn7uzsfcjv33rnrg397u4r08g44xt"} +2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe321", "code_hash": "e0a97706be4a3d1da362e16391c1b88ebca006fbd86af807ebd5fbaa48c6f7e5", "address": "g1ja7v03w0e6mrpmmxgeaw00ep24qez948a4fkrk"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe3211", "code_hash": "141902bb75a212308389715ac4346d67a1316b23458552dcc9db7dd423820277", "address": "g1x2w5gx8073f25kapu2gmn6dl76dh5mvpezvzrd"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe3211", "code_hash": "70c35fe0ad1913ea3f9d479115cb8f288fd33a47e32acd1d4a8c8411db2be3bc", "address": "g1x2w5gx8073f25kapu2gmn6dl76dh5mvpezvzrd"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe3212/hehe3212", "code_hash": "66517395f5d431ae97a18b30c1bd69661d1b30cd981eb222231efe6849cf28be", "address": "g19mqfng6jexhx7sa896yklsyje5tycpmv60mq05"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe3212/hehe3212", "code_hash": "66517395f5d431ae97a18b30c1bd69661d1b30cd981eb222231efe6849cf28be", "address": "g19mqfng6jexhx7sa896yklsyje5tycpmv60mq05"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/counter", "code_hash": "e59d84133457dfd82b89d854e80639111030e62692e3fdc47a1fb2590ed020bc", "address": "g1uwxk0f5wnkvcmuzzqcd09yycgzke3zpty4wjlk"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/counter", "code_hash": "103418e43cb92f27844df22a0bb5faa6cddd1725ebe8e8a5be2d78488546fe90", "address": "g1uwxk0f5wnkvcmuzzqcd09yycgzke3zpty4wjlk"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/ecounter", "code_hash": "103418e43cb92f27844df22a0bb5faa6cddd1725ebe8e8a5be2d78488546fe90", "address": "g1sqjkdxk49krrc0yrrgt28787gmf6d0p46fvcf5"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1jhlerkvry40kumzrf2usnx87gnk4700fu98cpe"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/tasklist", "code_hash": "ee4fdc9c0dfc72f609ab3005627e7e799045e99a1ca3842c32d08283eb9c605a", "address": "g16g7tjh4hgqrgut755cq0u2tzxytvx9h7vh9vzp"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "6189706c38f61262de7262556580c27e23bbc844e8395071e57709bd632aa3f9", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "08e3373e2bcf2c32f83536382ebdbd2db8ec53e679ae73bc0d328ad495c61596", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} +2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "6189706c38f61262de7262556580c27e23bbc844e8395071e57709bd632aa3f9", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "33df370add55451ee8c3521b6f4e3891d9f71ad40406c2cc43f5a73fa17c49ba", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "33df370add55451ee8c3521b6f4e3891d9f71ad40406c2cc43f5a73fa17c49ba", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "f95e987d6ee97a2a0d55df6b544ca2ce6500447cddae9f7c56111abe3afece3c", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "f454d811a3eb711e32a17dae4cf3ca71600d0464be0c37e167d915d59d4f0c2b", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "12b245a7979972ecff10aa1217dcfaeb3e362abaa3cd5867d10d2b577347bf77", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1k3pwfjw2hzp4ve9c47wdtxdg0teus3hgrayl68"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1usg65wmkhrk85w8dkfzfvwhcqxp6hs3cvqwwfa"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1k3pwfjw2hzp4ve9c47wdtxdg0teus3hgrayl68"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_1", "code_hash": "d332e8f0f2ce467e2da5e4fa41735bf9ab5c1d10d0470dbd7efeb5a6ad01d0c8", "address": "g169lgp3s45c27x3jw095xnt2h9ct67vtgmmpkwp"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_1", "code_hash": "d332e8f0f2ce467e2da5e4fa41735bf9ab5c1d10d0470dbd7efeb5a6ad01d0c8", "address": "g169lgp3s45c27x3jw095xnt2h9ct67vtgmmpkwp"} +2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/hello/hello", "code_hash": "1266f85882dfe20e92b0bf6468ae530f6bde4475d05028915a75a7bc8a2ab749", "address": "g12sxnutrvr6y6j2u956txc9hf3h8cn08rmzzuh2"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/realm/realm", "code_hash": "e8f779b634efce3a9e3d02093bb20073892712702481e1c56c73f8ec616969f8", "address": "g1qyrnsj0sfdge32dawr6jvtuaattqhcd5z32trq"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/realm/hello", "code_hash": "e8f779b634efce3a9e3d02093bb20073892712702481e1c56c73f8ec616969f8", "address": "g1ttumsclal4a8vc8wfdx9hcmmqgp5cczy9errxv"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "ecc32bffa38e5bb50526ef312bf1c5d6ecde2f657b732f82b26640d415fc3741", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "ecc32bffa38e5bb50526ef312bf1c5d6ecde2f657b732f82b26640d415fc3741", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "a2cf06f37bc255251f47dc0d6dd26d2e96818c790cade3ff377aa04d5e669ad9", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "6768c2cde9c88be1a49daee177207cad47beed1890cb4e9b49879c44cb8b5f4d", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "599c72bde3e2d1db49324236e49a6772602b244d1b2c22d8c20f062eb39323cd", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} +2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "295c7ed34ba6f9a048cb79c47de9562006377819c423864ec5ce9ff65b1c2292", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} +2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "e65b4af6c6e194381bcb261c65251a4cb3e412d80317b51b331df39ce5aed968", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} +2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} +2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} +2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} +2024-04-15T19:21:22.941+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/hello", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g18mf9299cnuf0qeg5f9zvzw2gldg6q4ec2zv332"} +2024-04-15T19:21:24.943+0200 INFO richcmd/main.go:57 query {"lastHeight": 6275, "nextIndex": 1} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": ")k\ufffd\ufffdU\u001cV\ufffd\ufffdNԊP\u0008\ufffdC\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd@\ufffd\ufffd \ufffdT\ufffd\u001a\ufffd", "count": 3, "paths": ["gno.land/p/leon/tapas", "gno.land/r/leon/howtosimplelib", "gno.land/r/leon/tapas"]} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "\u00104\u0018\ufffd<\ufffd/'\ufffdM\ufffd*\u000b\ufffd\ufffd\ufffd\ufffd\ufffd\u0017%\ufffd\ufffd襾-xH\ufffdF\ufffd\ufffd", "count": 2, "paths": ["gno.land/r/leon/counter", "gno.land/r/leon/test/ecounter"]} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "\u0011\ufffd\ufffd\ufffd\ufffd.p\u0010\ufffd\ufffdSF\ufffd\ufffd\ufffdZ\u0003\ufffdhK2\ufffdK-\ufffd~\ufffd\ufffd\u000f\ufffd", "count": 2, "paths": ["gno.land/r/32/sdf", "gno.land/r/demo/hello"]} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "2\ufffd[F̞Έ\ufffde\ufffd\ufffdVB-\ufffdg\\\ufffd\u001a\ufffd\ufffd/z枽\ufffd\ufffd\u0002u ", "count": 2, "paths": ["gno.land/p/demo/malek/todolist", "gno.land/r/demo/malek/todolist"]} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "<\ufffdE\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0003q\ufffdc\u0013\ufffd\u0003\ufffdJ\ufffd\"\ufffd\ufffd\ufffd\ufffd\u0005\ufffd\u001cL\ufffd\u0012q\ufffd", "count": 2, "paths": ["gno.land/r/demo/totallyrandomtapas", "gno.land/r/demo/tapas"]} +2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "u\ufffd\ufffd߼\ufffd*ZӘ Date: Tue, 11 Jun 2024 02:45:40 +0200 Subject: [PATCH 05/34] tmp Signed-off-by: Norman Meier --- client/http.go | 8 +++ fetch/fetch.go | 37 ++++++++++--- fetch/types.go | 3 ++ go.mod | 31 +++++------ go.sum | 138 ++++++++++++++++++++++++++++++++++++------------- 5 files changed, 154 insertions(+), 63 deletions(-) diff --git a/client/http.go b/client/http.go index 959a13f7..6bf55dbb 100644 --- a/client/http.go +++ b/client/http.go @@ -67,3 +67,11 @@ func (c *Client) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResult return results, nil } + +func (c *Client) GetTx(hash []byte) (*core_types.ResultTx, error) { + tx, err := c.client.Tx(hash, false) + if err != nil { + return nil, fmt.Errorf("unable to get tx, %w", err) + } + return tx, nil +} diff --git a/fetch/fetch.go b/fetch/fetch.go index a8498413..8de833e6 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -14,6 +14,7 @@ import ( "github.com/gnolang/gno/gno.land/pkg/gnoland" "github.com/gnolang/gno/tm2/pkg/amino" bftTypes "github.com/gnolang/gno/tm2/pkg/bft/types" + "github.com/gnolang/gno/tm2/pkg/std" "github.com/gnolang/tx-indexer/storage" storageErrors "github.com/gnolang/tx-indexer/storage/errors" "github.com/gnolang/tx-indexer/types" @@ -236,21 +237,30 @@ func (f *Fetcher) maybeFetchGenesis() error { }, } - txResults := make([]*bftTypes.TxResult, len(bftTxs)) - for i, tx := range bftTxs { - r := iGenesisBlock.Response.TxResponses[i] - txResults[i] = &bftTypes.TxResult{ + results := make([]*bftTypes.TxResult, len(genesisState.Txs)) + for i, tx := range genesisState.Txs { + hash, err := getTxHash(tx) + if err != nil { + f.logger.Error("unable to get tx hash", zap.String("err", err.Error())) + continue + } + txwr, err := f.client.GetTx(hash) + if err != nil { + f.logger.Error("unable to get tx", zap.String("err", err.Error())) + continue + } + results[i] = &bftTypes.TxResult{ Height: 0, Index: uint32(i), - Tx: tx, - Response: r, + Tx: txwr.Tx, + Response: txwr.TxResult, } } slot := &slot{ chunk: &chunk{ blocks: []*bftTypes.Block{block}, - results: [][]*bftTypes.TxResult{txResults}, + results: [][]*bftTypes.TxResult{results}, }, chunkRange: chunkRange{ from: 0, // should be -1, but we're using 0 to avoid underflow @@ -265,6 +275,19 @@ func (f *Fetcher) maybeFetchGenesis() error { return nil } +// getTxHash returns the hex hash representation of +// the transaction (Amino encoded) +func getTxHash(tx std.Tx) ([]byte, error) { + encodedTx, err := amino.Marshal(tx) + if err != nil { + return nil, fmt.Errorf("unable to marshal transaction, %w", err) + } + + txHash := bftTypes.Tx(encodedTx).Hash() + + return txHash, nil +} + func (f *Fetcher) processSlot(slot *slot) error { wb := f.storage.WriteBatch() diff --git a/fetch/types.go b/fetch/types.go index 5f585105..224f3fca 100644 --- a/fetch/types.go +++ b/fetch/types.go @@ -24,6 +24,9 @@ type Client interface { // CreateBatch creates a new client batch CreateBatch() clientTypes.Batch + + // GetTx returns the transaction by its hash + GetTx(hash []byte) (*core_types.ResultTx, error) } // Events is the events API diff --git a/go.mod b/go.mod index ae617ef0..368d4898 100644 --- a/go.mod +++ b/go.mod @@ -22,11 +22,10 @@ require ( ) require ( - dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.1 // indirect @@ -35,19 +34,23 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgraph-io/badger/v3 v3.2103.4 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/glebarez/go-sqlite v1.21.2 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect + github.com/gnolang/goleveldb v0.0.9 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.2.0 // indirect + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/flatbuffers v1.12.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/jaekwon/testify v1.6.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -66,25 +69,17 @@ require ( github.com/rs/cors v1.10.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sosodev/duration v1.2.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/urfave/cli/v2 v2.27.1 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - go.opentelemetry.io/otel v1.25.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect - go.opentelemetry.io/otel/metric v1.25.0 // indirect - go.opentelemetry.io/otel/sdk v1.25.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect - go.opentelemetry.io/otel/trace v1.25.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + go.opencensus.io v0.22.5 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.19.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.5 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -103,5 +98,3 @@ require ( golang.org/x/crypto v0.21.0 google.golang.org/protobuf v1.33.0 // indirect ) - -replace github.com/gnolang/gno => /Users/norman/Code/gno diff --git a/go.sum b/go.sum index c33b1100..001d8521 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,11 @@ -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/99designs/gqlgen v0.17.45 h1:bH0AH67vIJo8JKNKPJP+pOPpQhZeuVRQLf53dKIpDik= github.com/99designs/gqlgen v0.17.45/go.mod h1:Bas0XQ+Jiu/Xm5E33jC8sES3G+iC2esHBMXcq0fUPs0= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -15,6 +17,7 @@ github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsVi github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= @@ -42,10 +45,12 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= @@ -60,6 +65,10 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +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/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= 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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -74,10 +83,23 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/dgraph-io/badger/v3 v3.2103.4 h1:WE1B07YNTTJTtG9xjBcSW2wn0RJLyiV99h959RKZqM4= +github.com/dgraph-io/badger/v3 v3.2103.4/go.mod h1:4MPiseMeDQ3FNCYwRbbcBOGJLf5jsE0PPFzRiKjtcdw= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +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/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +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/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -89,6 +111,10 @@ github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9g github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= +github.com/gnolang/gno v0.0.0-20231215125729-9262c1a8f949 h1:SSGQQALkDP3E0cMTuOw8/EH0HupmSl/TOTLt1BK8hFE= +github.com/gnolang/gno v0.0.0-20231215125729-9262c1a8f949/go.mod h1:qkXjIwBdGdIxxgP16m9jcYwNabj7luBNLGT42EaF2DY= +github.com/gnolang/goleveldb v0.0.9 h1:Q7rGko9oXMKtQA+Apeeed5a3sjba/mcDhzJGoTVLCKE= +github.com/gnolang/goleveldb v0.0.9/go.mod h1:Dz6p9bmpy/FBESTgduiThZt5mToVDipcHGzj/zUOo8E= github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 h1:GKvsK3oLWG9B1GL7WP/VqwM6C92j5tIvB844oggL9Lk= github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:xJhtEL7ahjM1WJipt89gel8tHzfIl/LyMY+lCYh38d8= github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= @@ -97,25 +123,33 @@ github.com/go-chi/httprate v0.9.0 h1:21A+4WDMDA5FyWcg7mNrhj63aNT8CGh+Z1alOE/piU8 github.com/go-chi/httprate v0.9.0/go.mod h1:6GOYBSwnpra4CQfAKXu8sQZg+nZ0M1g9QnyFvxrAB8A= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 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.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= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= +github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= 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.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -127,13 +161,13 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hasura/go-graphql-client v0.12.1 h1:tL+BCoyubkYYyaQ+tJz+oPe/pSxYwOJHwe5SSqqi6WI= github.com/hasura/go-graphql-client v0.12.1/go.mod h1:F4N4kR6vY8amio3gEu3tjSZr8GPOXJr3zj72DKixfLE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jaekwon/testify v1.6.1 h1:4AtAJcR9GzXN5W4DdY7ie74iCPiJV1JJUJL90t2ZUyw= github.com/jaekwon/testify v1.6.1/go.mod h1:Oun0RXIHI7osufabQ60i4Lqkj0GXLbqI1I7kgzBNm1U= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -148,10 +182,14 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT 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.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= @@ -162,8 +200,11 @@ github.com/linxGnu/grocksdb v1.8.5 h1:Okfk5B1h0ikCYdDM7Tc5yJUS8LTwAmMBq5IPWTmOLP github.com/linxGnu/grocksdb v1.8.5/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a h1:KxTVE11SAJzp+PnqaCw0Rzb/of6mQexpTIyZwM/JTJU= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a/go.mod h1:kWWMMyVnsC79rIkENl7FQUU2EQql12s8ETwjsDBiMtA= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +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= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -181,6 +222,7 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa 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/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/ff/v3 v3.4.0 h1:QBvM/rizZM1cB0p0lGMdmR7HxZeI/ZrBWB4DqLkMUBc= @@ -208,43 +250,45 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 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/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sosodev/duration v1.2.0 h1:pqK/FLSjsAADWY74SyWDCjOcd5l7H8GSnnOGEB9A1Us= github.com/sosodev/duration v1.2.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= +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/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= -go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= -go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= -go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 h1:hDKnobznDpcdTlNzO0S/owRB8tyVr1OoeZZhDoqY+Cs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0/go.mod h1:kUDQaUs1h8iTIHbQTk+iJRiUvSfJYMMKTtMCaiVu7B0= -go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= -go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= -go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= -go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= -go.opentelemetry.io/otel/sdk/metric v1.25.0 h1:7CiHOy08LbrxMAp4vWpbiPcklunUshVpAvGBrdDRlGw= -go.opentelemetry.io/otel/sdk/metric v1.25.0/go.mod h1:LzwoKptdbBBdYfvtGCzGwk6GWMA3aUzBOwtQpR6Nz7o= -go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= -go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -252,19 +296,28 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 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.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -273,15 +326,21 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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-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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.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-20180909124046-d0be0721c37e/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -289,6 +348,7 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -298,6 +358,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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/tools v0.0.0-20180917221912-90fa682c2a6e/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-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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -308,14 +371,12 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +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/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= @@ -325,12 +386,14 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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/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.4/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= @@ -340,6 +403,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8= gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= From f8202e0054e4d76b4ea54767317bb94618cbdb51 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 02:58:45 +0200 Subject: [PATCH 06/34] chore: revert merge artifacts Signed-off-by: Norman Meier --- storage/pebble.go | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/storage/pebble.go b/storage/pebble.go index e2b0ba51..3ae7fe83 100644 --- a/storage/pebble.go +++ b/storage/pebble.go @@ -259,44 +259,44 @@ type PebbleTxIter struct { } func (pi *PebbleTxIter) Next() bool { - if !pi.init { - if !pi.i.First() { + for { + if !pi.init { + if !pi.i.First() { + return false + } + + pi.init = true + } else if !pi.i.Next() { return false } - pi.init = true - } else if !pi.i.Next() { - return false - } + var buf []byte - var buf []byte - - key, _, err := decodeUnsafeStringAscending(pi.i.Key(), buf) - if err != nil { - pi.nextError = err + key, _, err := decodeUnsafeStringAscending(pi.i.Key(), buf) + if err != nil { + pi.nextError = err - return false - } + return false + } - key, _, err = decodeUint64Ascending(key) - if err != nil { - pi.nextError = err + key, _, err = decodeUint64Ascending(key) + if err != nil { + pi.nextError = err - return false - } + return false + } - _, txIdx, err := decodeUint32Ascending(key) - if err != nil { - pi.nextError = err + _, txIdx, err := decodeUint32Ascending(key) + if err != nil { + pi.nextError = err - return false - } + return false + } - if txIdx >= pi.fromIndex && txIdx < pi.toIndex { - return true + if txIdx >= pi.fromIndex && txIdx < pi.toIndex { + return true + } } - - return true } func (pi *PebbleTxIter) Error() error { From b930f5d2d1921afb1593bd433cb6ba31944f3baf Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 03:00:39 +0200 Subject: [PATCH 07/34] chore: cleanup Signed-off-by: Norman Meier --- go.mod | 16 +- go.sum | 32 ---- richcmd/db.go | 17 -- richcmd/duplicate_realms.sql | 3 - richcmd/main.go | 198 --------------------- richcmd/names.sql | 1 - richlog.txt | 236 -------------------------- serve/graph/generated.go | 178 +++++++++---------- serve/graph/model/models_gen.go | 53 +++++- serve/graph/model/transaction.go | 14 -- serve/graph/query.resolvers.go | 14 +- serve/graph/subscription.resolvers.go | 2 +- 12 files changed, 142 insertions(+), 622 deletions(-) delete mode 100644 richcmd/db.go delete mode 100644 richcmd/duplicate_realms.sql delete mode 100644 richcmd/main.go delete mode 100644 richcmd/names.sql delete mode 100644 richlog.txt diff --git a/go.mod b/go.mod index 5158b6a9..96f40e2b 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,10 @@ go 1.21 require ( github.com/99designs/gqlgen v0.17.48 github.com/cockroachdb/pebble v1.1.0 - github.com/glebarez/sqlite v1.11.0 github.com/gnolang/gno v0.1.0-nightly.20240604 github.com/go-chi/chi/v5 v5.0.12 github.com/go-chi/httprate v0.9.0 github.com/google/uuid v1.6.0 - github.com/hasura/go-graphql-client v0.12.1 github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a github.com/olahol/melody v1.2.1 github.com/peterbourgon/ff/v3 v3.4.0 @@ -19,9 +17,7 @@ require ( github.com/vektah/gqlparser/v2 v2.5.12 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.23.0 golang.org/x/sync v0.7.0 - gorm.io/gorm v1.25.9 ) require ( @@ -41,9 +37,7 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect - github.com/glebarez/go-sqlite v1.21.2 // indirect github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -52,13 +46,10 @@ require ( github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jinzhu/now v1.1.5 // indirect github.com/klauspost/compress v1.17.6 // 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/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -66,7 +57,6 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.10.1 // indirect github.com/rs/xid v1.5.0 // indirect @@ -83,6 +73,7 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect @@ -94,9 +85,4 @@ require ( google.golang.org/grpc v1.63.0 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.22.5 // indirect - modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.5.0 // indirect - modernc.org/sqlite v1.23.1 // indirect - nhooyr.io/websocket v1.8.10 // indirect ) diff --git a/go.sum b/go.sum index cfaaca9b..e61950bb 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -87,10 +85,6 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo= -github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= -github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= -github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= github.com/gnolang/gno v0.1.0-nightly.20240604 h1:1ennenQkBiXVbypporU1R1v3cWf1T6ol7Ava0rvIAKA= github.com/gnolang/gno v0.1.0-nightly.20240604/go.mod h1:R9GL0bPvjrcZlWBmmQ5wMssKpBdJK/e5mZdUbkk5sV0= github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 h1:GKvsK3oLWG9B1GL7WP/VqwM6C92j5tIvB844oggL9Lk= @@ -126,8 +120,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -137,15 +129,9 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hasura/go-graphql-client v0.12.1 h1:tL+BCoyubkYYyaQ+tJz+oPe/pSxYwOJHwe5SSqqi6WI= -github.com/hasura/go-graphql-client v0.12.1/go.mod h1:F4N4kR6vY8amio3gEu3tjSZr8GPOXJr3zj72DKixfLE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= -github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= 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= @@ -162,8 +148,6 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a h1:KxTVE11SAJzp+PnqaCw0Rzb/of6mQexpTIyZwM/JTJU= github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a/go.mod h1:kWWMMyVnsC79rIkENl7FQUU2EQql12s8ETwjsDBiMtA= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -200,9 +184,6 @@ github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqSc github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -294,7 +275,6 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= @@ -345,15 +325,3 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8= -gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= -modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= -modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= -nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= -nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= diff --git a/richcmd/db.go b/richcmd/db.go deleted file mode 100644 index 594f1391..00000000 --- a/richcmd/db.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -type Realm struct { - Address string `gorm:"index"` - PackagePath string `gorm:"primaryKey"` - CodeHash []byte `gorm:"index"` -} - -type User struct { - Address string `gorm:"primaryKey"` - Name string `gorm:"index"` -} - -var allModels = []interface{}{ - &Realm{}, - &User{}, -} diff --git a/richcmd/duplicate_realms.sql b/richcmd/duplicate_realms.sql deleted file mode 100644 index e5c2ddaa..00000000 --- a/richcmd/duplicate_realms.sql +++ /dev/null @@ -1,3 +0,0 @@ -WITH agg as ( - SELECT code_hash, group_concat(package_path) AS paths, COUNT(1) AS count FROM realms GROUP BY code_hash ORDER BY count DESC -) SELECT * FROM agg WHERE count > 1; \ No newline at end of file diff --git a/richcmd/main.go b/richcmd/main.go deleted file mode 100644 index 34d4fbb7..00000000 --- a/richcmd/main.go +++ /dev/null @@ -1,198 +0,0 @@ -package main - -import ( - "context" - "database/sql" - "encoding/hex" - "slices" - "strings" - "time" - - _ "embed" - - "github.com/glebarez/sqlite" - _ "github.com/gnolang/gno/gno.land/pkg/gnoland" - "github.com/gnolang/gno/gno.land/pkg/sdk/vm" - "github.com/gnolang/gno/gnovm/pkg/gnolang" - "github.com/gnolang/gno/tm2/pkg/amino" - _ "github.com/gnolang/gno/tm2/pkg/bft/types" - "github.com/gnolang/gno/tm2/pkg/std" - tm2 "github.com/gnolang/gno/tm2/pkg/std" - "github.com/hasura/go-graphql-client" - "github.com/pkg/errors" - "go.uber.org/zap" - "golang.org/x/crypto/sha3" - "gorm.io/gorm" -) - -//go:embed duplicate_realms.sql -var duplicateRealmsSQL string - -//go:embed names.sql -var namesSQL string - -func main() { - logger, err := zap.NewDevelopment() - if err != nil { - panic(errors.Wrap(err, "failed to create logger")) - } - - db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{}) - if err != nil { - panic(errors.Wrap(err, "failed to open db")) - } - if err := db.AutoMigrate(allModels...); err != nil { - panic(errors.Wrap(err, "failed to sync db schema")) - } - - client := graphql.NewClient("http://localhost:8546/graphql/query", nil) - - lastHeight := int64(0) - lastIndex := int64(-1) - limit := 10000 - - for newTxs := true; newTxs; { - nextIndex := lastIndex + 1 - - logger.Info("query", zap.Int64("lastHeight", lastHeight), zap.Int64("nextIndex", nextIndex)) - - var txQuery struct { - Transactions []struct { - BlockHeight int64 `graphql:"block_height"` - Index int64 - Code int - ContentRaw string `graphql:"content_raw"` - } `graphql:"transactions(filter: { from_block_height: $fromHeight, from_index: $fromIndex, limit: $limit })"` - } - - // FIXME: need to filter txs that succeeded - if err := client.Query(context.TODO(), &txQuery, map[string]any{ - "fromHeight": lastHeight, - "fromIndex": nextIndex, - "limit": limit, - }); err != nil { - panic(errors.Wrap(err, "failed to query")) - } - - for _, tx := range txQuery.Transactions { - if tx.Code != 0 { - logger.Debug("ignored tx", zap.Int64("height", tx.BlockHeight), zap.Int64("index", tx.Index)) - continue - } - - txBytes, err := hex.DecodeString(tx.ContentRaw[3 : len(tx.ContentRaw)-1]) - if err != nil { - panic(errors.Wrap(err, "failed to decode tx")) - } - var tm2Tx tm2.Tx - if err := amino.Unmarshal(txBytes, &tm2Tx); err != nil { - panic(errors.Wrap(err, "failed to unmarshal tx")) - } - for _, msg := range tm2Tx.GetMsgs() { - switch msg.Route() { - case "vm": - switch msg.Type() { - case "exec": - msg := msg.(vm.MsgCall) - // logger.Debug("vm.exec", zap.String("type", msg.Type()), zap.String("realm", msg.PkgPath)) - switch msg.PkgPath { - case "gno.land/r/demo/users": - switch msg.Func { - case "Register": - name := msg.Args[1] - addr := msg.Caller.String() - if err := db.Save(&User{Name: name, Address: addr}).Error; err != nil { - panic(errors.Wrap(err, "failed to save user")) - } - logger.Debug("maybe registered user", zap.String("name", name), zap.String("address", addr)) - default: - // logger.Debug("vm.exec", zap.String("type", msg.Type()), zap.String("realm", msg.PkgPath), zap.String("func", msg.Func), zap.Any("args", msg.Args)) - } - } - continue - case "add_package": - msg := msg.(vm.MsgAddPackage) - addr := gnolang.DerivePkgAddr(msg.Package.Path) - codeHash, err := hashCode(msg.Package.Files) - if err != nil { - panic(errors.Wrap(err, "failed to hash code")) - } - realm := &Realm{ - Address: addr.String(), - PackagePath: msg.Package.Path, - CodeHash: codeHash, - } - if err := db.Save(realm).Error; err != nil { - panic(errors.Wrap(err, "failed to save realm")) - } - logger.Debug("maybe instantiated realm", zap.String("package", msg.Package.Path), zap.String("code_hash", hex.EncodeToString(codeHash)), zap.String("address", addr.String())) - // logger.Debug("indexed message", zap.String("fqtype", "vm.add_package"), zap.Any("realm", realm)) - continue - case "run": - // msg := msg.(vm.MsgRun) - // logger.Debug("vm.run", zap.String("type", msg.Type()), zap.String("pkg", msg.Package.Path)) - continue - } - case "bank": - switch msg.Type() { - case "send": - // msg := msg.(bank.MsgSend) - // logger.Debug("bank.send", zap.String("type", msg.Type()), zap.String("from", msg.FromAddress.String()), zap.String("to", msg.ToAddress.String()), zap.Any("amount", msg.Amount)) - continue - } - } - logger.Debug("unknown", zap.String("route", msg.Route()), zap.String("type", msg.Type()), zap.Any("msg", msg)) - } - - lastHeight = tx.BlockHeight - lastIndex = int64(tx.Index) - } - - if len(txQuery.Transactions) <= 0 { - newTxs = false - } else { - time.Sleep(2 * time.Second) // would be better to use a sub - } - } - - var results []queryResult - if err := db.Raw(duplicateRealmsSQL).Scan(&results).Error; err != nil { - panic(errors.Wrap(err, "failed to query")) - } - for _, result := range results { - paths := strings.Split(result.Paths, ",") - logger.Debug("maybe found duplicate code", zap.String("code_hash", result.CodeHash), zap.Int("count", result.Count), zap.Any("paths", paths)) - } - - var users []User - if err := db.Raw(namesSQL, sql.Named("search", "u")).Scan(&users).Error; err != nil { - panic(errors.Wrap(err, "failed to query")) - } - for _, user := range users { - logger.Debug("maybe found user with u", zap.String("name", user.Name), zap.String("address", user.Address)) - } -} - -type queryResult struct { - CodeHash string - Count int - Paths string -} - -func hashCode(pkgFiles []*tm2.MemFile) ([]byte, error) { - files := make([]*tm2.MemFile, len(pkgFiles)) - copy(files, pkgFiles) - slices.SortFunc(files, func(i, j *std.MemFile) int { - return strings.Compare(i.Name, j.Name) - }) - hasher := sha3.New256() - for _, file := range files { - if _, err := hasher.Write([]byte(file.Name)); err != nil { - return nil, errors.Wrap(err, "failed to hash file name") - } - if _, err := hasher.Write([]byte(file.Body)); err != nil { - return nil, errors.Wrap(err, "failed to hash file body") - } - } - return hasher.Sum(nil), nil -} diff --git a/richcmd/names.sql b/richcmd/names.sql deleted file mode 100644 index 2328cb72..00000000 --- a/richcmd/names.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT * FROM users WHERE name LIKE '%' || @search || '%' \ No newline at end of file diff --git a/richlog.txt b/richlog.txt deleted file mode 100644 index 10048417..00000000 --- a/richlog.txt +++ /dev/null @@ -1,236 +0,0 @@ -2024-04-15T19:21:22.547+0200 INFO richcmd/main.go:57 query {"lastHeight": 0, "nextIndex": 0} -2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/avl", "code_hash": "4e8737dd4a1e01d2d3bcf64d4b23502af2ea5ece71ce20ac7d1dcdd04e16520d", "address": "g1hldhdj0hjydv0tplsz65cch3eanncskls4unx3"} -2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/testutils", "code_hash": "4914ef883165457ac0feea056a95eced45ec3697d07b51c4cf2e131b7af37065", "address": "g1ssrgtfce6pzs8tp7s6y8473yrffqs9xlgntk0h"} -2024-04-15T19:21:22.903+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/acl", "code_hash": "ff6832a05e0020154544172a20ff2e80d7296b50e29adda7e716855b8fbf8cf1", "address": "g1nrzg5q7vstjt4r2ls28s6wgeljucwecp4un9zc"} -2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/bank", "code_hash": "4a4616aa282c2532fa4c9f2cce7624082049c72c831ceac5237efabf3796c23b", "address": "g1ks2t3lk6qd6dmptlr6xfyyql2utfaruhd20j7c"} -2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/bf", "code_hash": "992a88e11da14caacc864cd931f85d9723784ffade22321cc44a4a07acf93f5c", "address": "g1k38srsk69usfavh2rnx72yqpdh7wnf045eehgw"} -2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/mux", "code_hash": "e74457fbee999ef43b824e3b85d54087920620664be477488a15f317dd595ef9", "address": "g1yvjqlsvaqp2wkvqnrk9yl3u4maysevzgq3qhzn"} -2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ufmt", "code_hash": "851654972d4847e218c1a11745ec901ffbaa7c0cf5da27eefcd56c2cca87fada", "address": "g1x5wkpp74awt76tzm5d4feen7hlxu47gjh3nhef"} -2024-04-15T19:21:22.904+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/blog", "code_hash": "ca059bdf19cd0afaabb73c5613626ba06667ce60a9dd579861de176b3d8cf29b", "address": "g19ey3gpjgt22lhe424auvfgv2sxcqluqd0vfsss"} -2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/cford32", "code_hash": "bbf82eaa9cc6b0fd65bda890692f3b15438eb0c2aa4d19124543d3c307691612", "address": "g13wr2aansqqg2q4ud78qnn5447jzua9sdsg5296"} -2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/dom", "code_hash": "ecc425d6e6423efcb56ecee7019493ab6b312b69e5d0fd227599acc4d448b3e6", "address": "g10ft70wut3dxe34au67weu4g0l3nlh5sd5whqq4"} -2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/flow", "code_hash": "4a0f20a8834eb4b9172e1b8579878dce8cf3ddd0923ba50218c53f9d9295c9ba", "address": "g19ym6hawzlu85wgn2eqjnwc6u6rp7nauh24an5v"} -2024-04-15T19:21:22.905+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/gnode", "code_hash": "e3cdb7fef543a2929c2488d77b06fe7e93945e4de43364edf3857fc38c47ad4b", "address": "g139tm6xgpyxzujkqla9g08n7tksk9tecak3tgyy"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/exts", "code_hash": "f822df3c21a083a7070e59446f5280aff25faecfdb71f20e8da00b8751be697f", "address": "g1vlvqg4vdcy08w6h4xpkj2hynkyccak7afs952m"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc20", "code_hash": "eefef16a1337507665a3cd65b266f6088875169f00d5cf8d03d543459300bd7c", "address": "g1zz9npml7mtyhh94w8scyrpgk7upex5ymk0h3lg"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/exts/vault", "code_hash": "7b5b84a640d73e2da385f890150d2b036f645fe1e26dedd1f878b6b4937b034d", "address": "g1uqzpddrg7n9yrzwg8wgha8vz9frv74tk27fhfz"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/users", "code_hash": "ac58be9cc2d3979f50298384077fed26aabc189db63e6f05d1047bc030771c9f", "address": "g1rdpadmmz5hqmpecrmxvxqqj8knrfhlxvnhgzxp"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc1155", "code_hash": "471aae516963572389d3a11fe32870556870b24794da3db28cc649dc4790d5be", "address": "g1sqxucdn5tjk0700r5p2fshc2ft27pqfer5lz2d"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc721", "code_hash": "3a691989f73ea30a1a4cd9c9acb073f12576d01d36f7798790165a07cc2aab45", "address": "g1y4vnhs93wcple5uz8h9z2y9pf3uulpr8939xr2"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/grc/grc777", "code_hash": "d6c3a6ec2296606b78f2a0a3eb0235b4e622455040e8f024396a082ce1e6d22f", "address": "g1u5epl67daj67y6u243n2xkxmh0k84azl0gq4ge"} -2024-04-15T19:21:22.906+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/maths", "code_hash": "561edcbd1987289b8643ef51eafd47396f17f01d84366a983bd95801bc8d223b", "address": "g1yxaff6ljvre44ksdwz59xqlkexgw69llwjdpe0"} -2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/users", "code_hash": "fda5f578459862e595925b09f5ed43bb77af80b3e22056671440eb00499b0bb2", "address": "g17m4ga9t9dxn8uf06p3cahdavzfexe33ecg8v2s"} -2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/boards", "code_hash": "e5674f65ca51514a40c9fa9b632b6513c6458033e27aa4a13b42566d356db8c7", "address": "g1ek4j3le4d9h3rsq6u5vkgvtqczfvellgfpz6ld"} -2024-04-15T19:21:22.907+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/groups", "code_hash": "b43b244091b06fa12a296ad69facb73aef5c7c6d65ce4716ffc817d2ed3565e0", "address": "g17kys3ku4gcl8n2z8v5gj0daqpdkd2u55zqjxxl"} -2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/uint256", "code_hash": "dd2c0f24b20f68d513eb4f208163dcfd21170ff111442dab741accfbafac6e64", "address": "g1uurmwrtyp8d0zfguq5ezvw0swxyhj4zfdf6l8z"} -2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/int256", "code_hash": "a01314142dd654f77a25d458e37ed82fe45ff3cc7e1c1d1fa714a3232a89ac8b", "address": "g1kkwttd3mts7ac9kx2uf6lfzp66enzlesjelgdc"} -2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json/eisel_lemire", "code_hash": "443debafdbfb509279c375c796f936d8b52d24f4ddc3b4dceb15d64da8279d61", "address": "g1rn4a2vgvkw50m92j20vtvzwr3a0n40v4pkyc30"} -2024-04-15T19:21:22.908+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json/ryu", "code_hash": "66fba1b9cfb220b935270229df9972d9e0018a682ca420903d4ca9e58df853ee", "address": "g187a37m4a8jvm497ry8u6tr2l8my5whhxhdewy9"} -2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/json", "code_hash": "0e788b01bc62802fbf63f3eb7356aa6d5c36ff5ace21c62b517bad382a6d906f", "address": "g1yk5ztajskjswpuurlfefc4lqfkda47cz7g2mt6"} -2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/math_eval/int32", "code_hash": "94634d2f27e0a6f3a6c7b29f8506b16e5232a178fada32aa9e9dcfd686e2e1ca", "address": "g1ppk342vyy25axugd47s6w375cvv2hm7rcqscp0"} -2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ownable", "code_hash": "d752a89cc981eb95b42969b204c5dabe97eb7e69ab79ba0ed8866291060efde4", "address": "g1gufzdwlq94f79wd842qg5ksr8w8xntf8xep3uu"} -2024-04-15T19:21:22.909+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/seqid", "code_hash": "afcfaa10c9dbbbc6dcd45c9275b65e93f9f628502d4ff4741052bda1a1e8b73a", "address": "g195tjzkh5nw93hj3m75tqtnzmfu2rak2mwkzpx4"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/memeland", "code_hash": "abcd1603b09fe6b1c4b65fab864c6e67b5dacce93352eea39b0d428af695daf9", "address": "g15ymwcq9a0uqzrt3pqwpv6uu6fxsjv5s96vxpnf"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/merkle", "code_hash": "47ca605e767c1777a0b6c0ddadba527aaaa3817d3ad8e20aca5403982aff8033", "address": "g1hd5m95ep5mwkdlenrjajmjkz99dgh7tf874v8a"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/microblog", "code_hash": "fc773e5bbb7efb2ffb7f920ba0466fbe74894824eba40d61fd5c4047bd117536", "address": "g1wgehsq6zn8x78el7feel88pv4lsmwdvn8vk5kh"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/pausable", "code_hash": "c79558f0ca860900e8883bf14180fce81f32d30b71d616cd1f452ec1511e0d0c", "address": "g1cc37pe53v07pyc6fcevtm5an6d8vazcrex0fuh"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/releases", "code_hash": "d91756d9a2bb226a4b4fba0b758ddf83d5eaa61466407d9d86aedf4b3ad7acea", "address": "g18ne0hnct2exsd2990ytxwukzxmm2h8vpygw4c6"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/stack", "code_hash": "8125f1886a1816d155fb6e20c36283f9cb29b9ad3b2976979c3d7f3a92cbd81f", "address": "g187de8z6wlhhhku5cvj0umyslvwnkdd4avxv5xx"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/svg", "code_hash": "da0088c89055877c85558e6ed7b3147b69b8068de0a8e6edf4c54c7ecff5a941", "address": "g1z3fj364f8f5rg2e6zemd9r3rl6jhp454gfkfjd"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tamagotchi", "code_hash": "a6275d66cdc9e496a8408ea8a490c687ee676bf2d89944f4695aa46d4a766d20", "address": "g198qg3ktjp40ykj2l3nekmdsg84alquke7rgndh"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tests/subtests", "code_hash": "e296ffb859badd366d39560a40918d073ac3194b6654d4dccd1af749533e464a", "address": "g1lth85t2v9w3wt2se92gmeu46nnnrapf2yzkvnc"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests/subtests", "code_hash": "fb6cce0fecc4777c1d8c6389486d09c01921161807451efbff5e6ffd761a36fc", "address": "g13g48xnr7lzxsrvny0uf6lhx0cfaxy4n0n5geuf"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests", "code_hash": "bdec79c213f59bb149625959c0bbca5a8e7f4608b6efac8bc4e487f02fd1a182", "address": "g1gz4ycmx0s6ln2wdrsh4e00l9fsel2wskqa3snq"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/tests", "code_hash": "0fa4e02455a2aa719b7d2e6350ccb767da19a1e61718d33f34689a5599820c0b", "address": "g1lc7c8nv62nqyyhhxe88tpxx786gwq68prx3f6e"} -2024-04-15T19:21:22.910+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/todolist", "code_hash": "80fe7e7a02199d558965aaf5faca1483f3c343266bf8ad2dc1de188f6c06c7e0", "address": "g1kppqvr5krndv2xsj9fe2e0hnm64csy6c720jst"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/ui", "code_hash": "c85c0be4c462130af9366dcc1092f34aabf9d4f5686a9330479c82feae9981d6", "address": "g1xhy55q7aw3vp5mmdv2x7nxutyl06hd5epgyff3"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/art/millipede", "code_hash": "0d6ad6019a95a26d80f2110d21b7f0a1cb99e9db8dc4b4894787e346ca3e291e", "address": "g1uxtlve2qdevfrc3vqhud3y5sysvfnajn3nygzk"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/banktest", "code_hash": "402ccb65f981b37a1dc8c5ba12de2ecb669dfd00324097eb6572bc4ffba95ba7", "address": "g1dv3435088tlrgggf745kaud0ptrkc9v42k8llz"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/deep/very/deep", "code_hash": "530e12e3dbc509dffd324953a710b1cef4ff4abd0aa711d02726ebff47f76f8d", "address": "g1lg3s0dueulh4d787ztfqcrkrhct39lkkzclfuf"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/echo", "code_hash": "8e04a734c411cbe0cf8bbcbcf78878e8065c415ed002677315aab3691f8afa94", "address": "g1uygynp4uvt4qykpvxte7h0lqu23gpfk8vhuyqy"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo1155", "code_hash": "734e27eb1d3cf199baa4074964c86119c21a65173f734dc059c7b474f1fde6cb", "address": "g1c5ale6a5g6q2298t6245qp9kp60450j2u0lare"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo20", "code_hash": "80fc891c06eacc456d61b2961236f770e63dac114f3bdd07053dd548730a725b", "address": "g1uy45fxt6keu49v4t00z7f6yzmxujkhsugg8zct"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/foo721", "code_hash": "53ed0a3c97c2ac1276da46c908a1367b95a18aa34ddd6f9c8d4457cddeb1099a", "address": "g13j6sturdn3a989vx2uh5s0vc0s72v7nt6gkhy4"} -2024-04-15T19:21:22.911+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/groups", "code_hash": "91bf526cf136d34c2f29e03102fdb9b7382ead4a5a8f706fb7acda642c029664", "address": "g1r0mlnkc05z0fv49km99z60qnp95tengyqfdr02"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/keystore", "code_hash": "f935530a3b54db10b2c405cf6192670e136b86cb23471a477a7bd7c0d3929b08", "address": "g1z66mk3xp00mu995eqhcz0d7yg6xzreltwt58sz"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/markdown_test", "code_hash": "a0b9f001646ec67a987512ece95b00046fdb3d6a052d0a0e7571dbf53fff425d", "address": "g1sh3ax3544zn5r0yk2rvh04lk2nkpq3waxmh5ut"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/math_eval", "code_hash": "566ab85c24dd480c2b5bb447c869da316c7288b7df6ebaadc178b8607d08986d", "address": "g1vqraszu73qqlpevvyzpw7ae6m6azpc220ltgwv"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/memeland", "code_hash": "d39fae1a83bbd3b1f8a262b9c46990d763aa5c497572709dd77c9eeb6e590498", "address": "g1qseh326qz9znq2nugljn33esnf68t5pt94fhat"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/microblog", "code_hash": "72d1324ae4b436fb7d1e29df0d928c98cf5af7be07429ef0a38471d1a625e888", "address": "g14uaqre50rg7ddwp8lhmjkkz7fvxgamkpxuhuxz"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/nft", "code_hash": "4669a3d93914b75be2bd117137a7e3d6d1bf83bfbf04149b739a0d7b5259bce0", "address": "g1k3zrrmsczuche5d4h3aswzy5z5sw4zmqtf3mhm"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/releases_example", "code_hash": "3302a79a1d00c7cbad4292523872a6007f029fb351c8fde3dd4189e36bc75007", "address": "g1dwraf3yxp8pd438k5yz3cy4uyuhjnc49hffwgj"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tamagotchi", "code_hash": "44869bdf02249f6eff84df2724192e9bcb4e682be96af36a345f5422a7dcd988", "address": "g1a3tu874agjlkrpzt9x90xv3uzncapcn959yte4"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tests_foo", "code_hash": "9fb8dc8ded2f841e09bd38834c567e1a46ed788f03cf362e326ec136d0e400c6", "address": "g12yc8000f7g3wncpzun0jdh0sn30esx2t9ky8hp"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/todolist", "code_hash": "903f7d9eaabbd8d9ab440b4096225aac3bc51da2368bb09c2248a00a4c8901ae", "address": "g14wt3l376qj202qr7nuxypsdm8snl5ew37jt9xa"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/types", "code_hash": "71fe4e34fad9955ac70790b1f5af149069f30aed419d8202c2515a8700d5fa8a", "address": "g15s087x8zvqzsg66cr6qfpjk0kxtahsq64f5led"} -2024-04-15T19:21:22.912+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/ui", "code_hash": "dfe6d5c5b6e4881c1ed1cc72ac063e5ca0b36e814b427172e5a134f3a415f3c1", "address": "g19jngzxfm0d7hag89fma4unvltzpl2lyj9x5af2"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/wugnot", "code_hash": "916a03e5cb7adc2bec97703fdca7b19b7654df33cc74a180c4fb9796691ca74e", "address": "g1pf6dv9fjk3rn0m4jjcne306ga4he3mzmupfjl6"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/blog", "code_hash": "23ec075629c5a7e9d9f3ca7a81cb0bec208dca2ad103a12d367c60e39c2647d2", "address": "g1n2j0gdyv45aem9p0qsfk5d2gqjupv5z536na3d"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/faucet", "code_hash": "6d4feec1912d73f99d71d119aaef76afc2ab820a2776640d7cbe87b613eed62c", "address": "g1ttrq7mp4zy6dssnmgyyktnn4hcj3ys8xhju0n7"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/home", "code_hash": "49ca9906d0458b7b5d0f7edf920f8a23d83a8f259b7a40a8f799f77322e2af43", "address": "g1tw3zxg7fp84tahgy4pvdwjryah5ulc53v2uvda"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/gnoland/pages", "code_hash": "5b2e5577f95144895bac92746089e211342489448eeb5c355ce5637716729857", "address": "g1glruyh3wmf5e6k89gd334qsftqx6wqxnpy7u2q"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/config", "code_hash": "3e05ad47e4f942212d76f11960ada5ab2714359c80a778f73dc4edda57237a56", "address": "g1wzudpvt0392w4twgfzw8ummrym320y7klk3c6y"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/home", "code_hash": "48fb1a084b86802aeecfe4ce1cde4b334873db2b18c4a9df74f1b99494aa7c40", "address": "g1cmpaw50gzurrt8k97qt4y7dxwat2ndzaxldnv6"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/manfred/present", "code_hash": "3747d2c59ce46df9f878357986b79cc58e0589a5d4e19e5c09ff4a96de951e68", "address": "g1un5dc7dpg2ksj07t6wymgpnp6c2lnqwlmng66d"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/names", "code_hash": "d9761edb76e333ca64d5b1f667511d6481ea0f4a60310d173447eae9c64c5f6c", "address": "g12fu84em88yh848uu2lheqfkdduwp6mn038te77"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/rewards", "code_hash": "7a47c8392f9322c785db293149ac478915e0e21a867ad86b4486c6acce5d525c", "address": "g1amw5gxw4yvpwttyfqeh3qg7j47rrehm7yaeqsq"} -2024-04-15T19:21:22.913+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/system/validators", "code_hash": "8b533bf030ee4201f70dd087b401d2b98a608fe118a8caf5a9094d07fa205c44", "address": "g1q64q49lsgdjsd9pdp537p6kz29mzlzr7dl6tv9"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "administrator", "address": "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "zo_oma", "address": "g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "manfred", "address": "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "piupiu", "address": "g1fj9jccm3zjnqspq7lp2g7lj4czyfq0s35600g9"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "anarcher", "address": "g1ds24jj9kqjcskd0gzu24r9e4n62ggye230zuv5"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "ideamour", "address": "g15gdm49ktawvkrl88jadqpucng37yxutucuwaef"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/albttx/me", "code_hash": "67774a3b8bc7e52edfaffb647364b638d5d48471efe65eae71314183720c2cbc", "address": "g14fsf05s955j7qlsg5u4za55hjw9vukzh9ja0u3"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/portal/counter", "code_hash": "950220eb1b3faf93419ff97b7a73e7091714023b7526016f2c6d3d4f5cc856b5", "address": "g1n46eg5dccgjmug2qhqa03jm7mkju7dtzuqxd8s"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/portal/counter", "code_hash": "950220eb1b3faf93419ff97b7a73e7091714023b7526016f2c6d3d4f5cc856b5", "address": "g1n46eg5dccgjmug2qhqa03jm7mkju7dtzuqxd8s"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "morgan.land/hello", "code_hash": "13555d5f0060de2cf1ef77ffd436e55b72b7e1422f86a4b0f23730ec4f3c3eb3", "address": "g146rmhhlqghz4g0nr7wx9wqgtzfsgg22l79d0kk"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "morgan.land/hello", "code_hash": "75e1e5dfbc942a5ad3983c52801a515089c3b0c3b768f6d1b1c616d643ea5a23", "address": "g146rmhhlqghz4g0nr7wx9wqgtzfsgg22l79d0kk"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/hello", "code_hash": "75e1e5dfbc942a5ad3983c52801a515089c3b0c3b768f6d1b1c616d643ea5a23", "address": "g1kqcar6amk63xwzpu27lsvaw42sly3ydf29zakt"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/morgan/variadic", "code_hash": "66a60d6167592082ec527c56be4a7922f3868d78f40134d9223722b0c9945955", "address": "g1wsvgfg2lq4xp59kpcm0ag94f0322xxq6kchmww"} -2024-04-15T19:21:22.914+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/morgan/variadic", "code_hash": "66a60d6167592082ec527c56be4a7922f3868d78f40134d9223722b0c9945955", "address": "g1wsvgfg2lq4xp59kpcm0ag94f0322xxq6kchmww"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.915+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.916+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.916+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "test_1", "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"} -2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/utf16", "code_hash": "c93df4516ce11fd65c66643d77fda5cec5ab33a5fad248e54229d3d531ac472e", "address": "g125gal32ygku8fpw3t6r6pfd0rzc8w8v7wavhe5"} -2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "3164d2a536964e5c1cc313816b1abf2dd767354b7adf62a266fcde31df5e15cd", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} -2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "3164d2a536964e5c1cc313816b1abf2dd767354b7adf62a266fcde31df5e15cd", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} -2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/ujson", "code_hash": "373ac18c5af70813baab2055739b94a7295d9e48f6b143c09a1fe38cce0ba3c6", "address": "g1uddnpp7xe69vkvqzzj8eq7huyjvftcx6dh3ze8"} -2024-04-15T19:21:22.920+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/flags_index", "code_hash": "6c9ae3b28962a8af75a4356b56d632cfb8bc23563864747a323958c20970672e", "address": "g13k9hddlltfded6nhkhjaa7yvq5upccqg67rul0"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_interfaces", "code_hash": "04545660c8063a4d811d640d474a2f3653f432aa6577ee6390558107ad4a1cea", "address": "g19mvaqy9w306ra29sm46rs6g4897fexremrs4nh"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/social_feeds", "code_hash": "7a531dc2a8ec9b8f8a8e8bab6b661c4b772c5327511652df2fdf6bf6e81aa3e6", "address": "g18le5q4czm6xmdy3yascvqzjc4x8fe4scysuwsx"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/havl", "code_hash": "f0677a8ffc467b23ebab6550359bdb91e8f75f0f81d43c85ce2f9cdc31388d38", "address": "g17dyzn9v989twy2anauuzkn389fc9wmx4w36vy4"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/groups", "code_hash": "6dda42bfba38f6d2fb93b59a958cfbbdef806a97c936f6a6251f442970e99fce", "address": "g1c533rcawzmc5u7yhd9v3sn2mkzea978v7p20v3"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/markdown_utils", "code_hash": "b6ee8e35a9553176b81d6caf90d65eef4fdc112b1e1ca2f590980d687a378151", "address": "g1xnayydddtcryczp0afktg8htp0pdlv9e27swr7"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_core", "code_hash": "05bd0864a54ddba2e0d956488dc1bedaab95bcee165306c26806e61b9523f684", "address": "g12hzz044myz94sk949l4myjc5w0ke9sra2d6a5y"} -2024-04-15T19:21:22.921+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_utils", "code_hash": "de72e731af3072152d43bf7ef7613d327f14ce8d1bbc169e5530c44ea3ed65b9", "address": "g19rcs8467rmktwjkqd9r4nu5ptpyy20tzm2dhtt"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_proposal_single", "code_hash": "e9029fc0d670fbd490cf1999c7b2dd0c1cf34d1ec50e892937288412216877d4", "address": "g1yr9w8k02uyv80vfvdq8sn6ehyumn9dalmz8jy6"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/teritori/dao_voting_group", "code_hash": "d44b3a3b346726ae600be39c34973cfe5c0a2b5116876ce9af2a31e241f071ad", "address": "g10ntq5apq4svlum89fr3m2kxhrc9ew595yw4y6x"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/dao_registry", "code_hash": "9b77d10c54c1fc29fe71737b9c02d6ca919d4ebd0c59f27e8d3c565f1bb40dad", "address": "g12gkss9j9jzxa84kpxpaewqxs5aatu338505sc7"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/teritori/social_feeds_dao", "code_hash": "e446f1b6a4b0d54df673bf44ea1e29540c7da0b74cb54412f54719de2e1d7d06", "address": "g17r2jq7r78cjfu54xnddg69gw0ky36yl9lv97c0"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "leon", "address": "g125em6arxsnj49vx35f0n0z34putv5ty3376fg5"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "leohhhn", "address": "g125em6arxsnj49vx35f0n0z34putv5ty3376fg5"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/postit/v1", "code_hash": "ce9375c8f3f62edea3f19291ff7bf462a5be09a973d401560cfe7f6f7ca147cc", "address": "g1y0axemz8tdqnz0c5mev05ysqk90l5e0lzw4c5v"} -2024-04-15T19:21:22.922+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/postit/v1", "code_hash": "ce9375c8f3f62edea3f19291ff7bf462a5be09a973d401560cfe7f6f7ca147cc", "address": "g1y0axemz8tdqnz0c5mev05ysqk90l5e0lzw4c5v"} -2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/staging/memeland/v1", "code_hash": "740386ff8ad07f4c26adb5aa2f90da9843492606dc6b2fc33f209fcfd1669984", "address": "g13jsxerdt777h0ttltpxkf26n2y8am5wxml9ef7"} -2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v1", "code_hash": "58d26f146612465dac406bccff2fe1f5b33ec55b8538c596e2405a0be96359fe", "address": "g1k54djlujz8vjs8tytxlna3750fftm8ussawt2e"} -2024-04-15T19:21:22.923+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v1", "code_hash": "d707228dca6a9d7e2af34a3557eff4f74a8b9f2da6062cca49e0597629b0035a", "address": "g1k54djlujz8vjs8tytxlna3750fftm8ussawt2e"} -2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "reggaesoul", "address": "g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d"} -2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:107 maybe registered user {"name": "reggaesoul", "address": "g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d"} -2024-04-15T19:21:22.925+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/test21/b64", "code_hash": "dd45845560333a13c85e0c6e212d655067d349c3e7b13f2aae5646a72948c825", "address": "g1grg9ugcgplcuj9dvktl2nlldndk2ejyyuk8cjc"} -2024-04-15T19:21:22.926+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/test21/b64", "code_hash": "dd45845560333a13c85e0c6e212d655067d349c3e7b13f2aae5646a72948c825", "address": "g1grg9ugcgplcuj9dvktl2nlldndk2ejyyuk8cjc"} -2024-04-15T19:21:22.926+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/b64123ff", "code_hash": "3784af973145b0e0405d76b0fb6aaa3fd58d90175b95d12b50fc4920aa56c362", "address": "g1tql3emaksrsu5lll5782r63drkzjzwqu7qx4h5"} -2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} -2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/hellow", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g1dkny9lt6ygq5wlrplrdcvyuxt94v5vuu83kded"} -2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/hellow", "code_hash": "ffb2fd43bd7d40f376ba521e505b4373a3d7c907ab4d9200aaaed533dfc4ca29", "address": "g1dkny9lt6ygq5wlrplrdcvyuxt94v5vuu83kded"} -2024-04-15T19:21:22.928+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/totallyrandomtapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g1pvgfdwu6w7al0au2j8mfvh6ed63x08thafzjqs"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/tapas", "code_hash": "3c8f45dbf1f7f1a5be0371e963138f03df4a9622aca0c0a005b91c4caa1271ee", "address": "g1dr70egpsyhfwr98e0lnrhas9vaz7jry2nneevu"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/staging/memeland/v2", "code_hash": "2251fcc1b8e3c549872b4ef60a2e7bc58a3eda8f71801961970c7b007a8675c5", "address": "g1j959mcwxctfe2pfnxtfp5amc7apqu8qfuncq07"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "d39fae1a83bbd3b1f8a262b9c46990d763aa5c497572709dd77c9eeb6e590498", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "d5a9423152fc7e4fc9346f63864f44df24a7060f5b7933c34d09697e2d0aabd9", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "c921be660142cc9c8b5c091da6f4a9d8efed160612c045e6cd01afe21081b4f8", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/staging/memeland/v2", "code_hash": "07dd368024bf88cd3812fe45ad41ea764d85475740c143b006a9aff21e5d3483", "address": "g1p40shxgwm8c0d6fnpq9y38fkzx5g4shv9vsfkw"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/howtosimplelib", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g10qmu7nq28xvf203v4dfsr05avzl0ck0skf4yxd"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tapas", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g1dg7jmkytwh5qdp80l3addcy7c9lgazg8at94xx"} -2024-04-15T19:21:22.929+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/tapas", "code_hash": "296bdfc4551c56e7844ed48a5008cc43cae22c978d958640928720e654e91a8f", "address": "g19g20lk75j38tktajju06hmhvsk6tm5uhvwdmex"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/poll", "code_hash": "a609a199cb96d097913fe8e08c38bdc8ff1621735d6e07d0664d0888db3d09d6", "address": "g13ulaujf56pmsaddgvt4sv6da9p2zzs84wu8cmx"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/poll", "code_hash": "2aa8dc8a0980b5920d7131ae289f60d295bd200373b16bc3443ff069b41c86b3", "address": "g1z4snfqvfm6xkgvsdpa0kwy47yh8jd4zj7a99w9"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/poll", "code_hash": "73989ba9a151deb619694ed18ea4b2eb5c17c781f15a7c66d500ec751202121a", "address": "g1z4snfqvfm6xkgvsdpa0kwy47yh8jd4zj7a99w9"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "890d8019c5966da9173e3ce390214723362fe7cb0fcf5eb8e54c664ec354b04c", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "87323b50ed5d64fc52fb78e22b5804c4aac6954bcc3b86a37f3ebdb149ea4b7f", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken", "code_hash": "9d4f939affabb5669423748b4bace691263ff204eebfebc590a740d21c977117", "address": "g1gdpsss84ffht54z2xxv5x6kp7lm50wdujtckyz"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/mytoken", "code_hash": "b14e1e9d05f581564da92563be2ec0b27f9b12ea25885ac9d2d07ff1f6a86977", "address": "g18440ea83zlvn5wuwvgrwentlc3p3pltwgu75dp"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/decimaltest", "code_hash": "90df7e89faac9c333c3edb649d8d28a9bc1ce5cc84d00a71e4f85305a622b29b", "address": "g13hwucstqg4stc92mfm5svy3v8zzyc27902ud7c"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/decimaltest", "code_hash": "53ff74a394f7df0497fe8191e3503b5522867e6344c5ef2e29eea76749adfdab", "address": "g13hwucstqg4stc92mfm5svy3v8zzyc27902ud7c"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken1", "code_hash": "7552f0f428969b19a0585dea35f4825c28b81c78b4432f6d3c439de2e7b86bf9", "address": "g16mh033f37kqp3v8hmcc3ruwkhfmpcvqffmj0mv"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "a7af646b0e0b2c593ba512b26911ed1b4a3dcaa2e128b85e0c2e89a4efca911b", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "c1424a5e0d4d2bc0db3803765ba03e91b425d1fd4e8192fa2cd6d93a3d15f354", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "887025b0740f94f7a2d0d9c9a02248e78dc813f9462d27ada420258f63dcafa7", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} -2024-04-15T19:21:22.932+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/leontoken3", "code_hash": "137d1416f1fa420fa7897b8a6d7c1bfef9eeb6def55c39775bbcedd87697d843", "address": "g10ezmguny87mmhwkgxm2ap89gu3ag07hwvhack5"} -2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/32/sdf", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g1qtctm2dysg9gvznggsq7s82ffuqzuqn8u9y0h3"} -2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter", "code_hash": "d886e78b3ad169018a90f27af8c947a5a350462462f6658bb436e6120c286ec3", "address": "g1xrje99427n0jrsg4ctzume87g2lrnd56uh7p8t"} -2024-04-15T19:21:22.933+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter1", "code_hash": "c188163feac650b1ef6d46d35b14ca88c973b467f400b4b3a7406b9c51c0a6a7", "address": "g1sm3805z7ynnsjrhu0xl95pv80jhmx0e7sm4fsn"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter1", "code_hash": "d21ed18455a523147969bd4e6890cb27ae98b48b3b8592fd568155554c807342", "address": "g1sm3805z7ynnsjrhu0xl95pv80jhmx0e7sm4fsn"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter2", "code_hash": "c708771f15af6aff59288bb2eb72e3295c169b750f00c2bfbcc7f9668e3538f6", "address": "g1mnt6ym3lurqt8drxwtwmks4w3n2v4u78jdjkxu"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/testing/counter3", "code_hash": "d04135dca819c3d9c0562cc2d49239fcc6cfafcd2119067ad572090d81831217", "address": "g1cwwfh3z6ydxacy7x33sye0z6h9uj2ml5cp7w52"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/leongrc20", "code_hash": "6d54a39316ae1ed4b94b38589295d79f72a60b13bd31e8af8ce98596876039b1", "address": "g1ymt7ag96k70jy35l4qwx4k9g7ctsfvxkgzucy6"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "7dc7160377f4915c6cfe1e9aad43b4c2e1509ecd3e8575a22f915f18fae9643f", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "ba5b9a24e3654f83cbc32987ad1ee8fd8d5c2894742e98937331247b24176dab", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "36d3f2b6f9ae73ef9b60c987c5b3306513a3e0765839e81d7b5a687bbc036096", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "786ac035b6728b729462bf2e0b6c68a8d5e88f1062d31375968a57f00d3cb948", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "b57aced840eedbfa29ff92559420326929eec21b8007632cdca9019ed113bef7", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "4e27600854907af14e3839c4f7f528715eeb36d7a481b517a499780640d107a2", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltestv1", "code_hash": "ea6a8091b36a9bfb96bf36486e3df54a03030e2d33b54b9572b56101926fb6c0", "address": "g1k9cpnjwhrujkujpv50xm25s4fda0vqfmu0dct6"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "d85d06809e0004b4026f611ce0953cc23cbad524213602c836da5e393cc7c38c", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} -2024-04-15T19:21:22.934+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/tokens/mynft", "code_hash": "6460db8070dc3cbd2722342f3f96cdce2b3e6fa8bb7157c7b9e32a28667a71db", "address": "g1lmzjqfsp77qzqgp9aex0r7zp9hlan446gyzc6r"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/testing/whitelist", "code_hash": "b707faa0350c818ac87188487e2919965e268b79a4dfbb7846b0d9edd85c6c77", "address": "g1gwctt57nkvxc5cnvy7ua2tnyds9h0yeyrhm5p4"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/leon/test/test/whitelist", "code_hash": "a0719b73bf9da685103b1285114ea9b4615cd560e0d602eed1c28a20ff31b109", "address": "g1hnmnqdw98m3lcmeku96ufgtn7p0403z85ml2wj"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/test/whitelistfactory", "code_hash": "7019fa6a317bce6a18bddfb40e7fdb1bcff24be093221c65a041b5a5f3758466", "address": "g103fg5yjt0yz683avanvxeccr7u27zjzegw72k9"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/test1/whitelistfactory", "code_hash": "654a37cde68346472580d1ce99d7d10bc04c4ee29c0101cced6a63601bcbf31a", "address": "g17y7rdy5gacpnn7fvu33mmrph0qdhj5m0v7rpxv"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe/12345", "code_hash": "2a80e5a6d81bde0ca11ec4f2fe6647e343d20955a33afba1733ad7053aec87d2", "address": "g1spee4ffgxeesqnva4fwl4fe0z9pu7e50u6nara"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe/he11", "code_hash": "31a5c350cd5e2aed9d49597b445338ce440fc22cb10c7b5a64f934e010f53bd3", "address": "g10y8pyvm5sdmwwyjyjln090fss2cwhqj8wzmecr"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "2a9bbe25ef7ebed3e3568ffcf4e853a3aeaba8bfad7405185a45db98e0abac40", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "92ff0f90f8273eae80e33eb842bd78388b0bdac09c533e2621c1ba848796ebea", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "3b81370db2c97581ef4907837c7d3821782f927a255ae0d45595396afb5b6d69", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/ff/h123", "code_hash": "6956d494c7ae9114b7b41e925db74b992d81c436107ab982f66826723e8642c8", "address": "g10srm20deadvcntayy8u6ad7qdlvg7apywug5qj"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hhh123/hhh123", "code_hash": "bda74db4ef7790f2a41db341b8b2da41ac38915a89e19ae08a8c85f1f5f3f580", "address": "g1svch04vcesn7uzsfcjv33rnrg397u4r08g44xt"} -2024-04-15T19:21:22.936+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe321", "code_hash": "e0a97706be4a3d1da362e16391c1b88ebca006fbd86af807ebd5fbaa48c6f7e5", "address": "g1ja7v03w0e6mrpmmxgeaw00ep24qez948a4fkrk"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe3211", "code_hash": "141902bb75a212308389715ac4346d67a1316b23458552dcc9db7dd423820277", "address": "g1x2w5gx8073f25kapu2gmn6dl76dh5mvpezvzrd"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe321/hehe3211", "code_hash": "70c35fe0ad1913ea3f9d479115cb8f288fd33a47e32acd1d4a8c8411db2be3bc", "address": "g1x2w5gx8073f25kapu2gmn6dl76dh5mvpezvzrd"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe3212/hehe3212", "code_hash": "66517395f5d431ae97a18b30c1bd69661d1b30cd981eb222231efe6849cf28be", "address": "g19mqfng6jexhx7sa896yklsyje5tycpmv60mq05"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/hehe3212/hehe3212", "code_hash": "66517395f5d431ae97a18b30c1bd69661d1b30cd981eb222231efe6849cf28be", "address": "g19mqfng6jexhx7sa896yklsyje5tycpmv60mq05"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/counter", "code_hash": "e59d84133457dfd82b89d854e80639111030e62692e3fdc47a1fb2590ed020bc", "address": "g1uwxk0f5wnkvcmuzzqcd09yycgzke3zpty4wjlk"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/counter", "code_hash": "103418e43cb92f27844df22a0bb5faa6cddd1725ebe8e8a5be2d78488546fe90", "address": "g1uwxk0f5wnkvcmuzzqcd09yycgzke3zpty4wjlk"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/ecounter", "code_hash": "103418e43cb92f27844df22a0bb5faa6cddd1725ebe8e8a5be2d78488546fe90", "address": "g1sqjkdxk49krrc0yrrgt28787gmf6d0p46fvcf5"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1jhlerkvry40kumzrf2usnx87gnk4700fu98cpe"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/malek/todolist", "code_hash": "c80a333bdc6e868e3dbe0cbbb2d5fc4c20684c515b8f6428bf8d3ca34aafb8d5", "address": "g1303ngzg5mpqf76hdsk38r4gcvd9hjnqsghk88m"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/tasklist", "code_hash": "ee4fdc9c0dfc72f609ab3005627e7e799045e99a1ca3842c32d08283eb9c605a", "address": "g16g7tjh4hgqrgut755cq0u2tzxytvx9h7vh9vzp"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "6189706c38f61262de7262556580c27e23bbc844e8395071e57709bd632aa3f9", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "08e3373e2bcf2c32f83536382ebdbd2db8ec53e679ae73bc0d328ad495c61596", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} -2024-04-15T19:21:22.937+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/todolist", "code_hash": "6189706c38f61262de7262556580c27e23bbc844e8395071e57709bd632aa3f9", "address": "g1539kpj06l04hlggmtw4gu8xawrydsexhfvmej8"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "33df370add55451ee8c3521b6f4e3891d9f71ad40406c2cc43f5a73fa17c49ba", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "33df370add55451ee8c3521b6f4e3891d9f71ad40406c2cc43f5a73fa17c49ba", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "f95e987d6ee97a2a0d55df6b544ca2ce6500447cddae9f7c56111abe3afece3c", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "f454d811a3eb711e32a17dae4cf3ca71600d0464be0c37e167d915d59d4f0c2b", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/malek/todolist1", "code_hash": "12b245a7979972ecff10aa1217dcfaeb3e362abaa3cd5867d10d2b577347bf77", "address": "g1n2vkqnkxlrdswuyyeq3df4y7j9uhr0kxd6a0kq"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1k3pwfjw2hzp4ve9c47wdtxdg0teus3hgrayl68"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1usg65wmkhrk85w8dkfzfvwhcqxp6hs3cvqwwfa"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/p/demo/malek/todolist", "code_hash": "32e75b46cc9ece88fa659dbf56422dfd675cb31aa7c72f7ae69ebd9bc5027520", "address": "g1k3pwfjw2hzp4ve9c47wdtxdg0teus3hgrayl68"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_1", "code_hash": "d332e8f0f2ce467e2da5e4fa41735bf9ab5c1d10d0470dbd7efeb5a6ad01d0c8", "address": "g169lgp3s45c27x3jw095xnt2h9ct67vtgmmpkwp"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_1", "code_hash": "d332e8f0f2ce467e2da5e4fa41735bf9ab5c1d10d0470dbd7efeb5a6ad01d0c8", "address": "g169lgp3s45c27x3jw095xnt2h9ct67vtgmmpkwp"} -2024-04-15T19:21:22.938+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/hello/hello", "code_hash": "1266f85882dfe20e92b0bf6468ae530f6bde4475d05028915a75a7bc8a2ab749", "address": "g12sxnutrvr6y6j2u956txc9hf3h8cn08rmzzuh2"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/realm/realm", "code_hash": "e8f779b634efce3a9e3d02093bb20073892712702481e1c56c73f8ec616969f8", "address": "g1qyrnsj0sfdge32dawr6jvtuaattqhcd5z32trq"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/realm/hello", "code_hash": "e8f779b634efce3a9e3d02093bb20073892712702481e1c56c73f8ec616969f8", "address": "g1ttumsclal4a8vc8wfdx9hcmmqgp5cczy9errxv"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "ecc32bffa38e5bb50526ef312bf1c5d6ecde2f657b732f82b26640d415fc3741", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "ecc32bffa38e5bb50526ef312bf1c5d6ecde2f657b732f82b26640d415fc3741", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_2", "code_hash": "a2cf06f37bc255251f47dc0d6dd26d2e96818c790cade3ff377aa04d5e669ad9", "address": "g1tvye6akxpx6egx98crrv28sd2pwh9rxucgrhra"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "6768c2cde9c88be1a49daee177207cad47beed1890cb4e9b49879c44cb8b5f4d", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "599c72bde3e2d1db49324236e49a6772602b244d1b2c22d8c20f062eb39323cd", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} -2024-04-15T19:21:22.939+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_3", "code_hash": "295c7ed34ba6f9a048cb79c47de9562006377819c423864ec5ce9ff65b1c2292", "address": "g1jm0gfaqy5a8mucrj6vy8u540q4exwau8kg2z7v"} -2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/leon/test/avltest", "code_hash": "e65b4af6c6e194381bcb261c65251a4cb3e412d80317b51b331df39ce5aed968", "address": "g1ww5gr2wgunpj5rm3dn6gye0xsvxaazalt5v5vz"} -2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} -2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} -2024-04-15T19:21:22.940+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/mikecito/gh_test_4", "code_hash": "2b5d5b6f4284b881a22690066b49432fb7b60924c2ac638082d76ae9ec9b747d", "address": "g1r95rcd8ppa7se5wvtj7p8q366e9wkquw5y46qu"} -2024-04-15T19:21:22.941+0200 DEBUG richcmd/main.go:128 maybe instantiated realm {"package": "gno.land/r/demo/hello", "code_hash": "11f980bf862e7010aa9753469498a35ac28f0380684b32894b2de07effbe0fdf", "address": "g18mf9299cnuf0qeg5f9zvzw2gldg6q4ec2zv332"} -2024-04-15T19:21:24.943+0200 INFO richcmd/main.go:57 query {"lastHeight": 6275, "nextIndex": 1} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": ")k\ufffd\ufffdU\u001cV\ufffd\ufffdNԊP\u0008\ufffdC\ufffd\ufffd,\ufffd\ufffd\ufffd\ufffd@\ufffd\ufffd \ufffdT\ufffd\u001a\ufffd", "count": 3, "paths": ["gno.land/p/leon/tapas", "gno.land/r/leon/howtosimplelib", "gno.land/r/leon/tapas"]} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "\u00104\u0018\ufffd<\ufffd/'\ufffdM\ufffd*\u000b\ufffd\ufffd\ufffd\ufffd\ufffd\u0017%\ufffd\ufffd襾-xH\ufffdF\ufffd\ufffd", "count": 2, "paths": ["gno.land/r/leon/counter", "gno.land/r/leon/test/ecounter"]} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "\u0011\ufffd\ufffd\ufffd\ufffd.p\u0010\ufffd\ufffdSF\ufffd\ufffd\ufffdZ\u0003\ufffdhK2\ufffdK-\ufffd~\ufffd\ufffd\u000f\ufffd", "count": 2, "paths": ["gno.land/r/32/sdf", "gno.land/r/demo/hello"]} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "2\ufffd[F̞Έ\ufffde\ufffd\ufffdVB-\ufffdg\\\ufffd\u001a\ufffd\ufffd/z枽\ufffd\ufffd\u0002u ", "count": 2, "paths": ["gno.land/p/demo/malek/todolist", "gno.land/r/demo/malek/todolist"]} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "<\ufffdE\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0003q\ufffdc\u0013\ufffd\u0003\ufffdJ\ufffd\"\ufffd\ufffd\ufffd\ufffd\u0005\ufffd\u001cL\ufffd\u0012q\ufffd", "count": 2, "paths": ["gno.land/r/demo/totallyrandomtapas", "gno.land/r/demo/tapas"]} -2024-04-15T19:21:24.951+0200 DEBUG richcmd/main.go:164 maybe found duplicate code {"code_hash": "u\ufffd\ufffd߼\ufffd*ZӘ= limit { - return out, nil - } - */ } } } diff --git a/serve/graph/subscription.resolvers.go b/serve/graph/subscription.resolvers.go index d95d0e81..366b1636 100644 --- a/serve/graph/subscription.resolvers.go +++ b/serve/graph/subscription.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.48 +// Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" From 0bd5d125a7bcab5cff9cbcfa69ad3f9ae2b789dc Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 03:04:52 +0200 Subject: [PATCH 08/34] chore: remove artifact Signed-off-by: Norman Meier --- log.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 log.txt diff --git a/log.txt b/log.txt deleted file mode 100644 index 72305a09..00000000 --- a/log.txt +++ /dev/null @@ -1,5 +0,0 @@ -2024-04-18T13:18:24.990+0200 INFO http-server serve/server.go:46 HTTP server started {"address": "[::]:8546"} -2024-04-18T13:18:24.991+0200 INFO http-server serve/server.go:61 HTTP server to be shut down -2024-04-18T13:18:24.991+0200 INFO http-server serve/server.go:55 HTTP server shut down -unable to index genesis block, unable to fetch genesis block, unable to get genesis block, Post "http://127.0.0.1:26657": dial tcp 127.0.0.1:26657: connect: connection refused -sync /dev/stderr: bad file descriptorexit status 1 From 08830b9b9021f7e0c846d1725bb476ebc6e501e9 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 04:50:28 +0200 Subject: [PATCH 09/34] chore: rework genesis indexing Signed-off-by: Norman Meier --- client/http.go | 2 +- fetch/fetch.go | 217 +++++++++++++----------------------------------- fetch/worker.go | 57 ++++++++++++- 3 files changed, 113 insertions(+), 163 deletions(-) diff --git a/client/http.go b/client/http.go index 30d95641..493393a1 100644 --- a/client/http.go +++ b/client/http.go @@ -74,7 +74,7 @@ func (c *Client) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResult } func (c *Client) GetTx(hash []byte) (*core_types.ResultTx, error) { - tx, err := c.client.Tx(hash, false) + tx, err := c.client.Tx(hash) if err != nil { return nil, fmt.Errorf("unable to get tx, %w", err) } diff --git a/fetch/fetch.go b/fetch/fetch.go index 8de833e6..ea809e73 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -11,10 +11,6 @@ import ( queue "github.com/madz-lab/insertion-queue" "go.uber.org/zap" - "github.com/gnolang/gno/gno.land/pkg/gnoland" - "github.com/gnolang/gno/tm2/pkg/amino" - bftTypes "github.com/gnolang/gno/tm2/pkg/bft/types" - "github.com/gnolang/gno/tm2/pkg/std" "github.com/gnolang/tx-indexer/storage" storageErrors "github.com/gnolang/tx-indexer/storage/errors" "github.com/gnolang/tx-indexer/types" @@ -74,10 +70,6 @@ func New( // FetchChainData starts the fetching process that indexes // blockchain data func (f *Fetcher) FetchChainData(ctx context.Context) error { - if err := f.maybeFetchGenesis(); err != nil { - return fmt.Errorf("unable to index genesis block, %w", err) - } - collectorCh := make(chan *workerResponse, DefaultMaxSlots) // attemptRangeFetch compares local and remote state @@ -91,7 +83,8 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Fetch the latest saved height latestLocal, err := f.storage.GetLatestHeight() - if err != nil && !errors.Is(err, storageErrors.ErrNotFound) { + isInit := errors.Is(err, storageErrors.ErrNotFound) + if err != nil && !isInit { return fmt.Errorf("unable to fetch latest block height, %w", err) } @@ -109,8 +102,14 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { return nil } + var start uint64 + if isInit { + start = 0 + } else { + start = latestLocal + 1 + } gaps := f.chunkBuffer.reserveChunkRanges( - latestLocal+1, + start, latestRemote, f.maxChunkSize, ) @@ -186,170 +185,68 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Pop the next chunk f.chunkBuffer.PopFront() - if err := f.processSlot(item); err != nil { - return fmt.Errorf("unable to process slot, %w", err) - } - } - } - } -} - -func (f *Fetcher) maybeFetchGenesis() error { - // Check if genesis block has already been indexed (latest height is set) - _, err := f.storage.GetLatestHeight() - if err == nil { - return nil - } else if !errors.Is(err, storageErrors.ErrNotFound) { - return fmt.Errorf("unable to fetch latest block height, %w", err) - } - - // Fetch genesis - iGenesisBlock, err := f.client.GetGenesisBlock() - if err != nil { - return fmt.Errorf("unable to fetch genesis block, %w", err) - } - - genesisState, ok := iGenesisBlock.Genesis.AppState.(gnoland.GnoGenesisState) - if !ok { - return errors.New("unable to cast genesis block to GnoGenesisState") - } - - // Convert genesis to normal block - bftTxs := make([]bftTypes.Tx, len(genesisState.Txs)) - for i, tx := range genesisState.Txs { - bftTxs[i], err = amino.Marshal(tx) - if err != nil { - return fmt.Errorf("unable to marshal tx, %w", err) - } - } - - block := &bftTypes.Block{ - Header: bftTypes.Header{ - AppHash: iGenesisBlock.Genesis.AppHash, - ChainID: iGenesisBlock.Genesis.ChainID, - Time: iGenesisBlock.Genesis.GenesisTime, - Height: 0, - NumTxs: int64(len(bftTxs)), - TotalTxs: int64(len(bftTxs)), - }, - Data: bftTypes.Data{ - Txs: bftTxs, - }, - } - - results := make([]*bftTypes.TxResult, len(genesisState.Txs)) - for i, tx := range genesisState.Txs { - hash, err := getTxHash(tx) - if err != nil { - f.logger.Error("unable to get tx hash", zap.String("err", err.Error())) - continue - } - txwr, err := f.client.GetTx(hash) - if err != nil { - f.logger.Error("unable to get tx", zap.String("err", err.Error())) - continue - } - results[i] = &bftTypes.TxResult{ - Height: 0, - Index: uint32(i), - Tx: txwr.Tx, - Response: txwr.TxResult, - } - } + wb := f.storage.WriteBatch() - slot := &slot{ - chunk: &chunk{ - blocks: []*bftTypes.Block{block}, - results: [][]*bftTypes.TxResult{results}, - }, - chunkRange: chunkRange{ - from: 0, // should be -1, but we're using 0 to avoid underflow - to: 0, - }, - } + // Save the fetched data + for blockIndex, block := range item.chunk.blocks { + if saveErr := wb.SetBlock(block); saveErr != nil { + // This is a design choice that really highlights the strain + // of keeping legacy testnets running. Current TM2 testnets + // have blocks / transactions that are no longer compatible + // with latest "master" changes for Amino, so these blocks / txs are ignored, + // as opposed to this error being a show-stopper for the fetcher + f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) - if err := f.processSlot(slot); err != nil { - return fmt.Errorf("unable to process genesis slot, %w", err) - } + continue + } - return nil -} + f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) -// getTxHash returns the hex hash representation of -// the transaction (Amino encoded) -func getTxHash(tx std.Tx) ([]byte, error) { - encodedTx, err := amino.Marshal(tx) - if err != nil { - return nil, fmt.Errorf("unable to marshal transaction, %w", err) - } + // Get block results + txResults := item.chunk.results[blockIndex] - txHash := bftTypes.Tx(encodedTx).Hash() + // Save the fetched transaction results + for _, txResult := range txResults { + if err := wb.SetTx(txResult); err != nil { + f.logger.Error("unable to save tx", zap.String("err", err.Error())) - return txHash, nil -} + continue + } -func (f *Fetcher) processSlot(slot *slot) error { - wb := f.storage.WriteBatch() + f.logger.Debug( + "Added tx to batch", + zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), + ) + } - // Save the fetched data - for blockIndex, block := range slot.chunk.blocks { - if saveErr := wb.SetBlock(block); saveErr != nil { - // This is a design choice that really highlights the strain - // of keeping legacy testnets running. Current TM2 testnets - // have blocks / transactions that are no longer compatible - // with latest "master" changes for Amino, so these blocks / txs are ignored, - // as opposed to this error being a show-stopper for the fetcher - f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) + // Alert any listeners of a new saved block + event := &types.NewBlock{ + Block: block, + Results: txResults, + } - continue - } + f.events.SignalEvent(event) + } - f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) + f.logger.Info( + "Added to batch block and tx data for range", + zap.Uint64("from", item.chunkRange.from), + zap.Uint64("to", item.chunkRange.to), + ) - // Get block results - txResults := slot.chunk.results[blockIndex] + // Save the latest height data + if err := wb.SetLatestHeight(item.chunkRange.to); err != nil { + if rErr := wb.Rollback(); rErr != nil { + return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) + } - // Save the fetched transaction results - for _, txResult := range txResults { - if err := wb.SetTx(txResult); err != nil { - f.logger.Error("unable to save tx", zap.String("err", err.Error())) + return fmt.Errorf("unable to save latest height info, %w", err) + } - continue + if err := wb.Commit(); err != nil { + return fmt.Errorf("error persisting block information into storage, %w", err) + } } - - f.logger.Debug( - "Added tx to batch", - zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), - ) - } - - // Alert any listeners of a new saved block - event := &types.NewBlock{ - Block: block, - Results: txResults, - } - - f.events.SignalEvent(event) - } - - f.logger.Info( - "Added to batch block and tx data for range", - zap.Uint64("from", slot.chunkRange.from), - zap.Uint64("to", slot.chunkRange.to), - ) - - // Save the latest height data - if err := wb.SetLatestHeight(slot.chunkRange.to); err != nil { - if rErr := wb.Rollback(); rErr != nil { - return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) } - - return fmt.Errorf("unable to save latest height info, %w", err) } - - if err := wb.Commit(); err != nil { - return fmt.Errorf("error persisting block information into storage, %w", err) - } - - return nil } diff --git a/fetch/worker.go b/fetch/worker.go index 17e46371..afed0129 100644 --- a/fetch/worker.go +++ b/fetch/worker.go @@ -5,6 +5,8 @@ import ( "errors" "fmt" + "github.com/gnolang/gno/gno.land/pkg/gnoland" + "github.com/gnolang/gno/tm2/pkg/amino" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" "github.com/gnolang/gno/tm2/pkg/bft/types" ) @@ -67,8 +69,19 @@ func getBlocksFromBatch(chunkRange chunkRange, client Client) ([]*types.Block, e fetchedBlocks = make([]*types.Block, 0) ) + batchStart := chunkRange.from + if batchStart == 0 { + block, err := getGenesisBlock(client) + if err != nil { + // Try to fetch sequentially + return getBlocksSequentially(chunkRange, client) + } + batchStart += 1 + fetchedBlocks = append(fetchedBlocks, block) + } + // Add block requests to the batch - for blockNum := chunkRange.from; blockNum <= chunkRange.to; blockNum++ { + for blockNum := batchStart; blockNum <= chunkRange.to; blockNum++ { if err := batch.AddBlockRequest(blockNum); err != nil { return nil, fmt.Errorf( "unable to add block request for block %d, %w", @@ -107,11 +120,20 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block ) for blockNum := chunkRange.from; blockNum <= chunkRange.to; blockNum++ { + if blockNum == 0 { + block, err := getGenesisBlock(client) + if err != nil { + errs = append(errs, fmt.Errorf("unable to get block %d, %w", blockNum, err)) + continue + } + + blocks = append(blocks, block) + } + // Get block info from the chain block, err := client.GetBlock(blockNum) if err != nil { errs = append(errs, fmt.Errorf("unable to get block %d, %w", blockNum, err)) - continue } @@ -121,6 +143,37 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block return blocks, errors.Join(errs...) } +func getGenesisBlock(client Client) (*types.Block, error) { + gblock, err := client.GetGenesisBlock() + if err != nil { + return nil, fmt.Errorf("unable to get genesis block, %w", err) + } + + genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) + if !ok { + return nil, fmt.Errorf("unknown genesis state kind") + } + txs := make([]types.Tx, len(genesisState.Txs)) + for i, tx := range genesisState.Txs { + txs[i], err = amino.MarshalJSON(tx) + if err != nil { + return nil, fmt.Errorf("unable to marshal genesis tx, %w", err) + } + } + block := &types.Block{ + Header: types.Header{ + NumTxs: int64(len(txs)), + TotalTxs: int64(len(txs)), + Time: gblock.Genesis.GenesisTime, + ChainID: gblock.Genesis.ChainID, + }, + Data: types.Data{ + Txs: txs, + }, + } + return block, nil +} + // getTxResultFromBatch gets the tx results using batch requests. // In case of encountering an error during fetching (remote temporarily closed, batch error...), // the fetch is attempted again using sequential tx result fetches From f020dcc618845af7d0a0dfaead84589d7b08da77 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 04:57:46 +0200 Subject: [PATCH 10/34] fix: tests Signed-off-by: Norman Meier --- client/http.go | 10 +--------- fetch/mocks_test.go | 5 +++-- fetch/types.go | 7 ++----- fetch/worker.go | 3 ++- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/client/http.go b/client/http.go index 493393a1..59626676 100644 --- a/client/http.go +++ b/client/http.go @@ -53,7 +53,7 @@ func (c *Client) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) { return block, nil } -func (c *Client) GetGenesisBlock() (*core_types.ResultGenesis, error) { +func (c *Client) GetGenesis() (*core_types.ResultGenesis, error) { genesis, err := c.client.Genesis() if err != nil { return nil, fmt.Errorf("unable to get genesis block, %w", err) @@ -72,11 +72,3 @@ func (c *Client) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResult return results, nil } - -func (c *Client) GetTx(hash []byte) (*core_types.ResultTx, error) { - tx, err := c.client.Tx(hash) - if err != nil { - return nil, fmt.Errorf("unable to get tx, %w", err) - } - return tx, nil -} diff --git a/fetch/mocks_test.go b/fetch/mocks_test.go index 334e2502..c01a88e3 100644 --- a/fetch/mocks_test.go +++ b/fetch/mocks_test.go @@ -4,6 +4,7 @@ import ( "context" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" + bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" clientTypes "github.com/gnolang/tx-indexer/client/types" "github.com/gnolang/tx-indexer/events" @@ -41,8 +42,8 @@ func (m *mockClient) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) return nil, nil } -func (m *mockClient) GetGenesisBlock() (*core_types.ResultGenesis, error) { - return nil, nil +func (m *mockClient) GetGenesis() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{}}, nil } func (m *mockClient) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResults, error) { diff --git a/fetch/types.go b/fetch/types.go index 224f3fca..edd19f91 100644 --- a/fetch/types.go +++ b/fetch/types.go @@ -15,8 +15,8 @@ type Client interface { // GetBlock returns specified block GetBlock(uint64) (*core_types.ResultBlock, error) - // GetGenesisBlock returns the genesis block - GetGenesisBlock() (*core_types.ResultGenesis, error) + // GetGenesis returns the genesis block + GetGenesis() (*core_types.ResultGenesis, error) // GetBlockResults returns the results of executing the transactions // for the specified block @@ -24,9 +24,6 @@ type Client interface { // CreateBatch creates a new client batch CreateBatch() clientTypes.Batch - - // GetTx returns the transaction by its hash - GetTx(hash []byte) (*core_types.ResultTx, error) } // Events is the events API diff --git a/fetch/worker.go b/fetch/worker.go index afed0129..04e360d6 100644 --- a/fetch/worker.go +++ b/fetch/worker.go @@ -128,6 +128,7 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block } blocks = append(blocks, block) + continue } // Get block info from the chain @@ -144,7 +145,7 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block } func getGenesisBlock(client Client) (*types.Block, error) { - gblock, err := client.GetGenesisBlock() + gblock, err := client.GetGenesis() if err != nil { return nil, fmt.Errorf("unable to get genesis block, %w", err) } From 19965928ee2930c837b833e1fadbfe69f489d737 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 05:00:00 +0200 Subject: [PATCH 11/34] chore: prettify Signed-off-by: Norman Meier --- fetch/worker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fetch/worker.go b/fetch/worker.go index 04e360d6..ea20f0d9 100644 --- a/fetch/worker.go +++ b/fetch/worker.go @@ -154,6 +154,7 @@ func getGenesisBlock(client Client) (*types.Block, error) { if !ok { return nil, fmt.Errorf("unknown genesis state kind") } + txs := make([]types.Tx, len(genesisState.Txs)) for i, tx := range genesisState.Txs { txs[i], err = amino.MarshalJSON(tx) @@ -161,6 +162,7 @@ func getGenesisBlock(client Client) (*types.Block, error) { return nil, fmt.Errorf("unable to marshal genesis tx, %w", err) } } + block := &types.Block{ Header: types.Header{ NumTxs: int64(len(txs)), @@ -172,6 +174,7 @@ func getGenesisBlock(client Client) (*types.Block, error) { Txs: txs, }, } + return block, nil } From 721d17e34dd5a60a5ecd6f41b54b7b3057ade333 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 05:08:37 +0200 Subject: [PATCH 12/34] chore: lint Signed-off-by: Norman Meier --- fetch/fetch.go | 2 ++ fetch/worker.go | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index ea809e73..15d5ee52 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -84,6 +84,7 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Fetch the latest saved height latestLocal, err := f.storage.GetLatestHeight() isInit := errors.Is(err, storageErrors.ErrNotFound) + if err != nil && !isInit { return fmt.Errorf("unable to fetch latest block height, %w", err) } @@ -108,6 +109,7 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { } else { start = latestLocal + 1 } + gaps := f.chunkBuffer.reserveChunkRanges( start, latestRemote, diff --git a/fetch/worker.go b/fetch/worker.go index ea20f0d9..fa896f69 100644 --- a/fetch/worker.go +++ b/fetch/worker.go @@ -76,7 +76,9 @@ func getBlocksFromBatch(chunkRange chunkRange, client Client) ([]*types.Block, e // Try to fetch sequentially return getBlocksSequentially(chunkRange, client) } - batchStart += 1 + + batchStart++ + fetchedBlocks = append(fetchedBlocks, block) } @@ -124,10 +126,12 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block block, err := getGenesisBlock(client) if err != nil { errs = append(errs, fmt.Errorf("unable to get block %d, %w", blockNum, err)) + continue } blocks = append(blocks, block) + continue } @@ -135,6 +139,7 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block block, err := client.GetBlock(blockNum) if err != nil { errs = append(errs, fmt.Errorf("unable to get block %d, %w", blockNum, err)) + continue } From 9f736f75af5ae0c76b236438b3b4ed268297e3af Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 11 Jun 2024 05:12:30 +0200 Subject: [PATCH 13/34] fix: mock Signed-off-by: Norman Meier --- fetch/mocks_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch/mocks_test.go b/fetch/mocks_test.go index c01a88e3..4ed80cc5 100644 --- a/fetch/mocks_test.go +++ b/fetch/mocks_test.go @@ -3,6 +3,7 @@ package fetch import ( "context" + "github.com/gnolang/gno/gno.land/pkg/gnoland" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" @@ -43,7 +44,7 @@ func (m *mockClient) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) } func (m *mockClient) GetGenesis() (*core_types.ResultGenesis, error) { - return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{}}, nil + return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{AppState: gnoland.GnoGenesisState{}}}, nil } func (m *mockClient) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResults, error) { From 96b4c0ea042886c9577adc7c88d3c2a2e339e3f5 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 23 Jul 2024 18:31:43 +0200 Subject: [PATCH 14/34] chore: simplify Signed-off-by: Norman Meier --- fetch/fetch.go | 101 ++++++++++++++++++++++++++++++++++++++++++------ fetch/worker.go | 64 +----------------------------- 2 files changed, 91 insertions(+), 74 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 15d5ee52..5e737a78 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -11,6 +11,9 @@ import ( queue "github.com/madz-lab/insertion-queue" "go.uber.org/zap" + "github.com/gnolang/gno/gno.land/pkg/gnoland" + "github.com/gnolang/gno/tm2/pkg/amino" + bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" "github.com/gnolang/tx-indexer/storage" storageErrors "github.com/gnolang/tx-indexer/storage/errors" "github.com/gnolang/tx-indexer/types" @@ -72,6 +75,53 @@ func New( func (f *Fetcher) FetchChainData(ctx context.Context) error { collectorCh := make(chan *workerResponse, DefaultMaxSlots) + // attemptGenesisFetch + attemptGenesisFetch := func() error { + f.logger.Info("Fetching genesis") + + _, err := f.storage.GetLatestHeight() + isInit := errors.Is(err, storageErrors.ErrNotFound) + + if !isInit { + return nil + } + + block, err := getGenesisBlock(f.client) + if err != nil { + return fmt.Errorf("failed to fetch genesis block: %w", err) + } + + results, err := f.client.GetBlockResults(0) + if err != nil { + return fmt.Errorf("failed to fetch genesis results: %w", err) + } + + txResults := make([]*bft_types.TxResult, len(block.Txs)) + for txIndex, tx := range block.Txs { + result := &bft_types.TxResult{ + Height: 0, + Index: uint32(txIndex), + Tx: tx, + Response: results.Results.DeliverTxs[txIndex], + } + + txResults[txIndex] = result + } + + collectorCh <- &workerResponse{ + chunk: &chunk{ + blocks: []*bft_types.Block{block}, + results: [][]*bft_types.TxResult{txResults}, + }, + chunkRange: chunkRange{ + from: 0, + to: 1, + }, + } + + return nil + } + // attemptRangeFetch compares local and remote state // and spawns workers to fetch chunks of the chain attemptRangeFetch := func() error { @@ -83,9 +133,7 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Fetch the latest saved height latestLocal, err := f.storage.GetLatestHeight() - isInit := errors.Is(err, storageErrors.ErrNotFound) - - if err != nil && !isInit { + if err != nil && !errors.Is(err, storageErrors.ErrNotFound) { return fmt.Errorf("unable to fetch latest block height, %w", err) } @@ -103,15 +151,8 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { return nil } - var start uint64 - if isInit { - start = 0 - } else { - start = latestLocal + 1 - } - gaps := f.chunkBuffer.reserveChunkRanges( - start, + latestLocal+1, latestRemote, f.maxChunkSize, ) @@ -140,6 +181,10 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { defer ticker.Stop() // Execute the initial "catch up" with the chain + if err := attemptGenesisFetch(); err != nil { + return err + } + if err := attemptRangeFetch(); err != nil { return err } @@ -252,3 +297,37 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { } } } + +func getGenesisBlock(client Client) (*bft_types.Block, error) { + gblock, err := client.GetGenesis() + if err != nil { + return nil, fmt.Errorf("unable to get genesis block, %w", err) + } + + genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) + if !ok { + return nil, fmt.Errorf("unknown genesis state kind") + } + + txs := make([]bft_types.Tx, len(genesisState.Txs)) + for i, tx := range genesisState.Txs { + txs[i], err = amino.MarshalJSON(tx) + if err != nil { + return nil, fmt.Errorf("unable to marshal genesis tx, %w", err) + } + } + + block := &bft_types.Block{ + Header: bft_types.Header{ + NumTxs: int64(len(txs)), + TotalTxs: int64(len(txs)), + Time: gblock.Genesis.GenesisTime, + ChainID: gblock.Genesis.ChainID, + }, + Data: bft_types.Data{ + Txs: txs, + }, + } + + return block, nil +} diff --git a/fetch/worker.go b/fetch/worker.go index a499a730..c2c58862 100644 --- a/fetch/worker.go +++ b/fetch/worker.go @@ -5,8 +5,6 @@ import ( "errors" "fmt" - "github.com/gnolang/gno/gno.land/pkg/gnoland" - "github.com/gnolang/gno/tm2/pkg/amino" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" "github.com/gnolang/gno/tm2/pkg/bft/types" ) @@ -69,21 +67,8 @@ func getBlocksFromBatch(chunkRange chunkRange, client Client) ([]*types.Block, e fetchedBlocks = make([]*types.Block, 0) ) - batchStart := chunkRange.from - if batchStart == 0 { - block, err := getGenesisBlock(client) - if err != nil { - // Try to fetch sequentially - return getBlocksSequentially(chunkRange, client) - } - - batchStart++ - - fetchedBlocks = append(fetchedBlocks, block) - } - // Add block requests to the batch - for blockNum := batchStart; blockNum <= chunkRange.to; blockNum++ { + for blockNum := chunkRange.from; blockNum <= chunkRange.to; blockNum++ { if err := batch.AddBlockRequest(blockNum); err != nil { return nil, fmt.Errorf( "unable to add block request for block %d, %w", @@ -122,19 +107,6 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block ) for blockNum := chunkRange.from; blockNum <= chunkRange.to; blockNum++ { - if blockNum == 0 { - block, err := getGenesisBlock(client) - if err != nil { - errs = append(errs, fmt.Errorf("unable to get block %d, %w", blockNum, err)) - - continue - } - - blocks = append(blocks, block) - - continue - } - // Get block info from the chain block, err := client.GetBlock(blockNum) if err != nil { @@ -149,40 +121,6 @@ func getBlocksSequentially(chunkRange chunkRange, client Client) ([]*types.Block return blocks, errors.Join(errs...) } -func getGenesisBlock(client Client) (*types.Block, error) { - gblock, err := client.GetGenesis() - if err != nil { - return nil, fmt.Errorf("unable to get genesis block, %w", err) - } - - genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) - if !ok { - return nil, fmt.Errorf("unknown genesis state kind") - } - - txs := make([]types.Tx, len(genesisState.Txs)) - for i, tx := range genesisState.Txs { - txs[i], err = amino.MarshalJSON(tx) - if err != nil { - return nil, fmt.Errorf("unable to marshal genesis tx, %w", err) - } - } - - block := &types.Block{ - Header: types.Header{ - NumTxs: int64(len(txs)), - TotalTxs: int64(len(txs)), - Time: gblock.Genesis.GenesisTime, - ChainID: gblock.Genesis.ChainID, - }, - Data: types.Data{ - Txs: txs, - }, - } - - return block, nil -} - // getTxResultFromBatch gets the tx results using batch requests. // In case of encountering an error during fetching (remote temporarily closed, batch error...), // the fetch is attempted again using sequential tx result fetches From 19844373001b13e830acbf335498b2811eb719eb Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 23 Jul 2024 18:52:45 +0200 Subject: [PATCH 15/34] chore: simplify more Signed-off-by: Norman Meier --- fetch/fetch.go | 119 +++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 5e737a78..e4db5207 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -108,15 +108,8 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { txResults[txIndex] = result } - collectorCh <- &workerResponse{ - chunk: &chunk{ - blocks: []*bft_types.Block{block}, - results: [][]*bft_types.TxResult{txResults}, - }, - chunkRange: chunkRange{ - from: 0, - to: 1, - }, + if err := f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1); err != nil { + return err } return nil @@ -232,70 +225,78 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Pop the next chunk f.chunkBuffer.PopFront() - wb := f.storage.WriteBatch() - - // Save the fetched data - for blockIndex, block := range item.chunk.blocks { - if saveErr := wb.SetBlock(block); saveErr != nil { - // This is a design choice that really highlights the strain - // of keeping legacy testnets running. Current TM2 testnets - // have blocks / transactions that are no longer compatible - // with latest "master" changes for Amino, so these blocks / txs are ignored, - // as opposed to this error being a show-stopper for the fetcher - f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) + if err := f.writeBatch(item.chunk.blocks, item.chunk.results, item.chunkRange.from, item.chunkRange.to); err != nil { + return err + } + } + } + } +} - continue - } +func (f *Fetcher) writeBatch(blocks []*bft_types.Block, results [][]*bft_types.TxResult, from, to uint64) error { + wb := f.storage.WriteBatch() - f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) + // Save the fetched data + for blockIndex, block := range blocks { + if saveErr := wb.SetBlock(block); saveErr != nil { + // This is a design choice that really highlights the strain + // of keeping legacy testnets running. Current TM2 testnets + // have blocks / transactions that are no longer compatible + // with latest "master" changes for Amino, so these blocks / txs are ignored, + // as opposed to this error being a show-stopper for the fetcher + f.logger.Error("unable to save block", zap.String("err", saveErr.Error())) - // Get block results - txResults := item.chunk.results[blockIndex] + continue + } - // Save the fetched transaction results - for _, txResult := range txResults { - if err := wb.SetTx(txResult); err != nil { - f.logger.Error("unable to save tx", zap.String("err", err.Error())) + f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) - continue - } + // Get block results + txResults := results[blockIndex] - f.logger.Debug( - "Added tx to batch", - zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), - ) - } + // Save the fetched transaction results + for _, txResult := range txResults { + if err := wb.SetTx(txResult); err != nil { + f.logger.Error("unable to save tx", zap.String("err", err.Error())) - // Alert any listeners of a new saved block - event := &types.NewBlock{ - Block: block, - Results: txResults, - } + continue + } - f.events.SignalEvent(event) - } + f.logger.Debug( + "Added tx to batch", + zap.String("hash", base64.StdEncoding.EncodeToString(txResult.Tx.Hash())), + ) + } - f.logger.Info( - "Added to batch block and tx data for range", - zap.Uint64("from", item.chunkRange.from), - zap.Uint64("to", item.chunkRange.to), - ) + // Alert any listeners of a new saved block + event := &types.NewBlock{ + Block: block, + Results: txResults, + } - // Save the latest height data - if err := wb.SetLatestHeight(item.chunkRange.to); err != nil { - if rErr := wb.Rollback(); rErr != nil { - return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) - } + f.events.SignalEvent(event) + } - return fmt.Errorf("unable to save latest height info, %w", err) - } + f.logger.Info( + "Added to batch block and tx data for range", + zap.Uint64("from", from), + zap.Uint64("to", to), + ) - if err := wb.Commit(); err != nil { - return fmt.Errorf("error persisting block information into storage, %w", err) - } - } + // Save the latest height data + if err := wb.SetLatestHeight(to); err != nil { + if rErr := wb.Rollback(); rErr != nil { + return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) } + + return fmt.Errorf("unable to save latest height info, %w", err) } + + if err := wb.Commit(); err != nil { + return fmt.Errorf("error persisting block information into storage, %w", err) + } + + return nil } func getGenesisBlock(client Client) (*bft_types.Block, error) { From b1b50709d47383f164446e8c459d9fc6cad70ac8 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 23 Jul 2024 18:55:45 +0200 Subject: [PATCH 16/34] chore: reset go mod changesg Signed-off-by: Norman Meier --- go.mod | 5 ----- go.sum | 19 ------------------- 2 files changed, 24 deletions(-) diff --git a/go.mod b/go.mod index 1a6c0dad..1c7cde8a 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,6 @@ require ( ) require ( - dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -54,21 +53,17 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.11.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sosodev/duration v1.3.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/urfave/cli/v2 v2.27.2 // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect - go.etcd.io/bbolt v1.3.9 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect diff --git a/go.sum b/go.sum index 5de18f6e..f3b4a5a9 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,6 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -83,7 +81,6 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8 github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= @@ -111,8 +108,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -153,19 +148,15 @@ github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a/go.mod h1 github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= -github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/olahol/melody v1.2.1 h1:xdwRkzHxf+B0w4TKbGpUSSkV516ZucQZJIWLztOWICQ= github.com/olahol/melody v1.2.1/go.mod h1:GgkTl6Y7yWj/HtfD48Q5vLKPVoZOH+Qqgfa7CvJgJM4= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -189,8 +180,6 @@ github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3c github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= -github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -213,10 +202,6 @@ github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= -github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= -github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= @@ -281,8 +266,6 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/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= @@ -297,7 +280,6 @@ golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= @@ -317,7 +299,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 1aa70467985f480a7e03f1b0e25b13d740dabb32 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 23 Jul 2024 19:13:40 +0200 Subject: [PATCH 17/34] chore: put outside of FetchChainData routine to preserve tests Signed-off-by: Norman Meier --- cmd/start.go | 4 +++ fetch/fetch.go | 71 +++++++++++++++++++++++--------------------------- go.mod | 5 ++++ go.sum | 19 ++++++++++++++ 4 files changed, 61 insertions(+), 38 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index 16605b1f..7a621fe3 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -159,6 +159,10 @@ func (c *startCfg) exec(ctx context.Context) error { fetch.WithMaxChunkSize(c.maxChunkSize), ) + if err := f.FetchGenesisData(); err != nil { + return fmt.Errorf("unable to fetch genesis data: %w", err) + } + // Create the JSON-RPC service j := setupJSONRPC( db, diff --git a/fetch/fetch.go b/fetch/fetch.go index e4db5207..faa1bb06 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -70,50 +70,49 @@ func New( return f } -// FetchChainData starts the fetching process that indexes -// blockchain data -func (f *Fetcher) FetchChainData(ctx context.Context) error { - collectorCh := make(chan *workerResponse, DefaultMaxSlots) +func (f *Fetcher) FetchGenesisData() error { + _, err := f.storage.GetLatestHeight() + isInit := errors.Is(err, storageErrors.ErrNotFound) - // attemptGenesisFetch - attemptGenesisFetch := func() error { - f.logger.Info("Fetching genesis") + if !isInit { + return nil + } - _, err := f.storage.GetLatestHeight() - isInit := errors.Is(err, storageErrors.ErrNotFound) + f.logger.Info("Fetching genesis") - if !isInit { - return nil - } + block, err := getGenesisBlock(f.client) + if err != nil { + return fmt.Errorf("failed to fetch genesis block: %w", err) + } - block, err := getGenesisBlock(f.client) - if err != nil { - return fmt.Errorf("failed to fetch genesis block: %w", err) - } + results, err := f.client.GetBlockResults(0) + if err != nil { + return fmt.Errorf("failed to fetch genesis results: %w", err) + } - results, err := f.client.GetBlockResults(0) - if err != nil { - return fmt.Errorf("failed to fetch genesis results: %w", err) + txResults := make([]*bft_types.TxResult, len(block.Txs)) + for txIndex, tx := range block.Txs { + result := &bft_types.TxResult{ + Height: 0, + Index: uint32(txIndex), + Tx: tx, + Response: results.Results.DeliverTxs[txIndex], } - txResults := make([]*bft_types.TxResult, len(block.Txs)) - for txIndex, tx := range block.Txs { - result := &bft_types.TxResult{ - Height: 0, - Index: uint32(txIndex), - Tx: tx, - Response: results.Results.DeliverTxs[txIndex], - } + txResults[txIndex] = result + } - txResults[txIndex] = result - } + if err := f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1); err != nil { + return err + } - if err := f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1); err != nil { - return err - } + return nil +} - return nil - } +// FetchChainData starts the fetching process that indexes +// blockchain data +func (f *Fetcher) FetchChainData(ctx context.Context) error { + collectorCh := make(chan *workerResponse, DefaultMaxSlots) // attemptRangeFetch compares local and remote state // and spawns workers to fetch chunks of the chain @@ -174,10 +173,6 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { defer ticker.Stop() // Execute the initial "catch up" with the chain - if err := attemptGenesisFetch(); err != nil { - return err - } - if err := attemptRangeFetch(); err != nil { return err } diff --git a/go.mod b/go.mod index 1c7cde8a..1a6c0dad 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( ) require ( + dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -53,17 +54,21 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sosodev/duration v1.3.1 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/urfave/cli/v2 v2.27.2 // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect + go.etcd.io/bbolt v1.3.9 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect diff --git a/go.sum b/go.sum index f3b4a5a9..5de18f6e 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,8 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -81,6 +83,7 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8 github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= @@ -108,6 +111,8 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -148,15 +153,19 @@ github.com/madz-lab/insertion-queue v0.0.0-20230520191346-295d3348f63a/go.mod h1 github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/olahol/melody v1.2.1 h1:xdwRkzHxf+B0w4TKbGpUSSkV516ZucQZJIWLztOWICQ= github.com/olahol/melody v1.2.1/go.mod h1:GgkTl6Y7yWj/HtfD48Q5vLKPVoZOH+Qqgfa7CvJgJM4= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -180,6 +189,8 @@ github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3c github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= +github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -202,6 +213,10 @@ github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= @@ -266,6 +281,8 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/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= @@ -280,6 +297,7 @@ golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= @@ -299,6 +317,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From da69db6bdcb40a8d30c37e488104bd2a303fd613 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Tue, 23 Jul 2024 19:51:09 +0200 Subject: [PATCH 18/34] chore: lint Signed-off-by: Norman Meier --- fetch/fetch.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index faa1bb06..f1b2af2e 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -91,6 +91,7 @@ func (f *Fetcher) FetchGenesisData() error { } txResults := make([]*bft_types.TxResult, len(block.Txs)) + for txIndex, tx := range block.Txs { result := &bft_types.TxResult{ Height: 0, @@ -220,7 +221,12 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Pop the next chunk f.chunkBuffer.PopFront() - if err := f.writeBatch(item.chunk.blocks, item.chunk.results, item.chunkRange.from, item.chunkRange.to); err != nil { + if err := f.writeBatch( + item.chunk.blocks, + item.chunk.results, + item.chunkRange.from, + item.chunkRange.to, + ); err != nil { return err } } From 40cb71105d9be5c17a315dcd35d2483cb2d300a7 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 11:08:57 +0200 Subject: [PATCH 19/34] fix: don't swallow storage error Signed-off-by: Norman Meier --- fetch/fetch.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index f1b2af2e..359cd31b 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -72,10 +72,8 @@ func New( func (f *Fetcher) FetchGenesisData() error { _, err := f.storage.GetLatestHeight() - isInit := errors.Is(err, storageErrors.ErrNotFound) - - if !isInit { - return nil + if !errors.Is(err, storageErrors.ErrNotFound) { + return err } f.logger.Info("Fetching genesis") From b9b7e16a421b61054d33feed68bbc983c9b90189 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 11:09:10 +0200 Subject: [PATCH 20/34] chore: redundant case Signed-off-by: Norman Meier --- fetch/fetch.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 359cd31b..813e6c0a 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -101,11 +101,7 @@ func (f *Fetcher) FetchGenesisData() error { txResults[txIndex] = result } - if err := f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1); err != nil { - return err - } - - return nil + return f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1) } // FetchChainData starts the fetching process that indexes From 24e01699983df1a22e8573fba2e3b1038c4abc57 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 11:09:21 +0200 Subject: [PATCH 21/34] chore: print unknown type Signed-off-by: Norman Meier --- fetch/fetch.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 813e6c0a..a0ee94e5 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -300,9 +300,10 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) { return nil, fmt.Errorf("unable to get genesis block, %w", err) } - genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) + appState := gblock.Genesis.AppState + genesisState, ok := appState.(gnoland.GnoGenesisState) if !ok { - return nil, fmt.Errorf("unknown genesis state kind") + return nil, fmt.Errorf("unknown genesis state kind '%T'", appState) } txs := make([]bft_types.Tx, len(genesisState.Txs)) From 05af58a37ea4568e3651e47f020b8aa7983bb478 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 14:43:07 +0200 Subject: [PATCH 22/34] chore: lint Signed-off-by: Norman Meier --- fetch/fetch.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fetch/fetch.go b/fetch/fetch.go index a0ee94e5..8329b432 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -301,6 +301,7 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) { } appState := gblock.Genesis.AppState + genesisState, ok := appState.(gnoland.GnoGenesisState) if !ok { return nil, fmt.Errorf("unknown genesis state kind '%T'", appState) From 763c68ac29fa7f90b43673205e0d9ba82bb6039f Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 15:33:26 +0200 Subject: [PATCH 23/34] chore: add genesis fetch tests Signed-off-by: Norman Meier --- fetch/fetch_test.go | 115 ++++++++++++++++++++++++++++++++++++++++++++ fetch/mocks_test.go | 6 +++ 2 files changed, 121 insertions(+) diff --git a/fetch/fetch_test.go b/fetch/fetch_test.go index b910aba4..3936e249 100644 --- a/fetch/fetch_test.go +++ b/fetch/fetch_test.go @@ -7,11 +7,13 @@ import ( "testing" "time" + "github.com/gnolang/gno/gno.land/pkg/gnoland" "github.com/gnolang/gno/tm2/pkg/amino" abci "github.com/gnolang/gno/tm2/pkg/bft/abci/types" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" "github.com/gnolang/gno/tm2/pkg/bft/state" "github.com/gnolang/gno/tm2/pkg/bft/types" + bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" "github.com/gnolang/gno/tm2/pkg/std" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -903,6 +905,119 @@ func TestFetcher_InvalidBlocks(t *testing.T) { assert.Len(t, capturedEvents, 0) } +func TestFetcher_Genesis(t *testing.T) { + t.Parallel() + + var ( + txCount = 21 + txs = generateTransactions(t, txCount) + savedBlocks = map[int64]*types.Block{} + savedTxs = map[string]*types.TxResult{} + + capturedEvents = make([]*indexerTypes.NewBlock, 0) + + mockEvents = &mockEvents{ + signalEventFn: func(e events.Event) { + blockEvent, ok := e.(*indexerTypes.NewBlock) + require.True(t, ok) + + capturedEvents = append(capturedEvents, blockEvent) + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetBlockFn: func(height uint64) (*types.Block, error) { + block, ok := savedBlocks[int64(height)] + require.True(t, ok) + return block, nil + }, + GetTxFn: func(height uint64, index uint32) (*types.TxResult, error) { + tx, ok := savedTxs[fmt.Sprintf("%d-%d", height, index)] + require.True(t, ok) + return tx, nil + }, + GetWriteBatchFn: func() storage.Batch { + return &mock.WriteBatch{ + SetBlockFn: func(block *types.Block) error { + _, ok := savedBlocks[block.Height] + require.False(t, ok) + savedBlocks[block.Height] = block + return nil + }, + SetTxFn: func(tx *types.TxResult) error { + savedTxs[fmt.Sprintf("%d-%d", tx.Height, tx.Index)] = tx + return nil + }, + } + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + localTxs := make([]std.Tx, len(txs)) + for i, tx := range txs { + localTxs[i] = *tx + } + return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{AppState: gnoland.GnoGenesisState{ + Txs: localTxs, + }}}, nil + }, + getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + return &core_types.ResultBlockResults{ + Results: &state.ABCIResponses{ + DeliverTxs: make([]abci.ResponseDeliverTx, len(txs)), + }, + }, nil + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.NoError(t, f.FetchGenesisData()) + + _, err := mockStorage.GetBlock(0) + require.NoError(t, err) + + for i := uint32(0); i < uint32(len(txs)); i++ { + tx, err := mockStorage.GetTx(0, i) + require.NoError(t, err) + expected := &types.TxResult{ + Height: 0, + Index: i, + Tx: amino.MustMarshalJSON(txs[i]), + Response: abci.ResponseDeliverTx{}, + } + require.Equal(t, expected, tx) + } +} + +func TestFetcher_GenesisAlreadyFetched(t *testing.T) { + t.Parallel() + + var ( + mockEvents = &mockEvents{} + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, nil + }, + } + + mockClient = &mockClient{} + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.NoError(t, f.FetchGenesisData()) +} + // generateTransactions generates dummy transactions func generateTransactions(t *testing.T, count int) []*std.Tx { t.Helper() diff --git a/fetch/mocks_test.go b/fetch/mocks_test.go index 4ed80cc5..4837e626 100644 --- a/fetch/mocks_test.go +++ b/fetch/mocks_test.go @@ -15,6 +15,7 @@ type ( getLatestBlockNumberDelegate func() (uint64, error) getBlockDelegate func(uint64) (*core_types.ResultBlock, error) getBlockResultsDelegate func(uint64) (*core_types.ResultBlockResults, error) + getGenesisDelegate func() (*core_types.ResultGenesis, error) createBatchDelegate func() clientTypes.Batch ) @@ -23,6 +24,7 @@ type mockClient struct { getLatestBlockNumberFn getLatestBlockNumberDelegate getBlockFn getBlockDelegate getBlockResultsFn getBlockResultsDelegate + getGenesisFn getGenesisDelegate createBatchFn createBatchDelegate } @@ -44,6 +46,10 @@ func (m *mockClient) GetBlock(blockNum uint64) (*core_types.ResultBlock, error) } func (m *mockClient) GetGenesis() (*core_types.ResultGenesis, error) { + if m.getGenesisFn != nil { + return m.getGenesisFn() + } + return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{AppState: gnoland.GnoGenesisState{}}}, nil } From 6f1bde7a161141f819997bda7be4c07a897f7c10 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 24 Jul 2024 15:36:50 +0200 Subject: [PATCH 24/34] chore: lint Signed-off-by: Norman Meier --- fetch/fetch_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fetch/fetch_test.go b/fetch/fetch_test.go index 3936e249..8e0eb96b 100644 --- a/fetch/fetch_test.go +++ b/fetch/fetch_test.go @@ -13,7 +13,6 @@ import ( core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" "github.com/gnolang/gno/tm2/pkg/bft/state" "github.com/gnolang/gno/tm2/pkg/bft/types" - bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" "github.com/gnolang/gno/tm2/pkg/std" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -932,11 +931,13 @@ func TestFetcher_Genesis(t *testing.T) { GetBlockFn: func(height uint64) (*types.Block, error) { block, ok := savedBlocks[int64(height)] require.True(t, ok) + return block, nil }, GetTxFn: func(height uint64, index uint32) (*types.TxResult, error) { tx, ok := savedTxs[fmt.Sprintf("%d-%d", height, index)] require.True(t, ok) + return tx, nil }, GetWriteBatchFn: func() storage.Batch { @@ -945,10 +946,12 @@ func TestFetcher_Genesis(t *testing.T) { _, ok := savedBlocks[block.Height] require.False(t, ok) savedBlocks[block.Height] = block + return nil }, SetTxFn: func(tx *types.TxResult) error { savedTxs[fmt.Sprintf("%d-%d", tx.Height, tx.Index)] = tx + return nil }, } @@ -964,11 +967,12 @@ func TestFetcher_Genesis(t *testing.T) { for i, tx := range txs { localTxs[i] = *tx } - return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{AppState: gnoland.GnoGenesisState{ + + return &core_types.ResultGenesis{Genesis: &types.GenesisDoc{AppState: gnoland.GnoGenesisState{ Txs: localTxs, }}}, nil }, - getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { return &core_types.ResultBlockResults{ Results: &state.ABCIResponses{ DeliverTxs: make([]abci.ResponseDeliverTx, len(txs)), @@ -988,6 +992,7 @@ func TestFetcher_Genesis(t *testing.T) { for i := uint32(0); i < uint32(len(txs)); i++ { tx, err := mockStorage.GetTx(0, i) require.NoError(t, err) + expected := &types.TxResult{ Height: 0, Index: i, From 0a31d61dbc390dbc1b055304d4fe50a996748e55 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 31 Jul 2024 16:49:07 +0200 Subject: [PATCH 25/34] fix: improve tests and catch nil derefs Signed-off-by: Norman Meier --- fetch/fetch.go | 12 ++- fetch/fetch_test.go | 229 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 223 insertions(+), 18 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 8329b432..39d7b3cf 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -88,6 +88,10 @@ func (f *Fetcher) FetchGenesisData() error { return fmt.Errorf("failed to fetch genesis results: %w", err) } + if results.Results == nil { + return errors.New("nil results") + } + txResults := make([]*bft_types.TxResult, len(block.Txs)) for txIndex, tx := range block.Txs { @@ -297,7 +301,11 @@ func (f *Fetcher) writeBatch(blocks []*bft_types.Block, results [][]*bft_types.T func getGenesisBlock(client Client) (*bft_types.Block, error) { gblock, err := client.GetGenesis() if err != nil { - return nil, fmt.Errorf("unable to get genesis block, %w", err) + return nil, fmt.Errorf("unable to get genesis block: %w", err) + } + + if gblock.Genesis == nil { + return nil, fmt.Errorf("nil genesis doc") } appState := gblock.Genesis.AppState @@ -311,7 +319,7 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) { for i, tx := range genesisState.Txs { txs[i], err = amino.MarshalJSON(tx) if err != nil { - return nil, fmt.Errorf("unable to marshal genesis tx, %w", err) + return nil, fmt.Errorf("unable to marshal genesis tx: %w", err) } } diff --git a/fetch/fetch_test.go b/fetch/fetch_test.go index 8e0eb96b..ce946633 100644 --- a/fetch/fetch_test.go +++ b/fetch/fetch_test.go @@ -928,18 +928,6 @@ func TestFetcher_Genesis(t *testing.T) { GetLatestSavedHeightFn: func() (uint64, error) { return 0, storageErrors.ErrNotFound }, - GetBlockFn: func(height uint64) (*types.Block, error) { - block, ok := savedBlocks[int64(height)] - require.True(t, ok) - - return block, nil - }, - GetTxFn: func(height uint64, index uint32) (*types.TxResult, error) { - tx, ok := savedTxs[fmt.Sprintf("%d-%d", height, index)] - require.True(t, ok) - - return tx, nil - }, GetWriteBatchFn: func() storage.Batch { return &mock.WriteBatch{ SetBlockFn: func(block *types.Block) error { @@ -986,12 +974,14 @@ func TestFetcher_Genesis(t *testing.T) { require.NoError(t, f.FetchGenesisData()) - _, err := mockStorage.GetBlock(0) - require.NoError(t, err) + require.Len(t, capturedEvents, 1) + + _, ok := savedBlocks[0] + require.True(t, ok) for i := uint32(0); i < uint32(len(txs)); i++ { - tx, err := mockStorage.GetTx(0, i) - require.NoError(t, err) + tx, ok := savedTxs[fmt.Sprintf("0-%d", i)] + require.True(t, ok) expected := &types.TxResult{ Height: 0, @@ -1023,6 +1013,213 @@ func TestFetcher_GenesisAlreadyFetched(t *testing.T) { require.NoError(t, f.FetchGenesisData()) } +func TestFetcher_GenesisFetchError(t *testing.T) { + t.Parallel() + + var ( + remoteErr = errors.New("remote error") + + mockEvents = &mockEvents{ + signalEventFn: func(_ events.Event) { + require.Fail(t, "should not emit events") + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetWriteBatchFn: func() storage.Batch { + require.Fail(t, "should not attempt to write to storage") + + return nil + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return nil, remoteErr + }, + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { + require.Fail(t, "should not attempt to fetch block results") + + return nil, nil + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.ErrorIs(t, f.FetchGenesisData(), remoteErr) +} + +func TestFetcher_GenesisInvalidState(t *testing.T) { + t.Parallel() + + var ( + mockEvents = &mockEvents{ + signalEventFn: func(_ events.Event) { + require.Fail(t, "should not emit events") + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetWriteBatchFn: func() storage.Batch { + require.Fail(t, "should not attempt to write to storage") + + return nil + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{Genesis: &types.GenesisDoc{AppState: 0xdeadbeef}}, nil + }, + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { + require.Fail(t, "should not attempt to fetch block results") + + return nil, nil + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.ErrorContains(t, f.FetchGenesisData(), "unknown genesis state kind 'int'") +} + +func TestFetcher_GenesisFetchResultsError(t *testing.T) { + t.Parallel() + + var ( + remoteErr = errors.New("remote error") + + mockEvents = &mockEvents{ + signalEventFn: func(_ events.Event) { + require.Fail(t, "should not emit events") + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetWriteBatchFn: func() storage.Batch { + require.Fail(t, "should not attempt to write to storage") + + return nil + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{Txs: []std.Tx{{}}}, + }}, nil + }, + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { + return nil, remoteErr + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.ErrorIs(t, f.FetchGenesisData(), remoteErr) +} + +func TestFetcher_GenesisNilGenesisDoc(t *testing.T) { + t.Parallel() + + var ( + mockEvents = &mockEvents{ + signalEventFn: func(_ events.Event) { + require.Fail(t, "should not emit events") + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetWriteBatchFn: func() storage.Batch { + require.Fail(t, "should not attempt to write") + + return nil + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{Genesis: nil}, nil + }, + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { + return &core_types.ResultBlockResults{Results: &state.ABCIResponses{}}, nil + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.Error(t, f.FetchGenesisData()) +} + +func TestFetcher_GenesisNilResults(t *testing.T) { + t.Parallel() + + var ( + mockEvents = &mockEvents{ + signalEventFn: func(_ events.Event) { + require.Fail(t, "should not emit events") + }, + } + + mockStorage = &mock.Storage{ + GetLatestSavedHeightFn: func() (uint64, error) { + return 0, storageErrors.ErrNotFound + }, + GetWriteBatchFn: func() storage.Batch { + require.Fail(t, "should not attempt to write") + + return nil + }, + } + + mockClient = &mockClient{ + getLatestBlockNumberFn: func() (uint64, error) { + return 0, nil + }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{Txs: []std.Tx{{}}}, + }}, nil + }, + getBlockResultsFn: func(uint64) (*core_types.ResultBlockResults, error) { + return &core_types.ResultBlockResults{Results: nil}, nil + }, + } + ) + + f := New(mockStorage, mockClient, mockEvents) + + require.Error(t, f.FetchGenesisData()) +} + // generateTransactions generates dummy transactions func generateTransactions(t *testing.T, count int) []*std.Tx { t.Helper() From 0632c4384fffc4e9841a290d68637de89b6d35a1 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 7 Aug 2024 16:46:14 +0200 Subject: [PATCH 26/34] chore: default noop GetGenesis in mock Signed-off-by: Norman Meier --- fetch/mocks_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fetch/mocks_test.go b/fetch/mocks_test.go index 4837e626..bd76e85c 100644 --- a/fetch/mocks_test.go +++ b/fetch/mocks_test.go @@ -3,9 +3,7 @@ package fetch import ( "context" - "github.com/gnolang/gno/gno.land/pkg/gnoland" core_types "github.com/gnolang/gno/tm2/pkg/bft/rpc/core/types" - bft_types "github.com/gnolang/gno/tm2/pkg/bft/types" clientTypes "github.com/gnolang/tx-indexer/client/types" "github.com/gnolang/tx-indexer/events" @@ -50,7 +48,7 @@ func (m *mockClient) GetGenesis() (*core_types.ResultGenesis, error) { return m.getGenesisFn() } - return &core_types.ResultGenesis{Genesis: &bft_types.GenesisDoc{AppState: gnoland.GnoGenesisState{}}}, nil + return nil, nil } func (m *mockClient) GetBlockResults(blockNum uint64) (*core_types.ResultBlockResults, error) { From 4e17d199b9b3f7dec77860696351a526d694ca7e Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Wed, 7 Aug 2024 16:48:35 +0200 Subject: [PATCH 27/34] chore: inline var Signed-off-by: Norman Meier --- fetch/fetch.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 39d7b3cf..b147e0d9 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -308,11 +308,9 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) { return nil, fmt.Errorf("nil genesis doc") } - appState := gblock.Genesis.AppState - - genesisState, ok := appState.(gnoland.GnoGenesisState) + genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) if !ok { - return nil, fmt.Errorf("unknown genesis state kind '%T'", appState) + return nil, fmt.Errorf("unknown genesis state kind '%T'", gblock.Genesis.AppState) } txs := make([]bft_types.Tx, len(genesisState.Txs)) From 7fd4a67445f872473ef033a03c2695b232451c71 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Thu, 15 Aug 2024 14:18:06 +0200 Subject: [PATCH 28/34] fix: don't skip block 1 Signed-off-by: Norman Meier --- fetch/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index b147e0d9..62e902fe 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -105,7 +105,7 @@ func (f *Fetcher) FetchGenesisData() error { txResults[txIndex] = result } - return f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 1) + return f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 0) } // FetchChainData starts the fetching process that indexes From ccf72e1b36566da7283a381635c5104c557fc8c0 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Thu, 15 Aug 2024 14:19:41 +0200 Subject: [PATCH 29/34] chore: write slots Signed-off-by: Norman Meier --- fetch/fetch.go | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 62e902fe..c2065e4d 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -105,7 +105,18 @@ func (f *Fetcher) FetchGenesisData() error { txResults[txIndex] = result } - return f.writeBatch([]*bft_types.Block{block}, [][]*bft_types.TxResult{txResults}, 0, 0) + s := &slot{ + chunk: &chunk{ + blocks: []*bft_types.Block{block}, + results: [][]*bft_types.TxResult{txResults}, + }, + chunkRange: chunkRange{ + from: 0, + to: 0, + }, + } + + return f.writeSlot(s) } // FetchChainData starts the fetching process that indexes @@ -219,12 +230,7 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { // Pop the next chunk f.chunkBuffer.PopFront() - if err := f.writeBatch( - item.chunk.blocks, - item.chunk.results, - item.chunkRange.from, - item.chunkRange.to, - ); err != nil { + if err := f.writeSlot(item); err != nil { return err } } @@ -232,11 +238,11 @@ func (f *Fetcher) FetchChainData(ctx context.Context) error { } } -func (f *Fetcher) writeBatch(blocks []*bft_types.Block, results [][]*bft_types.TxResult, from, to uint64) error { +func (f *Fetcher) writeSlot(s *slot) error { wb := f.storage.WriteBatch() // Save the fetched data - for blockIndex, block := range blocks { + for blockIndex, block := range s.chunk.blocks { if saveErr := wb.SetBlock(block); saveErr != nil { // This is a design choice that really highlights the strain // of keeping legacy testnets running. Current TM2 testnets @@ -251,7 +257,7 @@ func (f *Fetcher) writeBatch(blocks []*bft_types.Block, results [][]*bft_types.T f.logger.Debug("Added block data to batch", zap.Int64("number", block.Height)) // Get block results - txResults := results[blockIndex] + txResults := s.chunk.results[blockIndex] // Save the fetched transaction results for _, txResult := range txResults { @@ -278,12 +284,12 @@ func (f *Fetcher) writeBatch(blocks []*bft_types.Block, results [][]*bft_types.T f.logger.Info( "Added to batch block and tx data for range", - zap.Uint64("from", from), - zap.Uint64("to", to), + zap.Uint64("from", s.chunkRange.from), + zap.Uint64("to", s.chunkRange.to), ) // Save the latest height data - if err := wb.SetLatestHeight(to); err != nil { + if err := wb.SetLatestHeight(s.chunkRange.to); err != nil { if rErr := wb.Rollback(); rErr != nil { return fmt.Errorf("unable to save latest height info, %w, %w", err, rErr) } From 583a722e6b5cff93f2be4d539479e4ab4445c7e6 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Thu, 15 Aug 2024 14:36:39 +0200 Subject: [PATCH 30/34] chore: put FetchGenesisData in FetchChainData Signed-off-by: Norman Meier --- cmd/start.go | 4 ---- fetch/fetch.go | 6 +++++- fetch/fetch_test.go | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index 7a621fe3..16605b1f 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -159,10 +159,6 @@ func (c *startCfg) exec(ctx context.Context) error { fetch.WithMaxChunkSize(c.maxChunkSize), ) - if err := f.FetchGenesisData(); err != nil { - return fmt.Errorf("unable to fetch genesis data: %w", err) - } - // Create the JSON-RPC service j := setupJSONRPC( db, diff --git a/fetch/fetch.go b/fetch/fetch.go index c2065e4d..4fac67c9 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -70,7 +70,7 @@ func New( return f } -func (f *Fetcher) FetchGenesisData() error { +func (f *Fetcher) fetchGenesisData() error { _, err := f.storage.GetLatestHeight() if !errors.Is(err, storageErrors.ErrNotFound) { return err @@ -122,6 +122,10 @@ func (f *Fetcher) FetchGenesisData() error { // FetchChainData starts the fetching process that indexes // blockchain data func (f *Fetcher) FetchChainData(ctx context.Context) error { + if err := f.fetchGenesisData(); err != nil { + return fmt.Errorf("unable to fetch genesis data: %w", err) + } + collectorCh := make(chan *workerResponse, DefaultMaxSlots) // attemptRangeFetch compares local and remote state diff --git a/fetch/fetch_test.go b/fetch/fetch_test.go index ce946633..92abe171 100644 --- a/fetch/fetch_test.go +++ b/fetch/fetch_test.go @@ -972,7 +972,7 @@ func TestFetcher_Genesis(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.NoError(t, f.FetchGenesisData()) + require.NoError(t, f.fetchGenesisData()) require.Len(t, capturedEvents, 1) @@ -1010,7 +1010,7 @@ func TestFetcher_GenesisAlreadyFetched(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.NoError(t, f.FetchGenesisData()) + require.NoError(t, f.fetchGenesisData()) } func TestFetcher_GenesisFetchError(t *testing.T) { @@ -1053,7 +1053,7 @@ func TestFetcher_GenesisFetchError(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.ErrorIs(t, f.FetchGenesisData(), remoteErr) + require.ErrorIs(t, f.fetchGenesisData(), remoteErr) } func TestFetcher_GenesisInvalidState(t *testing.T) { @@ -1094,7 +1094,7 @@ func TestFetcher_GenesisInvalidState(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.ErrorContains(t, f.FetchGenesisData(), "unknown genesis state kind 'int'") + require.ErrorContains(t, f.fetchGenesisData(), "unknown genesis state kind 'int'") } func TestFetcher_GenesisFetchResultsError(t *testing.T) { @@ -1137,7 +1137,7 @@ func TestFetcher_GenesisFetchResultsError(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.ErrorIs(t, f.FetchGenesisData(), remoteErr) + require.ErrorIs(t, f.fetchGenesisData(), remoteErr) } func TestFetcher_GenesisNilGenesisDoc(t *testing.T) { @@ -1176,7 +1176,7 @@ func TestFetcher_GenesisNilGenesisDoc(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.Error(t, f.FetchGenesisData()) + require.Error(t, f.fetchGenesisData()) } func TestFetcher_GenesisNilResults(t *testing.T) { @@ -1217,7 +1217,7 @@ func TestFetcher_GenesisNilResults(t *testing.T) { f := New(mockStorage, mockClient, mockEvents) - require.Error(t, f.FetchGenesisData()) + require.Error(t, f.fetchGenesisData()) } // generateTransactions generates dummy transactions From 42b9dc8c781b63ee49f402d6b65ddabf869515fe Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Thu, 15 Aug 2024 14:38:47 +0200 Subject: [PATCH 31/34] chore: add comments around confusing condition Signed-off-by: Norman Meier --- fetch/fetch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fetch/fetch.go b/fetch/fetch.go index 4fac67c9..5a676ed3 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -72,6 +72,10 @@ func New( func (f *Fetcher) fetchGenesisData() error { _, err := f.storage.GetLatestHeight() + // Possible cases: + // - err is ErrNotFound: the storage is empty, we execute the rest of the routine and fetch+write genesis data + // - err is nil: the storage has a latest height, this means at least the genesis data has been written, or some blocks past it, we do nothing and return nil + // - err is something else: there has been a storage error, we do nothing and return this error if !errors.Is(err, storageErrors.ErrNotFound) { return err } From 4feb0f05f100965ccdd58455e29657d0810f3c40 Mon Sep 17 00:00:00 2001 From: Norman Meier Date: Thu, 15 Aug 2024 14:41:04 +0200 Subject: [PATCH 32/34] chore: please linter Signed-off-by: Norman Meier --- fetch/fetch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 5a676ed3..a3684853 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -74,7 +74,8 @@ func (f *Fetcher) fetchGenesisData() error { _, err := f.storage.GetLatestHeight() // Possible cases: // - err is ErrNotFound: the storage is empty, we execute the rest of the routine and fetch+write genesis data - // - err is nil: the storage has a latest height, this means at least the genesis data has been written, or some blocks past it, we do nothing and return nil + // - err is nil: the storage has a latest height, this means at least the genesis data has been written, + // or some blocks past it, we do nothing and return nil // - err is something else: there has been a storage error, we do nothing and return this error if !errors.Is(err, storageErrors.ErrNotFound) { return err From e1bc10482ecd29a7099f4179114ad55d7bc5e1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20=C5=BDivkovi=C4=87?= Date: Fri, 13 Sep 2024 11:46:06 +0200 Subject: [PATCH 33/34] Fix tests --- fetch/fetch.go | 4 +- fetch/fetch_test.go | 186 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 161 insertions(+), 29 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index a3684853..5b4060cf 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -24,6 +24,8 @@ const ( DefaultMaxChunkSize = 100 ) +var errInvalidGenesisState = errors.New("invalid genesis state") + // Fetcher is an instance of the block indexer // fetcher type Fetcher struct { @@ -320,7 +322,7 @@ func getGenesisBlock(client Client) (*bft_types.Block, error) { } if gblock.Genesis == nil { - return nil, fmt.Errorf("nil genesis doc") + return nil, errInvalidGenesisState } genesisState, ok := gblock.Genesis.AppState.(gnoland.GnoGenesisState) diff --git a/fetch/fetch_test.go b/fetch/fetch_test.go index 92abe171..8fcbca0f 100644 --- a/fetch/fetch_test.go +++ b/fetch/fetch_test.go @@ -159,6 +159,16 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { }, }, nil }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, } ) @@ -184,8 +194,8 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { // Verify the transactions are saved correctly require.Len(t, savedTxs, blockNum*txCount) - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) for txIndex := 0; txIndex < txCount; txIndex++ { // since this is a linearized array of transactions @@ -200,9 +210,14 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { } // Make sure proper events were emitted - require.Len(t, capturedEvents, len(blocks)-1) + require.Len(t, capturedEvents, len(blocks)) for index, event := range capturedEvents { + if index == 0 { + // Dummy genesis block + continue + } + if event.GetType() != indexerTypes.NewBlockEvent { continue } @@ -211,13 +226,13 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { require.True(t, ok) // Make sure the block is valid - assert.Equal(t, blocks[index+1], eventData.Block) + assert.Equal(t, blocks[index], eventData.Block) // Make sure the transaction results are valid require.Len(t, eventData.Results, txCount) for txIndex, tx := range eventData.Results { - assert.EqualValues(t, blocks[index+1].Height, tx.Height) + assert.EqualValues(t, blocks[index].Height, tx.Height) assert.EqualValues(t, txIndex, tx.Index) assert.Equal(t, serializedTxs[txIndex], tx.Tx) } @@ -337,6 +352,29 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { getLatestBlockNumberFn: func() (uint64, error) { return uint64(blockNum), nil }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, + getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + // Sanity check + if num > uint64(blockNum) { + t.Fatalf("invalid block requested, %d", num) + } + + return &core_types.ResultBlockResults{ + Height: int64(num), + Results: &state.ABCIResponses{ + DeliverTxs: make([]abci.ResponseDeliverTx, txCount), + }, + }, nil + }, } ) @@ -368,8 +406,8 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { // Verify the transactions are saved correctly require.Len(t, savedTxs, blockNum*txCount) - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) for txIndex := 0; txIndex < txCount; txIndex++ { // since this is a linearized array of transactions @@ -384,18 +422,23 @@ func TestFetcher_FetchTransactions_Valid_FullBlocks(t *testing.T) { } // Make sure proper events were emitted - require.Len(t, capturedEvents, len(blocks)-1) + require.Len(t, capturedEvents, len(blocks)) for index, event := range capturedEvents { + if index == 0 { + // Dummy genesis block + continue + } + // Make sure the block is valid eventData := event.(*indexerTypes.NewBlock) - assert.Equal(t, blocks[index+1], eventData.Block) + assert.Equal(t, blocks[index], eventData.Block) // Make sure the transaction results are valid require.Len(t, eventData.Results, txCount) for txIndex, tx := range eventData.Results { - assert.EqualValues(t, blocks[index+1].Height, tx.Height) + assert.EqualValues(t, blocks[index].Height, tx.Height) assert.EqualValues(t, txIndex, tx.Index) assert.Equal(t, serializedTxs[txIndex], tx.Tx) } @@ -508,6 +551,16 @@ func TestFetcher_FetchTransactions_Valid_FullTransactions(t *testing.T) { }, }, nil }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, } ) @@ -533,16 +586,16 @@ func TestFetcher_FetchTransactions_Valid_FullTransactions(t *testing.T) { // Verify the transactions are saved correctly require.Len(t, savedTxs, blockNum*txCount) - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) for txIndex := 0; txIndex < txCount; txIndex++ { // since this is a linearized array of transactions // we can access each item with: blockNum * length + txIndx // where blockNum is the y-axis, and txIndx is the x-axis - tx := savedTxs[blockIndex*txCount+txIndex] + tx := savedTxs[(blockIndex-1)*txCount+txIndex] - assert.EqualValues(t, blockIndex+1, tx.Height) + assert.EqualValues(t, blockIndex, tx.Height) assert.EqualValues(t, txIndex, tx.Index) assert.Equal(t, serializedTxs[txIndex], tx.Tx) } @@ -550,10 +603,15 @@ func TestFetcher_FetchTransactions_Valid_FullTransactions(t *testing.T) { // Make sure proper events were emitted // Blocks each have as many transactions as txCount. - txEventCount := (len(blocks) - 1) + txEventCount := len(blocks) require.Len(t, capturedEvents, txEventCount) for index, event := range capturedEvents { + if index == 0 { + // Dummy genesis block + continue + } + if event.GetType() != indexerTypes.NewBlockEvent { continue } @@ -562,13 +620,13 @@ func TestFetcher_FetchTransactions_Valid_FullTransactions(t *testing.T) { require.True(t, ok) // Make sure the block is valid - assert.Equal(t, blocks[index+1], eventData.Block) + assert.Equal(t, blocks[index], eventData.Block) // Make sure the transaction results are valid require.Len(t, eventData.Results, txCount) for txIndex, tx := range eventData.Results { - assert.EqualValues(t, blocks[index+1].Height, tx.Height) + assert.EqualValues(t, blocks[index].Height, tx.Height) assert.EqualValues(t, txIndex, tx.Index) assert.Equal(t, serializedTxs[txIndex], tx.Tx) } @@ -651,11 +709,30 @@ func TestFetcher_FetchTransactions_Valid_EmptyBlocks(t *testing.T) { Block: blocks[num], }, nil }, - getBlockResultsFn: func(_ uint64) (*core_types.ResultBlockResults, error) { + getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + if num == 0 { + return &core_types.ResultBlockResults{ + Height: int64(num), + Results: &state.ABCIResponses{ + DeliverTxs: make([]abci.ResponseDeliverTx, 0), + }, + }, nil + } + t.Fatalf("should not request results") return nil, nil }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, } ) @@ -669,16 +746,21 @@ func TestFetcher_FetchTransactions_Valid_EmptyBlocks(t *testing.T) { // Run the fetch require.NoError(t, f.FetchChainData(ctx)) - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) } // Make sure proper events were emitted - require.Len(t, capturedEvents, len(blocks)-1) + require.Len(t, capturedEvents, len(blocks)) for index, event := range capturedEvents { + if index == 0 { + // Dummy genesis block + continue + } + // Make sure the block is valid - assert.Equal(t, blocks[index+1], event.Block) + assert.Equal(t, blocks[index], event.Block) // Make sure the transaction results are valid require.Len(t, event.Results, 0) @@ -770,9 +852,33 @@ func TestFetcher_FetchTransactions_Valid_EmptyBlocks(t *testing.T) { }, } }, + getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + if num == 0 { + return &core_types.ResultBlockResults{ + Height: int64(num), + Results: &state.ABCIResponses{ + DeliverTxs: make([]abci.ResponseDeliverTx, 0), + }, + }, nil + } + + t.Fatalf("should not request results") + + return nil, nil + }, getLatestBlockNumberFn: func() (uint64, error) { return uint64(blockNum), nil }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, } ) @@ -786,16 +892,21 @@ func TestFetcher_FetchTransactions_Valid_EmptyBlocks(t *testing.T) { // Run the fetch require.NoError(t, f.FetchChainData(ctx)) - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) } // Make sure proper events were emitted - require.Len(t, capturedEvents, len(blocks)-1) + require.Len(t, capturedEvents, len(blocks)) for index, event := range capturedEvents { + if index == 0 { + // Dummy genesis block + continue + } + // Make sure the block is valid - assert.Equal(t, blocks[index+1], event.Block) + assert.Equal(t, blocks[index], event.Block) // Make sure the transaction results are valid require.Len(t, event.Results, 0) @@ -878,10 +989,29 @@ func TestFetcher_InvalidBlocks(t *testing.T) { }, nil }, getBlockResultsFn: func(num uint64) (*core_types.ResultBlockResults, error) { + if num == 0 { + return &core_types.ResultBlockResults{ + Height: int64(num), + Results: &state.ABCIResponses{ + DeliverTxs: make([]abci.ResponseDeliverTx, 0), + }, + }, nil + } + require.LessOrEqual(t, num, uint64(blockNum)) return nil, fmt.Errorf("unable to fetch result for block %d", num) }, + getGenesisFn: func() (*core_types.ResultGenesis, error) { + return &core_types.ResultGenesis{ + Genesis: &types.GenesisDoc{ + AppState: gnoland.GnoGenesisState{ + Balances: []gnoland.Balance{}, + Txs: []std.Tx{}, + }, + }, + }, nil + }, } ) @@ -896,8 +1026,8 @@ func TestFetcher_InvalidBlocks(t *testing.T) { require.NoError(t, f.FetchChainData(ctx)) // Make sure correct blocks were attempted to be saved - for blockIndex := 0; blockIndex < blockNum; blockIndex++ { - assert.Equal(t, blocks[blockIndex+1], savedBlocks[blockIndex]) + for blockIndex := 1; blockIndex < blockNum; blockIndex++ { + assert.Equal(t, blocks[blockIndex], savedBlocks[blockIndex]) } // Make sure no events were emitted From ca459d371990a62ba6ce35b727c612b56b06380a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20=C5=BDivkovi=C4=87?= Date: Fri, 13 Sep 2024 11:55:21 +0200 Subject: [PATCH 34/34] Soft fail on genesis fetch errors --- fetch/fetch.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 5b4060cf..199f3dad 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -129,8 +129,12 @@ func (f *Fetcher) fetchGenesisData() error { // FetchChainData starts the fetching process that indexes // blockchain data func (f *Fetcher) FetchChainData(ctx context.Context) error { + // Attempt to fetch the genesis data if err := f.fetchGenesisData(); err != nil { - return fmt.Errorf("unable to fetch genesis data: %w", err) + // We treat this error as soft, to ease migration, since + // some versions of gno networks don't support this. + // In the future, we should hard fail if genesis is not fetch-able + f.logger.Error("unable to fetch genesis data", zap.Error(err)) } collectorCh := make(chan *workerResponse, DefaultMaxSlots)