Skip to content

Conversation

@ltardivo
Copy link
Collaborator

@ltardivo ltardivo commented Nov 18, 2024

This PR improves the synchronization process and database interactions.

  • Batch transactions and blocks for efficient database insertion.
  • Insert are triggered when the batch is full or RPC getBlock fails.
  • Use spawn for process management, instead of using cluster library.
  • Sync processes no longer depend on the DB.block table, they only rely on Bitcoin node communication.
  • Consolidates Input and Output insertion/updates into a single SQL query.
  • The zmq is activated at a certain threshold.
  • Block reorganization start to be checked at a certain threshold.

Db changes

  • The Input table PK is now "spendingInput" field.
  • Renames scriptPubKey to asm at Output table
  • Remove field Output.publicKeys

@ltardivo ltardivo requested a review from ClemensLey November 18, 2024 18:43
Copy link
Contributor

@ClemensLey ClemensLey left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Contributor

@ClemensLey ClemensLey left a comment

Choose a reason for hiding this comment

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

Looks good to me

@ltardivo ltardivo requested a review from ClemensLey November 29, 2024 23:23
Copy link
Contributor

@ClemensLey ClemensLey left a comment

Choose a reason for hiding this comment

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

Great, looks good to me

@ClemensLey ClemensLey merged commit 8586441 into main Dec 6, 2024
@ClemensLey ClemensLey deleted the fix/batch-workers-insert branch December 6, 2024 21:24
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