Skip to content

Commit

Permalink
feat(SQS): app wiring; configs; makefile; localosmosis (osmosis-labs#…
Browse files Browse the repository at this point in the history
…6978)

* feat(SQS): app wiring; configs; makefile; localosmosis

* updates

* updates

* fix healthcheck

* go mod

* localosmosis

* mod update

* revert docker compose version

---------

Co-authored-by: Adam Tucker <[email protected]>
  • Loading branch information
p0mvn and czarcas7ic authored Dec 2, 2023
1 parent c0e8ade commit 14aa2f6
Show file tree
Hide file tree
Showing 22 changed files with 570 additions and 93 deletions.
42 changes: 42 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,47 @@
"-test.v"
],
},
{
"name": "ingest/sqs/router",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/ingest/sqs/router",
"args": [
"-test.timeout",
"30m",
"-test.run",
"TestRouterTestSuite/TestReverse",
"-test.v"
],
},
{
"name": "ingest/sqs/router/usecase",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/ingest/sqs/router/usecase",
"args": [
"-test.timeout",
"30m",
"-test.run",
"TestRouterTestSuite/TestGetBestSplitRoutesQuote_Mainnet_ATOMUSDT",
"-test.v"
],
},
{
"name": "ingest/sqs/pools/ingester/redis",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/ingest/sqs/pools/ingester/redis",
"args": [
"-test.timeout",
"30m",
"-test.run",
"TestIngesterTestSuite/TestProcessBlock",
"-test.v"
],
},
]
}
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,35 @@ go-mock-update:
mockgen -source=x/poolmanager/types/pool.go -destination=tests/mocks/pool.go -package=mocks
mockgen -source=x/gamm/types/pool.go -destination=tests/mocks/cfmm_pool.go -package=mocks
mockgen -source=x/concentrated-liquidity/types/cl_pool_extensionI.go -destination=tests/mocks/cl_pool.go -package=mocks
mockgen -source=ingest/sqs/domain/pools.go -destination=tests/mocks/sqs_pool.go -package=mocks -mock_names=PoolI=MockSQSPoolI

###############################################################################
### SQS ###
###############################################################################

redis-start:
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 -v ./redis-cache/:/data redis/redis-stack:7.2.0-v3

redis-stop:
docker container rm -f redis-stack

sqs-start:
./scripts/debug_builder.sh
build/osmosisd start

sqs-load-test-ui:
docker compose -f ingest/sqs/locust/docker-compose.yml up --scale worker=4

sqs-profile:
go tool pprof -http=:8080 http://localhost:9092/debug/pprof/profile?seconds=15

# Updates go tests with the latest mainnet state
# Make sure that the node is running locally
sqs-update-mainnet-state:
curl -X POST "http:/localhost:9092/store-state"
mv pools.json ingest/sqs/router/usecase/routertesting/parsing/pools.json
mv taker_fees.json ingest/sqs/router/usecase/routertesting/parsing/taker_fees.json


###############################################################################
### Release ###
Expand Down
26 changes: 26 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ import (
_ "github.com/osmosis-labs/osmosis/v21/client/docs/statik"
"github.com/osmosis-labs/osmosis/v21/ingest"
"github.com/osmosis-labs/osmosis/v21/x/mint"

"github.com/osmosis-labs/osmosis/v21/ingest/sqs"

"github.com/osmosis-labs/osmosis/v21/ingest/sqs/pools/common"
)

