Skip to content

Commit c50d888

Browse files
authored
Merge branch 'freenet:main' into main
2 parents d755f65 + 15fd015 commit c50d888

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

Cargo.lock

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

crates/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "freenet"
3-
version = "0.1.42"
3+
version = "0.1.43"
44
edition = "2021"
55
rust-version = "1.80"
66
publish = true

crates/core/src/wasm_runtime/contract_store.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ impl ContractStore {
138138
let data = code.data().to_vec();
139139
self.contract_cache
140140
.insert(*code_hash, Arc::new(ContractCode::from(data)), size);
141+
// Wait for the cache insert to be visible. Stretto uses background threads
142+
// for inserts, and without wait() the value may not be immediately visible
143+
// to subsequent get() calls (eventual consistency). This is critical because
144+
// validate_state() needs to fetch the contract immediately after storing.
145+
let _ = self.contract_cache.wait();
141146

142147
// save on disc
143148
let version = APIVersion::from(contract);

crates/core/src/wasm_runtime/delegate_store.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ impl DelegateStore {
117117
let code_size = data.len() as i64;
118118
self.delegate_cache
119119
.insert(*code_hash, delegate.code().clone().into_owned(), code_size);
120+
// Wait for the cache insert to be visible. Stretto uses background threads
121+
// for inserts, and without wait() the value may not be immediately visible
122+
// to subsequent get() calls (eventual consistency).
123+
let _ = self.delegate_cache.wait();
120124

121125
// save on disc
122126
let version = APIVersion::from(delegate.clone());

crates/fdev/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fdev"
3-
version = "0.3.20"
3+
version = "0.3.21"
44
edition = "2021"
55
rust-version = "1.80"
66
publish = true
@@ -44,7 +44,7 @@ reqwest = { version = "0.12", features = ["json"] }
4444
http = "1.4"
4545

4646
# internal
47-
freenet = { path = "../core", version = "0.1.42" }
47+
freenet = { path = "../core", version = "0.1.43" }
4848
freenet-stdlib = { workspace = true }
4949

5050
[features]

0 commit comments

Comments
 (0)