Conversation
🦋 Changeset detectedLatest commit: e0be02e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/data-transport-layer/src/services/l1-ingestion/service.ts
Outdated
Show resolved
Hide resolved
packages/data-transport-layer/src/services/l1-ingestion/service.ts
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
7fb268f to
6d9ca23
Compare
|
CI is generally failing here, need to investigate as to why |
79f8a4c to
078a041
Compare
|
cc @smartcontracts this is ready for review again |
packages/core-utils/src/provider.ts
Outdated
| const provider = new ethers.providers.StaticJsonRpcProvider(url) | ||
| providers.push(provider) | ||
| } | ||
| return new ethers.providers.FallbackProvider(providers) |
There was a problem hiding this comment.
looks good - note here that we can further parameterize things like weights of different providers by providing an array of FallbackProviderConfig instead.
FallbackProviderConfig. If a Provider is provided, the defaults are a priority of 1 and a weight of 1.
There was a problem hiding this comment.
The existing implementation will randomize which is used. We could set the priority based on the order of URLs passed in
There was a problem hiding this comment.
Does this do quorum by default?
Allow the DTL to sync from multiple web3 backends using the `ethers.providers.FallbackProvider`. Multiple URLs can be passed through as a comma delimited string to configure multiple providers. A helper function is added to `core-utils` to allow easy configuration between services. This PR only introduces the usage of the fallback provider into the DTL. In the future, it should be added to other services that query L1 as well.
078a041 to
e0be02e
Compare
| import { Provider } from '@ethersproject/providers' | ||
|
|
||
| // Copied from @ethersproject/providers since it is not | ||
| // currently exported |
There was a problem hiding this comment.
PR to export the interface here: ethers-io/ethers.js#2121
Description
Replaces
StaticJsonRpcProviderwithFallbackProviderso we can run multiple nodes and get a consensus of results from each.