Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jc/update protocol v2 #4

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,32 @@ print(int(a+b), end="")
},
),
)

plan.add_service(
name = "preconf-pytest",
description = "Launching preconf pytest",
config = ServiceConfig(
image = "nethsurge/test-pytest",
env_vars = {
"L1_RPC_URL": all_el_contexts[0].rpc_http_url,
"L2_RPC_URL_NODE1": taiko_stack_1.rpc_http_url,
"L2_RPC_URL_NODE2": taiko_stack_2.rpc_http_url,
"TEST_L2_PREFUNDED_PRIVATE_KEY": "0x370e47f3c39cf4d03cb87cb71a268776421cdc22c39aa81f1e5ba19df19202f1",
}
),
)

pytest_result = plan.exec(
service_name = "preconf-pytest",
description = "Running preconf pytest",
recipe = ExecRecipe(
command = [
"pytest"
],
),
)

plan.print(pytest_result["output"])
else:
fail("Invalid additional service %s" % (additional_service))
if launch_prometheus_grafana:
Expand Down
8 changes: 0 additions & 8 deletions src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
taiko_contract_deployer = import_module("./taiko.star")
eigenlayer_contract_deployer = import_module("./eigenlayer_mvp.star")
avs_contract_deployer = import_module("./preconf_avs.star")
sequencer_contract_deployer = import_module("./sequencer.star")

def deploy(
plan,
Expand Down Expand Up @@ -50,13 +49,6 @@ print(new, end="")
first_prefunded_account,
)

# Deploy add to sequencer contracts
sequencer_contract_deployer.deploy(
plan,
el_rpc_url,
first_prefunded_account,
)

