Skip to content

Conversation

danlaine
Copy link
Collaborator

No description provided.

@danlaine danlaine requested a review from Copilot July 22, 2025 20:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the sync example client to operate in a continuous synchronization mode rather than performing a single sync operation. The client now repeatedly syncs to the server's database state at configurable intervals.

  • Added continuous sync loop with configurable sync interval parameter
  • Updated documentation to reflect the new continuous operation mode
  • Enhanced example output logs to show sync iteration tracking

Base automatically changed from danlaine/sync-example-dynamic to main July 22, 2025 23:14
- **Sync Completion**: Client continues until all operations are applied and state matches server's target
- **Database Closure**: Client closes the database to prepare for next iteration
- **Wait Period**: Client waits for the configured sync interval before starting next iteration
5. **Continuous Operation**: This process continues indefinitely, allowing the client to stay synchronized with the ever-changing server state
Copy link
Contributor

Choose a reason for hiding this comment

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

I had imagined, originally, that we'd "never end the sync" procedure (while still allowing db access) rather than continuously restarting the entire thing but I think that's a significant amount of extra work.

This was a pattern I thought could be useful for indexing-focused nodes that don't want to (or can't) run consensus (and just want to sync state proofs).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think what you have is definitely worth keeping as part of the example in any case 👍

Copy link
Contributor

@patrick-ogrady patrick-ogrady left a comment

Choose a reason for hiding this comment

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

Looks very close (too)

@patrick-ogrady
Copy link
Contributor

Looks very close (too)

Once you update the code to use a single connection in the client, should be g2g.

@patrick-ogrady patrick-ogrady merged commit 1ba5c93 into main Jul 23, 2025
35 checks passed
@patrick-ogrady patrick-ogrady deleted the danlaine/sync-example-dynamic-2 branch July 23, 2025 04:11
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.20%. Comparing base (900ff50) to head (962bec7).
Report is 1 commits behind head on main.

@@           Coverage Diff           @@
##             main    #1305   +/-   ##
=======================================
  Coverage   91.20%   91.20%           
=======================================
  Files         248      248           
  Lines       62084    62084           
=======================================
  Hits        56623    56623           
  Misses       5461     5461           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 900ff50...962bec7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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