@@ -389,3 +389,87 @@ In order to refresh this AMI one needs to:
3893891 . Create an AWS EC2 instance with the characteristics described in (see ` .github/workflows/enclave.yaml ` * Launch EC2 Instance* job).
3903902 . Copy the script ` espresso/scrips/enclave-prepare-ami.sh ` in the EC2 instance (e.g. using scp) and run it.
3913913 . [ Export the AMI instance] ( https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html ) .
392+
393+ ## Demo to Celo
394+ For convenience some scripts have been added to make it easier to showcase the
395+ results, and monitor the progress of the docker compose file. The primary
396+ script concerns evaluating ` optimism_syncStatus ` and displaying the results.
397+
398+ This script requires the commands ` tmux ` , and ` watch ` to be installed and
399+ in the ` PATH ` . Check to see if you have them, and if you don't, be sure to
400+ install them using whatever method you deem necessary in order to run the
401+ script.
402+
403+ After that has been done you should be able to spin up the simple script
404+ using the following command:
405+ ``` console
406+ ./espresso/scripts/demo_tmux_get_sync_status.sh
407+ ```
408+
409+ This will launch a ` tmux ` session setup with a script to automatically
410+ query and display the ` optimism_syncStatus ` result for the ` sequencer ` ,
411+ ` verifier ` , and ` caff-node ` .
412+
413+ It assumes that the ` docker-file.yml ` is being run with the default values
414+ and will attempt to connect to them as needed.
415+
416+ If you're not used to ` tmux ` you should be able to disconnect from the session
417+ using ` <C-b> d ` . This only detaches from the session, the session will still
418+ exist and be running in the background. You can kill the session using the
419+ following command:
420+ ``` console
421+ tmux kill-session
422+ ```
423+
424+ Or you can reattach to it using this command instead:
425+ ``` console
426+ tmux attach
427+ ```
428+
429+ If you want to target different RPC endpoints for optimism, if you're not
430+ running the local demo, and want to target the remote, you can always
431+ specify environment variables before running the script:
432+ ``` console
433+ OP_RPC_SEQUENCER=http://sequencer.example.com:4545 \
434+ OP_RPC_VERIFIER=http://verifier.example.com:4545 \
435+ OP_RPC_CAFF=http://caff.example.com:4545 \
436+ ./espresso/scripts/demo_tmux_get_sync_status.sh
437+ ```
438+
439+ ### Prepare for the Demo
440+ * Go to the scripts directory.
441+ ``` console
442+ cd espresso/scripts
443+ ```
444+ * Allow access to scripts.
445+ ``` console
446+ chmod +x startup.sh
447+ chmod +x logs.sh
448+ chmod +x shutdown.sh
449+ ```
450+
451+ ### Prebuild Everything and Start All Services
452+ Note that ` l2-genesis ` is expected to take around 2 minutes.
453+ ``` console
454+ ./startup.sh
455+ ```
456+
457+ ### View Logs
458+ There are 15 services in total, as listed in ` logs.sh ` . It is supported to run logs for any
459+ service, but we may want to show logs selectively, e.g., by running the following commands one by
460+ one. Note that some service names are replaced by more convenient alias, but it is also suported to
461+ use their full names.
462+ ``` console
463+ ./logs.sh l1-geth
464+ ./logs.sh dev-node
465+ ./logs.sh op-geth-sequencer
466+ ./logs.sh sequencer
467+ ./logs.sh verifier
468+ ./logs.sh caff-node
469+ ./logs.sh batcher
470+ ```
471+
472+ ### Shut Down All Services
473+ ``` console
474+ ./shutdown.sh
475+ ```
0 commit comments