-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support multiple chain evm connection for TXM gas estimator allowing L1 oracle fee fetching #14781
support multiple chain evm connection for TXM gas estimator allowing L1 oracle fee fetching #14781
Conversation
Below is an analysis created by an LLM. Be mindful of hallucinations and verify accuracy. WF: CI Core#a5a57f51. HTTP 503 Service Temporarily Unavailable error during push request:[Flakey Test Detection]Source of Error:
Why: The error occurred because the server handling the push request was temporarily unavailable, likely due to maintenance or overload, indicated by the HTTP 503 status code. Suggested fix: Retry the request after a brief wait or during off-peak hours. Implement retry logic with exponential backoff to handle such temporary issues automatically. |
core/chains/evm/gas/models.go
Outdated
@@ -54,7 +55,7 @@ type feeEstimatorClient interface { | |||
} | |||
|
|||
// NewEstimator returns the estimator for a given config | |||
func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, chaintype chaintype.ChainType, geCfg evmconfig.GasEstimator) (EvmFeeEstimator, error) { | |||
func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, chaintype chaintype.ChainType, geCfg evmconfig.GasEstimator, getChainClientByID func(id string) (evmclient.Client, error)) (EvmFeeEstimator, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why pass a function instead of the actual map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that returning the evmclient.Client
interface creates a huge dependency on the estimator's side. Don't we already know the method we will use from the Client? Can't we declare a much smaller interface in its place?
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
if err2 != nil { | ||
err = multierr.Combine(err, fmt.Errorf("failed to create chain %s: %w", cid, err2)) | ||
continue | ||
} | ||
|
||
chainIDToClientMap[cid] = chain.Client() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but for LOOPP support we will have to pass relayers instead of local clients. Just something to keep in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't be able to support the ethereum.FeeHistory
type there, for example, but we can sort that out later since it looks like a simple/generic type anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's LOOPP support ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOOP Plugins. The chain-agnostic "relayer" API that sits in front of each chain family implementation. We'll have to update this for the EVM LOOP Plugin.
https://pkg.go.dev/github.com/smartcontractkit/[email protected]/pkg/types#Relayer
Quality Gate passedIssues Measures |
if daOracle != nil { | ||
if clientsByChainID == nil { | ||
lggr.Debugf("clientsByChainID map is missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core/capabilities/ccip changes seem good
…L1 oracle fee fetching (#14781) * add lazy initialization to evm client map and pass it to gas estimator for l1 oracle * remove unrelated * rename and fix lint * add changeset * modify err msg * address comments * go import lint * address comments * add default value of L1ChainID for the DAOracle config * fix doc * update config * fix testdata * update * fix make * update doc * update * fix test * update changeset * update changeset * address comments * rename, need to fix test * fix test, part 1 * rebuild doc * fix test * fix test * update comment * update types to use pointers * fix test * fix * fix test * fix make * fix make * fix make * fix test * refactor function name * address comments * update msg * update test helper * fix test * rename and remove fallback * update changeset * update docs * remove unused
Description
CCIP wants to implement heuristic-based l1 oracles, that has access to ethClient for a number of chains in addition to the target chain that the TXM is currently pointing at. This PR allows toml config to nodes config for multiple chains, and a map with lazy initialization will be passed down to txm gas estimator, which will be referenced by L1 Oracle component.
A new flag is added to
[EVM.GasEstimator.DAOracle]
calledL1ChainID
, by default it's "0" indicating the L1 oracle client is disabled.Reference:
https://smartcontract-it.atlassian.net/browse/BCFR-911