diff --git a/.gitignore b/.gitignore index b670310c7b..5ff5e4c1e7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /.vscode /.idea **/testing.*.toml +/playground/.env diff --git a/playground/docker-compose.fork.yml b/playground/docker-compose.fork.yml index 01bb6ba7a5..045888669c 100644 --- a/playground/docker-compose.fork.yml +++ b/playground/docker-compose.fork.yml @@ -14,17 +14,17 @@ services: # with simple bytecode that always returns a solidity `true` value, alleviating # the requirement to register a solver's private key for the sake of testing on # a fork. - test: [ - "CMD", - "/usr/local/bin/cast", - "rpc", - "-r", - "http://127.0.0.1:8545", - "anvil_setCode", - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE", - "0x600160005260206000F3" - ] - interval: 1m30s + test: [ "CMD-SHELL", " + response=$$(wget -qO- --header='Content-Type: application/json' --post-data='{\"jsonrpc\":\"2.0\", \"method\":\"eth_blockNumber\", \"params\":[], \"id\":1}' http://127.0.0.1:8545); + block=$$(echo $$response | sed -n 's/.*\"result\":\"\\([^\"\\]*\\)\".*/\\1/p'); + if [ -n \"$$block\" ] && [ \"$$block\" != \"0x0\" ] && [ \"$$block\" != \"null\" ]; then + /usr/local/bin/cast rpc -r http://127.0.0.1:8545 anvil_setCode 0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE 0x600160005260206000F3; + exit 0; + else + exit 1; + fi; + " ] + interval: 5s timeout: 30s retries: 5 start_period: 5s @@ -82,6 +82,8 @@ services: - BIND_ADDRESS=0.0.0.0:80 - CHAIN_ID=$CHAIN - BASELINE_SOURCES=None + - RUST_BACKTRACE=1 + - TOML_TRACE_ERROR=1 depends_on: - db-migrations ports: @@ -110,8 +112,13 @@ services: - DRIVERS=baseline|http://driver/baseline - SKIP_EVENT_SYNC=true - BASELINE_SOURCES=None + - RUST_BACKTRACE=1 + - TOML_TRACE_ERROR=1 depends_on: - - orderbook + orderbook: + condition: service_started + chain: + condition: service_healthy driver: build: @@ -123,10 +130,15 @@ services: environment: - ETHRPC=http://chain:8545 - ADDR=0.0.0.0:80 + - RUST_BACKTRACE=1 + - TOML_TRACE_ERROR=1 volumes: - ./driver.toml:/driver.toml ports: - 9000:80 + depends_on: + chain: + condition: service_healthy # baseline (solver engine) baseline: @@ -139,6 +151,8 @@ services: environment: - ADDR=0.0.0.0:80 - LOG=solvers=trace,shared=trace + - RUST_BACKTRACE=1 + - TOML_TRACE_ERROR=1 volumes: - ./baseline.toml:/baseline.toml ports: @@ -163,5 +177,6 @@ services: - ETH_RPC_URL=http://127.0.0.1:8545 ports: - 8001:80 + volumes: postgres: diff --git a/playground/driver.toml b/playground/driver.toml index b65720c69c..3f58c4f155 100644 --- a/playground/driver.toml +++ b/playground/driver.toml @@ -6,8 +6,7 @@ relative-slippage = "0.1" # Percentage in the [0, 1] range account = "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6" # Known test private key [submission] -gas-price-cap = 1e12 -additional-tip-percentage = 0.05 +gas-price-cap = "1000000000000" [[submission.mempool]] mempool = "public" @@ -15,7 +14,7 @@ mempool = "public" [liquidity] base-tokens = [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", # WETH - "0x6B175474E89094C44Da98b954EedeAC495271d0F", # DAI + "0x6B175474E89094C44Da98b954EedeAC495271d0F", # DAI "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", # USDC "0xdAC17F958D2ee523a2206206994597C13D831ec7", # USDT "0xc00e94Cb662C3520282E6f5717214004A7f26888", # COMP @@ -26,6 +25,3 @@ base-tokens = [ [[liquidity.uniswap-v2]] # Uniswap V2 configuration preset = "uniswap-v2" - -[[liquidity.balancer-v2]] -preset = "balancer-v2" \ No newline at end of file