fix(discovery): add eth forkid to self ENR via IForkInfo
Reason: The ENR should include the Ethereum fork ID (per devp2p eth enr entry) so peers can detect compatibility and avoid connecting across incompatible forks. This TODO was missing, reducing interoperability.
Goal: Advertise the correct fork hash and next fork block in ENR to improve peer discovery accuracy and protocol compliance.
Changes:
- Injected IForkInfo and IBlockTree into NodeRecordProvider.
- Computed the current fork id from the best header (fallbacks to genesis/known number).
- Added EthEntry with forkHash and nextBlock before signing the ENR.
It's critical to increment EnrSequence also with every update
It's critical to increment EnrSequence also with every update
simple timestamp would be fine I guess
It's critical to increment EnrSequence also with every update
simple timestamp would be fine I guess
ok
Previous code was fine in part of forkid. I mean we need to increment selfNodeRecord.EnrSequence if the record is changed in any way. selfNodeRecord.EnrSequence can have current milliseconds as new value
Previous code was fine in part of forkid. I mean we need to increment selfNodeRecord.EnrSequence if the record is changed in any way. selfNodeRecord.EnrSequence can have current milliseconds as new value
fixed, sorry for misunderstanding