Skip to content

Conversation

@antkve
Copy link
Contributor

@antkve antkve commented Jan 21, 2026

TODO

  • think about authorize_preimage and ProvideCidCodec and sp_io::hashing::blake2_256(data) in check_unsigned

@bkontur
Copy link
Collaborator

bkontur commented Jan 22, 2026

@antkve please rebase/merge with main

@antkve antkve force-pushed the ak-validate-unsigned branch from c4a0588 to e7af58e Compare January 22, 2026 13:19
@antkve antkve force-pushed the ak-validate-unsigned branch from e7af58e to 42a690a Compare January 22, 2026 13:37
@antkve
Copy link
Contributor Author

antkve commented Jan 22, 2026

@antkve please rebase/merge with main

Done. By the way I'm not sure if we want to keep backwards compatibility like in the frame system upgrade? Can add that back in.

pub fn store(_origin: OriginFor<T>, data: Vec<u8>) -> DispatchResult {
#[pallet::authorize(|_source, data| {
Pallet::<T>::to_validity_with_refund(
Pallet::<T>::check_unsigned_store(data.as_slice(), CheckContext::Validate),
Copy link
Collaborator

Choose a reason for hiding this comment

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

@antkve Could we just use here PreDispatch flow, which modifies authorizations and remove all the is_authorized handling from the call?

Suggested change
Pallet::<T>::check_unsigned_store(data.as_slice(), CheckContext::Validate),
Pallet::<T>::check_unsigned_store(data.as_slice(), CheckContext::PreDispatch),

@bkontur
Copy link
Collaborator

bkontur commented Jan 22, 2026

@antkve please, check this fmt and fix compilation

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.

3 participants