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: deposit-registry wip #233

Merged

Conversation

eddort
Copy link
Member

@eddort eddort commented Sep 1, 2024

Fixed

  • Pause Processing: Validation errors, network issues, and reorganizations in deposits now do not impact the pause processing logic.
  • Uncovered Test Scenarios: Identified and covered scenarios that were previously not addressed in existing tests.

Changed

  • Module Structure: Overhauled the general structure of the module to accommodate new changes and improve maintainability.
  • DepositTree Tests: Revised the entire testing approach for the DepositTree module.
  • Hashing Functions in DepositTree: Updated hashing functions to enhance efficiency and reliability.
  • Validation Architecture: Introduced a new module, SanityChecker, which now encompasses the validation logic.
  • Integrity Checker: Moved IntegrityChecker to the SanityChecker module.
  • Blockchain Loading Logic: Extracted blockchain data loading logic into a separate module, improving modularity.
  • Event Update Algorithm (updateEventsCache):
    • Explicitly check the blockchain state before updating; if there is a reversion (e.g., from block 10 to block 5), updates from the blockchain are halted and the event is logged.
    • Log the depositRoot from the local state with each chunk of events received, aiding in troubleshooting potential cache issues.
    • Final reconciliation of depositRoot now logs an error without throwing an exception if there is a mismatch.
  • Algorithm for Fetching Latest Events (getAllDepositedEvents):
    • Added checks against the blockchain state; serve data from the cache without updating the latest events if the node is lagging.
    • Implemented verifyFreshEvents post-fetch to verify the integrity of new events; errors do not throw exceptions but return a flag, which is checked before attempting deposits.

Refactored

  • Module Code: Refactored the outdated module code which had minimal changes over time but led to architectural inefficiencies, hindering proper test coverage.

@eddort eddort marked this pull request as draft September 1, 2024 11:00
@eddort eddort mentioned this pull request Sep 1, 2024
@Amuhar Amuhar self-requested a review September 3, 2024 11:13
@eddort eddort marked this pull request as ready for review September 3, 2024 13:09
@eddort eddort changed the base branch from develop to fix/val-1200-keys-events-fetch-impr September 11, 2024 15:17
…finance/lido-council-daemon into feat/refactor-deposit-cache-merge
@eddort eddort merged commit 9c65e2c into fix/val-1200-keys-events-fetch-impr Sep 11, 2024
5 checks passed
@eddort eddort deleted the feat/refactor-deposit-cache branch September 11, 2024 17:20
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