From dcaeacf34232a6cd0114e2d80343b29e19148942 Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 30 Mar 2024 13:04:35 +0100 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb1442c..e869228 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ a PostgreSQL or Clickhouse database. ```bash # the passwords come from the default config in `docker-compose.yml` export DSN="postgres://dev-node:insecure-change-me-in-prod@localhost:5432/dev-node?sslmode=disable" - #export DSN="clickhouse://default:default@localhost:9000/default" + #export DSN="clickhouse://default:@localhost:9000/default" substreams-sink-sql setup $DSN docs/tutorial/substreams.yaml ``` From a28b35f64c596580033d67a51adc55806d08d393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Thu, 31 Oct 2024 14:11:08 +0100 Subject: [PATCH 2/9] added a check for non-existent columns in Clickhouse --- .gitignore | 1 + CHANGELOG.md | 4 ++++ db/dialect_clickhouse.go | 13 +++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 76ce6c7..43f32f1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ dist/ devel/data* build/ *.spkg +/substreams-sink-sql diff --git a/CHANGELOG.md b/CHANGELOG.md index e33f0e3..14932ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +* Added a check for non-existent columns in Clickhouse + ## v4.2.1 * Bump substreams to v1.10.3 to support new manifest data like `protobuf:excludePaths` diff --git a/db/dialect_clickhouse.go b/db/dialect_clickhouse.go index 6387c1a..8cf8d10 100644 --- a/db/dialect_clickhouse.go +++ b/db/dialect_clickhouse.go @@ -3,6 +3,7 @@ package db import ( "context" "fmt" + "golang.org/x/exp/maps" "math/big" "reflect" "sort" @@ -169,11 +170,15 @@ func convertOpToClickhouseValues(o *Operation) ([]any, error) { sort.Strings(columns) values := make([]any, len(o.data)) for i, v := range columns { - convertedType, err := convertToType(o.data[v], o.table.columnsByName[v].scanType) - if err != nil { - return nil, fmt.Errorf("converting value %q to type %q in column %q: %w", o.data[v], o.table.columnsByName[v].scanType, v, err) + if col, exists := o.table.columnsByName[v]; exists { + convertedType, err := convertToType(o.data[v], col.scanType) + if err != nil { + return nil, fmt.Errorf("converting value %q to type %q in column %q: %w", o.data[v], o.table.columnsByName[v].scanType, v, err) + } + values[i] = convertedType + } else { + return nil, fmt.Errorf("cannot find column %q for table %q (valid columns are %q)", v, o.table.identifier, strings.Join(maps.Keys(o.table.columnsByName), ", ")) } - values[i] = convertedType } return values, nil } From 4340243ab21a2c7b81184cc5e6d7603962315f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Thu, 31 Oct 2024 14:13:09 +0100 Subject: [PATCH 3/9] clean imports --- db/dialect_clickhouse.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/dialect_clickhouse.go b/db/dialect_clickhouse.go index 8cf8d10..b0ae240 100644 --- a/db/dialect_clickhouse.go +++ b/db/dialect_clickhouse.go @@ -3,7 +3,6 @@ package db import ( "context" "fmt" - "golang.org/x/exp/maps" "math/big" "reflect" "sort" @@ -12,10 +11,10 @@ import ( "time" _ "github.com/ClickHouse/clickhouse-go/v2" - "github.com/streamingfast/cli" sink "github.com/streamingfast/substreams-sink" "go.uber.org/zap" + "golang.org/x/exp/maps" ) type clickhouseDialect struct{} @@ -173,7 +172,7 @@ func convertOpToClickhouseValues(o *Operation) ([]any, error) { if col, exists := o.table.columnsByName[v]; exists { convertedType, err := convertToType(o.data[v], col.scanType) if err != nil { - return nil, fmt.Errorf("converting value %q to type %q in column %q: %w", o.data[v], o.table.columnsByName[v].scanType, v, err) + return nil, fmt.Errorf("converting value %q to type %q in column %q: %w", o.data[v], col.scanType, v, err) } values[i] = convertedType } else { From 3816eb3ec98d284ae0f3cc069a96a31ab5db9e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Sch=C3=B6ll?= Date: Tue, 5 Nov 2024 14:24:26 +0100 Subject: [PATCH 4/9] add support for Nullable types in Clickhouse --- .gitignore | 1 + CHANGELOG.md | 4 ++++ db/dialect_clickhouse.go | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 76ce6c7..43f32f1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ dist/ devel/data* build/ *.spkg +/substreams-sink-sql diff --git a/CHANGELOG.md b/CHANGELOG.md index e33f0e3..4a473c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +* Added support for `Nullable` types in Clickhouse. + ## v4.2.1 * Bump substreams to v1.10.3 to support new manifest data like `protobuf:excludePaths` diff --git a/db/dialect_clickhouse.go b/db/dialect_clickhouse.go index 6387c1a..48b3d56 100644 --- a/db/dialect_clickhouse.go +++ b/db/dialect_clickhouse.go @@ -247,7 +247,20 @@ func convertToType(value string, valueType reflect.Type) (any, error) { newInt.SetString(value, 10) return newInt, nil } - return "", fmt.Errorf("unsupported pointer type %s", valueType) + + elemType := valueType.Elem() + val, err := convertToType(value, elemType) + if err != nil { + return nil, fmt.Errorf("invalid pointer type: %w", err) + } + + // We cannot just return &val here as this will return an *interface{} that the Clickhouse Go client won't be + // able to convert on inserting. Instead, we create a new variable using the type that valueType has been + // pointing to, assign the converted value from convertToType to that and then return a pointer to the new variable. + result := reflect.New(elemType).Elem() + result.Set(reflect.ValueOf(val)) + return result.Addr().Interface(), nil + default: return value, nil } From 3c9bcd7d71e40567d231debc48f639341bf9fa31 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Thu, 7 Nov 2024 15:02:44 -0500 Subject: [PATCH 5/9] fix major bug when receiving empty ouput --- sinker/sinker.go | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/sinker/sinker.go b/sinker/sinker.go index 24b0639..592531f 100644 --- a/sinker/sinker.go +++ b/sinker/sinker.go @@ -103,19 +103,22 @@ func (s *SQLSinker) HandleBlockScopedData(ctx context.Context, data *pbsubstream dbChanges := &pbdatabase.DatabaseChanges{} mapOutput := output.GetMapOutput() - if !mapOutput.MessageIs(dbChanges) && mapOutput.TypeUrl != "type.googleapis.com/sf.substreams.database.v1.DatabaseChanges" { - return fmt.Errorf("mismatched message type: trying to unmarshal unknown type %q", mapOutput.MessageName()) - } - // We do not use UnmarshalTo here because we need to parse an older proto type and - // UnmarshalTo enforces the type check. So we check manually the `TypeUrl` above and we use - // `Unmarshal` instead which only deals with the bytes value. - if err := proto.Unmarshal(mapOutput.Value, dbChanges); err != nil { - return fmt.Errorf("unmarshal database changes: %w", err) - } + if mapOutput.String() != "" { + if !mapOutput.MessageIs(dbChanges) && mapOutput.TypeUrl != "type.googleapis.com/sf.substreams.database.v1.DatabaseChanges" { + return fmt.Errorf("mismatched message type: trying to unmarshal unknown type %q", mapOutput.MessageName()) + } - if err := s.applyDatabaseChanges(dbChanges, data.Clock.Number, data.FinalBlockHeight); err != nil { - return fmt.Errorf("apply database changes: %w", err) + // We do not use UnmarshalTo here because we need to parse an older proto type and + // UnmarshalTo enforces the type check. So we check manually the `TypeUrl` above and we use + // `Unmarshal` instead which only deals with the bytes value. + if err := proto.Unmarshal(mapOutput.Value, dbChanges); err != nil { + return fmt.Errorf("unmarshal database changes: %w", err) + } + + if err := s.applyDatabaseChanges(dbChanges, data.Clock.Number, data.FinalBlockHeight); err != nil { + return fmt.Errorf("apply database changes: %w", err) + } } if data.Clock.Number%s.batchBlockModulo(data, isLive) == 0 { From 3cdf12c49b98e4e6e7a79fc530950f739c9f6eb1 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Thu, 7 Nov 2024 15:18:03 -0500 Subject: [PATCH 6/9] remove not necessary data --- CHANGELOG.md | 4 ++++ sinker/sinker.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e33f0e3..7314bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v4.2.2 + +* Fix major bug when receiving empty `MapOutput` + ## v4.2.1 * Bump substreams to v1.10.3 to support new manifest data like `protobuf:excludePaths` diff --git a/sinker/sinker.go b/sinker/sinker.go index 592531f..1ce13fc 100644 --- a/sinker/sinker.go +++ b/sinker/sinker.go @@ -121,7 +121,7 @@ func (s *SQLSinker) HandleBlockScopedData(ctx context.Context, data *pbsubstream } } - if data.Clock.Number%s.batchBlockModulo(data, isLive) == 0 { + if data.Clock.Number%s.batchBlockModulo(isLive) == 0 { s.logger.Debug("flushing to database", zap.Stringer("block", cursor.Block()), zap.Bool("is_live", *isLive)) flushStart := time.Now() @@ -213,7 +213,7 @@ func (s *SQLSinker) HandleBlockUndoSignal(ctx context.Context, data *pbsubstream return s.loader.Revert(ctx, s.OutputModuleHash(), cursor, data.LastValidBlock.Number) } -func (s *SQLSinker) batchBlockModulo(blockData *pbsubstreamsrpc.BlockScopedData, isLive *bool) uint64 { +func (s *SQLSinker) batchBlockModulo(isLive *bool) uint64 { if isLive == nil { panic(fmt.Errorf("liveness checker has been disabled on the Sinker instance, this is invalid in the context of 'substreams-sink-sql'")) } From 403cdafb8284a8387ca063a66334d4f191c7fb92 Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Fri, 29 Nov 2024 14:16:12 -0500 Subject: [PATCH 7/9] fix test, bump substreams to 0.11.1, bump substreams-sink to 0.5.0 and add example in the command --- cmd/substreams-sink-sql/run.go | 1 + go.mod | 28 +++++++++++++++------- go.sum | 43 +++++++++++++++++++++++----------- sinker/sinker_test.go | 2 +- 4 files changed, 51 insertions(+), 23 deletions(-) diff --git a/cmd/substreams-sink-sql/run.go b/cmd/substreams-sink-sql/run.go index 736432d..ea2a4de 100644 --- a/cmd/substreams-sink-sql/run.go +++ b/cmd/substreams-sink-sql/run.go @@ -31,6 +31,7 @@ var sinkRunCmd = Command(sinkRunE, flags.Int("flush-interval", 1000, "When in catch up mode, flush every N blocks") flags.StringP("endpoint", "e", "", "Specify the substreams endpoint, ex: `mainnet.eth.streamingfast.io:443`") }), + Example("substreams-sink-sql run 'postgres://localhost:5432/posgres?sslmode=disable' uniswap-v3@v0.2.10"), OnCommandErrorLogAndExit(zlog), ) diff --git a/go.mod b/go.mod index e419ad4..fb9f8b8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/streamingfast/substreams-sink-sql -go 1.21 +go 1.22 + +toolchain go1.22.9 require ( github.com/ClickHouse/clickhouse-go/v2 v2.25.0 @@ -13,8 +15,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.15.0 github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 - github.com/streamingfast/substreams v1.10.3 - github.com/streamingfast/substreams-sink v0.4.2 + github.com/streamingfast/substreams v1.11.1 + github.com/streamingfast/substreams-sink v0.5.0 github.com/streamingfast/substreams-sink-database-changes v1.1.3 github.com/stretchr/testify v1.9.0 github.com/wk8/go-ordered-map/v2 v2.1.7 @@ -23,6 +25,8 @@ require ( google.golang.org/protobuf v1.33.0 ) +replace github.com/streamingfast/substreams-sink => ../substreams-sink + require ( buf.build/gen/go/bufbuild/reflect/connectrpc/go v1.16.1-20240117202343-bf8f65e8876c.1 // indirect buf.build/gen/go/bufbuild/reflect/protocolbuffers/go v1.33.0-20240117202343-bf8f65e8876c.1 // indirect @@ -32,10 +36,14 @@ require ( github.com/RoaringBitmap/roaring v1.9.1 // indirect github.com/alecthomas/participle v0.7.1 // indirect github.com/andybalholm/brotli v1.1.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/bits-and-blooms/bitset v1.12.0 // indirect + github.com/bobg/go-generics/v3 v3.4.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/charmbracelet/lipgloss v1.0.0 // indirect + github.com/charmbracelet/x/ansi v0.4.2 // indirect github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/envoyproxy/go-control-plane v0.12.0 // indirect @@ -57,16 +65,20 @@ require ( github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgtype v1.14.0 // indirect github.com/jackc/puddle v1.3.0 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mschoch/smat v0.2.0 // indirect + github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a // indirect github.com/paulbellamy/ratecounter v0.2.0 // indirect github.com/paulmach/orb v0.11.1 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sethvargo/go-retry v0.2.3 // indirect @@ -121,13 +133,13 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect - github.com/streamingfast/bstream v0.0.2-0.20240906151250-c7bc58efc760 - github.com/streamingfast/cli v0.0.4-0.20230825151644-8cc84512cd80 + github.com/streamingfast/bstream v0.0.2-0.20241108153156-a5c6bc006f41 + github.com/streamingfast/cli v0.0.4-0.20241119021815-815afa473375 github.com/streamingfast/dbin v0.9.1-0.20231117225723-59790c798e2c // indirect github.com/streamingfast/dgrpc v0.0.0-20240219152146-57bb131c39ca // indirect github.com/streamingfast/dhammer v0.0.0-20220506192416-3797a7906da2 github.com/streamingfast/dmetrics v0.0.0-20240214191810-524a5c58fbaa - github.com/streamingfast/dstore v0.1.1-0.20240826190906-91345d4a31f2 + github.com/streamingfast/dstore v0.1.1-0.20241011152904-9acd6205dc14 github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308 // indirect github.com/streamingfast/pbgo v0.0.6-0.20240823134334-812f6a16c5cb // indirect github.com/streamingfast/shutter v1.5.0 @@ -139,9 +151,9 @@ require ( golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/sys v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/text v0.18.0 // indirect google.golang.org/api v0.172.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index c41546e..ecfdf23 100644 --- a/go.sum +++ b/go.sum @@ -87,6 +87,8 @@ github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer5 github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.325 h1:jF/L99fJSq/BfiLmUOflO/aM+LwcqBm0Fe/qTK5xxuI= github.com/aws/aws-sdk-go v1.44.325/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +101,8 @@ github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d h1:fSlGu5ePbkj github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d/go.mod h1:yCBkgASmKHgUOFjK9h1sOytUVgA+JkQjqj3xYP4AdWY= github.com/bobg/go-generics/v2 v2.2.2 h1:cHTV51Vr/wSlwiNWvncz66E4QtoRw9qXZeEiLAmwqW8= github.com/bobg/go-generics/v2 v2.2.2/go.mod h1:ieOJ1ARFvk+HfMKbW1DT5UzJ/CJPKoiRm17QKK82bRE= +github.com/bobg/go-generics/v3 v3.4.0 h1:XxTJxH843OknMgw//HGQXklJCZ0eacdt5EABfNcKFr8= +github.com/bobg/go-generics/v3 v3.4.0/go.mod h1:gCsHnnRz88zpXpdsWPyDmjg1tYQPmpbUQbM4MW8z9Jc= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -108,6 +112,10 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= 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/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg= +github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo= +github.com/charmbracelet/x/ansi v0.4.2 h1:0JM6Aj/g/KC154/gOP4vfxun0ff6itogDYk41kof+qk= +github.com/charmbracelet/x/ansi v0.4.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0 h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= @@ -365,6 +373,8 @@ github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffkt github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -382,6 +392,8 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +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/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -393,6 +405,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a h1:2MaM6YC3mGu54x+RKAA6JiFFHlHDY1UbkxqppT7wYOg= +github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a/go.mod h1:hxSnBBYLK21Vtq/PHd0S2FYCxBXzBua8ov5s1RobyRQ= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -423,6 +437,8 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -455,10 +471,10 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/streamingfast/bstream v0.0.2-0.20240906151250-c7bc58efc760 h1:m6yFZwq1t45QjPK7B1UEoRvM99YYD8U2OZIa3oLtgbM= -github.com/streamingfast/bstream v0.0.2-0.20240906151250-c7bc58efc760/go.mod h1:n5wy+Vmwp4xbjXO7B81MAkAgjnf1vJ/lI2y6hWWyFbg= -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/bstream v0.0.2-0.20241108153156-a5c6bc006f41 h1:Y9bB+Wsd5q6DZsLnOMdsgN/BjonRXrbPeQjqDLihFoM= +github.com/streamingfast/bstream v0.0.2-0.20241108153156-a5c6bc006f41/go.mod h1:n5wy+Vmwp4xbjXO7B81MAkAgjnf1vJ/lI2y6hWWyFbg= +github.com/streamingfast/cli v0.0.4-0.20241119021815-815afa473375 h1:nwuFSEJtQfqTuN62WvysfAtDT4qqwQ6ghFX0i2VY1fY= +github.com/streamingfast/cli v0.0.4-0.20241119021815-815afa473375/go.mod h1:qOksW3DPhHVYBo8dcYxS7K3Q09wlcOChSdopeOjLWng= 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= @@ -469,8 +485,8 @@ github.com/streamingfast/dhammer v0.0.0-20220506192416-3797a7906da2 h1:/mcLVdwy6 github.com/streamingfast/dhammer v0.0.0-20220506192416-3797a7906da2/go.mod h1:MyG3U4ABuf7ANS8tix+e8UUevN7B9juhEnAbslS/X3M= github.com/streamingfast/dmetrics v0.0.0-20240214191810-524a5c58fbaa h1:PJkLMu6Own6V5qYwJDQHgRBCTTW2CxV4xxADMXfw+0M= github.com/streamingfast/dmetrics v0.0.0-20240214191810-524a5c58fbaa/go.mod h1:JbxEDbzWRG1dHdNIPrYfuPllEkktZMgm40AwVIBENcw= -github.com/streamingfast/dstore v0.1.1-0.20240826190906-91345d4a31f2 h1:BB3VSDl8/OHBSvjqfgufwqr4tD5l7XPjXybDm6uudj4= -github.com/streamingfast/dstore v0.1.1-0.20240826190906-91345d4a31f2/go.mod h1:kNzxgv2MzYFn2T4kelBVpGp/yP/1njtr3+csWuqxK3w= +github.com/streamingfast/dstore v0.1.1-0.20241011152904-9acd6205dc14 h1:/2HxIOzAgUBKyxjDO4IJPzBBaEAtzwipb/2/JGsOArA= +github.com/streamingfast/dstore v0.1.1-0.20241011152904-9acd6205dc14/go.mod h1:kNzxgv2MzYFn2T4kelBVpGp/yP/1njtr3+csWuqxK3w= github.com/streamingfast/logging v0.0.0-20210811175431-f3b44b61606a/go.mod h1:4GdqELhZOXj4xwc4IaBmzofzdErGynnaSzuzxy0ZIBo= github.com/streamingfast/logging v0.0.0-20220222131651-12c3943aac2e/go.mod h1:4GdqELhZOXj4xwc4IaBmzofzdErGynnaSzuzxy0ZIBo= github.com/streamingfast/logging v0.0.0-20220304214715-bc750a74b424/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= @@ -484,10 +500,8 @@ github.com/streamingfast/schema v0.0.0-20240621180609-1de2e05fe3bd h1:P96NMUr1jD github.com/streamingfast/schema v0.0.0-20240621180609-1de2e05fe3bd/go.mod h1:XuHkKh98QevgA9M3oWB5Y5Tm6w7iNJ5P3a3ao7UnnfI= github.com/streamingfast/shutter v1.5.0 h1:NpzDYzj0HVpSiDJVO/FFSL6QIK/YKOxY0gJAtyaTOgs= github.com/streamingfast/shutter v1.5.0/go.mod h1:B/T6efqdeMGbGwjzPS1ToXzYZI4kDzI5/u4I+7qbjY8= -github.com/streamingfast/substreams v1.10.3 h1:89E41ZQiR79+2jqEkqflCK0MjgJHgiIgz+lIATq+og0= -github.com/streamingfast/substreams v1.10.3/go.mod h1:K258nTQL1Lxn84W9KrpNMy/w8P9+6kmvCWKEMu7LmQE= -github.com/streamingfast/substreams-sink v0.4.2 h1:dkRj/O6cxleI/vxNc4soPbkeUK9vPQ3HMvSG4OPekSw= -github.com/streamingfast/substreams-sink v0.4.2/go.mod h1:Cn0R1A9dP5wS4bXuVPDf96BO2hYE+3p1gy54QBrM0BA= +github.com/streamingfast/substreams v1.11.1 h1:qiCJwTFqn9ubpQ02aKsJDqHIV8vLocu/fKdTUX4wHqU= +github.com/streamingfast/substreams v1.11.1/go.mod h1:6qjmyNq0INxC/3EXF4M2QEf1Su7X8Lq2FCKfGIFXupU= github.com/streamingfast/substreams-sink-database-changes v1.1.3 h1:rXeGb/V2mjC8FftumRkMQxG2jtdLfHdLx9UQVUtAqS8= github.com/streamingfast/substreams-sink-database-changes v1.1.3/go.mod h1:bul4OLl22/M8LlYO9+sxA/5ghUrV7eYrG5NSlfm5m5k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -756,8 +770,9 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -776,8 +791,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/sinker/sinker_test.go b/sinker/sinker_test.go index a60459e..0564206 100644 --- a/sinker/sinker_test.go +++ b/sinker/sinker_test.go @@ -214,7 +214,7 @@ func TestInserts(t *testing.T) { "testschema", db.TestTables("testschema"), ) - s, err := sink.New(sink.SubstreamsModeDevelopment, testPackage, testPackage.Modules.Modules[0], []byte("unused"), testClientConfig, logger, nil) + s, err := sink.New(sink.SubstreamsModeDevelopment, false, testPackage, testPackage.Modules.Modules[0], []byte("unused"), testClientConfig, logger, nil) require.NoError(t, err) sinker, _ := New(s, l, logger, nil) From 6e542c8ffe4ab3066b1c4402a96f9a5dc3a6ab0a Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Fri, 29 Nov 2024 14:19:21 -0500 Subject: [PATCH 8/9] prepare for release --- CHANGELOG.md | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b5a2da..d3c302e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## v4.3.0 * Added a check for non-existent columns in Clickhouse - * Added support for `Nullable` types in Clickhouse. +* Bump substreams to `v0.11.1` +* Bump substreams-sink to `v0.5.0` ## v4.2.2 @@ -91,7 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Protodefs v1.0.4 -* Added support for `rest_frontend` field with `enabled` boolean flag, aimed at this backend implementation: https://github.com/semiotic-ai/sql-wrapper +* Added support for `rest_frontend` field with `enabled` boolean flag, aimed at this backend implementation: ## v3.0.5 @@ -125,7 +126,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Highlights -This release brings a major refactoring enabling support for multiple database drivers and not just Postgres anymore. Our first newly supported driver is [Clickhouse](https://clickhouse.com/#getting_started) which defines itself as _The fastest and most resource efficient open-source database for real-time apps and analytics_. In the future, further database driver could be supported like MySQL, MSSQL and any other that can talk the SQL protocol. +This release brings a major refactoring enabling support for multiple database drivers and not just Postgres anymore. Our first newly supported driver is [Clickhouse](https://clickhouse.com/#getting_started) which defines itself as *The fastest and most resource efficient open-source database for real-time apps and analytics*. In the future, further database driver could be supported like MySQL, MSSQL and any other that can talk the SQL protocol. Now that we support multiple driver, keeping the `substreams-sink-postgres` didn't make sense anymore. As such, we have renamed the project from `substreams-sink-postgresql` to `substreams-sink-sql` since it now supports Clickhouse out of the box. The binary and Go modules have been renamed in consequence. @@ -211,8 +212,8 @@ Similar changes have been applied to other commands as well. You can connect to Clickhouse by using the following DSN: - - Not encrypted: `clickhouse://:9000/?username=&password=` - - Encrypted: `clickhouse://:9440/?secure=true&skip_verify=true&username=&password=` + * Not encrypted: `clickhouse://:9000/?username=&password=` + * Encrypted: `clickhouse://:9440/?secure=true&skip_verify=true&username=&password=` If you want to send custom args to the connection, you can use by sending as query params. @@ -268,8 +269,8 @@ See the [High Throughput Injection section](https://github.com/streamingfast/sub * Added newer method of populating the database via CSV (thanks [@gusinacio](https://github.com/gusinacio)!). Newer commands: - - `generate-csv`: Generates CSVs for each table - - `inject-csv`: Injects generated CSV rows for `` + * `generate-csv`: Generates CSVs for each table + * `inject-csv`: Injects generated CSV rows for `
` ## v2.4.0 @@ -321,7 +322,7 @@ See the [High Throughput Injection section](https://github.com/streamingfast/sub ### Changed -* Now using Go Protobuf generate bindings from https://github.com/streamingfast/substreams-sink-database-changes. +* Now using Go Protobuf generate bindings from . ## v2.3.0 @@ -369,9 +370,9 @@ This silent behavior is problematic because it could seen like the cursor was lo This release brings in a new flag `substreams-sink-postgres run --on-module-hash-mistmatch=error` (default value shown) where it would control how we should react to a changes in the module's hash since last run. -- If `error` is used (default), it will exit with an error explaining the problem and how to fix it. -- If `warn` is used, it does the same as 'ignore' but it will log a warning message when it happens. -- If `ignore` is set, we pick the cursor at the highest block number and use it as the starting point. Subsequent updates to the cursor will overwrite the module hash in the database. +* If `error` is used (default), it will exit with an error explaining the problem and how to fix it. +* If `warn` is used, it does the same as 'ignore' but it will log a warning message when it happens. +* If `ignore` is set, we pick the cursor at the highest block number and use it as the starting point. Subsequent updates to the cursor will overwrite the module hash in the database. There is a possibility that multiple cursors exists in your database, hence why we pick the one with the highest block. If it's the case, you will be warned that multiple cursors exists. You can run `substreams-sink-postgres tools cursor cleanup --dsn=` which will delete now useless cursors. @@ -413,19 +414,19 @@ The `ignore` value can be used to change to a new `.spkg` while retaining the pr ### Changed -- Diminish amount of allocations done to perform fields transformation. +* Diminish amount of allocations done to perform fields transformation. ### Fixed -- Fixed some places where escaping for either identifier or value was not done properly. +* Fixed some places where escaping for either identifier or value was not done properly. -- Fixed double escaping of boolean values. +* Fixed double escaping of boolean values. ## v2.0.1 ### Added -- Added proper escaping for table & column names to allow keyword column names to use keywords as column names such as `to` and `from` etc. +* Added proper escaping for table & column names to allow keyword column names to use keywords as column names such as `to` and `from` etc. ## v2.0.0 @@ -447,18 +448,17 @@ If you were using environment variable to configure the binary, note that the en ### Changed -- **Deprecated** The flag `--irreversible-only` is deprecated, use `--final-blocks-only` instead. +* **Deprecated** The flag `--irreversible-only` is deprecated, use `--final-blocks-only` instead. ### Added +* Added command `substreams-sink-postgres tools --dsn cursor read` to read the current cursors stored in your database. -- Added command `substreams-sink-postgres tools --dsn cursor read` to read the current cursors stored in your database. - -- **Dangerous** Added command `substreams-sink-postgres tools --dsn cursor write ` to update the cursor in your database for the given `` +* **Dangerous** Added command `substreams-sink-postgres tools --dsn cursor write ` to update the cursor in your database for the given `` > **Warning** This is a destructive operation, be sure you understand the consequences of updating the cursor. -- **Dangerous** Added command `substreams-sink-postgres tools --dsn cursor delete [|--all]` to delete the cursor associated with the given module's hash or all cursors if `--all` is used. +* **Dangerous** Added command `substreams-sink-postgres tools --dsn cursor delete [|--all]` to delete the cursor associated with the given module's hash or all cursors if `--all` is used. > **Warning** This is a destructive operation, be sure you understand the consequences of updating the cursor. @@ -470,11 +470,10 @@ This is the latest release before upgrading to Substreams RPC v2. ### Added -- Added `--infinite-retry` to never exit on error and retry indefinitely instead. +* Added `--infinite-retry` to never exit on error and retry indefinitely instead. -- Added `--development-mode` to run in development mode. +* Added `--development-mode` to run in development mode. > **Warning** You should use that flag for testing purposes, development mode drastically reduce performance you get from the server. -- Added `--irreversible-only` to only deal with final (irreversible) blocks. - +* Added `--irreversible-only` to only deal with final (irreversible) blocks. From 803abd5ad813c61d1f97fe1f7869baa5eafed0cd Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Fri, 29 Nov 2024 14:21:03 -0500 Subject: [PATCH 9/9] fix go mod --- go.mod | 2 -- go.sum | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index fb9f8b8..a77ad5c 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,6 @@ require ( google.golang.org/protobuf v1.33.0 ) -replace github.com/streamingfast/substreams-sink => ../substreams-sink - require ( buf.build/gen/go/bufbuild/reflect/connectrpc/go v1.16.1-20240117202343-bf8f65e8876c.1 // indirect buf.build/gen/go/bufbuild/reflect/protocolbuffers/go v1.33.0-20240117202343-bf8f65e8876c.1 // indirect diff --git a/go.sum b/go.sum index ecfdf23..20e09e1 100644 --- a/go.sum +++ b/go.sum @@ -502,6 +502,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/substreams v1.11.1 h1:qiCJwTFqn9ubpQ02aKsJDqHIV8vLocu/fKdTUX4wHqU= github.com/streamingfast/substreams v1.11.1/go.mod h1:6qjmyNq0INxC/3EXF4M2QEf1Su7X8Lq2FCKfGIFXupU= +github.com/streamingfast/substreams-sink v0.5.0 h1:UnKyR22xmSQPm/jlD2Uz6kcOVcqOoPtThDAjZDq5FOE= +github.com/streamingfast/substreams-sink v0.5.0/go.mod h1:8Wlr5fVIe5blL3yBVQi5e01lJLp1inHe7lxsrOqbe88= github.com/streamingfast/substreams-sink-database-changes v1.1.3 h1:rXeGb/V2mjC8FftumRkMQxG2jtdLfHdLx9UQVUtAqS8= github.com/streamingfast/substreams-sink-database-changes v1.1.3/go.mod h1:bul4OLl22/M8LlYO9+sxA/5ghUrV7eYrG5NSlfm5m5k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=