diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0d37957 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing + +Report any protocol-specific issues in their +[respective repositories](https://github.com/streamingfast/streamingfast#protocols) + +**Please first refer to the general +[StreamingFast contribution guide](https://github.com/streamingfast/streamingfast/blob/master/CONTRIBUTING.md)**, +if you wish to contribute to this code base. + +This codebase uses unit tests extensively, please write and run tests. + +## Generate pb files from proto definition +```bash +cd proto +buf generate +``` + +## Publish proto definition and add it to `firecore` well known +```bash +cd proto +buf push +``` +### Once push go to `firecore` code and edit generator.go to add an entry to wellKnownProtoRepos list. +From root of `firecore` project run ... +```bash +go generate ./... +``` \ No newline at end of file diff --git a/README.md b/README.md index 484bd57..b403c3d 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,3 @@ curl --location 'https://vara-mainnet.public.blastapi.io' --header 'Content-Type ``` ## Contributing - -Report any protocol-specific issues in their -[respective repositories](https://github.com/streamingfast/streamingfast#protocols) - -**Please first refer to the general -[StreamingFast contribution guide](https://github.com/streamingfast/streamingfast/blob/master/CONTRIBUTING.md)**, -if you wish to contribute to this code base. - -This codebase uses unit tests extensively, please write and run tests. diff --git a/cmd/firevara/fetcher.go b/cmd/firevara/fetcher.go index 8c28b5c..495d128 100644 --- a/cmd/firevara/fetcher.go +++ b/cmd/firevara/fetcher.go @@ -26,6 +26,7 @@ func NewFetchCmd(logger *zap.Logger, tracer logging.Tracer) *cobra.Command { cmd.Flags().String("state-dir", "/data", "location to store the cursor.json") cmd.Flags().Duration("interval-between-fetch", 0, "interval between fetch") cmd.Flags().Duration("latest-block-retry-interval", time.Second, "interval between fetch when latest block is not available yet") + cmd.Flags().Int("block-fetch-batch-size", 1, "number of block to fetch in parallel") return cmd } @@ -41,6 +42,7 @@ func fetchRunE(logger *zap.Logger, tracer logging.Tracer) firecore.CommandExecut } fetchInterval := sflags.MustGetDuration(cmd, "interval-between-fetch") + batchSize := sflags.MustGetInt(cmd, "block-fetch-batch-size") logger.Info( "launching firehose-gear poller", @@ -72,7 +74,7 @@ func fetchRunE(logger *zap.Logger, tracer logging.Tracer) firecore.CommandExecut ) // never use batch downloading for blocks - err = poller.Run(ctx, startBlock, 1) + err = poller.Run(ctx, startBlock, int(batchSize)) if err != nil { return fmt.Errorf("running poller: %w", err) }