From 6dbc9f8c7682b252baf8ea563c20538c489ae315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Mon, 19 Feb 2024 09:57:49 +0100 Subject: [PATCH] bump firehose-core to v1.2.1 (#122) * bump firehose-core to v1.2.1 * fix sanitizeBlockForCompare, remove block poller * run go mod tidy --- blockfetcher/rpc.go | 123 -------------------------- blockfetcher/silkworm.go | 29 ------ cmd/fireantelope/main.go | 22 ----- cmd/fireantelope/poller.go | 85 ------------------ cmd/fireantelope/util.go | 21 ++++- go.mod | 26 +++--- go.sum | 38 +++----- types/pb/sf/antelope/type/v1/codec.go | 3 - 8 files changed, 42 insertions(+), 305 deletions(-) delete mode 100644 blockfetcher/rpc.go delete mode 100644 blockfetcher/silkworm.go delete mode 100644 cmd/fireantelope/poller.go diff --git a/blockfetcher/rpc.go b/blockfetcher/rpc.go deleted file mode 100644 index de65937..0000000 --- a/blockfetcher/rpc.go +++ /dev/null @@ -1,123 +0,0 @@ -package blockfetcher - -import ( - "context" - "fmt" - "sync" - "time" - - "github.com/abourget/llerrgroup" - pbbstream "github.com/streamingfast/bstream/pb/sf/bstream/v1" - "github.com/streamingfast/eth-go/rpc" - pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2" - "go.uber.org/zap" - "google.golang.org/protobuf/types/known/anypb" - "google.golang.org/protobuf/types/known/timestamppb" -) - -type ToEthBlock func(in *rpc.Block, receipts map[string]*rpc.TransactionReceipt) (*pbeth.Block, map[string]bool) - -type BlockFetcher struct { - rpcClient *rpc.Client - latest uint64 - latestBlockRetryInterval time.Duration - fetchInterval time.Duration - toEthBlock ToEthBlock - lastFetchAt time.Time - logger *zap.Logger -} - -func NewBlockFetcher(rpcClient *rpc.Client, intervalBetweenFetch, latestBlockRetryInterval time.Duration, toEthBlock ToEthBlock, logger *zap.Logger) *BlockFetcher { - return &BlockFetcher{ - rpcClient: rpcClient, - latestBlockRetryInterval: latestBlockRetryInterval, - toEthBlock: toEthBlock, - fetchInterval: intervalBetweenFetch, - logger: logger, - } -} - -func (f *BlockFetcher) Fetch(ctx context.Context, blockNum uint64) (block *pbbstream.Block, err error) { - f.logger.Debug("fetching block", zap.Uint64("block_num", blockNum)) - for f.latest < blockNum { - f.latest, err = f.rpcClient.LatestBlockNum(ctx) - if err != nil { - return nil, fmt.Errorf("fetching latest block num: %w", err) - } - - f.logger.Info("got latest block", zap.Uint64("latest", f.latest), zap.Uint64("block_num", blockNum)) - - if f.latest < blockNum { - time.Sleep(f.latestBlockRetryInterval) - continue - } - break - } - - sinceLastFetch := time.Since(f.lastFetchAt) - if sinceLastFetch < f.fetchInterval { - time.Sleep(f.fetchInterval - sinceLastFetch) - } - - rpcBlock, err := f.rpcClient.GetBlockByNumber(ctx, rpc.BlockNumber(blockNum), rpc.WithGetBlockFullTransaction()) - if err != nil { - return nil, fmt.Errorf("fetching block %d: %w", blockNum, err) - } - - receipts, err := FetchReceipts(ctx, rpcBlock, f.rpcClient) - if err != nil { - return nil, fmt.Errorf("fetching receipts for block %d %q: %w", rpcBlock.Number, rpcBlock.Hash.Pretty(), err) - } - - f.logger.Debug("fetched receipts", zap.Int("count", len(receipts))) - - f.lastFetchAt = time.Now() - - if err != nil { - return nil, fmt.Errorf("fetching logs for block %d %q: %w", rpcBlock.Number, rpcBlock.Hash.Pretty(), err) - } - - ethBlock, _ := f.toEthBlock(rpcBlock, receipts) - anyBlock, err := anypb.New(ethBlock) - if err != nil { - return nil, fmt.Errorf("create any block: %w", err) - } - - return &pbbstream.Block{ - Number: ethBlock.Number, - Id: ethBlock.GetFirehoseBlockID(), - ParentId: ethBlock.GetFirehoseBlockParentID(), - Timestamp: timestamppb.New(ethBlock.GetFirehoseBlockTime()), - LibNum: ethBlock.LIBNum(), - ParentNum: ethBlock.GetFirehoseBlockParentNumber(), - Payload: anyBlock, - }, nil -} - -func FetchReceipts(ctx context.Context, block *rpc.Block, client *rpc.Client) (out map[string]*rpc.TransactionReceipt, err error) { - out = make(map[string]*rpc.TransactionReceipt) - lock := sync.Mutex{} - - eg := llerrgroup.New(10) - for _, tx := range block.Transactions.Transactions { - if eg.Stop() { - continue // short-circuit the loop if we got an error - } - eg.Go(func() error { - receipt, err := client.TransactionReceipt(ctx, tx.Hash) - if err != nil { - return fmt.Errorf("fetching receipt for tx %q: %w", tx.Hash.Pretty(), err) - } - lock.Lock() - out[tx.Hash.Pretty()] = receipt - lock.Unlock() - return err - }) - } - - if err := eg.Wait(); err != nil { - return nil, err - } - - return -} diff --git a/blockfetcher/silkworm.go b/blockfetcher/silkworm.go deleted file mode 100644 index db4549b..0000000 --- a/blockfetcher/silkworm.go +++ /dev/null @@ -1,29 +0,0 @@ -package blockfetcher - -import ( - "context" - "time" - - "go.uber.org/zap" - - pbbstream "github.com/streamingfast/bstream/pb/sf/bstream/v1" - "github.com/streamingfast/eth-go/rpc" - "github.com/streamingfast/firehose-ethereum/block" -) - -type SilkwormBlockFetcher struct { - fetcher *BlockFetcher -} - -func NewSilkwormBlockFetcher(rpcClient *rpc.Client, intervalBetweenFetch time.Duration, latestBlockRetryInterval time.Duration, logger *zap.Logger) *SilkwormBlockFetcher { - fetcher := NewBlockFetcher(rpcClient, intervalBetweenFetch, latestBlockRetryInterval, block.RpcToEthBlock, logger) - return &SilkwormBlockFetcher{ - fetcher: fetcher, - } -} - -func (f *SilkwormBlockFetcher) PollingInterval() time.Duration { return 1 * time.Second } - -func (f *SilkwormBlockFetcher) Fetch(ctx context.Context, blockNum uint64) (*pbbstream.Block, error) { - return f.fetcher.Fetch(ctx, blockNum) -} diff --git a/cmd/fireantelope/main.go b/cmd/fireantelope/main.go index 02d64f9..d90c6b1 100644 --- a/cmd/fireantelope/main.go +++ b/cmd/fireantelope/main.go @@ -33,15 +33,6 @@ func Chain() *firecore.Chain[*pbantelope.Block] { BlockFactory: func() firecore.Block { return new(pbantelope.Block) }, - //BlockIndexerFactories: map[string]firecore.BlockIndexerFactory[*pbantelope.Block]{ - // transform.ReceiptAddressIndexShortName: transform.NewNearBlockIndexer, - //}, - // - //BlockTransformerFactories: map[protoreflect.FullName]firecore.BlockTransformerFactory{ - // transform.HeaderOnlyMessageName: transform.NewHeaderOnlyTransformFactory, - // transform.ReceiptFilterMessageName: transform.BasicReceiptFilterFactory, - //}, - ConsoleReaderFactory: codec.NewConsoleReader, RegisterExtraStartFlags: func(flags *pflag.FlagSet) { @@ -51,28 +42,15 @@ func Chain() *firecore.Chain[*pbantelope.Block] { flags.Bool("reader-node-overwrite-node-files", false, "Force download of node-key and config files even if they already exist on the machine.") }, - // ReaderNodeBootstrapperFactory: newReaderNodeBootstrapper, - Tools: &firecore.ToolsConfig[*pbantelope.Block]{ RegisterExtraCmd: func(chain *firecore.Chain[*pbantelope.Block], parent *cobra.Command, zlog *zap.Logger, tracer logging.Tracer) error { - //toolsCmd.AddCommand(newToolsGenerateNodeKeyCmd(chain)) - //toolsCmd.AddCommand(newToolsBackfillCmd(zlog)) - parent.AddCommand(newPollerCmd(zlog, tracer)) - parent.AddCommand(newSilkwormPollerCmd(zlog, tracer)) parent.AddCommand(newCheckBlocksCmd(zlog)) return nil }, SanitizeBlockForCompare: sanitizeBlockForCompare, - - //TransformFlags: map[string]*firecore.TransformFlag{ - // "receipt-account-filters": { - // Description: "Comma-separated accounts to use as filter/index. If it contains a colon (:), it will be interpreted as : (each of which can be empty, ex: 'hello:' or ':world')", - // Parser: parseReceiptAccountFilters, - // }, - //}, }, } diff --git a/cmd/fireantelope/poller.go b/cmd/fireantelope/poller.go deleted file mode 100644 index 65051ef..0000000 --- a/cmd/fireantelope/poller.go +++ /dev/null @@ -1,85 +0,0 @@ -package main - -import ( - "fmt" - "github.com/pinax-network/firehose-antelope/blockfetcher" - "path" - "strconv" - "time" - - "github.com/spf13/cobra" - "github.com/streamingfast/bstream" - "github.com/streamingfast/cli/sflags" - "github.com/streamingfast/eth-go/rpc" - firecore "github.com/streamingfast/firehose-core" - "github.com/streamingfast/firehose-core/blockpoller" - "github.com/streamingfast/logging" - "go.uber.org/zap" -) - -func newPollerCmd(logger *zap.Logger, tracer logging.Tracer) *cobra.Command { - cmd := &cobra.Command{ - Use: "poller", - Short: "poll blocks from different sources", - } - - cmd.AddCommand(newSilkwormPollerCmd(logger, tracer)) - return cmd -} - -func newSilkwormPollerCmd(logger *zap.Logger, tracer logging.Tracer) *cobra.Command { - cmd := &cobra.Command{ - Use: "silkworm ", - Short: "poll blocks from silkworm rpc", - Args: cobra.ExactArgs(2), - RunE: pollerRunE(logger, tracer), - } - cmd.Flags().Duration("interval-between-fetch", 0, "interval between fetch") - - return cmd -} - -func pollerRunE(logger *zap.Logger, tracer logging.Tracer) firecore.CommandExecutor { - return func(cmd *cobra.Command, args []string) (err error) { - ctx := cmd.Context() - - rpcEndpoint := args[0] - - dataDir := sflags.MustGetString(cmd, "data-dir") - stateDir := path.Join(dataDir, "poller-state") - - logger.Info("launching firehose-antelope poller", zap.String("rpc_endpoint", rpcEndpoint), zap.String("data_dir", dataDir), zap.String("state_dir", stateDir)) - - rpcClient := rpc.NewClient(rpcEndpoint) - - firstStreamableBlock, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return fmt.Errorf("unable to parse first streamable block %d: %w", firstStreamableBlock, err) - } - - fetchInterval := sflags.MustGetDuration(cmd, "interval-between-fetch") - - fetcher := blockfetcher.NewSilkwormBlockFetcher(rpcClient, fetchInterval, 1*time.Second, logger) - handler := blockpoller.NewFireBlockHandler("type.googleapis.com/sf.ethereum.type.v2.Block") - poller := blockpoller.New(fetcher, handler, blockpoller.WithStoringState(stateDir), blockpoller.WithLogger(logger)) - - // there is currently no support for rpc.FinalizedBlock on eos evm, so query the latest one and then pass - // latest - 200 as the latest finalized block - latestBlock, err := rpcClient.GetBlockByNumber(ctx, rpc.LatestBlock) - if err != nil { - return fmt.Errorf("getting latest block: %w", err) - } - - latestFinalizedBlock, err := rpcClient.GetBlockByNumber(ctx, rpc.BlockNumber(uint64(latestBlock.Number-200))) - if err != nil { - return fmt.Errorf("getting latest finalized block: %w", err) - } - - err = poller.Run(ctx, firstStreamableBlock, bstream.NewBlockRef(latestFinalizedBlock.Hash.String(), uint64(latestFinalizedBlock.Number))) - if err != nil { - return fmt.Errorf("running poller: %w", err) - } - - return nil - } -} diff --git a/cmd/fireantelope/util.go b/cmd/fireantelope/util.go index a989599..9bcc49b 100644 --- a/cmd/fireantelope/util.go +++ b/cmd/fireantelope/util.go @@ -3,6 +3,8 @@ package main import ( "fmt" pbantelope "github.com/pinax-network/firehose-antelope/types/pb/sf/antelope/type/v1" + pbbstream "github.com/streamingfast/bstream/pb/sf/bstream/v1" + firecore "github.com/streamingfast/firehose-core" "google.golang.org/protobuf/types/known/timestamppb" "strconv" "time" @@ -19,7 +21,13 @@ func mustParseUint64(in string) uint64 { return out } -func sanitizeBlockForCompare(block *pbantelope.Block) *pbantelope.Block { +func sanitizeBlockForCompare(block *pbbstream.Block) *pbbstream.Block { + + var antelopeBlock pbantelope.Block + err := block.Payload.UnmarshalTo(&antelopeBlock) + if err != nil { + panic(fmt.Errorf("unable to unmarshal block payload into Antelope block: %w", err)) + } var sanitizeContext func(logContext *pbantelope.Exception_LogContext) sanitizeContext = func(logContext *pbantelope.Exception_LogContext) { @@ -50,11 +58,11 @@ func sanitizeBlockForCompare(block *pbantelope.Block) *pbantelope.Block { } } - for _, rlimitOp := range block.RlimitOps { + for _, rlimitOp := range antelopeBlock.RlimitOps { sanitizeRLimitOp(rlimitOp) } - for _, trxTrace := range block.UnfilteredTransactionTraces { + for _, trxTrace := range antelopeBlock.UnfilteredTransactionTraces { trxTrace.Elapsed = 888 sanitizeException(trxTrace.Exception) @@ -87,5 +95,10 @@ func sanitizeBlockForCompare(block *pbantelope.Block) *pbantelope.Block { } } - return block + res, err := firecore.EncodeBlock(&antelopeBlock) + if err != nil { + panic(fmt.Errorf("failed to encode Antelope block: %w", err)) + } + + return res } diff --git a/go.mod b/go.mod index b2da775..f1c1031 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,20 @@ module github.com/pinax-network/firehose-antelope -go 1.21 +go 1.22 -toolchain go1.21.5 +toolchain go1.22.0 require ( - github.com/abourget/llerrgroup v0.2.0 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 github.com/eoscanada/eos-go v0.10.3-0.20231109144819-59afdfa3a37d github.com/lytics/ordpool v0.0.0-20130426221837-8d833f097fe7 github.com/mitchellh/go-testing-interface v1.14.1 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 - github.com/streamingfast/bstream v0.0.2-0.20240127132523-330edbf00208 - github.com/streamingfast/cli v0.0.4-0.20230825151644-8cc84512cd80 + github.com/streamingfast/bstream v0.0.2-0.20240207154557-a98153ba4b86 github.com/streamingfast/dmetrics v0.0.0-20230919161904-206fa8ebd545 - github.com/streamingfast/dstore v0.1.1-0.20230620124109-3924b3b36c77 - github.com/streamingfast/eth-go v0.0.0-20231204174036-34e2cb6d64af - github.com/streamingfast/firehose-core v1.1.1 - github.com/streamingfast/firehose-ethereum v1.4.23-0.20231213134745-920366d3b7aa + github.com/streamingfast/dstore v0.1.1-0.20240215171730-493ad5a0f537 + github.com/streamingfast/firehose-core v1.2.1 github.com/streamingfast/jsonpb v0.0.0-20210811021341-3670f0aa02d0 github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 github.com/stretchr/testify v1.8.4 @@ -50,6 +46,7 @@ require ( github.com/RoaringBitmap/roaring v0.9.4 // indirect github.com/ShinyTrinkets/meta-logger v0.2.0 // indirect github.com/ShinyTrinkets/overseer v0.3.0 // indirect + github.com/abourget/llerrgroup v0.2.0 // indirect github.com/aws/aws-sdk-go v1.44.325 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -57,7 +54,6 @@ require ( github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/bobg/go-generics/v2 v2.1.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/bufbuild/connect-go v1.10.0 // indirect github.com/bufbuild/connect-grpchealth-go v1.1.1 // indirect github.com/bufbuild/connect-grpcreflect-go v1.0.0 // indirect @@ -102,7 +98,6 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/holiman/uint256 v1.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/boxo v0.8.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect @@ -164,18 +159,19 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.15.0 // indirect - github.com/streamingfast/dauth v0.0.0-20231120142446-843f4e045cc2 // indirect + github.com/streamingfast/cli v0.0.4-0.20230825151644-8cc84512cd80 // indirect + github.com/streamingfast/dauth v0.0.0-20240209195422-0d69eebd5587 // indirect github.com/streamingfast/dbin v0.9.1-0.20231117225723-59790c798e2c // indirect github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1 // indirect github.com/streamingfast/dgrpc v0.0.0-20240119162453-69517bcc1a7f // indirect - github.com/streamingfast/dmetering v0.0.0-20231120142327-a3405f0eed83 // indirect + github.com/streamingfast/dmetering v0.0.0-20240215171500-4f0413a948bb // indirect github.com/streamingfast/dtracing v0.0.0-20220305214756-b5c0e8699839 // indirect github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308 // indirect - github.com/streamingfast/pbgo v0.0.6-0.20240126214028-e57a3692caee // indirect + github.com/streamingfast/pbgo v0.0.6-0.20240131193313-6b88bc7139db // indirect github.com/streamingfast/sf-tracing v0.0.0-20230616174903-cd2ade641ca9 // indirect github.com/streamingfast/shutter v1.5.0 // indirect github.com/streamingfast/snapshotter v0.0.0-20230316190750-5bcadfde44d0 // indirect - github.com/streamingfast/substreams v1.3.2 // indirect + github.com/streamingfast/substreams v1.3.6-0.20240215214651-fd61ad443d0e // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf // indirect github.com/tetratelabs/wazero v1.1.0 // indirect diff --git a/go.sum b/go.sum index 2d9a55f..647f4a9 100644 --- a/go.sum +++ b/go.sum @@ -143,10 +143,6 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4Yn github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bobg/go-generics/v2 v2.1.1 h1:4rN9upY6Xm4TASSMeH+NzUghgO4h/SbNrQphIjRd/R0= github.com/bobg/go-generics/v2 v2.1.1/go.mod h1:iPMSRVFlzkJSYOCXQ0n92RA3Vxw0RBv2E8j9ZODXgHk= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= github.com/bufbuild/connect-grpchealth-go v1.1.1 h1:ldceS3m7+Qvl3GI4yzB4oCg3uOdD+Y1bytc/5xuMpqo= @@ -395,8 +391,6 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -593,32 +587,28 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streamingfast/bstream v0.0.2-0.20240127132523-330edbf00208 h1:Lu7c8HMNy48V7RtV5Zc7LcZRJYCPkrGWu8KUV4vRrUs= -github.com/streamingfast/bstream v0.0.2-0.20240127132523-330edbf00208/go.mod h1:08GVb+DXyz6jVNIsbf+2zlaC81UeEGu5o1h49KrSR3Y= +github.com/streamingfast/bstream v0.0.2-0.20240207154557-a98153ba4b86 h1:PIdAr8WwyinSDAQY+vHDI5mkm8EvGuhMV+NFajyFQzY= +github.com/streamingfast/bstream v0.0.2-0.20240207154557-a98153ba4b86/go.mod h1:08GVb+DXyz6jVNIsbf+2zlaC81UeEGu5o1h49KrSR3Y= github.com/streamingfast/cli v0.0.4-0.20230825151644-8cc84512cd80 h1:UxJUTcEVkdZy8N77E3exz0iNlgQuxl4m220GPvzdZ2s= github.com/streamingfast/cli v0.0.4-0.20230825151644-8cc84512cd80/go.mod h1:QxjVH73Lkqk+mP8bndvhMuQDUINfkgsYhdCH/5TJFKI= -github.com/streamingfast/dauth v0.0.0-20231120142446-843f4e045cc2 h1:g4mG6ZCy3/XtcsZXfOHrQOsjVGoX9uTc/QlemaPV4EE= -github.com/streamingfast/dauth v0.0.0-20231120142446-843f4e045cc2/go.mod h1:zfq+mtesfbaZnNeh1BF+vo+zEFP1sat4pm3lvt40nRw= +github.com/streamingfast/dauth v0.0.0-20240209195422-0d69eebd5587 h1:9ZgRzk9P9jbaP/MlL9hluDyP5rXjc0ajKJCTrfHsfaU= +github.com/streamingfast/dauth v0.0.0-20240209195422-0d69eebd5587/go.mod h1:NDMmIoM+vcR0XqhWOHB0fqUhShaWpbSxxC32NfBpv08= github.com/streamingfast/dbin v0.9.1-0.20231117225723-59790c798e2c h1:6WjE2yInE+5jnI7cmCcxOiGZiEs2FQm9Zsg2a9Ivp0Q= github.com/streamingfast/dbin v0.9.1-0.20231117225723-59790c798e2c/go.mod h1:dbfiy9ORrL8c6ldSq+L0H9pg8TOqqu/FsghsgUEWK54= github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1 h1:xJB7rXnOHLesosMjfwWsEL2i/40mFSkzenEb3M0qTyM= github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1/go.mod h1:QSm/AfaDsE0k1xBYi0lW580YJ/WDV/FKZI628tkZR0Y= github.com/streamingfast/dgrpc v0.0.0-20240119162453-69517bcc1a7f h1:WDURSuig53yVdqSZDsIpOr/510oGqEtawosa9DtRO6A= github.com/streamingfast/dgrpc v0.0.0-20240119162453-69517bcc1a7f/go.mod h1:AzMcSri68b21YwdAOw3j4Sq84N/JQ6ONM0B29NSVGyY= -github.com/streamingfast/dmetering v0.0.0-20231120142327-a3405f0eed83 h1:IbIUT85146duL9EKwMiiW0HH1djpm8plmJOo+YZbO5U= -github.com/streamingfast/dmetering v0.0.0-20231120142327-a3405f0eed83/go.mod h1:3XggUfQMyciaue133qhbIkFqJQqNzozGpa/gI3sdwac= +github.com/streamingfast/dmetering v0.0.0-20240215171500-4f0413a948bb h1:3zVpm+OkXNyremxpRpoW+HO2OpvxTTLsYMDNUg1zsFQ= +github.com/streamingfast/dmetering v0.0.0-20240215171500-4f0413a948bb/go.mod h1:UqWuX3REU/IInBUaymFN2eLjuvz+/0SsoUFjeQlLNyI= github.com/streamingfast/dmetrics v0.0.0-20230919161904-206fa8ebd545 h1:SUl04bZKGAv207lp7/6CHOJIRpjUKunwItrno3K463Y= github.com/streamingfast/dmetrics v0.0.0-20230919161904-206fa8ebd545/go.mod h1:JbxEDbzWRG1dHdNIPrYfuPllEkktZMgm40AwVIBENcw= -github.com/streamingfast/dstore v0.1.1-0.20230620124109-3924b3b36c77 h1:u7FWLqz3Uwff609Ja9M+3aGOWqBCVU7dx9i6R6Qc4qI= -github.com/streamingfast/dstore v0.1.1-0.20230620124109-3924b3b36c77/go.mod h1:ngKU7WzHwVjOFpt2g+Wtob5mX4IvN90HYlnARcTRbmQ= +github.com/streamingfast/dstore v0.1.1-0.20240215171730-493ad5a0f537 h1:HWqY7nS+kmQXPjcASsMr6n4rGYQvMc1iJEv4/+EL1O0= +github.com/streamingfast/dstore v0.1.1-0.20240215171730-493ad5a0f537/go.mod h1:ngKU7WzHwVjOFpt2g+Wtob5mX4IvN90HYlnARcTRbmQ= github.com/streamingfast/dtracing v0.0.0-20220305214756-b5c0e8699839 h1:K6mJPvh1jAL+/gBS7Bh9jyzWaTib6N47m06gZOTUPwQ= github.com/streamingfast/dtracing v0.0.0-20220305214756-b5c0e8699839/go.mod h1:huOJyjMYS6K8upTuxDxaNd+emD65RrXoVBvh8f1/7Ns= -github.com/streamingfast/eth-go v0.0.0-20231204174036-34e2cb6d64af h1:KH0tXSwKrsbNZ9RCKv+Fp4riu7ytzrc/hB3kXkwn0/Q= -github.com/streamingfast/eth-go v0.0.0-20231204174036-34e2cb6d64af/go.mod h1:UEm8dqibr3c3A1iIA3CHpkhN7j3X78prN7/55sXf3A0= -github.com/streamingfast/firehose-core v1.1.1 h1:7+35NhP5jr9gXE+RpYzBZxtZOSa3fAN6HrAfvaTwBXs= -github.com/streamingfast/firehose-core v1.1.1/go.mod h1:ajtazcLkOp4TrTZhCDf4y+g7wJu/13XsCJFBw+PeRdQ= -github.com/streamingfast/firehose-ethereum v1.4.23-0.20231213134745-920366d3b7aa h1:doUV6rNUz/A+Y8wvNT/2k2qUKF02kuCRvaKgr/S2d3k= -github.com/streamingfast/firehose-ethereum v1.4.23-0.20231213134745-920366d3b7aa/go.mod h1:LYBs6siIpmpKyUsSUiziYr6YkW+s5HKCTzzuMiCfjK0= +github.com/streamingfast/firehose-core v1.2.1 h1:hVVQTGh8i9nwnEximE6NzCNtwvskNxXSvhSbHatUhcQ= +github.com/streamingfast/firehose-core v1.2.1/go.mod h1:eztqrwqE7ic+ql2hPs4CLPxYCcVssmkKq8Ezx/b0ty0= github.com/streamingfast/jsonpb v0.0.0-20210811021341-3670f0aa02d0 h1:g8eEYbFSykyzIyuxNMmHEUGGUvJE0ivmqZagLDK42gw= github.com/streamingfast/jsonpb v0.0.0-20210811021341-3670f0aa02d0/go.mod h1:cTNObq2Uofb330y05JbbZZ6RwE6QUXw5iVcHk1Fx3fk= github.com/streamingfast/logging v0.0.0-20210811175431-f3b44b61606a/go.mod h1:4GdqELhZOXj4xwc4IaBmzofzdErGynnaSzuzxy0ZIBo= @@ -630,8 +620,8 @@ github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308 h1:xlWSfi1BoP github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308/go.mod h1:K1p8Bj/wG34KJvYzPUqtzpndffmpkrVY11u2hkyxCWQ= github.com/streamingfast/overseer v0.2.1-0.20210326144022-ee491780e3ef h1:9IVFHRsqvI+vKJwgF1OMV6L55jHbaV/ZLoU4IAG/dME= github.com/streamingfast/overseer v0.2.1-0.20210326144022-ee491780e3ef/go.mod h1:cq8CvbZ3ioFmGrHokSAJalS0lC+pVXLKhITScItUGXY= -github.com/streamingfast/pbgo v0.0.6-0.20240126214028-e57a3692caee h1:wppZvFFnvVyMu5uVpvAnXKlcpEFACxwhPbzer+sMlVY= -github.com/streamingfast/pbgo v0.0.6-0.20240126214028-e57a3692caee/go.mod h1:eDQjKBYg9BWE2BTaV3UZeLZ5xw05+ywA9RCFTmM1w5Y= +github.com/streamingfast/pbgo v0.0.6-0.20240131193313-6b88bc7139db h1:c39xMBgmHgbx1e+cP8KJZ2ziWh9VsjY5C0vDZiytYtw= +github.com/streamingfast/pbgo v0.0.6-0.20240131193313-6b88bc7139db/go.mod h1:eDQjKBYg9BWE2BTaV3UZeLZ5xw05+ywA9RCFTmM1w5Y= github.com/streamingfast/protoreflect v0.0.0-20231205191344-4b629d20ce8d h1:33VIARqUqBUKXJcuQoOS1rVSms54tgxhhNCmrLptpLg= github.com/streamingfast/protoreflect v0.0.0-20231205191344-4b629d20ce8d/go.mod h1:aBJivEdekmFWYSQ29EE/fN9IanJWJXbtjy3ky0XD/jE= github.com/streamingfast/sf-tracing v0.0.0-20230616174903-cd2ade641ca9 h1:YRwpVvLYa+FEJlTy0S7mk4UptYjk5zac+A+ZE1phOeA= @@ -640,8 +630,8 @@ github.com/streamingfast/shutter v1.5.0 h1:NpzDYzj0HVpSiDJVO/FFSL6QIK/YKOxY0gJAt github.com/streamingfast/shutter v1.5.0/go.mod h1:B/T6efqdeMGbGwjzPS1ToXzYZI4kDzI5/u4I+7qbjY8= github.com/streamingfast/snapshotter v0.0.0-20230316190750-5bcadfde44d0 h1:Y15G1Z4fpEdm2b+/70owI7TLuXadlqBtGM7rk4Hxrzk= github.com/streamingfast/snapshotter v0.0.0-20230316190750-5bcadfde44d0/go.mod h1:/Rnz2TJvaShjUct0scZ9kKV2Jr9/+KBAoWy4UMYxgv4= -github.com/streamingfast/substreams v1.3.2 h1:czgHC3+ORiKJY75z08R2W67tLxI/WK99NFQgx2fORvg= -github.com/streamingfast/substreams v1.3.2/go.mod h1:fCC3pGTYMi0N4VhJjdJPQydefJpY+tsY9BzWxDi152k= +github.com/streamingfast/substreams v1.3.6-0.20240215214651-fd61ad443d0e h1:pE2rtw7gUjE9NMkHRFRdDZ3fLBa3sEkeSsXE20+/CSM= +github.com/streamingfast/substreams v1.3.6-0.20240215214651-fd61ad443d0e/go.mod h1:/B3LHBthLV06EdbtNlsNXOqNt5Xd9hy5K4pW+ufqVCs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/types/pb/sf/antelope/type/v1/codec.go b/types/pb/sf/antelope/type/v1/codec.go index 705aa22..115992d 100644 --- a/types/pb/sf/antelope/type/v1/codec.go +++ b/types/pb/sf/antelope/type/v1/codec.go @@ -22,9 +22,6 @@ import ( "time" ) -// TODO: We should probably memoize all fields that requires computation -// like Time() and likes. - func (b *Block) ID() string { return b.Id }