This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce baseFeeChangeDenom network parameter
- Loading branch information
1 parent
c3da0d4
commit 0760205
Showing
24 changed files
with
290 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ type PolyBFTConfig struct { | |
// NativeTokenConfig defines name, symbol and decimal count of the native token | ||
NativeTokenConfig *TokenConfig `json:"nativeTokenConfig"` | ||
|
||
// InitialTrieRoot represents a pre-existing state root hash | ||
InitialTrieRoot types.Hash `json:"initialTrieRoot"` | ||
|
||
// SupernetID indicates ID of given supernet generated by stake manager contract | ||
|
@@ -55,6 +56,10 @@ type PolyBFTConfig struct { | |
// WithdrawalWaitPeriod indicates a number of epochs after which withdrawal can be done from child chain | ||
WithdrawalWaitPeriod uint64 `json:"withdrawalWaitPeriod,omitempty"` | ||
|
||
// TODO: @Stefan-Ethernal REMOVE! | ||
Check failure on line 59 in consensus/polybft/common/polybft_config.go GitHub Actions / golangci_lint
Check failure on line 59 in consensus/polybft/common/polybft_config.go GitHub Actions / golangci_lint
|
||
// BaseFeeChangeDenom is the value to bound the amount the base fee can change between blocks | ||
BaseFeeChangeDenom uint64 `json:"baseFeeChangeDenom,omitempty"` | ||
|
||
// RewardConfig defines rewards configuration | ||
RewardConfig *RewardsConfig `json:"rewardConfig"` | ||
|
||
|
@@ -72,7 +77,7 @@ func LoadPolyBFTConfig(chainConfigFile string) (PolyBFTConfig, error) { | |
return PolyBFTConfig{}, err | ||
} | ||
|
||
polybftConfig, err := GetPolyBFTConfig(chainCfg) | ||
polybftConfig, err := GetPolyBFTConfig(chainCfg.Params) | ||
if err != nil { | ||
return PolyBFTConfig{}, err | ||
} | ||
|
@@ -81,8 +86,8 @@ func LoadPolyBFTConfig(chainConfigFile string) (PolyBFTConfig, error) { | |
} | ||
|
||
// GetPolyBFTConfig deserializes provided chain config and returns PolyBFTConfig | ||
func GetPolyBFTConfig(chainConfig *chain.Chain) (PolyBFTConfig, error) { | ||
consensusConfigJSON, err := json.Marshal(chainConfig.Params.Engine[ConsensusName]) | ||
func GetPolyBFTConfig(chainParams *chain.Params) (PolyBFTConfig, error) { | ||
consensusConfigJSON, err := json.Marshal(chainParams.Engine[ConsensusName]) | ||
if err != nil { | ||
return PolyBFTConfig{}, err | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.