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

chore: update filter policy hourly #126

Merged
merged 2 commits into from
Jan 10, 2024
Merged

chore: update filter policy hourly #126

merged 2 commits into from
Jan 10, 2024

Conversation

mfw78
Copy link
Contributor

@mfw78 mfw78 commented Jan 10, 2024

Description

Update the filter policy every hour

Changes

  • Set frequency at which to update the filter policy

@mfw78 mfw78 self-assigned this Jan 10, 2024
@mfw78
Copy link
Contributor Author

mfw78 commented Jan 10, 2024

Merging for hot fix

@mfw78 mfw78 merged commit 17f934a into main Jan 10, 2024
4 checks passed
@mfw78 mfw78 deleted the filter-frequency branch January 10, 2024 20:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2024
(context.chainId === SupportedChainId.GNOSIS_CHAIN ? 5 : 12); // 5 seconds for gnosis, 12 seconds for mainnet
if (
filterPolicy &&
block.number % (FILTER_FREQUENCY_SECS / blocksPerFilterFrequency) == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

looks too complicated...
why not just forget about the time frequency and define the block frequency

  • 720 for gnosis
  • 300 for other networks

also, better to use constant for these numbers (no magic numbers like 5 or 12)

same effect, but easier to read.

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. A bit concerned this will make the policy be effective only after one hour

I think we could do it more often, right?

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.

2 participants