From 94b33b544d45be8742fb7580a165ff501bff5349 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Thu, 16 Jun 2022 10:20:41 +0200 Subject: [PATCH 1/3] CI: fix typo in comment --- .gitlab/ci/test/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/test/templates.yml b/.gitlab/ci/test/templates.yml index 3f3fa12e995d..a34906fed439 100644 --- a/.gitlab/ci/test/templates.yml +++ b/.gitlab/ci/test/templates.yml @@ -25,7 +25,7 @@ - .template__coverage_files dependencies: ["build_x86_64"] # Start immediately after 'build_x86_64' and don't wait for - # intermediate stages to succeeds + # intermediate stages to succeed needs: ["build_x86_64"] before_script: - if [ ! -f tezos-node ] || [ ! -f tezos-client ] || [ ! -f tezos-codec ] || [ ! -f tezos-sandbox ]; then make all build-unreleased; fi -- GitLab From 069f7c8d95eed7dad3747eb47c1edc5c22f8cc6d Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Thu, 16 Jun 2022 08:04:48 +0200 Subject: [PATCH 2/3] Tests: Remove flextesa --- .gitlab/ci/build.yml | 2 +- .gitlab/ci/test/integration.yml | 32 +- .gitlab/ci/test/templates.yml | 2 +- .gitlab/ci/test/tezt.yml | 2 +- .gitlab/ci/test_coverage.yml | 1 - Makefile | 19 +- docs/developer/contributing.rst | 1 - docs/developer/flextesa.rst | 289 --- docs/developer/testing.rst | 56 +- docs/developer/testing_index.rst | 5 - docs/user/node-configuration.rst | 2 +- manifest/main.ml | 24 - sandbox.Makefile | 61 - scripts/remove-old-protocols.sh | 1 - src/bin_sandbox/command_accusations.ml | 983 ---------- .../command_daemons_protocol_change.ml | 788 -------- src/bin_sandbox/command_ledger_baking.ml | 649 ------- src/bin_sandbox/command_ledger_wallet.ml | 1728 ----------------- .../command_node_synchronization.ml | 308 --- src/bin_sandbox/command_prevalidation.ml | 48 - src/bin_sandbox/command_voting.ml | 1039 ---------- src/bin_sandbox/dune | 10 - src/bin_sandbox/main.ml | 103 - src/proto_000_Ps9mPmXa/lib_protocol/dune | 12 - src/proto_001_PtCJ7pwo/lib_protocol/dune | 12 - src/proto_002_PsYLVpVv/lib_protocol/dune | 12 - src/proto_003_PsddFKi3/lib_protocol/dune | 12 - src/proto_004_Pt24m4xi/lib_protocol/dune | 12 - src/proto_005_PsBABY5H/lib_protocol/dune | 12 - src/proto_005_PsBabyM1/lib_protocol/dune | 12 - src/proto_006_PsCARTHA/lib_protocol/dune | 12 - src/proto_007_PsDELPH1/lib_protocol/dune | 12 - src/proto_008_PtEdo2Zk/lib_protocol/dune | 12 - src/proto_008_PtEdoTez/lib_protocol/dune | 12 - src/proto_009_PsFLoren/lib_protocol/dune | 12 - src/proto_010_PtGRANAD/lib_protocol/dune | 12 - src/proto_011_PtHangz2/lib_protocol/dune | 12 - src/proto_012_Psithaca/lib_protocol/dune | 12 - src/proto_013_PtJakart/lib_protocol/dune | 12 - src/proto_alpha/lib_protocol/dune | 11 - src/proto_demo_counter/lib_protocol/dune | 12 - src/proto_demo_noops/lib_protocol/dune | 11 - src/proto_genesis/lib_protocol/dune | 11 - vendors/README.md | 19 - vendors/flextesa-lib/.ocamlformat | 1 - vendors/flextesa-lib/console.ml | 233 --- vendors/flextesa-lib/console.mli | 83 - vendors/flextesa-lib/dump_files.ml | 29 - vendors/flextesa-lib/dump_files.mli | 21 - vendors/flextesa-lib/dune | 20 - vendors/flextesa-lib/dune-project | 2 - .../flextesa-lib/environment_configuration.ml | 72 - vendors/flextesa-lib/experiments.ml | 67 - vendors/flextesa-lib/flextesa.opam | 26 - vendors/flextesa-lib/hard_fork.ml | 43 - vendors/flextesa-lib/hard_fork.mli | 47 - vendors/flextesa-lib/helpers.ml | 322 --- vendors/flextesa-lib/helpers.mli | 115 -- .../flextesa-lib/interactive_mini_network.ml | 411 ---- vendors/flextesa-lib/interactive_test.ml | 856 -------- vendors/flextesa-lib/interactive_test.mli | 261 --- vendors/flextesa-lib/internal_pervasives.ml | 552 ------ vendors/flextesa-lib/kiln.ml | 112 -- vendors/flextesa-lib/kiln.mli | 27 - vendors/flextesa-lib/liquidity.ml | 345 ---- vendors/flextesa-lib/liquidity.mli | 200 -- vendors/flextesa-lib/log_recorder.ml | 43 - vendors/flextesa-lib/paths.ml | 22 - vendors/flextesa-lib/paths.mli | 12 - vendors/flextesa-lib/running_processes.ml | 326 ---- vendors/flextesa-lib/running_processes.mli | 123 -- vendors/flextesa-lib/test_api.ml | 108 -- vendors/flextesa-lib/test_api.mli | 18 - vendors/flextesa-lib/test_command_line.ml | 122 -- vendors/flextesa-lib/test_command_line.mli | 86 - vendors/flextesa-lib/test_scenario.ml | 307 --- vendors/flextesa-lib/test_scenario.mli | 165 -- vendors/flextesa-lib/tezos_admin_client.ml | 56 - vendors/flextesa-lib/tezos_admin_client.mli | 41 - vendors/flextesa-lib/tezos_client.ml | 401 ---- vendors/flextesa-lib/tezos_client.mli | 335 ---- vendors/flextesa-lib/tezos_daemon.ml | 69 - vendors/flextesa-lib/tezos_daemon.mli | 57 - vendors/flextesa-lib/tezos_executable.ml | 74 - vendors/flextesa-lib/tezos_executable.mli | 67 - vendors/flextesa-lib/tezos_node.ml | 299 --- vendors/flextesa-lib/tezos_node.mli | 90 - vendors/flextesa-lib/tezos_protocol.ml | 555 ------ vendors/flextesa-lib/tezos_protocol.mli | 112 -- vendors/flextesa-lib/traffic_generation.ml | 156 -- vendors/flextesa-lib/traffic_generation.mli | 51 - 91 files changed, 27 insertions(+), 13922 deletions(-) delete mode 100644 docs/developer/flextesa.rst delete mode 100644 sandbox.Makefile delete mode 100644 src/bin_sandbox/command_accusations.ml delete mode 100644 src/bin_sandbox/command_daemons_protocol_change.ml delete mode 100644 src/bin_sandbox/command_ledger_baking.ml delete mode 100644 src/bin_sandbox/command_ledger_wallet.ml delete mode 100644 src/bin_sandbox/command_node_synchronization.ml delete mode 100644 src/bin_sandbox/command_prevalidation.ml delete mode 100644 src/bin_sandbox/command_voting.ml delete mode 100644 src/bin_sandbox/dune delete mode 100644 src/bin_sandbox/main.ml delete mode 100644 vendors/flextesa-lib/.ocamlformat delete mode 100644 vendors/flextesa-lib/console.ml delete mode 100644 vendors/flextesa-lib/console.mli delete mode 100644 vendors/flextesa-lib/dump_files.ml delete mode 100644 vendors/flextesa-lib/dump_files.mli delete mode 100644 vendors/flextesa-lib/dune delete mode 100644 vendors/flextesa-lib/dune-project delete mode 100644 vendors/flextesa-lib/environment_configuration.ml delete mode 100644 vendors/flextesa-lib/experiments.ml delete mode 100644 vendors/flextesa-lib/flextesa.opam delete mode 100644 vendors/flextesa-lib/hard_fork.ml delete mode 100644 vendors/flextesa-lib/hard_fork.mli delete mode 100644 vendors/flextesa-lib/helpers.ml delete mode 100644 vendors/flextesa-lib/helpers.mli delete mode 100644 vendors/flextesa-lib/interactive_mini_network.ml delete mode 100644 vendors/flextesa-lib/interactive_test.ml delete mode 100644 vendors/flextesa-lib/interactive_test.mli delete mode 100644 vendors/flextesa-lib/internal_pervasives.ml delete mode 100644 vendors/flextesa-lib/kiln.ml delete mode 100644 vendors/flextesa-lib/kiln.mli delete mode 100644 vendors/flextesa-lib/liquidity.ml delete mode 100644 vendors/flextesa-lib/liquidity.mli delete mode 100644 vendors/flextesa-lib/log_recorder.ml delete mode 100644 vendors/flextesa-lib/paths.ml delete mode 100644 vendors/flextesa-lib/paths.mli delete mode 100644 vendors/flextesa-lib/running_processes.ml delete mode 100644 vendors/flextesa-lib/running_processes.mli delete mode 100644 vendors/flextesa-lib/test_api.ml delete mode 100644 vendors/flextesa-lib/test_api.mli delete mode 100644 vendors/flextesa-lib/test_command_line.ml delete mode 100644 vendors/flextesa-lib/test_command_line.mli delete mode 100644 vendors/flextesa-lib/test_scenario.ml delete mode 100644 vendors/flextesa-lib/test_scenario.mli delete mode 100644 vendors/flextesa-lib/tezos_admin_client.ml delete mode 100644 vendors/flextesa-lib/tezos_admin_client.mli delete mode 100644 vendors/flextesa-lib/tezos_client.ml delete mode 100644 vendors/flextesa-lib/tezos_client.mli delete mode 100644 vendors/flextesa-lib/tezos_daemon.ml delete mode 100644 vendors/flextesa-lib/tezos_daemon.mli delete mode 100644 vendors/flextesa-lib/tezos_executable.ml delete mode 100644 vendors/flextesa-lib/tezos_executable.mli delete mode 100644 vendors/flextesa-lib/tezos_node.ml delete mode 100644 vendors/flextesa-lib/tezos_node.mli delete mode 100644 vendors/flextesa-lib/tezos_protocol.ml delete mode 100644 vendors/flextesa-lib/tezos_protocol.mli delete mode 100644 vendors/flextesa-lib/traffic_generation.ml delete mode 100644 vendors/flextesa-lib/traffic_generation.mli diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index 5059dd487681..0a5d2fc80b44 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -18,7 +18,7 @@ - diff poetry.lock /home/tezos/poetry.lock - diff pyproject.toml /home/tezos/pyproject.toml # 2. Actually build - - make all build-sandbox build-unreleased + - make all build-unreleased # 3. Also build the tps evaluation tool which is not part of the default build. # NOTE: We add $COVERAGE_OPTIONS to all dune build commands to enable reuse of # build artifacts. diff --git a/.gitlab/ci/test/integration.yml b/.gitlab/ci/test/integration.yml index 3445203f1e36..14480248fc8a 100644 --- a/.gitlab/ci/test/integration.yml +++ b/.gitlab/ci/test/integration.yml @@ -1,11 +1,6 @@ -# integration:proto:sandbox and integration:compiler-rejections do not +# integration:compiler-rejections does not # require access to the binaries like the "true" integration tests -# below. Therefore, they do not extend the .integration_template. - -integration:proto:sandbox: - extends: .test_template - script: - - dune build @runtest_sandbox +# below. Therefore, it does not extend the .integration_template. integration:compiler-rejections: extends: .test_template @@ -60,21 +55,6 @@ script:test_release_versions: - sudo chown -R $(id -u):$(id -g) $CI_PROJECT_DIR - ./scripts/test_release_version.sh -############################################################ -## Stage: run OCaml integration tests ## -############################################################ - -integration:sandboxes:acc-endorsement: - extends: .integration_template - script: - - TMP=$PWD make -f sandbox.Makefile accusations_simple_double_endorsing - artifacts: - paths: - - flextesa-acc-sde - - $BISECT_FILE - expire_in: 1 day - when: always - ############################################################ ## Stage: run python integration tests ## ############################################################ @@ -84,10 +64,10 @@ integration:sandboxes:acc-endorsement: .pytest_template: extends: - .test_template - needs: - - build_x86_64 - dependencies: - - build_x86_64 + dependencies: ["build_x86_64"] + # Start immediately after 'build_x86_64' and don't wait for + # intermediate stages to succeed + needs: ["build_x86_64"] before_script: # Load the environment poetry previously created in the docker image. # Give access to the Python dependencies/executables diff --git a/.gitlab/ci/test/templates.yml b/.gitlab/ci/test/templates.yml index a34906fed439..66b0219baf2b 100644 --- a/.gitlab/ci/test/templates.yml +++ b/.gitlab/ci/test/templates.yml @@ -28,4 +28,4 @@ # intermediate stages to succeed needs: ["build_x86_64"] before_script: - - if [ ! -f tezos-node ] || [ ! -f tezos-client ] || [ ! -f tezos-codec ] || [ ! -f tezos-sandbox ]; then make all build-unreleased; fi + - if [ ! -f tezos-node ] || [ ! -f tezos-client ] || [ ! -f tezos-codec ]; then make all build-unreleased; fi diff --git a/.gitlab/ci/test/tezt.yml b/.gitlab/ci/test/tezt.yml index be9efdc212c8..6becf1c068cb 100644 --- a/.gitlab/ci/test/tezt.yml +++ b/.gitlab/ci/test/tezt.yml @@ -73,7 +73,7 @@ tezt:self_tests: # - cat mainnet.roll.* | xz -d -v -T0 > mainnet.rolling # - scripts/prepare_migration_test.sh auto mainnet.rolling "$block_hash" # script: -# - if [ ! -f tezos-node ] || [ ! -f tezos-client ] || [ ! -f tezos-codec ] || [ ! -f tezos-sandbox ]; then make; fi +# - if [ ! -f tezos-node ] || [ ! -f tezos-client ] || [ ! -f tezos-codec ] ; then make; fi # - dune exec ./tezt/manual_tests/main.exe -- migration --color --log-buffer-size 5000 --log-file tezt-migration.log # artifacts: # when: always diff --git a/.gitlab/ci/test_coverage.yml b/.gitlab/ci/test_coverage.yml index ca4b28ebcd3d..478de6e1fcd5 100644 --- a/.gitlab/ci/test_coverage.yml +++ b/.gitlab/ci/test_coverage.yml @@ -20,7 +20,6 @@ unified_coverage: - "integration:pytest 7/9" - "integration:pytest 8/9" - "integration:pytest 9/9" - - "integration:sandboxes:acc-endorsement" - "test-liquidity-baking-scripts" - "tezt 1/9" - "tezt 2/9" diff --git a/Makefile b/Makefile index 38f592492d50..4c606b0c68a3 100644 --- a/Makefile +++ b/Makefile @@ -137,11 +137,6 @@ coverage-report-cobertura: enable-time-measurement: @$(MAKE) build PROFILE=dev DUNE_INSTRUMENT_WITH=tezos-time-measurement -.PHONY: build-sandbox -build-sandbox: - @dune build --profile=$(PROFILE) $(COVERAGE_OPTIONS) src/bin_sandbox/main.exe - @cp -f _build/default/src/bin_sandbox/main.exe tezos-sandbox - .PHONY: test-protocol-compile test-protocol-compile: @dune build --profile=$(PROFILE) $(COVERAGE_OPTIONS) @runtest_compile_protocol @@ -185,10 +180,6 @@ test-python-alpha: all test-python-tenderbake: all @$(MAKE) -C tests_python tenderbake -.PHONY: test-flextesa -test-flextesa: - @$(MAKE) -f sandbox.Makefile - # TODO: https://gitlab.com/tezos/tezos/-/issues/3018 # Disable verbose once the log file bug in Alcotest is fixed. .PHONY: test-js @@ -214,11 +205,11 @@ test-tezt-coverage: @dune exec --profile=$(PROFILE) $(COVERAGE_OPTIONS) tezt/tests/main.exe -- --keep-going --test-timeout 1800 .PHONY: test-code -test-code: test-protocol-compile test-unit test-flextesa test-python test-tezt +test-code: test-protocol-compile test-unit test-python test-tezt -# This is `make test-code` except for flextesa (which doesn't -# play well with coverage). We allow failure (prefix "-") because we still want -# the coverage report even if an individual test happens to fail. +# This is as `make test-code` except we allow failure (prefix "-") +# because we still want the coverage report even if an individual +# test happens to fail. .PHONY: test-coverage test-coverage: -@$(MAKE) test-protocol-compile @@ -394,7 +385,7 @@ coverage-clean: .PHONY: clean clean: coverage-clean @-dune clean - @-rm -f ${TEZOS_BIN} ${UNRELEASED_TEZOS_BIN} tezos-sandbox + @-rm -f ${TEZOS_BIN} ${UNRELEASED_TEZOS_BIN} @-${MAKE} -C docs clean @-${MAKE} -C tests_python clean @-rm -f docs/api/tezos-{baker,endorser,accuser}-alpha.html docs/api/tezos-{admin-,}client.html docs/api/tezos-signer.html diff --git a/docs/developer/contributing.rst b/docs/developer/contributing.rst index e8da5bc5d7e3..b9e8483fecfd 100644 --- a/docs/developer/contributing.rst +++ b/docs/developer/contributing.rst @@ -324,7 +324,6 @@ any subitems represent the longer description of that commit):: * Doc: mark bug #13 as fixed * Test_python: add test for p2p bug #13 - * Flextesa: add test for p2p bug #13 * Shell: fix p2p bug #13 - fix bug in the shell - fix relative unit test diff --git a/docs/developer/flextesa.rst b/docs/developer/flextesa.rst deleted file mode 100644 index efc0e593f556..000000000000 --- a/docs/developer/flextesa.rst +++ /dev/null @@ -1,289 +0,0 @@ -Flexible Network Sandboxes -========================== - -The binary ``tezos-sandbox`` uses the Flextesa library to provide -sandbox networks with baker and endorser daemons, with various test -scenarios. - -Some of those scenarios run in the CI, see ``./src/bin_sandbox/dune`` (although -it is not recommended to experiment with sandboxes using ``dune`` which can -leave unkilled processes easily, see issue -`#2445 `__). - - -Build ------ - -The application is not built by default, one needs: - -:: - - make build-sandbox - -Usage ------ - -See ``./tezos-sandbox --help`` and all the examples below. - -When running (semi-)interactive tests, it is recommended to wrap the -call with ``rlwrap`` or ``ledit``. - -MacOSX Users ------------- - -At runtime, sandboxes usually depend on a couple of linux utilities. - -If you are on Mac OS X, you can do ``brew install coreutils util-linux``. Then run -the tests with: - -:: - - export PATH="/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/util-linux/bin:$PATH" - - -See Also --------- - -``tezos-sandbox`` based on the Flextesa library which is being developed -at `gitlab.com/tezos/flextesa `__. -One can find more instructions there, including how to use isolated -sandboxes using Docker. TQ Tezos' assets portal also shows how to start -a sandbox and interact with it using a separate ``tezos-client``: -https://assets.tqtezos.com/docs/setup/2-sandbox/. - - -Concepts --------- - -Let’s clear a couple of things up: - -- *full* Vs *manual* sandbox: we call “full” a sandbox that uses - baker/endorser/accuser daemons and hence advances by itself. A - “manual” sandbox only has nodes, they require successive calls to - ``bake for`` tezos-client commands (or ``bake`` in the interactive - prompt if any). -- Each sandbox scenario has a *root path* where all logs and generated - files go (usually exposed with the ``--root-path`` option). -- Some sandboxes can start an interactive command-line interface. The - command-line parsing uses the Sexplib library; see - https://github.com/janestreet/sexplib#about for the lexical - conventions. Try the ``help`` command for instance. -- By default, sandboxed nodes get assigned successive port numbers for - their RPC and P2P services; with the option ``--base-port PORT``, - ``PORT`` will be used for the RPC of node 0, ``PORT + 1`` for its - P2P, ``PORT + 2`` for the RPC of node 1, etc. -- Sandboxes like the ``mini-network`` also provide a shell-environment - file at ``$ROOT_PATH/shell.env`` which provides aliases to - ``tezos-client`` commands compatible with the sandbox (see also - the ``help-env`` interactive command). - - -Examples --------- - -Interactive Mini-Network -~~~~~~~~~~~~~~~~~~~~~~~~ - -One can run a mini-network advancing fast with accusers, bakers, and -endorsers: - -:: - - rlwrap ./tezos-sandbox mini-network \ - --root-path /tmp/zz-mininet-test \ - --size 2 \ - --number-of-bootstrap-accounts 2 \ - --tezos-node-binary ./tezos-node \ - --tezos-baker-alpha-binary ./tezos-baker-alpha \ - --tezos-accuser-alpha-binary ./tezos-accuser-alpha \ - --tezos-client-binary ./tezos-client - -Once the network is started this test scenario becomes interactive: - -:: - - Flextesa.mininet: Please enter command: - -Just try ``h`` (or ``help``) to see the available commands, or ``q`` to kill the -sandbox and quit. - -The ``mini-network`` has many options, ``./tezos-sandbox mini --help``. - -Mini-Network with User Activated Upgrade -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This example runs another full sandbox (3 nodes, 2 “bakers”), for a -limited amount of time (60 blocks, no interactivity), and performs a -user-activated-upgrade (a.k.a. a protocol “hard-fork”) between Babylon -and Carthage (as built on the ``master`` branch). - -We also set the base-port to 3000 and add some random traffic; -i.e. create contract originations and contract calls (for now the -setting also requires also the ``--until-level`` option): - -:: - - ./tezos-sandbox mini-network \ - --root-path /tmp/hard-fork-mininet \ - --size 3 \ - --base-port 3_000 \ - --number-of-bootstrap-accounts 2 \ - --protocol-hash PsBabyM1eUXZseaJdmXFApDSBqj8YBfwELoxZHHW77EMcAbbwAS \ - --protocol-kind Babylon \ - --until-level 60 \ - --random-traffic any \ - --tezos-baker-alpha-binary ./tezos-baker-005-PsBabyM1 \ - --tezos-endorser-alpha-binary ./tezos-endorser-005-PsBabyM1 \ - --tezos-accuser-alpha-binary ./tezos-accuser-005-PsBabyM1 \ - --hard-fork 20:PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb \ - --hard-fork-baker-alpha-binary ./tezos-baker-006-PsCARTHA \ - --hard-fork-endorser-alpha-binary ./tezos-endorser-006-PsCARTHA \ - --hard-fork-accuser-alpha-binary ./tezos-accuser-006-PsCARTHA \ - --tezos-node-binary ./tezos-node \ - --tezos-client-binary ./tezos-client - - -Manual Mini-Network With An Archive Node -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -An interactive Carthage sandbox with 3 nodes, one of which running in -``archive`` mode, and no baking daemons: - -:: - - rlwrap ./tezos-sandbox mini-network \ - --root-path /tmp/manual-mininet \ - --size 3 \ - --set-history-mode N000:archive \ - --no-baking \ - --protocol-hash PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb \ - --protocol-kind Carthage \ - --tezos-baker-alpha-binary ./tezos-baker-006-PsCARTHA \ - --tezos-endorser-alpha-binary ./tezos-endorser-006-PsCARTHA \ - --tezos-accuser-alpha-binary ./tezos-accuser-006-PsCARTHA \ - --tezos-node-binary ./tezos-node \ - --tezos-client-binary ./tezos-client - -Once the network is started, we enter the interactive mode, and we can -use the ``bake`` command to create blocks (``bake`` can take an -argument: which client to bake with, e.g. \ ``bake 2``). - -We can check that ``N000`` is indeed an archive node: -``c2 rpc get /chains/main/checkpoint`` (``help`` tells us that ``c2`` is -the client for the node ``N000``). - -Double Endorsement Accusation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There are 3 “accusation scenarios” so far, see -``./tezos-sandbox accusation --help``. For instance, the following command -starts a small 3-node network, forces one baker to endorse two -concurrent branches, and then makes another baker inject (and bake) the -double-endorsement-evidence operation. The option ``--pause-at-end=true`` tells -``tezos-sandbox`` to enter the interactive mode (command prompt) at the end of -the test to give a chance to explore the sandbox before killing all the nodes. - -:: - - PATH=.:$PATH rlwrap ./tezos-sandbox accusations simple-double-endorsing \ - --root $PWD/double-endorsing-test \ - --pause-at-end=true - - -Voting With a Ledger Nano Device -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The voting test tries to do a full round of voting and protocol switch, -including baking on the test-chain, see documentation in -``./tezos-sandbox voting --help``. - -The test can run in a simpler-to-setup, or “degraded,” mode of operation -(cf. call in ``./src/bin_flextesa/dune`` for the version which -run in Gitlab-CI pipelines). In this example, we run instead a full test -with a Ledger Nano device as one of the bakers/voters. The test automatically -becomes **interactive** because the user has to press buttons on the -device, including for changing between apps. - -Get an URI for your ledger (the test requires both the Wallet and -Baking apps): - -:: - - tezos-client list connected ledgers - -And use the URI (no need to import it) for the ``--with-ledger`` option: - -:: - - rlwrap ./tezos-sandbox voting \ - ./src/proto_006_PsCARTHA/lib_protocol/TEZOS_PROTOCOL \ - ./src/proto_demo_noops/lib_protocol/TEZOS_PROTOCOL \ - --with-ledger "ledger://crouching-tiger-hidden-dragon/ed25519/0'/0'" \ - --serialize-proposals \ - --base-port=20_000 \ - --current-node-binary ./tezos-node \ - --current-client-binary ./tezos-client \ - --winner-client-binary ./tezos-client \ - --current-admin-client-binary ./tezos-admin-client \ - --pause-on-error=true - -- The first path argument has to be the path to a valid protocol which - can be switched to from the current (``proto_alpha``) one. -- The second protocol, the looser, only needs to be valid for the - protocol compilation. -- The option ``--serialize-proposals`` tells the test to call - ``tezos-client submit proposals for ...`` one proposal at a time - which is the only method the ledger Wallet app can really understand. -- The ``*-binary`` options allow to set the paths to the executables - for the different protocols: ``current`` and ``winner``. - -The test becomes interactive and guides you through the interactions -with the ledger, e.g.: - -:: - - Flextesa.voting: - Ledger-prompt - - Setting up "ledger://crouching-tiger-hidden-dragon/ed25519/0'/0'" for - baking. The ledger should be showing the setup parameters (Address, - Main chain, HWMs). - - Please hit “✔” on the ledger. - -Implementation Considerations ------------------------------ - -``Running_processes`` is very high-level (actually agnostic to Tezos). -Most processes are actually calls to ``sh -c