Skip to content

Commit 58808c5

Browse files
authored
Merge pull request #583 from openmina/develop
Merge `develop` into `main`
2 parents d790af5 + 62d84d7 commit 58808c5

File tree

388 files changed

+19491
-3912
lines changed

Some content is hidden

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

388 files changed

+19491
-3912
lines changed

.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.77-bullseye
56+
image: rust:1.79-bullseye
5757
commands:
5858
- apt-get update && apt-get install -y libssl-dev libjemalloc-dev jq protobuf-compiler
59-
- rustup update 1.77 && rustup default 1.77
59+
- rustup update 1.79 && rustup default 1.79
6060
- rustup component add rustfmt
6161
# just to be sure it builds without errors
6262
- cargo build

.github/workflows/ci.yaml

Lines changed: 115 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ on:
66
paths-ignore: [ "frontend" ]
77
workflow_dispatch:
88

9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: full
12+
913
concurrency:
1014
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1115
cancel-in-progress: true
1216

1317
jobs:
1418
ledger-tests:
1519
runs-on: ubuntu-20.04
16-
env:
17-
CARGO_TERM_COLOR: always
1820
steps:
1921
- name: Git checkout
2022
uses: actions/checkout@v4
@@ -53,7 +55,7 @@ jobs:
5355
5456
- name: Setup Rust
5557
run: |
56-
rustup default 1.77
58+
rustup default 1.79
5759
rustup component add rustfmt
5860
5961
- name: Setup Rust Cache
@@ -79,7 +81,7 @@ jobs:
7981
8082
- name: Setup Rust
8183
run: |
82-
rustup default 1.77
84+
rustup default 1.79
8385
rustup component add rustfmt
8486
8587
- name: Setup Rust Cache
@@ -97,32 +99,32 @@ jobs:
9799
name: bin
98100
path: target/release/openmina
99101

100-
build_wasm:
101-
runs-on: ubuntu-20.04
102-
steps:
103-
- name: Git checkout
104-
uses: actions/checkout@v4
105-
106-
- name: Setup build dependencies
107-
run: |
108-
sudo apt update
109-
sudo apt install -y protobuf-compiler
110-
111-
- name: Setup Rust
112-
run: |
113-
rustup default 1.77
114-
rustup component add rustfmt
115-
rustup target add wasm32-unknown-unknown
116-
117-
- name: Setup Rust Cache
118-
uses: Swatinem/rust-cache@v2
119-
with:
120-
prefix-key: "v0"
121-
122-
# for now build just p2p as the rest can't yet be compiled to wasm.
123-
- name: Release build
124-
run: |
125-
cargo build --release -p node --target wasm32-unknown-unknown --no-default-features --features p2p-webrtc
102+
# FIXME: re-enable once it works again https://github.com/openmina/openmina/issues/580
103+
# build_wasm:
104+
# runs-on: ubuntu-20.04
105+
# steps:
106+
# - name: Git checkout
107+
# uses: actions/checkout@v4
108+
#
109+
# - name: Setup build dependencies
110+
# run: |
111+
# sudo apt update
112+
# sudo apt install -y protobuf-compiler
113+
#
114+
# - name: Setup Rust
115+
# run: |
116+
# rustup default 1.79
117+
# rustup component add rustfmt
118+
# rustup target add wasm32-unknown-unknown
119+
#
120+
# - name: Setup Rust Cache
121+
# uses: Swatinem/rust-cache@v2
122+
# with:
123+
# prefix-key: "v0"
124+
#
125+
# - name: Release build
126+
# run: |
127+
# cargo build --release -p openmina-node-common --target wasm32-unknown-unknown --no-default-features --features p2p-webrtc
126128

127129
build-tests:
128130
runs-on: ubuntu-20.04
@@ -137,7 +139,7 @@ jobs:
137139
138140
- name: Setup Rust
139141
run: |
140-
rustup default 1.77
142+
rustup default 1.79
141143
rustup component add rustfmt
142144
143145
- name: Setup Rust Cache
@@ -174,7 +176,7 @@ jobs:
174176
175177
- name: Setup Rust
176178
run: |
177-
rustup default 1.77
179+
rustup default 1.79
178180
rustup component add rustfmt
179181
180182
- name: Setup Rust Cache
@@ -202,11 +204,26 @@ jobs:
202204
runs-on: ubuntu-20.04
203205
container:
204206
image: minaprotocol/mina-daemon:3.0.0-dc6bf78-focal-devnet
207+
options: --volume debugger_data:/tmp/db
208+
env:
209+
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
205210
strategy:
206211
matrix:
207212
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing, p2p_pubsub]
208213
fail-fast: false
209214

