Code Monkey home page Code Monkey logo

Comments (9)

j-berman avatar j-berman commented on September 28, 2024 4

The expected behavior:

  • user restores a wallet using current chain height as restore height
  • user calls scan_tx with an earlier tx
  • scan_tx returns immediately

The problem: scan_tx calls refresh(), which can take a long time to complete even if the wallet's restore height is set to the current height.

This needs confirmation (repro with the RPC and observe the logs), but I believe refresh is slow to complete even when setting restore height to current height because it's taking a while to get all block hashes from the chain starting from genesis.

Assuming this is the general issue (long-running refresh in scan_tx), the simplest fix for this is probably to remove the call to refresh in scan_tx, which means the wallet won't have the latest chain state upon completion of scan_tx. This is probably ok and expected.

The more involved fix is to refactor fast_refresh and scanning to not need all block hashes from the chain, and to only need hashes starting from the wallet's restore height. The Seraphis lib does this refactoring already, which we're in the process of migrating toward, so I would lean towards the simpler fix for now.

from monero.

woodser avatar woodser commented on September 28, 2024

Essentially the issue is that calling scan_tx also calls refresh which syncs the entire blockchain starting from the tx height.

So this issue is requesting to scan the minimum necessary.

from monero.

sharifzadesina avatar sharifzadesina commented on September 28, 2024

@0xFFFC0000 Excuse me, but Is this considered a "question"? because literally scan_tx takes 10 (or more) minutes to run.

from monero.

0xFFFC0000 avatar 0xFFFC0000 commented on September 28, 2024

@sharifzadesina thank you for reporting this. We will take a look into this.

  1. This happened after specific updates?
  2. Have you tried on other systems with other configurations too, and problem was still present?

In the meantime it appears to me @woodser has explained the actual reason.

from monero.

selsta avatar selsta commented on September 28, 2024

Issue got introduced here: #8566

from monero.

sharifzadesina avatar sharifzadesina commented on September 28, 2024

@j-berman Exactly, Thank you.

Even when I set restore height to a higher value, it takes too long to finish.

from monero.

sharifzadesina avatar sharifzadesina commented on September 28, 2024

Bump! any update on this?

from monero.

j-berman avatar j-berman commented on September 28, 2024

Will fix by end of this week

from monero.

sharifzadesina avatar sharifzadesina commented on September 28, 2024

@j-berman Thank you, I wish I could help, I just don't know C++,

from monero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.