Try   HackMD

L2 Nodes instructions

Running L2 nodes is considered safer than third-party RPC because if removes a trust element when attesting Teleport transactions. We recommend that Feed run their own nodes, but do not require it at this time.

Optimism

The Optimism project provides a set of docker-compose configurations to create a local replica node: https://github.com/ethereum-optimism/optimism/tree/develop/infra/op-replica

A replica node includes two components:

  • Data Transport Layer: Interfaces with an L1 Ethereum node to obtain L2 batch data.
  • L2Geth: The L2 node itself, to which we will be interacting with.

You will need to specify an L1 node, from which the DTL component will extract L2 batch information. Geth isn’t recommended for as an L1 node because of its poor RPC performance. We had good experience with Erigon

Note: By default, the replica node will report only transactions included in a L1 batch. This is a safe configuration that we recommend for Teleport.

Hardware requirements:

  • Storage: Currently 775GB, growing by 3-5 GB per day
  • CPU 2 cores minimum
  • RAM: 16 GB recommended

Sync:

  • 5-7 days to sync

Arbitrum

Running an Arbitrum node is very simple, as it requires only only one container, and thanks to a recent upgrade (Nitro), syncs very quickly as the chain history is very short (as of September 2022).

Follow this guide for detailed instructions.

Note: by default, the node will trust the sequencer for transaction finality. For Teleport, we recommend to configure nodes to report only transactions included in a L1 chain. To do so, set ``node.feed.input.url=""` to disable the fetching of transactions from the sequencer and use the L1 node instead.

Hardware requirements:

  • Storage: Currently 75GB, growing by 0.5GB per day
  • CPU: 2 cores minimum
  • RAM: 8 GB recommended

Example configuration:

version: "3.7"
services:
  arbitrum:
    image: offchainlabs/nitro-node:v2.0.3-9779dab

    ports:
      - "8547:8547"
      - "8548:8548"
    volumes:
      - ./data:/home/user/.arbitrum
    command:
      --l1.url=http://geth:8545
      --init.url="https://snapshot.arbitrum.io/mainnet/nitro.tar"
      --l2.chain-id=42161
      --http.api=net,web3,eth,debug
      --http.corsdomain=*
      --http.addr=0.0.0.0
      --http.vhosts=*
      --node.feed.input.url=""