massa
massa copied to clipboard
All non-malformed operations and endorsements propagate
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
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
@damip can we discuss about what we should do next for this issue?
Oh ok, then it should be OK for now ! we can merge the correction
@damip Should we close the issue or keep it like that for now?
From the list above only : for endorsements: check pos draws
is done in protocol