Skip to content

refactor: use yaci-store SyncStatusService instead of local back-port#65

Draft
matiwinnetou wants to merge 2 commits intodevelopfrom
refactor/use-yaci-store-sync-status
Draft

refactor: use yaci-store SyncStatusService instead of local back-port#65
matiwinnetou wants to merge 2 commits intodevelopfrom
refactor/use-yaci-store-sync-status

Conversation

@matiwinnetou
Copy link
Copy Markdown
Contributor

@matiwinnetou matiwinnetou commented Mar 24, 2026

Status

Blocked: waiting for yaci-store 2.0.1 to be released. The upstream SyncStatusService and SyncStatus record this PR depends on are not yet available in a published artifact.

Summary

  • Remove OnchainSyncStatusService (ported/duplicated sync logic) and its tests (-295 lines)
  • Use yaci-store's upstream SyncStatusService from yaci-store-core with getSyncStatus() returning a SyncStatus record (synced(), syncPercentage())
  • Bump version.yaci from 2.0.0 to 2.0.1

Depends on: bloxbean/yaci-store#861 being merged and released as 2.0.1

What changed

Before After
Local OnchainSyncStatusService back-port (~200 lines) with manual chain tip polling, cached NetworkTip, and percentage calculation Upstream SyncStatusService.getSyncStatus() returning SyncStatus record
getSyncPercentage() + isSynced() (two calls) getSyncStatus()syncStatus.syncPercentage() + syncStatus.synced() (single call)

Test plan

  • Verify OnchainReadinessHealthIndicator reports correct sync status (UP/OUT_OF_SERVICE/DOWN)
  • Verify /actuator/health/liveness and /actuator/health/readiness include sync percentage
  • Run integration tests (SyncStatusIntegrationIT)
  • Verify health endpoint output uses . decimal separator regardless of JVM locale

Remove OnchainSyncStatusService (ported from yaci-store admin-ui) and
use the upstream SyncStatusService now available in yaci-store-core
as of 2.0.1 (bloxbean/yaci-store#861).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matiwinnetou matiwinnetou changed the title refactor: use yaci-store SyncStatusService instead of local port refactor: use yaci-store SyncStatusService instead of local back-port Mar 24, 2026
@matiwinnetou matiwinnetou mentioned this pull request Mar 24, 2026
12 tasks
@matiwinnetou matiwinnetou force-pushed the refactor/use-yaci-store-sync-status branch 2 times, most recently from ea1102c to 185f9d8 Compare March 26, 2026 17:07
Resolve conflicts: keep deleted OnchainSyncStatusService (replaced by
upstream), keep develop's health indicator using getSyncPercentage().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matiwinnetou matiwinnetou force-pushed the refactor/use-yaci-store-sync-status branch from 185f9d8 to 479d085 Compare March 26, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant