Skip to content

Commit cbb24b3

Browse files
author
Adrian Nagy
committed
WIP: rpc protocol improvement
1 parent 20d53b5 commit cbb24b3

File tree

6 files changed

+260
-71
lines changed

6 files changed

+260
-71
lines changed

Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ RUN apt-get update && apt-get install -y protobuf-compiler && apt-get clean
33
RUN rustup default 1.80 && rustup component add rustfmt
44
WORKDIR /openmina
55
COPY . .
6-
RUN cargo build --release --package=cli --bin=openmina
6+
# Build with cache mount
7+
RUN --mount=type=cache,target=/usr/local/cargo/registry \
8+
--mount=type=cache,target=/openmina/target,id=rust-target \
9+
cargo build --release --package=cli --bin=openmina && \
10+
cp -r /openmina/target/release /openmina/release-bin/
11+
12+
RUN ls -la /openmina/release-bin/ #1
713
# RUN cargo build --release --features scenario-generators --bin openmina-node-testing
814

915
# necessary for proof generation when running a block producer.
@@ -12,9 +18,10 @@ RUN git clone --depth 1 https://github.com/openmina/circuit-blobs.git \
1218

1319
FROM debian:buster
1420
RUN apt-get update && apt-get install -y libjemalloc2 libssl1.1 libpq5 curl jq procps && apt-get clean
15-
COPY --from=build /openmina/cli/bin/snark-worker /usr/local/bin/
16-
COPY --from=build /openmina/target/release/openmina /usr/local/bin/
17-
# COPY --from=build /openmina/target/release/openmina-node-testing /usr/local/bin/
21+
22+
# COPY --from=build /openmina/target/release/openmina /usr/local/bin/
23+
COPY --from=build /openmina/release-bin/openmina /usr/local/bin/
24+
1825
RUN mkdir -p /usr/local/lib/openmina/circuit-blobs
1926
COPY --from=build /openmina/circuit-blobs/ /usr/local/lib/openmina/circuit-blobs/
2027

docker-compose.archive.devnet.compare.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ services:
7474
--postgres-uri postgres://postgres:${POSTGRES_PASSWORD}@postgres-ocaml:${PG_PORT}/${PG_DB}
7575
--server-port 3086
7676
--output-dir /data
77+
ports:
78+
- 3086:3086
7779
depends_on:
7880
postgres-ocaml:
7981
condition: service_healthy
@@ -89,8 +91,10 @@ services:
8991
command: >
9092
run
9193
--postgres-uri postgres://postgres:${POSTGRES_PASSWORD}@postgres-openmina:${PG_PORT}/${PG_DB}
92-
--server-port 3086
94+
--server-port 3087
9395
--output-dir /data
96+
ports:
97+
- 3087:3087
9498
depends_on:
9599
postgres-openmina:
96100
condition: service_healthy
@@ -151,7 +155,7 @@ services:
151155
container_name: node-openmina
152156
command: >
153157
node
154-
--archive-address http://archive-openmina:3086
158+
--archive-address http://archive-openmina:3087
155159
ports:
156160
- "127.0.0.1:3000:3000"
157161
depends_on:

mina-p2p-messages/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use binprot::Nat0;
44
use serde::{de::Visitor, Deserialize, Serialize};
55
use serde_bytes;
66

7-
const MINA_STRING_MAX_LENGTH: usize = 200_000_000;
7+
const MINA_STRING_MAX_LENGTH: usize = 100_000_000;
88
const CHUNK_SIZE: usize = 5_000;
99

1010
pub type ByteString = BoundedByteString<MINA_STRING_MAX_LENGTH>;

0 commit comments

Comments
 (0)