Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Aug 19, 2024
1 parent dd69d02 commit da0abb6
Show file tree
Hide file tree
Showing 24 changed files with 927 additions and 206 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
echo "##[set-output name=release_train;]$(echo ${GITHUB_REF#refs/heads/release/})"
- name: Build Injective
working-directory: ./poller
working-directory: ./fetcher
run: go build -v -ldflags "-X main.version=${{ github.event.ref }} -X main.commit=${{ github.sha }} -X main.date=$(date -u +%Y-%m-%dT%H:%MZ)" -o ../fireinjective ./cmd/fireinjective

- name: Build Mantra
working-directory: ./poller
working-directory: ./fetcher
run: go build -v -ldflags "-X main.version=${{ github.event.ref }} -X main.commit=${{ github.sha }} -X main.date=$(date -u +%Y-%m-%dT%H:%MZ)" -o ../firemantra ./cmd/firemantra

- name: Log in to the Container registry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
${{ runner.os }}-go-
- name: Run Poler tests
working-directory: ./poller
working-directory: ./fetcher
run: go test ./...

- name: Build Poller binaries
working-directory: ./poller
working-directory: ./fetcher
run: go build ./...
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.lz4
/.idea
/injective/.idea/
/injective/devel/.env
/injective/devel/data
/fireinjective/.idea/
/fireinjective/devel/.env
/fireinjective/devel/data
8 changes: 4 additions & 4 deletions cometbft/03810/cmds.go → cometbft/03807/cmds.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v03810
package v03807

