|
1 | 1 | set fallback := true
|
2 | 2 |
|
| 3 | +# Alter inputs as needed |
| 4 | +L1_HEAD := "0x99a606fd807b1d4de3b0e875e8999eca8b658144e8bf17fc1d5b35a18edad4c5" |
| 5 | +L2_HEAD := "0xa88ff85df4148ae174122d7e3637d5044ff08faff4aee1d8295b59df6e752f6b" |
| 6 | +L2_OUTPUT_ROOT := "0x436e677d6ead4a915be25462eba837d287efcfa14aab8aa0b7dae49f7ff21f67" |
| 7 | +L2_CLAIM := "0xff57b5ecc49aea302259672f8a3ec7634ef4b9970bf54798de4f265768015796" |
| 8 | +L2_BLOCK_NUMBER := "121449098" |
| 9 | +L2_CHAIN_ID := "10" |
| 10 | + |
3 | 11 | # default recipe to display help information
|
4 | 12 | default:
|
5 | 13 | @just --list
|
6 | 14 |
|
7 |
| -# Run the client program natively with the hos |
8 |
| -run-client-native l1_rpc l1_beacon_rpc l2_rpc verbosity: |
| 15 | +# Run the client program on asterisc with the host in detached server mode. |
| 16 | +run-client-asterisc l1_rpc l1_beacon_rpc l2_rpc verbosity: |
9 | 17 | #!/usr/bin/env bash
|
10 | 18 |
|
11 |
| - # TODO: These configuration values are currently mocked. Once they're consumed, |
12 |
| - # update this to offer default run or optionally alter by pre-setting them. |
13 |
| - ROLLUP_CONFIG_PATH="x" |
14 |
| - L2_GENESIS_PATH="x" |
15 |
| - L1_HEAD=$(cast 2b 0) |
16 |
| - L2_HEAD=$(cast 2b 0) |
17 |
| - L2_OUTPUT_ROOT=$(cast 2b 0) |
18 |
| - L2_CLAIM=$(cast 2b 0) |
19 |
| - L2_BLOCK_NUMBER=0 |
20 |
| - L2_CHAIN_ID=10 |
| 19 | + L1_NODE_ADDRESS="{{l1_rpc}}" |
| 20 | + L1_BEACON_ADDRESS="{{l1_beacon_rpc}}" |
| 21 | + L2_NODE_ADDRESS="{{l2_rpc}}" |
| 22 | + |
| 23 | + HOST_BIN_PATH="./target/release/kona-host" |
| 24 | + CLIENT_BIN_PATH="./target/riscv64gc-unknown-none-elf/release-client-lto/kona" |
| 25 | + STATE_PATH="./state.json" |
| 26 | + |
| 27 | + # Move to the workspace root |
| 28 | + cd $(git rev-parse --show-toplevel) |
| 29 | + |
| 30 | + echo "Building client program for RISC-V target..." |
| 31 | + just build-asterisc --bin kona --profile release-client-lto |
| 32 | + |
| 33 | + echo "Loading client program into Asterisc state format..." |
| 34 | + asterisc load-elf --path=$CLIENT_BIN_PATH |
| 35 | + |
| 36 | + echo "Building host program for native target..." |
| 37 | + cargo build --bin kona-host --release |
| 38 | + |
| 39 | + echo "Running asterisc" |
| 40 | + asterisc run \ |
| 41 | + --info-at '%10000000' \ |
| 42 | + --proof-at never \ |
| 43 | + --input $STATE_PATH \ |
| 44 | + -- \ |
| 45 | + $HOST_BIN_PATH \ |
| 46 | + --l1-head {{L1_HEAD}} \ |
| 47 | + --l2-head {{L2_HEAD}} \ |
| 48 | + --l2-claim {{L2_CLAIM}} \ |
| 49 | + --l2-output-root {{L2_OUTPUT_ROOT}} \ |
| 50 | + --l2-block-number {{L2_BLOCK_NUMBER}} \ |
| 51 | + --l2-chain-id {{L2_CHAIN_ID}} \ |
| 52 | + --l1-node-address $L1_NODE_ADDRESS \ |
| 53 | + --l1-beacon-address $L1_BEACON_ADDRESS \ |
| 54 | + --l2-node-address $L2_NODE_ADDRESS \ |
| 55 | + --server \ |
| 56 | + --data-dir ./data \ |
| 57 | + --exec "" \ |
| 58 | + {{verbosity}} |
| 59 | + |
| 60 | +# Run the client program natively with the host program attached. |
| 61 | +run-client-native l1_rpc l1_beacon_rpc l2_rpc verbosity: |
| 62 | + #!/usr/bin/env bash |
21 | 63 |
|
22 | 64 | L1_NODE_ADDRESS="{{l1_rpc}}"
|
23 | 65 | L1_BEACON_ADDRESS="{{l1_beacon_rpc}}"
|
24 | 66 | L2_NODE_ADDRESS="{{l2_rpc}}"
|
25 | 67 |
|
26 |
| - CLIENT_BIN_PATH="./target/release-client-lto/kona-client" |
| 68 | + CLIENT_BIN_PATH="./target/release-client-lto/kona" |
| 69 | + |
| 70 | + # Move to the workspace root |
| 71 | + cd $(git rev-parse --show-toplevel) |
27 | 72 |
|
28 | 73 | echo "Building client program..."
|
29 |
| - cargo build --bin kona-client --profile release-client-lto |
| 74 | + cargo build --bin kona --profile release-client-lto --features tracing-subscriber |
30 | 75 | echo "Running host program with native client program..."
|
31 |
| - (cd ../../.. && cargo r --bin kona-host --release -- \ |
32 |
| - --rollup-config $ROLLUP_CONFIG_PATH \ |
33 |
| - --network optimism \ |
34 |
| - --l2-genesis-path $L2_GENESIS_PATH \ |
35 |
| - --l1-head $L1_HEAD \ |
36 |
| - --l2-head $L2_HEAD \ |
37 |
| - --l2-claim $L2_CLAIM \ |
38 |
| - --l2-output-root $L2_OUTPUT_ROOT \ |
39 |
| - --l2-block-number $L2_BLOCK_NUMBER \ |
40 |
| - --l2-chain-id $L2_CHAIN_ID \ |
| 76 | + cargo r --bin kona-host --release -- \ |
| 77 | + --l1-head {{L1_HEAD}} \ |
| 78 | + --l2-head {{L2_HEAD}} \ |
| 79 | + --l2-claim {{L2_CLAIM}} \ |
| 80 | + --l2-output-root {{L2_OUTPUT_ROOT}} \ |
| 81 | + --l2-block-number {{L2_BLOCK_NUMBER}} \ |
| 82 | + --l2-chain-id {{L2_CHAIN_ID}} \ |
41 | 83 | --l1-node-address $L1_NODE_ADDRESS \
|
42 | 84 | --l1-beacon-address $L1_BEACON_ADDRESS \
|
43 | 85 | --l2-node-address $L2_NODE_ADDRESS \
|
44 | 86 | --exec $CLIENT_BIN_PATH \
|
45 |
| - {{verbosity}}) |
| 87 | + --data-dir ./data \ |
| 88 | + {{verbosity}} |
0 commit comments