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

BalanceStorage.BootstrapBalances is very slow for big balances files #390

Closed
thaarok opened this issue Mar 20, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@thaarok
Copy link

thaarok commented Mar 20, 2022

Describe the bug
When running rosetta-cli check:data with very big balances file (all balances at given block number to check the chain starting from the given block), the BootstrapBalances sets accounts very slowly after cca 200000 records.
Every record adding takes more then 1 second then. (see Addition context)

To Reproduce
Start rosetta-cli check:data with very big bootstrap_balances JSON file. (like 200000 records).
New Setting account log records will appear more and more slowly after few thousands.

Expected behavior
Time necessary for balances bootstrap should be linear to amount of imported accounts.

Additional context

2022/03/20 14:23:53 Setting account 0xaAf814c8B179C4e0367393F0039DE066Ad322e22 balance to 6990683807000000000 &{Symbol:FTM Decimals:18 Metadata:map[]}
2022/03/20 14:23:55 Setting account 0xf9ae52e24203a0C603aaACB2F38155624d2AA4bd balance to 6990473431700000000 &{Symbol:FTM Decimals:18 Metadata:map[]}
2022/03/20 14:23:56 Setting account 0xeE325c6CCD5B52599222eaE8A02209CEA2647799 balance to 10000000000000000000 &{Symbol:FTM Decimals:18 Metadata:map[]}
2022/03/20 14:23:58 Setting account 0xCF08c0EdCf9b26C4109146c093f5168442b6e408 balance to 9998984966146198000 &{Symbol:FTM Decimals:18 Metadata:map[]}
2022/03/20 14:23:59 Setting account 0x1fb3960117D710273B2E564e4Ed96e55DEF6f556 balance to 40000000000000000000 &{Symbol:FTM Decimals:18 Metadata:map[]}
2022/03/20 14:24:00 Setting account 0xC99ec866E51e705F90f2C99ABcd8AF6570018A62 balance to 6990683807000000000 &{Symbol:FTM Decimals:18 Metadata:map[]}
@thaarok thaarok added the bug Something isn't working label Mar 20, 2022
@thaarok
Copy link
Author

thaarok commented Mar 20, 2022

sorry, seems already fixed in SDK 0.7.4 - #367

@thaarok thaarok closed this as completed Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant