Given a blockchain adapter
When it receives errors from an RPC call
Then it should try the alternate RPC providers according to the configured strategy
The venue configuration DSL will need an additional option
config :slurp,
blockchains: %{
"ethereum-mainnet" => %{
start_on_boot: false,
name: "Ethereum Mainnet",
adapter: Slurp.Adapters.Evm,
network_id: 1,
chain_id: 1,
chain: "ETH",
testnet: false,
timeout: 5000,
new_head_initial_history: 128,
poll_interval_ms: 2_500,
rpc: [
"https://cloudflare-eth.com",
# This can take N extra RPC providers
"https://main-light.eth.linkpool.io"
],
# Optionally add RPC strategy. Defaults to `nil`
rpc_strategy: {Slurp.RpcStrategies.RoundRobinOnError, :next, [[count: 5, per: 1, unit: :minute]]}
},
}
Given a blockchain adapter When it receives errors from an RPC call Then it should try the alternate RPC providers according to the configured strategy
The venue configuration DSL will need an additional option