Currently when using the API with Opt IpAddres or Port, providing an Opt.none will not actually remove the field
Some API that is more restrictive than the other: Record.init versus initRecord. The latter is not even used anywhere except for testing.
the extraFields parameters and initRecord API allows for reserved keys with invalid types to get into the ENR.
Additionally, there is currently no easy API to set the ip6, tcp6 and udp6 reserved fields. It is only possible through the custom extraFields, which doesn't limit these reserved keys to the correct value type.
There are several issues in the current ENR code, to name some:
extraFields
in the APIRecord.init
versusinitRecord
. The latter is not even used anywhere except for testing.extraFields
parameters andinitRecord
API allows for reserved keys with invalid types to get into the ENR.Additionally, there is currently no easy API to set the
ip6
,tcp6
andudp6
reserved fields. It is only possible through the customextraFields
, which doesn't limit these reserved keys to the correct value type.