Skip to content
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

Store pre-signatures using Redis #869

Draft
wants to merge 36 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c2fcf30
basic redis setup in the same container
volovyks Oct 2, 2024
f552f24
formatting
volovyks Oct 2, 2024
704ee5f
basic presignature-storage using redis
volovyks Oct 4, 2024
3aa2ac3
presignature storage wrapped in arc and ewlock
volovyks Oct 9, 2024
2f0e5b1
presignature storage redis functions implemented
volovyks Oct 9, 2024
8539fc8
redis presignature storage used in presignature manager
volovyks Oct 11, 2024
e26a21a
develop
volovyks Oct 11, 2024
feba156
serialization for presignature
volovyks Oct 11, 2024
0102d1f
warnings fixed
volovyks Oct 15, 2024
3d5796b
presignature bad parameters error check
volovyks Oct 15, 2024
91d25dd
min refactoring
volovyks Oct 15, 2024
05e8394
added redis config file path to dockerfile, added tf to mount /data v…
kmaus-near Oct 15, 2024
9d28c3d
it fix
volovyks Oct 15, 2024
7ca6a5d
rust 2024 requirements
volovyks Oct 15, 2024
6e3b027
start redis in it
volovyks Oct 16, 2024
6d6fcbb
pull redis in it
volovyks Oct 16, 2024
eefe68a
lock conflict
volovyks Oct 16, 2024
998c897
lock file update
volovyks Oct 16, 2024
e449f8c
redis unit test
volovyks Oct 16, 2024
19fc21d
develop
volovyks Oct 17, 2024
4f82d8b
comments 1
volovyks Oct 17, 2024
90d6d8e
comments 2
volovyks Oct 17, 2024
3bce87b
triple manager functions renamed to match presiganture manager
volovyks Oct 17, 2024
fde93fb
serialization simlified
volovyks Oct 17, 2024
9fa82ca
comments 3
volovyks Oct 17, 2024
1edc9b3
added start command to mpc-node and added redis URL format
kmaus-near Oct 17, 2024
992f334
Merge branch 'serhii/presignature-storage' of https://github.com/near…
kmaus-near Oct 17, 2024
077466d
use account id as a part of redis storage key
volovyks Oct 17, 2024
9737f5a
Merge branch 'serhii/presignature-storage' of github.com:near/mpc-rec…
volovyks Oct 17, 2024
99e8f75
added full redis config, modified dockerfile to use it
kmaus-near Oct 17, 2024
596f13b
unnecessary port expose removed
volovyks Oct 18, 2024
99126b5
remove local redis config
volovyks Oct 18, 2024
d460253
redis config update
volovyks Oct 18, 2024
4a2c5a1
redis file ownership change
kmaus-near Oct 18, 2024
43ceebc
Merge branch 'serhii/presignature-storage' of https://github.com/near…
kmaus-near Oct 18, 2024
8e310a7
fix persistent data issue
kmaus-near Oct 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/multichain-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Relayer & Sandbox Docker Images
- name: Pull Relayer, Sandbox, Redis Docker Images
run: |
docker pull ghcr.io/near/os-relayer:12ba6e35690df3979fce0b36a41d0ca0db9c0ab4
docker pull ghcr.io/near/near-lake-indexer:node-2.3.0
docker pull localstack/localstack:3.5.0
docker pull redis:7.2.5

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down
19 changes: 16 additions & 3 deletions Dockerfile.multichain
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ RUN sed -i 's#target-dir = "../target"#target-dir = "target"#' .cargo/config.tom
RUN cargo build --release --package mpc-node

FROM debian:stable-slim as runtime
RUN apt-get update && apt-get install --assume-yes libssl-dev ca-certificates curl
RUN update-ca-certificates
RUN apt-get update && apt-get install --assume-yes libssl-dev ca-certificates curl redis-server

RUN update-ca-certificates \
chown redis:redis /data
volovyks marked this conversation as resolved.
Show resolved Hide resolved

COPY --from=builder /usr/src/app/target/release/mpc-node /usr/local/bin/mpc-node
COPY chain-signatures/node/redis.conf /etc/redis/redis.conf

# Create a script to start both Redis and the Rust app
RUN echo "#!/bin/bash\nservice redis-server start &\nexec mpc-node start" > /start.sh \
&& chmod +x /start.sh

WORKDIR /usr/local/bin

ENTRYPOINT [ "mpc-node" ]
# Expose Redis port (6379) and mpc node's port
volovyks marked this conversation as resolved.
Show resolved Hide resolved
EXPOSE 6379 8080

# Start Redis and the Rust application
ENTRYPOINT [ "/start.sh" ]
56 changes: 53 additions & 3 deletions chain-signatures/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions chain-signatures/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ itertools = "0.12.0"
http = "1.1.0"
prometheus = { version = "0.13.3" }
once_cell = "1.13.1"
redis = "0.27.2"
sysinfo = "0.32.0"
Loading
Loading