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

Regenesis support #1413

Closed
wants to merge 15 commits into from
Closed

Regenesis support #1413

wants to merge 15 commits into from

Conversation

MujkicA
Copy link
Contributor

@MujkicA MujkicA commented Oct 11, 2023

Closes #1450

Remaining tasks:

@MujkicA MujkicA requested a review from xgreenx October 11, 2023 14:00
@Voxelot
Copy link
Member

Voxelot commented Oct 12, 2023

The Cargo.lock file should not be deleted. It is important for binary distribution stability and ci caching.

https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

}

#[derive(Clone, Debug)]
pub struct StateImporter<T> {
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to specify what kind of state, rather than just general StateImporter? Like ChainState or whatever is most appropriate.

}
}

struct InMemorySource {
Copy link
Member

Choose a reason for hiding this comment

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

Did you consider, instead of abstracting along the Read and Write trait, providing some domain specific trait, e.g. ChainStateSource or something along those lines?

Then instead of injecting this fake file construct, you could have an InMemoryChainStateSource and a FileSystemChainStateSource, which would allow you define these things in terms of domain specific actions instead of implementation specific actions:
read_chain_state vs read.

Interested to hear your thoughts :)

@xgreenx
Copy link
Collaborator

xgreenx commented Nov 1, 2023

We've split it into several smaller PRs

@xgreenx xgreenx closed this Nov 1, 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.

Extract the initial_state from the ChainConfig
5 participants