Validate unsigned -> pallet::authorize#194
Conversation
|
@antkve please rebase/merge with main |
e7af58e to
42a690a
Compare
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), |
There was a problem hiding this comment.
@antkve Could we just use here PreDispatch flow, which modifies authorizations and remove all the is_authorized handling from the call?
| Pallet::<T>::check_unsigned_store(data.as_slice(), CheckContext::Validate), | |
| Pallet::<T>::check_unsigned_store(data.as_slice(), CheckContext::PreDispatch), |
|
@antkve please, check this fmt and fix compilation |
006ed23 to
111cb5e
Compare
7939ab8 to
15c767d
Compare
|
@antkve I added the feeless_if validation |
* Use GitHub Actions matrix for integration tests Run Westend parachain and Polkadot solochain tests in parallel instead of sequentially, eliminating ~75 lines of duplication and cutting CI wall time roughly in half. Each runtime gets its own isolated runner, avoiding flaky cross-runtime state issues (#237). * Reuse runtimes-matrix.json for integration test matrix Instead of hardcoding the runtime list in the workflow, read from scripts/runtimes-matrix.json and filter by a new `integration_tests` flag. This keeps the single source of truth for runtime definitions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add summary job for Integration Tests status check The matrix job reports per-runtime check names (e.g. "Integration Tests (bulletin-polkadot)") which don't match the branch protection rule expecting a single "Integration Tests" status. Add a summary job that aggregates matrix results under that exact name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Load env vars in Setup job to fix cache key resolution The Setup job uses POLKADOT_SDK_VERSION and ZOMBIENET_VERSION in cache keys, but these are defined in .github/env. Without loading that file, the cache keys resolve to empty strings causing cache misses every run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Use GITHUB_ENV for RUNTIME_PACKAGE instead of per-step matrix refs Set RUNTIME_PACKAGE once in $GITHUB_ENV alongside TEST_DIR, then reference both as plain env vars in all subsequent steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Branislav Kontur <bkontur@gmail.com>
| tx::SubmittableTransaction, | ||
| OnlineClient, | ||
| }; | ||
| use subxt_core::{ |
There was a problem hiding this comment.
@antkve I don't remember, but what was exactly the error with PAPI? That it did not work without ValidateUnsigned trait in runtime?
There was a problem hiding this comment.
Yep that's it, I guess this is fixed now though? Hope it is because trying to get it working in subxt is doing my head in
|
@antkve please, rebase, no ProvideCidConfig extension is needed, so unsigned transaction should work or PAPI has problem without ValidateUnsigned? |
| throw new Error(`txOpts not supported for unsigned transactions (getBareTx doesn't accept options). See: https://github.com/polkadot-api/polkadot-api/issues/760`); | ||
| throw new Error(`txOpts not supported for unsigned transactions`); | ||
| } | ||
| // With #[pallet::authorize], unsigned transactions must be submitted as "general" |
There was a problem hiding this comment.
@antkve very good job, here, I am trying to push this for PAPI: polkadot-api/polkadot-api#760 (comment)
|
Let's keep this open and figure out the PAPI support: https://matrix.to/#/!bMWYTUFeSoYacMOlpS:matrix.parity.io/$pqN2BJJpI8gAoEziYDuVXF-j6dt0FMlIW_wP9SgXfTU?via=parity.io&via=matrix.org&via=matrix.parity.io |
@antkve actually, there should be some hacky workaround: polkadot-js/api#6213 (comment) or maybe: |
|
@antkve let's keep our stuff for now, but could you just try this: polkadot-api/polkadot-api#760 (comment)? |
TODO
think aboutauthorize_preimageand ProvideCidCodec andsp_io::hashing::blake2_256(data)incheck_unsigned