Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 453,
spec_version: 454,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -1407,6 +1407,16 @@ impl Contains<RuntimeCall> for ContractCallFilter {
fn contains(call: &RuntimeCall) -> bool {
match call {
RuntimeCall::Proxy(inner) => matches!(inner, pallet_proxy::Call::proxy { .. }),
// Since the proxy origin-filter inheritance fix (release 453), calls
// dispatched *inside* Proxy::proxy must also pass this filter. A
// contract holding an explicit user proxy delegation could
// previously execute transfer_stake on the user's behalf; allow
// that inner call again. Security is unchanged: the transfer still
// requires the user to have registered the contract as a proxy,
// and the inherited-filter fix keeps every other call blocked.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[MEDIUM] Add regression coverage for nested proxy filtering

This behavioral fix has no test proving that a contract-origin Proxy::proxy(transfer_stake) succeeds after inherited filtering while unrelated nested calls remain rejected. Add a runtime-level regression test covering both cases; otherwise this compatibility/security boundary can regress unnoticed.

Comment on lines 1408 to +1416

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[MEDIUM] Add regression coverage for nested proxy filtering

This compatibility fix still lacks a test exercising the complete path: a contract-origin call to Proxy::proxy, inherited ContractCallFilter evaluation of the inner transfer_stake, and rejection of an unrelated inner call. A direct Contains::contains assertion is insufficient because the regression arose from nested origin-filter propagation. Add runtime integration coverage before releasing this exception.

Comment on lines 1409 to +1416

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[MEDIUM] Add regression coverage for nested proxy filtering

The release restores a subtle contract → Proxy::proxytransfer_stake path whose behavior depends on inherited origin filters, but no test exercises that composition. Add a runtime integration test proving the nested transfer_stake succeeds with an authorized proxy while another nested Subtensor call remains CallFiltered; testing ContractCallFilter::contains alone would not cover the behavior this change relies on.

RuntimeCall::SubtensorModule(inner) => {
matches!(inner, pallet_subtensor::Call::transfer_stake { .. })
}
_ => false,
}
}
Expand Down
Loading