Skip to content

Improving Light Node Synchronization Speed #474

@yanguoyu

Description

@yanguoyu

Currently, during light node synchronization, each transaction input requires a fetch_transaction operation. If a transaction contains a large number of inputs, this can significantly slow down synchronization.

The purpose of fetch_transaction is to retrieve input details when get_transaction is called. However, it now seems unnecessary because:

  1. We already filter out inputs not belonging to the wallet, so only wallet-related inputs are stored in the database.
  2. If an input belongs to the wallet, the transaction that created its output cell should have been synchronized earlier.
    Thus, fetch_transaction would only fetch transactions irrelevant to the wallet.

While this reasoning holds in theory, actual code review and testing are still needed to verify whether other issues exist.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions