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

Post-upgrade pcli slowdown with high tx count wallet #4970

Open
UnityChaos opened this issue Dec 21, 2024 · 0 comments
Open

Post-upgrade pcli slowdown with high tx count wallet #4970

UnityChaos opened this issue Dec 21, 2024 · 0 comments
Labels
needs-refinement unclear, incomplete, or stub issue that needs work

Comments

@UnityChaos
Copy link

Describe the bug
After the v0.81.0 upgrade, some pcli commands (view balance, query dex simulate, etc.) appear to be much slower in some cases. Specifically there is a significant difference observed when the connected wallet has a large transaction history.

On a wallet with many transactions (arb bot), view balance and query dex simulate each take ~15-20 seconds to complete, whereas pre-upgrade they were fast enough to not need measuring. (presumably on the order of 1-2 seconds).

For comparison, on a wallet with many assets/notes, but relatively low transaction count (LP wallet), these commands still take only ~1-2 seconds to complete.

To Reproduce
Easier said than done, but I suppose one could automate making many small trades or transfers and see if the time taken by the above commands increase.

Expected behavior
I would expect both commands to still be fast, but query dex simulate in particular should not be slowed down, as to my understanding, it shouldn't even be accessing the local wallet.

Screenshots
Slow Case (>13000 tx hashes, only 18 assets):

$ time pcli q dex simulate --into transfer/channel-2/uusdc 100penumbra | wc -l                                                          
Scanning blocks from last sync height 2632452 to latest height 2632865
28

real    0m14.884s
user    0m14.446s
sys     0m0.221s
$ time pcli v balance | wc -l                                                 
Scanning blocks from last sync height 2632870 to latest height 2632870
18

real    0m15.311s
user    0m15.001s
sys     0m0.281s
$ time pcli v list-tx-hashes | wc -l                                                                                                    
Scanning blocks from last sync height 2632881 to latest height 2632881
13595

real    7m5.782s
user    6m15.204s
sys     0m46.849s

Fast case (>4000 assets (lp positions), only ~900 tx hashes)

$ time pcli q dex simulate --into transfer/channel-2/uusdc 100penumbra | wc -l
Scanning blocks from last sync height 2632865 to latest height 2632865
28

real    0m2.388s
user    0m1.996s
sys     0m0.079s
$ time pcli v balance | wc -l
Scanning blocks from last sync height 2632866 to latest height 2632866
4327

real    0m2.136s
user    0m1.877s
sys     0m0.148s
$ time pcli v list-tx-hashes | wc -l
Scanning blocks from last sync height 2632879 to latest height 2632879
896

real    0m45.239s
user    0m39.456s
sys     0m3.952s

Additional context
Slow case tested with local node and remote RPC.
Obvious short-term workaround would be to migrate to a fresh wallet every few thousand transactions.

@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-refinement unclear, incomplete, or stub issue that needs work
Projects
None yet
Development

No branches or pull requests

1 participant