Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass CWalletDB to OrderedTxItems() as optional param #578

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

dimxy
Copy link
Collaborator

@dimxy dimxy commented Mar 27, 2023

Passing CWalletDB to OrderedTxItems() drastically speeds up importprivkey (and prevents py tests from failure on timed out importprivkey)

@DeckerSU
Copy link

DeckerSU commented Mar 28, 2023

May be better consider following upstream and this commit - zcash@31d49b0 , which is part of zcash#5271 ?

p.s. As the original PR touches the wallet, my offer is to postpone these changes till "after the next hardfork", to test everything properly, etc.

@dimxy
Copy link
Collaborator Author

dimxy commented Mar 28, 2023

I think we could pull zcash code after the upcoming hardfork but merge this fix for now:
it is very simple and for new notaries it will improve node setup performance (as they will do importprivkey many times and with this fix performance increases by as much as from one to two orders of magnitude)

@DeckerSU
Copy link

DeckerSU commented Mar 28, 2023

I think we could pull zcash code after the upcoming hardfork but merge this fix for now: it is very simple and for new notaries it will improve node setup performance (as they will do importprivkey many times and with this fix performance increases by as much as from one to two orders of magnitude)

I guess cherry-picking just zcash@31d49b0 then, will give the even more perfomance improvement, bcz std::multimap<int64_t, TxPair > will not recreate / compute on every need, but store in memory. My point of view - we don't need to add half-fixes / partial-solutions, etc. into codebase.

Also, as a notary node operator I'll recommend everybody use importprivkey without rescan, to achieve maximum perfomance and use existing set of scripts (sendfromaddress.sh, etc.) to access the funds "before" import. It will be much faster than any wallet rescan anyway.

Copy link

@DeckerSU DeckerSU left a comment

Choose a reason for hiding this comment

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

Approved, with agreement to apply fixes from the upstream after the hard fork.

@ca333 ca333 merged commit bea9371 into KomodoPlatform:dev Jan 26, 2024
DeckerSU pushed a commit to DeckerSU/KomodoOcean that referenced this pull request Jan 26, 2024
who-biz pushed a commit to who-biz/komodo that referenced this pull request Jul 29, 2024
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