215+
services:
216+
network-debugger:
217+
image: openmina/mina-network-debugger:23385c61
218+
options: --privileged --init --volume debugger_data:/tmp/db --volume /sys/kernel/debug:/sys/kernel/debug
219+
env:
220+
SERVER_PORT: 80
221+
FIREWALL_INTERFACE: lo
222+
RUST_LOG: info
223+
DB_PATH: /tmp/db
224+
ports:
225+
- 80:80
226+
210227
steps:
211228
- name: Download tests
212229
uses: actions/download-artifact@v4
@@ -217,10 +234,22 @@ jobs:
217234
run: |
218235
chmod +x ./${{ matrix.test }}
219236
237+
# TODO: use curl
238+
- name: Wait for the debugger
239+
run: |
240+
sleep 5
241+
220242
- name: Run the test
221243
run: |
222244
./${{ matrix.test }} --test-threads=1
223245
246+
- name: Archive network debugger database
247+
uses: actions/upload-artifact@v4
248+
with:
249+
name: network-debugger-${{ matrix.test }}
250+
path: /tmp/db
251+
if: ${{ always() }}
252+
224253
k8s-peers:
225254
runs-on: ubuntu-20.04
226255
# TODO: query cluster for actual addresses, or specify then on deployment
@@ -255,13 +284,15 @@ jobs:
255284
runs-on: ubuntu-20.04
256285
container:
257286
image: minaprotocol/mina-daemon:3.0.0-dc6bf78-focal-devnet
287+
options: --volume debugger_data:/tmp/db
258288
env:
259289
# to allow local addrs discovery
260290
OPENMINA_DISCOVERY_FILTER_ADDR: false
261291
# to allow connection with replayer
262292
# TODO: remove when replayer supports identify
263293
KEEP_CONNECTION_WITH_UNKNOWN_STREAM: true
264294
OPENMINA_SCENARIO_SEEDS: ${{ needs.k8s-peers.outputs.peers }}
295+
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
265296
strategy:
266297
matrix:
267298
test:
@@ -272,6 +303,18 @@ jobs:
272303
# - connection_discovery
273304
fail-fast: false
274305

306+
services:
307+
network-debugger:
308+
image: openmina/mina-network-debugger:23385c61
309+
options: --privileged --init --volume debugger_data:/tmp/db --volume /sys/kernel/debug:/sys/kernel/debug
310+
env:
311+
SERVER_PORT: 80
312+
FIREWALL_INTERFACE: lo
313+
RUST_LOG: info
314+
DB_PATH: /tmp/db
315+
ports:
316+
- 80:80
317+
275318
steps:
276319
- name: Download tests
277320
uses: actions/download-artifact@v4
@@ -283,10 +326,22 @@ jobs:
283326
run: |
284327
chmod +x ./${{ matrix.test }}
285328
329+
# TODO: use curl
330+
- name: Wait for the debugger
331+
run: |
332+
sleep 5
333+
286334
- name: Run the test
287335
run: |
288336
./${{ matrix.test }} --test-threads=1
289337
338+
- name: Archive network debugger database
339+
uses: actions/upload-artifact@v4
340+
with:
341+
name: network-debugger-${{ matrix.test }}
342+
path: /tmp/db
343+
if: ${{ always() }}
344+
290345
record-replay-tests:
291346
needs:
292347
- k8s-peers
@@ -327,6 +382,20 @@ jobs:
327382
PEERS_LIST: ${{ needs.k8s-peers.outputs.peers }}
328383
PEER_LIST_FILE: peer-list.txt
329384
WORK_DIR: data
385+
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
386+
387+
services:
388+
network-debugger:
389+
image: openmina/mina-network-debugger:23385c61
390+
options: --privileged --init --volume /tmp/db:/tmp/db --volume /sys/kernel/debug:/sys/kernel/debug
391+
env:
392+
SERVER_PORT: 80
393+
FIREWALL_INTERFACE: lo
394+
RUST_LOG: info
395+
DB_PATH: /tmp/db
396+
ports:
397+
- 80:80
398+
330399
steps:
331400
- name: Download binary
332401
uses: actions/download-artifact@v4
@@ -343,20 +412,25 @@ jobs:
343412
run: |
344413
chmod +x bootstrap openmina
345414
415+
# TODO: use curl
416+
- name: Wait for the debugger
417+
run: |
418+
sleep 5
419+
346420
- name: Peer List File
347421
run: |
348422
for PEER in $PEERS_LIST; do echo $PEER; done > $PEER_LIST_FILE
349423
cat $PEER_LIST_FILE
350424
351425
- name: Bootstrap node
352426
env:
353-
OPENMINA_COMMAND: ./openmina
427+
OPENMINA_COMMAND: openmina
354428
NO_PEER_DISCOVERY: "true"
355429
OUT_PATH: ${{ env.WORK_DIR }}/logs/bootstrap_output
356430
RECORD: state-with-input-actions
357431
run: |
358432
mkdir -p $OUT_PATH
359-
OPENMINA_COMMAND=./openmina NO_PEER_DISCOVERY=true ./bootstrap --nocapture || {
433+
PATH=$PATH:$(pwd) OPENMINA_COMMAND=openmina NO_PEER_DISCOVERY=true ./bootstrap --nocapture || {
360434
echo "::group::Stderr"
361435
cat $OUT_PATH.stderr
362436
echo "::endgroup::"
@@ -376,3 +450,10 @@ jobs:
376450
name: bootstrap-record
377451
path: ${{ env.WORK_DIR }}/recorder/*
378452
if: ${{ failure() }}
453+
454+
- name: Archive network debugger database
455+
uses: actions/upload-artifact@v4
456+
with:
457+
name: network-debugger-test-bootstrap
458+
path: /tmp/db
459+
if: ${{ always() }}

0 commit comments

Comments
 (0)