fix: remove ENR cache from peer exchange (#3578)#3652
Conversation
* remove WakuPeerExchange.enrCache * add forEnrPeers to support fast PeerStore search * add getEnrsFromStore * fix peer exchange tests
|
You can find the image built from this PR at Built from 4696901 |
Ivansete-status
left a comment
There was a problem hiding this comment.
LGTM! Thanks for it! 💯
Just adding some nitpicks that I hope you find useful
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
|
NOTE: the ci.yml workflow is broken, likely due to the project name change. It was blowing up on line 135 of ci.yml. I changed it to: Now it blows up on line 140, which still references waku.org. |
Can you do a dedicated PR to fixing the CI so we can get it merged asap (feel free to ping me for review)? |
On it |
4f97986 to
997a635
Compare
NagyZoltanPeter
left a comment
There was a problem hiding this comment.
Awsome, thank you! Added one recommendation for the template if you may consider to apply.
ab35cfa to
997a635
Compare
* remove WakuPeerExchange.enrCache * add forEnrPeers to support fast PeerStore search * add getEnrsFromStore * fix peer exchange tests
Description
This PR removes the ENR cache and the worker loop that fed it in WakuPeerExchange, and replaces it with a direct query to the PeerStore. To avoid slowdowns, the new
getEnrsFromStoredoesn't allocate any memory other than the resulting sequence of ENR records to the caller.Changes
Issue
closes #3578