massa icon indicating copy to clipboard operation
massa copied to clipboard

All non-malformed operations and endorsements propagate

Open damip opened this issue 2 years ago • 4 comments

Currently, all operations and endorsements that properly deserialize will propagate to the whole network. This presents a high risk of flooding and some checks need to be performed before propagating them.

TOOD: define which checks:

  • for ops:
    • validity period
    • available balance to pay the fees (also taking pool into account ?) ?
  • for endorsements:
    • check pos draws
    • make sure we know the targeted block and that it is not stale
    • ignore multiple endorsements per (slot, index) per address

damip avatar Aug 24 '22 08:08 damip

From what I read in the code, there is already some filtering for operations:

https://github.com/massalabs/massa/blob/d09e9b6f966758c36dc39e9b98c1c5dd56ca3a3b/massa-protocol-worker/src/protocol_worker.rs#L964

and for endorsements:

https://github.com/massalabs/massa/blob/d09e9b6f966758c36dc39e9b98c1c5dd56ca3a3b/massa-protocol-worker/src/protocol_worker.rs#L1065

I've added a quick fix here:

https://github.com/massalabs/massa/pull/3202

sydhds avatar Nov 03 '22 08:11 sydhds

@damip can we discuss about what we should do next for this issue?

sydhds avatar Nov 03 '22 08:11 sydhds

Oh ok, then it should be OK for now ! we can merge the correction

damip avatar Nov 03 '22 14:11 damip

@damip Should we close the issue or keep it like that for now?

sydhds avatar Nov 04 '22 08:11 sydhds

From the list above only : for endorsements: check pos draws is done in protocol

AurelienFT avatar Jun 19 '23 13:06 AurelienFT