Add Cancel proxy type for rejecting time-delayed announcements#2507
Open
lindsey-comet wants to merge 1 commit intoopentensor:mainfrom
Open
Add Cancel proxy type for rejecting time-delayed announcements#2507lindsey-comet wants to merge 1 commit intoopentensor:mainfrom
lindsey-comet wants to merge 1 commit intoopentensor:mainfrom
Conversation
Adds a new ProxyType::Cancel variant that allows a proxy to reject (proxy_kill) time-delayed proxy announcements. This enables users to create a proxy that can veto/cancel announced transactions before they are executed. Changes: - Add Cancel variant to ProxyType enum in common/src/lib.rs - Add TryFrom<u8> and From<ProxyType> conversions for value 18 - Add InstanceFilter implementation for Cancel in runtime/src/lib.rs that matches pallet_proxy::Call::reject_announcement Closes opentensor#590
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
Cancelproxy type that allows users to create proxies specifically for rejecting/canceling time-delayed proxy announcements.Motivation
From #590: Users want to analyze any transaction created by an account before accepting them. With the time-delayed proxy feature, if an account has a delay configured, calls must be announced before execution. The
Cancelproxy type enables users to grant permission to another account to reject these announcements.Changes
Cancelvariant toProxyTypeenumcommon/src/lib.rsTryFrom<u8>conversion (value 18) forCanceltypeFrom<ProxyType>conversion forCanceltypeInstanceFilterimplementation that allowspallet_proxy::Call::reject_announcementcallsTesting
The changes compile successfully:
cargo check -p subtensor-runtime-common✓cargo check -p node-subtensor-runtime✓Related Issue
Closes #590