Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to ithaca as default protocol for priv chains #403

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Said names are traditionally kebab case.
At the statefulset level, the following parameters are allowed:

- storage_size: the size of the PV
- runs: a list of containers to run, e.g. "baker", "endorser", "tezedge"
- runs: a list of containers to run, e.g. "baker", "tezedge"
- instances: a list of nodes to fire up, each is a dictionary
defining:
- `bake_using_account`: The name of the account that should be used
Expand All @@ -330,7 +330,6 @@ nodes:
storage_size: 15Gi
runs:
- baker
- endorser
- logger
instances:
- bake_using_account: baker0
Expand All @@ -345,7 +344,6 @@ nodes:
tezedge-full-node:
runs:
- baker
- endorser
- logger
- tezedge
instances:
Expand All @@ -362,10 +360,10 @@ This will run the following nodes:
- `tezedge-full-node-1`
- `tezedge-full-node-2`

`baking-node-0` will run baker, endorser, and logger containers
`baking-node-0` will run baker and logger containers
and will be the only bootstrap node. `full-node-*` are just nodes
with no extras. `tezedge-full-node-*` will be tezedge nodes running baker,
endorser, and logger containers.
with no extras. `tezedge-full-node-*` will be tezedge nodes running baker
and logger containers.

To upgrade your Helm release run:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ NODE_DATA_DIR="$TEZ_VAR/node/data"

proto_command="{{ .command_in_tpl }}"

if [ "${DAEMON}" == "baker" ]; then
extra_args="with local node $NODE_DATA_DIR"
fi

my_baker_account="$(cat /etc/tezos/baker-account )"

CLIENT="$TEZ_BIN/tezos-client -d $CLIENT_DIR"
CMD="$TEZ_BIN/tezos-$DAEMON-$proto_command -d $CLIENT_DIR"
CMD="$TEZ_BIN/tezos-baker-$proto_command -d $CLIENT_DIR"

# ensure we can run tezos-client commands without specifying client dir
ln -s /var/tezos/client /home/tezos/.tezos-client
Expand All @@ -24,4 +20,4 @@ while ! $CLIENT rpc get chains/main/blocks/head; do
sleep 5
done

exec $CMD run ${extra_args} ${my_baker_account}
exec $CMD run with local node $NODE_DATA_DIR ${my_baker_account}
31 changes: 1 addition & 30 deletions charts/tezos/templates/_containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Below set is a trick to get the range and global context. See:
https://github.com/helm/helm/issues/5979#issuecomment-518231758
*/}}
{{- $_ := set $ "command_in_tpl" .command }}
{{ tpl ($.Files.Get "scripts/baker-endorser.sh") $ | indent 6 }}
{{ tpl ($.Files.Get "scripts/baker.sh") $ | indent 6 }}
imagePullPolicy: IfNotPresent
name: baker-{{ lower .command }}
volumeMounts:
Expand All @@ -222,35 +222,6 @@ https://github.com/helm/helm/issues/5979#issuecomment-518231758
{{- include "tezos.localvars.pod_envvars" $ | indent 4 }}
- name: DAEMON
value: baker
{{- if or (regexFind "GRANAD" .command) (regexFind "Hangz" .command) }}
{{- /*
Also start endorser for protocols that need it.
*/}}
- image: "{{ or $node_vals_images.octez $.Values.images.octez }}"
command:
- /bin/sh
args:
- "-c"
- |
{{- $_ := set $ "command_in_tpl" .command }}
{{ tpl ($.Files.Get "scripts/baker-endorser.sh") $ | indent 6 }}
imagePullPolicy: IfNotPresent
name: endorser-{{ lower .command }}
volumeMounts:
- mountPath: /etc/tezos
name: config-volume
- mountPath: /var/tezos
name: var-volume
envFrom:
- configMapRef:
name: tezos-config
- secretRef:
name: tezos-secret
env:
{{- include "tezos.localvars.pod_envvars" $ | indent 4 }}
- name: DAEMON
value: endorser
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
74 changes: 38 additions & 36 deletions charts/tezos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protocols:
# You may want to run two or more if you are expecting an on-chain upgrade.
# Be mindful that running more protocols will start more containers in your
# pods which may consume more memory.
- command: 011-PtHangz2
- command: 012-Psithaca
#- command: alpha

## Activate a new chain from genesis. Uncommenting this will create an
Expand All @@ -259,42 +259,44 @@ protocols:
## after chain activation.
##
# activation:
# protocol_hash: PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx
# protocol_hash: Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A
# protocol_parameters:
# preserved_cycles: 2
# blocks_per_cycle: 8
# blocks_per_commitment: 4
# blocks_per_roll_snapshot: 4
# blocks_per_voting_period: 64
# time_between_blocks:
# - "20"
# - "10"
# endorsers_per_block: 256
# hard_gas_limit_per_operation: "1040000"
# hard_gas_limit_per_block: "5200000"
# proof_of_work_threshold: "70368744177663"
# tokens_per_roll: "8000000000"
# seed_nonce_revelation_tip: "125000"
# origination_size: 257
# block_security_deposit: "640000000"
# endorsement_security_deposit: "2500000"
# baking_reward_per_endorsement:
# - "78125"
# - "11719"
# endorsement_reward:
# - "78125"
# - "52083"
# cost_per_byte: "250"
# hard_storage_limit_per_operation: "60000"
# quorum_min: 2000
# quorum_max: 7000
# min_proposal_quorum: 500
# initial_endorsers: 192
# delay_per_missing_endorsement: "2"
# liquidity_baking_escape_ema_threshold: 666667
# liquidity_baking_subsidy: '2500000'
# liquidity_baking_sunset_level: 10000000
# minimal_block_delay: '5'
# preserved_cycles: 3
# blocks_per_cycle: 8
# blocks_per_commitment: 4
# blocks_per_stake_snapshot: 4
# blocks_per_voting_period: 64
# hard_gas_limit_per_operation: '1040000'
# hard_gas_limit_per_block: '5200000'
# proof_of_work_threshold: '-1'
# tokens_per_roll: '8000000000'
# seed_nonce_revelation_tip: '125000'
# baking_reward_fixed_portion: '10000000'
# baking_reward_bonus_per_slot: '4286'
# endorsing_reward_per_slot: '2857'
# hard_storage_limit_per_operation: '60000'
# origination_size: 257
# cost_per_byte: '1000'
# quorum_max: 7000
# quorum_min: 2000
# min_proposal_quorum: 500
# liquidity_baking_subsidy: '2500000'
# liquidity_baking_sunset_level: 525600
# liquidity_baking_escape_ema_threshold: 100000
# max_operations_time_to_live: 120
# minimal_block_delay: "5"
# delay_increment_per_round: "5"
# consensus_committee_size: 7000
# consensus_threshold: 4667
# minimal_participation_ratio:
# numerator: 2
# denominator: 3
# max_slashing_period: 2
# frozen_deposits_percentage: 10
# double_baking_punishment: "640000000"
# ratio_of_frozen_deposits_slashed_per_double_endorsement:
# numerator: 1
# denominator: 2
#
# # Pass url pointing to additional contracts that you want injected at activation.
# # This data is typically too large to pass it directly inside helm chart.
Expand Down
2 changes: 1 addition & 1 deletion mkchain/tqchain/mkchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def main():
parametersYaml = yaml.safe_load(yaml_file)
activation = {
"activation": {
"protocol_hash": "PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx",
"protocol_hash": "Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A",
"protocol_parameters": parametersYaml,
},
}
Expand Down
56 changes: 29 additions & 27 deletions mkchain/tqchain/parameters.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
preserved_cycles: 2
preserved_cycles: 3
blocks_per_cycle: 8
blocks_per_commitment: 4
blocks_per_roll_snapshot: 4
blocks_per_stake_snapshot: 4
blocks_per_voting_period: 64
time_between_blocks:
- "20"
- "10"
endorsers_per_block: 256
hard_gas_limit_per_operation: "1040000"
hard_gas_limit_per_block: "5200000"
proof_of_work_threshold: "70368744177663"
tokens_per_roll: "8000000000"
seed_nonce_revelation_tip: "125000"
hard_gas_limit_per_operation: '1040000'
hard_gas_limit_per_block: '5200000'
proof_of_work_threshold: '-1'
tokens_per_roll: '8000000000'
seed_nonce_revelation_tip: '125000'
baking_reward_fixed_portion: '10000000'
baking_reward_bonus_per_slot: '4286'
endorsing_reward_per_slot: '2857'
hard_storage_limit_per_operation: '60000'
origination_size: 257
block_security_deposit: "640000000"
endorsement_security_deposit: "2500000"
baking_reward_per_endorsement:
- "78125"
- "11719"
endorsement_reward:
- "78125"
- "52083"
cost_per_byte: "250"
hard_storage_limit_per_operation: "60000"
quorum_min: 2000
cost_per_byte: '1000'
quorum_max: 7000
quorum_min: 2000
min_proposal_quorum: 500
initial_endorsers: 192
delay_per_missing_endorsement: "2"
liquidity_baking_escape_ema_threshold: 666667
liquidity_baking_subsidy: '2500000'
liquidity_baking_sunset_level: 10000000
minimal_block_delay: '5'
liquidity_baking_sunset_level: 525600
liquidity_baking_escape_ema_threshold: 100000
max_operations_time_to_live: 120
minimal_block_delay: "5"
delay_increment_per_round: "5"
consensus_committee_size: 7000
consensus_threshold: 4667
minimal_participation_ratio:
numerator: 2
denominator: 3
max_slashing_period: 2
frozen_deposits_percentage: 10
double_baking_punishment: "640000000"
ratio_of_frozen_deposits_slashed_per_double_endorsement:
numerator: 1
denominator: 2
1 change: 0 additions & 1 deletion test/charts/mainnet.expect
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ data:
null

NODES: |

{
"rolling-node": {
"instances": [
Expand Down
1 change: 0 additions & 1 deletion test/charts/mainnet2.expect
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ data:
null

NODES: |

{
"city-block": {
"instances": [
Expand Down
Loading