-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: abci state sync #2413
base: v2.0-dev
Are you sure you want to change the base?
feat: abci state sync #2413
Changes from 34 commits
2d60300
134855b
c00ecbd
420f84c
1512e85
94777c7
caed905
cacdc8c
c686f27
e6bb363
3b9e2a2
667a3c6
a876678
76a0576
3b80c45
08b7854
a41e993
523dece
9a70f4c
293c71f
1798eb7
0d447ee
b321239
a819364
ad58081
c560323
b38cfe8
143cccc
4d58403
dad9fc2
a8a71d1
6785e6e
3914225
60eb7ff
c16c1d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ ENV NODE_ENV=${NODE_ENV} | |
FROM deps-base AS deps-sccache | ||
|
||
# SCCACHE_VERSION must be the same as in github actions, to avoid cache incompatibility | ||
ARG SCCHACHE_VERSION=0.8.2 | ||
ARG SCCHACHE_VERSION=0.9.1 | ||
|
||
# Install sccache for caching | ||
RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export SCC_ARCH=aarch64; else export SCC_ARCH=x86_64; fi; \ | ||
|
@@ -552,19 +552,24 @@ LABEL description="Drive ABCI Rust" | |
RUN apk add --no-cache libgcc libstdc++ | ||
|
||
ENV DB_PATH=/var/lib/dash/rs-drive-abci/db | ||
ENV CHECKPOINTS_PATH=/var/lib/dash/rs-drive-abci/db-checkpoints | ||
ENV REJECTIONS_PATH=/var/log/dash/rejected | ||
|
||
RUN mkdir -p /var/log/dash \ | ||
/var/lib/dash/rs-drive-abci/db \ | ||
${REJECTIONS_PATH} | ||
|
||
COPY --from=build-drive-abci /artifacts/drive-abci /usr/bin/drive-abci | ||
COPY packages/rs-drive-abci/.env.mainnet /var/lib/dash/rs-drive-abci/.env | ||
|
||
# Create a volume | ||
VOLUME /var/lib/dash/rs-drive-abci/db | ||
VOLUME /var/log/dash | ||
|
||
# Ensure required paths do exist | ||
# TODO: remove /var/lib/dash-platform/data/checkpoints when drive-abci is fixed | ||
RUN mkdir -p /var/log/dash \ | ||
${DB_PATH} \ | ||
${CHECKPOINTS_PATH} \ | ||
${REJECTIONS_PATH} \ | ||
/var/lib/dash-platform/data/checkpoints | ||
|
||
# Double-check that we don't have missing deps | ||
RUN ldd /usr/bin/drive-abci | ||
|
||
|
@@ -574,9 +579,10 @@ RUN ldd /usr/bin/drive-abci | |
ARG USERNAME=dash | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
# TODO: remove /var/lib/dash-platform/data/checkpoints when drive-abci is fixed | ||
RUN addgroup -g $USER_GID $USERNAME && \ | ||
adduser -D -u $USER_UID -G $USERNAME -h /var/lib/dash/rs-drive-abci $USERNAME && \ | ||
chown -R $USER_UID:$USER_GID /var/lib/dash/rs-drive-abci /var/log/dash | ||
chown -R $USER_UID:$USER_GID /var/lib/dash/rs-drive-abci /var/log/dash /var/lib/dash-platform/data/checkpoints | ||
Comment on lines
+582
to
+585
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consolidate checkpoint directory paths. The ownership command includes a temporary checkpoint directory path ( Apply this diff after the drive-abci fix is implemented: - chown -R $USER_UID:$USER_GID /var/lib/dash/rs-drive-abci /var/log/dash /var/lib/dash-platform/data/checkpoints
+ chown -R $USER_UID:$USER_GID /var/lib/dash/rs-drive-abci /var/log/dash ${CHECKPOINTS_PATH}
|
||
|
||
USER $USERNAME | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,12 @@ ABCI_LOG_STDOUT_FORMAT=pretty | |
ABCI_LOG_STDOUT_COLOR=true | ||
|
||
DB_PATH=/tmp/db | ||
|
||
CHECKPOINTS_PATH=${DB_PATH}/checkpoints | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification The codebase has a proper default production path (
This configuration will lead to data loss on system reboot. Update the environment files to use persistent storage paths instead of 🔗 Analysis chainVerify database paths for production environments. Both Run this script to check if there are any production environment files with similar configuration: Also applies to: 19-19 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for production environment files and their DB_PATH configuration
# to ensure they don't use temporary directories.
echo "Searching for environment files:"
fd -t f "^\.env\.(production|prod)" packages/rs-drive-abci/
echo -e "\nChecking DB_PATH in found files:"
rg "^DB_PATH=" packages/rs-drive-abci/.env.*
Length of output: 702 Script: #!/bin/bash
# Check for deployment documentation and configuration
echo "Searching for deployment-related files and documentation:"
fd -t f "^(deploy|docker|k8s|kubernetes|README)" packages/rs-drive-abci/
echo -e "\nChecking content of found files for database path configuration:"
rg -i "(\bdb[_\s-]path|database[_\s-]path|data[_\s-]dir)" packages/rs-drive-abci/
Length of output: 2638 |
||
|
||
# GroveDB database file | ||
GROVEDB_LATEST_FILE=${DB_PATH}/latest_state | ||
|
||
REJECTIONS_PATH=/tmp/rejected | ||
|
||
# Cache size for Data Contracts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in variable name.
The variable name
SCCHACHE_VERSION
contains a typo and should beSCCACHE_VERSION
.Apply this diff to fix the typo:
📝 Committable suggestion