This README is DEPRECATED. It describes an experimental setup based on Optimism, which isn't used anymore.
All following commands are to be run from the lestnetserver SSH terminal.
- ssh to the google cloud VM
lestnetserver - Make sure that the necessary software installed, check at https://docs.optimism.io/builders/chain-operators/tutorials/create-l2-rollup#software-dependencies, install missing software
- Log into gcloud from the
lestnetserverSSH terminal, https://cloud.google.com/sdk/gcloud/reference/auth/login - Clone this repository
git clone https://github.com/smart-transaction/lestnet.git cd lestnet - Install docker, you need it just once
./install_docker.sh - Run the build script
./build.sh tutorials/chain - Run the deploy script
./deploy.sh
[!IMPORTANT] Currently the build is to be done on Linux machines only due to geth build process restrictions. It doesn't support cross platform build.
- Install gcloud CLI on your workstation, https://cloud.google.com/sdk/docs/install
- Login to gcloud, https://cloud.google.com/sdk/gcloud/reference/auth/login
- Install Docker on your workstation, https://docs.docker.com/engine/install/
- Make sure that the necessary software installed, check at https://docs.optimism.io/builders/chain-operators/tutorials/create-l2-rollup#software-dependencies
- Clone this repository
git clone https://github.com/smart-transaction/lestnet.git - Run the build script
./build.sh tutorials/chain
All following commands are to be run from the lestnetserver SSH terminal.
- ssh into the google cloud VM
lestnetserver - Copy scripts install_docker.sh and deploy.sh on the gcloud vm "lestnetserver", into the home directory (there are different ways to copy files to gcloud VM, not described here)
- Run ./install_docker.sh (only first time, no need to rerun at each deployment)
- Run ./deploy.sh
The proxy configuration with certificates is located on the lestnetserver machine in the directory /etc/nginx/conf.d.
There is a connection data:
Name: Lestnet
Address: https://service.lestnet.org
Chain ID: 21363
Chain ID is to be replaced with 21363.
There is no need to build Blockscout, it's deployed from original Docker images. We only need to customize some config parameters.
- ssh to the google cloud VM
lestnetserver - Clone this repository
git clone https://github.com/smart-transaction/lestnet.git cd lestnet - Install docker, you need it just once
./install_docker.sh - Make sure docker.sock provides "all" read/write access
sudo chmod a+rw /var/run/docker.sock - Run the deploy_blockscout.ch script.
./deploy_blockscout.sh
We need to deploy L1 contracts rarely, when a new version is issued. The current version is op-contracts/v1.5.0
- Check out contracts deployment documentation, https://docs.optimism.io/builders/chain-operators/deploy/smart-contracts
- Check software dependencies, https://docs.optimism.io/builders/chain-operators/deploy/overview#software-dependencies
- Make sure the gcloud CLI is installed on your workstation, https://cloud.google.com/sdk/docs/install
- Login to gcloud, https://cloud.google.com/sdk/gcloud/reference/auth/login
- Set and export env variables
GS_ADMIN_ADDRESS=0x07FcC5862EB168711fb0A8fD259b4318E5b94B1b GS_BATCHER_ADDRESS=0x44864Bdda3C02845787e0E10C8455556Cd0b6ff5 GS_PROPOSER_ADDRESS=0x8AB2032dF58ba3eC04a173fc1B76e930D8291fA7 GS_SEQUENCER_ADDRESS=0xc78Af82ECD90d8A08Fef3bec2C920f4719B40742 L1_BLOCK_TIME=12 L1_CHAIN_ID=11155111 L1_RPC_KIND=alchemy L1_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/ICXxRS_FHofIsVaTe_LxtU9Uaqfxw8Rc L2_BLOCK_TIME=2 L2_CHAIN_ID=21363 - Generate IMPL_SALT
export IMPL_SALT=$(openssl rand -hex 32) - Make sure the following accounts have enough Sepolia ETH for deployment on the Sepolia Testnet :
Account Value GS_ADMIN_ADDRESS 0.5 Sepolia ETH GS_PROPOSER_ADDRESS 0.2 Sepolia ETH GS_BATCHER_ADDRESS 0.1 Sepolia ETH - Clone optimism repository
git clone https://github.com/ethereum-optimism/optimism.git cd optimism - Generate deployment configuration
It will save the configuration into the
cd packages/contracts-bedrock ./scripts/getting-started/config.shdeploy-config/getting-started.json - Checkout the latest verified contracts branch. Not it's
op-contracts/v1.5.0git checkout op-contracts/v1.5.0 - Export deployment env vars
export DEPLOY_CONFIG_PATH=$(pwd)/deploy-config/getting-started.json export DEPLOY_ETH_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/ICXxRS_FHofIsVaTe_LxtU9Uaqfxw8Rc export DEPLOY_PRIVATE_KEY=$(gcloud secrets versions access 1 --secret="GS_ADMIN_PRIVATE_KEY") - Run contracts deployment
pnpm build ./scripts/deploy.sh - Save contracts deployment output addresses to the lestnet repo
cp deployments/11155111-deploy.json <Lestnet Repo Directory>/getting-started-patch/.deploy - Don't forget to push a new
.deployto lestnet repo