Skip to content

Commit d1927cd

Browse files
committed
Merge remote-tracking branch 'origin/main' into bernhard-cleanup-inner-forest-for-main
2 parents ebe2955 + e44ea2b commit d1927cd

8 files changed

Lines changed: 69 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v0.13.7 (2026-02-25)
4+
5+
- Updated `SyncAccountStorageMaps` and `SyncAccountVault` to allow all accounts with public state, including network accounts ([#1711](https://github.com/0xMiden/node/pull/1711)).
6+
7+
## v0.13.6 (2026-02-25)
8+
9+
- Fixed CORS headers missing from version-rejection responses ([#1707](https://github.com/0xMiden/node/pull/1707)).
10+
311
## v0.13.5 (2026-02-19)
412

513
- OpenTelemetry traces are now flushed before program termination on panic ([#1643](https://github.com/0xMiden/miden-node/pull/1643)).

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ license = "MIT"
2828
readme = "README.md"
2929
repository = "https://github.com/0xMiden/miden-node"
3030
rust-version = "1.90"
31-
version = "0.13.5"
31+
version = "0.13.7"
3232

3333
# Optimize the cryptography for faster tests involving account creation.
3434
[profile.test.package.miden-crypto]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Miden node
22

33
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/0xMiden/miden-node/blob/main/LICENSE)
4-
[![test](https://github.com/0xMiden/miden-node/actions/workflows/test.yml/badge.svg)](https://github.com/0xMiden/miden-node/actions/workflows/test.yml)
5-
[![RUST_VERSION](https://img.shields.io/badge/rustc-1.89+-lightgray.svg)](https://www.rust-lang.org/tools/install)
4+
[![CI](https://github.com/0xMiden/node/actions/workflows/ci.yml/badge.svg)](https://github.com/0xMiden/node/actions/workflows/ci.yml)
5+
[![RUST_VERSION](https://img.shields.io/badge/rustc-1.90+-lightgray.svg)](https://www.rust-lang.org/tools/install)
66
[![crates.io](https://img.shields.io/crates/v/miden-node)](https://crates.io/crates/miden-node)
77

88
Welcome to the Miden node implementation :) This software is used to operate a Miden ZK-rollup network by

crates/rpc/src/server/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,15 @@ impl Rpc {
8484
.layer(CatchPanicLayer::custom(catch_panic_layer_fn))
8585
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
8686
.layer(HealthCheckLayer)
87+
// Note: must come before the accept layer, as otherwise accept rejections
88+
// do _not_ get CORS headers applied, masking the accept error in
89+
// web-clients (which would experience CORS rejection).
90+
.layer(cors_for_grpc_web_layer())
8791
.layer(
8892
AcceptHeaderLayer::new(&rpc_version, genesis.commitment())
8993
.with_genesis_enforced_method("SubmitProvenTransaction")
9094
.with_genesis_enforced_method("SubmitProvenBatch"),
9195
)
92-
.layer(cors_for_grpc_web_layer())
9396
// Enables gRPC-web support.
9497
.layer(GrpcWebLayer::new())
9598
.add_service(api_service)

crates/store/src/db/models/queries/accounts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ pub(crate) fn select_account_vault_assets(
370370
const ROW_OVERHEAD_BYTES: usize = 2 * size_of::<Word>() + size_of::<u32>(); // key + asset + block_num
371371
const MAX_ROWS: usize = MAX_RESPONSE_PAYLOAD_BYTES / ROW_OVERHEAD_BYTES;
372372

373-
if !account_id.is_public() {
373+
if !account_id.has_public_state() {
374374
return Err(DatabaseError::AccountNotPublic(account_id));
375375
}
376376

@@ -661,7 +661,7 @@ pub(crate) fn select_account_storage_map_values_paged(
661661
) -> Result<StorageMapValuesPage, DatabaseError> {
662662
use schema::account_storage_map_values as t;
663663

664-
if !account_id.is_public() {
664+
if !account_id.has_public_state() {
665665
return Err(DatabaseError::AccountNotPublic(account_id));
666666
}
667667

crates/store/src/db/tests.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,42 @@ fn select_storage_map_sync_values() {
12271227
assert_eq!(page.values, expected, "should return latest values ordered by key");
12281228
}
12291229

1230+
#[test]
1231+
fn select_storage_map_sync_values_for_network_account() {
1232+
let mut conn = create_db();
1233+
let block_num = BlockNumber::from(1);
1234+
create_block(&mut conn, block_num);
1235+
1236+
let (account_id, _) =
1237+
make_account_and_note(&mut conn, block_num, [42u8; 32], AccountStorageMode::Network);
1238+
let slot_name = StorageSlotName::mock(7);
1239+
let key = num_to_word(1);
1240+
let value = num_to_word(10);
1241+
1242+
queries::insert_account_storage_map_value(
1243+
&mut conn,
1244+
account_id,
1245+
block_num,
1246+
slot_name.clone(),
1247+
key,
1248+
value,
1249+
)
1250+
.unwrap();
1251+
1252+
let page = queries::select_account_storage_map_values(
1253+
&mut conn,
1254+
account_id,
1255+
BlockNumber::GENESIS..=block_num,
1256+
)
1257+
.unwrap();
1258+
1259+
assert_eq!(
1260+
page.values,
1261+
vec![StorageMapValue { block_num, slot_name, key, value }],
1262+
"network accounts with public state should be accepted",
1263+
);
1264+
}
1265+
12301266
#[test]
12311267
fn select_storage_map_sync_values_paginates_until_last_block() {
12321268
let mut conn = create_db();

crates/store/src/server/rpc_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl rpc_server::Rpc for StoreApi {
266266

267267
let account_id: AccountId = read_account_id::<SyncAccountVaultError>(request.account_id)?;
268268

269-
if !account_id.is_public() {
269+
if !account_id.has_public_state() {
270270
return Err(SyncAccountVaultError::AccountNotPublic(account_id).into());
271271
}
272272

@@ -314,7 +314,7 @@ impl rpc_server::Rpc for StoreApi {
314314

315315
let account_id = read_account_id::<SyncAccountStorageMapsError>(request.account_id)?;
316316

317-
if !account_id.is_public() {
317+
if !account_id.has_public_state() {
318318
Err(SyncAccountStorageMapsError::AccountNotPublic(account_id))?;
319319
}
320320

0 commit comments

Comments
 (0)