Skip to content

Commit

Permalink
Update to latest stellar/go change with updated ledgerexporter zstd (#…
Browse files Browse the repository at this point in the history
…244)

* Update to latest stellar/go change with updated ledgerexporter zstd
  • Loading branch information
chowbao authored May 13, 2024
1 parent 2de3397 commit a14b322
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
5 changes: 1 addition & 4 deletions internal/utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a14b322

Please sign in to comment.