Skip to content

Commit

Permalink
pass metering config string instead of network name to tier1 config
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Mar 27, 2024
1 parent 6271fa9 commit 2230435
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions cmd/apps/substreams_tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func RegisterSubstreamsTier1App[B firecore.Block](chain *firecore.Chain[B], root
cmd.Flags().Bool("substreams-tier1-subrequests-insecure", false, "Connect to tier2 without checking certificate validity")
cmd.Flags().Bool("substreams-tier1-subrequests-plaintext", true, "Connect to tier2 without client in plaintext mode")
cmd.Flags().Int("substreams-tier1-max-subrequests", 4, "number of parallel subrequests that the tier1 can make to the tier2 per request")
cmd.Flags().String("substreams-tier1-network-name", "undefined", "Network name to use for the substreams tier1 server. Used for metrics and logging. Default is 'undefined'")

// all substreams
registerCommonSubstreamsFlags(cmd)
Expand Down Expand Up @@ -103,11 +102,11 @@ func RegisterSubstreamsTier1App[B firecore.Block](chain *firecore.Chain[B], root
return nil, fmt.Errorf("substreams extensions: %w", err)
}

networkName := viper.GetString("substreams-tier1-network-name")
meteringConfig := viper.GetString("common-metering-plugin")

return app.NewTier1(appLogger,
&app.Tier1Config{
NetworkName: networkName,
MeteringConfig: meteringConfig,

MergedBlocksStoreURL: mergedBlocksStoreURL,
OneBlocksStoreURL: oneBlocksStoreURL,
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ require (
github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1
github.com/streamingfast/dgrpc v0.0.0-20240222213940-b9f324ff4d5c
github.com/streamingfast/dhammer v0.0.0-20230125192823-c34bbd561bd4
github.com/streamingfast/dmetering v0.0.0-20240327142626-e233666e4ea5
github.com/streamingfast/dmetering v0.0.0-20240327163525-9249aa9bcceb
github.com/streamingfast/dmetrics v0.0.0-20230919161904-206fa8ebd545
github.com/streamingfast/dstore v0.1.1-0.20240325191553-bcce8892a9bb
github.com/streamingfast/jsonpb v0.0.0-20210811021341-3670f0aa02d0
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091
github.com/streamingfast/pbgo v0.0.6-0.20240131193313-6b88bc7139db
github.com/streamingfast/snapshotter v0.0.0-20230316190750-5bcadfde44d0
github.com/streamingfast/substreams v1.4.1-0.20240326155609-e3ba0b840b6b
github.com/streamingfast/substreams v1.4.1-0.20240327163819-5ea165e41a59
github.com/stretchr/testify v1.8.4
github.com/test-go/testify v1.1.4
go.uber.org/multierr v1.10.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ github.com/streamingfast/dgrpc v0.0.0-20240222213940-b9f324ff4d5c h1:hn5ZPKGtgsc
github.com/streamingfast/dgrpc v0.0.0-20240222213940-b9f324ff4d5c/go.mod h1:EPtUX/vhRphE37Zo6sDcgD/S3sm5YqXHhxAgzS6Ebwo=
github.com/streamingfast/dhammer v0.0.0-20230125192823-c34bbd561bd4 h1:HKi8AIkLBzxZWmbCRUo1RxoOLK33iXO6gZprfsE9rf4=
github.com/streamingfast/dhammer v0.0.0-20230125192823-c34bbd561bd4/go.mod h1:ehPytv7E4rI65iLcrwTes4rNGGqPPiugnH+20nDQyp4=
github.com/streamingfast/dmetering v0.0.0-20240327142626-e233666e4ea5 h1:kk8N3zz3OkLQcWBVn9SWdyzow2q61kiQ4slX3irnHYk=
github.com/streamingfast/dmetering v0.0.0-20240327142626-e233666e4ea5/go.mod h1:UqWuX3REU/IInBUaymFN2eLjuvz+/0SsoUFjeQlLNyI=
github.com/streamingfast/dmetering v0.0.0-20240327163525-9249aa9bcceb h1:lSAKMPTZAlHJsO2I0frKGSXIsjMLI7fmX/1fMvrwy+o=
github.com/streamingfast/dmetering v0.0.0-20240327163525-9249aa9bcceb/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.20240325191553-bcce8892a9bb h1:tmu8wGiSTzdqk2CnPnI7GywKwepGieqNOQDRKKSiVJg=
Expand Down Expand Up @@ -625,8 +625,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.4.1-0.20240326155609-e3ba0b840b6b h1:eQ2OQI6AuIrV9xg6b2GWseBhPT5BVemoXwDFujAilZc=
github.com/streamingfast/substreams v1.4.1-0.20240326155609-e3ba0b840b6b/go.mod h1:tS03mbQ14PcuqmQCKvj82yENHaMl2xKxUBvWHJT06QQ=
github.com/streamingfast/substreams v1.4.1-0.20240327163819-5ea165e41a59 h1:33w7sMfPKOVSZs0TULrmtZ+FWrFs4pSLJAgLNSorzGo=
github.com/streamingfast/substreams v1.4.1-0.20240327163819-5ea165e41a59/go.mod h1:jojy0cwkhpsuF1AsyYQ7NEhwxtCwlWWFY1GfzHE55ZQ=
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=
Expand Down

0 comments on commit 2230435

Please sign in to comment.