Skip to content

Backport [PATCH] Let's move some stuff#3

Merged
sfffaaa merged 1 commit into
peaq-polkadot-v1.7.2from
release-pool-issue
Jun 18, 2025
Merged

Backport [PATCH] Let's move some stuff#3
sfffaaa merged 1 commit into
peaq-polkadot-v1.7.2from
release-pool-issue

Conversation

@sfffaaa

@sfffaaa sfffaaa commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator

@sfffaaa sfffaaa requested a review from Copilot June 18, 2025 14:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports changes by updating runtime API decoding logic and introducing a constant for maximum extrinsic depth. Key changes include:

  • Replacing a decode function call in the proc-macro API implementation.
  • Introducing and using a new constant MAX_EXTRINSIC_DEPTH in the executive runtime.
  • Updating the method of obtaining the encoded extrinsic length in transaction validation.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs Replaces decode_all_with_depth_limit with a direct call to decode in the generated code.
substrate/frame/executive/src/lib.rs Adds a MAX_EXTRINSIC_DEPTH constant and updates decoding/encoding logic for extrinsics.
Comments suppressed due to low confidence (2)

substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs:106

  • The change from using decode_all_with_depth_limit with MAX_EXTRINSIC_DEPTH to using decode without a depth limit removes an important safety check. Confirm that equivalent depth protection is implemented elsewhere.
				match #c::Decode::decode(

substrate/frame/executive/src/lib.rs:718

  • [nitpick] Replacing the using_encoded closure with a full uxt.encode() may introduce additional memory allocation. Verify that this change does not negatively impact performance in high-throughput scenarios.
		};

@sfffaaa sfffaaa merged commit 41c15ca into peaq-polkadot-v1.7.2 Jun 18, 2025
2 of 11 checks passed
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.

2 participants