Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase gossipsub seen-ttl #2663

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

AgeManning
Copy link
Contributor

The gossipsub IGNORE rule for attestations is:

attestation.data.slot + ATTESTATION_PROPAGATION_SLOT_RANGE >= current_slot >= attestation.data.slot

As ATTESTATION_PROPAGATION_SLOT_RANGE is 32, this allows for clients to propagate attestations up until the start of the 33rd slot after publishing.

Because we've set our duplicate cache to the start of the 32nd slot, I've noticed quite a few duplicates bouncing around the network. Increasing the cache time will prevent these extra duplicates being unnecessarily propagated.

@djrtwo
Copy link
Contributor

djrtwo commented Oct 12, 2021

Do you think attestations should be propagated at the 33rd slot? Or should the condition above be set to > rather than >=?

@arnetheduck
Copy link
Contributor

in nimbus, we stop propagating a bit earlier than 32 actually, to avoid the duplicate and to avoid being descored by lighthouse in particular - basically, there's a race where the attestation is valid when sending, then becomes invalid in-flight as time passes.

@AgeManning
Copy link
Contributor Author

We do penalize peers that send attestations that are over this condition (32 slots). We could reduce it with a leniency period where we don't penalize peers in the reduced time to avoid penalizing non-updated nodes.

With this aside, I've seen duplicates being sent around in the 32nd slot, because they are valid. Essentially, someone sends an attestation around on slot 0, say, then after 32 slots, everyone's duplicate cache forgets about it, and for some reason it re-appears and everyone then re-propagates it (as it still passes these validation conditions) as they don't recognise it as a duplicate. Increasing the duplicate cache will prevent these duplicates flying around, but wont prevent us from downscoring peers that still send attestations outside the valid range (even though there is an in-flight race-condition).

@nisdas
Copy link
Contributor

nisdas commented Oct 13, 2021

We do penalize peers that send attestations that are over this condition (32 slots). We could reduce it with a leniency period where we don't penalize peers in the reduced time to avoid penalizing non-updated nodes.

For this, is it possible for lighthouse to not penalise peers propagating these attestations ? The spec does mention it as IGNORE rather than REJECT. Other than that I am fine with pushing up the seen-ttl to account for attestation validity time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants