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

fix: Do not add fnames to the sync trie when they have not been merged #1614

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

sanjayprabhu
Copy link
Contributor

@sanjayprabhu sanjayprabhu commented Jan 9, 2024

Motivation

We're thrashing the sync trie because we're constantly adding fnames that don't exist to the sync trie (and removing them when we detect and repair this)

Change Summary

Describe the changes being made in 1-2 concise sentences.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review

Additional Context

If this is a relatively large or complex change, provide more details here that will help reviewers


PR-Codex overview

Detailed summary

This PR focuses on fixing a bug related to merging username proofs in the mergeUserNameProof function. The notable changes include:

  • Adding a check to not add fnames to the sync trie when they have not been merged
  • Adding a test to ensure that a deleted fname is not added to the trie
  • Adding a test to remove deleted fname proofs
  • Adding a new event handler for MergeUsernameProofHubEvent
  • Adding a test to check for successful merging of username proofs
  • Adding tests for handling duplicates and replacing existing proofs with greater timestamps
  • Adding tests for scenarios where there is no existing proof or the new proof is to fid 0

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@sanjayprabhu sanjayprabhu added the t-bug A fix for a bug with the current system label Jan 9, 2024
Copy link

changeset-bot bot commented Jan 9, 2024

🦋 Changeset detected

Latest commit: 58bef33

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2024 11:42pm

@sanjayprabhu sanjayprabhu merged commit 00473c2 into farcasterxyz:main Jan 10, 2024
6 checks passed
@sanjayprabhu sanjayprabhu deleted the fix_fname_sync branch January 10, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-bug A fix for a bug with the current system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant