Skip to content

Conversation

mineme0110
Copy link
Contributor

Overview

This PR introduces bulk synchronization of the node state from the Cardano db-sync.
Bulk sync is a one-time, high-efficiency catch-up process that processes all Atala objects from the starting block(as defined in config blockNumberSyncStart ) in large batches of 5000 and stops at lastConfirmedBlockNo -blockConfirmationsToWait, after which it updates the sync pointer so that regular incremental syncing can resume.

Screenshots

Checklists

Pre-submit checklist:

  • Self-reviewed the diff
  • New code has proper comments/documentation/tests
  • Any changes not covered by tests have been tested manually
  • The README files are updated
  • If new libraries are included, they have licenses compatible with our project
  • If there is a db migration altering existing tables, there is a proper migration test

Pre-merge checklist:

  • Commits have useful messages
  • Review clarifications made it into the code

Signed-off-by: mineme0110 <[email protected]>

nodeoptimisation

Signed-off-by: mineme0110 <[email protected]>

nodeoptimisation

Signed-off-by: mineme0110 <[email protected]>

nodeoptimisation

Signed-off-by: mineme0110 <[email protected]>

nodeoptimisation

Signed-off-by: mineme0110 <[email protected]>

nodeoptimisation

Signed-off-by: mineme0110 <[email protected]>
@atala-dev
Copy link
Contributor

atala-dev commented May 5, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors
✅ REPOSITORY dustilock yes no
✅ REPOSITORY git_diff yes no
⚠️ REPOSITORY kics yes 1
✅ REPOSITORY syft yes no

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented May 5, 2025

Unit Test Results

288 tests  ±0   288 ✔️ ±0   19s ⏱️ -5s
  36 suites ±0       0 💤 ±0 
  36 files   ±0       0 ±0 

Results for commit 3ab886a. ± Comparison against base commit 5eb399e.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
io.iohk.atala.prism.node.services.CardanoLedgerServiceSpec ‑ syncAtalaObjects should start syncing at specified block
io.iohk.atala.prism.node.services.CardanoLedgerServiceSpec ‑ syncAtalaObjects should start bulk sync in specified block

♻️ This comment has been updated with latest results.

@mineme0110 mineme0110 changed the title nodeoptimisation Node syncing operation optimisation for the initial bootstrap May 5, 2025
@mineme0110 mineme0110 changed the title Node syncing operation optimisation for the initial bootstrap feat: Node syncing operation optimisation for the initial bootstrap with bulk sync atala operations May 5, 2025
Copy link
Contributor

@yshyn-iohk yshyn-iohk left a comment

Choose a reason for hiding this comment

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

@mineme0110, could you take a look at my coments.
I'm concerned that we don't use the SQL cursor correctly.
It should be possible to fetch the blocks using stream and process this stream to the end.

@mineme0110 mineme0110 merged commit 21f52e7 into main May 6, 2025
4 checks passed
@mineme0110 mineme0110 deleted the fix-node-optimisation branch May 6, 2025 12:17
atala-dev added a commit that referenced this pull request May 6, 2025
# [2.6.0](v2.5.0...v2.6.0) (2025-05-06)

### Bug Fixes

* add validations to TimestampInfo ([#871](#871)) ([e7850e6](e7850e6))
* remove CORS ([#869](#869)) ([a2f55b5](a2f55b5))

### Features

* Node  syncing operation optimisation for the initial bootstrap with bulk sync atala operations ([#879](#879)) ([21f52e7](21f52e7))
* postgres metrics ([#868](#868)) ([8a70e64](8a70e64))
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.

3 participants