Skip to content
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

Load chain config from file #5694

Merged
merged 59 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
048ba7a
load chain config from file
shayzluf Apr 30, 2020
d588ab0
revert flag name change
shayzluf Apr 30, 2020
ed92bc1
add dependencies to image
shayzluf Apr 30, 2020
3f23d85
Merge branch 'master' of github.com:prysmaticlabs/prysm into yaml_cha…
shayzluf Apr 30, 2020
1691775
Update shared/cmd/flags.go
shayzluf Apr 30, 2020
3b531e8
Update beacon-chain/main.go
shayzluf Apr 30, 2020
feef5d5
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] Apr 30, 2020
cae5f6f
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] Apr 30, 2020
5c0c400
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
da564a0
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
b60409c
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
bf74332
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
e65c6ed
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
c5240ea
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
6a87c10
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
246e39c
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 1, 2020
4649b49
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 2, 2020
eb5c70f
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 2, 2020
c44eda7
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 2, 2020
49484c1
added test to load config file
shayzluf May 3, 2020
e33255d
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 3, 2020
4dd7b61
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 3, 2020
5b4ac97
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
319efb8
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
f4ae1cc
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
994c933
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
bf11aca
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
20fab1f
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 4, 2020
24e4537
replace hex with yaml format of fixed byte array
shayzluf May 5, 2020
ab0363c
fix test and check if comment
shayzluf May 5, 2020
9adf112
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
227af7c
Merge branch 'master' into yaml_chain_config
shayzluf May 5, 2020
a318a61
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 5, 2020
5efedc9
move to node package
shayzluf May 5, 2020
60c50dd
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
5e8cb1a
gaz
shayzluf May 5, 2020
7a28699
added contract address case
shayzluf May 5, 2020
0e58c6d
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 5, 2020
6df99ef
fix key name issue
shayzluf May 5, 2020
ef50062
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
2302d1e
add tests
shayzluf May 5, 2020
424aab4
gaz
shayzluf May 5, 2020
0963ab5
Merge branch 'master' of github.com:prysmaticlabs/prysm into yaml_cha…
shayzluf May 5, 2020
23ab4a1
add 1 byte handling
shayzluf May 5, 2020
21f0ead
change to fatal
shayzluf May 5, 2020
7e69729
add config printout
shayzluf May 5, 2020
2a6b3eb
Merge refs/heads/master into yaml_chain_config
prylabs-bulldozer[bot] May 5, 2020
85b8db1
revert main changes
shayzluf May 5, 2020
b302765
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
703d19f
revert line removal
shayzluf May 5, 2020
4520a94
fix one byte handling
shayzluf May 5, 2020
09a2915
fix test and one byte handling
shayzluf May 5, 2020
d6f2f2d
remove log
shayzluf May 5, 2020
86f63a6
Apply suggestions from code review
rauljordan May 5, 2020
0678344
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
09991a9
change to debug
shayzluf May 5, 2020
09c785c
Update beacon-chain/node/node.go
terencechain May 5, 2020
cace30b
move helper methods
shayzluf May 5, 2020
b7eff0c
Merge branch 'yaml_chain_config' of github.com:prysmaticlabs/prysm in…
shayzluf May 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions beacon-chain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ go_image(
"//shared/featureconfig:go_default_library",
"//shared/logutil:go_default_library",
"//shared/version:go_default_library",
"//shared/params:go_default_library",
"@com_github_ethereum_go_ethereum//log:go_default_library",
"@com_github_ipfs_go_log//:go_default_library",
"@com_github_joonix_log//:go_default_library",
Expand All @@ -68,6 +69,7 @@ go_image(
"@in_gopkg_urfave_cli_v2//:go_default_library",
"@in_gopkg_urfave_cli_v2//altsrc:go_default_library",
"@org_uber_go_automaxprocs//:go_default_library",
"@in_gopkg_yaml_v2//:go_default_library",
],
)

Expand Down
1 change: 1 addition & 0 deletions beacon-chain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var appFlags = []cli.Flag{
cmd.LogFileName,
cmd.EnableUPnPFlag,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
}

