Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Make the smallest bloom filter 1000 elements #1736

Merged
merged 1 commit into from Jun 9, 2022

Conversation

jadeallenx
Copy link
Contributor

Problem to solve: On new networks, the actual gateway count can be 0 which causes a crash in miner that prevents blocks from syncing.

Solution: Make the size of the new filter at least 1000, and if it's larger, use the actual gateway count for filter sizing.

On new networks, the actual gateway count can be 0
which causes a crash in miner that prevents blocks
from syncing.
@jadeallenx jadeallenx merged commit dea069b into master Jun 9, 2022
@jadeallenx jadeallenx deleted the jma/prevent-bloom-crash branch June 9, 2022 20:41
Copy link
Member

@JayKickliter JayKickliter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and thanks for the descriptive comments.

For other reviwers: there's an upstream erbloom PR to not panic on size==0, but even with that fix we'd still get a badmatch here, so the fix in this PR seems like a good idea.

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

Successfully merging this pull request may close these issues.

None yet

3 participants