From a14b3224a8647a4064a3c7b6275aaaf2aacac18c Mon Sep 17 00:00:00 2001 From: chowbao Date: Mon, 13 May 2024 10:46:38 -0400 Subject: [PATCH] Update to latest stellar/go change with updated ledgerexporter zstd (#244) * Update to latest stellar/go change with updated ledgerexporter zstd --- go.mod | 3 ++- go.sum | 4 ++-- internal/utils/main.go | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index fc76db68..750af302 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.17.0 - github.com/stellar/go v0.0.0-20240507142223-735600adb2d4 + github.com/stellar/go v0.0.0-20240510213328-79f44c65cb44 github.com/stretchr/testify v1.9.0 ) @@ -50,6 +50,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/klauspost/compress v1.17.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/magiconair/properties v1.8.7 // indirect diff --git a/go.sum b/go.sum index 568dfe39..7ba7615d 100644 --- a/go.sum +++ b/go.sum @@ -296,8 +296,8 @@ 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.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= -github.com/stellar/go v0.0.0-20240507142223-735600adb2d4 h1:4dmEOaVcttNCZTIXE8y5VwNvduqVwE+D7oFLAu2nn/k= -github.com/stellar/go v0.0.0-20240507142223-735600adb2d4/go.mod h1:kxiz7GJ94uVORlLZ/q7BrEQZAvBgkNXly7I19axD3EA= +github.com/stellar/go v0.0.0-20240510213328-79f44c65cb44 h1:a53z95H5rfJ871NWopW1s57lmXvsC76KTIcYrWfvkrA= +github.com/stellar/go v0.0.0-20240510213328-79f44c65cb44/go.mod h1:cHNYV5oK7fp9ZkRIC9fjQxvIArxGPk42q/f3YQBQll0= github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 h1:OzCVd0SV5qE3ZcDeSFCmOWLZfEWZ3Oe8KtmSOYKEVWE= github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/internal/utils/main.go b/internal/utils/main.go index e54fe920..bcbd8bc8 100644 --- a/internal/utils/main.go +++ b/internal/utils/main.go @@ -235,7 +235,7 @@ func AddCommonFlags(flags *pflag.FlagSet) { flags.Bool("futurenet", false, "If set, will connect to Futurenet instead of Mainnet.") flags.StringToStringP("extra-fields", "u", map[string]string{}, "Additional fields to append to output jsons. Used for appending metadata") flags.Bool("captive-core", false, "If set, run captive core to retrieve data. Otherwise use TxMeta file datastore.") - flags.String("datastore-path", "ledger-exporter/ledgers", "Datastore bucket path to read txmeta files from.") + flags.String("datastore-path", "sdf-ledger-close-metas/ledgers", "Datastore bucket path to read txmeta files from.") flags.Uint32("buffer-size", 5, "Buffer size sets the max limit for the number of txmeta files that can be held in memory.") flags.Uint32("num-workers", 5, "Number of workers to spawn that read txmeta files from the datastore.") flags.Uint32("retry-limit", 3, "Datastore GetLedger retry limit.") @@ -820,13 +820,10 @@ func CreateLedgerBackend(ctx context.Context, useCaptiveCore bool, env Environme ledgerBatchConfig := datastore.LedgerBatchConfig{ LedgersPerFile: 1, FilesPerPartition: 64000, - FileSuffix: ".xdr.gz", } - // TODO: In the future CompressionType should be removed as it won't be configurable BSBackendConfig := ledgerbackend.BufferedStorageBackendConfig{ LedgerBatchConfig: ledgerBatchConfig, - CompressionType: "gzip", DataStore: dataStore, BufferSize: env.CommonFlagValues.BufferSize, NumWorkers: env.CommonFlagValues.NumWorkers,