Skip to content

Commit

Permalink
begin prebuild genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
greg committed Aug 28, 2023
1 parent 88bddeb commit cc8c28f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
25 changes: 12 additions & 13 deletions net/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,18 @@ loadConfigFile() {

# shellcheck source=/dev/null
source "$configFile"
echo "config file: $configFile"
# [[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
# [[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
# [[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
# [[ ${#validatorIpList[@]} -gt 0 ]] || usage "Config file invalid, validatorIpList unspecified: $configFile"
# [[ ${#validatorIpListPrivate[@]} -gt 0 ]] || usage "Config file invalid, validatorIpListPrivate unspecified: $configFile"
# [[ ${#validatorIpList[@]} -eq ${#validatorIpListPrivate[@]} ]] || usage "Config file invalid, validatorIpList/validatorIpListPrivate length mismatch: $configFile"

# if $publicNetwork; then
# entrypointIp=${validatorIpList[0]}
# else
# entrypointIp=${validatorIpListPrivate[0]}
# fi
[[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
[[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
[[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
[[ ${#validatorIpList[@]} -gt 0 ]] || usage "Config file invalid, validatorIpList unspecified: $configFile"
[[ ${#validatorIpListPrivate[@]} -gt 0 ]] || usage "Config file invalid, validatorIpListPrivate unspecified: $configFile"
[[ ${#validatorIpList[@]} -eq ${#validatorIpListPrivate[@]} ]] || usage "Config file invalid, validatorIpList/validatorIpListPrivate length mismatch: $configFile"

if $publicNetwork; then
entrypointIp=${validatorIpList[0]}
else
entrypointIp=${validatorIpListPrivate[0]}
fi

# buildSshOptions
configureMetrics
Expand Down
6 changes: 6 additions & 0 deletions net/k8s-cluster/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ fn parse_matches() -> ArgMatches<'static> {
.default_value("k8s-cluster-image")
.help("Docker image tag. tag will be prepended with `bootstrap-` and `validator-` to distinguish between both images"),
)
.arg(
Arg::with_name("prebuild_genesis")
.long("prebuild-genesis")
.help("Prebuild gensis. Generates keys for validators and writes to file"),
)

.get_matches()
}

Expand Down

0 comments on commit cc8c28f

Please sign in to comment.