meldsun0 / samba

1 stars 0 forks source link

Create UInt64 TypeWrapper #16

Open Dsorken opened 1 day ago

Dsorken commented 1 day ago

Currently the Discv5 NodeRecords rely on the Tuweni UInt64 to enclose enr sequences, however the Teku SSZ library uses their own UInt64 type as the Tuweni library has been shelved and is no longer maintained. This creates issues when storing initializing PING/PONG packets using the NodeRecord enr sequence.

meldsun0 commented 1 day ago

We should avoid having NodeRecords from Discv5 disseminated in our code. Let's wrap it with our own definitions and we parse it when necessary. By this way, we will solve this issue and avoid being completely coupled with Discv5. It is like creating an anticorruptionLayer. At the beginning it was ok to have it to speed up coding, but I guess we can make this refactor soon. Lets keep this issue open till we make the refactor!