1. Apr 26, 2024
  2. Mar 26, 2024
    • Dcompoze's avatar
      Fix spelling mistakes across the whole repository (#3808) · 002d9260
      Dcompoze authored
      **Update:** Pushed additional changes based on the review comments.
      
      **This pull request fixes various spelling mistakes in this
      repository.**
      
      Most of the changes are contained in the first **3** commits:
      
      - `Fix spelling mistakes in comments and docs`
      
      - `Fix spelling mistakes in test names`
      
      - `Fix spelling mistakes in error messages, panic messages, logs and
      tracing`
      
      Other source code spelling mistakes are separated into individual
      commits for easier reviewing:
      
      - `Fix the spelling of 'authority'`
      
      - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
      
      - `Fix the spelling of 'prev_enqueud_messages'`
      
      - `Fix the spelling of 'endpoint'`
      
      - `Fix the spelling of 'children'`
      
      - `Fix the spelling of 'PenpalSiblingSovereignAccount'`
      
      - `Fix the spelling of 'PenpalSudoAccount'`
      
      - `Fix the spelling of 'insufficient'`
      
      - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
      
      - `Fix the spelling of 'subtracted'`
      
      - `Fix the spelling of 'CandidatePendingAvailability'`
      
      - `Fix the spelling of 'exclusive'`
      
      - `Fix the spelling of 'until'`
      
      - `Fix the spelling of 'discriminator'`
      
      - `Fix the spelling of 'nonexistent'`
      
      - `Fix the spelling of 'subsystem'`
      
      - `Fix the spelling of 'indices'`
      
      - `Fix the spelling of 'committed'`
      
      - `Fix the spelling of 'topology'`
      
      - `Fix the spelling of 'response'`
      
      - `Fix the spelling of 'beneficiary'`
      
      - `Fix the spelling of 'formatted'`
      
      - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
      
      - `Fix the spelling of 'succeeded'`
      
      - `Fix the spelling of 'reopened'`
      
      - `Fix the spelling of 'proposer'`
      
      - `Fix the spelling of 'InstantiationNonce'`
      
      - `Fix the spelling of 'depositor'`
      
      - `Fix the spelling of 'expiration'`
      
      - `Fix the spelling of 'phantom'`
      
      - `Fix the spelling of 'AggregatedKeyValue'`
      
      - `Fix the spelling of 'randomness'`
      
      - `Fix the spelling of 'defendant'`
      
      - `Fix the spelling of 'AquaticMammal'`
      
      - `Fix the spelling of 'transactions'`
      
      - `Fix the spelling of 'PassingTracingSubscriber'`
      
      - `Fix the spelling of 'TxSignaturePayload'`
      
      - `Fix the spelling of 'versioning'`
      
      - `Fix the spelling of 'descendant'`
      
      - `Fix the spelling of 'overridden'`
      
      - `Fix the spelling of 'network'`
      
      Let me know if this structure is adequate.
      
      **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
      `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
      as it is.
      
      ~~**Note:** In some places the term `Receival` is used to refer to
      message reception, IMO `Reception` is the correct word here, but I left
      it as it is.~~
      
      ~~**Note:** In some places the term `Overlayed` is used instead of the
      more acceptable version `Overlaid` but I also left it as it is.~~
      
      ~~**Note:** In some places the term `Applyable` is used instead of the
      correct version `Applicable` but I also left it as it is.~~
      
      **Note:** Some usage of British vs American english e.g. `judgement` vs
      `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
      are both present in different places, but I suppose that's
      understandable given the number of contributors.
      
      ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
      triggers errors in CI when I make changes to it, so I left it as it
      is.~~
      002d9260
  3. Mar 13, 2024
  4. Mar 11, 2024
  5. Mar 04, 2024
    • Gavin Wood's avatar
      FRAME: Create `TransactionExtension` as a replacement for `SignedExtension` (#2280) · fd5f9292
      Gavin Wood authored
      Closes #2160
      
      First part of [Extrinsic
      Horizon](https://github.com/paritytech/polkadot-sdk/issues/2415
      
      )
      
      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. (Ultimately, the latter 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).
      
      `TransactionExtension` differs from `SignedExtension` because:
      - A signature on the underlying transaction may validly not be present.
      - It may alter the origin during validation.
      - `pre_dispatch` is renamed to `prepare` and need not contain the checks
      present in `validate`.
      - `validate` and `prepare` is passed an `Origin` rather than a
      `AccountId`.
      - `validate` may pass arbitrary information into `prepare` via a new
      user-specifiable type `Val`.
      - `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`. This
      facilitates the ability of extensions to acts as underlying crypto.
      
      There is a new `DispatchTransaction` trait which contains only default
      function impls and is impl'ed for any `TransactionExtension` impler. It
      provides several utility functions which reduce some of the tedium from
      using `TransactionExtension` (indeed, none of its regular functions
      should now need to be called directly).
      
      Three transaction version discriminator ("versions") are now
      permissible:
      - 0b000000100: Bare (used to be called "Unsigned"): contains Signature
      or Extra (extension data). After bare transactions are no longer
      supported, this will strictly identify an Inherents only.
      - 0b100000100: Old-school "Signed" Transaction: contains Signature and
      Extra (extension data).
      - 0b010000100: New-school "General" Transaction: contains Extra
      (extension data), but no Signature.
      
      For the New-school General Transaction, it becomes trivial for authors
      to publish extensions to the mechanism for authorizing an Origin, e.g.
      through new kinds of key-signing schemes, ZK proofs, pallet state,
      mutations over pre-authenticated origins or any combination of the
      above.
      
      ## Code Migration
      
      ### NOW: Getting it to build
      
      Wrap your `SignedExtension`s in `AsTransactionExtension`. This should be
      accompanied by renaming your aggregate type in line with the new
      terminology. E.g. Before:
      
      ```rust
      /// The SignedExtension to the basic transaction logic.
      pub type SignedExtra = (
      	/* snip */
      	MySpecialSignedExtension,
      );
      /// Unchecked extrinsic type as expected by this runtime.
      pub type UncheckedExtrinsic =
      	generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
      ```
      
      After:
      
      ```rust
      /// The extension to the basic transaction logic.
      pub type TxExtension = (
      	/* snip */
      	AsTransactionExtension<MySpecialSignedExtension>,
      );
      /// Unchecked extrinsic type as expected by this runtime.
      pub type UncheckedExtrinsic =
      	generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
      ```
      
      You'll also need to alter any transaction building logic to add a
      `.into()` to make the conversion happen. E.g. Before:
      
      ```rust
      fn construct_extrinsic(
      		/* snip */
      ) -> UncheckedExtrinsic {
      	let extra: SignedExtra = (
      		/* snip */
      		MySpecialSignedExtension::new(/* snip */),
      	);
      	let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
      	let signature = payload.using_encoded(|e| sender.sign(e));
      	UncheckedExtrinsic::new_signed(
      		/* snip */
      		Signature::Sr25519(signature),
      		extra,
      	)
      }
      ```
      
      After:
      
      ```rust
      fn construct_extrinsic(
      		/* snip */
      ) -> UncheckedExtrinsic {
      	let tx_ext: TxExtension = (
      		/* snip */
      		MySpecialSignedExtension::new(/* snip */).into(),
      	);
      	let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
      	let signature = payload.using_encoded(|e| sender.sign(e));
      	UncheckedExtrinsic::new_signed(
      		/* snip */
      		Signature::Sr25519(signature),
      		tx_ext,
      	)
      }
      ```
      
      ### SOON: Migrating to `TransactionExtension`
      
      Most `SignedExtension`s can be trivially converted to become a
      `TransactionExtension`. There are a few things to know.
      
      - Instead of a single trait like `SignedExtension`, you should now
      implement two traits individually: `TransactionExtensionBase` and
      `TransactionExtension`.
      - Weights are now a thing and must be provided via the new function `fn
      weight`.
      
      #### `TransactionExtensionBase`
      
      This trait takes care of anything which is not dependent on types
      specific to your runtime, most notably `Call`.
      
      - `AdditionalSigned`/`additional_signed` is renamed to
      `Implicit`/`implicit`.
      - Weight must be returned by implementing the `weight` function. If your
      extension is associated with a pallet, you'll probably want to do this
      via the pallet's existing benchmarking infrastructure.
      
      #### `TransactionExtension`
      
      Generally:
      - `pre_dispatch` is now `prepare` and you *should not reexecute the
      `validate` functionality in there*!
      - You don't get an account ID any more; you get an origin instead. If
      you need to presume an account ID, then you can use the trait function
      `AsSystemOriginSigner::as_system_origin_signer`.
      - You get an additional ticket, similar to `Pre`, called `Val`. This
      defines data which is passed from `validate` into `prepare`. This is
      important since you should not be duplicating logic from `validate` to
      `prepare`, you need a way of passing your working from the former into
      the latter. This is it.
      - This trait takes two type parameters: `Call` and `Context`. `Call` is
      the runtime call type which used to be an associated type; you can just
      move it to become a type parameter for your trait impl. `Context` is not
      currently used and you can safely implement over it as an unbounded
      type.
      - There's no `AccountId` associated type any more. Just remove it.
      
      Regarding `validate`:
      - You get three new parameters in `validate`; all can be ignored when
      migrating from `SignedExtension`.
      - `validate` returns a tuple on success; the second item in the tuple is
      the new ticket type `Self::Val` which gets passed in to `prepare`. If
      you use any information extracted during `validate` (off-chain and
      on-chain, non-mutating) in `prepare` (on-chain, mutating) then you can
      pass it through with this. For the tuple's last item, just return the
      `origin` argument.
      
      Regarding `prepare`:
      - This is renamed from `pre_dispatch`, but there is one change:
      - FUNCTIONALITY TO VALIDATE THE TRANSACTION NEED NOT BE DUPLICATED FROM
      `validate`!!
      - (This is different to `SignedExtension` which was required to run the
      same checks in `pre_dispatch` as in `validate`.)
      
      Regarding `post_dispatch`:
      - Since there are no unsigned transactions handled by
      `TransactionExtension`, `Pre` is always defined, so the first parameter
      is `Self::Pre` rather than `Option<Self::Pre>`.
      
      If you make use of `SignedExtension::validate_unsigned` or
      `SignedExtension::pre_dispatch_unsigned`, then:
      - Just use the regular versions of these functions instead.
      - Have your logic execute in the case that the `origin` is `None`.
      - Ensure your transaction creation logic creates a General Transaction
      rather than a Bare Transaction; this means having to include all
      `TransactionExtension`s' data.
      - `ValidateUnsigned` can still be used (for now) if you need to be able
      to construct transactions which contain none of the extension data,
      however these will be phased out in stage 2 of the Transactions Horizon,
      so you should consider moving to an extension-centric design.
      
      ## TODO
      
      - [x] Introduce `CheckSignature` impl of `TransactionExtension` to
      ensure it's possible to have crypto be done wholly in a
      `TransactionExtension`.
      - [x] Deprecate `SignedExtension` and move all uses in codebase to
      `TransactionExtension`.
        - [x] `ChargeTransactionPayment`
        - [x] `DummyExtension`
        - [x] `ChargeAssetTxPayment` (asset-tx-payment)
        - [x] `ChargeAssetTxPayment` (asset-conversion-tx-payment)
        - [x] `CheckWeight`
        - [x] `CheckTxVersion`
        - [x] `CheckSpecVersion`
        - [x] `CheckNonce`
        - [x] `CheckNonZeroSender`
        - [x] `CheckMortality`
        - [x] `CheckGenesis`
        - [x] `CheckOnlySudoAccount`
        - [x] `WatchDummy`
        - [x] `PrevalidateAttests`
        - [x] `GenericSignedExtension`
        - [x] `SignedExtension` (chain-polkadot-bulletin)
        - [x] `RefundSignedExtensionAdapter`
      - [x] Implement `fn weight` across the board.
      - [ ] Go through all pre-existing extensions which assume an account
      signer and explicitly handle the possibility of another kind of origin.
      - [x] `CheckNonce` should probably succeed in the case of a non-account
      origin.
      - [x] `CheckNonZeroSender` should succeed in the case of a non-account
      origin.
      - [x] `ChargeTransactionPayment` and family should fail in the case of a
      non-account origin.
        - [ ] 
      - [x] Fix any broken tests.
      
      ---------
      
      Signed-off-by: default avatargeorgepisaltu <[email protected]>
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      Co-authored-by: default avatarNikhil Gupta <[email protected]>
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: default avatarChevdor <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarMaciej <[email protected]>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      Co-authored-by: default avatarMarcin S. <[email protected]>
      Co-authored-by: default avatarTsvetomir Dimitrov <[email protected]>
      Co-authored-by: default avatarJavier Bullrich <[email protected]>
      Co-authored-by: default avatarKoute <[email protected]>
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: Vladimir Istyufeev's avatarVladimir Istyufeev <[email protected]>
      Co-authored-by: default avatarRoss Bulat <[email protected]>
      Co-authored-by: default avatarGonçalo Pestana <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarSvyatoslav Nikolsky <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatars0me0ne-unkn0wn <[email protected]>
      Co-authored-by: default avatarordian <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: default avatarAaro Altonen <[email protected]>
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      Co-authored-by: default avatarAlexander Samusev <[email protected]>
      Co-authored-by: default avatarJulian Eager <[email protected]>
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarDónal Murray <[email protected]>
      Co-authored-by: default avataryjh <[email protected]>
      Co-authored-by: default avatarTom Mi <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarWill | Paradox | ParaNodes.io <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarPG Herveou <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarJuan Girini <[email protected]>
      Co-authored-by: default avatarbader y <[email protected]>
      Co-authored-by: default avatarJames Wilson <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarasynchronous rob <[email protected]>
      Co-authored-by: default avatarParth <[email protected]>
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      Co-authored-by: default avatarJonathan Udd <[email protected]>
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      Co-authored-by: default avatarEgor_P <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarEvgeny Snitko <[email protected]>
      Co-authored-by: default avatarJust van Stam <[email protected]>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      Co-authored-by: default avatargupnik <[email protected]>
      Co-authored-by: default avatardzmitry-lahoda <[email protected]>
      Co-authored-by: default avatarzhiqiangxu <[email protected]>
      Co-authored-by: default avatarNazar Mokrynskyi <[email protected]>
      Co-authored-by: default avatarAnwesh <[email protected]>
      Co-authored-by: default avatarcheme <[email protected]>
      Co-authored-by: default avatarSam Johnson <[email protected]>
      Co-authored-by: default avatarkianenigma <[email protected]>
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      Co-authored-by: default avatarMuharem <[email protected]>
      Co-authored-by: default avatarjoepetrowski <[email protected]>
      Co-authored-by: default avatarAlexandru Gheorghe <[email protected]>
      Co-authored-by: default avatarGabriel Facco de Arruda <[email protected]>
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: command-bot <>
      fd5f9292
  6. Jun 15, 2023
  7. Mar 02, 2023
  8. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  9. Jan 29, 2023
  10. Sep 20, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Origin (#12258) · e4b6f4a6
      Sergej Sakac authored
      * BREAKING: Rename Origin
      
      * more renaming
      
      * a bit more renaming
      
      * fix
      
      * more fixing
      
      * fix in frame_support
      
      * even more fixes
      
      * fix
      
      * small fix
      
      * ...
      
      * update .stderr
      
      * docs
      
      * update docs
      
      * update docs
      
      * docs
      e4b6f4a6
  11. Sep 12, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Call & Event (#11981) · 6e8795af
      Sergej Sakac authored
      
      
      * rename Event to RuntimeEvent
      
      * rename Call
      
      * rename in runtimes
      
      * small fix
      
      * rename Event
      
      * small fix & rename RuntimeCall back to Call for now
      
      * small fixes
      
      * more renaming
      
      * a bit more renaming
      
      * fmt
      
      * small fix
      
      * commit
      
      * prep for renaming associated types
      
      * fix
      
      * rename associated Event type
      
      * rename to RuntimeEvent
      
      * commit
      
      * merge conflict fixes & fmt
      
      * additional renaming
      
      * fix.
      
      * fix decl_event
      
      * rename in tests
      
      * remove warnings
      
      * remove accidental rename
      
      * .
      
      * commit
      
      * update .stderr
      
      * fix in test
      
      * update .stderr
      
      * TRYBUILD=overwrite
      
      * docs
      
      * fmt
      
      * small change in docs
      
      * rename PalletEvent to Event
      
      * rename Call to RuntimeCall
      
      * renamed at wrong places :P
      
      * rename Call
      
      * rename
      
      * rename associated type
      
      * fix
      
      * fix & fmt
      
      * commit
      
      * frame-support-test
      
      * passing tests
      
      * update docs
      
      * rustdoc fix
      
      * update .stderr
      
      * wrong code in docs
      
      * merge fix
      
      * fix in error message
      
      * update .stderr
      
      * docs & error message
      
      * .
      
      * merge fix
      
      * merge fix
      
      * fmt
      
      * fmt
      
      * merge fix
      
      * more fixing
      
      * fmt
      
      * remove unused
      
      * fmt
      
      * fix
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      6e8795af
  12. Sep 08, 2022
    • Boluwatife Bakre's avatar
      Use parameter_types instead of thread_local for test-setup (#12036) · 3ec4d13e
      Boluwatife Bakre authored
      
      
      * Edit to Assets. parameter_types
      
      * fixes
      
      * Test Fixes. WIP
      
      * Edits to pallet-aura
      
      * Camel Case
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Implementation of mutate fn
      
      * update to pallet-aura
      
      * Update to frame-system. Fixes
      
      * Update to frame-support-test. CamelCases
      
      * Updates to frame- contracts, offences, staking, bounties, child bounties
      
      * Edit to mutate fn. Changes to frame-contracts. CamelCase pallet-aura
      
      * Edits to frame-contracts & executive
      
      * cargo +nightly fmt
      
      * unused import removed
      
      * unused import removed
      
      * cargo +nightly fmt
      
      * minor adjustment
      
      * updates
      
      * updates
      
      * cargo +nightly fmt
      
      * cargo +nightly fmt
      
      * take fn implemented
      
      * update
      
      * update
      
      * Fixes to CallFilter
      
      * cargo +nightly fmt
      
      * final fixes
      
      * Default changed to $value
      
      * Update frame/support/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      3ec4d13e
  13. Aug 02, 2022
  14. Jan 05, 2022
  15. Jan 03, 2022
  16. Sep 15, 2021
    • Andrew Jones's avatar
      Enrich metadata with type information (#8615) · 49b6dfd2
      Andrew Jones authored
      
      
      * Cargo.lock after merge
      
      * Restore scale-info feature
      
      * Fully qualify TypeInfo derive
      
      * Skip PendingSwap T
      
      * Add missing skip_type_params attr
      
      * metadata docs features
      
      * Reduce pallet event attribute to struct
      
      * Cargo.lock
      
      * Update frame/balances/src/tests_composite.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Line widths check
      
      * Cargo.lock
      
      * Add scale-info/std
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Use `skip_type_params` to remove `TypeInfo` requirements on checks
      
      * Revert "Remove unused Call metadata stuff"
      
      This reverts commit 41311f85
      
      * Skip BalanceSwapAction type parameter
      
      * Remove unused event metadata macro
      
      * Update frame-metadata
      
      * Update primitives/npos-elections/compact/src/codec.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Manual TypeInfo for Header
      
      * Remove TypeInfo requirement for consts in BoundedVec etc.
      
      * Another TypeInfo bound removed
      
      * review: fix indentation
      
      * TypeInfo impls for Identity types
      
      * Add some todos to add custom TypeInfo impls
      
      * Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Add some todos to add custom TypeInfo impls
      
      * Add a test for manual Data TypeInfo impl
      
      * Add custom TypeInfo impl for Vote
      
      * Era custom TypeInfo crimes
      
      * Revert finality-grandpa version to 0.14.z
      
      * review: renamed module to pallet_constants_metadata
      
      * New line at end of file
      
      * Add missing scale-info/std
      
      * Update frame/support/src/storage/types/mod.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Remove StorageEntryType::Map unused flag
      
      * Add missing scale-info dependency after merge
      
      * SignedExtension::AdditionalSigned metadata
      
      * Update frame-metadata, use abbreviated docs and args fields
      
      * Update frame/example/Cargo.toml
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Add scale_info/std and remove unused scale-info dependency
      
      * Remove scale-info dependency
      
      * Remove treasury pallet::metadata
      
      * Remove redundant Event test
      
      * Add back scale-info as dev dependency
      
      * fix error metadata when no error defined in decl_module
      
      * Add Module3 to tests
      
      * Fix metadata test
      
      * Add docs feature to frame-support test
      
      * WIP fixing pallet metadata test
      
      * Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
      
      * Use main branch of frame-metadata
      
      * Use patch of scale-info for latest changes
      
      * Use latest patched scale-info
      
      * Manual TypeInfo for DigestItem
      
      * Manual TypeInfo for DigestItem
      
      * Update scale-info
      
      * Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
      
      
      
      * Named fields for FRAME v2 pallet Call variants
      
      * Named fields for FRAME v1 pallet Call variants
      
      * Add missing scale-info dependency
      
      * WIP expand benchmark call variant
      
      * fix benchmark with new function
      
      create a new function for each variant of a pallet call.
      This function is called by benchmarking macro in order not to break call
      creation with unnamed argument
      
      * fix tests
      
      * more fix
      
      * Fix staking tests
      
      * Fix offchain workers calls
      
      * Cherry pick rustfmt.toml from master
      
      * cargo +nightly-2021-06-22 fmt --all
      
      * Update to new call variant structs
      
      * More call variant struct updates
      
      * Remove unused import
      
      * More call variant structs
      
      * More call variant structs
      
      * Even more call variant structs
      
      * Mooar variant structs
      
      * Evermore variant structs
      
      * Call variant structs ad infinitum
      
      * Fmt
      
      * More call variants
      
      * Last call variant
      
      * Call variants all done?
      
      * Fix SS58Prefix type
      
      * Potential workaround for BitFlags<IdentityFields> TypeInfo
      
      * Enable docs capturing for Call, Event, and Error types
      
      * Fix IdentityFields TypeInfo
      
      * Remove metadata-docs feature
      
      * Add capture_docs = true for legacy Call, Event and Error types
      
      * Fmt
      
      * Fix metadata test type
      
      * Update benchmarks with call struct variants
      
      * Fmt
      
      * More test fixes
      
      * Fmt
      
      * Fix benches
      
      * Use latest capture_docs attr
      
      * Latest scale_info
      
      * Fmt
      
      * review: change &Vec to &[]
      
      * Remove pallet metadata attr
      
      * review: remove commented out test code
      
      * review: skip_type_params trailing comma suggestion
      
      * Update to scale-info 0.10.0
      
      * Update construct_runtime ui tests, different because of metadata TypeInfo impls
      
      * Add some TypeInfo derives for UI tests
      
      * Update storage ensure span ui stderrs
      
      * Update call argument bound ui tests
      
      Possibly changed because change from tuple to struct variants?
      
      * Add scale-info dev dependency
      
      * Update to latest finality-grandpa release
      
      * review: missing newline
      
      * review: missing scale-info/std
      
      * review: remove duplicate scale-info/std
      
      * review: remove fully qualified TypeInfo
      
      * review: add missing scale-info/std
      
      * review: remove unnecessary imports.
      
      * Fmt
      
      * Use crates.io RC version of frame-metadata
      
      * Remove scale-info/std because it is a dev dependency
      
      * Add missing scale_info dev-dependency for test
      
      * Delete empty metadata folder
      
      * Fix sp_std import
      
      * review: improve manual UncheckedExtrinsic TypeInfo impl
      
      * review: use full scale-info for dev-dependency
      
      * Remove DefaultByteGetter impl
      
      * review: derive TypeInfo for generic header
      
      * Fmt
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update bin/node/executor/Cargo.toml
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/identity/src/types.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/src/dispatch.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Remove redundant derive
      
      * Simplify scale-info dependency
      
      * Strip underscore prefix from call variant struct names
      
      * Another underscore field
      
      * More underscore fields
      
      * Another underscore field
      
      * Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
      
      * Fmt
      
      * Revert weights formatting
      
      * Fix up some tests
      
      * Fix up some tests for StorageEntryTypeMetadata
      
      * scale-info dev dependency
      
      * Fix test error
      
      * Add missing TypeInfo derives
      
      * Add back missing scale-info dependency
      
      * Add back missing scale-info dependency
      
      * Fix npos compact impls
      
      * Cargo.lock
      
      * Fmt
      
      * Fix errors
      
      * Fmt
      
      * Fix renamed raw_solution field
      
      * Fix error
      
      * Fmt
      
      * Fix some benchmarks
      
      * Fmt
      
      * Stray R
      
      * Fix
      
      * Add missing TypeInfos
      
      * ui test fix
      
      * Fix line widths
      
      * Revert "ui test fix"
      
      This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
      
      * Upgrade to scale-info 0.11.0
      
      * Revert "Upgrade to scale-info 0.11.0"
      
      This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
      
      * Add Runtime type
      
      * Update to scale-info 0.12
      
      * Update to scale-info 1.0
      
      * Update frame-metadata to version 14.0.0
      
      * Patch finality-grandpa until release available
      
      * Fix metadata tests
      
      * Fix metadata tests
      
      * Fmt
      
      * Remove patched finality-grandpa
      
      * Fix tests, use scale_info imports
      
      * Fix pallet tests
      
      * Add BlockNumber TypeInfo bound
      
      * ui test fix
      
      * Cargo.lock
      
      * Remove pallet metadata
      
      * Cargo.lock
      
      * Add missing scale-info dependency
      
      * Remove pallet event metadata
      
      * Fix error
      
      * Fix collective errors
      
      * Semicolol
      
      * Fmt
      
      * Remove another metadata attribute
      
      * Add new variant to custom digest TypeInfo
      
      * Fmt
      
      * Cargo.lock from master
      
      * Remove comma lol
      
      * Fix example call error
      
      * Fix example call error properly
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      49b6dfd2
  17. Jul 22, 2021
  18. Jul 21, 2021
    • Bastian Köcher's avatar
      Run cargo fmt on the whole code base (#9394) · 7b56ab15
      Bastian Köcher authored
      * Run cargo fmt on the whole code base
      
      * Second run
      
      * Add CI check
      
      * Fix compilation
      
      * More unnecessary braces
      
      * Handle weights
      
      * Use --all
      
      * Use correct attributes...
      
      * Fix UI tests
      
      * AHHHHHHHHH
      
      * 🤦
      
      * Docs
      
      * Fix compilation
      
      * 🤷
      
      * Please stop
      
      * 🤦
      
       x 2
      
      * More
      
      * make rustfmt.toml consistent with polkadot
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7b56ab15
  19. Jun 12, 2021
  20. May 10, 2021
  21. May 05, 2021
  22. Mar 12, 2021
    • André Silva's avatar
      im-online: use EstimateNextSessionRotation to get better estimates of session progress (#8242) · 51822097
      André Silva authored
      * frame-support: add method to estimate current session progress
      
      * im-online: use EstimateNextSessionRotation trait to delay heartbeats
      
      * node: fix im-online pallet instantiation
      
      * frame-support: fix docs
      
      * frame: fix tests
      
      * pallet-session: last block of periodic session means 100% session progress
      
      * pallet-session: add test for periodic session progress
      
      * pallet-babe: fix epoch progress and add test
      
      * frame-support: return weight with session estimates
      
      * pallet-im-online: add test for session progress logic
      51822097
  23. Mar 10, 2021
    • Tomasz Drwięga's avatar
      Custom RPC for Merkle Mountain Range pallet (#8137) · f3d4355a
      Tomasz Drwięga authored
      * Add MMR custom RPC.
      
      * Change RuntimeApi to avoid hardcoding leaf type.
      
      * Properly implement the new RuntimeAPI and wire up RPC.
      
      * Extract Offchain DB as separate execution extension.
      
      * Enable offchain DB access for offchain calls.
      
      * Fix offchain_election tests.
      
      * Skip block initialisation for proof generation.
      
      * Fix integration test setup.
      
      * Fix offchain tests. Not sure how I missed them earlier 🤷.
      
      * Fix long line.
      
      * One more test missing.
      
      * Update mock for multi-phase.
      
      * Address review grumbbles.
      
      * Address review grumbles.
      
      * Fix line width of a comment
      f3d4355a
  24. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  25. Sep 10, 2020
  26. Jun 15, 2020
    • thiolliere's avatar
      Introduce in-origin filtering (#6318) · c2ad2727
      thiolliere authored
      
      
      * impl filter in origin
      
      * remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter
      
      * rename BasicCallFilter -> BaseCallFilter
      
      * refactor code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * remove forgotten temporar comment
      
      * better add suggestion in another PR
      
      * refactor: use Clone instead of mem::replace
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * fix benchmarks
      
      * Make root bypass filter in utility::batch
      
      * fix unused imports
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      c2ad2727
  27. May 15, 2020
  28. Apr 27, 2020
  29. Apr 21, 2020
    • Rakan Alhneiti's avatar
      Offchain signing (#5182) · 25751c05
      Rakan Alhneiti authored
      
      
      * New approach to offchain signing.
      
      * Use in im-online
      
      * Rewrite to use Account<T>
      
      * DRY signing.
      
      * Implement send_raw_unsigned_transaction
      
      * WiP
      
      * Expunge LocalCall
      
      * Expunge LocalCall
      
      * Fix compilation.
      
      * Solve call.
      
      * Make it compile again.
      
      * Finalize implementation.
      
      * Change CreateTransaction
      
      * Clear CreateTransaction.
      
      * Add price payload
      
      * Send raw transaction
      
      * Submit signed payload / unsigned transaction (WIP)
      
      * Supertrait requirements on T::Signature
      
      * Validate signature of payload on an unsigned transaction
      
      * Fix encoding - part 1
      
      * Make it compile.
      
      * Fix compilation of unsigned validator.
      
      * Pass price payload to the transaction
      
      * Make block number part of the signed payload
      
      * Send signed transaction
      
      * Implement all_accounts, any_account
      
      * Fix formatting
      
      * Implement submit_transaction
      
      * Submit signed transaction (ForAll, ForAny)
      
      * Fix formatting
      
      * Implement CreateSignedTransaction
      
      * Move sign and verify to AppCrypto
      
      * Sign transaction
      
      * Call `use_encoded`
      
      * Remove SubmitAndSignTransaction
      
      * Implement runtime using new SigningTypes
      
      * Adapt offchain example to changes
      
      * Fix im-online pallet
      
      * Quick fix: rename AuthorityId2
      
      * Fix offchain example tests
      
      * Add a comment on why keystore is required in unsigned transaction test
      
      * Use UintAuthorityId instead of u64
      
      * WIP
      
      * Remove IdentifyAccount from UintAuthorityId
      
      * Implement PublicWrapper type
      
      * Fix im-online tests
      
      * Fix runtime test
      
      * Bump spec version
      
      * Fix executor tests
      
      * Rename ImOnlineAuthId -> ImOnlineAuthorityId and formatting
      
      * Fix merge
      
      * Documentation
      
      * Revert u64 -> UintAuthorityId conversion
      
      * Fix string errors
      
      * Document public members in offchain module
      
      * Introduce SubmitTransaction
      
      * Update pallets to use SubmitTransaction
      
      * WIP
      
      * Use SubmitTransaction in offchain
      
      * Use `submit_unsigned_transaction`
      
      * Fix tests
      
      * Update docs
      
      * Remove SigningTypes requirement from `SendTransactionTypes`
      
      * Fix tests
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/example-offchain-worker/src/tests.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Remove leftover from previous iterations
      
      * Change enum to struct
      
      * Remove public
      
      * Move mock to node/executor/tests
      
      * Cleanup test-helpers
      
      * Make `application-crypto` `std` feature internal
      
      The macros should not generate code that requires that the calling crate
      has a feature with the name `std` defined.
      
      * Revert cargo lock update
      
      * Use TestAuthorityId from common
      
      * Restore members of account to public
      
      * Tidy up imports
      
      * Fix benchmarking pallet
      
      * Add tests demonstrating ForAll, ForAny on signer
      
      * Move definition of AppCrypto
      
      in example-offchain-worker
      from tests to mod::crypto
      
      * Cleanup stray comment
      
      * Fix ValidTransaction
      
      * Re-fix CreateSignedTransaction
      
      * Address PR feedback
      
      * Add can_sign method to signer
      
      * Propagate error
      
      * Improve documentation
      
      * Fix vec! macro not available
      
      * Document SendTransactiontypes
      
      * Add some docs.
      
      * Split signing examples
      
      * Add tests for signing examples
      
      * WIP can_sign - PR feedback
      
      * WIP
      
      * Split for_any / for_all into different calls
      
      * Verify payload and signature in test
      
      * Fix can_sign implementation
      
      * Fix impl_version
      
      * Import Box from sp_std
      
      * Create issues for TODOs
      
      * Ignore doctest.
      
      * Add test directly to system. Adjust UintTypes.
      
      * Add some tests to account filtering.
      
      * Remove code samples and point to example offchain worker
      
      * Fix doc links
      
      * Fix im-online tests using signatures.
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      25751c05
  30. Mar 24, 2020
  31. Feb 21, 2020
  32. Feb 20, 2020
  33. Feb 18, 2020
    • Nikolay Volf's avatar
      Build block without checking signatures (#4916) · e50f6109
      Nikolay Volf authored
      
      
      * in executive
      
      * in other places
      
      * to UnsafeResult
      
      * move doc comment
      
      * apply suggestions
      
      * allow validity mocking for TestXt
      
      * add test
      
      * augment checkable instead of another trait
      
      * fix im online test
      
      * blockbuilder dihotomy
      
      * review suggestions
      
      * update test
      
      * Update client/block-builder/src/lib.rs
      
      * updae spec_version
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      e50f6109
  34. Feb 17, 2020
    • Shawn Tabrizi's avatar
      Fix various spelling errors (#4940) · c7a14db7
      Shawn Tabrizi authored
      
      
      * meaningfull -> meaningful
      
      * initialise -> initialize
      
      * tokans -> tokens
      
      * incentivise -> incentivize
      
      * lenght -> length
      
      * incentivisation -> incentivization
      
      * doesnt't -> doesn't
      
      * overwriten -> overwritten
      
      * lifecycle -> life cycle
      
      * lifecycle -> life cycle
      
      * usefull -> useful
      
      * noone -> no one
      
      * spaming -> spamming
      
      * defered -> deferred
      
      * hieght -> height
      
      * sumation -> summation
      
      * ingore -> ignore
      
      * registed -> registered
      
      * Auxialary -> Auxiliary
      
      * loggin -> logging
      
      * independance -> independence
      
      * trailling -> trailing
      
      * responsability -> responsibility
      
      * trunkated -> truncated
      
      * Weither -> Whether
      
      * informations -> information
      
      * Runtume -> Runtime
      
      * choosen -> chosen
      
      * delcataion -> declaration
      
      * Unchekced -> Unchecked
      
      * defintion -> definition
      
      * scrach -> scratch
      
      * imput -> input
      
      * transfered -> transferred
      
      * endownment -> endowment
      
      * Determinator -> Determiner
      
      * relevent -> relevant
      
      * emited -> emitted
      
      * acocunt -> account
      
      * proprotional -> proportional
      
      * instantiaion -> instantiation
      
      * commited -> committed
      
      * tombstonedead -> tombstone
      
      * uwnrap -> unwrap
      
      * acount -> account
      
      * specialised -> specialized
      
      * existant -> existent
      
      * requried -> required
      
      * Anull -> Annul
      
      * AUTHORITES -> AUTHORITIES
      
      * underyling -> underlying
      
      * recognisable -> recognizable
      
      * Capitalise -> Capitalize
      
      * reportfor -> report for
      
      * hearbeat -> heartbeat
      
      * onlineness -> being online
      
      * creater -> creator
      
      * Bytearray -> Byte array
      
      * Despoit -> Deposit
      
      * substratced -> subtracted
      
      * Curent -> Current
      
      * imbalanes -> imbalances
      
      * countfown -> countdown
      
      * inexisting -> inexistent
      
      * additionaly -> additionally
      
      * substracted -> subtracted
      
      * auxilary -> auxiliary
      
      * parital -> partial
      
      * in't -> isn't
      
      * compatability -> compatibility
      
      * infomation -> information
      
      * etected -> detected
      
      * extrinsiscs -> extrinsics
      
      * reprensentation -> representation
      
      * coonfiguration -> configuration
      
      * primtives -> primitives
      
      * miscelanious -> miscellaneous
      
      * VERISON -> VERSION
      
      * endcoded -> encoded
      
      * Genrates -> Generates
      
      * miliseconds -> milliseconds
      
      * occured -> occurred
      
      * trully -> truely
      
      * truely -> truly
      
      * conjuction -> conjunction
      
      * encouters -> encounters
      
      * customised -> customized
      
      * deterministicly -> deterministically
      
      * finalisation -> finalization
      
      * pluggable -> plugable
      
      * wakeup -> wake-up
      
      * interemdiate -> intermediate
      
      * intepreting -> interpreting
      
      * finalzied -> finalized
      
      * throgh -> through
      
      * extinsic -> extrinsic
      
      * convient -> convenient
      
      * allocater -> allocator
      
      * propagateable -> propagatable
      
      * succesfuly -> successfully
      
      * finalising -> finalizing
      
      * publically -> publicly
      
      * phrasee -> phrase
      
      * substration -> substractions
      
      * substractions -> subtractions
      
      * neccessarily -> necessarily
      
      * Inlucde -> Include
      
      * unefficient -> inefficient
      
      * thay -> they
      
      * funtion -> function
      
      * datastructures -> data structures
      
      * infromation -> information
      
      * propagatable -> propagable
      
      * ecountered -> encountered
      
      * recognise -> recognize
      
      * intergration -> integration
      
      * lastet -> latest
      
      * datatypes -> data types
      
      * datatype -> data type
      
      * Strongarming -> Strong Arming
      
      * avaible -> available
      
      * Commiting -> Committing
      
      * Retreiving -> Retrieving
      
      * shoud -> should
      
      * canonicaliziation -> canonicalization
      
      * comitted -> committed
      
      * clonable -> cloneable
      
      * Uknown -> Unknown
      
      * reponse -> response
      
      * arbitary -> arbitrary
      
      * Capapbilities -> Capabilities
      
      * responsbile -> responsible
      
      * initialisation -> initialization
      
      * cames -> came
      
      * intemediate -> intermediate
      
      * reqeust -> request
      
      * intance -> instance
      
      * explcitly -> explicitly
      
      * neighor -> neighbor
      
      * reolving -> resolving
      
      * untill -> until
      
      * Validte -> Validate
      
      * deserailize -> deserialize
      
      * literaly -> literally
      
      * preceeding -> preceding
      
      * abpve -> above
      
      * chcecked -> checked
      
      * numbet -> number
      
      * Unknow -> Unknown
      
      * halfs -> halves
      
      * gossup -> gossip
      
      * givent -> given
      
      * immediatelly -> immediately
      
      * slicable -> sliceable
      
      * conensus -> consensus
      
      * Mimicks -> Mimics
      
      * acccept -> accept
      
      * serialise -> serialize
      
      * exstrinsics -> extrinsics
      
      * panicks -> panics
      
      * maintaince -> maintenance
      
      * repeatidely -> repeatedly
      
      * anecstor -> ancestor
      
      * becasue -> because
      
      * processer -> processor
      
      * Prunning -> Pruning
      
      * insterested -> interested
      
      * unuseful -> not useful
      
      * yeided -> yielded
      
      * descendfing -> descending
      
      * corresponts -> corresponds
      
      * survivew -> survive
      
      * keps -> keeps
      
      * ligh -> light
      
      * prerequisities -> prerequisites
      
      * positiion -> position
      
      * depedency -> dependency
      
      * extrinisic -> extrinsic
      
      * atomicaly -> atomically
      
      * staticly -> statically
      
      * resul -> result
      
      * timestamb -> timestamp
      
      * Utilites -> Utilities
      
      * ammount -> amount
      
      * pocess -> process
      
      * exteral -> external
      
      * Update client/finality-grandpa/src/tests.rs
      
      * Update primitives/io/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update primitives/blockchain/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/weights.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update bin/node/cli/tests/common.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/api/src/execution_extensions.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/cli/src/params.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/executor/common/src/sandbox.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/api/src/execution_extensions.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/finality-grandpa/src/communication/mod.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/state-db/src/pruning.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update frame/contracts/src/tests.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update client/api/src/execution_extensions.rs
      
      * bump impl
      
      * timestamb -> timestamp
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      c7a14db7
  35. Jan 31, 2020
  36. Jan 05, 2020
  37. Dec 19, 2019
    • Bastian Köcher's avatar
      Make `decl_error!` errors usable (#4449) · 8e393aa5
      Bastian Köcher authored
      * Make `decl_error!` errors usable
      
      This pr implements support for returning errors of different pallets in
      a pallet. These errors need to be declared with `decl_error!`.
      
      The pr changes the following:
      
      - Each dispatchable function now returns a `DispatchResult` which is an
      alias for `Result<(), DispatchError>`.
      - `DispatchError` is an enum that has 4 variants:
        - `Other`: For storing string error messages
        - `CannotLookup`: Variant that is returned when something returns a
        `sp_runtime::LookupError`
        - `BadOrigin`: Variant that is returned for any kind of bad origin
        - `Module`: The error of a specific module. Contains the `index`,
        `error` and the `message`. The index is the index of the module in
        `construct_runtime!`. `error` is the index of the error in the error
        enum declared by `decl_error!`. `message` is the message to the error
        variant (this will not be encoded).
      - `construct_runtime!` now creates a new struct `ModuleToIndex`. This
      struct implements the trait `ModuleToIndex`.
      - `frame_system::Trait` has a new associated type: `ModuleToIndex` that
      expects the `ModuleToIndex` generated by `construct_runtime!`.
      - All error strings returned in any module are being converted now to `DispatchError`.
      - `BadOrigin` is the default error returned by any type that implements `EnsureOrigin`.
      
      * Fix frame system benchmarks
      8e393aa5
  38. Dec 16, 2019
    • Tomasz Drwięga's avatar
      [big refactor] Remove crate aliasing. (#4395) · 8778ca7d
      Tomasz Drwięga authored
      * Rename: Phase 1.
      
      * Unify codec.
      
      * Fixing: Phase 2
      
      * Fixing: Phase 3.
      
      * Fixing: Phase 4.
      
      * Fixing: Phase 5.
      
      * Fixing: Phase 6.
      
      * Fixing: Phase 7.
      
      * Fixing: Phase 8. Tests
      
      * Fixing: Phase 9. Tests!!!
      
      * Fixing: Phase 10. Moar tests!
      
      * Finally done!
      
      * More fixes.
      
      * Rename primitives:: to sp_core::
      
      * Apply renames in finality-grandpa.
      
      * Fix benches.
      
      * Fix benches 2.
      
      * Revert node-template.
      
      * Fix frame-system in our modules.
      8778ca7d
  39. Dec 10, 2019
  40. Dec 02, 2019
    • Benjamin Kampmann's avatar
      The crate rename (#4223) · 927e13c1
      Benjamin Kampmann authored
      * Adding script for rename, could be applicable for nodes on top of it, too
      
      * add stderr and gitlab ci features
      
      * apply script
      
      * fix now minor details in expected stderr
      
      * Update the Cargo.lock
      
      * fix name: sc-transaction -> sc-tracing
      
      * fix rename in script, too
      927e13c1