From 97a02826b463de6b6dfacbf134a32a550ae2198a Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Thu, 22 Dec 2022 16:35:53 +0100 Subject: [PATCH 1/2] Sandbox, Scripts: Add rollup node temp data-dir --- src/bin_client/octez-init-sandboxed-client.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin_client/octez-init-sandboxed-client.sh b/src/bin_client/octez-init-sandboxed-client.sh index 98b903265323..225e142f30ae 100755 --- a/src/bin_client/octez-init-sandboxed-client.sh +++ b/src/bin_client/octez-init-sandboxed-client.sh @@ -13,6 +13,11 @@ init_sandboxed_client() { rpc=$((18730 + id)) client_dir="$(mktemp -d -t tezos-tmp-client.XXXXXXXX)" client_dirs+=("$client_dir") + if [ -n "$SCORU_DATA_DIR" ]; then + rollup_node_dir="$SCORU_DATA_DIR" + else + rollup_node_dir="$(mktemp -d -t tezos-smart-rollup-node.XXXXXXXX)" + fi signer="$local_signer -d $client_dir" if [ -n "$USE_TLS" ]; then client="$local_client -base-dir $client_dir -endpoint https://$host:$rpc" @@ -184,8 +189,9 @@ main () { echo "exec $baker \"\$@\"" >> $client_dir/bin/octez-baker-$protocol_without_number chmod +x $client_dir/bin/octez-baker-$protocol_without_number + echo '#!/bin/sh' > $client_dir/bin/octez-smart-rollup-node-$protocol_without_number - echo "exec $sc_rollup_node \"\$@\"" >> $client_dir/bin/octez-smart-rollup-node-$protocol_without_number + echo "exec $sc_rollup_node \"\$@\" -data-dir $rollup_node_dir" >> $client_dir/bin/octez-smart-rollup-node-$protocol_without_number chmod +x $client_dir/bin/octez-smart-rollup-node-$protocol_without_number echo '#!/bin/sh' > $client_dir/bin/octez-smart-rollup-client-$protocol_without_number -- GitLab From 43ffb09ba788c45ca23cfd598d3f3609e3c5800f Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Wed, 11 Jan 2023 11:31:07 +0100 Subject: [PATCH 2/2] Docs, Smart rollup: document sandbox rollup node --- docs/mumbai/smart_rollups.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/mumbai/smart_rollups.rst b/docs/mumbai/smart_rollups.rst index 556034db96b9..cdd1821ca36a 100644 --- a/docs/mumbai/smart_rollups.rst +++ b/docs/mumbai/smart_rollups.rst @@ -493,6 +493,15 @@ Second, the configured rollup node can be run: The log should show that the rollup node follows the layer-1 chain and processes the inbox of each level. +Rollup node in a sandbox +"""""""""""""""""""""""" + +The node can also be tested locally with a sandbox environment. (See :doc:`sandbox documentation <../user/sandbox>`.) + +Once you initialized the "sandboxed" client data with ``./src/bin_client/octez-init-sandboxed-client.sh``, you can run a sandboxed rollup node with ``octez-smart-rollup'node-alpha run``. + +A temporary directory ``/tmp/tezos-smart-rollup-node.xxxxxxxx`` will be used. However, a specific data directory can be set with the environment variable ``SCORU_DATA_DIR``. + .. _sending_external_inbox_message_mumbai: Sending an external inbox message -- GitLab