feat: remove SPR initialisations and updates
emizzle opened this issue · comments
libp2p handles the SPR and keeps it up to date, I'll add a callback mechanism to [libp2p] so that we can plug it into updateRecord
If codex wants to update the seqNo frequently, it will have to call switch.peerInfo.update() frequently, but the same SPR (the one in switch.peerInfo) must be used everywhere, otherwise peers may see weird discrepancies
The "ENR auto update" mechanism should be removed from the nim-libp2p-dht, libp2p has it's own mecanisms to ensure we know our public IP & port
Anyway, no the DHT should never call SPR.init (except in tests ofc)