From f0c2191f32cc41df45828b6c7b57e0ccda77b3ec Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Mon, 3 Feb 2025 12:31:10 +0100 Subject: [PATCH 1/5] packages: octez-baker now recomends the octez-dal-node --- scripts/packaging/octez/debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/packaging/octez/debian/control b/scripts/packaging/octez/debian/control index bb1942c7d96b..89236fce88d0 100644 --- a/scripts/packaging/octez/debian/control +++ b/scripts/packaging/octez/debian/control @@ -54,13 +54,14 @@ Depends: ${misc:Depends}, ${shlibs:Depends}, octez-node (= ${source:Version}), curl, systemd -Recommends: octez-signer (= ${source:Version}), +Recommends: octez-signer (= ${source:Version}), octez-dal-node (= ${source:Version}) Description: Octez baking software for the Tezos blockchain. The Octez baker includes the necessary tools and functionalities for participating in the baking process, such as block creation, attestations, and protocol-specific consensus mechanisms. . - This package installs the baker, the accuser and the Octez node. For key + This package installs the baker, the accuser and the Octez node. By default this + package also installs the octez-signer and octez-dal-node in observer mode. For key management it is recommended to install a remote signer of a different host. Package: octez-signer @@ -108,7 +109,6 @@ Description: Smart Rollup node for the Tezos blockchain. Package: octez-dal-node Architecture: amd64 arm64 Depends: ${misc:Depends}, ${shlibs:Depends}, - octez-zcash-dal-params, systemd Suggests: octez-baker (= ${source:Version}) Description: Octez distribution Availability Layer (DAL) node -- GitLab From cb7b47afa1a1ff045faba08fd6e16b8881ff7567 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Mon, 3 Feb 2025 12:34:44 +0100 Subject: [PATCH 2/5] packages: remove obsolete package octez-dal-zcash-params --- scripts/packaging/build-deb-local.sh | 5 ----- scripts/packaging/octez-data/debian/control | 6 ------ .../octez-data/debian/octez-zcash-dal-params.install | 1 - .../debian/octez-zcash-dal-params.lintian-overrides | 1 - scripts/packaging/octez/debian/control | 11 +++++++---- 5 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 scripts/packaging/octez-data/debian/octez-zcash-dal-params.install delete mode 100644 scripts/packaging/octez-data/debian/octez-zcash-dal-params.lintian-overrides diff --git a/scripts/packaging/build-deb-local.sh b/scripts/packaging/build-deb-local.sh index 71f8fb17bee4..bfa15daedff7 100755 --- a/scripts/packaging/build-deb-local.sh +++ b/scripts/packaging/build-deb-local.sh @@ -35,11 +35,6 @@ zcash() { ln -s "$OPAM_SWITCH_PREFIX/share/zcash-params" scripts/packaging/octez-data/ fi - if [ ! -e scripts/packaging/octez-data/dal-trusted-setup ]; then - scripts/install_dal_trusted_setup.sh - ln -s "$OPAM_SWITCH_PREFIX/share/dal-trusted-setup" scripts/packaging/octez-data/ - fi - cd scripts/packaging/octez-data DEB_BUILD_OPTIONS=noautodbgsym dpkg-buildpackage -tc -b --no-sign -sa cd - diff --git a/scripts/packaging/octez-data/debian/control b/scripts/packaging/octez-data/debian/control index cc45020e41f2..2b30a748ff3b 100644 --- a/scripts/packaging/octez-data/debian/control +++ b/scripts/packaging/octez-data/debian/control @@ -10,9 +10,3 @@ Multi-Arch: foreign Description: Octez zcash parameters This package provides Zcash parameters necessary for the Octez node, covering cryptographic keys, zk-SNARKs, and protocol configurations. - -Package: octez-zcash-dal-params -Architecture: all -Multi-Arch: foreign -Description: Octez zcash dal parameters - This package provides Zcash parameters necessary for the Octez DAL node. diff --git a/scripts/packaging/octez-data/debian/octez-zcash-dal-params.install b/scripts/packaging/octez-data/debian/octez-zcash-dal-params.install deleted file mode 100644 index b9626802abd1..000000000000 --- a/scripts/packaging/octez-data/debian/octez-zcash-dal-params.install +++ /dev/null @@ -1 +0,0 @@ -dal-trusted-setup/* /usr/share/dal_trusted_setup diff --git a/scripts/packaging/octez-data/debian/octez-zcash-dal-params.lintian-overrides b/scripts/packaging/octez-data/debian/octez-zcash-dal-params.lintian-overrides deleted file mode 100644 index e428ecb684e4..000000000000 --- a/scripts/packaging/octez-data/debian/octez-zcash-dal-params.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -octez-zcash-dal-params: initial-upload-closes-no-bugs diff --git a/scripts/packaging/octez/debian/control b/scripts/packaging/octez/debian/control index 89236fce88d0..431b15dec772 100644 --- a/scripts/packaging/octez/debian/control +++ b/scripts/packaging/octez/debian/control @@ -54,15 +54,18 @@ Depends: ${misc:Depends}, ${shlibs:Depends}, octez-node (= ${source:Version}), curl, systemd -Recommends: octez-signer (= ${source:Version}), octez-dal-node (= ${source:Version}) +Recommends: + octez-signer (= ${source:Version}), + octez-dal-node (= ${source:Version}) Description: Octez baking software for the Tezos blockchain. The Octez baker includes the necessary tools and functionalities for participating in the baking process, such as block creation, attestations, and protocol-specific consensus mechanisms. . - This package installs the baker, the accuser and the Octez node. By default this - package also installs the octez-signer and octez-dal-node in observer mode. For key - management it is recommended to install a remote signer of a different host. + This package installs the baker, the accuser and the Octez node. By default, + installing this package causes the recommended packages octez-signer and + octez-dal-node to be installed as well. For key management it is recommended + to install a remote signer on a different host. Package: octez-signer Architecture: amd64 arm64 -- GitLab From a0861465849306dcc91a8c8f1dca1fa906c272e9 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Wed, 5 Feb 2025 14:04:25 +0100 Subject: [PATCH 3/5] packages: remove rpm package octez-zcash-dal-params --- scripts/packaging/build-rpm-local.sh | 3 +-- scripts/packaging/octez/rpm/SPECS/octez-dal-node.spec | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/packaging/build-rpm-local.sh b/scripts/packaging/build-rpm-local.sh index ec36b66db667..04d989fb42f7 100755 --- a/scripts/packaging/build-rpm-local.sh +++ b/scripts/packaging/build-rpm-local.sh @@ -96,8 +96,7 @@ packages() { zcash() { # Build data packages - cp -a "$OPAM_SWITCH_PREFIX/share/zcash-params/" \ - "$OPAM_SWITCH_PREFIX/share/dal-trusted-setup/" "$SPECS_DIR/" + cp -a "$OPAM_SWITCH_PREFIX/share/zcash-params/" "$SPECS_DIR/" grep "Package:" "$packaging_dir/scripts/packaging/octez-data/debian/control" | cut -d' ' -f2 | while read -r pkg; do diff --git a/scripts/packaging/octez/rpm/SPECS/octez-dal-node.spec b/scripts/packaging/octez/rpm/SPECS/octez-dal-node.spec index 6a559daa8de0..13b7b7db213d 100644 --- a/scripts/packaging/octez/rpm/SPECS/octez-dal-node.spec +++ b/scripts/packaging/octez/rpm/SPECS/octez-dal-node.spec @@ -6,7 +6,7 @@ Epoch: %{epoch} Release: 1%{?dist} Summary: Octez distribution Availability Layer (DAL) node License: MIT -Requires: octez-zcash-dal-params systemd +Requires: systemd Suggests: octez-baker %description The DAL node is responsible for temporarily storing data and providing it to -- GitLab From b2520cf98ac42e69a3e7219dca23f83a444b21f7 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Wed, 5 Feb 2025 12:37:18 +0100 Subject: [PATCH 4/5] package: add debconf scripts for DAL node --- scripts/packaging/build-deb-local.sh | 5 ++- .../packaging/octez/debian/octez-baker.config | 15 +++++++++ .../debian/octez-baker.lintian-overrides | 1 + .../octez/debian/octez-baker.postinst | 31 +++++++++++++++++++ .../octez/debian/octez-baker.preinst | 14 +++++++++ .../octez/debian/octez-baker.templates | 15 +++++++++ 6 files changed, 80 insertions(+), 1 deletion(-) diff --git a/scripts/packaging/build-deb-local.sh b/scripts/packaging/build-deb-local.sh index bfa15daedff7..59cf7ae41761 100755 --- a/scripts/packaging/build-deb-local.sh +++ b/scripts/packaging/build-deb-local.sh @@ -182,5 +182,8 @@ echo "All packages are available in ./scripts/packaging" # On the CI we have a specific job for it if [ -z "${CI:-}" ] && [ ${DEVEL} != "1" ]; then echo "Running lintian scripts/packaging/octez-*.deb" - lintian scripts/packaging/octez-*.deb --tag-display-limit 0 --verbose --fail-on warning + for p in scripts/packaging/octez-*.deb; do + lintian "$p" --tag-display-limit 0 --verbose --fail-on warning & + done + wait fi diff --git a/scripts/packaging/octez/debian/octez-baker.config b/scripts/packaging/octez/debian/octez-baker.config index ed1211a0971e..75a167833924 100755 --- a/scripts/packaging/octez/debian/octez-baker.config +++ b/scripts/packaging/octez/debian/octez-baker.config @@ -13,3 +13,18 @@ db_go || true db_input medium octez-baker/baker-key || true # shellcheck disable=SC2119 db_go || true + +db_input medium octez-baker/dal-node || true +# shellcheck disable=SC2119 +db_go || true + +db_get octez-baker/dal-node +if [ "$RET" = "true" ]; then + db_get octez-baker/dal-node-url + if [ -z "$RET" ]; then + db_set octez-baker/dal-node-url "http://127.0.0.1:10732" + fi + db_input low octez-baker/dal-node-url || true + # shellcheck disable=SC2119 + db_go || true +fi diff --git a/scripts/packaging/octez/debian/octez-baker.lintian-overrides b/scripts/packaging/octez/debian/octez-baker.lintian-overrides index b6af5634c937..c556086abac6 100644 --- a/scripts/packaging/octez/debian/octez-baker.lintian-overrides +++ b/scripts/packaging/octez/debian/octez-baker.lintian-overrides @@ -1 +1,2 @@ octez-baker: initial-upload-closes-no-bugs +octez-baker: malformed-question-in-templates diff --git a/scripts/packaging/octez/debian/octez-baker.postinst b/scripts/packaging/octez/debian/octez-baker.postinst index 8ecd4e7f7916..1cae9310a291 100755 --- a/scripts/packaging/octez/debian/octez-baker.postinst +++ b/scripts/packaging/octez/debian/octez-baker.postinst @@ -56,6 +56,22 @@ configure) else echo "#PROTOCOL=${RET}" >> /etc/default/octez-baker-next fi + + db_get octez-baker/dal-node + DAL=${RET} + case "$DAL" in + true) + db_get octez-baker/dal-node-url + DALURL=${RET} + echo "RUNTIME_OPTS=--dal-node $DALURL" >> /etc/default/octez-baker-next + echo "RUNTIME_OPTS=--dal-node $DALURL" >> /etc/default/octez-baker-active + ;; + false) + echo "RUNTIME_OPTS=--without-dal" >> /etc/default/octez-baker-next + echo "RUNTIME_OPTS=--without-dal" >> /etc/default/octez-baker-active + ;; + esac + mkdir -p /var/tezos/.tezos-client chown tezos:tezos /var/tezos/.tezos-client else @@ -78,6 +94,21 @@ configure) echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker-active echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker-next + db_get octez-baker/dal-node + DAL=${RET} + case "$DAL" in + true) + db_get octez-baker/dal-node-url + DALURL=${RET} + echo "RUNTIME_OPTS=--dal-node $DALURL" >> /etc/default/octez-baker-next + echo "RUNTIME_OPTS=--dal-node $DALURL" >> /etc/default/octez-baker-active + ;; + false) + echo "RUNTIME_OPTS=--without-dal" >> /etc/default/octez-baker-next + echo "RUNTIME_OPTS=--without-dal" >> /etc/default/octez-baker-active + ;; + esac + db_input high octez-baker/upgrade_note_current || true #shellcheck disable=SC2119 db_go || true diff --git a/scripts/packaging/octez/debian/octez-baker.preinst b/scripts/packaging/octez/debian/octez-baker.preinst index 097289363bae..cb6d8917de39 100755 --- a/scripts/packaging/octez/debian/octez-baker.preinst +++ b/scripts/packaging/octez/debian/octez-baker.preinst @@ -43,6 +43,20 @@ install | upgrade) #shellcheck disable=SC2154 db_set octez-baker/baker-key "$baking_key" fi + + echo "set dalurl=$dalurl" + if [ -n "${dalurl:-}" ]; then + if [ "$dalurl" = "" ]; then + #shellcheck disable=SC2154 + db_set octez-baker/dal-node false + else + db_set octez-baker/dal-node true + db_set octez-baker/dal-node-url "$dalurl" + fi + else + db_set octez-baker/dal-node true + fi + #shellcheck disable=SC2119 db_go fi diff --git a/scripts/packaging/octez/debian/octez-baker.templates b/scripts/packaging/octez/debian/octez-baker.templates index 87d56d502c85..db957b78aa3f 100644 --- a/scripts/packaging/octez/debian/octez-baker.templates +++ b/scripts/packaging/octez/debian/octez-baker.templates @@ -34,6 +34,21 @@ Description: The protocol associated to the baker: Type: select Choices: ${choices} +Template: octez-baker/dal-node +Type: boolean +Default: true +Description: Connect to the Octez DAL node ? + By default, the octez-dal-node package is installed alongside the octez-baker + package to participate to the DAL network. + . + Possible options: "--dal-node http://127.0.0.1:10732" or "--without-dal". + +Template: octez-baker/dal-node-url +Type: string +Default: http://127.0.0.1:10732 +Description: Specify the url of the RPC server of the Octez DAL node: + By default the octez-dal-node package is installed along side the octez-baker. + Template: octez-baker/upgrade_note_current Type: note Description: Important upgrade information -- GitLab From 885cb1d3705d0814996623ac76d7e91b716b6410 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Wed, 12 Feb 2025 10:12:56 +0100 Subject: [PATCH 5/5] packages: increase timeout for octez-node service --- scripts/packaging/octez/debian/octez-node.service | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/packaging/octez/debian/octez-node.service b/scripts/packaging/octez/debian/octez-node.service index b47fb58e34a2..f949a2782db0 100644 --- a/scripts/packaging/octez/debian/octez-node.service +++ b/scripts/packaging/octez/debian/octez-node.service @@ -7,6 +7,7 @@ After=network.target EnvironmentFile=-/etc/default/octez-node WorkingDirectory=/var/tezos Restart=on-failure +TimeoutSec=1500 User=tezos ExecStartPre=/usr/share/octez-node/octez-node-prestart.sh ExecStart=/usr/bin/octez-node run --data-dir $DATADIR --log-output /var/log/tezos/node.log $RUNTIME_OPTS -- GitLab