-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
exchangeTransitionConfiguration heartbeat implementation #3785
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
this.rpc = | ||
rpc ?? | ||
new JsonRpcHttpClient(opts.urls, { | ||
signal, | ||
timeout: opts.timeout, | ||
}); | ||
void this.exchangeTransitionConfiguration(); |
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.
void Promise that may reject is a bad idea.
transitionConfig.terminalBlockHash !== this.transitionConfig.terminalBlockHash || | ||
transitionConfig.terminalBlockNumber !== this.transitionConfig.terminalBlockNumber | ||
) { | ||
throw 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.
This http engine should not be responsible to throw this Error. There should be something at a higher level that does this recurring calls and logs loudly if there's a mismatch. Keep in mind that there may be multiple transports in the future besides http. The return of this function could be a status
type ReturnType = {match: true} | {match: false; local: TransitionConfig; remote: TransitionConfig}
} | ||
// Use this lastHeartBeatAt in the actual engine api calls to identify if this needs to | ||
// be called again | ||
this.lastHeartBeatAt = Math.floor(new Date().getTime() / 1000); |
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 class should not be responsible to track the frequency of calls, this class should be state-less
closing this to begin afresh as the code has diverged quite a bit |
Motivation
Execution engines will now hosts an api to specify and match transition configuration ethereum/execution-apis#172, which is supposed to act as a heatbeat between EL and CL.
This PR implements and matches the same and aims to implements the heart beat functionality
Description
PS: this work is currently WIP and some details/clarifications are awaited. Also this is not the part of Kiln v2 spec.
Part of Kiln tracker