Skip to content

Conversation

@ZettaScript
Copy link
Contributor

Fixes #383

I don't exactly know the implications of storing the resolver there but it looks reasonable to me (more than recreating it at each lookup).

Default config has the same behavior as before (Google servers), but now it can be changed.

I guess it's a semver-breaking change but unless using something like a static OnceCell I see no other way.

Also, please consider using (and enforcing) cargo clippy, it helps contributors cleaning their edits without having to scroll over preexisting warnings.

Copy link
Collaborator

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ZettaScript, IMO an option to use a system resolver makes sense and is also useful when local resolution should be different from what 8.8.8.8 provides.

The PR looks good, but should be extended to all the transports to not configure the resolver individually for TCP, WS, WebRTC, etc. The best place for config would be Litep2pConfig (and its ConfigBuilder), from where the resolver can be distributed to all the transports.

pub async fn lookup_ip(self) -> Result<SocketAddr, DnsError> {
pub async fn lookup_ip(
self,
resolver: impl Borrow<TokioAsyncResolver>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the motivation behind Borrow here? I don't think there are other types than TokioAsyncResolver that can be borrowed as such.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to pass TokioAsyncResolver, or a reference, or an Arc. I often find this pattern convenient, but I can simply use a reference if it's not needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to use impl in the function definition here, as we know exactly what type we are using.

Comment on lines 83 to 88

/// DNS resolver config.
pub resolver_config: hickory_resolver::config::ResolverConfig,

/// DNS resolver options.
pub resolver_opts: hickory_resolver::config::ResolverOpts,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should be universal to all the transports, including WS, QUIC, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to do that. Should TransportBuilder::new accept a new argument for the resolver? or a new field in TransportHandle?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed this. Yes, TransportBuilder:new accepting a new argument is fine.

@dmitry-markin
Copy link
Collaborator

Thanks for reporting regarding clippy — seems the clippy CI step is not enforcing things.

Comment on lines 84 to 86
/// DNS resolver config.
pub resolver_config: hickory_resolver::config::ResolverConfig,

/// DNS resolver options.
pub resolver_opts: hickory_resolver::config::ResolverOpts,
}
Copy link
Collaborator

@lexnv lexnv May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative here would be to have a new dedicated option to read from the system config, similar to:

 /// Defaults to false (ie current behavior).
 pub use_system_dns_config: bool, 

The advantage is that we can change the hickory DNS resolver under the hood without breaking the API. We are getting close to the finish line and we should strive to keep the API as stable as possible.

Indeed I would also lean towards @dmitry-markin suggestion here, we should make this available on the main litep2p config.

One option to achive this: transform the pub use_system_dns_config into pub(crate) use_system_dns_config flag in the TCP config (ie users cannot modify it directly). Add the flag to the main litep2p config, and populate the tcp_config.use_system_dns_config from the litep2p_config.use_system_dns_config. We have a precedent for the identify configs to showcase this in more details

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now hickory types are private, only the flag is public.

If both Litep2pConfig and transport's config have the flag, it can be modified from different places and the outcome won't be obvious. For example, what if websocket_config.use_system_dns_config is false, tcp_config.use_system_dns_config is true and litep2p_config.use_system_dns_config is true?

Since transport's config must be added explicitly to the builder anyway (if I get it right), having a common flag seems mostly noise.

Also, if reading system's config fails, should it return a new Error variant? I don't want to silently fallback to default, because it's troublesome to debug for users.

@dmitry-markin
Copy link
Collaborator

Hey @ZettaScript, I have updated hickory-resolver in #386. Let's base the refactoring on the latest version.

lexnv added a commit that referenced this pull request May 9, 2025
Our CI step `Run clippy` did not treat warnings as errors. Therefore,
the process terminated with exit code zero even when the clippy rules
were not followed.

This PR ensures the clippy rules are enforced by our CI.

While at it, this PR fixes the clippy rules by `--fix` and manually
fixes bits where needed.

Since the code inside tokio::select and logs is not formatted by
rustfmt, I've only paid attention to our production code. There might be
a few places in our tests where these lines are long or not properly
formatted.

Detected by: #384

---------

Signed-off-by: Alexandru Vasile <[email protected]>
@ZettaScript
Copy link
Contributor Author

The branch is rebased on master. I am still unsure about the duplicated use_system_dns_config which is unused.

Copy link
Collaborator

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for rebasing on master! One thing you could do in a similar situation is merge master. Force-pushing breaks the review history in an already opened PRs.

See the inline comment for dealing with duplicate use_system_dns_config and early failure.

pub substream_open_timeout: std::time::Duration,

/// Use system's DNS config.
pub use_system_dns_config: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove use_system_dns_config from transport configs completely. Ideally, we want to initialize the resolver early to fail the initialization of Litep2p object in case we can't read the system config. For this, we can initialize the resolver once in Litep2p::new (returning a new error type there) and pass it to every transport via TransportBuilder::new. The arguments of the latter will need to be extended with an explicit resolver argument to not clutter Config with a private field.

@ZettaScript
Copy link
Contributor Author

Now the resolver is configured and initialized in Litep2p::new. However webrtc and quic don't seem to need a resolver. Should TransportBuilder::new take an Option of the resolver, or a generic type (which could be ())? or we don't care because the resolver is needed for tcp anyway and passing the unused arg is no-op?

@dmitry-markin
Copy link
Collaborator

Now the resolver is configured and initialized in Litep2p::new. However webrtc and quic don't seem to need a resolver. Should TransportBuilder::new take an Option of the resolver, or a generic type (which could be ())? or we don't care because the resolver is needed for tcp anyway and passing the unused arg is no-op?

Hey, looks good!

Passing the unused arg is fine.

WebRTC in litep2p only implements "server mode", so no resolver is needed. With QUIC, can you investigate, please, why the resolver is not used, so we don't end up in a situation where different transport resolvers work differently?

@ZettaScript
Copy link
Contributor Author

Thanks!

WebRTC in litep2p only implements "server mode", so no resolver is needed. With QUIC, can you investigate, please, why the resolver is not used, so we don't end up in a situation where different transport resolvers work differently?

I'll investigate. (never worked with QUIC before)

@ZettaScript
Copy link
Contributor Author

QuicListener::get_socket_address only accepts IPv4 or IPv6 for the input address: &Multiaddr. For comparison, TcpTransport::dial uses TcpAddress::multiaddr_to_socket_address which handles names as well.

The are a few issues about QUIC but none about QUIC+DNS.

@dmitry-markin
Copy link
Collaborator

QuicListener::get_socket_address only accepts IPv4 or IPv6 for the input address: &Multiaddr. For comparison, TcpTransport::dial uses TcpAddress::multiaddr_to_socket_address which handles names as well.

The are a few issues about QUIC but none about QUIC+DNS.

You are right, QUIC doesn't currently support dialing DNS addresses. I've created an issue for this: #406

No need to address anything in this PR.

Copy link
Collaborator

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! I will let @lexnv also review the PR, and after this we can merge it.

@dmitry-markin dmitry-markin requested a review from lexnv July 2, 2025 15:07
fn new(
context: TransportHandle,
config: Self::Config,
resolver: Arc<TokioResolver>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im wondering if we could move the resolver to the Tcp / Websocket config as: Option<Arc<..>>. Then, we could populate the resolver similar to how we populate the public key of the identify protocol:

// Public key of the local node, filled by `Litep2p`.
pub(crate) public: Option<PublicKey>,
/// Protocols supported by the local node, filled by `Litep2p`.
pub(crate) protocols: Vec<ProtocolName>,

And here litep2p populates the fields:

identify_config.public = Some(litep2p_config.keypair.public().into());

This way we could avoid passing the extra resolver as parameter and move it to the config itself.
Then, if some developers wish to instantiate the TcpTransport out of litep2p we could expose with_resolver on the TCP / Websocket.

What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lexnv I think that was me who suggested/approved the use of an extra argument, because the resolver doesn't fit into the user-facing tcp/websocket Config.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool cool, that makes sense, we could go ahead and merge this 🙏

Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good looks good to me! Thanks for contributing! 🙏

I've left a minor suggestion, but we could do that as a followup in a separate PR

@dmitry-markin dmitry-markin merged commit fb460bf into paritytech:master Jul 14, 2025
8 checks passed
dmitry-markin added a commit that referenced this pull request Jul 22, 2025
## [0.10.0] - 2025-07-22

This release adds the ability to use system DNS resolver and change
Kademlia DNS memory store capacity. It also fixes the Bitswap protocol
implementation and correctly handles the dropped notification substreams
by unregistering them from the protocol list.

### Added

- kad: Expose memory store configuration
([#407](#407))
- transport: Allow changing DNS resolver config
([#384](#384))

### Fixed

- notification: Unregister dropped protocols
([#391](#391))
- bitswap: Fix protocol implementation
([#402](#402))
- transport-manager: stricter supported multiaddress check
([#403](#403))
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Jul 22, 2025
## litep2p v0.10.0

This release adds the ability to use system DNS resolver and change
Kademlia DNS memory store capacity. It also fixes the Bitswap protocol
implementation and correctly handles the dropped notification substreams
by unregistering them from the protocol list.

### Added

- kad: Expose memory store configuration
([#407](paritytech/litep2p#407))
- transport: Allow changing DNS resolver config
([#384](paritytech/litep2p#384))

### Fixed

- notification: Unregister dropped protocols
([#391](paritytech/litep2p#391))
- bitswap: Fix protocol implementation
([#402](paritytech/litep2p#402))
- transport-manager: stricter supported multiaddress check
([#403](paritytech/litep2p#403))

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
EgorPopelyaev added a commit to EgorPopelyaev/polkadot-sdk that referenced this pull request Jul 25, 2025
* Don't use labels for branch names creation in the backport bot (paritytech#9243)

* Remove unused deps (paritytech#9235)

# Description

Remove unused deps using `cargo udeps`

Part of: paritytech#6906

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <[email protected]>

* Fixed genesis config presets for bridge tests (paritytech#9185)

Closes: paritytech#9116

---------

Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karol Kokoszka <[email protected]>

* Remove `subwasmlib` (paritytech#9252)

This removes `subwasmlib` and replaces it with some custom code to fetch
the metadata. Main point of this change is the removal of some external
dependency.

Closes: paritytech#9203

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* zombienet, make logs for para works (paritytech#9230)

Fix for correctly display the logs (urls) for paras.

* feat(cumulus): Adds support for additional relay state keys in parachain validation data inherent (paritytech#9262)

Adds the possibility for parachain clients to collect additional relay
state keys into the validation data inherent.

With this change, other consensus engines can collect additional relay
keys into the parachain inherent data:
```rs
let paras_inherent_data = ParachainInherentDataProvider::create_at(
  relay_parent,
  relay_client,
  validation_data,
  para_id,
  vec![
     relay_well_known_keys::EPOCH_INDEX.to_vec() // <----- Example
  ],
)
.await;
```

* Allow locking to bump consumer without limits (paritytech#9176)

Locking is a system-level operation, and can only increment the consumer
limit at most once. Therefore, it should use
`inc_consumer_without_limits`. This behavior is optional, and is only
used in the call path of `LockableCurrency`. Reserves, Holds and Freezes
(and other operations like transfer etc.) have the ability to return
`DispatchResult` and don't need this bypass. This is demonstrated in the
unit tests added.

Beyond this, this PR: 

* uses the correct way to get the account data in tests
* adds an `Unexpected` event instead of a silent `debug_assert!`. 
* Adds `try_state` checks for correctness of `account.frozen` invariant.

---------

Co-authored-by: Ankan <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* babe: keep stateless verification in `Verifier`, move everything else to the import queue (paritytech#9147)

We agreed to split paritytech#8446
into two PRs: one for BABE (this one) and one for AURA. This is the
easier one.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix CandidateDescriptor debug logs (paritytech#9255)

Regardless of the descriptor version, the CandidateDescriptor was logged
as a CandidateDescriptorV2 instance.

To address this issue we now derive RuntimeDebug only when std is not
enabled so we can have that empty implementation that does not bloat the
runtime WASM. When std is enabled we implement core::fmt::Debug by hand
and print the
structure differently depending on the CandidateDescriptor version.

Fixes: paritytech#8457

---------

Signed-off-by: Alexandru Cihodaru <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>

* Rewrite validator disabling test with zombienet-sdk (paritytech#9128)

Fixes paritytech#9085

---------

Signed-off-by: Alexandru Cihodaru <[email protected]>

* gossip-support: make low connectivity message an error (paritytech#9264)

All is not well when a validator is not properly connected, e.g: of
things that might happen:
- Finality might be slightly delay because validator will be no-show
because they can't retrieve PoVs to validate approval work:
paritytech#8915.
- When they author blocks they won't back things because gossiping of
backing statements happen using the grid topology:, e.g blocks authored
by validators with a low number of peers:

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-polkadot.helixstreet.io#/explorer/query/26931262

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-polkadot.helixstreet.io#/explorer/query/26931260

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/explorer/query/26931334

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931314

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931292

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931447


The problem is seen in `polkadot_parachain_peer_count` metrics, but it
seems people are not monitoring that well enough, so let's make it more
visible nodes with low connectivity are not working in good conditions.

I also reduced the threshold to 85%, so that we don't trigger this error
to eagerly.

---------

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Allow setting idle connection timeout value in custom node implementations (paritytech#9251)

Allow setting idle connection timeout value. This can be helpful in
custom networks to allow maintaining long-lived connections.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [revive] eth-decimals (paritytech#9101)

On Ethereum, 1 ETH is represented as 10^18 wei (wei being the smallest
unit).
On Polkadot 1 DOT is defined as 1010 plancks. It means that any value
smaller than 10^8 wei can not be expressed with the native balance. Any
contract that attempts to use such a value currently reverts with a
DecimalPrecisionLoss error.

In theory, RPC can define a decimal representation different from
Ethereum mainnet (10^18). In practice tools (frontend libraries,
wallets, and compilers) ignore it and expect 18 decimals.

The current behaviour breaks eth compatibility and needs to be updated.
See issue paritytech#109 for more details.


Fix  paritytech/contract-issues#109
[weights
compare](https://weights.tasty.limo/compare?unit=weight&ignore_errors=true&threshold=10&method=asymptotic&repo=polkadot-sdk&old=master&new=pg/eth-decimals&path_pattern=substrate/frame/**/src/weights.rs,polkadot/runtime/*/src/weights/**/*.rs,polkadot/bridges/modules/*/src/weights.rs,cumulus/**/weights/*.rs,cumulus/**/weights/xcm/*.rs,cumulus/**/src/weights.rs)

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* Rewrite old disputes test with zombienet-sdk (paritytech#9257)

Fixes: paritytech#9256

---------

Signed-off-by: Alexandru Cihodaru <[email protected]>

* Zombienet CI improvements (paritytech#9172)

## 🔄 Zombienet CI Refactor: Matrix-Based Workflows

This PR refactors the Zombienet CI workflows to use a **matrix-based
approach**, resulting in:

- ✅ **Easier test maintenance** – easily add or remove tests without
duplicating workflow logic.
- 🩹 **Improved flaky test handling** – flaky tests are excluded by
default but can be explicitly included by pattern.
- 🔍 **Pattern-based test selection** – run only tests matching a name
pattern, ideal for debugging.

---

## 🗂️ Structure Changes

- **Test definitions** are now stored in `.github/zombienet-tests/`.
- Each workflow (`Cumulus`, `Substrate`, `Polkadot`, `Parachain
Template`) has its own YAML file with test configurations.

---

## 🧰 Added Scripts

### `.github/scripts/parse-zombienet-tests.py`
- Parses test definitions and generates a GitHub Actions matrix.
- Filters out flaky tests by default.
- If a `test_pattern` is provided, matching tests are **included even if
flaky**.

### `.github/scripts/dispatch-zombienet-workflow.sh`
- Triggers a Zombienet workflow multiple times, optionally filtered by
test name pattern.
- Stores results in a **CSV file** for analysis.
- Useful for debugging flaky tests or stress-testing specific workflows.
- Intended to be run from the local machine.

---------

Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: Alexander Samusev <[email protected]>
Co-authored-by: Javier Viola <[email protected]>

* consensus/grandpa: Fix high number of peer disconnects with invalid justification (paritytech#9015)

A grandpa race-casse has been identified in the versi-net stack around
authority set changes, which leads to the following:

- T0 / Node A: Completes round (15)
- T1 / Node A: Applies new authority set change and increments the SetID
(from 0 to 1)
- T2 / Node B: Sends Precommit for round (15) with SetID (0) -- previous
set ID
- T3 / Node B: Applies new authority set change and increments the SetID
(1)

In this scenario, Node B is not aware at the moment of sending
justifications that the Set ID has changed.
The downstream effect is that Node A will not be able to verify the
signature of justifications, since a different SetID is taken into
account. This will cascade through the sync engine, where the Node B is
wrongfully banned and disconnected.

This PR aims to fix the edge-case by making the grandpa resilient to
verifying prior setIDs for signatures.
When the signature of the grandpa justification fails to decode, the
prior SetID is also verified. If the prior SetID produces a valid
signature, then the outdated justification error is propagated through
the code (ie `SignatureResult::OutdatedSet`).

The sync engine will handle the outdated justifications as invalid, but
without banning the peer. This leads to increased stability of the
network during authority changes, which caused frequent disconnects to
versi-net in the past.

### Review Notes
- Main changes that verify prior SetId on failures are placed in
[check_message_signature_with_buffer](https://github.com/paritytech/polkadot-sdk/pull/9015/files#diff-359d7a46ea285177e5d86979f62f0f04baabf65d595c61bfe44b6fc01af70d89R458-R501)
- Sync engine no longer disconnects outdated justifications in
[process_service_command](https://github.com/paritytech/polkadot-sdk/pull/9015/files#diff-9ab3391aa82ee2b2868ece610100f84502edcf40638dba9ed6953b6e572dfba5R678-R703)

### Testing Done
- Deployed the PR to versi-net with 40 validators
- Prior we have noticed 10/40 validators disconnecting every 15-20
minutes, leading to instability
- Over past 24h the issue has been mitigated:
https://grafana.teleport.parity.io/goto/FPNWlmsHR?orgId=1
- Note: bootnodes 0 and 1 are currently running outdated versions that
do not incorporate this SetID verification improvement

Closes: paritytech#8872
Closes: paritytech#1147

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Markin <[email protected]>

* network: Upgrade litep2p to v0.10.0 (paritytech#9287)

## litep2p v0.10.0

This release adds the ability to use system DNS resolver and change
Kademlia DNS memory store capacity. It also fixes the Bitswap protocol
implementation and correctly handles the dropped notification substreams
by unregistering them from the protocol list.

### Added

- kad: Expose memory store configuration
([paritytech#407](paritytech/litep2p#407))
- transport: Allow changing DNS resolver config
([paritytech#384](paritytech/litep2p#384))

### Fixed

- notification: Unregister dropped protocols
([paritytech#391](paritytech/litep2p#391))
- bitswap: Fix protocol implementation
([paritytech#402](paritytech/litep2p#402))
- transport-manager: stricter supported multiaddress check
([paritytech#403](paritytech/litep2p#403))

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Dedup dependencies between dependencies and dev-dependencies (paritytech#9233)

# Description

Deduplicate some dependencies between `dependencies` and
`dev-dependencies` sections

---------

Co-authored-by: Bastian Köcher <[email protected]>

* Ci-unified update (with solc and resolc) (paritytech#9289)

add `solc` and `resolc` binaries to image

```
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.8.30+commit.73712a01.Linux.g++
$ resolc --version
Solidity frontend for the revive compiler version 0.3.0+commit.ed60869.llvm-18.1.8
```

You can update or install specific version with `/builds/download-bin.sh
<solc | resolc> [version | latest]`
e.g.
```
/builds/download-bin.sh solc v0.8.30
```

* fix: skip verifying imported blocks (paritytech#9280)

Closes paritytech#9277. Still WIP
testing

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [Staking Async] Saturating accrue era reward points (paritytech#9186)

Replaces regular addition with saturating addition when accumulating era
reward points in `pallet-staking-async` to prevent potential overflow.

---------

Co-authored-by: Bastian Köcher <[email protected]>

* Replace `log` with `tracing` on `pallet-bridge-grandpa` (paritytech#9294)

This PR replaces `log` with `tracing` instrumentation on
`pallet-bridge-grandpa` by providing structured logging.

Partially addresses paritytech#9211

* Fix subsume_assets incorrectly merging two AssetsInHolding (paritytech#9179)

`subsume_assets` fails to correctly subsume two instances of
`AssetsInHolding` under certain conditions which can result in loss of
funds (as assets are overriden rather than summed together)

Eg. consider following test:
```
	#[test]
	fn subsume_assets_different_length_holdings() {
		let mut t1 = AssetsInHolding::new();
		t1.subsume(CFP(400));

		let mut t2 = AssetsInHolding::new();
		t2.subsume(CF(100));
		t2.subsume(CFP(100));

		t1.subsume_assets(t2);
```

current result (without this PR change):
```
		let mut iter = t1.into_assets_iter();
		assert_eq!(Some(CF(100)), iter.next());
		assert_eq!(Some(CFP(100)), iter.next());
```

expected result:
```
		let mut iter = t1.into_assets_iter();
		assert_eq!(Some(CF(100)), iter.next());
		assert_eq!(Some(CFP(500)), iter.next());
```

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <[email protected]>

* yap-runtime: fixes for `GetParachainInfo` (paritytech#9312)

This fixes the YAP parachain runtimes in case you encounter a panic in
the collator similar to
paritytech/zombienet#2050:
```
Failed to retrieve the parachain id
```
(which we do have zombienet-sdk tests for
[here](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/transaction-pool/tests/zombienet/yap_test.rs))

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* RecentDisputes/ActiveDisputes use BTreeMap instead of Vec (paritytech#9309)

Fixes paritytech#782

---------

Signed-off-by: Alexandru Cihodaru <[email protected]>

* network/litep2p: Switch to system DNS resolver (paritytech#9321)

Switch to system DNS resolver instead of 8.8.8.8 that litep2p uses by
default. This enables full administrator control of what upstream DNS
servers to use, including resolution of local names using custom DNS
servers.

Fixes paritytech#9298.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* litep2p/discovery: Ensure non-global addresses are not reported as external (paritytech#9281)

This PR ensures that external addresses discovered by the identify
protocol are not propagated to the litep2p backend if they are not
global. This leads to a healthier DHT over time, since nodes will not
advertise loopback / non-global addresses.

We have seen various cases were loopback addresses were reported as
external:

```
2025-07-16 16:18:39.765 TRACE tokio-runtime-worker sub-libp2p::discovery: verify new external address: /ip4/127.0.0.1/tcp/30310/p2p/12D3KooWNw19ScMjzNGLnYYLQxWcM9EK9VYPbCq241araUGgbdLM    

2025-07-16 16:18:39.765  INFO tokio-runtime-worker sub-libp2p: 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30310/p2p/12D3KooWNw19ScMjzNGLnYYLQxWcM9EK9VYPbCq241araUGgbdLM
```

This PR takes into account the network config for
`allow_non_global_addresses`.

Closes: paritytech#9261

cc @paritytech/networking

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [Backport] Regular version bumps and prdoc reordering from the stable2506 release branch back to master (paritytech#9320)

This PR backports:
- NODE_VERSION bumps
- spec_version bumps
- prdoc reordering
from the release branch back to master

---------

Co-authored-by: ParityReleases <[email protected]>

* add node version to the announcement message

* test in the internal room

---------

Signed-off-by: Alexandru Cihodaru <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Diego <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: Anthony Kveder <[email protected]>
Co-authored-by: Karol Kokoszka <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: Rodrigo Quelhas <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Ankan <[email protected]>
Co-authored-by: sistemd <[email protected]>
Co-authored-by: Alexandru Cihodaru <[email protected]>
Co-authored-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Dmitry Markin <[email protected]>
Co-authored-by: PG Herveou <[email protected]>
Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Lukasz Rubaszewski <[email protected]>
Co-authored-by: Alexander Samusev <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
Co-authored-by: Evgeny Snitko <[email protected]>
Co-authored-by: Raymond Cheung <[email protected]>
Co-authored-by: ordian <[email protected]>
Co-authored-by: ParityReleases <[email protected]>
tmpolaczyk pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Oct 16, 2025
## litep2p v0.10.0

This release adds the ability to use system DNS resolver and change
Kademlia DNS memory store capacity. It also fixes the Bitswap protocol
implementation and correctly handles the dropped notification substreams
by unregistering them from the protocol list.

### Added

- kad: Expose memory store configuration
([paritytech#407](paritytech/litep2p#407))
- transport: Allow changing DNS resolver config
([paritytech#384](paritytech/litep2p#384))

### Fixed

- notification: Unregister dropped protocols
([paritytech#391](paritytech/litep2p#391))
- bitswap: Fix protocol implementation
([paritytech#402](paritytech/litep2p#402))
- transport-manager: stricter supported multiaddress check
([paritytech#403](paritytech/litep2p#403))

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
alvicsam pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 17, 2025
## litep2p v0.10.0

This release adds the ability to use system DNS resolver and change
Kademlia DNS memory store capacity. It also fixes the Bitswap protocol
implementation and correctly handles the dropped notification substreams
by unregistering them from the protocol list.

### Added

- kad: Expose memory store configuration
([#407](paritytech/litep2p#407))
- transport: Allow changing DNS resolver config
([#384](paritytech/litep2p#384))

### Fixed

- notification: Unregister dropped protocols
([#391](paritytech/litep2p#391))
- bitswap: Fix protocol implementation
([#402](paritytech/litep2p#402))
- transport-manager: stricter supported multiaddress check
([#403](paritytech/litep2p#403))

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to change DNS resolver settings

3 participants