func init() {
Expand Down
6 changes: 6 additions & 0 deletions beacon-chain/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,22 @@ go_library(
"@com_github_pkg_errors//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@in_gopkg_urfave_cli_v2//:go_default_library",
"@in_gopkg_yaml_v2//:go_default_library",
],
)

go_test(
name = "go_default_test",
size = "small",
srcs = ["node_test.go"],
data = glob(["*.yaml"]) + [
"@eth2_spec_tests_mainnet//:test_data",
"@eth2_spec_tests_minimal//:test_data",
],
embed = [":go_default_library"],
deps = [
"//beacon-chain/core/feed/state:go_default_library",
"//shared/params:go_default_library",
"//shared/testutil:go_default_library",
"@com_github_sirupsen_logrus//hooks/test:go_default_library",
"@in_gopkg_urfave_cli_v2//:go_default_library",
Expand Down
113 changes: 113 additions & 0 deletions beacon-chain/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package node
import (
"bytes"
"context"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
Expand Down Expand Up @@ -50,6 +51,7 @@ import (
"github.com/prysmaticlabs/prysm/shared/version"
"github.com/sirupsen/logrus"
"gopkg.in/urfave/cli.v2"
"gopkg.in/yaml.v2"
)

var log = logrus.WithField("prefix", "node")
Expand Down Expand Up @@ -93,6 +95,11 @@ func NewBeaconNode(cliCtx *cli.Context) (*BeaconNode, error) {
return nil, err
}

if cliCtx.IsSet(cmd.ChainConfigFileFlag.Name) {
chainConfigFileName := cliCtx.String(cmd.ChainConfigFileFlag.Name)
loadChainConfigFile(chainConfigFileName)
}

featureconfig.ConfigureBeaconChain(cliCtx)
flags.ConfigureGlobalFlags(cliCtx)
registry := shared.NewServiceRegistry()
Expand Down Expand Up @@ -662,3 +669,109 @@ func (b *BeaconNode) registerArchiverService() error {
})
return b.services.RegisterService(svc)
}

func loadChainConfigFile(chainConfigFileName string) {
shayzluf marked this conversation as resolved.
Show resolved Hide resolved
yamlFile, err := ioutil.ReadFile(chainConfigFileName)
if err != nil {
log.WithError(err).Fatal("Failed to read chain config file.")
}
// convert 0x hex inputs to fixed bytes arrays
terencechain marked this conversation as resolved.
Show resolved Hide resolved
lines := strings.Split(string(yamlFile), "\n")
shayzluf marked this conversation as resolved.
Show resolved Hide resolved
for i, line := range lines {
if !strings.HasPrefix(line, "#") && strings.Contains(line, "0x") {
parts := replaceHexStringWithYAMLFormat(line)
lines[i] = strings.Join(parts, "\n")
}
}
yamlFile = []byte(strings.Join(lines, "\n"))
conf := params.BeaconConfig()
if err := yaml.Unmarshal(yamlFile, conf); err != nil {
log.WithError(err).Fatal("Failed to parse chain config yaml file.")
}
log.Infof("Config file values: %+v", conf)
shayzluf marked this conversation as resolved.
Show resolved Hide resolved
params.OverrideBeaconConfig(conf)
}

func replaceHexStringWithYAMLFormat(line string) []string {
parts := strings.Split(line, "0x")
b, err := hex.DecodeString(parts[1])
if err != nil {
log.WithError(err).Error("Failed to decode hex string.")
}
switch l := len(b); {
case l == 1:
var byte byte
byte = b[0]
fixedByte, err := yaml.Marshal(byte)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[0] = parts[0] + string(fixedByte)
parts = parts[:1]
case l > 1 && l <= 4:
var arr [4]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 4 && l <= 8:
var arr [8]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 8 && l <= 16:
var arr [16]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 16 && l <= 20:
var arr [20]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 20 && l <= 32:
var arr [32]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 32 && l <= 48:
var arr [48]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 48 && l <= 64:
var arr [64]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
case l > 64 && l <= 96:
var arr [96]byte
copy(arr[:], b)
fixedByte, err := yaml.Marshal(arr)
if err != nil {
log.WithError(err).Error("Failed to marshal config file.")
}
parts[1] = string(fixedByte)
}
return parts
}
98 changes: 98 additions & 0 deletions beacon-chain/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import (
"flag"
"fmt"
"os"
"strings"
"testing"

statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
logTest "github.com/sirupsen/logrus/hooks/test"
"gopkg.in/urfave/cli.v2"
Expand Down Expand Up @@ -48,3 +50,99 @@ func TestNodeClose_OK(t *testing.T) {
t.Log(err)
}
}

func TestLoadConfigFile(t *testing.T) {
mainnetConfigFile := testutil.ConfigFilePath(t, "mainnet")
loadChainConfigFile(mainnetConfigFile)
if params.BeaconConfig().MaxCommitteesPerSlot != params.MainnetConfig().MaxCommitteesPerSlot {
t.Errorf("Expected MaxCommitteesPerSlot to be set to mainnet value: %d found: %d",
params.MainnetConfig().MaxCommitteesPerSlot,
params.BeaconConfig().MaxCommitteesPerSlot)
}
if params.BeaconConfig().SecondsPerSlot != params.MainnetConfig().SecondsPerSlot {
t.Errorf("Expected SecondsPerSlot to be set to mainnet value: %d found: %d",
params.MainnetConfig().SecondsPerSlot,
params.BeaconConfig().SecondsPerSlot)
}
minimalConfigFile := testutil.ConfigFilePath(t, "minimal")
loadChainConfigFile(minimalConfigFile)
if params.BeaconConfig().MaxCommitteesPerSlot != params.MinimalSpecConfig().MaxCommitteesPerSlot {
t.Errorf("Expected MaxCommitteesPerSlot to be set to minimal value: %d found: %d",
params.MinimalSpecConfig().MaxCommitteesPerSlot,
params.BeaconConfig().MaxCommitteesPerSlot)
}
if params.BeaconConfig().SecondsPerSlot != params.MinimalSpecConfig().SecondsPerSlot {
t.Errorf("Expected SecondsPerSlot to be set to minimal value: %d found: %d",
params.MinimalSpecConfig().SecondsPerSlot,
params.BeaconConfig().SecondsPerSlot)
}
}

func Test_replaceHexStringWithYAMLFormat(t *testing.T) {

testLines := []struct {
line string
wanted string
}{
{
line: "ONE_BYTE: 0x41",
wanted: "ONE_BYTE: 65\n",
},
{
line: "FOUR_BYTES: 0x41414141",
wanted: "FOUR_BYTES: \n- 65\n- 65\n- 65\n- 65\n",
},
{
line: "THREE_BYTES: 0x414141",
wanted: "THREE_BYTES: \n- 65\n- 65\n- 65\n- 0\n",
},
{
line: "EIGHT_BYTES: 0x4141414141414141",
wanted: "EIGHT_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n",
},
{
line: "SIXTEEN_BYTES: 0x41414141414141414141414141414141",
wanted: "SIXTEEN_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n",
},
{
line: "TWENTY_BYTES: 0x4141414141414141414141414141414141414141",
wanted: "TWENTY_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n",
},
{
line: "THIRTY_TWO_BYTES: 0x4141414141414141414141414141414141414141414141414141414141414141",
wanted: "THIRTY_TWO_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n",
},
{
line: "FORTY_EIGHT_BYTES: 0x41414141414141414141414141414141414141414141414141414141414141414141" +
"4141414141414141414141414141",
wanted: "FORTY_EIGHT_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n",
},
{
line: "NINETY_SIX_BYTES: 0x414141414141414141414141414141414141414141414141414141414141414141414141" +
"4141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141" +
"41414141414141414141414141",
wanted: "NINETY_SIX_BYTES: \n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n" +
"- 65\n- 65\n- 65\n- 65\n- 65\n- 65\n",
},
}
for _, line := range testLines {
parts := replaceHexStringWithYAMLFormat(line.line)
res := strings.Join(parts, "\n")

if res != line.wanted {
t.Errorf("expected conversion to be: %v got: %v", line.wanted, res)
}
}
}
2 changes: 1 addition & 1 deletion beacon-chain/rpc/beacon/attestations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/gogo/protobuf/proto"
ptypes "github.com/gogo/protobuf/types"
"github.com/golang/mock/gomock"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/go-bitfield"
mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing"
Expand All @@ -27,6 +26,7 @@ import (
mockRPC "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testing"
stateTrie "github.com/prysmaticlabs/prysm/beacon-chain/state"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
"github.com/prysmaticlabs/prysm/shared/attestationutil"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/rpc/validator/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
mockPOW "github.com/prysmaticlabs/prysm/beacon-chain/powchain/testing"
beaconstate "github.com/prysmaticlabs/prysm/beacon-chain/state"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing"
dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db"
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
Expand All @@ -33,7 +34,6 @@ import (
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/trieutil"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
)

func TestGetBlock_OK(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions beacon-chain/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ var appHelpFlagGroups = []flagGroup{
cmd.ForceClearDB,
cmd.ClearDB,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
},
},
{
Expand Down
2 changes: 0 additions & 2 deletions fuzz/block_fuzz.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package fuzz

import (
Expand Down Expand Up @@ -33,4 +32,3 @@ func BeaconFuzzBlock(b []byte) ([]byte, bool) {
}
return success(post)
}

2 changes: 1 addition & 1 deletion fuzz/block_header_fuzz.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package fuzz

import (
"github.com/prysmaticlabs/go-ssz"
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
stateTrie "github.com/prysmaticlabs/prysm/beacon-chain/state"
prylabs_testing "github.com/prysmaticlabs/prysm/fuzz/testing"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/go-ssz"
)

// BeaconFuzzBlockHeader using the corpora from sigp/beacon-fuzz.
Expand Down
2 changes: 1 addition & 1 deletion fuzz/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ func success(post *stateTrie.BeaconState) ([]byte, bool) {
panic(err)
}
return result, true
}
}
5 changes: 5 additions & 0 deletions shared/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,9 @@ var (
Name: "config-file",
Usage: "The filepath to a yaml file with flag values",
}
// ChainConfigFileFlag specifies the filepath to load flag values.
ChainConfigFileFlag = &cli.StringFlag{
Name: "chain-config-file",
Usage: "The path to a YAML file with chain config values",
}
)
2 changes: 1 addition & 1 deletion shared/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type BeaconChainConfig struct {
MinValidatorWithdrawabilityDelay uint64 `yaml:"MIN_VALIDATOR_WITHDRAWABILITY_DELAY"` // MinValidatorWithdrawabilityDelay is the shortest amount of time a validator has to wait to withdraw.
PersistentCommitteePeriod uint64 `yaml:"PERSISTENT_COMMITTEE_PERIOD"` // PersistentCommitteePeriod is the minimum amount of epochs a validator must participate before exiting.
MinEpochsToInactivityPenalty uint64 `yaml:"MIN_EPOCHS_TO_INACTIVITY_PENALTY"` // MinEpochsToInactivityPenalty defines the minimum amount of epochs since finality to begin penalizing inactivity.
Eth1FollowDistance uint64 `yaml:"EPOCHS_PER_ETH1_VOTING_PERIOD"` // Eth1FollowDistance is the number of eth1.0 blocks to wait before considering a new deposit for voting. This only applies after the chain as been started.
Eth1FollowDistance uint64 // Eth1FollowDistance is the number of eth1.0 blocks to wait before considering a new deposit for voting. This only applies after the chain as been started.
SafeSlotsToUpdateJustified uint64 // SafeSlotsToUpdateJustified is the minimal slots needed to update justified check point.
SecondsPerETH1Block uint64 `yaml:"SECONDS_PER_ETH1_BLOCK"` // SecondsPerETH1Block is the approximate time for a single eth1 block to be produced.
// State list lengths
Expand Down
Loading