Skip to content

Commit

Permalink
Update sidecar to connect v2 (#2458)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy authored Oct 3, 2024
1 parent 2a90ed0 commit 64fa696
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion protocol/contrib/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ global:
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["slinky0:8002"] # ingest side-car metrics in accordance w/ docker-compose env
- targets: ["connect0:8002"] # ingest side-car metrics in accordance w/ docker-compose env
14 changes: 7 additions & 7 deletions protocol/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ services:
- DAEMON_HOME=/dydxprotocol/chain/.dave
volumes:
- ./localnet/dydxprotocol3:/dydxprotocol/chain/.dave/data
slinky0:
image: ghcr.io/skip-mev/slinky-sidecar:v1.0.10
connect0:
image: ghcr.io/skip-mev/connect-sidecar:v2.1.0
entrypoint: >
sh -c "slinky --marketmap-provider dydx_migration_api --oracle-config /etc/slinky/oracle.json --log-std-out-level error"
sh -c "connect --marketmap-provider dydx_migration_api --oracle-config /etc/connect/oracle.json --log-std-out-level error"
environment:
- SLINKY_CONFIG_PROVIDERS_RAYDIUM_API_API_ENDPOINTS_0_URL=${RAYDIUM_URL}
- SLINKY_CONFIG_PROVIDERS_UNISWAPV3_API-BASE_API_ENDPOINTS_0_URL=${UNISWAPV3_BASE_URL}
- SLINKY_CONFIG_PROVIDERS_UNISWAPV3_API-ETHEREUM_API_ENDPOINTS_0_URL=${UNISWAPV3_ETHEREUM_URL}
- CONNECT_CONFIG_PROVIDERS_RAYDIUM_API_API_ENDPOINTS_0_URL=${RAYDIUM_URL}
- CONNECT_CONFIG_PROVIDERS_UNISWAPV3_API-BASE_API_ENDPOINTS_0_URL=${UNISWAPV3_BASE_URL}
- CONNECT_CONFIG_PROVIDERS_UNISWAPV3_API-ETHEREUM_API_ENDPOINTS_0_URL=${UNISWAPV3_ETHEREUM_URL}
volumes:
- ./contrib/slinky:/etc/slinky
- ./contrib/connect:/etc/connect
ports:
- "8080:8080"
- "8002:8002" # metrics
Expand Down
6 changes: 3 additions & 3 deletions protocol/testing/testnet-local/local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ create_validators() {
cat <<<"$new_file" >"$VAL_CONFIG_DIR"/node_key.json

edit_config "$VAL_CONFIG_DIR"
use_slinky "$VAL_CONFIG_DIR"
use_connect "$VAL_CONFIG_DIR"

# Using "*" as a subscript results in a single arg: "dydx1... dydx1... dydx1..."
# Using "@" as a subscript results in separate args: "dydx1..." "dydx1..." "dydx1..."
Expand Down Expand Up @@ -167,11 +167,11 @@ setup_cosmovisor() {
done
}

use_slinky() {
use_connect() {
CONFIG_FOLDER=$1
# Enable slinky daemon
dasel put -t bool -f "$CONFIG_FOLDER"/app.toml 'oracle.enabled' -v true
dasel put -t string -f "$VAL_CONFIG_DIR"/app.toml 'oracle.oracle_address' -v 'slinky0:8080'
dasel put -t string -f "$VAL_CONFIG_DIR"/app.toml 'oracle.oracle_address' -v 'connect0:8080'
}

# TODO(DEC-1894): remove this function once we migrate off of persistent peers.
Expand Down

0 comments on commit 64fa696

Please sign in to comment.