import (
"fmt"
Expand All @@ -23,7 +23,7 @@ func NewFetchCmd(logger *zap.Logger, tracer logging.Tracer) *cobra.Command {
}

cmd.Flags().StringArray("endpoints", []string{"https://sentry.tm.injective.network:443"}, "interval between fetch")
cmd.Flags().String("state-dir", "/data/poller", "interval between fetch")
cmd.Flags().String("state-dir", "/data/fetcher", "interval between fetch")
cmd.Flags().Duration("interval-between-fetch", 0, "interval between fetch")
cmd.Flags().Duration("latest-block-retry-interval", time.Second, "interval between fetch")
cmd.Flags().Int("block-fetch-batch-size", 10, "Number of blocks to fetch in a single batch")
Expand All @@ -46,7 +46,7 @@ func fetchRunE(logger *zap.Logger, tracer logging.Tracer) firecore.CommandExecut
fetchInterval := sflags.MustGetDuration(cmd, "interval-between-fetch")

logger.Info(
"launching firehose-cosmos poller",
"launching firehose-cosmos fetcher",
zap.Strings("rpc_endpoint", rpcEndpoints),
zap.String("state_dir", stateDir),
zap.Uint64("first_streamable_block", startBlock),
Expand Down Expand Up @@ -77,7 +77,7 @@ func fetchRunE(logger *zap.Logger, tracer logging.Tracer) firecore.CommandExecut

err = poller.Run(ctx, startBlock, sflags.MustGetInt(cmd, "block-fetch-batch-size"))
if err != nil {
return fmt.Errorf("running poller: %w", err)
return fmt.Errorf("running fetcher: %w", err)
}

return nil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v03810
package v03807

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cometbft/03810/fetcher.go → cometbft/03807/fetcher.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v03810
package v03807

import (
"context"
Expand Down
142 changes: 71 additions & 71 deletions poller/go.mod → cometbft/03807/go.mod
Original file line number Diff line number Diff line change
@@ -1,76 +1,119 @@
module github.com/streamingfast/firehose-cosmos/poller
module github.com/streamingfast/firehose-cosmos/cometbft/v03807

go 1.22.2

replace (
github.com/bufbuild/protocompile => github.com/bufbuild/protocompile v0.4.0
github.com/streamingfast/firehose-cosmos/cometbft/03810 => ../cometbft/03810
github.com/streamingfast/firehose-cosmos/cosmos => ../cosmos
github.com/streamingfast/firehose-cosmos/cosmos => ../../cosmos
)

require (
github.com/cometbft/cometbft v0.38.10
github.com/cometbft/cometbft-db v0.12.0
github.com/spf13/cobra v1.8.1
github.com/cometbft/cometbft v0.38.7
github.com/cosmos/gogoproto v1.4.12
github.com/hashicorp/go-multierror v1.1.1
github.com/streamingfast/bstream v0.0.2-0.20240619142813-9d23840859bf
github.com/streamingfast/cli v0.0.4-0.20240412191021-5f81842cb71d
github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1
github.com/streamingfast/dstore v0.1.1-0.20240325191553-bcce8892a9bb
github.com/streamingfast/firehose-core v1.5.7
github.com/streamingfast/firehose-cosmos/cometbft/03810 v0.0.0-20240814201753-e3975f04e699
github.com/streamingfast/firehose-cosmos/cosmos v0.0.0-00010101000000-000000000000
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091
go.uber.org/zap v1.26.0
google.golang.org/protobuf v1.33.0
)

require (
buf.build/gen/go/bufbuild/reflect/connectrpc/go v1.16.1-20240117202343-bf8f65e8876c.1 // indirect
buf.build/gen/go/bufbuild/reflect/protocolbuffers/go v1.33.0-20240117202343-bf8f65e8876c.1 // indirect
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/monitoring v1.18.0 // indirect
cloud.google.com/go/storage v1.38.0 // indirect
cloud.google.com/go/trace v1.10.5 // indirect
connectrpc.com/connect v1.16.1 // indirect
contrib.go.opencensus.io/exporter/stackdriver v0.13.10 // indirect
contrib.go.opencensus.io/exporter/zipkin v0.1.1 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.3 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.15.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.39.0 // indirect
github.com/KimMachineGun/automemlimit v0.2.4 // indirect
github.com/RoaringBitmap/roaring v1.9.1 // indirect
github.com/abourget/llerrgroup v0.2.0 // indirect
github.com/alecthomas/participle v0.7.1 // indirect
github.com/bits-and-blooms/bitset v1.12.0 // indirect
github.com/bobg/go-generics/v3 v3.4.0 // indirect
github.com/bufbuild/protocompile v0.5.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/chzyer/readline v1.5.0 // indirect
github.com/cilium/ebpf v0.4.0 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jhump/protoreflect v1.14.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/lithammer/dedent v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/openzipkin/zipkin-go v0.4.2 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.18.1 // indirect
github.com/streamingfast/dauth v0.0.0-20240222213226-519afc16cf84 // indirect
github.com/streamingfast/dhammer v0.0.0-20230125192823-c34bbd561bd4 // indirect
github.com/streamingfast/dmetering v0.0.0-20240422183130-658027cbb7a1 // indirect
github.com/streamingfast/dtracing v0.0.0-20220305214756-b5c0e8699839 // indirect
github.com/streamingfast/sf-tracing v0.0.0-20240430173521-888827872b90 // indirect
github.com/streamingfast/substreams v1.9.3 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.23.1 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.23.1 // indirect
go.opentelemetry.io/otel/sdk v1.23.1 // indirect
go.uber.org/automaxprocs v1.5.1 // indirect
golang.org/x/mod v0.15.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

require (
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.38.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/aws/aws-sdk-go v1.44.325 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.12.0 // indirect
github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d // indirect
github.com/bobg/go-generics/v3 v3.4.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/bufbuild/protocompile v0.6.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cilium/ebpf v0.4.0 // indirect
github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cosmos/gogoproto v1.4.12 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
Expand All @@ -82,7 +125,6 @@ require (
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -96,94 +138,54 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jhump/protoreflect v1.14.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/linxGnu/grocksdb v1.8.14 // indirect
github.com/lithammer/dedent v1.1.0 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae // indirect
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/openzipkin/zipkin-go v0.4.2 // indirect
github.com/paulbellamy/ratecounter v0.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.10.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
github.com/sethvargo/go-retry v0.2.3 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.18.2 // indirect
github.com/streamingfast/dauth v0.0.0-20240222213226-519afc16cf84 // indirect
github.com/spf13/cobra v1.8.1
github.com/streamingfast/dbin v0.9.1-0.20231117225723-59790c798e2c // indirect
github.com/streamingfast/derr v0.0.0-20230515163924-8570aaa43fe1 // indirect
github.com/streamingfast/dgrpc v0.0.0-20240423143010-f36784700c9a // indirect
github.com/streamingfast/dhammer v0.0.0-20230125192823-c34bbd561bd4 // indirect
github.com/streamingfast/dmetering v0.0.0-20240422183130-658027cbb7a1 // indirect
github.com/streamingfast/dmetrics v0.0.0-20230919161904-206fa8ebd545 // indirect
github.com/streamingfast/dtracing v0.0.0-20220305214756-b5c0e8699839 // indirect
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091
github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308 // indirect
github.com/streamingfast/pbgo v0.0.6-0.20240430190514-722fe9d82e5d // indirect
github.com/streamingfast/sf-tracing v0.0.0-20240430173521-888827872b90 // indirect
github.com/streamingfast/shutter v1.5.0 // indirect
github.com/streamingfast/substreams v1.9.3 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf // indirect
github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869 // indirect
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.9.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.23.1 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.23.1 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.23.1 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/automaxprocs v1.5.1 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
Expand All @@ -197,8 +199,6 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.64.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading

0 comments on commit da0abb6

Please sign in to comment.