Skip to content

Conversation

@jannikluhn
Copy link

No description provided.

exit 1
fi

if ! [[ "$MIN_TENDERMINT_CURRENT_BLOCK" =~ ^-?[0-9]+$ ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should be before we start fetching current tendermint block


log "Checking shuttermint sync block number >= ${MIN_TENDERMINT_CURRENT_BLOCK}"
CURRENT_BLOCK=$(docker compose exec -T db sh -lc \
"psql -t -A -U postgres -d ${KEYPER_DB} -c \"SELECT current_block FROM tendermint_sync_meta LIMIT 1\"" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we should have a ORDER BY current_block DESC clause to fetch the latest synced tendermint block


EON="1"
KEYPER_CONFIG_INDEX="1"
MIN_TENDERMINT_CURRENT_BLOCK="0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this value be updated? or we want the keyper to sync only to block zero?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the parametesr EON, KEYPER_CONFIG_INDEX and MIN_TENDERMINT_CURRENT_BLOCK still need to be updated for the particular deployment.

SELECT_COLUMN_LIST+=("$col")
done

if [[ "${#SELECT_COLUMN_LIST[@]}" -eq 0 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit pick: not necessary check as the SELECT_COLUMN_LIST gets generated from TABLES array anyway, which is already defined in the script itself

Copy link
Contributor

@blockchainluffy blockchainluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no info on how are we planning to release this script? also what should be the params while running the script? Can you please add that info for some more context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants