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

Topdown lost commits #757

Merged
merged 11 commits into from
Mar 1, 2024
Merged

Topdown lost commits #757

merged 11 commits into from
Mar 1, 2024

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Feb 29, 2024

Recover lost fendermint topdown commits from previous archived repo. Some major changes includes:

  • Remove sync pointers that simplifies the polling logic
  • Integrate with sync_many flag from main

Back then the requirement was only pushing the parent view to cache if the next block is a non-null block. In this case, we need to track:

  1. The highest block pull (head)
  2. The previous non-null block (tail)
    We were using a head and tail to pull data.
    Now we dont have this requirement, we just need the latest height fetched in cache to determine the next height to poll. The data is pushed to cache regardless if it's null or non-null. This way it simplifies the logic.

@cryptoAtwill cryptoAtwill marked this pull request as draft February 29, 2024 06:51
Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

Great to see the code being simplified. Could you provide some description of what exactly changed? What replaces the pointers, why were they needed before but not any more?

@cryptoAtwill cryptoAtwill marked this pull request as ready for review February 29, 2024 12:35
Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

I couldn't explain why it should be faster, though 🤔

@cryptoAtwill cryptoAtwill merged commit d05cffa into main Mar 1, 2024
17 checks passed
@cryptoAtwill cryptoAtwill deleted the topdown-lost-commits branch March 1, 2024 01:34
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.

2 participants