-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Discv5 worker #4988
Discv5 worker #4988
Conversation
// TODO there is a bug in enr encoding(?) that causes many enrs to be incorrectly encoded (and thus incorrectly decoded) | ||
// this.logger.error("Unable to decode enr", {enr: Buffer.from(enrStr).toString("hex")}, e as 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.
There seems to be a bug in ENR encoding?
Uncommenting this results in a flood of error logs.
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.
Any updates here?
@@ -35,7 +34,7 @@ export interface IMetadataModules { | |||
* https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/p2p-interface.md#metadata | |||
*/ | |||
export class MetadataController { | |||
private enr?: ENR; | |||
private setEnrValue?: (key: string, value: Uint8Array) => Promise<void>; |
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.
Someone has to 'own' the ENR.
Current choice is for the discv5 worker to own the ENR and just pass a function here to update it.
The FileENR should also be removed and we just write the ENR to disk on close.
Performance Report✔️ no performance regression detected Full benchmark results
|
Good starting point! observables seems sufficient to fullfil the need of events here. To safely merge this we need high observability of the metrics of the worker. This blog is great at how to collect basically all data points we need from the worker https://prog.world/monitoring-multithreaded-node-js-applications/ Regarding metrics the approach of just fetching the metrics str is good for now. Also I think we should move to the pattern of the discv5 library creating the metrics names itself, like we do in gossipsub now. |
@dapplion @tuyennhv let me know what kind of other metrics you'd like to see |
|
looks great 👍 , can't think of other metrics to add |
WIP, opening for initial review / discussion.
Deployed on
nogroup-hzax41-0
and thebeta
group