Skip to content

Commit 8a8c624

Browse files
committed
Merge remote-tracking branch 'origin/stable2512' into sigurpol-staking-async-rc-client-proof-in-set-keys-no-op-validation
2 parents 62f23dd + 9dfc09b commit 8a8c624

File tree

25 files changed

+639
-125
lines changed

25 files changed

+639
-125
lines changed

Cargo.lock

Lines changed: 14 additions & 13 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
@@ -910,7 +910,7 @@ linked-hash-map = { version = "0.5.4" }
910910
linked_hash_set = { version = "0.1.4" }
911911
linregress = { version = "0.5.1" }
912912
lite-json = { version = "0.2.0", default-features = false }
913-
litep2p = { version = "0.13.0", features = ["rsa", "websocket"] }
913+
litep2p = { version = "0.13.2", features = ["rsa", "websocket"] }
914914
log = { version = "0.4.22", default-features = false }
915915
macro_magic = { version = "0.5.1" }
916916
maplit = { version = "1.0.2" }

Plan.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# generated by parity-publish v0.10.10
2-
# command: parity-publish plan --prdoc prdoc
2+
# command: parity-publish plan --prdoc prdoc/pr_11197.prdoc
33

44
[options]
55

@@ -1458,9 +1458,9 @@ reason = "changed"
14581458
[[crate]]
14591459
# substrate/frame/election-provider-multi-block
14601460
name = "pallet-election-provider-multi-block"
1461-
from = "0.5.0"
1462-
to = "0.6.0"
1463-
bump = "major"
1461+
from = "0.6.0"
1462+
to = "0.6.1"
1463+
bump = "patch"
14641464
reason = "changed"
14651465

14661466
[[crate]]
@@ -2014,8 +2014,8 @@ reason = "changed"
20142014
[[crate]]
20152015
# substrate/frame/session
20162016
name = "pallet-session"
2017-
from = "45.0.0"
2018-
to = "45.1.0"
2017+
from = "45.1.0"
2018+
to = "45.2.0"
20192019
bump = "minor"
20202020
reason = "changed"
20212021

@@ -2414,8 +2414,8 @@ reason = "changed"
24142414
[[crate]]
24152415
# substrate/frame/staking-async/rc-client
24162416
name = "pallet-staking-async-rc-client"
2417-
from = "0.7.0"
2418-
to = "0.7.1"
2417+
from = "0.7.1"
2418+
to = "0.7.2"
24192419
bump = "minor"
24202420
reason = "changed"
24212421

@@ -2692,9 +2692,9 @@ reason = "changed"
26922692
[[crate]]
26932693
# substrate/frame/staking-async
26942694
name = "pallet-staking-async"
2695-
from = "0.10.0"
2696-
to = "0.10.1"
2697-
bump = "patch"
2695+
from = "0.10.1"
2696+
to = "0.10.2"
2697+
bump = "minor"
26982698
reason = "changed"
26992699

27002700
[[crate]]
@@ -3500,9 +3500,9 @@ reason = "changed"
35003500
[[crate]]
35013501
# cumulus/parachains/runtimes/assets/asset-hub-westend
35023502
name = "asset-hub-westend-runtime"
3503-
from = "0.40.0"
3504-
to = "0.42.0"
3505-
bump = "major"
3503+
from = "0.42.0"
3504+
to = "0.42.1"
3505+
bump = "minor"
35063506
reason = "changed"
35073507

35083508
[[crate]]

cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "asset-hub-westend-runtime"
3-
version = "0.42.0"
3+
version = "0.42.1"
44
authors.workspace = true
55
edition.workspace = true
66
description = "Westend variant of Asset Hub parachain runtime"

cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ impl pallet_staking_async_rc_client::Config for Runtime {
331331
// export validator session at end of session 4 within an era.
332332
type ValidatorSetExportSession = ConstU32<4>;
333333
type RelayChainSessionKeys = RelayChainSessionKeys;
334-
type Balance = Balance;
334+
type Currency = Balances;
335+
type KeyDeposit = ConstU128<{ 10 * UNITS }>;
335336
// | Key | Crypto | Public Key | Signature |
336337
// |---------------------|---------|------------|-----------|
337338
// | grandpa | Ed25519 | 32 bytes | 64 bytes |
@@ -342,7 +343,6 @@ impl pallet_staking_async_rc_client::Config for Runtime {
342343
// | beefy | ECDSA | 33 bytes | 65 bytes |
343344
// | Total | | 193 bytes | 385 bytes |
344345
// We add some buffer for SCALE encoding overhead and future expansions
345-
type MaxSessionKeysLength = ConstU32<256>;
346346
type WeightInfo = weights::pallet_staking_async_rc_client::WeightInfo<Runtime>;
347347
}
348348

prdoc/pr_11078.prdoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
title: 'net: Strip previous p2p prefix before concatenating addresses'
2+
doc:
3+
- audience: Node Dev
4+
description: |-
5+
This PR ensures that a `MultiaddrWithPeerId` will always remain valid after a concatenating process.
6+
7+
The litep2p code will concatanate the provided multiaddr-with-peerID regardless if the address already contains a `p2p/..` prefix:
8+
9+
https://github.com/paritytech/polkadot-sdk/blob/e85be1c07adedcc86554affa4f6af536c4a2efc1/substrate/client/network/src/litep2p/service.rs#L427-L434
10+
11+
12+
This then can lead to addresses for reserved peers to never be dialed by the network backend as they are considered invalid.
13+
14+
This has been discovered by running the networking benchmarks:
15+
https://github.com/paritytech/polkadot-sdk/blob/e85be1c07adedcc86554affa4f6af536c4a2efc1/substrate/client/network/benches/notifications_protocol.rs#L143-L148
16+
17+
Part of the cleanups for:
18+
- https://github.com/paritytech/polkadot-sdk/issues/10425
19+
crates:
20+
- name: sc-network
21+
bump: patch

prdoc/pr_11204.prdoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
title: Upgrade litep2p v0.13.0 -> v0.13.1
2+
doc:
3+
- audience: Node Dev
4+
description: |-
5+
This PR brings litep2p v0.13.1 to polkadot-sdk. The improvements include:
6+
7+
1. When dialing remote peers, all addresses from the DHT are tried, starting from the public addresses. Before litep2p v0.13.1, only up to 8 addresses were tried, leading to dial failures when due to misconfiguration there was a lot of private addresses in the DHT.
8+
2. Protocols are now notified about connected peers before the library user, fixing failures in opening substreams when the user command arrived before the connection event.
9+
3. Ping protocol implementation now conforms to the spec. This improves the connection stability between polkadot-sdk and [smoldot](https://github.com/smol-dot/smoldot) dramatically. Before this PR, smoldot always disconnected polkadot-sdk peers every 15 seconds for 5 seconds due to failed pings.
10+
crates:
11+
- name: sc-network
12+
bump: minor
13+
- name: sc-network-types
14+
bump: minor

prdoc/pr_11222.prdoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
title: 'staking-async/rc-client: replace MinSetKeysBond with storage deposit'
2+
doc:
3+
- audience: Runtime Dev
4+
description: "Replace MinSetKeysBond with a fungible hold deposit (KeyDeposit) which\
5+
\ ties the cost directly to the storage used: held on set_keys, released on purge_keys.\n\
6+
Idempotency is checked by inspecting the existing hold balance rather than a\
7+
\ separate storage map. Existing validators are charged on next set_keys."
8+
crates:
9+
- name: asset-hub-westend-runtime
10+
bump: minor
11+
validate: false
12+
- name: pallet-staking-async-rc-client
13+
bump: minor
14+
- name: pallet-staking-async
15+
bump: minor

prdoc/stable2512-3/pr_11168.prdoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
title: Add MinSetKeysBond check in rc_client::set_keys
2+
doc:
3+
- audience: Runtime Dev
4+
description: |-
5+
Add a configurable MinSetKeysBond threshold (hardcoded to 10 WND on asset-hub-westend) that rejects set_keys when active bond
6+
is insufficient. Set to 0 to disable.
7+
crates:
8+
- name: asset-hub-westend-runtime
9+
bump: minor
10+
validate: false
11+
- name: pallet-staking-async-rc-client
12+
bump: minor
13+
validate: false
14+
- name: pallet-staking-async
15+
bump: minor
16+
validate: false

0 commit comments

Comments
 (0)