-
Notifications
You must be signed in to change notification settings - Fork 631
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
[Import Genesis] Speeding up the import genesis time #1413
Comments
Hi @moniya12 . Are you on this? If yes, what is the status? Thanks! |
@p0mvn, I did some work on this and so far I've reduced the importing time by maybe a half. I did the profiling by running this test file which contains the code needed for importing genesis used in the |
@catShaark out of curiosity, how much time does it now take compared to what it did before? What changes did you make to achieve this? |
Changes I did :
|
@catShaark So just to give you some more context, this issue was in reference to state exported testnets. Basically, when we take a state export, modify the values, then start a new testnet off this new genesis the following happens:
I think your changes will help with number 1, but number 3 is where the most time is spent. @moniya12 was working on some database changes to potentially help with this. |
take a state export = running osmosisd export right ? |
@catShaark correct! That takes ~5-10 mins max |
I import a 1.8G genesis file ( exported from an osmosis mainet node ) and it takes only 200-300 sec. Do I do something wrong ? Can you give me a genesis.json file that you guys used |
In our scenario, we are modifying the genesis the mint new coins to a wallet, change a validator's consensus key to the one that we have locally, and give it 99 percent of the voting power. You can read a little more about the process here https://github.com/osmosis-labs/osmosis/tree/main/tests/localosmosis#localosmosis-with-mainnet-state and see the python script being used to modify the genesis here https://github.com/osmosis-labs/osmosis/blob/main/cmd/osmosisd/cmd/testnetify/testnetify.py Tomorrow I can provide you with a modified one with the required consensus key if desired |
thanks, I'd love to work on this to improve our test runtime overall |
here is a pprof graph
|
@catShaark thanks for the pprof. From what I remember, we had a specific case where our pprof was taking more than an hour, halting for over 40 minutes due to processing data. Seems that @czarcas7ic can guide us tomorrow in terms of how to get this genesis file. |
ohh thank you guys, this is something I really want to put my hand on. |
Yeah honestly the more eyes on this the better. While it started off being just an annoying side problem, its gotten in the way a lot more than one would expect |
@czarcas7ic, this is still relevant right ? now that the incident is over, should we continue working on this ? |
Yes very relevant, will get back to it tomorrow, thanks for the ping |
Closing this for now. We've temporarily mitigated the problem by pruning IBC state. Further improvements should come from IAVL improvements and better atomicity structure in the SDK's usage of the database |
Background
We need to understand what is happening during the import genesis and come up with a solution to improve time.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: