Skip to content

Commit

Permalink
Change config to use RPC urls instead of host and port (#1512)
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel authored Sep 13, 2023
1 parent 764f98d commit b7b4e3e
Show file tree
Hide file tree
Showing 31 changed files with 112 additions and 181 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/manual-deploy-testnet-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
RESOURCE_TAG_NAME: ${{ steps.outputVars.outputs.RESOURCE_TAG_NAME }}
RESOURCE_STARTING_NAME: ${{ steps.outputVars.outputs.RESOURCE_STARTING_NAME }}
RESOURCE_TESTNET_NAME: ${{ steps.outputVars.outputs.RESOURCE_TESTNET_NAME }}
L1_HOST: ${{ steps.outputVars.outputs.L1_HOST }}
L1_WS_URL: ${{ steps.outputVars.outputs.L1_WS_URL }}
L1_HTTP_URL: ${{ steps.outputVars.outputs.L1_HTTP_URL }}


steps:
Expand All @@ -62,7 +63,8 @@ jobs:
echo "RESOURCE_TAG_NAME=testnetlatest" >> $GITHUB_ENV
echo "RESOURCE_STARTING_NAME=T" >> $GITHUB_ENV
echo "RESOURCE_TESTNET_NAME=testnet" >> $GITHUB_ENV
echo "L1_HOST=testnet-eth2network.uksouth.cloudapp.azure.com" >> $GITHUB_ENV
echo "L1_WS_URL=ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV
echo "L1_HTTP_URL=http://testnet-eth2network.uksouth.cloudapp.azure.com:8025" >> $GITHUB_ENV
- name: 'Sets env vars for dev-testnet'
if: ${{ (github.event.inputs.testnet_type == 'dev-testnet') }}
Expand All @@ -73,7 +75,8 @@ jobs:
echo "RESOURCE_TAG_NAME=devtestnetlatest" >> $GITHUB_ENV
echo "RESOURCE_STARTING_NAME=D" >> $GITHUB_ENV
echo "RESOURCE_TESTNET_NAME=devtestnet" >> $GITHUB_ENV
echo "L1_HOST=dev-testnet-eth2network.uksouth.cloudapp.azure.com" >> $GITHUB_ENV
echo "L1_WS_URL=ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV
echo "L1_HTTP_URL=http://dev-testnet-eth2network.uksouth.cloudapp.azure.com:8025" >> $GITHUB_ENV
- name: 'Output env vars'
id: outputVars
Expand All @@ -84,7 +87,8 @@ jobs:
echo "RESOURCE_TAG_NAME=${{env.RESOURCE_TAG_NAME}}" >> $GITHUB_OUTPUT
echo "RESOURCE_STARTING_NAME=${{env.RESOURCE_STARTING_NAME}}" >> $GITHUB_OUTPUT
echo "RESOURCE_TESTNET_NAME=${{env.RESOURCE_TESTNET_NAME}}" >> $GITHUB_OUTPUT
echo "L1_HOST=${{env.L1_HOST}}" >> $GITHUB_OUTPUT
echo "L1_WS_URL=${{env.L1_WS_URL}}" >> $GITHUB_OUTPUT
echo "L1_HTTP_URL=${{env.L1_HTTP_URL}}" >> $GITHUB_OUTPUT
- name: 'Login to Azure docker registry'
uses: azure/docker-login@v1
Expand All @@ -107,7 +111,7 @@ jobs:
shell: bash
run: |
go run ./testnet/launcher/l1contractdeployer/cmd \
-l1_host=${{ env.L1_HOST }} \
-l1_ws_url=${{ env.L1_HTTP_URL }} \
-private_key=${{ secrets.GETHNETWORK_PREFUNDED_PKSTR_WORKER }} \
-docker_image=${{env.L2_HARDHATDEPLOYER_DOCKER_BUILD_TAG}} \
-contracts_env_file=./testnet/.env
Expand Down Expand Up @@ -252,7 +256,7 @@ jobs:
-node_type=${{ matrix.node_type }} \
-is_sgx_enabled=true \
-host_id=${{ secrets[matrix.node_pk_addr] }} \
-l1_host=${{needs.build.outputs.L1_HOST}} \
-l1_ws_url=${{needs.build.outputs.L1_WS_URL}} \
-management_contract_addr=${{needs.build.outputs.MGMT_CONTRACT_ADDR}} \
-message_bus_contract_addr=${{needs.build.outputs.MSG_BUS_CONTRACT_ADDR}} \
-l1_start=${{needs.build.outputs.L1_START_HASH}} \
Expand Down Expand Up @@ -322,7 +326,7 @@ jobs:
run: |
go run ./testnet/launcher/l2contractdeployer/cmd \
-l2_host=obscuronode-0-${{needs.build.outputs.RESOURCE_TESTNET_NAME}}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com \
-l1_host=${{ needs.build.outputs.L1_HOST }} \
-l1_ws_url=${{ needs.build.outputs.L1_HTTP_URL }} \
-l2_ws_port=81 \
-private_key=${{ secrets.GETHNETWORK_PREFUNDED_PKSTR_WORKER }} \
-l2_private_key=8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/manual-upgrade-testnet-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
RESOURCE_TAG_NAME: ${{ steps.outputVars.outputs.RESOURCE_TAG_NAME }}
RESOURCE_STARTING_NAME: ${{ steps.outputVars.outputs.RESOURCE_STARTING_NAME }}
RESOURCE_TESTNET_NAME: ${{ steps.outputVars.outputs.RESOURCE_TESTNET_NAME }}
L1_HOST: ${{ steps.outputVars.outputs.L1_HOST }}
L1_WS_URL: ${{ steps.outputVars.outputs.L1_WS_URL }}
VM_BUILD_NUMBER: ${{ steps.outputVars.outputs.VM_BUILD_NUMBER }}

steps:
Expand All @@ -62,8 +62,8 @@ jobs:
echo "RESOURCE_TAG_NAME=testnetlatest" >> $GITHUB_ENV
echo "RESOURCE_STARTING_NAME=T" >> $GITHUB_ENV
echo "RESOURCE_TESTNET_NAME=testnet" >> $GITHUB_ENV
echo "L1_HOST=testnet-eth2network.uksouth.cloudapp.azure.com" >> $GITHUB_ENV
echo "L1_WS_URL=ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV
- name: 'Sets env vars for dev-testnet'
if: ${{ (github.event.inputs.testnet_type == 'dev-testnet') || (github.event_name == 'schedule') }}
run: |
Expand All @@ -72,7 +72,7 @@ jobs:
echo "RESOURCE_TAG_NAME=devtestnetlatest" >> $GITHUB_ENV
echo "RESOURCE_STARTING_NAME=D" >> $GITHUB_ENV
echo "RESOURCE_TESTNET_NAME=devtestnet" >> $GITHUB_ENV
echo "L1_HOST=dev-testnet-eth2network.uksouth.cloudapp.azure.com" >> $GITHUB_ENV
echo "L1_WS_URL=ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV
- name: 'Fetch latest VM hostnames by env tag and extract build number'
id: fetch_hostnames
Expand All @@ -95,7 +95,7 @@ jobs:
echo "RESOURCE_TAG_NAME=${{env.RESOURCE_TAG_NAME}}" >> $GITHUB_OUTPUT
echo "RESOURCE_STARTING_NAME=${{env.RESOURCE_STARTING_NAME}}" >> $GITHUB_OUTPUT
echo "RESOURCE_TESTNET_NAME=${{env.RESOURCE_TESTNET_NAME}}" >> $GITHUB_OUTPUT
echo "L1_HOST=${{env.L1_HOST}}" >> $GITHUB_OUTPUT
echo "L1_WS_URL=${{env.L1_WS_URL}}" >> $GITHUB_OUTPUT
echo "VM_BUILD_NUMBER=${{env.VM_BUILD_NUMBER}}" >> $GITHUB_OUTPUT
- name: 'Login to Azure docker registry'
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
-node_type=${{ matrix.node_type }} \
-is_sgx_enabled=true \
-host_id=${{ secrets[matrix.node_pk_addr] }} \
-l1_host=${{needs.build.outputs.L1_HOST}} \
-l1_ws_url=${{needs.build.outputs.L1_WS_URL}} \
-private_key=${{ secrets[matrix.node_pk_str] }} \
-sequencer_id=${{ secrets.GETHNETWORK_PREFUNDED_ADDR_0 }} \
-host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{needs.build.outputs.RESOURCE_TESTNET_NAME}}-${{needs.build.outputs.VM_BUILD_NUMBER}}.uksouth.cloudapp.azure.com:10000 \
Expand Down
18 changes: 6 additions & 12 deletions go/config/host_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ type HostInputConfig struct {
P2PBindAddress string
// P2PPublicAddress is the advertised P2P server address
P2PPublicAddress string
// The host of the connected L1 node
L1NodeHost string
// The websocket port of the connected L1 node
L1NodeWebsocketPort uint
// L1WebsocketURL is the RPC address for interactions with the L1
L1WebsocketURL string
// Timeout duration for RPC requests to the enclave service
EnclaveRPCTimeout time.Duration
// Timeout duration for connecting to, and communicating with, the L1 node
Expand Down Expand Up @@ -106,8 +104,7 @@ func (p HostInputConfig) ToHostConfig() *HostConfig {
EnclaveRPCAddress: p.EnclaveRPCAddress,
P2PBindAddress: p.P2PBindAddress,
P2PPublicAddress: p.P2PPublicAddress,
L1NodeHost: p.L1NodeHost,
L1NodeWebsocketPort: p.L1NodeWebsocketPort,
L1WebsocketURL: p.L1WebsocketURL,
EnclaveRPCTimeout: p.EnclaveRPCTimeout,
L1RPCTimeout: p.L1RPCTimeout,
P2PConnectionTimeout: p.P2PConnectionTimeout,
Expand Down Expand Up @@ -197,10 +194,8 @@ type HostConfig struct {
P2PBindAddress string
// P2PPublicAddress is the advertised P2P server address
P2PPublicAddress string
// The host of the connected L1 node
L1NodeHost string
// The websocket port of the connected L1 node
L1NodeWebsocketPort uint
// L1WebsocketURL is the RPC address for interactions with the L1
L1WebsocketURL string
// Timeout duration for RPC requests to the enclave service
EnclaveRPCTimeout time.Duration
// Timeout duration for connecting to, and communicating with, the L1 node
Expand Down Expand Up @@ -232,8 +227,7 @@ func DefaultHostParsedConfig() *HostInputConfig {
EnclaveRPCAddress: "127.0.0.1:11000",
P2PBindAddress: "0.0.0.0:10000",
P2PPublicAddress: "127.0.0.1:10000",
L1NodeHost: "127.0.0.1",
L1NodeWebsocketPort: 8546,
L1WebsocketURL: "ws://127.0.0.1:8546",
EnclaveRPCTimeout: time.Duration(defaultRPCTimeoutSecs) * time.Second,
L1RPCTimeout: time.Duration(defaultL1RPCTimeoutSecs) * time.Second,
P2PConnectionTimeout: time.Duration(defaultP2PTimeoutSecs) * time.Second,
Expand Down
53 changes: 20 additions & 33 deletions go/ethadapter/geth_rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,46 +31,33 @@ const (

// gethRPCClient implements the EthClient interface and allows connection to a real ethereum node
type gethRPCClient struct {
client *ethclient.Client // the underlying eth rpc client
l2ID gethcommon.Address // the address of the Obscuro node this client is dedicated to
timeout time.Duration // the timeout for connecting to, or communicating with, the L1 node
logger gethlog.Logger
rpcAddress string
client *ethclient.Client // the underlying eth rpc client
l2ID gethcommon.Address // the address of the Obscuro node this client is dedicated to
timeout time.Duration // the timeout for connecting to, or communicating with, the L1 node
logger gethlog.Logger
rpcURL string
}

// NewEthClientFromAddress instantiates a new ethadapter.EthClient that connects to an ethereum node
func NewEthClientFromAddress(rpcAddress string, timeout time.Duration, l2ID gethcommon.Address, logger gethlog.Logger) (EthClient, error) {
client, err := connect(rpcAddress, timeout)
// NewEthClientFromURL instantiates a new ethadapter.EthClient that connects to an ethereum node
func NewEthClientFromURL(rpcURL string, timeout time.Duration, l2ID gethcommon.Address, logger gethlog.Logger) (EthClient, error) {
client, err := connect(rpcURL, timeout)
if err != nil {
return nil, fmt.Errorf("unable to connect to the eth node (%s) - %w", rpcAddress, err)
return nil, fmt.Errorf("unable to connect to the eth node (%s) - %w", rpcURL, err)
}

logger.Trace(fmt.Sprintf("Initialized eth node connection - addr: %s", rpcAddress))
logger.Trace(fmt.Sprintf("Initialized eth node connection - addr: %s", rpcURL))
return &gethRPCClient{
client: client,
l2ID: l2ID,
timeout: timeout,
logger: logger,
rpcAddress: rpcAddress,
client: client,
l2ID: l2ID,
timeout: timeout,
logger: logger,
rpcURL: rpcURL,
}, nil
}

// NewEthClient instantiates a new ethadapter.EthClient that connects to an ethereum node
func NewEthClient(ipaddress string, port uint, timeout time.Duration, l2ID gethcommon.Address, logger gethlog.Logger) (EthClient, error) {
rpcAddress := fmt.Sprintf("ws://%s:%d", ipaddress, port)
client, err := connect(rpcAddress, timeout)
if err != nil {
return nil, fmt.Errorf("unable to connect to the eth node (%s) - %w", rpcAddress, err)
}

logger.Trace(fmt.Sprintf("Initialized eth node connection - addr: %s port: %d", ipaddress, port))
return &gethRPCClient{
client: client,
l2ID: l2ID,
timeout: timeout,
logger: logger.New(log.PackageKey, "gethrpcclient"),
rpcAddress: rpcAddress,
}, nil
return NewEthClientFromURL(fmt.Sprintf("ws://%s:%d", ipaddress, port), timeout, l2ID, logger)
}

func (e *gethRPCClient) FetchHeadBlock() (*types.Block, error) {
Expand Down Expand Up @@ -271,9 +258,9 @@ func (e *gethRPCClient) ReconnectIfClosed() error {
}
e.client.Close()

client, err := connect(e.rpcAddress, e.timeout)
client, err := connect(e.rpcURL, e.timeout)
if err != nil {
return fmt.Errorf("unable to connect to the eth node (%s) - %w", e.rpcAddress, err)
return fmt.Errorf("unable to connect to the eth node (%s) - %w", e.rpcURL, err)
}
e.client = client
return nil
Expand All @@ -289,11 +276,11 @@ func (e *gethRPCClient) Alive() bool {
return err == nil
}

func connect(rpcAddress string, connectionTimeout time.Duration) (*ethclient.Client, error) {
func connect(rpcURL string, connectionTimeout time.Duration) (*ethclient.Client, error) {
var err error
var c *ethclient.Client
for start := time.Now(); time.Since(start) < connectionTimeout; time.Sleep(time.Second) {
c, err = ethclient.Dial(rpcAddress)
c, err = ethclient.Dial(rpcURL)
if err == nil {
break
}
Expand Down
12 changes: 4 additions & 8 deletions go/host/container/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ type HostConfigToml struct {
EnclaveRPCAddress string
P2PBindAddress string
P2PPublicAddress string
L1NodeHost string
L1NodeWebsocketPort uint
L1WebsocketURL string
EnclaveRPCTimeout int
L1RPCTimeout int
P2PConnectionTimeout int
Expand Down Expand Up @@ -67,8 +66,7 @@ func ParseConfig() (*config.HostInputConfig, error) {
enclaveRPCAddress := flag.String(enclaveRPCAddressName, cfg.EnclaveRPCAddress, flagUsageMap[enclaveRPCAddressName])
p2pBindAddress := flag.String(p2pBindAddressName, cfg.P2PBindAddress, flagUsageMap[p2pBindAddressName])
p2pPublicAddress := flag.String(p2pPublicAddressName, cfg.P2PPublicAddress, flagUsageMap[p2pPublicAddressName])
l1NodeHost := flag.String(l1NodeHostName, cfg.L1NodeHost, flagUsageMap[l1NodeHostName])
l1NodePort := flag.Uint64(l1NodePortName, uint64(cfg.L1NodeWebsocketPort), flagUsageMap[l1NodePortName])
l1WSURL := flag.String(l1WebsocketURLName, cfg.L1WebsocketURL, flagUsageMap[l1WebsocketURLName])
enclaveRPCTimeoutSecs := flag.Uint64(enclaveRPCTimeoutSecsName, uint64(cfg.EnclaveRPCTimeout.Seconds()), flagUsageMap[enclaveRPCTimeoutSecsName])
l1RPCTimeoutSecs := flag.Uint64(l1RPCTimeoutSecsName, uint64(cfg.L1RPCTimeout.Seconds()), flagUsageMap[l1RPCTimeoutSecsName])
p2pConnectionTimeoutSecs := flag.Uint64(p2pConnectionTimeoutSecsName, uint64(cfg.P2PConnectionTimeout.Seconds()), flagUsageMap[p2pConnectionTimeoutSecsName])
Expand Down Expand Up @@ -112,8 +110,7 @@ func ParseConfig() (*config.HostInputConfig, error) {
cfg.EnclaveRPCAddress = *enclaveRPCAddress
cfg.P2PBindAddress = *p2pBindAddress
cfg.P2PPublicAddress = *p2pPublicAddress
cfg.L1NodeHost = *l1NodeHost
cfg.L1NodeWebsocketPort = uint(*l1NodePort)
cfg.L1WebsocketURL = *l1WSURL
cfg.EnclaveRPCTimeout = time.Duration(*enclaveRPCTimeoutSecs) * time.Second
cfg.L1RPCTimeout = time.Duration(*l1RPCTimeoutSecs) * time.Second
cfg.P2PConnectionTimeout = time.Duration(*p2pConnectionTimeoutSecs) * time.Second
Expand Down Expand Up @@ -182,8 +179,7 @@ func fileBasedConfig(configPath string) (*config.HostInputConfig, error) {
EnclaveRPCAddress: tomlConfig.EnclaveRPCAddress,
P2PBindAddress: tomlConfig.P2PBindAddress,
P2PPublicAddress: tomlConfig.P2PPublicAddress,
L1NodeHost: tomlConfig.L1NodeHost,
L1NodeWebsocketPort: tomlConfig.L1NodeWebsocketPort,
L1WebsocketURL: tomlConfig.L1WebsocketURL,
EnclaveRPCTimeout: time.Duration(tomlConfig.EnclaveRPCTimeout) * time.Second,
L1RPCTimeout: time.Duration(tomlConfig.L1RPCTimeout) * time.Second,
P2PConnectionTimeout: time.Duration(tomlConfig.P2PConnectionTimeout) * time.Second,
Expand Down
6 changes: 2 additions & 4 deletions go/host/container/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const (
enclaveRPCAddressName = "enclaveRPCAddress"
p2pBindAddressName = "p2pBindAddress"
p2pPublicAddressName = "p2pPublicAddress"
l1NodeHostName = "l1NodeHost"
l1NodePortName = "l1NodePort"
l1WebsocketURLName = "l1WSURL"
enclaveRPCTimeoutSecsName = "enclaveRPCTimeoutSecs"
l1RPCTimeoutSecsName = "l1RPCTimeoutSecs"
p2pConnectionTimeoutSecsName = "p2pConnectionTimeoutSecs"
Expand Down Expand Up @@ -51,8 +50,7 @@ func getFlagUsageMap() map[string]string {
enclaveRPCAddressName: "The address to use to connect to the Obscuro enclave service",
p2pBindAddressName: "The address where the p2p server is bound to. Defaults to 0.0.0.0:10000",
p2pPublicAddressName: "The P2P address where the other servers should connect to. Defaults to 127.0.0.1:10000",
l1NodeHostName: "The network host on which to connect to the Ethereum client",
l1NodePortName: "The port on which to connect to the Ethereum client",
l1WebsocketURLName: "The websocket RPC address the host can use for L1 requests",
enclaveRPCTimeoutSecsName: "The timeout for host <-> enclave RPC communication",
l1RPCTimeoutSecsName: "The timeout for connecting to, and communicating with, the Ethereum client",
p2pConnectionTimeoutSecsName: "The timeout for host <-> host P2P messaging",
Expand Down
2 changes: 1 addition & 1 deletion go/host/container/host_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func NewHostContainerFromConfig(parsedConfig *config.HostInputConfig, logger get
ethWallet := wallet.NewInMemoryWalletFromConfig(cfg.PrivateKeyString, cfg.L1ChainID, log.New("wallet", cfg.LogLevel, cfg.LogPath))

fmt.Println("Connecting to L1 network...")
l1Client, err := ethadapter.NewEthClient(cfg.L1NodeHost, cfg.L1NodeWebsocketPort, cfg.L1RPCTimeout, cfg.ID, logger)
l1Client, err := ethadapter.NewEthClientFromURL(cfg.L1WebsocketURL, cfg.L1RPCTimeout, cfg.ID, logger)
if err != nil {
logger.Crit("could not create Ethereum client.", log.ErrKey, err)
}
Expand Down
3 changes: 1 addition & 2 deletions go/host/container/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ EnclaveRPCTimeout = 10
P2PBindAddress = "0.0.0.0:10000"
P2PPublicAddress = "127.0.0.1:10000"
P2PConnectionTimeout = 777
L1NodeHost = "127.0.0.1"
L1NodeWebsocketPort = 8546
L1WebsocketURL = "ws://127.0.0.1:8546"
L1RPCTimeout = 15
ManagementContractAddress = ""
LogLevel = 3
Expand Down
9 changes: 3 additions & 6 deletions go/node/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ type NodeConfigCLI struct {
isSGXEnabled bool
enclaveDockerImage string
hostDockerImage string
l1Host string
l1WSPort int
l1WebsocketURL string
hostP2PPort int
hostP2PHost string
hostP2PPublicAddr string
Expand Down Expand Up @@ -55,8 +54,7 @@ func ParseConfigCLI() *NodeConfigCLI {
isSGXEnabled := flag.Bool(isSGXEnabledFlag, false, flagUsageMap[isSGXEnabledFlag])
enclaveDockerImage := flag.String(enclaveDockerImageFlag, "", flagUsageMap[enclaveDockerImageFlag])
hostDockerImage := flag.String(hostDockerImageFlag, "", flagUsageMap[hostDockerImageFlag])
l1Host := flag.String(l1HostFlag, "eth2network", flagUsageMap[l1HostFlag])
l1WSPort := flag.Int(l1WSPortFlag, 9000, flagUsageMap[l1WSPortFlag])
l1WebsocketURL := flag.String(l1WebsocketURLFlag, "ws://eth2network:9000", flagUsageMap[l1WebsocketURLFlag])
hostP2PPort := flag.Int(hostP2PPortFlag, 14000, flagUsageMap[hostP2PPortFlag])
hostP2PHost := flag.String(hostP2PHostFlag, "0.0.0.0", flagUsageMap[hostP2PHostFlag])
hostP2PPublicAddr := flag.String(hostP2PPublicAddrFlag, "", flagUsageMap[hostP2PPublicAddrFlag])
Expand All @@ -83,8 +81,7 @@ func ParseConfigCLI() *NodeConfigCLI {
cfg.isSGXEnabled = *isSGXEnabled
cfg.enclaveDockerImage = *enclaveDockerImage
cfg.hostDockerImage = *hostDockerImage
cfg.l1Host = *l1Host
cfg.l1WSPort = *l1WSPort
cfg.l1WebsocketURL = *l1WebsocketURL
cfg.hostP2PPort = *hostP2PPort
cfg.hostP2PHost = *hostP2PHost
cfg.hostP2PPublicAddr = *hostP2PPublicAddr
Expand Down
6 changes: 2 additions & 4 deletions go/node/cmd/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const (
isSGXEnabledFlag = "is_sgx_enabled"
enclaveDockerImageFlag = "enclave_docker_image"
hostDockerImageFlag = "host_docker_image"
l1HostFlag = "l1_host"
l1WSPortFlag = "l1_ws_port"
l1WebsocketURLFlag = "l1_ws_url"
hostHTTPPortFlag = "host_http_port"
hostWSPortFlag = "host_ws_port"
hostP2PPortFlag = "host_p2p_port"
Expand Down Expand Up @@ -41,8 +40,7 @@ func getFlagUsageMap() map[string]string {
isSGXEnabledFlag: "Whether the it should run on an SGX is enabled CPU",
enclaveDockerImageFlag: "Docker image for the enclave",
hostDockerImageFlag: "Docker image for the host",
l1HostFlag: "Layer 1 network host addr",
l1WSPortFlag: "Layer 1 network WebSocket port",
l1WebsocketURLFlag: "Layer 1 websocket RPC address",
hostP2PPortFlag: "Hosts p2p bound port",
hostP2PPublicAddrFlag: "Hosts public p2p host.",
hostP2PHostFlag: "Hosts p2p bound addr",
Expand Down
Loading

0 comments on commit b7b4e3e

Please sign in to comment.