From 8df2903f29a208577ad9089455c2ae9024a22bf0 Mon Sep 17 00:00:00 2001 From: v Date: Sun, 29 Sep 2024 22:57:59 +0200 Subject: [PATCH] qena --- .github/workflows/containers.yml | 2 +- .github/workflows/release.yml | 2 +- build/build.lua | 2 +- .../protocols/PsqenaVw/protocol.hjson | 6 + .../PsqenaVw/sandbox-parameters.hjson | 128 ++++++++++++++++++ .../protocols/PsqenaVw/vote-file.hjson | 3 + containers/tezos/Containerfile | 15 ++ readme.md | 9 ++ src/tezbox.lua | 2 +- src/version-info.lua | 2 +- 10 files changed, 166 insertions(+), 5 deletions(-) create mode 100644 configuration/protocols/PsqenaVw/protocol.hjson create mode 100644 configuration/protocols/PsqenaVw/sandbox-parameters.hjson create mode 100644 configuration/protocols/PsqenaVw/vote-file.hjson diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index c973c16..2f1a466 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -55,7 +55,7 @@ jobs: context: . platforms: linux/amd64,linux/arm64 build-args: | - PROTOCOLS=PsParisC + PROTOCOLS=PsParisC,PsqenaVw IMAGE_TAG=octez-v20.2 GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ghcr.io/tez-capital/tezbox:tezos-v20.2.${{steps.prep.outputs.CURRENT_DATE}},ghcr.io/tez-capital/tezbox:tezos-v20.2,ghcr.io/tez-capital/tezbox:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37fb3e2..370bcea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: context: . platforms: linux/amd64,linux/arm64 build-args: | - PROTOCOLS=PsParisC + PROTOCOLS=PsParisC,PsqenaVw IMAGE_TAG=octez-v20.2 GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ghcr.io/tez-capital/tezbox:tezos-v20.2.${{steps.prep.outputs.CURRENT_DATE}},ghcr.io/tez-capital/tezbox:tezos-v20.2,ghcr.io/tez-capital/tezbox:latest diff --git a/build/build.lua b/build/build.lua index bdd70d7..f483f9b 100644 --- a/build/build.lua +++ b/build/build.lua @@ -22,7 +22,7 @@ end local function inject_license(filePath) local _content = fs.read_file(filePath) - local _, _shebangEnd = _content:find("#!/%S*") + local _, _shebangEnd = _content:find("#!/[^\n]*") local _license = [[ -- Copyright (C) 2024 tez.capital diff --git a/configuration/protocols/PsqenaVw/protocol.hjson b/configuration/protocols/PsqenaVw/protocol.hjson new file mode 100644 index 0000000..411927d --- /dev/null +++ b/configuration/protocols/PsqenaVw/protocol.hjson @@ -0,0 +1,6 @@ +id: psqena +short: PsqenaVw +hash: PsqenaVwjhUUm1JJXbrZTB1T5RVyQHBGDricbLPXjcZkxogDeTJ +aliases: [ + qenabox +] \ No newline at end of file diff --git a/configuration/protocols/PsqenaVw/sandbox-parameters.hjson b/configuration/protocols/PsqenaVw/sandbox-parameters.hjson new file mode 100644 index 0000000..6ce6b27 --- /dev/null +++ b/configuration/protocols/PsqenaVw/sandbox-parameters.hjson @@ -0,0 +1,128 @@ +{ + "consensus_rights_delay": 3, + "blocks_preservation_cycles": 1, + "delegate_parameters_activation_delay": 3, + "blocks_per_cycle": 12288, + "blocks_per_commitment": 96, + "nonce_revelation_threshold": 768, + "cycles_per_voting_period": 1, + "hard_gas_limit_per_operation": "1040000", + "hard_gas_limit_per_block": "1733333", + "proof_of_work_threshold": "281474976710655", + "minimal_stake": "6000000000", + "minimal_frozen_stake": "600000000", + "vdf_difficulty": "10000000000", + "origination_size": 257, + "issuance_weights": { + "base_total_issued_per_minute": "80007812", + "baking_reward_fixed_portion_weight": 5120, + "baking_reward_bonus_weight": 5120, + "attesting_reward_weight": 10240, + "seed_nonce_revelation_tip_weight": 1, + "vdf_revelation_tip_weight": 1 + }, + "cost_per_byte": "250", + "hard_storage_limit_per_operation": "60000", + "quorum_min": 2000, + "quorum_max": 7000, + "min_proposal_quorum": 500, + "liquidity_baking_subsidy": "5000000", + "liquidity_baking_toggle_ema_threshold": 1000000000, + "max_operations_time_to_live": 360, + "minimal_block_delay": "5", + "delay_increment_per_round": "2", + "consensus_committee_size": 7000, + "consensus_threshold": 4667, + "minimal_participation_ratio": { + "numerator": 2, + "denominator": 3 + }, + "limit_of_delegation_over_baking": 9, + "percentage_of_frozen_deposits_slashed_per_double_baking": 500, + "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, + "max_slashing_per_block": 10000, + "max_slashing_threshold": 2334, + "testnet_dictator": "tz1Xf8zdT3DbAX9cHw3c3CXh79rc4nK4gCe8", + "cache_script_size": 100000000, + "cache_stake_distribution_cycles": 8, + "cache_sampler_state_cycles": 8, + "dal_parametric": { + "feature_enable": true, + "incentives_enable": false, + "number_of_slots": 32, + "attestation_lag": 8, + "attestation_threshold": 66, + "redundancy_factor": 8, + "page_size": 3967, + "slot_size": 126944, + "number_of_shards": 512 + }, + "smart_rollup_arith_pvm_enable": false, + "smart_rollup_origination_size": 6314, + "smart_rollup_challenge_window_in_blocks": 241920, + "smart_rollup_stake_amount": "10000000000", + "smart_rollup_commitment_period_in_blocks": 180, + "smart_rollup_max_lookahead_in_blocks": 518400, + "smart_rollup_max_active_outbox_levels": 241920, + "smart_rollup_max_outbox_messages_per_level": 100, + "smart_rollup_number_of_sections_in_dissection": 32, + "smart_rollup_timeout_period_in_blocks": 120960, + "smart_rollup_max_number_of_cemented_commitments": 5, + "smart_rollup_max_number_of_parallel_games": 32, + "smart_rollup_reveal_activation_level": { + "raw_data": { + "Blake2B": 0 + }, + "metadata": 0, + "dal_page": 6422529, + "dal_parameters": 6422529, + "dal_attested_slots_validity_lag": 241920 + }, + "smart_rollup_private_enable": true, + "smart_rollup_riscv_pvm_enable": false, + "zk_rollup_enable": false, + "zk_rollup_origination_size": 4000, + "zk_rollup_min_pending_to_process": 10, + "zk_rollup_max_ticket_payload_size": 2048, + "global_limit_of_staking_over_baking": 5, + "edge_of_staking_over_delegation": 2, + "adaptive_issuance_launch_ema_threshold": 0, + "adaptive_rewards_params": { + "issuance_ratio_final_min": { + "numerator": "1", + "denominator": "400" + }, + "issuance_ratio_final_max": { + "numerator": "1", + "denominator": "10" + }, + "issuance_ratio_initial_min": { + "numerator": "9", + "denominator": "200" + }, + "issuance_ratio_initial_max": { + "numerator": "11", + "denominator": "200" + }, + "initial_period": 10, + "transition_period": 50, + "max_bonus": "50000000000000", + "growth_rate": { + "numerator": "1", + "denominator": "100" + }, + "center_dz": { + "numerator": "1", + "denominator": "2" + }, + "radius_dz": { + "numerator": "1", + "denominator": "50" + } + }, + "adaptive_issuance_activation_vote_enable": true, + "autostaking_enable": true, + "adaptive_issuance_force_activation": false, + "ns_enable": true, + "direct_ticket_spending_enable": false +} \ No newline at end of file diff --git a/configuration/protocols/PsqenaVw/vote-file.hjson b/configuration/protocols/PsqenaVw/vote-file.hjson new file mode 100644 index 0000000..7e98928 --- /dev/null +++ b/configuration/protocols/PsqenaVw/vote-file.hjson @@ -0,0 +1,3 @@ +{ + liquidity_baking_toggle_vote: pass +} diff --git a/containers/tezos/Containerfile b/containers/tezos/Containerfile index c5e077e..b6aac55 100644 --- a/containers/tezos/Containerfile +++ b/containers/tezos/Containerfile @@ -41,6 +41,21 @@ RUN echo $PROTOCOLS ADD tools/cleanup-protocols.lua /tmp/cleanup-protocols.lua RUN eli /tmp/cleanup-protocols.lua && rm /tmp/cleanup-protocols.lua +RUN if echo "$PROTOCOLS" | grep -q "PsqenaVw"; then \ + auth_wget https://github.com/tez-capital/tezos/releases/download/qena/octez-node -O /usr/local/bin/octez-node && \ + chmod +x /usr/local/bin/octez-node; \ +fi + +RUN if echo "$PROTOCOLS" | grep -q "PsqenaVw"; then \ + auth_wget https://github.com/tez-capital/tezos/releases/download/qena/octez-baker-qena -O /usr/local/bin/octez-baker-PsqenaVw && \ + chmod +x /usr/local/bin/octez-baker-PsqenaVw; \ +fi + +RUN if echo "$PROTOCOLS" | grep -q "PsqenaVw"; then \ + auth_wget https://github.com/tez-capital/tezos/releases/download/qena/octez-client -O /usr/local/bin/octez-client && \ + chmod +x /usr/local/bin/octez-client; \ +fi + USER root ENTRYPOINT [ "ascend" ] CMD ["parisbox"] \ No newline at end of file diff --git a/readme.md b/readme.md index 93bc5e9..5bf7018 100644 --- a/readme.md +++ b/readme.md @@ -15,8 +15,17 @@ To use TezBox, you need to have OCI compatible container runtime installed on yo docker run -it -p 0.0.0.0:8732:8732 ghcr.io/tez-capital/tezbox:tezos-v20.2 parisbox # or to run in the background docker run -d -p 0.0.0.0:8732:8732 ghcr.io/tez-capital/tezbox:tezos-v20.2 parisbox +``` + +#### Qena +```bash +# to run chain with the PsParisC protocol +docker run -it -p 0.0.0.0:8732:8732 ghcr.io/tez-capital/tezbox:tezos-v20.2 qenabox +# or to run in the background +docker run -d -p 0.0.0.0:8732:8732 ghcr.io/tez-capital/tezbox:tezos-v20.2 qenabox ``` + You can list available protocols with the following command: ```bash # docker run -it list-protocols diff --git a/src/tezbox.lua b/src/tezbox.lua index a4f5485..44e35eb 100644 --- a/src/tezbox.lua +++ b/src/tezbox.lua @@ -1,4 +1,4 @@ -#!/usr/sbin/eli +#!/usr/bin/env eli require "util.log" ("tezbox") local args = require "util.args" diff --git a/src/version-info.lua b/src/version-info.lua index c4d51f4..72838f7 100644 --- a/src/version-info.lua +++ b/src/version-info.lua @@ -1,4 +1,4 @@ -local TEZBOX_VERSIOn = "0.2.4" +local TEZBOX_VERSIOn = "0.2.5" return { VERSION = TEZBOX_VERSIOn,