How to launch an Arbitrum Node using Tencent Cloud

Tencent Cloud Team
Tencent Cloud
Published in
6 min readSep 26, 2023

Arbitrum is a Layer 2 scaling solution for the Ethereum blockchain that powers fast smart contract transactions while reducing transaction costs. For Ethereum, Layer 2 solutions can scale the base Layer 1 blockchain by delegating complex computational tasks. So the Layer 2 blockchain executes the smart contract, and the Layer 1 blockchain stores the data. In order to be able to interact with or build applications on any of the Arbitrum chains, you need access to the corresponding Arbitrum node.

In this step-by-step tutorial, we will help you deploy Arbitrum nodes on Tencent Cloud.

Step ONE: Start an Ubuntu instance on Tencent Cloud

Go to the Console page, Select the Cloud Virtual Machine as shown below.

Note: If you have not created a Tencent Cloud account, create one first. For more information, see details on Tencent Cloud or contact our Sales representatives.

Step TWO: Buy VM Instance

a) Select a proper region of the cloud.

b) Click the Buy Now button.

c) On the Basic configurations, configure parameters and click Next.

d) Select an Ubuntu 20.04 64 bit Icon for OS.

e) As the official hardware requirement, you are recommended to use the CPU with 4 core, RAM 8–16GB, and 1TB Disk storage.

Step THREE: Configure the firewall.

In the Networking step, configure the public IP address and bandwidth settings, as shown in the following diagram. And the port number ‘8547’, ‘8548’ needs to be opened in the firewall for setting the Arbitrum node.

a) Click Create & security group.

b) Add the ‘8548’, ‘8547’ port rule for the Arbitrum node.

c) Click the OK Button and then click Add rule button.

d) Add an inbound rule for the 8547, 8548 port as below TCP:8547 TCP:8548

e) Remove other port numbers except 22, 80, 443, and 8547, 8548 ports.

f) Back to the creation page, select the Existing security group, and select the group we created right now

Step FOUR: Create a login key pair for VM login to ensure a high-security level.

a) Click create a new one

b) Click New in the pop-up window.

c) Input a custom name for the pair key, and click OK to download the .pem file to localhost

d) After creating key pair, go back to the instance creation page and select it

Step FIVE: Preview the configurations

In the Preview page, read and select the ‘I have read and agree to Tencent Cloud Terms of Service’. Then, click Enable.

Step SIX: Install the Arbitrum Node

a) Configure prerequisites:

  • apt install git curl build-essential cmake npm golang clang make gotestsum wabt lld-13
  • npm install — global yarn
  • ln -s /usr/bin/wasm-ld-13 /usr/local/bin/wasm-ld

b) Configure Nitro

(Currently the latest stable version is v2.0.14, you can find all releases here: https://github.com/OffchainLabs/nitro/releases)

c) Configure Node 16.19

d) Configure Rust 1.66.1

  • curl — proto ‘=https’ — tlsv1.2 -sSf https://sh.rustup.rs | sh
  • source “$HOME/.cargo/env”
  • rustup install 1.66.1
  • rustup default 1.66.1
  • rustup target add wasm32-unknown-unknown — toolchain 1.66.1
  • rustup target add wasm32-wasi — toolchain 1.66.1
  • cargo install cbindgen

e) Configure Go v1.19.5

f) Start Build

  • make target/bin/nitro target/bin/relay

Step Seven: Run the Arbitrum Node

a) You can find all commands line options by running “./nitro -h

b) Run the node (You can change the chain state dir by — persistent.chain string)

  • For Arbitrum One: ./nitro — l1.url ${Your_l1_rpc} — l2.chain-id=42161 — http.api=net,web3,eth,debug — http.corsdomain=* — http.addr=0.0.0.0 — http.vhosts=*
  • For Arbitrum Nova: ./nitro — l1.url ${Your_l1_rpc} — l2.chain-id=42170 — http.api=net,web3,eth,debug — http.corsdomain=* — http.addr=0.0.0.0 — http.vhosts=*

Noted if you are the first time to start arb1, you should add — init.url ${url}, you can find all useful snapshot here (also can be useful for arbitrum nova): https://snapshot.arbitrum.foundation/index.html

If you want to use ws to connect to your node, you need add:

  • — ws.port=8548
  • — ws.addr=0.0.0.0
  • — ws.origins=*

It now start syncing, you can see the logs or use the command below to check the syncing status.

Step Seven: Verify the connection

a) To check your node is syncing or not:

  • curl localhost:8547 -X POST -H “Content-Type: application/json” — data ‘{“jsonrpc”:”2.0",”method”:”eth_syncing”,”params”:[],”id”:1}’

The results will show you the sync information, if it returns false, it means your node is not syncing (In most case mean your node finish syncing and catch up to the latest state)

b) To check your node’s current block number:

  • curl localhost:8547 -X POST -H “Content-Type: application/json” — data ‘{“jsonrpc”:”2.0",”method”:”eth_blockNumber,”params”:[],”id”:2}’

See all rpc methods here: https://ethereum.org/en/developers/docs/apis/json-rpc/

Arbitrum docs: https://developer.arbitrum.io/

Arbitrum SDK: https://developer.arbitrum.io/sdk

If you want to run your Arbitrum node in the background, do not shut it off when you close the terminal program. Run the following methods if you want keep it running in the background.

  • run node with nohup command;
  • run node with pm2;
  • run node in a screen tools;

nohup and screen are equipped with ubuntu, however pm2 needs to be installed by yourself.

Author: Hang Zhang

Hang Zhang is a Principal Solution Architect of Tencent Cloud. He is taking charge of business development of Tencent Cloud International in Canada, and focusing on Go-China & Gaming strategy for companies headquartered in Canada.

--

--

Tencent Cloud Team
Tencent Cloud

Tencent Cloud technical team has the experience with global customers, and wants to share the best practices.