Allow per-method failsafe policy definitions and reusable policy templates

Allow defining failsafe policy templates and introduce a ‘method’ field to have customized setup for different methods.

For example get_blockNumber timeout and retry policy will be different than trace_debug* methods that are usually slower and more expensive.

projects:
  - id: main
    networks:
      - architecture: evm
        evm:
          chainId: 42161
        failsafe: my-network-policy
 
    upstreams:
      - id: blastapi-chain-42161
        #...
        failsafe: my-upstream-policy

failsafe:
  templates:
    - id: my-upstream-policy
      policies:
      - method: 'trace*'
        timeout:
          duration: 15s
        retry:
          maxCount: 2
          delay: 2s
      - method: '*'
        timeout:
          duration: 1s
        retry:
          maxCount: 3
          delay: 500ms
#...

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board

💡 eRPC

Date

Over 1 year ago

Author

Aram Alipoor

Subscribe to post

Get notified by email when there are changes.