Skip to content

Commit 2b4a3c6

Browse files
authored
feat: Upstream Arc-related changes (#1375)
Closes: #1364
2 parents 74620b7 + f7990c7 commit 2b4a3c6

File tree

131 files changed

+7880
-1407
lines changed

Some content is hidden

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

131 files changed

+7880
-1407
lines changed

.github/workflows/coverage.yml

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -86,63 +86,64 @@ jobs:
8686
flags: integration
8787
fail_ci_if_error: false
8888

89-
mbt:
90-
name: MBT
91-
needs: changes
92-
if: ${{ needs.changes.outputs.code == 'true' || needs.changes.outputs.specs == 'true' || needs.changes.outputs.codecov == 'true' || github.ref == 'refs/heads/main' }}
93-
runs-on: github-hosted-small
94-
defaults:
95-
run:
96-
working-directory: code
97-
env:
98-
CARGO_TERM_COLOR: always
99-
steps:
100-
- name: Checkout
101-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
102-
- name: Install Protoc
103-
uses: step-security/setup-protoc@f6eb248a6510dbb851209febc1bd7981604a52e3 # v3
104-
with:
105-
repo-token: ${{ secrets.GITHUB_TOKEN }}
106-
- name: Setup Node
107-
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
108-
with:
109-
node-version: "18"
110-
- name: Install Quint
111-
run: npm install -g @informalsystems/quint
112-
- name: Setup Rust toolchain
113-
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
114-
with:
115-
toolchain: nightly-2025-01-07 # pin to working nightly
116-
components: llvm-tools-preview
117-
- name: Install cargo-nextest
118-
uses: taiki-e/install-action@ea550356e2321dfdcd1d315eb6bf64d259aa5da1 # cargo-nextest
119-
- name: Install cargo-llvm-cov
120-
uses: taiki-e/install-action@4f58db3287097306b1c9381106c8445b616d3c08 # cargo-llvm-cov
121-
- name: Generate code coverage
122-
run: |
123-
cargo llvm-cov nextest \
124-
-p informalsystems-malachitebft-test-mbt \
125-
-p informalsystems-malachitebft-starknet-test-mbt \
126-
--all-features --codecov --output-path coverage-mbt.info
127-
- name: Generate text report
128-
run: cargo llvm-cov report
129-
- name: Upload coverage artifact
130-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
131-
with:
132-
name: mbt-coverage
133-
path: code/coverage-mbt.info
134-
retention-days: 1
135-
- name: Upload test results to Codecov
136-
if: ${{ !cancelled() }}
137-
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1
138-
with:
139-
token: ${{ secrets.CODECOV_TOKEN }}
140-
flags: mbt
141-
fail_ci_if_error: false
89+
# mbt:
90+
# name: MBT
91+
# needs: changes
92+
# if: ${{ needs.changes.outputs.code == 'true' || needs.changes.outputs.specs == 'true' || needs.changes.outputs.codecov == 'true' || github.ref == 'refs/heads/main' }}
93+
# runs-on: github-hosted-small
94+
# defaults:
95+
# run:
96+
# working-directory: code
97+
# env:
98+
# CARGO_TERM_COLOR: always
99+
# steps:
100+
# - name: Checkout
101+
# uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
102+
# - name: Install Protoc
103+
# uses: step-security/setup-protoc@f6eb248a6510dbb851209febc1bd7981604a52e3 # v3
104+
# with:
105+
# repo-token: ${{ secrets.GITHUB_TOKEN }}
106+
# - name: Setup Node
107+
# uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
108+
# with:
109+
# node-version: "18"
110+
# - name: Install Quint
111+
# run: npm install -g @informalsystems/quint
112+
# - name: Setup Rust toolchain
113+
# uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
114+
# with:
115+
# toolchain: nightly-2025-01-07 # pin to working nightly
116+
# components: llvm-tools-preview
117+
# - name: Install cargo-nextest
118+
# uses: taiki-e/install-action@ea550356e2321dfdcd1d315eb6bf64d259aa5da1 # cargo-nextest
119+
# - name: Install cargo-llvm-cov
120+
# uses: taiki-e/install-action@4f58db3287097306b1c9381106c8445b616d3c08 # cargo-llvm-cov
121+
# - name: Generate code coverage
122+
# run: |
123+
# cargo llvm-cov nextest \
124+
# -p informalsystems-malachitebft-test-mbt \
125+
# -p informalsystems-malachitebft-starknet-test-mbt \
126+
# --all-features --codecov --output-path coverage-mbt.info
127+
# - name: Generate text report
128+
# run: cargo llvm-cov report
129+
# - name: Upload coverage artifact
130+
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
131+
# with:
132+
# name: mbt-coverage
133+
# path: code/coverage-mbt.info
134+
# retention-days: 1
135+
# - name: Upload test results to Codecov
136+
# if: ${{ !cancelled() }}
137+
# uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1
138+
# with:
139+
# token: ${{ secrets.CODECOV_TOKEN }}
140+
# flags: mbt
141+
# fail_ci_if_error: false
142142

143143
upload-coverage:
144144
name: Upload coverage to Codecov
145-
needs: [changes, integration, mbt]
145+
# needs: [changes, integration, mbt]
146+
# needs: [changes, integration]
146147
runs-on: github-hosted-small
147148
if: ${{ !cancelled() && (needs.changes.outputs.code == 'true' || needs.changes.outputs.specs == 'true' || needs.changes.outputs.codecov == 'true' || github.ref == 'refs/heads/main') }}
148149
steps:
@@ -155,11 +156,11 @@ jobs:
155156
with:
156157
name: integration-coverage
157158
path: code/coverage
158-
- name: Download MBT coverage
159-
uses: actions/download-artifact@v4
160-
with:
161-
name: mbt-coverage
162-
path: code/coverage
159+
# - name: Download MBT coverage
160+
# uses: actions/download-artifact@v4
161+
# with:
162+
# name: mbt-coverage
163+
# path: code/coverage
163164
- name: List coverage files
164165
run: ls -la code/coverage
165166
- name: Upload integration coverage to Codecov
@@ -168,9 +169,9 @@ jobs:
168169
bash <(curl -s https://codecov.io/bash) -f coverage/coverage-integration.info -F integration
169170
env:
170171
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
171-
- name: Upload MBT coverage to Codecov
172-
working-directory: code
173-
run: |
174-
bash <(curl -s https://codecov.io/bash) -f coverage/coverage-mbt.info -F mbt
175-
env:
176-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
172+
# - name: Upload MBT coverage to Codecov
173+
# working-directory: code
174+
# run: |
175+
# bash <(curl -s https://codecov.io/bash) -f coverage/coverage-mbt.info -F mbt
176+
# env:
177+
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/mbt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
node-version: "18"
4747
- name: Install Quint
48-
run: npm install -g @informalsystems/quint
48+
run: npm install -g @informalsystems/quint@0.27.0
4949
- name: Setup Rust toolchain
5050
uses: actions-rust-lang/setup-rust-toolchain@v1
5151
- name: Install cargo-nextest

.github/workflows/rust.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ jobs:
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@v4
46-
- name: Setup Node
47-
uses: actions/setup-node@v3
48-
with:
49-
node-version: "18"
50-
- name: Install Quint
51-
run: npm install -g @informalsystems/quint
46+
# - name: Setup Node
47+
# uses: actions/setup-node@v3
48+
# with:
49+
# node-version: "18"
50+
# - name: Install Quint
51+
# run: npm install -g @informalsystems/quint
5252
- name: Setup Rust toolchain
5353
uses: actions-rust-lang/setup-rust-toolchain@v1
5454
with:
@@ -63,6 +63,7 @@ jobs:
6363
--no-fail-fast \
6464
--failure-output final \
6565
--exclude informalsystems-malachitebft-test \
66+
--exclude informalsystems-malachitebft-test-mbt \
6667
--exclude informalsystems-malachitebft-starknet-test \
6768
--exclude informalsystems-malachitebft-starknet-test-mbt \
6869
--exclude informalsystems-malachitebft-discovery-test
@@ -78,12 +79,12 @@ jobs:
7879
steps:
7980
- name: Checkout
8081
uses: actions/checkout@v4
81-
- name: Setup Node
82-
uses: actions/setup-node@v3
83-
with:
84-
node-version: "18"
85-
- name: Install Quint
86-
run: npm install -g @informalsystems/quint
82+
# - name: Setup Node
83+
# uses: actions/setup-node@v3
84+
# with:
85+
# node-version: "18"
86+
# - name: Install Quint
87+
# run: npm install -g @informalsystems/quint
8788
- name: Setup Rust toolchain
8889
uses: actions-rust-lang/setup-rust-toolchain@v1
8990
with:

BREAKING_CHANGES.md

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,9 @@
44

55
### `malachitebft-core-types`
66

7-
- Move `SigningProvider` and `SigningProviderExt` traits into new `malachitebft-signing` crate ([#1191](https://github.com/informalsystems/malachite/pull/1191))
87
- Added new associated type `Timeouts` to the `Context` trait (use `LinearTimeouts` for default implementation) ([#1227](https://github.com/circlefin/malachite/pull/1227))
98
- Remove `initial_validator_set` and `initial_height` fields from `Params` struct ([#1190](https://github.com/circlefin/malachite/pull/1190))
109

11-
### `malachitebft-signing`
12-
13-
- New crate exposing the `SigningProvider` trait ([#1191](https://github.com/informalsystems/malachite/pull/1191))
14-
- Make methods of `SigningProvider` and `SigningProviderExt` traits fallible ([#1191](https://github.com/informalsystems/malachite/pull/1191))
15-
- Changed methods of `SigningProvider` and `SigningProviderExt` traits to `async` ([#1151](https://github.com/informalsystems/malachite/issues/1151))
16-
17-
### `malachitebft-core-consensus`
18-
19-
- Remove `GetValidatorSet` effect ([#1189](https://github.com/circlefin/malachite/pull/1189))
20-
- Removed `Effect::ResetTimeouts` variant ([#1227](https://github.com/circlefin/malachite/pull/1227))
21-
- Changed `Input::StartHeight` from `StartHeight(Height, ValidatorSet, bool)` to `StartHeight(Height, Option<ValidatorSet>, bool)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
22-
- Changed `State::reset_and_start_height()` signature from `(height, validator_set)` to `(height, validator_set: Option<ValidatorSet>)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
23-
2410
### `malachitebft-core-driver`
2511

2612
- Changed `Driver::new()` signature - removed `timeouts` parameter ([#1227](https://github.com/circlefin/malachite/pull/1227))
@@ -30,9 +16,14 @@
3016
- Removed `timeouts` field from `Driver` struct - Driver no longer stores or manages timeouts ([#1227](https://github.com/circlefin/malachite/pull/1227))
3117
- Changed `Driver::move_to_height` signature from `move_to_height(Height, Validator_set, Timeouts)` to `move_to_height(Height, Option<ValidatorSet>)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
3218

19+
### `malachitebft-core-consensus`
20+
21+
- Removed `Effect::ResetTimeouts` variant ([#1227](https://github.com/circlefin/malachite/pull/1227))
22+
- Changed `Input::StartHeight` from `StartHeight(Height, ValidatorSet, bool)` to `StartHeight(Height, Option<ValidatorSet>, bool)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
23+
- Changed `State::reset_and_start_height()` signature from `(height, validator_set)` to `(height, validator_set: Option<ValidatorSet>)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
24+
3325
### `malachitebft-engine`
3426

35-
- Remove `HostMsg::GetValidatorSet` ([#1189](https://github.com/circlefin/malachite/pull/1189))
3627
- Changed `Next::Start` variant from `Start(Height, ValidatorSet)` to `Start(Height, HeightParams)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
3728
- Changed `Next::Restart` variant from `Restart(Height, ValidatorSet)` to `Restart(Height, HeightParams)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
3829
- Changed `HostMsg::ConsensusReady` reply type from `(Ctx::Height, Ctx::ValidatorSet)` to `(Ctx::Height, HeightParams<Ctx>)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
@@ -42,18 +33,47 @@
4233

4334
### `malachitebft-config`
4435

45-
- Added field `channel_names: ChannelNames` to `NetworkConfig` struct ([#849](https://github.com/informalsystems/malachite/pull/849))
4636
- Removed `TimeoutConfig` struct ([#1227](https://github.com/circlefin/malachite/pull/1227))
4737
- Removed `timeouts` field from `ConsensusConfig` struct (timeouts are now managed via `Context::Timeouts` associated type) ([#1227](https://github.com/circlefin/malachite/pull/1227))
4838

4939
### `malachitebft-app-channel`
5040

51-
- Remove `AppMsg::GetValidatorSet` ([#1189](https://github.com/circlefin/malachite/pull/1189))
52-
- Added field `requests: tokio::sync::mpsc::Sender<ConsensusRequest<Ctx>>` to `Channels` struct ([#1176](https://github.com/circlefin/malachite/pull/1176))
5341
- Changed `AppMsg::ConsensusReady` reply type from `(Ctx::Height, Ctx::ValidatorSet)` to `(Ctx::Height, HeightParams<Ctx>)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
5442
- Changed `ConsensusMsg::StartHeight` from `StartHeight(Height, ValidatorSet)` to `StartHeight(Height, HeightParams)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
5543
- Changed `ConsensusMsg::RestartHeight` from `RestartHeight(Height, ValidatorSet)` to `RestartHeight(Height, HeightParams)` ([#1227](https://github.com/circlefin/malachite/pull/1227))
5644

45+
### `malachitebft-app`
46+
47+
- Removed `Node` trait
48+
49+
## 0.6.0
50+
51+
### `malachitebft-core-types`
52+
53+
- Move `SigningProvider` and `SigningProviderExt` traits into new `malachitebft-signing` crate ([#1191](https://github.com/informalsystems/malachite/pull/1191))
54+
55+
### `malachitebft-signing`
56+
57+
- New crate exposing the `SigningProvider` trait ([#1191](https://github.com/informalsystems/malachite/pull/1191))
58+
- Make methods of `SigningProvider` and `SigningProviderExt` traits fallible ([#1191](https://github.com/informalsystems/malachite/pull/1191))
59+
- Changed methods of `SigningProvider` and `SigningProviderExt` traits to `async` ([#1151](https://github.com/informalsystems/malachite/issues/1151))
60+
61+
### `malachitebft-core-consensus`
62+
63+
- Remove `GetValidatorSet` effect ([#1189](https://github.com/circlefin/malachite/pull/1189))
64+
65+
### `malachitebft-engine`
66+
67+
- Remove `HostMsg::GetValidatorSet` ([#1189](https://github.com/circlefin/malachite/pull/1189))
68+
69+
### `malachitebft-config`
70+
71+
- Added field `channel_names: ChannelNames` to `NetworkConfig` struct ([#849](https://github.com/informalsystems/malachite/pull/849))
72+
73+
### `malachitebft-app-channel`
74+
75+
- Remove `AppMsg::GetValidatorSet` ([#1189](https://github.com/circlefin/malachite/pull/1189))
76+
- Added field `requests: tokio::sync::mpsc::Sender<ConsensusRequest<Ctx>>` to `Channels` struct ([#1176](https://github.com/circlefin/malachite/pull/1176))
5777

5878
## 0.5.0
5979

RELEASE_NOTES.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,53 @@
22

33
## Unreleased
44

5+
### `app-channel`
6+
- Make consensus request channel capacity configurable
7+
- Refactor infrastructure for spawning a channel-based application
8+
9+
### `consensus`
10+
- Allow application to change its mind about validity (invalid -> valid)
11+
- Allow dynamic adjustment of timeout parameters ([#1227](https://github.com/circlefin/malachite/pull/1227))
12+
- Allow providing both the validator set and the timeouts for a height in `StartHeight`, `RestartHeight` and `ConsensusReady` reply ([#1227](https://github.com/circlefin/malachite/pull/1227))
13+
- Remove `initial_validator_set` and `initial_height` fields from `Params` struct ([#1190](https://github.com/circlefin/malachite/pull/1190))
14+
15+
### `discovery`
16+
- Can connect request calls the wrong controller action
17+
- Clear connect_request done_on to allow re-upgrading the peer on reconnection
18+
- Don't add peers with empty address list to dial queue
19+
- Don't cancel outgoing dials when receiving inbound connection from same peer
20+
- Ensure discovery configuration is passed down to the networking module
21+
- Fix peer and connection metrics when discovery is disabled
22+
- Prevent address poisoning when discovery is enabled
23+
- Prevent address spoofing in persistent peer detection
24+
25+
### `driver`
26+
- Check for polka certificate to multiplex `PolkaValue` output on step change
27+
- Ensure `PrecommitAny` does not shadow `PolkaNil` and `PolkaAny` pending inputs
28+
- Ensure polka certificate is matched against a proposal for the same value
29+
- Produce `InvalidProposalAndPolkaPrevious` when receiving a polka certificate matching the POL round of a proposal with an invalid value
30+
31+
### `network`
32+
- Add `persistent_peers_only` config option to allow connections ONLY from/to persistent peers
33+
- Add a mechanism to dump the network state
34+
- Add application-specific peer scoring for Gossipsub to prioritize nodes based on their types, in mesh formation and maintenance
35+
- Add network metrics for peer identification and tracking
36+
- Add transport level connection limits
37+
- Limit the number of peers that can connect from same IP address
38+
39+
### `signing`
40+
- Implement `SigningProvider` for `Arc<T>` where `T: SigningProvider`
41+
- Remove signing of proposal parts
42+
43+
### `sync`
44+
- Initial random (fixed) period adjustment in sync status ticker
45+
- Support batch retrieval of decided values
46+
- Validate value request ranges before processing
47+
48+
## 0.6.0
49+
50+
*November 19th, 2025*
51+
552
- Remove `Effect::GetValidatorSet`, `AppMsg::GetValidatorSet` and `HostMsg::GetValidatorSet` ([#1189](https://github.com/circlefin/malachite/pull/1189))
653
- Introduce `malachitebft-signing` crate for exposing the `SigningProvider` and `SigningProviderExt` traits ([#1191](https://github.com/informalsystems/malachite/pull/1191))
754
- Make `SigningProvider` trait methods fallible ([#1191](https://github.com/informalsystems/malachite/pull/1191))
@@ -11,9 +58,6 @@
1158
- Add facility for app to request a consensus state dump at any time ([#1176](https://github.com/informalsystems/malachite/pull/1176))
1259
- Make libp2p protocol names configurable ([#1161](https://github.com/informalsystems/malachite/issues/1161))
1360
- Fix mismatched height of WAL entries emitted when processing `StartHeight` input ([#1232](https://github.com/circlefin/malachite/issues/1232))
14-
- Allow dynamic adjustment of timeout parameters ([#1227](https://github.com/circlefin/malachite/pull/1227))
15-
- Allow providing both the validator set and the timeouts for a height in `StartHeight`, `RestartHeight` and `ConsensusReady` reply ([#1227](https://github.com/circlefin/malachite/pull/1227))
16-
- Remove `initial_validator_set` and `initial_height` fields from `Params` struct ([#1190](https://github.com/circlefin/malachite/pull/1190))
1761

1862
## 0.5.0
1963

0 commit comments

Comments
 (0)