Skip to content
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

[Kbucket] Cache the transformed peerId #812

Closed
aarshkshah1992 opened this issue Feb 28, 2020 · 1 comment
Closed

[Kbucket] Cache the transformed peerId #812

aarshkshah1992 opened this issue Feb 28, 2020 · 1 comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@aarshkshah1992
Copy link
Contributor

Even though we store the actual peerId in the bucket, we need to transform it using the ConvertPeerID function every-time we want to perform some routing computation on it. This can become prohibitively expensive because ConvertPeerId uses SHA-256.

We should ideally do this transformation ONLY once &. cache the results.

@aarshkshah1992
Copy link
Contributor Author

Done in the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant