From 7d3b0f9dd029ca699058ae52c91f3c5c17d5f554 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Fri, 30 Sep 2022 16:29:13 +0200 Subject: [PATCH 1/3] Doc: remove phony target: main This MR reworks how symbolic links are created and removed. Instead of removing the links just before they are created, the links are removed before building. This breaks the test of docs/user/node-config.sh because in parallel of this test, 'make all' is running, and it removes the links. This actually shows that this test was flaky before, although it had a very low chance of failing for this particular reason. This commit fixes that by removing the dependency from doc targets to the main Octez targets. One now has to build Octez before using the doc Makefile if one wants the doc to be up-to-date. --- .gitlab/ci/Makefile | 15 ++++++++++++++- .gitlab/ci/doc.yml | 5 ++--- docs/Makefile | 17 +++++++---------- scripts/ci/doc_publish.sh | 3 ++- scripts/lint.sh | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.gitlab/ci/Makefile b/.gitlab/ci/Makefile index 131215649ec8..3587e50989fe 100644 --- a/.gitlab/ci/Makefile +++ b/.gitlab/ci/Makefile @@ -145,11 +145,24 @@ opam-configure: opam reinstall --yes --with-test ${package}.dev endif +.PHONY: doc-build-all +doc-build-all: + cd ${CI_PROJECT_DIR} && \ + make all && \ + make -C docs -j all + .PHONY: doc-publish doc-publish: cd ${CI_PROJECT_DIR} && \ ./scripts/ci/doc_publish.sh +.PHONY: doc-linkcheck +doc-linkcheck: + cd ${CI_PROJECT_DIR} && \ + make all && \ + make -C docs redirectcheck && \ + make -C docs linkcheck + .PHONY: opam-release opam-release: cd ${CI_PROJECT_DIR} ; \ @@ -166,4 +179,4 @@ gitlab-take-ownership: ifdef CI_PROJECT_DIR # FIXME: https://gitlab.com/tezos/tezos/-/issues/2865 sudo chown -R $(shell id -u):$(shell id -g) ${CI_PROJECT_DIR} -endif \ No newline at end of file +endif diff --git a/.gitlab/ci/doc.yml b/.gitlab/ci/doc.yml index 41d8e69f682b..362e9800293f 100644 --- a/.gitlab/ci/doc.yml +++ b/.gitlab/ci/doc.yml @@ -14,7 +14,7 @@ documentation:build_all: before_script: - . $HOME/.venv/bin/activate script: - - make -C docs -j all + - make -C ${CI_PROJECT_DIR}/.gitlab/ci doc-build-all artifacts: expose_as: 'Documentation - excluding old protocols' paths: @@ -33,8 +33,7 @@ documentation:linkcheck: - . ./scripts/version.sh - . $HOME/.venv/bin/activate script: - - make -C docs redirectcheck - - make -C docs linkcheck + - make -C ${CI_PROJECT_DIR}/.gitlab/ci doc-linkcheck allow_failure: true # here we use this hack to publish the tezos documentation on diff --git a/docs/Makefile b/docs/Makefile index 3ba7aad96b97..16b80299d6b1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -40,15 +40,12 @@ full: odoc # Same ordering constraint: html *after* odoc (see target "all") ${MAKE} html -main: - ${MAKE} -C .. all - # Build the manuals for a given protocol -%/tezos-client.html: main +%/tezos-client.html: @../tezos-client -protocol $($(@D)_long) man -verbosity 3 -format html | sed "s#${HOME}#\$$HOME#g" > $@ -%/tezos-baker.html: main +%/tezos-baker.html: @../tezos-baker-$($(@D)_short) man -verbosity 3 -format html | sed "s#${HOME}#\$$HOME#g" > $@ -%/tezos-accuser.html: main +%/tezos-accuser.html: @../tezos-accuser-$($(@D)_short) man -verbosity 3 -format html | sed "s#${HOME}#\$$HOME#g" > $@ manuals: \ @@ -63,13 +60,13 @@ manuals: \ # artificially depend on docexes to avoid concurrent dunes .PHONY: odoc -odoc: main docexes +odoc: docexes cd $$(pwd)/.. ; dune build @doc @rm -rf $$(pwd)/_build/api/odoc @mkdir -p $$(pwd)/_build/api @cp -r $$(pwd)/../_build/default/_doc $$(pwd)/_build/api/odoc -odoc-lite: main docexes +odoc-lite: docexes rm -rf $(TMPDOCDIR)/ mkdir -p $(TMPDOCDIR)/ rsync --recursive --links --perms --exclude="src/proto_0*" \ @@ -115,10 +112,10 @@ scriptsindoccheck: scripts/test_doc_scripts.sh compile-master-sources-buster # build dune targets together to avoid concurrent dunes -docexes: main +docexes: cd .. && dune build docs/$(DOCERRORDIR)/error_doc.exe docs/$(DOCGENDIR)/rpc_doc.exe docs/$(DOCGENDIR)/p2p_doc.exe -developer/metrics.csv: main +developer/metrics.csv: ../tezos-node dump-metrics > developer/metrics.csv $(ERRDOCEXE): docexes diff --git a/scripts/ci/doc_publish.sh b/scripts/ci/doc_publish.sh index 290665583184..d404adc7fe68 100755 --- a/scripts/ci/doc_publish.sh +++ b/scripts/ci/doc_publish.sh @@ -3,6 +3,7 @@ cd "${CI_PROJECT_DIR}" || exit 1 if [ "${CI_COMMIT_REF_NAME}" == "master" ] ; then + make all ; make -C docs -j full ; git clone --depth 5 git@gitlab.com:"${CI_PROJECT_NAMESPACE}"/"${CI_PROJECT_NAMESPACE}".gitlab.io gitlab.io ; rsync --recursive --links --perms --delete --exclude=.doctrees --exclude={{main,alpha,zero}net,master}/index.html docs/_build/ gitlab.io/public/ ; @@ -17,4 +18,4 @@ else git add public ; git commit -m "Import doc of ${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${CI_COMMIT_SHA}" ; git push origin master ; -fi \ No newline at end of file +fi diff --git a/scripts/lint.sh b/scripts/lint.sh index 62309794c062..e8192f06c763 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -130,7 +130,7 @@ check_scripts () { check_redirects () { if [[ ! -f docs/_build/_redirects ]]; then say "check-redirects should be run after building the full documentation," - say "i.e. by running 'make -C docs all'" + say "i.e. by running 'make all && make -C docs all'" exit 1 fi -- GitLab From 11f92f64dff176a13b76403f8765495f47d8c279 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Thu, 29 Sep 2022 15:07:00 +0200 Subject: [PATCH 2/3] Build: remove protocol number from executable names --- .gitlab/ci/opam-ci.yml | 48 ++++---- Makefile | 116 ++++++++++++++---- build.Dockerfile | 4 +- docs/developer/howto-freeze-protocols.rst | 12 +- dune-project | 24 ++-- manifest/main.ml | 38 ++++-- ...athma.opam => octez-accuser-PtKathma.opam} | 0 ...imaPt.opam => octez-accuser-PtLimaPt.opam} | 0 ...tKathma.opam => octez-baker-PtKathma.opam} | 0 ...tLimaPt.opam => octez-baker-PtLimaPt.opam} | 0 ...m => octez-sc-rollup-client-PtKathma.opam} | 0 ...m => octez-sc-rollup-client-PtLimaPt.opam} | 0 ...pam => octez-sc-rollup-node-PtKathma.opam} | 0 ...pam => octez-sc-rollup-node-PtLimaPt.opam} | 0 ...m => octez-tx-rollup-client-PtKathma.opam} | 0 ...m => octez-tx-rollup-client-PtLimaPt.opam} | 0 ...pam => octez-tx-rollup-node-PtKathma.opam} | 0 ...pam => octez-tx-rollup-node-PtLimaPt.opam} | 0 .../active_protocol_versions_without_number | 3 + .../active_testing_protocol_versions | 1 - script-inputs/binaries-for-release | 24 ++-- ...c_rollup_protocol_versions_without_number} | 0 script-inputs/static-packages | 24 ++-- script-inputs/tx_rollup_protocol_versions | 3 - src/bin_client/octez-init-sandboxed-client.sh | 2 +- src/proto_014_PtKathma/bin_accuser/dune | 4 +- src/proto_014_PtKathma/bin_baker/dune | 4 +- .../bin_sc_rollup_client/dune | 4 +- .../bin_sc_rollup_node/dune | 4 +- .../bin_tx_rollup_client/dune | 4 +- .../bin_tx_rollup_node/dune | 4 +- src/proto_015_PtLimaPt/bin_accuser/dune | 4 +- src/proto_015_PtLimaPt/bin_baker/dune | 4 +- .../bin_sc_rollup_client/dune | 4 +- .../bin_sc_rollup_node/dune | 4 +- .../bin_tx_rollup_client/dune | 4 +- .../bin_tx_rollup_node/dune | 4 +- tezt/lib_tezos/client.mli | 2 +- tezt/lib_tezos/operation_legacy.ml | 2 +- tezt/lib_tezos/protocol.ml | 9 +- tezt/lib_tezos/protocol.mli | 8 +- .../tests/liquidity_baking_per_block_votes.ml | 2 +- tezt/tests/proxy.ml | 4 +- tezt/tests/retro.ml | 4 +- 44 files changed, 236 insertions(+), 142 deletions(-) rename opam/{octez-accuser-014-PtKathma.opam => octez-accuser-PtKathma.opam} (100%) rename opam/{octez-accuser-015-PtLimaPt.opam => octez-accuser-PtLimaPt.opam} (100%) rename opam/{octez-baker-014-PtKathma.opam => octez-baker-PtKathma.opam} (100%) rename opam/{octez-baker-015-PtLimaPt.opam => octez-baker-PtLimaPt.opam} (100%) rename opam/{octez-sc-rollup-client-014-PtKathma.opam => octez-sc-rollup-client-PtKathma.opam} (100%) rename opam/{octez-sc-rollup-client-015-PtLimaPt.opam => octez-sc-rollup-client-PtLimaPt.opam} (100%) rename opam/{octez-sc-rollup-node-014-PtKathma.opam => octez-sc-rollup-node-PtKathma.opam} (100%) rename opam/{octez-sc-rollup-node-015-PtLimaPt.opam => octez-sc-rollup-node-PtLimaPt.opam} (100%) rename opam/{octez-tx-rollup-client-014-PtKathma.opam => octez-tx-rollup-client-PtKathma.opam} (100%) rename opam/{octez-tx-rollup-client-015-PtLimaPt.opam => octez-tx-rollup-client-PtLimaPt.opam} (100%) rename opam/{octez-tx-rollup-node-014-PtKathma.opam => octez-tx-rollup-node-PtKathma.opam} (100%) rename opam/{octez-tx-rollup-node-015-PtLimaPt.opam => octez-tx-rollup-node-PtLimaPt.opam} (100%) create mode 100644 script-inputs/active_protocol_versions_without_number rename script-inputs/{sc_rollup_protocol_versions => sc_rollup_protocol_versions_without_number} (100%) delete mode 100644 script-inputs/tx_rollup_protocol_versions diff --git a/.gitlab/ci/opam-ci.yml b/.gitlab/ci/opam-ci.yml index 16b168a7a3b0..b20e9103965a 100644 --- a/.gitlab/ci/opam-ci.yml +++ b/.gitlab/ci/opam-ci.yml @@ -258,19 +258,19 @@ start_in: 7 minutes - when: never # default -opam:octez-accuser-014-PtKathma: +opam:octez-accuser-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-accuser-014-PtKathma + package: octez-accuser-PtKathma -opam:octez-accuser-015-PtLimaPt: +opam:octez-accuser-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-accuser-015-PtLimaPt + package: octez-accuser-PtLimaPt opam:octez-accuser-alpha: extends: @@ -279,19 +279,19 @@ opam:octez-accuser-alpha: variables: package: octez-accuser-alpha -opam:octez-baker-014-PtKathma: +opam:octez-baker-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-baker-014-PtKathma + package: octez-baker-PtKathma -opam:octez-baker-015-PtLimaPt: +opam:octez-baker-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-baker-015-PtLimaPt + package: octez-baker-PtLimaPt opam:octez-baker-alpha: extends: @@ -328,19 +328,19 @@ opam:octez-protocol-compiler: variables: package: octez-protocol-compiler -opam:octez-sc-rollup-client-014-PtKathma: +opam:octez-sc-rollup-client-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_2 variables: - package: octez-sc-rollup-client-014-PtKathma + package: octez-sc-rollup-client-PtKathma -opam:octez-sc-rollup-client-015-PtLimaPt: +opam:octez-sc-rollup-client-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_2 variables: - package: octez-sc-rollup-client-015-PtLimaPt + package: octez-sc-rollup-client-PtLimaPt opam:octez-sc-rollup-client-alpha: extends: @@ -349,19 +349,19 @@ opam:octez-sc-rollup-client-alpha: variables: package: octez-sc-rollup-client-alpha -opam:octez-sc-rollup-node-014-PtKathma: +opam:octez-sc-rollup-node-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-sc-rollup-node-014-PtKathma + package: octez-sc-rollup-node-PtKathma -opam:octez-sc-rollup-node-015-PtLimaPt: +opam:octez-sc-rollup-node-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-sc-rollup-node-015-PtLimaPt + package: octez-sc-rollup-node-PtLimaPt opam:octez-sc-rollup-node-alpha: extends: @@ -377,19 +377,19 @@ opam:octez-signer: variables: package: octez-signer -opam:octez-tx-rollup-client-014-PtKathma: +opam:octez-tx-rollup-client-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-tx-rollup-client-014-PtKathma + package: octez-tx-rollup-client-PtKathma -opam:octez-tx-rollup-client-015-PtLimaPt: +opam:octez-tx-rollup-client-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-tx-rollup-client-015-PtLimaPt + package: octez-tx-rollup-client-PtLimaPt opam:octez-tx-rollup-client-alpha: extends: @@ -398,19 +398,19 @@ opam:octez-tx-rollup-client-alpha: variables: package: octez-tx-rollup-client-alpha -opam:octez-tx-rollup-node-014-PtKathma: +opam:octez-tx-rollup-node-PtKathma: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-tx-rollup-node-014-PtKathma + package: octez-tx-rollup-node-PtKathma -opam:octez-tx-rollup-node-015-PtLimaPt: +opam:octez-tx-rollup-node-PtLimaPt: extends: - .opam_template - .rules_template__trigger_opam_batch_1 variables: - package: octez-tx-rollup-node-015-PtLimaPt + package: octez-tx-rollup-node-PtLimaPt opam:octez-tx-rollup-node-alpha: extends: diff --git a/Makefile b/Makefile index 23ea7eec3c0c..00613735b414 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,8 @@ PACKAGES_SUBPROJECT:=$(patsubst %.opam,%,$(notdir $(shell find src vendors -name \*.opam -print))) PACKAGES:=$(patsubst %.opam,%,$(notdir $(shell find opam -name \*.opam -print))) -active_protocol_versions := $(shell cat script-inputs/active_protocol_versions) -tx_rollup_protocol_versions := $(shell cat script-inputs/tx_rollup_protocol_versions) -sc_rollup_protocol_versions := $(shell cat script-inputs/sc_rollup_protocol_versions) +active_protocol_versions_without_number := $(shell cat script-inputs/active_protocol_versions_without_number) +sc_rollup_protocol_versions_without_number := $(shell cat script-inputs/sc_rollup_protocol_versions_without_number) define directory_of_version src/proto_$(shell echo $1 | tr -- - _) @@ -34,22 +33,16 @@ CODE_QUALITY_REPORT := _reports/gl-code-quality-report.json PROFILE?=dev VALID_PROFILES=dev release static -RAW_BIN=node validator client admin-client signer codec protocol-compiler snoop proxy-server \ - $(foreach p, $(active_protocol_versions), baker-$(p)) \ - $(foreach p, $(active_protocol_versions), accuser-$(p)) \ - $(foreach p, $(active_protocol_versions), \ - $(shell if [ -f $(call directory_of_version,$p)/bin_endorser/dune ]; then \ - echo endorser-$(p); fi)) \ - $(foreach p, $(tx_rollup_protocol_versions), tx-rollup-node-$p) \ - $(foreach p, $(tx_rollup_protocol_versions), tx-rollup-client-$p) \ - $(foreach p, $(sc_rollup_protocol_versions), sc-rollup-node-$p) \ - $(foreach p, $(sc_rollup_protocol_versions), sc-rollup-client-$p) -OCTEZ_BIN=$(shell echo "$(RAW_BIN)" | sed 's/[^ ]* */octez-&/g') -TEZOS_BIN=$(shell echo "$(RAW_BIN)" | sed 's/[^ ]* */tezos-&/g') - -UNRELEASED_RAW_BIN=dal-node -UNRELEASED_OCTEZ_BIN=$(shell echo "$(UNRELEASED_RAW_BIN)" | sed 's/[^ ]* */octez-&/g') -UNRELEASED_TEZOS_BIN=$(shell echo "$(UNRELEASED_RAW_BIN)" | sed 's/[^ ]* */tezos-&/g') +OCTEZ_BIN=octez-node octez-validator octez-client octez-admin-client \ + octez-signer octez-codec octez-protocol-compiler octez-snoop octez-proxy-server \ + $(foreach p, $(active_protocol_versions_without_number), octez-baker-$(p)) \ + $(foreach p, $(active_protocol_versions_without_number), octez-accuser-$(p)) \ + $(foreach p, $(active_protocol_versions_without_number), octez-tx-rollup-node-$(p)) \ + $(foreach p, $(active_protocol_versions_without_number), octez-tx-rollup-client-$(p)) \ + $(foreach p, $(sc_rollup_protocol_versions_without_number), octez-sc-rollup-node-$(p)) \ + $(foreach p, $(sc_rollup_protocol_versions_without_number), octez-sc-rollup-client-$(p)) + +UNRELEASED_OCTEZ_BIN=octez-dal-node # See first mention of TEZOS_WITHOUT_OPAM. ifndef TEZOS_WITHOUT_OPAM @@ -85,16 +78,69 @@ build-parameters: $(OCTEZ_BIN): dune build $(COVERAGE_OPTIONS) --profile=$(PROFILE) _build/install/default/bin/$@ cp -f _build/install/default/bin/$@ ./ - name=$$(echo "$@" | sed 's/^octez-//'); rm -f "tezos-$$name"; ln -s octez-$$name tezos-$$name .PHONY: $(UNRELEASED_OCTEZ_BIN) $(UNRELEASED_OCTEZ_BIN): @dune build $(COVERAGE_OPTIONS) --profile=$(PROFILE) _build/install/default/bin/$@ @cp -f _build/install/default/bin/$@ ./ - @name=$$(echo "$@" | sed 's/^octez-//'); rm -f "tezos-$$name"; ln -s octez-$$name tezos-$$name +# Remove the old names of executables. +# Depending on the commit you are updating from (v14.0, v15 or some version of master), +# the exact list can vary. We just remove all of them. +# Don't try to generate this list from OCTEZ_BIN: this list should not evolve as +# we add new executables, and this list should contain executables that were built +# before (e.g. old protocol daemons) but that are no longer built. +.PHONY: clean-old-names +clean-old-names: + @rm -f tezos-node + @rm -f tezos-validator + @rm -f tezos-client + @rm -f tezos-admin-client + @rm -f tezos-signer + @rm -f tezos-codec + @rm -f tezos-protocol-compiler + @rm -f tezos-proxy-server + @rm -f tezos-baker-012-Psithaca + @rm -f tezos-accuser-012-Psithaca + @rm -f tezos-baker-013-PtJakart + @rm -f tezos-accuser-013-PtJakart + @rm -f tezos-tx-rollup-node-013-PtJakart + @rm -f tezos-tx-rollup-client-013-PtJakart + @rm -f tezos-baker-014-PtKathma + @rm -f tezos-accuser-014-PtKathma + @rm -f tezos-tx-rollup-node-014-PtKathma + @rm -f tezos-tx-rollup-client-014-PtKathma + @rm -f tezos-baker-015-PtLimaPt + @rm -f tezos-accuser-015-PtLimaPt + @rm -f tezos-tx-rollup-node-015-PtLimaPt + @rm -f tezos-tx-rollup-client-015-PtLimaPt + @rm -f tezos-baker-alpha + @rm -f tezos-accuser-alpha + @rm -f tezos-tx-rollup-node-alpha + @rm -f tezos-tx-rollup-client-alpha + @rm -f tezos-sc-rollup-node-alpha + @rm -f tezos-sc-rollup-client-alpha + @rm -f tezos-snoop + @rm -f tezos-dal-node + @rm -f octez-baker-012-Psithaca + @rm -f octez-accuser-012-Psithaca + @rm -f octez-baker-013-PtJakart + @rm -f octez-accuser-013-PtJakart + @rm -f octez-tx-rollup-node-013-PtJakart + @rm -f octez-tx-rollup-client-013-PtJakart + @rm -f octez-baker-014-PtKathma + @rm -f octez-accuser-014-PtKathma + @rm -f octez-tx-rollup-node-014-PtKathma + @rm -f octez-tx-rollup-client-014-PtKathma + @rm -f octez-baker-015-PtLimaPt + @rm -f octez-accuser-015-PtLimaPt + @rm -f octez-tx-rollup-node-015-PtLimaPt + @rm -f octez-tx-rollup-client-015-PtLimaPt + +# See comment of clean-old-names for an explanation regarding why we do not try +# to generate the symbolic links from OCTEZ_BIN. .PHONY: build -build: +build: clean-old-names ifneq (${current_ocaml_version},${ocaml_version}) $(error Unexpected ocaml version (found: ${current_ocaml_version}, expected: ${ocaml_version})) endif @@ -102,7 +148,26 @@ endif $(foreach b, $(OCTEZ_BIN), _build/install/default/bin/${b}) \ @copy-parameters @cp -f $(foreach b, $(OCTEZ_BIN), _build/install/default/bin/${b}) ./ - @$(foreach b, $(RAW_BIN), rm -f ./tezos-${b}; ln -s octez-${b} tezos-${b};) + @ln -s octez-node tezos-node + @ln -s octez-validator tezos-validator + @ln -s octez-client tezos-client + @ln -s octez-admin-client tezos-admin-client + @ln -s octez-signer tezos-signer + @ln -s octez-codec tezos-codec + @ln -s octez-protocol-compiler tezos-protocol-compiler + @ln -s octez-proxy-server tezos-proxy-server + @ln -s octez-baker-PtKathma tezos-baker-014-PtKathma + @ln -s octez-accuser-PtKathma tezos-accuser-014-PtKathma + @ln -s octez-tx-rollup-node-PtKathma tezos-tx-rollup-node-014-PtKathma + @ln -s octez-tx-rollup-client-PtKathma tezos-tx-rollup-client-014-PtKathma + @ln -s octez-baker-PtLimaPt tezos-baker-015-PtLimaPt + @ln -s octez-accuser-PtLimaPt tezos-accuser-015-PtLimaPt + @ln -s octez-tx-rollup-node-PtLimaPt tezos-tx-rollup-node-015-PtLimaPt + @ln -s octez-tx-rollup-client-PtLimaPt tezos-tx-rollup-client-015-PtLimaPt + @ln -s octez-baker-alpha tezos-baker-alpha + @ln -s octez-accuser-alpha tezos-accuser-alpha + @ln -s octez-tx-rollup-node-alpha tezos-tx-rollup-node-alpha + @ln -s octez-tx-rollup-client-alpha tezos-tx-rollup-client-alpha # List protocols, i.e. directories proto_* in src with a TEZOS_PROTOCOL file. TEZOS_PROTOCOL_FILES=$(wildcard src/proto_*/lib_protocol/TEZOS_PROTOCOL) @@ -346,7 +411,6 @@ endif $(foreach b, $(OCTEZ_BIN) $(UNRELEASED_OCTEZ_BIN), _build/install/default/bin/${b}) \ @copy-parameters @cp -f $(foreach b, $(OCTEZ_BIN) $(UNRELEASED_OCTEZ_BIN), _build/install/default/bin/${b}) ./ - @$(foreach b, $(RAW_BIN) $(UNRELEASED_RAW_BIN), rm -f ./tezos-${b}; ln -s octez-${b} tezos-${b};) .PHONY: docker-image-build docker-image-build: @@ -408,9 +472,9 @@ coverage-clean: @-rm -Rf ${COVERAGE_OUTPUT}/*.coverage ${COVERAGE_REPORT} .PHONY: clean -clean: coverage-clean +clean: coverage-clean clean-old-names @-dune clean - @-rm -f ${OCTEZ_BIN} ${TEZOS_BIN} ${UNRELEASED_OCTEZ_BIN} ${UNRELEASED_TEZOS_BIN} + @-rm -f ${OCTEZ_BIN} ${UNRELEASED_OCTEZ_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/build.Dockerfile b/build.Dockerfile index d5d90c682e34..6ff4a2159a9e 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -12,8 +12,8 @@ WORKDIR /home/tezos RUN mkdir -p /home/tezos/tezos/scripts /home/tezos/tezos/script-inputs /home/tezos/tezos/parameters COPY --chown=tezos:nogroup Makefile tezos COPY --chown=tezos:nogroup script-inputs/active_protocol_versions tezos/script-inputs/ -COPY --chown=tezos:nogroup script-inputs/tx_rollup_protocol_versions tezos/script-inputs/ -COPY --chown=tezos:nogroup script-inputs/sc_rollup_protocol_versions tezos/script-inputs/ +COPY --chown=tezos:nogroup script-inputs/active_protocol_versions_without_number tezos/script-inputs/ +COPY --chown=tezos:nogroup script-inputs/sc_rollup_protocol_versions_without_number tezos/script-inputs/ COPY --chown=tezos:nogroup dune tezos COPY --chown=tezos:nogroup scripts/version.sh tezos/scripts/ COPY --chown=tezos:nogroup src tezos/src diff --git a/docs/developer/howto-freeze-protocols.rst b/docs/developer/howto-freeze-protocols.rst index 0f5760b5678e..6df7a07e8140 100644 --- a/docs/developer/howto-freeze-protocols.rst +++ b/docs/developer/howto-freeze-protocols.rst @@ -14,12 +14,20 @@ and "current protocol" refers to its successor, N+1. For instance, if The various pieces of code to be removed are within directory ``src/proto__/``, unless indicated otherwise. +Update Manifest +--------------- + +In :src:`manifest/main.ml`, look for ``let alpha = active Name.alpha``. +In one of the lines above it is the declaration of the protocol you are freezing. +Replace ``active`` by ``frozen`` for this protocol. +Run the manifest with ``make -C manifest``. + Remove Accuser, Baker --------------------- These daemons are no longer needed. Thus, the code in -``bin_{accuser,baker}/`` can be safely removed and the files -``script-inputs/active_protocol_versions`` and ``script-inputs/active_testing_protocol_versions`` should be +``bin_{accuser,baker}/`` can be safely removed and +``script-inputs/active_testing_protocol_versions`` should be modified accordingly. Remove Protocol Tests diff --git a/dune-project b/dune-project index c3403db5fbca..f153562b1fb6 100644 --- a/dune-project +++ b/dune-project @@ -2,11 +2,11 @@ (formatting (enabled_for ocaml)) (cram enable) (package (name internal-devtools)) -(package (name octez-accuser-014-PtKathma)) -(package (name octez-accuser-015-PtLimaPt)) +(package (name octez-accuser-PtKathma)) +(package (name octez-accuser-PtLimaPt)) (package (name octez-accuser-alpha)) -(package (name octez-baker-014-PtKathma)) -(package (name octez-baker-015-PtLimaPt)) +(package (name octez-baker-PtKathma)) +(package (name octez-baker-PtLimaPt)) (package (name octez-baker-alpha)) (package (name octez-client)) (package (name octez-codec)) @@ -14,19 +14,19 @@ (package (name octez-node)) (package (name octez-protocol-compiler)) (package (name octez-proxy-server)) -(package (name octez-sc-rollup-client-014-PtKathma)) -(package (name octez-sc-rollup-client-015-PtLimaPt)) +(package (name octez-sc-rollup-client-PtKathma)) +(package (name octez-sc-rollup-client-PtLimaPt)) (package (name octez-sc-rollup-client-alpha)) -(package (name octez-sc-rollup-node-014-PtKathma)) -(package (name octez-sc-rollup-node-015-PtLimaPt)) +(package (name octez-sc-rollup-node-PtKathma)) +(package (name octez-sc-rollup-node-PtLimaPt)) (package (name octez-sc-rollup-node-alpha)) (package (name octez-signer)) (package (name octez-snoop)) -(package (name octez-tx-rollup-client-014-PtKathma)) -(package (name octez-tx-rollup-client-015-PtLimaPt)) +(package (name octez-tx-rollup-client-PtKathma)) +(package (name octez-tx-rollup-client-PtLimaPt)) (package (name octez-tx-rollup-client-alpha)) -(package (name octez-tx-rollup-node-014-PtKathma)) -(package (name octez-tx-rollup-node-015-PtLimaPt)) +(package (name octez-tx-rollup-node-PtKathma)) +(package (name octez-tx-rollup-node-PtLimaPt)) (package (name octez-tx-rollup-node-alpha)) (package (name octez-validator)) (package (name tezos-014-PtKathma-test-helpers)) diff --git a/manifest/main.ml b/manifest/main.ml index e4df3965b7f3..1f53fbe8bcf6 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -3184,6 +3184,8 @@ module Protocol : sig val number : t -> number + val short_hash : t -> string + val status : t -> status val name_dash : t -> string @@ -3265,8 +3267,15 @@ end = struct val name_dash : t -> string val base_path : t -> string + + val short_hash : t -> string end = struct - type t = {name_underscore : string; name_dash : string; number : number} + type t = { + short_hash : string; + name_underscore : string; + name_dash : string; + number : number; + } let make name number = if @@ -3290,7 +3299,7 @@ end = struct let name_underscore = make_full_name '_' (String.map (function '-' -> '_' | c -> c) name) in - {number; name_dash; name_underscore} + {short_hash = name; number; name_dash; name_underscore} let v name number = make name (V number) @@ -3298,6 +3307,8 @@ end = struct let other name = make name Other + let short_hash t = t.short_hash + let number t = t.number let name_underscore t = t.name_underscore @@ -3365,6 +3376,8 @@ end = struct let number p = Name.number p.name + let short_hash p = Name.short_hash p.name + let status p = p.status let name_dash p = Name.name_dash p.name @@ -4019,6 +4032,7 @@ module Protocol = Protocol register @@ make ~name ~status:Not_mainnet ~main ~embedded ~client () let register_alpha_family status name = + let short_hash = Name.short_hash name in let name_dash = Name.name_dash name in let name_underscore = Name.name_underscore name in let number = Name.number name in @@ -4502,7 +4516,7 @@ module Protocol = Protocol let daemon daemon = only_if active @@ fun () -> public_exe - (sf "octez-%s-%s" daemon name_dash) + (sf "octez-%s-%s" daemon short_hash) ~internal_name:(sf "main_%s_%s" daemon name_underscore) ~path:(path // sf "bin_%s" daemon) ~synopsis:(sf "Tezos/Protocol: %s binary" daemon) @@ -4584,7 +4598,7 @@ module Protocol = Protocol let _sc_rollup_client = only_if (active && N.(number >= 013)) @@ fun () -> public_exe - (sf "octez-sc-rollup-client-%s" name_dash) + (sf "octez-sc-rollup-client-%s" short_hash) ~internal_name:(sf "main_sc_rollup_client_%s" name_underscore) ~path:(path // "bin_sc_rollup_client") ~synopsis:"Tezos/Protocol: `octez-sc-rollup-client-alpha` client binary" @@ -4609,7 +4623,7 @@ module Protocol = Protocol let _sc_rollup_node = only_if (active && N.(number >= 013)) @@ fun () -> public_exe - (sf "octez-sc-rollup-node-%s" name_dash) + (sf "octez-sc-rollup-node-%s" short_hash) ~internal_name:(sf "main_sc_rollup_node_%s" name_underscore) ~path:(path // "bin_sc_rollup_node") ~synopsis:"Tezos/Protocol: Smart Contract Rollup node binary" @@ -4686,7 +4700,7 @@ module Protocol = Protocol let _tx_rollup_client = only_if (active && N.(number >= 013)) @@ fun () -> public_exe - (sf "octez-tx-rollup-client-%s" name_dash) + (sf "octez-tx-rollup-client-%s" short_hash) ~internal_name:(sf "main_tx_rollup_client_%s" name_underscore) ~path:(path // "bin_tx_rollup_client") ~synopsis:"Tezos/Protocol: `octez-tx-rollup-client-alpha` client binary" @@ -4708,7 +4722,7 @@ module Protocol = Protocol let _tx_rollup_node = only_if (active && N.(number >= 013)) @@ fun () -> public_exe - (sf "octez-tx-rollup-node-%s" name_dash) + (sf "octez-tx-rollup-node-%s" short_hash) ~internal_name:(sf "main_tx_rollup_node_%s" name_underscore) ~path:(path // "bin_tx_rollup_node") ~synopsis:"Tezos/Protocol: Transaction Rollup node binary" @@ -5789,4 +5803,14 @@ let () = write "script-inputs/active_protocol_versions" @@ fun fmt -> List.iter (write_protocol fmt) Protocol.active +(* Generate active_protocol_versions_without_number. *) +let () = + let write_protocol fmt protocol = + match Protocol.number protocol with + | Alpha | V _ -> Format.fprintf fmt "%s\n" (Protocol.short_hash protocol) + | Other -> () + in + write "script-inputs/active_protocol_versions_without_number" @@ fun fmt -> + List.iter (write_protocol fmt) Protocol.active + let () = check ~exclude () diff --git a/opam/octez-accuser-014-PtKathma.opam b/opam/octez-accuser-PtKathma.opam similarity index 100% rename from opam/octez-accuser-014-PtKathma.opam rename to opam/octez-accuser-PtKathma.opam diff --git a/opam/octez-accuser-015-PtLimaPt.opam b/opam/octez-accuser-PtLimaPt.opam similarity index 100% rename from opam/octez-accuser-015-PtLimaPt.opam rename to opam/octez-accuser-PtLimaPt.opam diff --git a/opam/octez-baker-014-PtKathma.opam b/opam/octez-baker-PtKathma.opam similarity index 100% rename from opam/octez-baker-014-PtKathma.opam rename to opam/octez-baker-PtKathma.opam diff --git a/opam/octez-baker-015-PtLimaPt.opam b/opam/octez-baker-PtLimaPt.opam similarity index 100% rename from opam/octez-baker-015-PtLimaPt.opam rename to opam/octez-baker-PtLimaPt.opam diff --git a/opam/octez-sc-rollup-client-014-PtKathma.opam b/opam/octez-sc-rollup-client-PtKathma.opam similarity index 100% rename from opam/octez-sc-rollup-client-014-PtKathma.opam rename to opam/octez-sc-rollup-client-PtKathma.opam diff --git a/opam/octez-sc-rollup-client-015-PtLimaPt.opam b/opam/octez-sc-rollup-client-PtLimaPt.opam similarity index 100% rename from opam/octez-sc-rollup-client-015-PtLimaPt.opam rename to opam/octez-sc-rollup-client-PtLimaPt.opam diff --git a/opam/octez-sc-rollup-node-014-PtKathma.opam b/opam/octez-sc-rollup-node-PtKathma.opam similarity index 100% rename from opam/octez-sc-rollup-node-014-PtKathma.opam rename to opam/octez-sc-rollup-node-PtKathma.opam diff --git a/opam/octez-sc-rollup-node-015-PtLimaPt.opam b/opam/octez-sc-rollup-node-PtLimaPt.opam similarity index 100% rename from opam/octez-sc-rollup-node-015-PtLimaPt.opam rename to opam/octez-sc-rollup-node-PtLimaPt.opam diff --git a/opam/octez-tx-rollup-client-014-PtKathma.opam b/opam/octez-tx-rollup-client-PtKathma.opam similarity index 100% rename from opam/octez-tx-rollup-client-014-PtKathma.opam rename to opam/octez-tx-rollup-client-PtKathma.opam diff --git a/opam/octez-tx-rollup-client-015-PtLimaPt.opam b/opam/octez-tx-rollup-client-PtLimaPt.opam similarity index 100% rename from opam/octez-tx-rollup-client-015-PtLimaPt.opam rename to opam/octez-tx-rollup-client-PtLimaPt.opam diff --git a/opam/octez-tx-rollup-node-014-PtKathma.opam b/opam/octez-tx-rollup-node-PtKathma.opam similarity index 100% rename from opam/octez-tx-rollup-node-014-PtKathma.opam rename to opam/octez-tx-rollup-node-PtKathma.opam diff --git a/opam/octez-tx-rollup-node-015-PtLimaPt.opam b/opam/octez-tx-rollup-node-PtLimaPt.opam similarity index 100% rename from opam/octez-tx-rollup-node-015-PtLimaPt.opam rename to opam/octez-tx-rollup-node-PtLimaPt.opam diff --git a/script-inputs/active_protocol_versions_without_number b/script-inputs/active_protocol_versions_without_number new file mode 100644 index 000000000000..e8214a22ba14 --- /dev/null +++ b/script-inputs/active_protocol_versions_without_number @@ -0,0 +1,3 @@ +PtKathma +PtLimaPt +alpha diff --git a/script-inputs/active_testing_protocol_versions b/script-inputs/active_testing_protocol_versions index e75bdf23f464..fe88a7a8ac54 100644 --- a/script-inputs/active_testing_protocol_versions +++ b/script-inputs/active_testing_protocol_versions @@ -1,5 +1,4 @@ 000-Ps9mPmXa -011-PtHangz2 demo-counter demo-noops genesis diff --git a/script-inputs/binaries-for-release b/script-inputs/binaries-for-release index 89b00028bb65..29176486a1a6 100644 --- a/script-inputs/binaries-for-release +++ b/script-inputs/binaries-for-release @@ -9,15 +9,15 @@ octez-sc-rollup-node-alpha octez-sc-rollup-client-alpha octez-accuser-alpha octez-baker-alpha -octez-tx-rollup-node-015-PtLimaPt -octez-tx-rollup-client-015-PtLimaPt -octez-sc-rollup-node-015-PtLimaPt -octez-sc-rollup-client-015-PtLimaPt -octez-accuser-015-PtLimaPt -octez-baker-015-PtLimaPt -octez-tx-rollup-node-014-PtKathma -octez-tx-rollup-client-014-PtKathma -octez-sc-rollup-node-014-PtKathma -octez-sc-rollup-client-014-PtKathma -octez-accuser-014-PtKathma -octez-baker-014-PtKathma +octez-tx-rollup-node-PtLimaPt +octez-tx-rollup-client-PtLimaPt +octez-sc-rollup-node-PtLimaPt +octez-sc-rollup-client-PtLimaPt +octez-accuser-PtLimaPt +octez-baker-PtLimaPt +octez-tx-rollup-node-PtKathma +octez-tx-rollup-client-PtKathma +octez-sc-rollup-node-PtKathma +octez-sc-rollup-client-PtKathma +octez-accuser-PtKathma +octez-baker-PtKathma diff --git a/script-inputs/sc_rollup_protocol_versions b/script-inputs/sc_rollup_protocol_versions_without_number similarity index 100% rename from script-inputs/sc_rollup_protocol_versions rename to script-inputs/sc_rollup_protocol_versions_without_number diff --git a/script-inputs/static-packages b/script-inputs/static-packages index 3a9e485d4736..82fcc6b711ac 100644 --- a/script-inputs/static-packages +++ b/script-inputs/static-packages @@ -1,8 +1,8 @@ -octez-accuser-014-PtKathma -octez-accuser-015-PtLimaPt +octez-accuser-PtKathma +octez-accuser-PtLimaPt octez-accuser-alpha -octez-baker-014-PtKathma -octez-baker-015-PtLimaPt +octez-baker-PtKathma +octez-baker-PtLimaPt octez-baker-alpha octez-client octez-codec @@ -10,19 +10,19 @@ octez-dal-node octez-node octez-protocol-compiler octez-proxy-server -octez-sc-rollup-client-014-PtKathma -octez-sc-rollup-client-015-PtLimaPt +octez-sc-rollup-client-PtKathma +octez-sc-rollup-client-PtLimaPt octez-sc-rollup-client-alpha -octez-sc-rollup-node-014-PtKathma -octez-sc-rollup-node-015-PtLimaPt +octez-sc-rollup-node-PtKathma +octez-sc-rollup-node-PtLimaPt octez-sc-rollup-node-alpha octez-signer octez-snoop -octez-tx-rollup-client-014-PtKathma -octez-tx-rollup-client-015-PtLimaPt +octez-tx-rollup-client-PtKathma +octez-tx-rollup-client-PtLimaPt octez-tx-rollup-client-alpha -octez-tx-rollup-node-014-PtKathma -octez-tx-rollup-node-015-PtLimaPt +octez-tx-rollup-node-PtKathma +octez-tx-rollup-node-PtLimaPt octez-tx-rollup-node-alpha octez-validator tezos-version diff --git a/script-inputs/tx_rollup_protocol_versions b/script-inputs/tx_rollup_protocol_versions deleted file mode 100644 index e0a8cdf0f840..000000000000 --- a/script-inputs/tx_rollup_protocol_versions +++ /dev/null @@ -1,3 +0,0 @@ -014-PtKathma -015-PtLimaPt -alpha diff --git a/src/bin_client/octez-init-sandboxed-client.sh b/src/bin_client/octez-init-sandboxed-client.sh index 90f6dfc92149..8166ad6c2caf 100755 --- a/src/bin_client/octez-init-sandboxed-client.sh +++ b/src/bin_client/octez-init-sandboxed-client.sh @@ -158,7 +158,7 @@ main () { echo "exec $admin_client \"\$@\"" >> $client_dir/bin/octez-admin-client chmod +x $client_dir/bin/octez-admin-client - for protocol in $(cat $bin_dir/../../script-inputs/active_protocol_versions); do + for protocol in $(cat $bin_dir/../../script-inputs/active_protocol_versions_without_number); do protocol_underscore=$(echo $protocol | tr -- - _) local_baker="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_baker/main_baker_$protocol_underscore.exe" local_endorser="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_endorser/main_endorser_$protocol_underscore.exe" diff --git a/src/proto_014_PtKathma/bin_accuser/dune b/src/proto_014_PtKathma/bin_accuser/dune index a9484a98452c..b41c9118c70f 100644 --- a/src/proto_014_PtKathma/bin_accuser/dune +++ b/src/proto_014_PtKathma/bin_accuser/dune @@ -3,8 +3,8 @@ (executable (name main_accuser_014_PtKathma) - (public_name octez-accuser-014-PtKathma) - (package octez-accuser-014-PtKathma) + (public_name octez-accuser-PtKathma) + (package octez-accuser-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_014_PtKathma/bin_baker/dune b/src/proto_014_PtKathma/bin_baker/dune index a13b6d764d35..07ebeecf276d 100644 --- a/src/proto_014_PtKathma/bin_baker/dune +++ b/src/proto_014_PtKathma/bin_baker/dune @@ -3,8 +3,8 @@ (executable (name main_baker_014_PtKathma) - (public_name octez-baker-014-PtKathma) - (package octez-baker-014-PtKathma) + (public_name octez-baker-PtKathma) + (package octez-baker-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_014_PtKathma/bin_sc_rollup_client/dune b/src/proto_014_PtKathma/bin_sc_rollup_client/dune index 5db07280793b..43431f89f6cd 100644 --- a/src/proto_014_PtKathma/bin_sc_rollup_client/dune +++ b/src/proto_014_PtKathma/bin_sc_rollup_client/dune @@ -3,8 +3,8 @@ (executable (name main_sc_rollup_client_014_PtKathma) - (public_name octez-sc-rollup-client-014-PtKathma) - (package octez-sc-rollup-client-014-PtKathma) + (public_name octez-sc-rollup-client-PtKathma) + (package octez-sc-rollup-client-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_014_PtKathma/bin_sc_rollup_node/dune b/src/proto_014_PtKathma/bin_sc_rollup_node/dune index cf24c02add7b..dedeab78fee0 100644 --- a/src/proto_014_PtKathma/bin_sc_rollup_node/dune +++ b/src/proto_014_PtKathma/bin_sc_rollup_node/dune @@ -3,8 +3,8 @@ (executable (name main_sc_rollup_node_014_PtKathma) - (public_name octez-sc-rollup-node-014-PtKathma) - (package octez-sc-rollup-node-014-PtKathma) + (public_name octez-sc-rollup-node-PtKathma) + (package octez-sc-rollup-node-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_014_PtKathma/bin_tx_rollup_client/dune b/src/proto_014_PtKathma/bin_tx_rollup_client/dune index b4df4df289fb..654db446a671 100644 --- a/src/proto_014_PtKathma/bin_tx_rollup_client/dune +++ b/src/proto_014_PtKathma/bin_tx_rollup_client/dune @@ -3,8 +3,8 @@ (executable (name main_tx_rollup_client_014_PtKathma) - (public_name octez-tx-rollup-client-014-PtKathma) - (package octez-tx-rollup-client-014-PtKathma) + (public_name octez-tx-rollup-client-PtKathma) + (package octez-tx-rollup-client-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_014_PtKathma/bin_tx_rollup_node/dune b/src/proto_014_PtKathma/bin_tx_rollup_node/dune index 68c95129d0b4..68f16af2e270 100644 --- a/src/proto_014_PtKathma/bin_tx_rollup_node/dune +++ b/src/proto_014_PtKathma/bin_tx_rollup_node/dune @@ -3,8 +3,8 @@ (executable (name main_tx_rollup_node_014_PtKathma) - (public_name octez-tx-rollup-node-014-PtKathma) - (package octez-tx-rollup-node-014-PtKathma) + (public_name octez-tx-rollup-node-PtKathma) + (package octez-tx-rollup-node-PtKathma) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_accuser/dune b/src/proto_015_PtLimaPt/bin_accuser/dune index 9ad9a27f1e9c..ddf91702550d 100644 --- a/src/proto_015_PtLimaPt/bin_accuser/dune +++ b/src/proto_015_PtLimaPt/bin_accuser/dune @@ -3,8 +3,8 @@ (executable (name main_accuser_015_PtLimaPt) - (public_name octez-accuser-015-PtLimaPt) - (package octez-accuser-015-PtLimaPt) + (public_name octez-accuser-PtLimaPt) + (package octez-accuser-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_baker/dune b/src/proto_015_PtLimaPt/bin_baker/dune index 8fefbbaa3e47..89dc2347a952 100644 --- a/src/proto_015_PtLimaPt/bin_baker/dune +++ b/src/proto_015_PtLimaPt/bin_baker/dune @@ -3,8 +3,8 @@ (executable (name main_baker_015_PtLimaPt) - (public_name octez-baker-015-PtLimaPt) - (package octez-baker-015-PtLimaPt) + (public_name octez-baker-PtLimaPt) + (package octez-baker-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_sc_rollup_client/dune b/src/proto_015_PtLimaPt/bin_sc_rollup_client/dune index 340fc80b26db..6c6f6693d481 100644 --- a/src/proto_015_PtLimaPt/bin_sc_rollup_client/dune +++ b/src/proto_015_PtLimaPt/bin_sc_rollup_client/dune @@ -3,8 +3,8 @@ (executable (name main_sc_rollup_client_015_PtLimaPt) - (public_name octez-sc-rollup-client-015-PtLimaPt) - (package octez-sc-rollup-client-015-PtLimaPt) + (public_name octez-sc-rollup-client-PtLimaPt) + (package octez-sc-rollup-client-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_sc_rollup_node/dune b/src/proto_015_PtLimaPt/bin_sc_rollup_node/dune index 1158409d4a5a..14d1807fcbd3 100644 --- a/src/proto_015_PtLimaPt/bin_sc_rollup_node/dune +++ b/src/proto_015_PtLimaPt/bin_sc_rollup_node/dune @@ -3,8 +3,8 @@ (executable (name main_sc_rollup_node_015_PtLimaPt) - (public_name octez-sc-rollup-node-015-PtLimaPt) - (package octez-sc-rollup-node-015-PtLimaPt) + (public_name octez-sc-rollup-node-PtLimaPt) + (package octez-sc-rollup-node-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_tx_rollup_client/dune b/src/proto_015_PtLimaPt/bin_tx_rollup_client/dune index 9990f349d8d2..ef9701f34aab 100644 --- a/src/proto_015_PtLimaPt/bin_tx_rollup_client/dune +++ b/src/proto_015_PtLimaPt/bin_tx_rollup_client/dune @@ -3,8 +3,8 @@ (executable (name main_tx_rollup_client_015_PtLimaPt) - (public_name octez-tx-rollup-client-015-PtLimaPt) - (package octez-tx-rollup-client-015-PtLimaPt) + (public_name octez-tx-rollup-client-PtLimaPt) + (package octez-tx-rollup-client-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/src/proto_015_PtLimaPt/bin_tx_rollup_node/dune b/src/proto_015_PtLimaPt/bin_tx_rollup_node/dune index 388555083dc1..b753436bc366 100644 --- a/src/proto_015_PtLimaPt/bin_tx_rollup_node/dune +++ b/src/proto_015_PtLimaPt/bin_tx_rollup_node/dune @@ -3,8 +3,8 @@ (executable (name main_tx_rollup_node_015_PtLimaPt) - (public_name octez-tx-rollup-node-015-PtLimaPt) - (package octez-tx-rollup-node-015-PtLimaPt) + (public_name octez-tx-rollup-node-PtLimaPt) + (package octez-tx-rollup-node-PtLimaPt) (instrumentation (backend bisect_ppx)) (libraries tezos-base diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index e47c30f9d1b0..3c792ac843be 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -173,7 +173,7 @@ val rpc_path_query_to_string : ?query_string:query_string -> path -> string [log_*], [hooks] and [env] arguments. In particular, [env] can be used to pass [TEZOS_LOG], e.g. - [("TEZOS_LOG", Protocol.daemon_name protocol ^ ".proxy_rpc->debug")] to enable + [("TEZOS_LOG", Protocol.encoding_prefix protocol ^ ".proxy_rpc->debug")] to enable logging. *) val rpc : ?log_command:bool -> diff --git a/tezt/lib_tezos/operation_legacy.ml b/tezt/lib_tezos/operation_legacy.ml index 03d0ecd6529b..9664b0a551f4 100644 --- a/tezt/lib_tezos/operation_legacy.ml +++ b/tezt/lib_tezos/operation_legacy.ml @@ -238,7 +238,7 @@ let forge_operation ?protocol ~branch ~batch client = @@ RPC.post_chain_block_helpers_forge_operations ~data:op_json () >|= JSON.as_string | Some p -> - let name = Protocol.daemon_name p ^ ".operation.unsigned" in + let name = Protocol.encoding_prefix p ^ ".operation.unsigned" in Codec.encode ~name op_json in return (`Hex hex) diff --git a/tezt/lib_tezos/protocol.ml b/tezt/lib_tezos/protocol.ml index e1e058403509..420ee9f18f8b 100644 --- a/tezt/lib_tezos/protocol.ml +++ b/tezt/lib_tezos/protocol.ml @@ -66,16 +66,15 @@ let parameter_file ?(constants = default_constants) protocol = in sf "src/%s/parameters/%s-parameters.json" (directory protocol) name -let daemon_name = function - | Alpha -> "alpha" - | Kathmandu -> "014-PtKathma" - | Lima -> "015-PtLimaPt" +let daemon_name = function Alpha -> "alpha" | p -> String.sub (hash p) 0 8 let accuser proto = "./octez-accuser-" ^ daemon_name proto let baker proto = "./octez-baker-" ^ daemon_name proto -let encoding_prefix = daemon_name +let encoding_prefix = function + | Alpha -> "alpha" + | p -> sf "%03d-%s" (number p) (String.sub (hash p) 0 8) type parameter_overrides = (string list * [`None | `Int of int | `String_of_int of int | JSON.u]) list diff --git a/tezt/lib_tezos/protocol.mli b/tezt/lib_tezos/protocol.mli index 66215fae7378..b42795ef0f41 100644 --- a/tezt/lib_tezos/protocol.mli +++ b/tezt/lib_tezos/protocol.mli @@ -77,12 +77,12 @@ val accuser : t -> string (** Get the path of the baker of a protocol, such as ["./octez-baker-alpha"]. *) val baker : t -> string -(** Get the part of the daemon name that is specific to a protocol (e.g. ["008-PtEdo2Zk"]). *) -val daemon_name : t -> string +(** Get the part of the daemon name that is specific to a protocol (e.g. ["PtEdo2Zk"]). -(** Get the part which is added at the beginning of all encoding names. + This should not be used for anything except to compute the name of executables. *) +val daemon_name : t -> string - It turns out this is equal to what the [daemon_name] function returns. *) +(** Get the part which is added at the beginning of all encoding names. *) val encoding_prefix : t -> string (** Values to override in protocol parameters. diff --git a/tezt/tests/liquidity_baking_per_block_votes.ml b/tezt/tests/liquidity_baking_per_block_votes.ml index 55231613f0d4..d368b79f0430 100644 --- a/tezt/tests/liquidity_baking_per_block_votes.ml +++ b/tezt/tests/liquidity_baking_per_block_votes.ml @@ -105,7 +105,7 @@ let test_all_per_block_votes = ~supports:(Protocol.From_protocol 012) @@ fun protocol -> let ( >|= ) = Lwt.( >|= ) in - let error_prefix = "client." ^ Protocol.daemon_name protocol ^ "." in + let error_prefix = "client." ^ Protocol.encoding_prefix protocol ^ "." in if Sys.file_exists default_votefile then Test.fail diff --git a/tezt/tests/proxy.ml b/tezt/tests/proxy.ml index fcba954723c2..da6a35742401 100644 --- a/tezt/tests/proxy.ml +++ b/tezt/tests/proxy.ml @@ -61,7 +61,7 @@ let test_cache_at_most_once ?query_string path = @@ fun protocol -> let* _, client = init ~protocol () in let env = - [("TEZOS_LOG", Protocol.daemon_name protocol ^ ".proxy_rpc->debug")] + [("TEZOS_LOG", Protocol.encoding_prefix protocol ^ ".proxy_rpc->debug")] |> List.to_seq |> String_map.of_seq in let* stderr = @@ -179,7 +179,7 @@ let test_context_suffix_no_rpc ?query_string path = let env = String_map.singleton "TEZOS_LOG" - (Protocol.daemon_name protocol ^ ".proxy_rpc->debug") + (Protocol.encoding_prefix protocol ^ ".proxy_rpc->debug") in let* stderr = Client.spawn_rpc ~env ?query_string Client.GET path client diff --git a/tezt/tests/retro.ml b/tezt/tests/retro.ml index ea266570413c..56759efbf158 100644 --- a/tezt/tests/retro.ml +++ b/tezt/tests/retro.ml @@ -39,12 +39,12 @@ let init_client proto = let encode protocol what json = Codec.encode - ~name:(String.concat "." [Protocol.daemon_name protocol; what]) + ~name:(String.concat "." [Protocol.encoding_prefix protocol; what]) json let decode protocol what hex = Codec.decode - ~name:(String.concat "." [Protocol.daemon_name protocol; what]) + ~name:(String.concat "." [Protocol.encoding_prefix protocol; what]) hex let encode_and_sign_operation protocol client op = -- GitLab From df5d227e76851586ff3bfcc69fbc1ff442fc979f Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Mon, 3 Oct 2022 12:35:45 +0200 Subject: [PATCH 3/3] Doc: update renaming banner (protocol numbers) --- docs/_templates/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_templates/page.html b/docs/_templates/page.html index 0f4f5793e9d4..135ceabf6a64 100644 --- a/docs/_templates/page.html +++ b/docs/_templates/page.html @@ -1,7 +1,7 @@ {% block header %}

- Starting from Octez release 15.0, the Octez binaries will be named "octez-*" (e.g. "octez-client", "octez-node" instead of "tezos-client", "tezos-node"). + Starting from Octez release 15.0, the names of the Octez binaries will start with "octez-" and will not include any protocol number (e.g. "octez-client", "octez-node", "octez-baker-PtKathma" instead of "tezos-client", "tezos-node", "tezos-baker-015-PtKathma"). These renamings are already in place on the "master" branch. The legacy names ("tezos-*") are still used in the documentation for now and will be supported through symbolic links until the majority of users will upgrade to releases >= 15.0.

-- GitLab