# Transfer taiko tokens
transfer_result = plan.add_service(
name = "taiko-transfer",
Expand Down
8 changes: 4 additions & 4 deletions src/contracts/eigenlayer_mvp.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ def deploy(
eigenlayer_mvp = plan.run_sh(
name="deploy-eigenlayer-contract",
description="Deploying eigenlayer mvp contract",
run="scripts/deployment/deploy_eigenlayer_mvp.sh > /tmp/eigenlayer-mvp-output.txt",
run="scripts/deployment/deploy_eigenlayer_mvp.sh",
image="nethswitchboard/avs-deploy:e2e",
env_vars = {
"PRIVATE_KEY": "0x{0}".format(contract_owner.private_key),
"FORK_URL": el_rpc_url,
},
wait=None,
store=[
"/tmp/eigenlayer-mvp-output.txt"
],
# store=[
# "/tmp/eigenlayer-mvp-output.txt"
# ],
)
16 changes: 8 additions & 8 deletions src/contracts/preconf_avs.star
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ def deploy(
preconf_avs = plan.run_sh(
name="deploy-preconf-avs-contract",
description="Deploying preconf avs contract",
run="scripts/deployment/deploy_avs.sh > /tmp/avs-output.txt",
run="scripts/deployment/deploy_avs.sh",
image="nethswitchboard/avs-deploy:e2e",
env_vars = {
"PRIVATE_KEY": "0x{0}".format(contract_owner.private_key),
"FORK_URL": el_rpc_url,
"BEACON_GENESIS_TIMESTAMP": beacon_genesis_timestamp,
"BEACON_BLOCK_ROOT_CONTRACT": "0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02",
"SLASHER": "0x86A0679C7987B5BA9600affA994B78D0660088ff",
"AVS_DIRECTORY": "0x7E2E7DD2Aead92e2e6d05707F21D4C36004f8A2B",
"TAIKO_L1": "0x086f77C5686dfe3F2f8FE487C5f8d357952C8556",
"TAIKO_TOKEN": "0x422A3492e218383753D8006C7Bfa97815B44373F",
"SLASHER": "0xDeeea509217cACA34A4f42ae76B046F263b06494",
"AVS_DIRECTORY": "0xa3027Ac27EF8Ec6C3F2863Deb1D4e84a433F69Fc",
"TAIKO_L1": "0x57E5d642648F54973e504f10D21Ea06360151cAf",
"TAIKO_TOKEN": "0x72ae2643518179cF01bcA3278a37ceAD408DE8b2",
},
wait=None,
store=[
"/tmp/avs-output.txt"
],
# store=[
# "/tmp/avs-output.txt"
# ],
)
22 changes: 0 additions & 22 deletions src/contracts/sequencer.star

This file was deleted.

45 changes: 37 additions & 8 deletions src/contracts/taiko.star
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
TAIKO_SCRIPT_PATH = "./script/layer1/DeployProtocolOnL1.s.sol:DeployProtocolOnL1"
TOKEN_SCRIPT_PATH = "./script/layer1/DeployTaikoToken.s.sol:DeployTaikoToken"

def deploy(
plan,
el_rpc_url,
contract_owner,
):
taiko = plan.run_sh(
FORK_URL_COMMAND = "--fork-url {0}".format(el_rpc_url)

PRIVATE_KEY_COMMAND = "--private-key {0}".format(contract_owner.private_key)

plan.run_sh(
name="deploy-taiko-contract",
run="script/test_deploy_on_l1.sh > /tmp/taiko-output.txt",
image="nethswitchboard/taiko-deploy:e2e",
run="forge script {0} {1} {2} $FORGE_FLAGS".format(TAIKO_SCRIPT_PATH, PRIVATE_KEY_COMMAND, FORK_URL_COMMAND),
# image="nethswitchboard/taiko-deploy:e2e",
image="nethsurge/test-protocol",
env_vars={
"FOUNDRY_PROFILE": "layer1",
"PRIVATE_KEY": "0x{0}".format(contract_owner.private_key),
"PROPOSER": "0x0000000000000000000000000000000000000000",
"TAIKO_TOKEN": "0x0000000000000000000000000000000000000000",
Expand All @@ -19,20 +28,40 @@ def deploy(
"PROVER_SET_ADMIN": contract_owner.address,
"TAIKO_TOKEN_PREMINT_RECIPIENT": contract_owner.address,
"TAIKO_TOKEN_NAME": "Taiko Token",
"TAIKO_TOKEN_SYMBOL": "TKO",
"TAIKO_TOKEN_SYMBOL": "TAIKO",
"SHARED_ADDRESS_MANAGER": "0x0000000000000000000000000000000000000000",
# "L2_GENESIS_HASH": "0x7983c69e31da54b8d244d8fef4714ee7a8ed25d873ebef204a56f082a73c9f1e",
"L2_GENESIS_HASH": "0x25637bb83541ecc694ada7e12ece3e77a64db154e277fc5caae59989e3a22fca",
"PAUSE_TAIKO_L1": "false",
"PAUSE_BRIDGE": "true",
"NUM_MIN_MAJORITY_GUARDIANS": "7",
"NUM_MIN_MINORITY_GUARDIANS": "2",
"TIER_PROVIDER": "devnet",
"TIER_ROUTER": "devnet",
"FORK_URL": el_rpc_url,
"SECURITY_COUNCIL": contract_owner.address,
"FORGE_FLAGS": "--broadcast --ffi -vvvv --block-gas-limit 200000000",
},
wait=None,
description="Deploying taiko smart contract",
store=[
"/tmp/taiko-output.txt"
],
store = [StoreSpec(src = "app/deployments/deploy_l1.json", name = "taiko_on_l1_deployment")],
)

plan.run_sh(
name="deploy-taiko-token",
run="forge script {0} {1} {2} $FORGE_FLAGS".format(TOKEN_SCRIPT_PATH, PRIVATE_KEY_COMMAND, FORK_URL_COMMAND),
# image="nethswitchboard/taiko-deploy:e2e",
image="nethsurge/test-protocol",
env_vars={
"FOUNDRY_PROFILE": "layer1",
"PRIVATE_KEY": "0x{0}".format(contract_owner.private_key),
"TAIKO_TOKEN_PREMINT_RECIPIENT": contract_owner.address,
"TAIKO_TOKEN_NAME": "Taiko Token",
"TAIKO_TOKEN_SYMBOL": "TAIKO",
"FORK_URL": el_rpc_url,
"SECURITY_COUNCIL": contract_owner.address,
"FORGE_FLAGS": "--broadcast --skip-simulation --ffi -vvvv --block-gas-limit 200000000",
},
wait=None,
description="Deploying taiko smart contract",
store = [StoreSpec(src = "app/deployments/deploy_l1.json", name = "taiko_token_deployment")],
)
10 changes: 5 additions & 5 deletions src/l2_taiko/taiko-driver.star
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def launch(
service = plan.add_service(
name = "preconf-taiko-driver-{0}".format(index),
config = ServiceConfig(
image = "nethswitchboard/taiko-client:e2e",
image = "nethsurge/taiko-client:test-client",
files = {
data_dirpath: "taiko_genesis_{0}".format(index),
},
Expand All @@ -27,14 +27,14 @@ def launch(
"ENABLE_PROPOSER": "true",
"BLOB_ALLOWED": "true",
"TX_RECEIPT_QUERY": "",
"BOOT_NODES": "enode://7a8955b27eda2ddf361b59983fce9c558b18ad60d996ac106629f7f913247ef13bc842c7cf6ec6f87096a3ea8048b04873c40d3d873c0276d38e222bddd72e88@43.153.44.186:30303,enode://704a50da7e727aa10c45714beb44ece04ca1280ad63bb46bb238a01bf55c19c9702b469fb12c63824fa90f5051f7091b1c5069df1ec9a0ba1e943978c09d270f@49.51.202.127:30303,enode://f52e4e212a15cc4f68df27282e616d51d7823596c83c8c8e3b3416d7ab531cefc7b8a493d01964e1918315e6b0c7a4806634aeabb9013642a9159a53f4ebc094@43.153.16.47:30303,enode://57f4b29cd8b59dc8db74be51eedc6425df2a6265fad680c843be113232bbe632933541678783c2a5759d65eac2e2241c45a34e1c36254bccfe7f72e52707e561@104.197.107.1:30303,enode://87a68eef46cc1fe862becef1185ac969dfbcc050d9304f6be21599bfdcb45a0eb9235d3742776bc4528ac3ab631eba6816e9b47f6ee7a78cc5fcaeb10cd32574@35.232.246.122:30303",
# "BOOT_NODES": "enode://7a8955b27eda2ddf361b59983fce9c558b18ad60d996ac106629f7f913247ef13bc842c7cf6ec6f87096a3ea8048b04873c40d3d873c0276d38e222bddd72e88@43.153.44.186:30303,enode://704a50da7e727aa10c45714beb44ece04ca1280ad63bb46bb238a01bf55c19c9702b469fb12c63824fa90f5051f7091b1c5069df1ec9a0ba1e943978c09d270f@49.51.202.127:30303,enode://f52e4e212a15cc4f68df27282e616d51d7823596c83c8c8e3b3416d7ab531cefc7b8a493d01964e1918315e6b0c7a4806634aeabb9013642a9159a53f4ebc094@43.153.16.47:30303,enode://57f4b29cd8b59dc8db74be51eedc6425df2a6265fad680c843be113232bbe632933541678783c2a5759d65eac2e2241c45a34e1c36254bccfe7f72e52707e561@104.197.107.1:30303,enode://87a68eef46cc1fe862becef1185ac969dfbcc050d9304f6be21599bfdcb45a0eb9235d3742776bc4528ac3ab631eba6816e9b47f6ee7a78cc5fcaeb10cd32574@35.232.246.122:30303",
"L1_ENDPOINT_HTTP": el_context.rpc_http_url,
"L1_ENDPOINT_WS": el_context.ws_url,
"L1_BEACON_HTTP": cl_context.beacon_http_url,
"TX_MIN_TIP_CAP": "",
"TX_FEE_LIMIT_THRESHOLD": "",
"P2P_SYNC_URL": "https://rpc.mainnet.taiko.xyz",
"TAIKO_L1_ADDRESS": "0x086f77C5686dfe3F2f8FE487C5f8d357952C8556",
"TAIKO_L1_ADDRESS": "0x57E5d642648F54973e504f10D21Ea06360151cAf",
"PORT_PROVER_SERVER": "9876",
"TX_MIN_BASEFEE": "",
"PORT_PROMETHEUS": "9091",
Expand All @@ -58,7 +58,7 @@ def launch(
"COMPOSE_PROFILES": "l2_execution_engine",
"PORT_L2_EXECUTION_ENGINE_METRICS": "6060",
"SGX_RAIKO_HOST": "",
"TAIKO_TOKEN_L1_ADDRESS": "0x422A3492e218383753D8006C7Bfa97815B44373F",
"TAIKO_TOKEN_L1_ADDRESS": "0x1788a5D023bac58bAF55a92153192a6568E42BAD",
"PORT_GRAFANA": "3001",
"PORT_L2_EXECUTION_ENGINE_HTTP": "8547",
"TOKEN_ALLOWANCE": "",
Expand All @@ -74,7 +74,7 @@ def launch(
"--l2.ws={0} ".format(geth.ws_url) +
"--l1.beacon={0} ".format(cl_context.beacon_http_url) +
"--l2.auth={0} ".format(geth.auth_url) +
"--taikoL1=0x086f77C5686dfe3F2f8FE487C5f8d357952C8556 " +
"--taikoL1=0x57E5d642648F54973e504f10D21Ea06360151cAf " +
"--taikoL2=0x1670000000000000000000000000000000010001 " +
"--jwtSecret={0} ".format(jwtsecret_path) +
"--verbosity=4"
Expand Down
16 changes: 8 additions & 8 deletions src/l2_taiko/taiko-proposer.star
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ def launch(
service = plan.add_service(
name = "preconf-taiko-proposer-{0}".format(index),
config = ServiceConfig(
image = "nethswitchboard/taiko-client:e2e",
image = "nethsurge/taiko-client:test-client",
files = {
data_dirpath: "taiko_genesis_{0}".format(index),
},
env_vars = {
"SGX_RAIKO_HOST": "",
"TAIKO_L1_ADDRESS": "0x086f77C5686dfe3F2f8FE487C5f8d357952C8556",
"TAIKO_L1_ADDRESS": "0x57E5d642648F54973e504f10D21Ea06360151cAf",
"TAIKO_L2_ADDRESS": "0x1670000000000000000000000000000000010001",
"TX_RECEIPT_QUERY": "",
"PORT_L2_EXECUTION_ENGINE_P2P": "30306",
Expand All @@ -32,7 +32,7 @@ def launch(
"PROVER_SET": "",
"PORT_PROMETHEUS": "9091",
"P2P_SYNC_URL": "https://rpc.mainnet.taiko.xyz",
"TAIKO_TOKEN_L1_ADDRESS": "0x422A3492e218383753D8006C7Bfa97815B44373F",
"TAIKO_TOKEN_L1_ADDRESS": "0x1788a5D023bac58bAF55a92153192a6568E42BAD",
"MIN_TAIKO_BALANCE": "",
"PROVE_UNASSIGNED_BLOCKS": "false",
"PROVER_ENDPOINTS": "http://taiko_client_prover_relayer:9876",
Expand All @@ -59,7 +59,7 @@ def launch(
"TX_MIN_BASEFEE": "",
"TX_NOT_IN_MEMPOOL": "",
"PORT_L2_EXECUTION_ENGINE_WS": "8548",
"BOOT_NODES": "enode://7a8955b27eda2ddf361b59983fce9c558b18ad60d996ac106629f7f913247ef13bc842c7cf6ec6f87096a3ea8048b04873c40d3d873c0276d38e222bddd72e88@43.153.44.186:30303,enode://704a50da7e727aa10c45714beb44ece04ca1280ad63bb46bb238a01bf55c19c9702b469fb12c63824fa90f5051f7091b1c5069df1ec9a0ba1e943978c09d270f@49.51.202.127:30303,enode://f52e4e212a15cc4f68df27282e616d51d7823596c83c8c8e3b3416d7ab531cefc7b8a493d01964e1918315e6b0c7a4806634aeabb9013642a9159a53f4ebc094@43.153.16.47:30303,enode://57f4b29cd8b59dc8db74be51eedc6425df2a6265fad680c843be113232bbe632933541678783c2a5759d65eac2e2241c45a34e1c36254bccfe7f72e52707e561@104.197.107.1:30303,enode://87a68eef46cc1fe862becef1185ac969dfbcc050d9304f6be21599bfdcb45a0eb9235d3742776bc4528ac3ab631eba6816e9b47f6ee7a78cc5fcaeb10cd32574@35.232.246.122:30303",
# "BOOT_NODES": "enode://7a8955b27eda2ddf361b59983fce9c558b18ad60d996ac106629f7f913247ef13bc842c7cf6ec6f87096a3ea8048b04873c40d3d873c0276d38e222bddd72e88@43.153.44.186:30303,enode://704a50da7e727aa10c45714beb44ece04ca1280ad63bb46bb238a01bf55c19c9702b469fb12c63824fa90f5051f7091b1c5069df1ec9a0ba1e943978c09d270f@49.51.202.127:30303,enode://f52e4e212a15cc4f68df27282e616d51d7823596c83c8c8e3b3416d7ab531cefc7b8a493d01964e1918315e6b0c7a4806634aeabb9013642a9159a53f4ebc094@43.153.16.47:30303,enode://57f4b29cd8b59dc8db74be51eedc6425df2a6265fad680c843be113232bbe632933541678783c2a5759d65eac2e2241c45a34e1c36254bccfe7f72e52707e561@104.197.107.1:30303,enode://87a68eef46cc1fe862becef1185ac969dfbcc050d9304f6be21599bfdcb45a0eb9235d3742776bc4528ac3ab631eba6816e9b47f6ee7a78cc5fcaeb10cd32574@35.232.246.122:30303",
# "PORT_PROVER_SERVER": "9876",
# "DISABLE_P2P_SYNC": "false",
"L1_ENDPOINT_HTTP": el_context.rpc_http_url,
Expand Down Expand Up @@ -89,14 +89,14 @@ def launch(
"taiko-client proposer --l1.ws={0} ".format(el_context.ws_url) +
"--l2.http={0} ".format(geth.rpc_http_url) +
"--l2.auth={0} ".format(geth.auth_url) +
"--taikoL1=0x086f77C5686dfe3F2f8FE487C5f8d357952C8556 "+
"--taikoL1=0x57E5d642648F54973e504f10D21Ea06360151cAf "+
"--taikoL2=0x1670000000000000000000000000000000010001 " +
"--jwtSecret={0} ".format(jwtsecret_path) +
"--taikoToken=0x422A3492e218383753D8006C7Bfa97815B44373F " +
"--taikoToken=0x1788a5D023bac58bAF55a92153192a6568E42BAD " +
"--l1.proposerPrivKey={0} ".format(prefunded_accounts[0].private_key) +
"--l2.suggestedFeeRecipient=0x8e81D13339eE01Bb2080EBf9796c5F2e5621f7E1 " +
"--tierFee.optimistic=1 " +
"--tierFee.sgx=1 " +
# "--tierFee.optimistic=1 " +
# "--tierFee.sgx=1 " +
"--l1.blobAllowed " +
"--tx.gasLimit=3000000",
],
Expand Down
Loading