-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into move_opcodes_to_their_corresponding_folders_863
- Loading branch information
Showing
13 changed files
with
473 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
rust 1.80.1 | ||
# golang 1.23.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,70 @@ | ||
.PHONY: init down clean init-local-l1 down-local-l1 clean-local-l1 init-l2 down-l2 deploy-l1 deploy-block-executor deploy-inbox setup-prover | ||
.DEFAULT_GOAL := init | ||
|
||
.PHONY: help init down clean init-local-l1 down-local-l1 clean-local-l1 init-l2 down-l2 deploy-l1 deploy-block-executor deploy-inbox setup-prover | ||
|
||
L2_GENESIS_FILE_PATH=../../test_data/genesis-l2.json | ||
|
||
init: init-local-l1 contract-deps setup-prover deploy-l1 init-l2 | ||
help: ## π Show help for each of the Makefile recipes | ||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
down: down-local-l1 down-l2 | ||
init: init-local-l1 contract-deps deploy-l1 init-l2 ## π Initializes a localnet with Lambda Ethereum Rust client as both L1 and L2 | ||
|
||
clean: clean-local-l1 clean-contract-deps | ||
down: down-local-l1 down-l2 ## π Shuts down the localnet | ||
|
||
restart: restart-local-l1 restart-contract-deps restart-l2 | ||
clean: clean-contract-deps ## π§Ή Cleans the localnet | ||
|
||
# Contracts | ||
restart: restart-local-l1 restart-contract-deps restart-l2 ## π Restarts the localnet | ||
|
||
cli: ## π οΈ Builds the L2 Lambda Ethereum Rust CLI | ||
cargo build --release --manifest-path ${ETHEREUM_RUST_PATH}/cmd/ethereum_rust/Cargo.toml | ||
|
||
# Variables | ||
|
||
ETHEREUM_RUST_PATH=$(shell pwd)/../../ | ||
ETHEREUM_RUST_BIN_PATH=$(ETHEREUM_RUST_PATH)/target/release/ethereum_rust | ||
ETHEREUM_RUST_DEV_DOCKER_COMPOSE_PATH=$(ETHEREUM_RUST_PATH)/crates/blockchain/dev/docker-compose-dev.yaml | ||
|
||
FOUNDRY_PROJECT_HOME=$(shell pwd)/contracts | ||
L1_RPC_URL=http://localhost:8545 | ||
L1_PRIVATE_KEY=0x385c546456b6a603a1cfcaa9ec9494ba4832da08dd6bcf4de9a71e4a01b74924 | ||
|
||
contract-deps: | ||
mkdir -p ${FOUNDRY_PROJECT_HOME} | ||
forge install foundry-rs/forge-std --no-git --root ${FOUNDRY_PROJECT_HOME} | ||
forge install succinctlabs/sp1-contracts --no-git --root ${FOUNDRY_PROJECT_HOME} | ||
# Local L1 | ||
|
||
clean-contract-deps: | ||
rm -rf contracts/lib | ||
init-local-l1: ## π Initializes an L1 Lambda Ethereum Rust Client | ||
docker compose -f ${ETHEREUM_RUST_DEV_DOCKER_COMPOSE_PATH} up -d | ||
|
||
restart-contract-deps: clean-contract-deps contract-deps | ||
down-local-l1: ## π Shuts down the L1 Lambda Ethereum Rust Client | ||
docker compose -f ${ETHEREUM_RUST_DEV_DOCKER_COMPOSE_PATH} down | ||
|
||
deploy-l1: | ||
cd ${FOUNDRY_PROJECT_HOME} && \ | ||
forge script script/DeployL1.s.sol:DeployL1Script --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} --broadcast | ||
restart-local-l1: down-local-l1 init-local-l1 ## π Restarts the L1 Lambda Ethereum Rust Client | ||
|
||
deploy-block-executor: | ||
forge create ${FOUNDRY_PROJECT_HOME}/src/l1/OnChainOperator.sol:OnChainOperator --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} | ||
# Contracts | ||
|
||
deploy-inbox: | ||
forge create ${FOUNDRY_PROJECT_HOME}/src/l1/Inbox.sol:Inbox --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} | ||
contract-deps: ## π¦ Installs the dependencies for the L1 contracts | ||
mkdir -p ${FOUNDRY_PROJECT_HOME} | ||
forge install foundry-rs/forge-std --no-git --root ${FOUNDRY_PROJECT_HOME} || exit 0 | ||
|
||
# Local L1 | ||
clean-contract-deps: ## π§Ή Cleans the dependencies for the L1 contracts. | ||
rm -rf contracts/lib | ||
|
||
init-local-l1: | ||
mkdir -p volumes/ volumes/reth volumes/reth/data | ||
docker compose -f docker-compose-l2.yml up -d | ||
restart-contract-deps: clean-contract-deps contract-deps ## π Restarts the dependencies for the L1 contracts. | ||
|
||
down-local-l1: | ||
docker compose -f docker-compose-l2.yml down | ||
deploy-l1: ## π Deploys the L1 contracts | ||
cd ${FOUNDRY_PROJECT_HOME} && \ | ||
forge script script/DeployL1.s.sol:DeployL1Script --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} --broadcast --use $$(which solc) | ||
|
||
clean-local-l1: | ||
rm -rf volumes/ | ||
deploy-on-chain-operator: ## π Deploys the OnChainOperator contract in L1 | ||
forge create ${FOUNDRY_PROJECT_HOME}/src/l1/OnChainOperator.sol:OnChainOperator --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} | ||
|
||
restart-local-l1: down-local-l1 clean-local-l1 init-local-l1 | ||
deploy-bridge: ## π Deploys the CommonBridge contract in L1 | ||
forge create ${FOUNDRY_PROJECT_HOME}/src/l1/CommonBridge.sol:CommonBridge --rpc-url ${L1_RPC_URL} --private-key ${L1_PRIVATE_KEY} | ||
|
||
# L2 | ||
|
||
init-l2: | ||
init-l2: ## π Initializes an L2 Lambda Ethereum Rust Client | ||
cargo run --release --manifest-path ../../Cargo.toml --bin ethereum_rust --features l2 -- --network ${L2_GENESIS_FILE_PATH} --http.port 1729 | ||
|
||
down-l2: | ||
down-l2: ## π Shuts down the L2 Lambda Ethereum Rust Client | ||
pkill -f ethereum_rust || exit 0 | ||
|
||
restart-l2: down-l2 init-l2 | ||
|
||
# Prover | ||
|
||
SP1_PROGRAM_PATH=$(shell pwd)/prover/sp1/program | ||
|
||
setup-prover: | ||
cd ${SP1_PROGRAM_PATH} && \ | ||
cargo prove build | ||
restart-l2: down-l2 init-l2 ## π Restarts the L2 Lambda Ethereum Rust Client |
Oops, something went wrong.