Skip to content

Commit

Permalink
Increasing paralelism. Adding option for starting from multiple blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso committed Aug 7, 2023
1 parent 15b54be commit 31d0788
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/rosetta/templates/rosetta-cli-config-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ data:
"max_retries": 5,
"retry_elapsed_time": 0,
"max_online_connections": 120,
"max_sync_concurrency": 1,
"max_sync_concurrency": 16,
"tip_delay": 300,
"log_configuration": false,
"compression_disabled": false,
"construction": null,
"data": {
"active_reconciliation_concurrency": 16,
"inactive_reconciliation_concurrency": 4,
"inactive_reconciliation_concurrency": 16,
"inactive_reconciliation_frequency": 250,
"log_blocks": false,
"log_transactions": false,
Expand Down
14 changes: 12 additions & 2 deletions charts/rosetta/templates/rosetta-cli-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,26 @@ spec:
image: {{ .Values.cli.image.repository }}:{{ .Values.cli.image.tag }}
imagePullPolicy: Always
command:
- /bin/sh
- /bin/bash
- "-c"
args:
- |
[[ $REPLICA_NAME =~ -([0-9]+)$ ]] || exit 1
RID=${BASH_REMATCH[1]}
CUT_RID=$(($RID + 1))
START_BLOCK=$(echo -n "{{ .Values.cli.startBlock }}" | cut -d',' -f$CUT_RID)
# Workaround because rosetta-cli looks for files (like bootstrap_balances) relative
# to the configuration file path
cp -rpL /cli-config/cli-config.json /rosetta-cli-conf/cli-config.json
exec /usr/local/bin/rosetta-cli check:data \
--configuration-file /rosetta-cli-conf/cli-config.json \
--data-dir /data
--data-dir /data \
--start-block $START_BLOCK
env:
- name: REPLICA_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: cli-config
mountPath: /cli-config
Expand Down
3 changes: 3 additions & 0 deletions charts/rosetta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ storage:
cli:
enabled: false
replicaCount: 1
# Multple starting blocks splitted by comma. Each replica will take the starting block in order.
# startBlock: "0, 100000, 4000000"
startBlock: "0"
image:
repository: us.gcr.io/celo-testnet/rosetta-cli
tag: v0.10.3
Expand Down

0 comments on commit 31d0788

Please sign in to comment.