mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 01:51:02 +00:00
This PR reverts #2280 which introduced `TransactionExtension` to replace `SignedExtension`. As a result of the discussion [here](https://github.com/paritytech/polkadot-sdk/pull/3623#issuecomment-1986789700), the changes will be reverted for now with plans to reintroduce the concept in the future. --------- Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
@@ -1,144 +0,0 @@
|
||||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
||||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
||||
|
||||
title: FRAME Create `TransactionExtension` as a replacement for `SignedExtension`
|
||||
|
||||
doc:
|
||||
- audience: Runtime User
|
||||
description: |
|
||||
Introduces a new trait `TransactionExtension` to replace `SignedExtension`. Introduce the
|
||||
idea of transactions which obey the runtime's extensions and have according Extension data
|
||||
(né Extra data) yet do not have hard-coded signatures.
|
||||
|
||||
Deprecate the terminology of "Unsigned" when used for transactions/extrinsics owing to there
|
||||
now being "proper" unsigned transactions which obey the extension framework and "old-style"
|
||||
unsigned which do not. Instead we have `General` for the former and `Bare` for the latter.
|
||||
Unsigned will be phased out as a type of transaction, and `Bare` will only be used for
|
||||
Inherents.
|
||||
|
||||
Types of extrinsic are now therefore
|
||||
- Bare (no hardcoded signature, no Extra data; used to be known as "Unsigned")
|
||||
- Bare transactions (deprecated) - Gossiped, validated with `ValidateUnsigned`
|
||||
(deprecated) and the `_bare_compat` bits of `TransactionExtension` (deprecated).
|
||||
- Inherents - Not gossiped, validated with `ProvideInherent`.
|
||||
- Extended (Extra data) - Gossiped, validated via `TransactionExtension`.
|
||||
- Signed transactions (with a hardcoded signature).
|
||||
- General transactions (without a hardcoded signature).
|
||||
|
||||
Notable information on `TransactionExtension` and the differences from `SignedExtension`
|
||||
- `AdditionalSigned`/`additional_signed` is renamed to `Implicit`/`implicit`. It is encoded
|
||||
for the entire transaction and passed in to each extension as a new argument to validate.
|
||||
- `pre_dispatch` is renamed to `prepare`.
|
||||
- `validate` runs transaction validation logic both off-chain and on-chain, and is
|
||||
non-mutating.
|
||||
- `prepare` runs on-chain pre-execution logic using information extracted during validation
|
||||
and is mutating.
|
||||
- `validate` and `prepare` are now passed an `Origin` rather than an `AccountId`. If the
|
||||
extension logic presumes an `AccountId`, consider using the trait function
|
||||
`AsSystemOriginSigner::as_system_origin_signer`.
|
||||
- A signature on the underlying transaction may validly not be present.
|
||||
- The origin may be altered during validation.
|
||||
- Validation functionality present in `validate` should not be repeated in `prepare`.
|
||||
Useful information obtained during `validate` should now be passsed in to `prepare` using
|
||||
the new user-specifiable type `Val`.
|
||||
- Unsigned logic should be migrated from the old `*_unsigned` functions into the regular
|
||||
versions of the new functions where the `Origin` is `None`.
|
||||
- The `Call` type defining the runtime call is now a type parameter.
|
||||
- `TransactionExtension` now takes a `Context` type parameter. This defines some arbitrary
|
||||
contextual data that is injected into the transaction extension logic. It is unused in
|
||||
instances migrated from `SignedExtension`.
|
||||
- Extensions now track the weight they consume during valdiation, preparation and
|
||||
post-dispatch through the `TransactionExtensionBase::weight` function.
|
||||
- `TestXt` was removed and its usage in tests was replaced with `UncheckedExtrinsic`
|
||||
instances.
|
||||
|
||||
To fix the build issues introduced by this change, use the `AsTransactionExtension` adapter
|
||||
to wrap existing `SignedExtension`s by converting them using the `From<SignedExtension>`
|
||||
generic implementation for `AsTransactionExtension`. More details on migrating existing
|
||||
`SignedExtension` implementations to `TransactionExtension` in the PR description.
|
||||
|
||||
crates:
|
||||
- name: bridge-runtime-common
|
||||
- name: bp-bridge-hub-cumulus
|
||||
- name: bp-kusama
|
||||
- name: bp-polkadot-bulletin
|
||||
- name: bp-polkadot
|
||||
- name: bp-rococo
|
||||
- name: bp-westend
|
||||
- name: bp-polkadot-core
|
||||
- name: bp-runtime
|
||||
- name: snowbridge-pallet-inbound-queue
|
||||
- name: snowbridge-pallet-outbound-queue
|
||||
- name: snowbridge-pallet-system
|
||||
- name: snowbridge-runtime-test-common
|
||||
- name: parachain-template-runtime
|
||||
- name: asset-hub-rococo-runtime
|
||||
- name: asset-hub-westend-runtime
|
||||
- name: bridge-hub-rococo-runtime
|
||||
- name: bridge-hub-westend-runtime
|
||||
- name: collectives-westend-runtime
|
||||
- name: contracts-rococo-runtime
|
||||
- name: coretime-rococo-runtime
|
||||
- name: coretime-westend-runtime
|
||||
- name: glutton-westend-runtime
|
||||
- name: people-rococo-runtime
|
||||
- name: people-westend-runtime
|
||||
- name: seedling-runtime
|
||||
- name: shell-runtime
|
||||
- name: penpal-runtime
|
||||
- name: rococo-parachain-runtime
|
||||
- name: polkadot-parachain-bin
|
||||
- name: cumulus-primitives-storage-weight-reclaim
|
||||
- name: cumulus-test-client
|
||||
- name: cumulus-test-runtime
|
||||
- name: cumulus-test-service
|
||||
- name: polkadot-sdk-docs
|
||||
- name: polkadot-service
|
||||
- name: polkadot-test-service
|
||||
- name: polkadot-runtime-common
|
||||
- name: rococo-runtime
|
||||
- name: polkadot-test-runtime
|
||||
- name: westend-runtime
|
||||
- name: staging-xcm-builder
|
||||
- name: minimal-runtime
|
||||
- name: node-template
|
||||
- name: node-template-runtime
|
||||
- name: staging-node-cli
|
||||
- name: kitchensink-runtime
|
||||
- name: node-testing
|
||||
- name: sc-client-api
|
||||
- name: sc-client-db
|
||||
- name: sc-network-gossip
|
||||
- name: sc-network-sync
|
||||
- name: sc-transaction-pool
|
||||
- name: frame
|
||||
- name: pallet-babe
|
||||
- name: pallet-balances
|
||||
- name: pallet-beefy
|
||||
- name: pallet-collective
|
||||
- name: pallet-election-provider-multi-phase
|
||||
- name: pallet-elections-phragmen
|
||||
- name: pallet-example-basic
|
||||
- name: pallet-example-offchain-worker
|
||||
- name: frame-executive
|
||||
- name: pallet-grandpa
|
||||
- name: pallet-im-online
|
||||
- name: pallet-offences
|
||||
- name: pallet-sassafras
|
||||
- name: pallet-state-trie-migration
|
||||
- name: pallet-sudo
|
||||
- name: frame-support-procedural
|
||||
- name: frame-support
|
||||
- name: frame-system
|
||||
- name: frame-system-benchmarking
|
||||
- name: pallet-transaction-payment
|
||||
- name: pallet-asset-conversion-tx-payment
|
||||
- name: pallet-asset-tx-payment
|
||||
- name: pallet-skip-feeless-payment
|
||||
- name: sp-inherents
|
||||
- name: sp-metadata-ir
|
||||
- name: sp-runtime
|
||||
- name: substrate-test-runtime
|
||||
- name: frame-benchmarking-cli
|
||||
- name: frame-remote-externalities
|
||||
- name: substrate-rpc-client
|
||||
@@ -0,0 +1,11 @@
|
||||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
||||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
||||
|
||||
title: Revert "FRAME Create TransactionExtension as a replacement for SignedExtension (#2280)"
|
||||
|
||||
doc:
|
||||
- audience: Runtime Dev
|
||||
description: |
|
||||
This PR reverts the PR which introduced `TransactionExtension` to replace `SignedExtension`.
|
||||
|
||||
crates: [ ]
|
||||
Reference in New Issue
Block a user