-
Notifications
You must be signed in to change notification settings - Fork 521
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
EVM-713 Fork manager params #1645
Conversation
b2c0479
to
7704d0b
Compare
86e7360
to
5976087
Compare
8946346
to
b2f757e
Compare
b2f757e
to
3f36a15
Compare
088576f
to
b84662a
Compare
b84662a
to
d1ca973
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of questions:
- as I understand, this is just a temporary solution since we haven't implemented on chain governance yet. When and if we implement it, this feature would be redundant and we can remove it if necessary?
- we could change these parameters manually in the
genesis.json
and after server is restarted, those changes would take place. In that sense, it may look redundant to it. Although convenience for forking support is that you can set the parameters and delay activation by specifying exact block and we are good. Anyways is forking mechanism going to override it if somebody chooses to change some value by hand? - if I'm correct, this is only useful for us (Edge team) if we want to enfore some set of parameters along with their values, but not sure how it is going to be used by the end users? They would probably need to fork Edge repository and implement some fork on their own. Is that correct?
15f8076
to
d7db573
Compare
d7db573
to
3c2e6ea
Compare
Would be great to have answers for these questions @igorcrevar , how's that envisioned? |
Correct.
We need to add code (similar to handlers) which will determine what is the proper value of the parameter based on the block.
Correct. |
Description
Forks inside
genesis.json
now will look like:Currently there are 5 predefined parameters for forks
We can specify some or all of those parameters for some fork in
genesis.json
. The parameters need to be pointers because some of them can be omitted. If some parameter is omitted for specific fork, then its values is picked from first fork with smaller block number or from initial fork parameters.During the execution, parameter can be retrieved by using fork manager
func (fm *forkManager) GetParams(blockNumber uint64) *chain.ForkParams
Initial parameters for polybft are set via
builtin.go
mapping function insidepolybft.go
If we want to add new parameter, then we need to add that parameter (as a pointer) to
ForkParams
and change its value ingenesis.json
. In that case its probably good to changeForkManagerInitialParamsFactory
tooChanges include
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Checklist
Testing