Testnet

Testnet Operation Guide

Command Cheetsheet

  1. info: Get the Chain info. (RPC, bridge, explorer urls)

trh-sdk info

With this command, you can get the urls of L1 op node, bridge and block explorer. Be sure to run it from the root directory you used when deploying L2.

Chain Info

  1. update: Update L1 RPC URL (execution node and beacon node) while operating L2

With this command, you are able to update the L1 RPC url and L1 beacon url without redeploying the chain.

SDK Prompt

ℹ️ After you update the urls, you need to wait for a couple of minutes for the k8s pod re-initialization.

  1. logs: Find the logging specific pods

Basically, now SDK is logging your deployment process inside the logs directory in your root deployment directory.

logs

logs command is to check the log of a pod that is running in real time. The logs printed in real time are also saved to a file in the logs directory.

  1. version: Find the trh-sdk version. The hash value after semver will be different depending on the latest commit on the main branch.

The L2 chain deployed with SDK consists of a k8s-based cluster. So let's learn how to check and configure a k8s cluster using kubectl. Please refer to the glossary for an explanation of basic terms used in k8s.

  1. Get k8s workloads:

You can add resource name and the -o yaml option to the command will output the manifest details:

  1. Display detailed information about the workloads:

  1. Display the logs of the pod:

  1. Access the shell inside the container of the pod:

  1. View environment variables inside the pod:

  1. How to restart a pod

Pods are automatically redeployed when deleted. Alternatively, you can redeploy them using a deployment or statefulSet.

  1. How to terminate a pod

You can terminate or start pods by manually adjusting the replica of the deployment or statefulset that controls the pods.

If you're interested in learning more about the command set and related knowledge beyond the commands introduced above, please refer to the official k8s documentation.

Troubleshooting Withdrawal Delays

The advanced chain config parameters determine the rollup cycle of the batcher and proposer services, and the withdrawal delay can be changed accordingly. So in the best case, the withdrawal delay can be calculated as Max(Batch Submission Frequency, Output Root Frequency) + Challenge Period.

If you proceed without selecting the advanced configuration, the Batch Submission Frequency is set to 1440s and the Output Root Frequency is set to 240s. In this case, the withdrawal delay can be expected to be 1440s + 120s = 24m 12s.

If the withdrawal is delayed more than the expected delay, you can check the following factors:

  1. L1 Node Health: Check for rate limits or another error in the L1 node logs. If you use a third-party service, they support features to check logs in the dashboard.

  2. L1 network congestion: If the L1 network is very congested and there are too many transactions piled up in the mempool, submitted rollup transactions may not be included in the block right away.

  3. Rollup Progress: Monitor the L2OutputOracle for OutputProposed events to assess the rollup status and anticipate potential delays.

    • You can check the number of L2 blocks rolled up to date by querying the deployed L2OutputOracle contract and checking the recent rollup transactions. By comparing it with the L2 block number containing the withdrawal transaction, you can estimate any additional delays that may occur.

    Event log of OutputProposed

Manage the Secrets on AWS

The private keys of the selected batcher, proposer, and sequencer entered during the contract deployment phase are automatically entered and managed in AWS Secret Manager during the L2 infrastructure deployment. Secret Manager securely stores sensitive information such as private keys in AWS and manages them as environment variables so that they can be used dynamically by applications.

After deploying the L2 chain, you can check the secrets named ${namespace}/secrets in AWS Secret Manager > Secrets menu in the AWS Console accessed through your IAM account.

Find the Secrets with AWS Secret Manager

This menu allows administrators to view, modify, or delete the stored private keys of batcher, proposer, and sequencer.

Retrieve secret value on console

Last updated