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

feat: add requestDeduplicator to updateProposalAndVotes #273

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jan 9, 2024

🧿 Current issues / What's wrong ?

Triggering GET scores/PROPOSAL-ID may be costly, and should be done only once when asked multiple time simultaneously.

💊 Fixes / Solution

Fix snapshot-labs/snapshot-v1#4485

Install requestDeduplicator (same function as in other repo), to ensure we do not trigger multiple parallel request on the same proposal ID

🚧 Changes

  • Add requestDeduplicator helper (+ track metrics)
  • serve the /scores/PROPOSAL-ID endpoint through the requestDeduplicator

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Files Patch % Lines
src/helpers/requestDeduplicator.ts 0.00% 23 Missing and 1 partial ⚠️
src/api.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

@wa0x6e wa0x6e marked this pull request as ready for review January 9, 2024 11:24
@wa0x6e wa0x6e requested a review from ChaituVR January 9, 2024 11:24
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

tAck

@wa0x6e wa0x6e merged commit 5139b47 into master Jan 11, 2024
4 checks passed
@wa0x6e wa0x6e deleted the add-requestdeduplicator-to-update-proposal-and-votes branch January 11, 2024 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: We shouldn't show error message in the end of a proposal
2 participants