-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: brioche hard fork; halving block reward #75
Conversation
There is no Brioche config validation whether configs are same among the nodes. func TestRewardValidation(t *testing.T) {
...
byzantineConfig := ¶ms.ChainConfig{
ChainID: gspec.Config.ChainID,
LondonBlock: gspec.Config.LondonBlock,
BriocheBlock: gspec.Config.BriocheBlock,
Brioche: ¶ms.BriocheConfig{
BlockReward: gspec.Config.Brioche.BlockReward,
FirstHalvingBlock: gspec.Config.Brioche.FirstHalvingBlock,
HalvingPeriod: new(big.Int).Div(gspec.Config.Brioche.HalvingPeriod, big.NewInt(2)), // different period!!
FinishRewardBlock: gspec.Config.Brioche.FinishRewardBlock,
HalvingTimes: gspec.Config.Brioche.HalvingTimes,
HalvingRate: gspec.Config.Brioche.HalvingRate,
}
} Node cannot catch the difference before applying config from correct nodes. |
Unfortunately, we don't have a mechanism to compare configurations with other nodes. But if you think about it, you can see that synchronizing configurations between nodes is not conceptually correct. This is because, for example, different config settings are indispensable for nodes during the hard fork upgrade. |
I got it. It is general hard fork situation. |
According to your good advice, if the
|
Brioche hard fork includes the following.
RewardAmount
from the gov contract for block reward any morebrioche hard fork block
,first halving block
,halving period
,halving rate
,finish halving block
,block reward amount
And added some refactoring about validation for
Fees
andReward
fields of a block.The following tested manually.
master
version and upgrade it with brioche binary