Skip to content

Commit

Permalink
remove confusing 'firehose-blocks-store-urls' flag, use common-blocks…
Browse files Browse the repository at this point in the history
…-store-url now, multi-stores feature broken
  • Loading branch information
sduchesneau committed Apr 18, 2022
1 parent 4686a5a commit c2ecdd6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
12 changes: 5 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). See [MAINTAINERS.md](./MAINTAINERS.md)
for instructions to keep up to date.

## v0.10.2
## UNRELEASED

#### Fixed
* Removed `firehose-blocks-store-urls` flag (feature for using multiple stores now deprecated -> causes confusion and issues with block-caching), use `common-blocks-sture-url` instead.

## v0.10.2

* Fixed problem using S3 provider where the S3 API returns empty filename (we ignore at the consuming time when we receive an empty filename result).

## v0.10.1

#### Fixed

* Fixed an issue where the merger could panic on a new deployment

## v0.10.0

#### Fixed

* Fixed an issue where the `merger` would get stuck when too many (more than 2000) one-block-files were lying around, with block numbers below the current bundle high boundary.

## v0.10.0-rc.5

### Changed
#### Changed

* Renamed common `atm` 4 flags to `blocks-cache`:
`--common-blocks-cache-{enabled|dir|max-recent-entry-bytes|max-entry-by-age-bytes}`
Expand Down
15 changes: 2 additions & 13 deletions cmd/sfeth/cli/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"fmt"
"os"
"strconv"
"strings"
"time"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -51,7 +50,6 @@ func init() {
Description: "Provides on-demand filtered blocks, depends on common-blocks-store-url and common-blockstream-addr",
RegisterFlags: func(cmd *cobra.Command) error {
cmd.Flags().String("firehose-grpc-listen-addr", FirehoseGRPCServingAddr, "Address on which the firehose will listen, appending * to the end of the listen address will start the server over an insecure TLS connection")
cmd.Flags().StringSlice("firehose-blocks-store-urls", nil, "If non-empty, overrides common-blocks-store-url with a list of blocks stores")
cmd.Flags().Duration("firehose-realtime-tolerance", 2*time.Minute, "Longest delay to consider this service as real-time (ready) on initialization")
// irreversible indices
cmd.Flags().String("firehose-irreversible-blocks-index-url", "", "If non-empty, will use this URL as a store to read irreversibility data on blocks and optimize replay")
Expand Down Expand Up @@ -83,17 +81,8 @@ func init() {
}
dmetering.SetDefaultMeter(metering)

firehoseBlocksStoreURLs := viper.GetStringSlice("firehose-blocks-store-urls")
if len(firehoseBlocksStoreURLs) == 0 {
firehoseBlocksStoreURLs = []string{MustReplaceDataDir(sfDataDir, viper.GetString("common-blocks-store-url"))}
} else if len(firehoseBlocksStoreURLs) == 1 && strings.Contains(firehoseBlocksStoreURLs[0], ",") {
// Providing multiple elements from config doesn't work with `viper.GetStringSlice`, so let's also handle the case where a single element has separator
firehoseBlocksStoreURLs = strings.Split(firehoseBlocksStoreURLs[0], ",")
}

for i, url := range firehoseBlocksStoreURLs {
firehoseBlocksStoreURLs[i] = MustReplaceDataDir(sfDataDir, url)
}
blocksStoreURL := MustReplaceDataDir(sfDataDir, viper.GetString("common-blocks-store-url"))
firehoseBlocksStoreURLs := []string{blocksStoreURL}

if ll := os.Getenv("FIREHOSE_THREADS"); ll != "" {
if llint, err := strconv.ParseInt(ll, 10, 32); err == nil {
Expand Down
4 changes: 2 additions & 2 deletions devel/firehose-mainnet/firehose-mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ start:
args:
- firehose
flags:
firehose-blocks-store-urls: gs://dfuseio-global-blocks-us/eth-mainnet/v5
common-blocks-store-url: gs://dfuseio-global-blocks-us/eth-mainnet/v5
common-blockstream-addr: localhost:9001
firehose-grpc-listen-addr: :9000*
firehose-grpc-listen-addr: :9000*

0 comments on commit c2ecdd6

Please sign in to comment.