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

Export state for genesis tinkering #48

Closed
wants to merge 2 commits into from
Closed

Conversation

toliaqat
Copy link
Contributor

The current setup embeds the chain-id within the data folder. To operate the a3p container using an alternate chain-id, users must currently export the state manually and then re-import it after making necessary adjustments. This need arose for me when I attempted to run two separate a3p chains with distinct chain-ids on the same cluster for testing IBC relaying.

This proposed change involves exporting the state to the config folder and removing the data. The concept is that upon startup, the container will initially load the state from the exported genesis, allowing it to function as it previously did. Those who wish to use a different chain-id can simply modify the exported genesis before initiating the chain.

@mhofman
Copy link
Member

mhofman commented Dec 22, 2023

I'm not sure this should be part of the base image. It's pretty costly to do a genesis export / import, and does not represent the activity that occurred on mainnet.

Is there a reason these steps cannot be performed in a layer on top of the a3p image, e.g. in a separate Dockerfile which uses a3p as a base?

@toliaqat
Copy link
Contributor Author

I'm not sure this should be part of the base image. It's pretty costly to do a genesis export / import, and does not represent the activity that occurred on mainnet.

Is there a reason these steps cannot be performed in a layer on top of the a3p image, e.g. in a separate Dockerfile which uses a3p as a base?

@mhofman The export only takes time at build time, and the import is less than 5 minutes when the container starts. These 5 minutes could be too much or maybe more depending on the user's machine. The benefit is that we can change the chain ID at the start. This might not be that big of an advantage to include within a3p and you are right that the a3p can be used as based image for someone wanting this feature. Closing this PR.

@toliaqat toliaqat closed this Dec 24, 2023
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.

2 participants