Skip to content

Commit d7752b7

Browse files
authored
Update core to use latest avail rust release (#779)
1 parent 79e1c9e commit d7752b7

File tree

13 files changed

+8790
-2241
lines changed

13 files changed

+8790
-2241
lines changed

Cargo.lock

+8,686-2,157
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repository = "https://github.com/availproject/avail-light"
1818

1919
[workspace.dependencies]
2020
# Internal deps
21-
avail-rust = { git = "https://github.com/availproject/avail.git", rev = "741aa316" }
21+
avail-rust = { git = "https://github.com/availproject/avail-rust.git", tag = "v0.1.0", default-features = false }
2222
dusk-plonk = { git = "https://github.com/availproject/plonk.git", tag = "v0.12.0-polygon-2" }
2323
avail-light-core = { path = "./core" }
2424

bootstrap/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.5.1
4+
5+
- Update `avail-light-core` to 1.2.2
6+
37
## [0.5.0](https://github.com/availproject/avail-light/releases/tag/avail-light-bootstrap-v0.5.0) - 2025-01-23
48

59
- Use telemetry from the avail-light-core 1.2.0

bootstrap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avail-light-bootstrap"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
build = "../build.rs"
55
edition = "2021"
66
description = "Avail network Bootstrap Node for p2p Light Client"

client/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.12.7
4+
5+
- Update `avail-light-core` to 1.2.2
6+
37
## [1.12.6](https://github.com/availproject/avail-light/releases/tag/avail-light-client-v1.12.6) - 2025-02-10
48

59
- Update `avail-light-core` to 1.2.1

client/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avail-light-client"
3-
version = "1.12.6"
3+
version = "1.12.7"
44
build = "../build.rs"
55
edition = "2021"
66
description = "Avail network p2p Light Client"

client/src/main.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use avail_light_core::{
2424
},
2525
utils::{default_subscriber, install_panic_hooks, json_subscriber, spawn_in_span},
2626
};
27-
use avail_rust::{avail_core::AppId, kate_recovery::couscous, sp_core::blake2_128};
27+
use avail_rust::{account, avail_core::AppId, kate_recovery::couscous, sp_core::blake2_128};
2828
use clap::Parser;
2929
use color_eyre::{
3030
eyre::{eyre, WrapErr},
@@ -133,8 +133,12 @@ async fn run(
133133

134134
let account_id = identity_cfg.avail_key_pair.public_key().to_account_id();
135135
let client = rpc_client.current_client().await;
136-
let nonce = client.api.tx().account_nonce(&account_id).await?;
137-
db.put(SignerNonceKey, nonce.try_into()?);
136+
137+
let account_address = account_id.to_string();
138+
let nonce = account::nonce_node(&client.client, &account_address)
139+
.await
140+
.map_err(|error| eyre!("{:?}", error))?;
141+
db.put(SignerNonceKey, nonce);
138142

139143
// Subscribing to RPC events before first event is published
140144
let publish_rpc_event_receiver = rpc_event_sender.subscribe();

core/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [1.2.2]
4+
5+
- Update avail-rust dependency to v0.1.0
6+
37
## [1.2.1](https://github.com/availproject/avail-light/tree/avail-light-core-v1.2.1) - 2025-02-10
48

59
- Batch rows RPC requests

core/Cargo.toml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avail-light-core"
3-
version = "1.2.1"
3+
version = "1.2.2"
44
edition = "2021"
55
description = "Avail Light core driving library"
66

@@ -9,7 +9,6 @@ crate-type = ["cdylib", "rlib"]
99

1010
[dependencies]
1111
# Internal deps
12-
avail-rust = { workspace = true }
1312
dusk-plonk = { workspace = true }
1413

1514
# 3rd-party
@@ -39,9 +38,9 @@ tokio-retry = "0.3"
3938
tokio-stream = { workspace = true }
4039
tracing = { workspace = true }
4140
tracing-subscriber = { workspace = true }
42-
uuid = { workspace = true }
4341

4442
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
43+
avail-rust = { workspace = true, default-features = true }
4544
async-std = { workspace = true }
4645
color-eyre = { workspace = true, default-features = true }
4746
confy = { workspace = true }
@@ -63,6 +62,7 @@ tokio = { workspace = true, features = ["signal"] }
6362
tokio-util = "0.7.10"
6463
tracing = { workspace = true }
6564
tracing-subscriber = { workspace = true }
65+
uuid = { workspace = true }
6666
void = { workspace = true }
6767
warp = { workspace = true }
6868

@@ -72,6 +72,7 @@ opentelemetry-otlp = { workspace = true }
7272
opentelemetry_sdk = { workspace = true }
7373

7474
[target.'cfg(target_arch = "wasm32")'.dependencies]
75+
avail-rust = { workspace = true, default-features = false, features = ["wasm"] }
7576
blake2b_simd = "1.0.2"
7677
color-eyre = { workspace = true }
7778
ed25519-compact = "2.1.1"
@@ -83,10 +84,12 @@ rand = { workspace = true, features = ["std_rng"] }
8384
thiserror-no-std = "2.0.2"
8485
tokio = { workspace = true }
8586
tokio_with_wasm = { version = "0.7.1", default-features = false, features = ["sync", "macros", "rt", "time"] }
87+
uuid = { workspace = true, features = ["js"] }
8688
wasm-bindgen = "0.2.90"
8789
web-time = "1.1.0"
8890

8991
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
92+
avail-rust = { workspace = true, default-features = true }
9093
hex-literal = "0.4.1"
9194
proptest = "1.0.0"
9295
test-case = "3.2.1"

0 commit comments

Comments
 (0)