Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 31 additions & 23 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -236,48 +236,56 @@ for x in range(localnet_config["relayminers"]["count"]):
"--set=image.repository=pocketd",
]

#############
# NOTE: To provide a proper configuration for the relayminer, we dynamically
# define the supplier configuration overrides for the relayminer helm chart
# so that every service enabled in the localnet configuration (ollama, rest)
# file are also declared in the relayminer.config.suppliers list.
#############
############################################################################
######## Dynamic supplier configuration overrides. ##########################
# To provide a proper configuration for the relayminer, we dynamically define
# the supplier configuration overrides for the relayminer helm chart.
# This is so that every service enabled in the localnet configuration (e.g. ollama, rest)
# are also declared in the relayminer.config.suppliers list.
############################################################################

supplier_number = 0
eagerValidation = str(localnet_config["relayminers"].get("eagerValidation", False))

# Service: Anvil
supplier_number = 0
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=anvil")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://anvil:8547/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].rpc_type_service_configs.json_rpc.backend_url=http://anvil:8547/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+str(localnet_config["relayminers"].get("eagerValidation", False)))
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+eagerValidation)


# Service: Anvil WS
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=anvilws")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://anvil:8547/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].rpc_type_service_configs.websocket.backend_url=ws://anvil:8547/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+str(localnet_config["relayminers"].get("eagerValidation", False)))
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+eagerValidation)


# Service: Static
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=static")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://nginx-chainid/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+str(localnet_config["relayminers"].get("eagerValidation", False)))
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+eagerValidation)

# Service: REST
if localnet_config["rest"]["enabled"]:
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=rest")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://rest:10000/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+str(localnet_config["relayminers"].get("eagerValidation", False)))
supplier_number = supplier_number + 1
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=rest")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://rest:10000/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+eagerValidation)

# Service: Ollama
if localnet_config["ollama"]["enabled"]:
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=ollama")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://ollama:11434/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+str(localnet_config["relayminers"].get("eagerValidation", False)))
supplier_number = supplier_number + 1
supplier_number = supplier_number + 1
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_id=ollama")
flags.append("--set=config.suppliers["+str(supplier_number)+"].listen_url=http://0.0.0.0:8545")
flags.append("--set=config.suppliers["+str(supplier_number)+"].service_config.backend_url=http://ollama:11434/")
flags.append("--set=config.suppliers["+str(supplier_number)+"].enable_eager_relay_request_validation="+eagerValidation)

