js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

create abstraction over ENR-related access between `PeerStore`

Open danisharora099 opened this issue 1 year ago • 0 comments

This is a feature request

Problem

With #1626, discovery classes currently write details from the ENR into the PeerStore converting into bytes, and then decode this information when we want to use it elsewhere (eg ConnectionManager)

Also, with work on #1463, it may be required to store more information from the ENR into the PeerStore.

The process of manually encoding and decoding between access to the PeerStore is somewhat redundant and can be improved.

Proposed Solutions

Create abstraction over the PeerStore.save() method to save parts of the ENR and access from the PeerStore.

eg: saveToPeerStore({x, y, z})

Notes

  • can be done after #1626 is merged, and before or part of work on #1463

danisharora099 avatar Oct 10 '23 08:10 danisharora099