Skip to content

Commit

Permalink
backup - add support for setting number of concurrent feeder-gw reque…
Browse files Browse the repository at this point in the history
…sts (#566)
  • Loading branch information
eranreshef-starkware committed Mar 21, 2023
1 parent 6b09920 commit 21958c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions deployments/helm/files/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ if [ -z "${ADDITIONAL_HEADER}" ]; then
else
ADDITIONAL_ARGS="--http_headers=${ADDITIONAL_HEADER}"
fi

if [ -n "${CONCURRENT_REQUESTS}" ]; then
# temporary workaround for an internal papyrus memory issue
sed -i "s/concurrent_requests: 10/concurrent_requests: $CONCURRENT_REQUESTS/g" /app/config/config.yaml
fi

RUN_CMD="/app/target/release/papyrus_node --chain_id=${CHAIN_ID} --central_url=${CENTRAL_URL} ${ADDITIONAL_ARGS}"

while true; do
Expand Down
2 changes: 1 addition & 1 deletion deployments/helm/templates/aws-creds-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
data:
AWS_ACCESS_KEY_ID: {{ .Values.backup.aws.access_key_id | b64enc }}
AWS_SECRET_ACCESS_KEY: {{ .Values.backup.aws.secret_access_key | b64enc }}
AWS_DEFAULT_REGION: {{ .Values.backup.aws.s3_bucket_region | b64dec }}
AWS_DEFAULT_REGION: {{ .Values.backup.aws.s3_bucket_region | b64enc }}
{{- end }}
1 change: 1 addition & 0 deletions deployments/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data:
RUST_LOG: {{ .Values.rustLogLevel }}
CHAIN_ID: {{ .Values.starknet.chain_id }}
CENTRAL_URL: {{ .Values.starknet.central_url }}
CONCURRENT_REQUESTS: {{ .Values.node.concurrent_fg_requests | quote }}
{{- if .Values.starknet.additional_headers }}
ADDITIONAL_HEADER: {{ .Values.starknet.additional_headers }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ image:
tag: dev
pullPolicy: Always

node:
# Number of concurrent requests to the SN feeder gateway
concurrent_fg_requests: 50

starknet:
chain_id: SN_GOERLI # possible values: SN_MAIN, SN_GOERLI
# feeder-gateway url
Expand Down

0 comments on commit 21958c1

Please sign in to comment.