helm_resource(
"relayminer" + str(actor_number),
Expand Down
152 changes: 73 additions & 79 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,38 @@ module github.com/pokt-network/poktroll
// 6. go mod tidy
// 7. make ignite_build # and/or (re)start/build localnet

//module github.com/pokt-network/pocket
//replace github.com/pokt-network/poktroll => .

go 1.24.3

tool (
github.com/bufbuild/buf/cmd/buf
github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar
github.com/cosmos/gogoproto/protoc-gen-gocosmos
github.com/cosmos/gogoproto/protoc-gen-gogo
github.com/golangci/golangci-lint/cmd/golangci-lint
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
golang.org/x/tools/cmd/goimports
google.golang.org/grpc/cmd/protoc-gen-go-grpc
google.golang.org/protobuf/cmd/protoc-gen-go
)

// DEVELOPER_TIP: Uncomment to use local copies of various libraries
// replace github.com/pokt-network/shannon-sdk => ../shannon-sdk
// replace github.com/pokt-network/smt => ../smt
// replace github.com/pokt-network/smt/kvstore/badger => ../smt/kvstore/badger
// replace github.com/pokt-network/smt/kvstore/pebble => ../smt/kvstore/pebble

// TODO: Investigate why we need to replace this?
replace nhooyr.io/websocket => github.com/coder/websocket v1.8.6
replace (
// TODO_HACK(@olshansk): Replace CometBFT with Pocket's fork to avoid blocking RPC queries on heavy EndBlockers.
// Ref: https://github.com/pokt-network/cometbft/issues/3
github.com/cometbft/cometbft => github.com/pokt-network/cometbft v0.38.17-0.20250808222235-91d271231811

// replace broken goleveldb
replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7

// TODO_HACK(@olshansk): Replace CometBFT with Pocket's fork to avoid blocking RPC queries on heavy EndBlockers.
// Ref: https://github.com/pokt-network/cometbft/issues/3
replace github.com/cometbft/cometbft => github.com/pokt-network/cometbft v0.38.17-0.20250808222235-91d271231811
// replace broken goleveldb
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
// TODO_TECHDEBT(@olshansk): Investigate why we need to replace this?
nhooyr.io/websocket => github.com/coder/websocket v1.8.6
)

require (
cosmossdk.io/x/tx v0.14.0
Expand All @@ -59,60 +71,6 @@ require (
golang.org/x/term v0.32.0
)

require (
cosmossdk.io/api v0.9.2
cosmossdk.io/client/v2 v2.0.0-beta.8
cosmossdk.io/core v0.11.3
cosmossdk.io/depinject v1.2.0
cosmossdk.io/errors v1.0.2
cosmossdk.io/log v1.5.1
cosmossdk.io/math v1.5.3
cosmossdk.io/store v1.1.2
cosmossdk.io/tools/confix v0.1.2
cosmossdk.io/x/circuit v0.1.1
cosmossdk.io/x/evidence v0.1.1
cosmossdk.io/x/feegrant v0.1.1
cosmossdk.io/x/upgrade v0.1.4
github.com/bufbuild/buf v1.54.0 // indirect
github.com/cometbft/cometbft v0.38.17
github.com/cosmos/cosmos-db v1.1.1
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/ibc-go/modules/capability v1.0.1
github.com/cosmos/ibc-go/v8 v8.7.0
github.com/go-kit/kit v0.13.0
github.com/gogo/status v1.1.0
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/hashicorp/go-metrics v0.5.4
github.com/pokt-network/smt v0.14.1
github.com/pokt-network/smt/kvstore/pebble v0.0.0-20240822175047-21ea8639c188
github.com/prometheus/client_golang v1.22.0
github.com/regen-network/gocuke v1.1.0
github.com/rs/zerolog v1.34.0
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
go.uber.org/multierr v1.11.0
golang.org/x/crypto v0.38.0
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/sync v0.14.0
golang.org/x/text v0.25.0
golang.org/x/tools v0.33.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2
google.golang.org/grpc v1.72.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 // indirect
google.golang.org/protobuf v1.36.6
gopkg.in/yaml.v2 v2.4.0
)

require github.com/puzpuzpuz/xsync/v4 v4.2.0

require (
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
4d63.com/gochecknoglobals v0.2.2 // indirect
Expand All @@ -138,8 +96,21 @@ require (
cloud.google.com/go/storage v1.49.0 // indirect
connectrpc.com/connect v1.18.1 // indirect
connectrpc.com/otelconnect v0.7.2 // indirect
cosmossdk.io/api v0.9.2
cosmossdk.io/client/v2 v2.0.0-beta.8
cosmossdk.io/collections v1.2.0 // indirect
cosmossdk.io/core v0.11.3
cosmossdk.io/depinject v1.2.0
cosmossdk.io/errors v1.0.2
cosmossdk.io/log v1.5.1
cosmossdk.io/math v1.5.3
cosmossdk.io/schema v1.1.0 // indirect
cosmossdk.io/store v1.1.2
cosmossdk.io/tools/confix v0.1.2
cosmossdk.io/x/circuit v0.1.1
cosmossdk.io/x/evidence v0.1.1
cosmossdk.io/x/feegrant v0.1.1
cosmossdk.io/x/upgrade v0.1.4
filippo.io/edwards25519 v1.1.0 // indirect
github.com/4meepo/tagalign v1.4.2 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down Expand Up @@ -180,6 +151,7 @@ require (
github.com/bombsimon/wsl/v4 v4.5.0 // indirect
github.com/breml/bidichk v0.3.2 // indirect
github.com/breml/errchkjson v0.4.0 // indirect
github.com/bufbuild/buf v1.54.0 // indirect
github.com/bufbuild/protocompile v0.14.1 // indirect
github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 // indirect
github.com/butuzov/ireturn v0.3.1 // indirect
Expand All @@ -204,13 +176,20 @@ require (
github.com/cockroachdb/pebble v1.1.5 // indirect
github.com/cockroachdb/redact v1.1.6 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v0.38.17
github.com/cometbft/cometbft-db v0.14.1 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.1.1
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/iavl v1.2.2 // indirect
github.com/cosmos/ibc-go/modules/capability v1.0.1
github.com/cosmos/ibc-go/v8 v8.7.0
github.com/cosmos/ics23/go v0.11.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
Expand Down Expand Up @@ -253,6 +232,7 @@ require (
github.com/ghostiam/protogetter v0.3.9 // indirect
github.com/go-critic/go-critic v0.12.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand All @@ -274,8 +254,10 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gogo/status v1.1.0
github.com/golang/glog v1.2.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
github.com/golangci/go-printf-func-name v0.1.0 // indirect
Expand All @@ -298,17 +280,22 @@ require (
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/gordonklaus/ineffassign v0.1.0 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.5.0 // indirect
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.5 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/go-metrics v0.5.4
github.com/hashicorp/go-plugin v1.6.3 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
Expand Down Expand Up @@ -392,10 +379,14 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pokt-network/smt v0.14.1
github.com/pokt-network/smt/kvstore/pebble v0.0.0-20240822175047-21ea8639c188
github.com/polyfloyd/go-errorlint v1.7.1 // indirect
github.com/prometheus/client_golang v1.22.0
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.63.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/puzpuzpuz/xsync/v4 v4.2.0
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
Expand All @@ -405,9 +396,11 @@ require (
github.com/quic-go/quic-go v0.51.0 // indirect
github.com/raeperd/recvcheck v0.2.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/regen-network/gocuke v1.1.0
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/rs/cors v1.11.1 // indirect
github.com/rs/zerolog v1.34.0
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryancurrah/gomodguard v1.3.5 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
Expand All @@ -428,11 +421,15 @@ require (
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.20.1
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.10.0
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tdakkota/asciicheck v0.4.1 // indirect
Expand Down Expand Up @@ -477,18 +474,29 @@ require (
go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/arch v0.15.0 // indirect
golang.org/x/crypto v0.38.0
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sync v0.14.0
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0
golang.org/x/time v0.10.0 // indirect
golang.org/x/tools v0.33.0 // indirect
google.golang.org/api v0.223.0 // indirect
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2
google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect
google.golang.org/grpc v1.72.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 // indirect
google.golang.org/protobuf v1.36.6
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.2 // indirect
honnef.co/go/tools v0.6.1 // indirect
Expand All @@ -500,17 +508,3 @@ require (
rsc.io/qr v0.2.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

tool (
github.com/bufbuild/buf/cmd/buf
github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar
github.com/cosmos/gogoproto/protoc-gen-gocosmos
github.com/cosmos/gogoproto/protoc-gen-gogo
github.com/golangci/golangci-lint/cmd/golangci-lint
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
golang.org/x/tools/cmd/goimports
google.golang.org/grpc/cmd/protoc-gen-go-grpc
google.golang.org/protobuf/cmd/protoc-gen-go
)
Loading
Loading