Skip to content

Commit 7e4bb21

Browse files
authored
Merge pull request #1053 from openmina/develop
Merge `develop` into `main`
2 parents 44ba150 + e3cb69e commit 7e4bb21

File tree

409 files changed

+22957
-2387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+22957
-2387
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ docker-compose.yml
66
cli/bin
77
cli/tests
88
!cli/bin/snark-worker
9+
10+
# Heartbeats processor
11+
tools/heartbeats-processor/.env
12+
tools/heartbeats-processor/data/
13+
tools/heartbeats-processor/credentials/
14+
tools/heartbeats-processor/*.db
15+
# Ensure .sqlx files are included
16+
!tools/heartbeats-processor/.sqlx/

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ steps:
5353
- cp /usr/local/bin/mina cli/bin/
5454

5555
- name: build
56-
image: rust:1.83-bullseye
56+
image: rust:1.84-bullseye
5757
commands:
5858
- apt-get update && apt-get install -y libssl-dev libjemalloc-dev jq protobuf-compiler
59-
- rustup update 1.83 && rustup default 1.83
59+
- rustup update 1.84 && rustup default 1.84
6060
- rustup component add rustfmt
6161
# just to be sure it builds without errors
6262
- cargo build

.github/workflows/archive.yaml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Note: Disabling this workflow for now, have to figure out how to run the complicated setup on github actions
2+
3+
name: Archive Comparison
4+
5+
# TODO: Add proper triggers
6+
on:
7+
workflow_dispatch:
8+
9+
env:
10+
PG_PORT: 5432
11+
PG_DB: archive
12+
# TODO: Add proper secrets
13+
# POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
14+
POSTGRES_PASSWORD: mina-testnet
15+
ARCHIVE_OUTPUT_DIR: ./archive-outputs
16+
ARCHIVE_PORT: 3086
17+
P2P_PORT: 8302
18+
CLIENT_PORT: 8301
19+
RPC_PORT: 5000
20+
PEER_LIST_URL: https://bootnodes.minaprotocol.com/networks/devnet.txt
21+
22+
jobs:
23+
compare-archives:
24+
runs-on: ubuntu-latest
25+
26+
services:
27+
postgres-ocaml:
28+
image: postgres
29+
env:
30+
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
31+
options: >-
32+
--health-cmd pg_isready
33+
--health-interval 5s
34+
--health-timeout 10s
35+
--health-retries 10
36+
37+
postgres-openmina:
38+
image: postgres
39+
env:
40+
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
41+
options: >-
42+
--health-cmd pg_isready
43+
--health-interval 5s
44+
--health-timeout 10s
45+
--health-retries 10
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Create output directories
52+
run: |
53+
mkdir -p ${{ github.workspace }}/archive-outputs/ocaml
54+
mkdir -p ${{ github.workspace }}/archive-outputs/openmina
55+
56+
- name: Initialize Databases
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y postgresql-client
60+
61+
# Initialize OCaml database
62+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-ocaml:${{ env.PG_PORT }}/${{ env.PG_DB }} -c "CREATE DATABASE ${{ env.PG_DB }};"
63+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-ocaml:${{ env.PG_PORT }}/${{ env.PG_DB }} -c "
64+
ALTER SYSTEM SET max_connections = 500;
65+
ALTER SYSTEM SET max_locks_per_transaction = 100;
66+
ALTER SYSTEM SET max_pred_locks_per_relation = 100;
67+
ALTER SYSTEM SET max_pred_locks_per_transaction = 5000;
68+
"
69+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-ocaml:${{ env.PG_PORT }}/${{ env.PG_DB }} \
70+
-f producer-dashboard/src/archive/sql/archive_schema.sql
71+
72+
# Initialize OpenMina database
73+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-openmina:${{ env.PG_PORT }}/${{ env.PG_DB }} -c "CREATE DATABASE ${{ env.PG_DB }};"
74+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-openmina:${{ env.PG_PORT }}/${{ env.PG_DB }} -c "
75+
ALTER SYSTEM SET max_connections = 500;
76+
ALTER SYSTEM SET max_locks_per_transaction = 100;
77+
ALTER SYSTEM SET max_pred_locks_per_relation = 100;
78+
ALTER SYSTEM SET max_pred_locks_per_transaction = 5000;
79+
"
80+
psql postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-openmina:${{ env.PG_PORT }}/${{ env.PG_DB }} \
81+
-f producer-dashboard/src/archive/sql/archive_schema.sql
82+
83+
- name: Start OCaml Archive
84+
uses: docker://adrnagy/mina-archive
85+
with:
86+
args: >
87+
mina-archive run
88+
--postgres-uri postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-ocaml:${{ env.PG_PORT }}/${{ env.PG_DB }}
89+
--server-port ${{ env.ARCHIVE_PORT }}
90+
--output-dir /data
91+
options: >-
92+
--name archive-ocaml
93+
--network ${{ job.container.network }}
94+
-v ${{ github.workspace }}/archive-outputs/ocaml:/data
95+
-d
96+
97+
- name: Start OpenMina Archive
98+
uses: docker://adrnagy/mina-archive
99+
with:
100+
args: >
101+
mina-archive run
102+
--postgres-uri postgres://postgres:${{ env.POSTGRES_PASSWORD }}@postgres-openmina:${{ env.PG_PORT }}/${{ env.PG_DB }}
103+
--server-port ${{ env.ARCHIVE_PORT }}
104+
--output-dir /data
105+
options: >-
106+
--name archive-openmina
107+
--network ${{ job.container.network }}
108+
-v ${{ github.workspace }}/archive-outputs/openmina:/data
109+
-d
110+
111+
- name: Wait for Archive processes
112+
run: |
113+
sleep 10 # Replace with proper health check
114+
115+
- name: Start OCaml Node
116+
uses: docker://gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet
117+
with:
118+
args: >
119+
daemon
120+
--archive-address archive-ocaml:${{ env.ARCHIVE_PORT }}
121+
--insecure-rest-server
122+
--log-level Info
123+
options: >-
124+
--name node-ocaml
125+
--network ${{ job.container.network }}
126+
-e MINA_CLIENT_TRUSTLIST="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
127+
-d
128+
129+
- name: Start OpenMina Node
130+
uses: docker://adrnagy/openmina:archive-test
131+
with:
132+
args: >
133+
node
134+
--archive-address archive-openmina:${{ env.ARCHIVE_PORT }}
135+
options: >-
136+
--name node-openmina
137+
--network ${{ job.container.network }}
138+
-d
139+
140+
- name: Wait for nodes to be ready
141+
run: |
142+
# Add health check for nodes
143+
sleep 10 # Replace with proper health check
144+
145+
- name: Build comparison tool
146+
run: |
147+
cargo build --release -p archive-breadcrumb-compare
148+
149+
- name: Run comparison
150+
env:
151+
OCAML_NODE_GRAPHQL: http://node-ocaml:3085/graphql
152+
OPENMINA_NODE_GRAPHQL: http://node-openmina:3085/graphql
153+
OCAML_NODE_DIR: ${{ github.workspace }}/archive-outputs/ocaml
154+
OPENMINA_NODE_DIR: ${{ github.workspace }}/archive-outputs/openmina
155+
run: |
156+
./target/release/archive-breadcrumb-compare
157+
158+
- name: Upload results
159+
uses: actions/upload-artifact@v4
160+
with:
161+
name: comparison-results
162+
path: ${{ github.workspace }}/archive-outputs

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
run: |
114114
rustup install nightly
115115
rustup override set nightly
116+
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
116117
- name: Check for compilation errors in transaction fuzzer
117118
run: |
118119
cd tools/fuzzing
@@ -131,7 +132,7 @@ jobs:
131132
132133
- name: Setup Rust
133134
run: |
134-
rustup default 1.83
135+
rustup default 1.84
135136
rustup component add rustfmt
136137
137138
- name: Setup Rust Cache
@@ -157,7 +158,7 @@ jobs:
157158
158159
- name: Setup Rust
159160
run: |
160-
rustup default 1.83
161+
rustup default 1.84
161162
rustup component add rustfmt
162163
163164
- name: Setup Rust Cache
@@ -217,7 +218,7 @@ jobs:
217218
218219
- name: Setup Rust
219220
run: |
220-
rustup default 1.83
221+
rustup default 1.84
221222
rustup component add rustfmt
222223
223224
- name: Setup Rust Cache
@@ -253,7 +254,7 @@ jobs:
253254
254255
- name: Setup Rust
255256
run: |
256-
rustup default 1.83
257+
rustup default 1.84
257258
rustup component add rustfmt
258259
259260
- name: Setup Rust Cache
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Heartbeats Processor Docker Build
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Version tag for the image'
7+
required: true
8+
type: string
9+
10+
env:
11+
REGISTRY_IMAGE: openmina/heartbeats-processor
12+
13+
jobs:
14+
build-heartbeat-processor-image:
15+
strategy:
16+
matrix:
17+
arch:
18+
- platform: linux/amd64
19+
runs-on: ubuntu-latest
20+
- platform: linux/arm64
21+
runs-on: ubuntu-arm64
22+
runs-on: ${{ matrix.arch.runs-on }}
23+
steps:
24+
- name: Prepare
25+
run: |
26+
platform=${{ matrix.arch.platform }}
27+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
28+
29+
- name: Git checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKERHUB_USERNAME }}
36+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Build and push by digest
42+
id: build
43+
uses: docker/build-push-action@v6
44+
with:
45+
context: .
46+
file: ./tools/heartbeats-processor/Dockerfile
47+
platforms: ${{ matrix.arch.platform }}
48+
cache-from: type=gha
49+
cache-to: type=gha,mode=max
50+
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
51+
52+
- name: Export digest
53+
run: |
54+
mkdir -p /tmp/digests
55+
digest="${{ steps.build.outputs.digest }}"
56+
touch "/tmp/digests/${digest#sha256:}"
57+
58+
- name: Upload digest
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: heartbeat-processor-digests-${{ env.PLATFORM_PAIR }}
62+
path: /tmp/digests/*
63+
if-no-files-found: error
64+
retention-days: 1
65+
66+
merge-heartbeat-processor-image:
67+
runs-on: ubuntu-latest
68+
needs:
69+
- build-heartbeat-processor-image
70+
steps:
71+
- name: Download digests
72+
uses: actions/download-artifact@v4
73+
with:
74+
path: /tmp/digests
75+
pattern: heartbeat-processor-digests-*
76+
merge-multiple: true
77+
78+
- name: Set up Docker Buildx
79+
uses: docker/setup-buildx-action@v3
80+
81+
- name: Docker meta
82+
id: meta
83+
uses: docker/metadata-action@v5
84+
with:
85+
images: ${{ env.REGISTRY_IMAGE }}
86+
tags: |
87+
type=sha,format=short
88+
type=raw,value=${{ inputs.version }},enable=${{ inputs.version != '' }}
89+
type=raw,value=v${{ inputs.version }},enable=${{ inputs.version != '' }}
90+
91+
- name: Login to Docker Hub
92+
uses: docker/login-action@v3
93+
with:
94+
username: ${{ secrets.DOCKERHUB_USERNAME }}
95+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96+
97+
- name: Create manifest list and push
98+
working-directory: /tmp/digests
99+
run: |
100+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
101+
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
102+
103+
- name: Inspect image
104+
run: |
105+
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
sudo apt install -y protobuf-compiler
1818
- uses: actions-rs/toolchain@v1
1919
with:
20-
toolchain: 1.83
20+
toolchain: 1.84
2121
components: rustfmt, clippy
2222
default: true
2323
- uses: actions-rs/cargo@v1
@@ -36,4 +36,4 @@ jobs:
3636
name: clippy
3737
with:
3838
token: ${{ secrets.GITHUB_TOKEN }}
39-
args: --all-targets -- -D warnings --allow clippy::mutable_key_type --allow clippy::result_unit_err
39+
args: --all-targets -- -D warnings --allow clippy::mutable_key_type

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.14.0] - 2025-01-31
11+
12+
### Changed
13+
14+
- **Rust Toolchain**: Updated the minimum required Rust toolchain to version 1.84.
15+
- **Proofs**: Optimizations (MSM, field inversion) that speed up proof production.
16+
17+
### Fixed
18+
19+
- **P2P**: Correct handling of yamux windows limits
20+
- **P2P**: Wait until full validation is complete before broadcasting blocks.
21+
- **WebRTC/P2P**: Handle propagation of messages received from the WebRTC network to libp2p's gossip network (blocks, snarks and transactions).
22+
- **Transaction pool**: Fixed checks for deep account updates when pre-validating transactions.
23+
24+
### Added
25+
26+
- **Archive mode**: Added support for archive mode, which allows the node to connect to an archiver process and store node data in a database.
27+
1028
## [0.13.0] - 2025-01-06
1129

1230
### Fixed
@@ -348,7 +366,8 @@ First public release.
348366
- Alpha version of the node which can connect and syncup to the berkeleynet network, and keep applying new blocks to maintain consensus state and ledger up to date.
349367
- Web-based frontend for the node.
350368

351-
[Unreleased]: https://github.com/openmina/openmina/compare/v0.13.0...develop
369+
[Unreleased]: https://github.com/openmina/openmina/compare/v0.14.0...develop
370+
[0.14.0]: https://github.com/openmina/openmina/compare/v0.13.0...v0.14.0
352371
[0.13.0]: https://github.com/openmina/openmina/compare/v0.12.0...v0.13.0
353372
[0.12.0]: https://github.com/openmina/openmina/compare/v0.11.0...v0.12.0
354373
[0.11.0]: https://github.com/openmina/openmina/compare/v0.10.3...v0.11.0

0 commit comments

Comments
 (0)