const appName = "OsmosisApp"
Expand Down Expand Up @@ -251,6 +255,28 @@ func NewOsmosisApp(
// Initialize the ingest manager for propagating data to external sinks.
app.IngestManager = ingest.NewIngestManager()

sqsConfig := sqs.NewConfigFromOptions(appOpts)

// Initialize the SQS ingester if it is enabled.
if sqsConfig.IsEnabled {
sqsKeepers := common.SQSIngestKeepers{
GammKeeper: app.GAMMKeeper,
CosmWasmPoolKeeper: app.CosmwasmPoolKeeper,
BankKeeper: app.BankKeeper,
ProtorevKeeper: app.ProtoRevKeeper,
PoolManagerKeeper: app.PoolManagerKeeper,
ConcentratedKeeper: app.ConcentratedLiquidityKeeper,
}

sqsIngester, err := sqsConfig.Initialize(appCodec, sqsKeepers)
if err != nil {
panic(err)
}

// Set the sidecar query server ingester to the ingest manager.
app.IngestManager.RegisterIngester(sqsIngester)
}

// TODO: There is a bug here, where we register the govRouter routes in InitNormalKeepers and then
// call setupHooks afterwards. Therefore, if a gov proposal needs to call a method and that method calls a
// hook, we will get a nil pointer dereference error due to the hooks in the keeper not being
Expand Down
60 changes: 59 additions & 1 deletion cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

"github.com/osmosis-labs/osmosis/osmomath"
"github.com/osmosis-labs/osmosis/v21/app/params"
"github.com/osmosis-labs/osmosis/v21/ingest/sqs"

tmcfg "github.com/cometbft/cometbft/config"
tmcli "github.com/cometbft/cometbft/libs/cli"
Expand Down Expand Up @@ -424,6 +425,8 @@ func initAppConfig() (string, interface{}) {
serverconfig.Config

OsmosisMempoolConfig OsmosisMempoolConfig `mapstructure:"osmosis-mempool"`

SidecarQueryServerConfig sqs.Config `mapstructure:"osmosis-sqs"`
}

// Optionally allow the chain developer to overwrite the SDK's default
Expand All @@ -439,7 +442,9 @@ func initAppConfig() (string, interface{}) {

memCfg := OsmosisMempoolConfig{ArbitrageMinGasPrice: "0.01"}

OsmosisAppCfg := CustomAppConfig{Config: *srvCfg, OsmosisMempoolConfig: memCfg}
sqsConfig := sqs.DefaultConfig

OsmosisAppCfg := CustomAppConfig{Config: *srvCfg, OsmosisMempoolConfig: memCfg, SidecarQueryServerConfig: sqsConfig}

OsmosisAppTemplate := serverconfig.DefaultConfigTemplate + `
###############################################################################
Expand All @@ -461,6 +466,59 @@ min-gas-price-for-high-gas-tx = ".0025"
# This parameter enables EIP-1559 like fee market logic in the mempool
adaptive-fee-enabled = "true"
###############################################################################
### Osmosis Sidecar Query Server Configuration ###
###############################################################################
[osmosis-sqs]
# SQS service is disabled by default.
is-enabled = "false"
# The hostname and address of the sidecar query server storage.
db-host = "{{ .SidecarQueryServerConfig.StorageHost }}"
db-port = "{{ .SidecarQueryServerConfig.StoragePort }}"
# Defines the web server configuration.
server-address = "{{ .SidecarQueryServerConfig.ServerAddress }}"
timeout-duration-secs = "{{ .SidecarQueryServerConfig.ServerTimeoutDurationSecs }}"
# Defines the logger configuration.
logger-filename = "{{ .SidecarQueryServerConfig.LoggerFilename }}"
logger-is-production = "{{ .SidecarQueryServerConfig.LoggerIsProduction }}"
logger-level = "{{ .SidecarQueryServerConfig.LoggerLevel }}"
# Defines the gRPC gateway endpoint of the chain.
grpc-gateway-endpoint = "{{ .SidecarQueryServerConfig.ChainGRPCGatewayEndpoint }}"
# The list of preferred poold IDs in the router.
# These pools will be prioritized in the candidate route selection, ignoring all other
# heuristics such as TVL.
preferred-pool-ids = "{{ .SidecarQueryServerConfig.Router.PreferredPoolIDs }}"
# The maximum number of pools to be included in a single route.
max-pools-per-route = "{{ .SidecarQueryServerConfig.Router.MaxPoolsPerRoute }}"
# The maximum number of routes to be returned in candidate route search.
max-routes = "{{ .SidecarQueryServerConfig.Router.MaxRoutes }}"
# The maximum number of routes to be split across. Must be smaller than or
# equal to max-routes.
max-split-routes = "{{ .SidecarQueryServerConfig.Router.MaxSplitRoutes }}"
# The maximum number of iterations to split a route across.
max-split-iterations = "{{ .SidecarQueryServerConfig.Router.MaxSplitIterations }}"
# The minimum liquidity of a pool to be included in a route.
min-osmo-liquidity = "{{ .SidecarQueryServerConfig.Router.MinOSMOLiquidity }}"
# The height interval at which the candidate routes are recomputed and updated in
# Redis
route-update-height-interval = "{{ .SidecarQueryServerConfig.Router.RouteUpdateHeightInterval }}"
# Whether to enable candidate route caching in Redis.
route-cache-enabled = "{{ .SidecarQueryServerConfig.Router.RouteCacheEnabled }}"
`

return OsmosisAppTemplate, OsmosisAppCfg
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/ory/dockertest/v3 v3.10.0
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231124190325-d75e9ade352e
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231130002422-33ba03710e16
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231201210643-d8ee44cf41bc
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231130002422-33ba03710e16
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231130002422-33ba03710e16
github.com/pkg/errors v0.9.1
Expand Down
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX
github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ=
github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down Expand Up @@ -922,6 +921,7 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
Expand Down Expand Up @@ -1311,6 +1311,7 @@ github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSio
github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU=
github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
Expand Down Expand Up @@ -1466,8 +1467,8 @@ github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:Ylmch
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231124190325-d75e9ade352e h1:9gxXkcV8NYVbsrHKPTekwh5bm8CZJs2GEUNUnJruiLE=
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231124190325-d75e9ade352e/go.mod h1:NwGU1m9ng4/VV5P8wXJOhUaos/jlnOjGw7wIxL/7bu8=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231130002422-33ba03710e16 h1:TwrF61atXIHkLrDU8s06KWdCneGio5Xwu+jn+zHQsdU=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231130002422-33ba03710e16/go.mod h1:E/03wtLkkFoYHxM7+tofd/10nsTZZXn03PexWvs0ZFM=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231201210643-d8ee44cf41bc h1:aSzbnUV4S8tltsN4g5pDfPApkWFeQbmv4lghz6oYjLY=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231201210643-d8ee44cf41bc/go.mod h1:E/03wtLkkFoYHxM7+tofd/10nsTZZXn03PexWvs0ZFM=
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231130002422-33ba03710e16 h1:5fsi1o27Xw/p6V6cKHaDz2mva580CBWwUfEZDjE4WmY=
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231130002422-33ba03710e16/go.mod h1:V9N0rmNsok9QmCCVmnypdQHxQJzQtqdIGz02/tWIP74=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231130002422-33ba03710e16 h1:hgE6uRnlbMvZto9veApBbmwTqQQmLXdRUdbvfqhqEH4=
Expand Down
16 changes: 8 additions & 8 deletions ingest/sqs/domain/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ type Quote interface {
}

type RouterConfig struct {
PreferredPoolIDs []uint64
MaxPoolsPerRoute int
MaxRoutes int
MaxSplitRoutes int
MaxSplitIterations int
PreferredPoolIDs []uint64 `mapstructure:"preferred_pool_ids"`
MaxPoolsPerRoute int `mapstructure:"max_pools_per_route"`
MaxRoutes int `mapstructure:"max_routes"`
MaxSplitRoutes int `mapstructure:"max_split_routes"`
MaxSplitIterations int `mapstructure:"max_split_iterations"`
// Denominated in OSMO (not uosmo)
MinOSMOLiquidity int
RouteUpdateHeightInterval int64
RouteCacheEnabled bool
MinOSMOLiquidity int `mapstructure:"min_osmo_liquidity"`
RouteUpdateHeightInterval int `mapstructure:"route_update_height_interval"`
RouteCacheEnabled bool `mapstructure:"route_cache_enabled"`
}

// DenomPair encapsulates a pair of denoms.
Expand Down
10 changes: 10 additions & 0 deletions ingest/sqs/pools/common/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ import (
poolmanagertypes "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types"
)

// Chain keepers required for sqs ingest.
type SQSIngestKeepers struct {
GammKeeper PoolKeeper
CosmWasmPoolKeeper CosmWasmPoolKeeper
BankKeeper BankKeeper
ProtorevKeeper ProtorevKeeper
PoolManagerKeeper PoolManagerKeeper
ConcentratedKeeper ConcentratedKeeper
}

// PoolKeeper is an interface for getting pools from a keeper.
type PoolKeeper interface {
GetPools(ctx sdk.Context) ([]poolmanagertypes.PoolI, error)
Expand Down
18 changes: 9 additions & 9 deletions ingest/sqs/pools/ingester/redis/pool_ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ const (
spotPriceErrorFmtStr = "error calculating spot price for denom %s, %s"

// placeholder value to disable route updates at the end of every block.
routeIngestDisablePlaceholder = int64(0)
routeIngestDisablePlaceholder = 0
)

var uosmoPrecisionBigDec = osmomath.NewBigDec(uosmoPrecision)

// NewPoolIngester returns a new pool ingester.
func NewPoolIngester(poolsRepository mvc.PoolsRepository, routerRepository mvc.RouterRepository, tokensUseCase domain.TokensUsecase, repositoryManager mvc.TxManager, routerConfig domain.RouterConfig, gammKeeper common.PoolKeeper, concentratedKeeper common.ConcentratedKeeper, cosmwasmKeeper common.CosmWasmPoolKeeper, bankKeeper common.BankKeeper, protorevKeeper common.ProtorevKeeper, poolManagerKeeper common.PoolManagerKeeper) mvc.AtomicIngester {
func NewPoolIngester(poolsRepository mvc.PoolsRepository, routerRepository mvc.RouterRepository, tokensUseCase domain.TokensUsecase, repositoryManager mvc.TxManager, routerConfig domain.RouterConfig, keepers common.SQSIngestKeepers) mvc.AtomicIngester {
return &poolIngester{
poolsRepository: poolsRepository,
routerRepository: routerRepository,
tokensUseCase: tokensUseCase,
repositoryManager: repositoryManager,
gammKeeper: gammKeeper,
concentratedKeeper: concentratedKeeper,
cosmWasmKeeper: cosmwasmKeeper,
bankKeeper: bankKeeper,
protorevKeeper: protorevKeeper,
poolManagerKeeper: poolManagerKeeper,
gammKeeper: keepers.GammKeeper,
concentratedKeeper: keepers.ConcentratedKeeper,
cosmWasmKeeper: keepers.CosmWasmPoolKeeper,
bankKeeper: keepers.BankKeeper,
protorevKeeper: keepers.ProtorevKeeper,
poolManagerKeeper: keepers.PoolManagerKeeper,
routerConfig: routerConfig,
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ func (pi *poolIngester) processPoolState(ctx sdk.Context, tx mvc.Tx) error {
}

// Update routes every RouteUpdateHeightInterval blocks unless RouteUpdateHeightInterval is 0.
if pi.routerConfig.RouteUpdateHeightInterval > routeIngestDisablePlaceholder && ctx.BlockHeight()%pi.routerConfig.RouteUpdateHeightInterval == 0 {
if pi.routerConfig.RouteUpdateHeightInterval > routeIngestDisablePlaceholder && ctx.BlockHeight()%int64(pi.routerConfig.RouteUpdateHeightInterval) == 0 {
allPools := make([]domain.PoolI, 0, len(allPoolsParsed))

pi.logger.Info("getting routes for pools", zap.Int64("height", ctx.BlockHeight()))
Expand Down
24 changes: 22 additions & 2 deletions ingest/sqs/pools/ingester/redis/pool_ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/osmosis-labs/osmosis/v21/ingest/sqs/domain/mocks"
"github.com/osmosis-labs/osmosis/v21/ingest/sqs/domain/mvc"
"github.com/osmosis-labs/osmosis/v21/ingest/sqs/log"
"github.com/osmosis-labs/osmosis/v21/ingest/sqs/pools/common"
"github.com/osmosis-labs/osmosis/v21/ingest/sqs/pools/ingester/redis"
redisingester "github.com/osmosis-labs/osmosis/v21/ingest/sqs/pools/ingester/redis"
clqueryproto "github.com/osmosis-labs/osmosis/v21/x/concentrated-liquidity/client/queryproto"
Expand Down Expand Up @@ -489,7 +490,16 @@ func (s *IngesterTestSuite) TestProcessBlock() {
customTakerFeeConcentratedPool := s.PrepareCustomConcentratedPool(s.TestAccs[0], USDT, USDC, 1, osmomath.ZeroDec())
s.App.PoolManagerKeeper.SetDenomPairTakerFee(s.Ctx, customTakerFeeConcentratedPool.GetToken0(), customTakerFeeConcentratedPool.GetToken1(), defaultCustomTakerFee)

poolIngester := redisingester.NewPoolIngester(redisRepoMock, redisRouterMock, tokensUseCaseMock, nil, domain.RouterConfig{}, s.App.GAMMKeeper, s.App.ConcentratedLiquidityKeeper, s.App.CosmwasmPoolKeeper, s.App.BankKeeper, s.App.ProtoRevKeeper, s.App.PoolManagerKeeper)
sqsKeepers := common.SQSIngestKeepers{
GammKeeper: s.App.GAMMKeeper,
ConcentratedKeeper: s.App.ConcentratedLiquidityKeeper,
BankKeeper: s.App.BankKeeper,
ProtorevKeeper: s.App.ProtoRevKeeper,
PoolManagerKeeper: s.App.PoolManagerKeeper,
CosmWasmPoolKeeper: s.App.CosmwasmPoolKeeper,
}

poolIngester := redisingester.NewPoolIngester(redisRepoMock, redisRouterMock, tokensUseCaseMock, nil, domain.RouterConfig{}, sqsKeepers)
poolIngester.SetLogger(&log.NoOpLogger{})

err := poolIngester.ProcessBlock(s.Ctx, redisTx)
Expand Down Expand Up @@ -561,7 +571,17 @@ func (s *IngesterTestSuite) validatePoolConversion(expectedPool poolmanagertypes
}

func (s *IngesterTestSuite) initializePoolIngester() *redisingester.PoolIngester {
atomicIngester := redisingester.NewPoolIngester(nil, nil, nil, nil, domain.RouterConfig{}, s.App.GAMMKeeper, s.App.ConcentratedLiquidityKeeper, s.App.CosmwasmPoolKeeper, s.App.BankKeeper, s.App.ProtoRevKeeper, s.App.PoolManagerKeeper)

sqsKeepers := common.SQSIngestKeepers{
GammKeeper: s.App.GAMMKeeper,
ConcentratedKeeper: s.App.ConcentratedLiquidityKeeper,
BankKeeper: s.App.BankKeeper,
ProtorevKeeper: s.App.ProtoRevKeeper,
PoolManagerKeeper: s.App.PoolManagerKeeper,
CosmWasmPoolKeeper: s.App.CosmwasmPoolKeeper,
}

atomicIngester := redisingester.NewPoolIngester(nil, nil, nil, nil, domain.RouterConfig{}, sqsKeepers)
poolIngester, ok := atomicIngester.(*redisingester.PoolIngester)
poolIngester.SetLogger(&log.NoOpLogger{})
s.Require().True(ok)
Expand Down
Loading

0 comments on commit 14aa2f6

Please sign in to comment.