optimism icon indicating copy to clipboard operation
optimism copied to clipboard

[proxyd] Blast API backend provider not working with consensus aware enabled

Open AbdelStark opened this issue 1 year ago • 0 comments

Describe the bug Blast API backend provider not working with consensus aware enabled.

To Reproduce

Sample configuration (without credentials):

#############################################
# Configuration file for proxyd            #
#############################################

#############################################
# Server configuration                      #
#############################################
[server]
rpc_host = "0.0.0.0"
rpc_port = 8080
ws_host = "0.0.0.0"
# Set the ws_port to 0 to disable WS
ws_port = 0
# Maximum client body size, in bytes, that the server will accept.
max_body_size_bytes = 10485760
max_concurrent_rpcs = 1000
# Server log level
log_level = "debug"

#############################################
# Metrics configuration                     #
#############################################
[metrics]
# Whether or not to enable Prometheus metrics.
enabled = false
# Host for the Prometheus metrics endpoint to listen on.
host = "0.0.0.0"
# Port for the above.
port = 9761

#############################################
# General backend configuration             #
#############################################
[backend]
# How long proxyd should wait for a backend response before timing out.
response_timeout_seconds = 2
# Maximum response size, in bytes, that proxyd will accept from a backend.
max_response_size_bytes = 5242880
# Maximum number of times proxyd will try a backend before giving up.
max_retries = 3
# Number of seconds to wait before trying an unhealthy backend again.
out_of_service_seconds = 600
# Maximum latency accepted to serve requests, default 10s
max_latency_threshold = "30s"
# Maximum latency accepted to serve requests before degraded, default 5s
max_degraded_latency_threshold = "10s"
# Maximum error rate accepted to serve requests, default 0.5 (i.e. 50%)
max_error_rate_threshold = 0.3

#############################################
# List of backends                          #
#############################################
[backends]
[backends.infura]
rpc_url = "https://sepolia.infura.io/v3/XXXX"
max_rps = 3
max_ws_conns = 1

[backends.blast]
rpc_url = "https://eth-sepolia.blastapi.io/XXXX"
ws_url = ""
username = ""
password = ""
max_rps = 3
max_ws_conns = 1

#############################################
# Backend groups                            #
#############################################
[backend_groups]
[backend_groups.main]
backends = ["blast", "infura"]
consensus_aware = true

#############################################
# Mapping of methods to backend groups      #
#############################################
[rpc_method_mappings]
eth_getBalance = "main"
eth_chainId = "main"
eth_blockNumber = "main"

Expected behavior proxyd working with Blast API. I don't know exactly what is missing or behaving wrongly, it may be an issue with Blast API.

System Specs:

  • OS: macOS 11.6 (M1)
  • Package Version (or commit hash): 918459c4428bafb110e2f89a4b9d79b6bd1dd27c

Additional context Logs:

{"lvl":"info","msg":"creating poller for consensus aware backend_group","name":"main","t":"2023-12-07T09:53:12.988209+01:00"}
{"consensusBackends":"","filteredBackends":"blast, infura","lvl":"dbug","msg":"group state","proposedBlock":"0x0","t":"2023-12-07T09:53:12.988229+01:00"}
{"addr":"0.0.0.0:8080","lvl":"info","msg":"starting HTTP server","t":"2023-12-07T09:53:12.988286+01:00"}
{"lvl":"info","msg":"started proxyd","t":"2023-12-07T09:53:12.999266+01:00"}
{"err":"backend returned an invalid response","lvl":"warn","msg":"error updating backend sync state","name":"blast","t":"2023-12-07T09:53:13.048915+01:00"}
{"finalizedBlockNumber":"0x49d6bb","inSync":"false","lastUpdate":"0001-01-01T00:00:00+0000","latestBlockHash":"0x6a7bf0f90e6b8c615782d9b3aa6db4d027b6f70516b298464259ac5f43a05e0b","latestBlockNumber":"0x49d6f6","lvl":"dbug","msg":"backend state updated","name":"blast","peerCount":50,"safeBlockNumber":"0x49d6d8","t":"2023-12-07T09:53:13.236293+01:00"}
{"finalizedBlockNumber":"0x49d6bb","inSync":"true","lastUpdate":"0001-01-01T00:00:00+0000","latestBlockHash":"0x6a7bf0f90e6b8c615782d9b3aa6db4d027b6f70516b298464259ac5f43a05e0b","latestBlockNumber":"0x49d6f6","lvl":"dbug","msg":"backend state updated","name":"infura","peerCount":100,"safeBlockNumber":"0x49d6d8","t":"2023-12-07T09:53:13.723187+01:00"}
{"lowestLatestBlock":"0x49d6f6","lvl":"dbug","msg":"validating consensus on block","t":"2023-12-07T09:53:13.989265+01:00"}
{"err":"backend returned an invalid response","lvl":"warn","msg":"error updating backend sync state","name":"blast","t":"2023-12-07T09:53:14.024626+01:00"}

AbdelStark avatar Dec 07 '23 08:12 AbdelStark