Skip to content

Commit

Permalink
fix the genesis command and change the default stake for initial vali…
Browse files Browse the repository at this point in the history
…dators (#46)
  • Loading branch information
R-Santev authored Sep 17, 2024
1 parent b46f19c commit 646dbfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion command/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
)

var (
DefaultStake = ethgo.Ether(1e6)
DefaultStake = ethgo.Ether(15000)
DefaultPremineBalance = ethgo.Ether(1e6)
DefaultGenesisBaseFee = chain.GenesisBaseFee
DefaultGenesisBaseFeeConfig = fmt.Sprintf(
Expand Down
3 changes: 2 additions & 1 deletion command/genesis/polybft_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (p *genesisParams) getValidatorAccounts() ([]*validator.GenesisValidator, e
validators := make([]*validator.GenesisValidator, len(p.validators))
for i, val := range p.validators {
parts := strings.Split(val, ":")
if len(parts) != 3 {
if len(parts) != 4 {
return nil, fmt.Errorf("expected 4 parts provided in the following format "+
"<P2P multi address:ECDSA address:public BLS key:BLS signature>, but got %d part(s)",
len(parts))
Expand Down Expand Up @@ -441,6 +441,7 @@ func (p *genesisParams) getValidatorAccounts() ([]*validator.GenesisValidator, e
MultiAddr: parts[0],
Address: addr,
BlsKey: trimmedBLSKey,
Stake: command.DefaultStake,
}
}

Expand Down
1 change: 1 addition & 0 deletions command/genesis/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ func getCGPricesData(precision int) (*PricesDataCoinGecko, error) {
return nil, err
}

// TODO: Remove hardcoded Coingecko API key
// Add the key in the header
req.Header.Add("x-cg-demo-api-key", "CG-M6fdZBrNeR3njQQtBmkUBhkg")

Expand Down

0 comments on commit 646dbfc

Please sign in to comment.