Skip to content
Unverified Commit 8362a681 authored by Alexandru Gheorghe's avatar Alexandru Gheorghe Committed by GitHub
Browse files

statement-distribution: Fix CostMinor("Unexpected Statement") (#3223)



On grid distribution messages have two paths of reaching a node, so
there is the possiblity of a race when two peers send each other the
same statement around the same time. Statement local_knowledge will tell
us that the peer should have not send the statement because we sent it
to it.

Fix it by also keeping track only of the statement we received from a
given peer and penalize it only if it sends it to us more than once.

Fixes: https://github.com/paritytech/polkadot-sdk/issues/2346

Additionally, also use different Cost labels for different paths to make
it easier to debug things.

---------

Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
parent c3489aaf
Pipeline #444071 failed with stages
in 38 minutes and 33 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment