bnb-chain / opbnb

MIT License
403 stars 162 forks source link

feat(op-node): support multi clients to fetch blobs #199

Closed bnoieh closed 3 months ago

bnoieh commented 3 months ago

Description

  1. add new feature to support multi archive clients to fetch blobs
    • users can set --l1.archive-blob-rpc=archive_url_1,archive_url_2 to fallback to archive blob node when fetching blobs which non-archive blob nodes don't have
    • it's optional flag, if not set, op-node will create blob client from flag --l1; if set, op-node will create blob clients both from --l1 and --l1.archive-blob-rpc, and will rotate all endpoints whenever a client runs into an error or return nil(skip non-archive node) while fetching blobs.
  2. add ci for op-service, which is missed in current code

    Rationale

to support fallback to archive blob node when fetching blobs which non-archive blob nodes don't have

Example

n/a

Changes

  1. add new BSCBlobClient, which including a client pool to fetching blobs.
  2. remove blob fetching related methods from L1Client
  3. add related new optional flags l1.archive-blob-rpc, l1.blob-rpc-rate-limit, l1.blob-rpc-max-batch-size
  4. add ci for op-service