@ethereumjs/devp2p v6.0.0
Final release version from the breaking release round from Summer 2023 on the EthereumJS libraries, thanks to the whole team for this amazing accomplishment! ❤️ 🥳
See RC1 release notes for the main change description.
Following additional changes since RC1:
Event Emitter Refactor
We have reworked the EventEmitter
integration for the library and switched away from the structure where all central classes (like e.g. RLPx
) directly inherit from EventEmitter
. Instead, we now have the EventEmitter
in a dedicated events
property associated with the respective class, see PR #2893. This aligns with how event emitters are implemented in other libraries (e.g. the VM or the client), leads to a cleaner API usage (autocomplete in an IDE now only shows the relevant methods) and allows for an easier customization of the library.
Event usage has to be adopted as follows:
rlpx.on('peer:added', (peer) => { // old
// Do something
}
rlpx.events.on('peer:added', (peer) => { // new
// Do something
}
Event emitter logic in the following components from the public API has been reworked:
DPT
RLPx
ETH
LES
SNAP
(in development)
Other Changes
- Address security vulnerabilities, PR #2912