From e8401a0adcb423a286e333856e3d7f04e8071af0 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Tue, 12 Sep 2023 14:58:01 +0100 Subject: [PATCH] renames --- .../workflows/manual-deploy-testnet-l2.yml | 22 +++++++++---------- .../workflows/manual-upgrade-testnet-l2.yml | 10 ++++----- go/config/host_config.go | 12 +++++----- go/host/container/cli.go | 8 +++---- go/host/container/cli_flags.go | 4 ++-- go/host/container/host_container.go | 2 +- go/host/container/test.toml | 2 +- go/node/cmd/cli.go | 6 ++--- go/node/cmd/cli_flags.go | 4 ++-- go/node/cmd/main.go | 2 +- go/node/config.go | 4 ++-- integration/noderunner/noderunner_test.go | 2 +- integration/simulation/network/socket.go | 2 +- testnet/launcher/docker.go | 4 ++-- .../l1contractdeployer/cmd/cli_flags.go | 2 +- .../l2contractdeployer/cmd/cli_flags.go | 2 +- 16 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index 54a24137dd..8fc377d263 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -38,8 +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_WS_RPC: ${{ steps.outputVars.outputs.L1_WS_RPC }} - L1_HTTP_RPC: ${{ steps.outputVars.outputs.L1_HTTP_RPC }} + L1_WS_URL: ${{ steps.outputVars.outputs.L1_WS_URL }} + L1_HTTP_URL: ${{ steps.outputVars.outputs.L1_HTTP_URL }} steps: @@ -63,8 +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_WS_RPC=ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV - echo "L1_HTTP_RPC=http://testnet-eth2network.uksouth.cloudapp.azure.com:8025" >> $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') }} @@ -75,8 +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_WS_RPC=ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $GITHUB_ENV - echo "L1_HTTP_RPC=http://dev-testnet-eth2network.uksouth.cloudapp.azure.com:8025" >> $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 @@ -87,8 +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_WS_RPC=${{env.L1_WS_RPC}}" >> $GITHUB_OUTPUT - echo "L1_HTTP_RPC=${{env.L1_HTTP_RPC}}" >> $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 @@ -111,7 +111,7 @@ jobs: shell: bash run: | go run ./testnet/launcher/l1contractdeployer/cmd \ - -l1_http_rpc=${{ env.L1_HTTP_RPC }} \ + -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 @@ -256,7 +256,7 @@ jobs: -node_type=${{ matrix.node_type }} \ -is_sgx_enabled=true \ -host_id=${{ secrets[matrix.node_pk_addr] }} \ - -l1_ws_rpc=${{needs.build.outputs.L1_WS_RPC}} \ + -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}} \ @@ -326,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_http_rpc=${{ needs.build.outputs.L1_HTTP_RPC }} \ + -l1_ws_url=${{ needs.build.outputs.L1_HTTP_URL }} \ -l2_ws_port=81 \ -private_key=${{ secrets.GETHNETWORK_PREFUNDED_PKSTR_WORKER }} \ -l2_private_key=8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b \ diff --git a/.github/workflows/manual-upgrade-testnet-l2.yml b/.github/workflows/manual-upgrade-testnet-l2.yml index 56c040bfab..0ece7acfc5 100644 --- a/.github/workflows/manual-upgrade-testnet-l2.yml +++ b/.github/workflows/manual-upgrade-testnet-l2.yml @@ -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_WS_RPC: ${{ steps.outputVars.outputs.L1_WS_RPC }} + L1_WS_URL: ${{ steps.outputVars.outputs.L1_WS_URL }} VM_BUILD_NUMBER: ${{ steps.outputVars.outputs.VM_BUILD_NUMBER }} steps: @@ -62,7 +62,7 @@ jobs: echo "RESOURCE_TAG_NAME=testnetlatest" >> $GITHUB_ENV echo "RESOURCE_STARTING_NAME=T" >> $GITHUB_ENV echo "RESOURCE_TESTNET_NAME=testnet" >> $GITHUB_ENV - echo "L1_WS_RPC=ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $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') }} @@ -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_WS_RPC=ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000" >> $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 @@ -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_WS_RPC=${{env.L1_WS_RPC}}" >> $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' @@ -174,7 +174,7 @@ jobs: -node_type=${{ matrix.node_type }} \ -is_sgx_enabled=true \ -host_id=${{ secrets[matrix.node_pk_addr] }} \ - -l1_ws_rpc=${{needs.build.outputs.L1_WS_RPC}} \ + -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 \ diff --git a/go/config/host_config.go b/go/config/host_config.go index d5c2e0079e..c8f0ae47e2 100644 --- a/go/config/host_config.go +++ b/go/config/host_config.go @@ -37,8 +37,8 @@ type HostInputConfig struct { P2PBindAddress string // P2PPublicAddress is the advertised P2P server address P2PPublicAddress string - // Websocket RPC address for interactions with the L1 - L1WebsocketRPCAddress string + // 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 @@ -104,7 +104,7 @@ func (p HostInputConfig) ToHostConfig() *HostConfig { EnclaveRPCAddress: p.EnclaveRPCAddress, P2PBindAddress: p.P2PBindAddress, P2PPublicAddress: p.P2PPublicAddress, - L1WebsocketRPCAddr: p.L1WebsocketRPCAddress, + L1WebsocketURL: p.L1WebsocketURL, EnclaveRPCTimeout: p.EnclaveRPCTimeout, L1RPCTimeout: p.L1RPCTimeout, P2PConnectionTimeout: p.P2PConnectionTimeout, @@ -194,8 +194,8 @@ type HostConfig struct { P2PBindAddress string // P2PPublicAddress is the advertised P2P server address P2PPublicAddress string - // The websocket RPC address for L1 requests - L1WebsocketRPCAddr string + // 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 @@ -227,7 +227,7 @@ func DefaultHostParsedConfig() *HostInputConfig { EnclaveRPCAddress: "127.0.0.1:11000", P2PBindAddress: "0.0.0.0:10000", P2PPublicAddress: "127.0.0.1:10000", - L1WebsocketRPCAddress: "ws://127.0.0.1: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, diff --git a/go/host/container/cli.go b/go/host/container/cli.go index eb8d57f4af..eb8c338213 100644 --- a/go/host/container/cli.go +++ b/go/host/container/cli.go @@ -27,7 +27,7 @@ type HostConfigToml struct { EnclaveRPCAddress string P2PBindAddress string P2PPublicAddress string - L1WebsocketRPCAddress string + L1WebsocketURL string EnclaveRPCTimeout int L1RPCTimeout int P2PConnectionTimeout int @@ -66,7 +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]) - l1WSRPCAddr := flag.String(l1WebsocketRPCAddrName, cfg.L1WebsocketRPCAddress, flagUsageMap[l1WebsocketRPCAddrName]) + 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]) @@ -110,7 +110,7 @@ func ParseConfig() (*config.HostInputConfig, error) { cfg.EnclaveRPCAddress = *enclaveRPCAddress cfg.P2PBindAddress = *p2pBindAddress cfg.P2PPublicAddress = *p2pPublicAddress - cfg.L1WebsocketRPCAddress = *l1WSRPCAddr + cfg.L1WebsocketURL = *l1WSURL cfg.EnclaveRPCTimeout = time.Duration(*enclaveRPCTimeoutSecs) * time.Second cfg.L1RPCTimeout = time.Duration(*l1RPCTimeoutSecs) * time.Second cfg.P2PConnectionTimeout = time.Duration(*p2pConnectionTimeoutSecs) * time.Second @@ -179,7 +179,7 @@ func fileBasedConfig(configPath string) (*config.HostInputConfig, error) { EnclaveRPCAddress: tomlConfig.EnclaveRPCAddress, P2PBindAddress: tomlConfig.P2PBindAddress, P2PPublicAddress: tomlConfig.P2PPublicAddress, - L1WebsocketRPCAddress: tomlConfig.L1WebsocketRPCAddress, + L1WebsocketURL: tomlConfig.L1WebsocketURL, EnclaveRPCTimeout: time.Duration(tomlConfig.EnclaveRPCTimeout) * time.Second, L1RPCTimeout: time.Duration(tomlConfig.L1RPCTimeout) * time.Second, P2PConnectionTimeout: time.Duration(tomlConfig.P2PConnectionTimeout) * time.Second, diff --git a/go/host/container/cli_flags.go b/go/host/container/cli_flags.go index c6aa1a729b..445d28124b 100644 --- a/go/host/container/cli_flags.go +++ b/go/host/container/cli_flags.go @@ -12,7 +12,7 @@ const ( enclaveRPCAddressName = "enclaveRPCAddress" p2pBindAddressName = "p2pBindAddress" p2pPublicAddressName = "p2pPublicAddress" - l1WebsocketRPCAddrName = "l1WSRPCAddress" + l1WebsocketURLName = "l1WSURL" enclaveRPCTimeoutSecsName = "enclaveRPCTimeoutSecs" l1RPCTimeoutSecsName = "l1RPCTimeoutSecs" p2pConnectionTimeoutSecsName = "p2pConnectionTimeoutSecs" @@ -50,7 +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", - l1WebsocketRPCAddrName: "The websocket RPC address the host can use for L1 requests", + 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", diff --git a/go/host/container/host_container.go b/go/host/container/host_container.go index d8041ea71d..7d45514c2d 100644 --- a/go/host/container/host_container.go +++ b/go/host/container/host_container.go @@ -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.NewEthClientFromAddress(cfg.L1WebsocketRPCAddr, cfg.L1RPCTimeout, cfg.ID, logger) + l1Client, err := ethadapter.NewEthClientFromAddress(cfg.L1WebsocketURL, cfg.L1RPCTimeout, cfg.ID, logger) if err != nil { logger.Crit("could not create Ethereum client.", log.ErrKey, err) } diff --git a/go/host/container/test.toml b/go/host/container/test.toml index 8b6e8a7664..7a56417666 100644 --- a/go/host/container/test.toml +++ b/go/host/container/test.toml @@ -10,7 +10,7 @@ EnclaveRPCTimeout = 10 P2PBindAddress = "0.0.0.0:10000" P2PPublicAddress = "127.0.0.1:10000" P2PConnectionTimeout = 777 -L1WebsocketRPCAddress = "ws://127.0.0.1:8546" +L1WebsocketURL = "ws://127.0.0.1:8546" L1RPCTimeout = 15 ManagementContractAddress = "" LogLevel = 3 diff --git a/go/node/cmd/cli.go b/go/node/cmd/cli.go index a058426000..fee04d1277 100644 --- a/go/node/cmd/cli.go +++ b/go/node/cmd/cli.go @@ -21,7 +21,7 @@ type NodeConfigCLI struct { isSGXEnabled bool enclaveDockerImage string hostDockerImage string - l1WSRPCAddr string + l1WebsocketURL string hostP2PPort int hostP2PHost string hostP2PPublicAddr string @@ -54,7 +54,7 @@ func ParseConfigCLI() *NodeConfigCLI { isSGXEnabled := flag.Bool(isSGXEnabledFlag, false, flagUsageMap[isSGXEnabledFlag]) enclaveDockerImage := flag.String(enclaveDockerImageFlag, "", flagUsageMap[enclaveDockerImageFlag]) hostDockerImage := flag.String(hostDockerImageFlag, "", flagUsageMap[hostDockerImageFlag]) - l1WSRPCAddr := flag.String(l1WSRPCAddressFlag, "ws://eth2network:9000", flagUsageMap[l1WSRPCAddressFlag]) + 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]) @@ -81,7 +81,7 @@ func ParseConfigCLI() *NodeConfigCLI { cfg.isSGXEnabled = *isSGXEnabled cfg.enclaveDockerImage = *enclaveDockerImage cfg.hostDockerImage = *hostDockerImage - cfg.l1WSRPCAddr = *l1WSRPCAddr + cfg.l1WebsocketURL = *l1WebsocketURL cfg.hostP2PPort = *hostP2PPort cfg.hostP2PHost = *hostP2PHost cfg.hostP2PPublicAddr = *hostP2PPublicAddr diff --git a/go/node/cmd/cli_flags.go b/go/node/cmd/cli_flags.go index b8c8dada08..ecba8f874e 100644 --- a/go/node/cmd/cli_flags.go +++ b/go/node/cmd/cli_flags.go @@ -9,7 +9,7 @@ const ( isSGXEnabledFlag = "is_sgx_enabled" enclaveDockerImageFlag = "enclave_docker_image" hostDockerImageFlag = "host_docker_image" - l1WSRPCAddressFlag = "l1_ws_rpc" + l1WebsocketURLFlag = "l1_ws_url" hostHTTPPortFlag = "host_http_port" hostWSPortFlag = "host_ws_port" hostP2PPortFlag = "host_p2p_port" @@ -40,7 +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", - l1WSRPCAddressFlag: "Layer 1 websocket RPC address", + l1WebsocketURLFlag: "Layer 1 websocket RPC address", hostP2PPortFlag: "Hosts p2p bound port", hostP2PPublicAddrFlag: "Hosts public p2p host.", hostP2PHostFlag: "Hosts p2p bound addr", diff --git a/go/node/cmd/main.go b/go/node/cmd/main.go index 095376ebd6..4aa3436c36 100644 --- a/go/node/cmd/main.go +++ b/go/node/cmd/main.go @@ -15,7 +15,7 @@ func main() { node.WithSGXEnabled(cliConfig.isSGXEnabled), node.WithEnclaveImage(cliConfig.enclaveDockerImage), // "local_enclave" node.WithHostImage(cliConfig.hostDockerImage), // "local_host" - node.WithL1WSRPCAddress(cliConfig.l1WSRPCAddr), // "ws://eth2network:9000" + node.WithL1WebsocketURL(cliConfig.l1WebsocketURL), // "ws://eth2network:9000" node.WithHostP2PPort(cliConfig.hostP2PPort), // 14000 node.WithHostP2PHost(cliConfig.hostP2PHost), // 0.0.0.0 node.WithHostPublicP2PAddr(cliConfig.hostP2PPublicAddr), // node public facing ip and port diff --git a/go/node/config.go b/go/node/config.go index f061599bcc..581a149ab1 100644 --- a/go/node/config.go +++ b/go/node/config.go @@ -94,7 +94,7 @@ func (c *Config) ToHostConfig() *config.HostInputConfig { cfg.P2PPublicAddress = fmt.Sprintf("127.0.0.1:%d", c.hostP2PPort) cfg.P2PBindAddress = c.hostPublicP2PAddr - cfg.L1WebsocketRPCAddress = c.l1WSRPCAddr + cfg.L1WebsocketURL = c.l1WSRPCAddr cfg.ManagementContractAddress = gethcommon.HexToAddress(c.managementContractAddr) cfg.MessageBusAddress = gethcommon.HexToAddress(c.messageBusContractAddress) cfg.LogPath = testlog.LogFile() @@ -200,7 +200,7 @@ func WithL1Start(blockHash string) Option { } } -func WithL1WSRPCAddress(addr string) Option { +func WithL1WebsocketURL(addr string) Option { return func(c *Config) { c.l1WSRPCAddr = addr } diff --git a/integration/noderunner/noderunner_test.go b/integration/noderunner/noderunner_test.go index 52a6819728..8da0b84e78 100644 --- a/integration/noderunner/noderunner_test.go +++ b/integration/noderunner/noderunner_test.go @@ -128,7 +128,7 @@ func createInMemoryNode(t *testing.T) (node.Node, gethcommon.Address) { node.WithEnclaveWSPort(_startPort+integration.DefaultEnclaveOffset), node.WithHostHTTPPort(_startPort+integration.DefaultHostRPCHTTPOffset), node.WithHostWSPort(_startPort+integration.DefaultHostRPCWSOffset), - node.WithL1WSRPCAddress(fmt.Sprintf("ws://%s:%d", _localhost, _startPort+integration.DefaultGethWSPortOffset)), + node.WithL1WebsocketURL(fmt.Sprintf("ws://%s:%d", _localhost, _startPort+integration.DefaultGethWSPortOffset)), node.WithGenesis(true), node.WithProfiler(true), ) diff --git a/integration/simulation/network/socket.go b/integration/simulation/network/socket.go index 18d6cb0b08..9aa3e4e743 100644 --- a/integration/simulation/network/socket.go +++ b/integration/simulation/network/socket.go @@ -94,7 +94,7 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat node.WithManagementContractAddress(simParams.L1SetupData.MgmtContractAddress.String()), node.WithMessageBusContractAddress(simParams.L1SetupData.MessageBusAddr.String()), node.WithNodeType(nodeTypeStr), - node.WithL1WSRPCAddress(fmt.Sprintf("ws://%s:%d", "127.0.0.1", simParams.StartPort+100)), + node.WithL1WebsocketURL(fmt.Sprintf("ws://%s:%d", "127.0.0.1", simParams.StartPort+100)), node.WithInboundP2PDisabled(isInboundP2PDisabled), node.WithLogLevel(4), node.WithDebugNamespaceEnabled(true), diff --git a/testnet/launcher/docker.go b/testnet/launcher/docker.go index ee1604ca95..6427a55df9 100644 --- a/testnet/launcher/docker.go +++ b/testnet/launcher/docker.go @@ -46,7 +46,7 @@ func (t *Testnet) Start() error { node.WithEnclaveImage(t.cfg.sequencerEnclaveDockerImage), node.WithEnclaveDebug(t.cfg.sequencerEnclaveDebug), node.WithHostImage("testnetobscuronet.azurecr.io/obscuronet/host:latest"), - node.WithL1WSRPCAddress("ws://eth2network:9000"), + node.WithL1WebsocketURL("ws://eth2network:9000"), node.WithEnclaveWSPort(11000), node.WithHostHTTPPort(80), node.WithHostWSPort(81), @@ -85,7 +85,7 @@ func (t *Testnet) Start() error { node.WithEnclaveImage(t.cfg.validatorEnclaveDockerImage), node.WithEnclaveDebug(t.cfg.validatorEnclaveDebug), node.WithHostImage("testnetobscuronet.azurecr.io/obscuronet/host:latest"), - node.WithL1WSRPCAddress("ws://eth2network:9000"), + node.WithL1WebsocketURL("ws://eth2network:9000"), node.WithEnclaveWSPort(11010), node.WithHostHTTPPort(13010), node.WithHostWSPort(13011), diff --git a/testnet/launcher/l1contractdeployer/cmd/cli_flags.go b/testnet/launcher/l1contractdeployer/cmd/cli_flags.go index 7354636fbb..a70a7985e0 100644 --- a/testnet/launcher/l1contractdeployer/cmd/cli_flags.go +++ b/testnet/launcher/l1contractdeployer/cmd/cli_flags.go @@ -2,7 +2,7 @@ package main // Flag names. const ( - l1HTTPRPCAddressFlag = "l1_http_rpc" + l1HTTPRPCAddressFlag = "l1_ws_url" privateKeyFlag = "private_key" dockerImageFlag = "docker_image" contractsEnvFileFlag = "contracts_env_file" diff --git a/testnet/launcher/l2contractdeployer/cmd/cli_flags.go b/testnet/launcher/l2contractdeployer/cmd/cli_flags.go index 35e6527ee2..1771f160f3 100644 --- a/testnet/launcher/l2contractdeployer/cmd/cli_flags.go +++ b/testnet/launcher/l2contractdeployer/cmd/cli_flags.go @@ -2,7 +2,7 @@ package main // Flag names. const ( - l1HTTPRPCAddressFlag = "l1_http_rpc" + l1HTTPRPCAddressFlag = "l1_ws_url" privateKeyFlag = "private_key" dockerImageFlag = "docker_image" l2HostFlag = "l2_host"