js-libp2p-gossipsub icon indicating copy to clipboard operation
js-libp2p-gossipsub copied to clipboard

fix: synchronous validateReceivedMessage

Open twoeths opened this issue 1 month ago • 0 comments

Motivation

  • some duplicate messages were sent to lodestar to uncompress due to async validateReceivedMessage(), see #535

Description change validateReceivedMessage() implementation to be synchronous:

  • make msgIdFn() synchronous, switch to use @chainsafe/as-sha256 for this
  • move topic validation outside of validateReceivedMessage()
  • move validateToRawMessage() out of validateReceivedMessage()
    • separate to synchronous validateStrictNoSignMessage()
    • and async validateStrictSignMessage()

Closes #535

twoeths avatar Nov 28 '25 02:11 twoeths