-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implement ability to overwrite network parameter from checkpoint in Genesis #4459
Comments
Not sure if there are any new thoughts on this but I have a concern regarding either of this approaches. The problem is this: given a checkpoint file to load with a given hash for network parameters, which includes lets say for example payoutDelay=0. if upon loading network parameter we override some value with value from genesis (with whatever technique) e.g. we set payoutDelay to 72h - then if we take a hash it will not equal the hash given by the checkpoint file. Maybe it's not a big issue cos someone can (?) still verify that the hash after the load corresponds to the hash(cp + overrides) and does not contain any other changes, but not sure it's legitimate. |
@ze97286 I think this is fine. I imagine the following workflow:
|
@davidsiska-vega what I'm trying to say is that if we have an invariant that says hash(netparams) in the checkpoint must equal hash(netparams) after the restore from the same checkpoint (regardless of the procedure for restore), this invariant cannot hold. I don't know if it needs to hold but I think it can't with this required change because the value of the nework parameter in the checkpoint will be x, and post restore it will be y. |
Yeah, I don't know exactly when the hash is checked. If it's checked as you say (after the restore) then it indeed cannot work. We should then probably adapt the invariant / check at a different point in the flow so it can work. |
What we have now
At the moment Network parameter are set like so:
In case they are restored by a checkpoint the flow is the following:
The problem
Sometimes, a network parameter set in the checkpoint may not be desired in the same state after a restart. e.g:
Possible solution
We propose a way to either overwrite or ignore network parameters from the checkpoints and use setting from the genesis block instead, 2 implementations possible that I can think of:
I would go with the first one as it seems slightly simpler, and would be less prone to errors (e.g misconfigured genesis block) and we would keep a singlemapping of network parameter configuration, not 2, and a list of parmeters to exclude from the checkpoint reload.
The text was updated successfully, but these errors were encountered: