diff --git a/charts/poktroll-sequencer/Chart.yaml b/charts/poktroll-sequencer/Chart.yaml index 5b72b18..62d76e5 100644 --- a/charts/poktroll-sequencer/Chart.yaml +++ b/charts/poktroll-sequencer/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.4 +version: 0.0.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/poktroll-sequencer/templates/deployment.yaml b/charts/poktroll-sequencer/templates/deployment.yaml index 41bf66b..ce03b29 100644 --- a/charts/poktroll-sequencer/templates/deployment.yaml +++ b/charts/poktroll-sequencer/templates/deployment.yaml @@ -19,6 +19,8 @@ spec: - name: poktrolld-sequencer image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: + {{- toYaml .Values.resources | nindent 12 }} securityContext: {{ toYaml .Values.podSecurityContext | indent 12 }} env: diff --git a/charts/poktroll-sequencer/templates/scripts.yaml b/charts/poktroll-sequencer/templates/scripts.yaml index 957a345..86919e6 100644 --- a/charts/poktroll-sequencer/templates/scripts.yaml +++ b/charts/poktroll-sequencer/templates/scripts.yaml @@ -6,20 +6,13 @@ data: pocket.sh: |- #!/bin/sh - echo "AUTH_TOKEN is: $AUTH_TOKEN" - VALIDATOR_NAME=sequencer1 - CHAIN_ID=pocket - KEY_NAME=pocket-key - KEY_2_NAME=pocket-key-2 - TOKEN_AMOUNT="10000000000000000000000000upokt" - STAKING_AMOUNT="1000000000upokt" - # reset any existing genesis/chain data - poktrolld tendermint unsafe-reset-all + rm -rf /root/.pocket/data/ + echo '{"height":"0","round":0,"step":0}' > /root/.pocket/data/priv_validator_state.json # create a random Namespace ID for your rollup to post blocks to - openssl rand -hex 10 > /root/.pocket/data/namespace-id - NAMESPACE_ID=$(cat /root/.pocket/data/namespace-id) + openssl rand -hex 8 > /root/.pocket/data/namespace-id + NAMESPACE=$(cat /root/.pocket/data/namespace-id) # query the DA Layer start height, in this case we are querying # our local devnet at port 26657, the RPC. The RPC endpoint is @@ -29,7 +22,8 @@ data: curl http://{{ .Values.dataAvailability.celestia.hostname }}:26657/block | jq -r '.result.block.header.height' > /root/.pocket/data/da-block-height DA_BLOCK_HEIGHT=$(cat /root/.pocket/data/da-block-height) - echo -e "Your NAMESPACE_ID is $NAMESPACE_ID \n\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT" + echo "AUTH_TOKEN is: $AUTH_TOKEN" + echo -e "Your NAMESPACE is $NAMESPACE \n\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT" ls -la /root/.pocket/config-src/ mkdir -p /root/.pocket/config/ @@ -40,8 +34,8 @@ data: # start the node # You can attach to this process with delve (dlv) for debugging purpose with `dlv attach $(pgrep poktrolld) --listen :40004 --headless --api-version=2 --accept-multiclient` - run inside the container! - poktrolld start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://{{ .Values.dataAvailability.celestia.hostname }}:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE_ID --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://0.0.0.0:36657 --p2p.laddr "0.0.0.0:36656" + poktrolld start --rollkit.aggregator=true --rollkit.da_layer=celestia --rollkit.da_config='{"base_url":"http://{{ .Values.dataAvailability.celestia.hostname }}:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id=$NAMESPACE --rollkit.da_start_height=$DA_BLOCK_HEIGHT --rpc.laddr=tcp://0.0.0.0:36657 --p2p.laddr="0.0.0.0:36656" # OR debug the node (uncomment this line but comment previous line) - # dlv exec /usr/local/bin/poktrolld --listen :40004 --headless --api-version=2 --accept-multiclient -- start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://{{ .Values.dataAvailability.celestia.hostname }}:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE_ID --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://0.0.0.0:36657 --p2p.laddr "0.0.0.0:36656" + # dlv exec /usr/local/bin/poktrolld --listen :40004 --headless --api-version=2 --accept-multiclient -- start --rollkit.aggregator=true --rollkit.da_layer=celestia --rollkit.da_config='{"base_url":"http://{{ .Values.dataAvailability.celestia.hostname }}:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id=$NAMESPACE --rollkit.da_start_height=$DA_BLOCK_HEIGHT --rpc.laddr=tcp://0.0.0.0:36657 --p2p.laddr="0.0.0.0:36656" diff --git a/charts/poktroll-sequencer/values.yaml b/charts/poktroll-sequencer/values.yaml index 15f295f..865f236 100644 --- a/charts/poktroll-sequencer/values.yaml +++ b/charts/poktroll-sequencer/values.yaml @@ -25,4 +25,15 @@ dataAvailability: podSecurityContext: {} # allowPrivilegeEscalation: true # capabilities: - # add: ["SYS_PTRACE"] \ No newline at end of file + # add: ["SYS_PTRACE"] +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 8 + # memory: 16Gi + # requests: + # cpu: 4 + # memory: 12Gi \ No newline at end of file