Skip to content

Commit 44b3cfe

Browse files
authored
Merge pull request #378 from openmina/develop
Merge `develop` into `main`
2 parents 6915ab3 + 3ea843d commit 44b3cfe

File tree

326 files changed

+11747
-4735
lines changed

Some content is hidden

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

326 files changed

+11747
-4735
lines changed

.github/workflows/ci.yaml

Lines changed: 66 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ jobs:
3535
cd ledger
3636
cargo test --release -- -Z unstable-options --report-time
3737
38+
p2p-tests:
39+
runs-on: ubuntu-20.04
40+
steps:
41+
- name: Git checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Setup Rust
45+
run: |
46+
rustup default 1.77
47+
rustup component add rustfmt
48+
49+
- name: Setup Rust Cache
50+
uses: Swatinem/rust-cache@v2
51+
with:
52+
prefix-key: "v0"
53+
54+
- name: Test p2p crate
55+
run: |
56+
cargo test -p p2p --tests
57+
58+
3859
build:
3960
runs-on: ubuntu-20.04
4061
steps:
@@ -43,14 +64,13 @@ jobs:
4364

4465
- name: Setup Rust
4566
run: |
46-
rustup install 1.77
47-
rustup override set 1.77
48-
rustup component add clippy rustfmt
67+
rustup default 1.77
68+
rustup component add rustfmt
4969
5070
- name: Setup Rust Cache
5171
uses: Swatinem/rust-cache@v2
5272
with:
53-
prefix-key: "ver-0"
73+
prefix-key: "v0"
5474

5575
- name: Release build
5676
run: |
@@ -70,14 +90,13 @@ jobs:
7090

7191
- name: Setup Rust
7292
run: |
73-
rustup install 1.77
74-
rustup override set 1.77
75-
rustup component add clippy rustfmt
93+
rustup default 1.77
94+
rustup component add rustfmt
7695
7796
- name: Setup Rust Cache
7897
uses: Swatinem/rust-cache@v2
7998
with:
80-
prefix-key: "ver-0"
99+
prefix-key: "v0"
81100

82101
- name: Build tests
83102
run: |
@@ -88,55 +107,70 @@ jobs:
88107
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv
89108
while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv
90109
110+
- name: Upload tests
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: tests
114+
path: target/release/tests
115+
116+
build-tests-webrtc:
117+
runs-on: ubuntu-20.04
118+
steps:
119+
- name: Git checkout
120+
uses: actions/checkout@v4
121+
122+
- name: Setup Rust
123+
run: |
124+
rustup default 1.77
125+
rustup component add rustfmt
126+
127+
- name: Setup Rust Cache
128+
uses: Swatinem/rust-cache@v2
129+
with:
130+
prefix-key: "v0"
131+
132+
- name: Build tests
133+
run: |
134+
mkdir -p target/release/tests
135+
91136
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests
92137
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json
93138
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv
94139
while read NAME FILE; do cp -a $FILE target/release/tests/webrtc_$NAME; done < tests.tsv
95140
96-
cargo build --release --features=scenario-generators,p2p-libp2p --package=openmina-node-testing --tests
97-
cargo build --release --features=scenario-generators,p2p-libp2p --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json
98-
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv
99-
while read NAME FILE; do cp -a $FILE target/release/tests/libp2p_$NAME; done < tests.tsv
100-
101-
tar cf tests.tar -C target/release/tests .
102-
103141
- name: Upload tests
104142
uses: actions/upload-artifact@v4
105143
with:
106-
name: tests
107-
path: tests.tar
144+
name: tests-webrct
145+
path: target/release/tests
108146

109-
p2p-tests:
147+
p2p-scenario-tests:
110148
needs: [ build-tests ]
111149
runs-on: ubuntu-20.04
112150
container:
113151
image: minaprotocol/mina-daemon:2.0.0berkeley-rc1-1551e2f-focal-berkeley
114152
strategy:
115153
matrix:
116154
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing]
117-
libp2p:
118-
- external
119-
# - internal
120155
fail-fast: false
121-
env:
122-
TEST: ${{ matrix.libp2p == 'external' && format('libp2p_{0}', matrix.test) || matrix.test }}
123156

124157
steps:
125158
- name: Download tests
126159
uses: actions/download-artifact@v4
127160
with:
128161
name: tests
129162

130-
- name: Unpack tests
163+
- name: Setup permissions
131164
run: |
132-
tar xf tests.tar ./${{ env.TEST }}
165+
chmod +x ./${{ matrix.test }}
133166
134167
- name: Run the test
135168
run: |
136-
./${{ env.TEST }} --nocapture --test-threads=1
169+
./${{ matrix.test }} --test-threads=1
137170
138171
scenario-tests:
139-
needs: [ build-tests ]
172+
if: false
173+
needs: [ build-tests, build-tests-webrtc ]
140174
runs-on: ubuntu-20.04
141175
container:
142176
image: minaprotocol/mina-daemon:2.0.0berkeley-rc1-1551e2f-focal-berkeley
@@ -154,15 +188,16 @@ jobs:
154188
- name: Download tests
155189
uses: actions/download-artifact@v4
156190
with:
157-
name: tests
191+
pattern: tests*
192+
merge-multiple: true
158193

159-
- name: Unpack tests
194+
- name: Setup permissions
160195
run: |
161-
tar xf tests.tar ./${{ matrix.test }}
196+
chmod +x ./${{ matrix.test }}
162197
163198
- name: Run the test
164199
run: |
165-
./${{ matrix.test }} --nocapture --test-threads=1
200+
./${{ matrix.test }} --test-threads=1
166201
167202
168203
bootstrap-test:
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1-
name: rustfmt
1+
name: lint
22

33
on:
44
push:
55
branches: [ main, develop ]
66
pull_request:
77

88
jobs:
9-
rustfmt:
10-
name: Rustfmt
9+
lint:
10+
name: Lint
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions-rs/toolchain@v1
1515
with:
1616
toolchain: 1.77
17+
components: rustfmt, clippy
1718
default: true
18-
- run: rustup component add rustfmt
1919
- uses: actions-rs/cargo@v1
20+
name: rustfmt
2021
with:
2122
command: fmt
2223
args: --all -- --check
24+
- uses: actions-rs/clippy-check@v1
25+
name: clippy
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
args: --all-targets -- -A clippy::too_many_arguments -A clippy::doc_markdown

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [0.4.0] - 2024-04-30
11+
12+
### Fixed
13+
14+
- Interactions with the ledger service are now async. This fixes situations in which expensive ledger operations could starve the state machine loop.
15+
- Ledger synchronization issue that happens when synchronizing the node during the second epoch.
16+
- Correctly handle the situation in which the best tip changes during staged ledger reconstruction, causing the reconstruct to produce a stale result.
17+
- Various edge cases in p2p layer (error propagation, disconnection, self-connection).
18+
19+
### Added
20+
21+
- Support for `identify` protocol.
22+
- P2P layer testing framework.
23+
- Frontend: Block production page.
24+
25+
### Removed
26+
27+
- Removed rust-libp2p based code, in favor of our own libp2p implementation.
28+
1029
## [0.3.1] - 2024-04-05
1130

1231
### Changed
@@ -102,7 +121,8 @@ First public release.
102121
- 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.
103122
- Web-based frontend for the node.
104123

105-
[Unreleased]: https://github.com/openmina/openmina/compare/v0.3.1...develop
124+
[Unreleased]: https://github.com/openmina/openmina/compare/v0.4.0...develop
125+
[0.4.0]: https://github.com/openmina/openmina/releases/tag/v0.3.0...v0.4.0
106126
[0.3.1]: https://github.com/openmina/openmina/releases/tag/v0.3.0...v0.3.1
107127
[0.3.0]: https://github.com/openmina/openmina/releases/tag/v0.2.0...v0.3.0
108128
[0.2.0]: https://github.com/openmina/openmina/releases/tag/v0.1.0...v0.2.0

0 commit comments

Comments
 (0)