1. Apr 25, 2024
  2. Apr 08, 2024
  3. 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
  4. Mar 13, 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. Feb 13, 2024
  7. Jan 23, 2024
    • Niklas Adolfsson's avatar
      rpc: backpressured RPC server (bump jsonrpsee 0.20) (#1313) · e16ef086
      Niklas Adolfsson authored
      This is a rather big change in jsonrpsee, the major things in this bump
      are:
      - Server backpressure (the subscription impls are modified to deal with
      that)
      - Allow custom error types / return types (remove jsonrpsee::core::Error
      and jsonrpee::core::CallError)
      - Bug fixes (graceful shutdown in particular not used by substrate
      anyway)
         - Less dependencies for the clients in particular
         - Return type requires Clone in method call responses
         - Moved to tokio channels
         - Async subscription API (not used in this PR)
      
      Major changes in this PR:
      - The subscriptions are now bounded and if subscription can't keep up
      with the server it is dropped
      - CLI: add parameter to configure the jsonrpc server bounded message
      buffer (default is 64)
      - Add our own subscription helper to deal with the unbounded streams in
      substrate
      
      The most important things in this PR to review is the added helpers
      functions in `substrate/client/rpc/src/utils.rs` and the rest is pretty
      much chore.
      
      Regarding the "bounded buffer limit" it may cause the server to handle
      the JSON-RPC calls
      slower than before.
      
      The message size limit is bounded by "--rpc-response-size" thus "by
      default 10MB * 64 = 640MB"
      but the subscription message size is not covered by this limit and could
      be capped as well.
      
      Hopefully the last release prior to 1.0, sorry in advance for a big PR
      
      Previous attempt: https://github.com/paritytech/substrate/pull/13992
      
      Resolves https://github.com/paritytech/polkadot-sdk/issues/748, resolves
      https://github.com/paritytech/polkadot-sdk/issues/627
      e16ef086
  8. Jan 22, 2024
  9. Nov 29, 2023
  10. Oct 10, 2023
    • Liam Aharon's avatar
      remote-ext: fix state download stall on slow connections and reduce memory usage (#1295) · 55f35442
      Liam Aharon authored
      Original PR https://github.com/paritytech/substrate/pull/14746
      
      ---
      
      ## Fixing stall
      
      ### Introduction
      I experienced an apparent stall downloading state from
      `https://rococo-try-runtime-node.parity-chains.parity.io:443` which was
      having networking difficulties only responding to my JSONRPC requests
      with 50-200KB/s of bandwidth.
      
      This PR fixes the issue causing the stall, and generally improves
      performance remote-ext when it downloads state by greatly reducing the
      chances of a timeout occuring.
      
      ### Description
      Introduces a new `REQUEST_DURATION_TARGET` constant and modifies
      `get_storage_data_dynamic_batch_size` to
      
      - Increase or decrease the batch size of the next request depending on
      whether the elapsed time of the last request was gt or lt the target
      - Reset the batch size to 1 if the request times out
      
      This fixes an issue on slow connections that can otherwise cause
      multiple timeouts and a stalled download when:
      
      1. The batch size increases rapidly as remote-ext downloads keys with
      small associated storage values
      2. remote-ext tries to process a large series of subsequent keys all
      with extremely large associated storage values (Rococo has a series of
      keys 1-5MB large)
      3. The huge storage values download for 5 minutes until the request
      times out
      4. The partially downloaded keys are thrown out and remote-ext tries
      again with a smaller batch size, but the batch size is still far too
      large and takes 5 minutes to be reduced again
      5. The download will be essentially stalled for many hours while the
      above step cycles
      
      
      After this PR, the request size will
      
      - Not grow as large to begin with, as it is regulated downwards as the
      request duration exceeds the target
      - Drop immediately to 1 if the request times out. A timeout indicates
      the keys next in line to download have extremely large storage values
      compared to previously downloaded keys, and we need to reset the batch
      size to figure out what our new ideal batch size is. By not resetting
      down to 1, we risk the next request timing out again.
      
      ## Reducing memory
      
      As suggested by @bkchr, I adjusted `get_storage_data_dynamic_batch_size`
      from being recursive to a loop which allows removing a bunch of clones
      that were chewing through a lot of memory. I noticed actually it was
      using up to 50GB swap previously when downloading Polkadot keys on a
      slow connection, because it needed to recurse and clone a lot.
      
      After this change it uses only ~1.5GB memory.
      55f35442
  11. Aug 17, 2023
  12. Jul 25, 2023
  13. Jun 27, 2023
  14. Jun 21, 2023
  15. May 19, 2023
  16. May 07, 2023
  17. May 05, 2023
    • Liam Aharon's avatar
      try-runtime-cli: 'instant' snapshots, threading refactor, better progress logs (#14057) · ead46b9e
      Liam Aharon authored
      * remote externalities refactor
      
      * remove redundant logs
      
      * use const for parallel requests
      
      * prefer functional
      
      * improve variable naming
      
      * handle requests error
      
      * use overlayedchanges
      
      * Revert "use overlayedchanges"
      
      This reverts commit c0ddb87a5abdd52207597f5df66cbbdf9d79badc.
      
      * Revert "Revert "use overlayedchanges""
      
      This reverts commit 1d49362d9b999c045c8f970a0ab8b486bc47a90a.
      
      * Revert "Revert "Revert "use overlayedchanges"""
      
      This reverts commit 06df786488d94f249e9abccffac4af445f76e5a7.
      
      * backup/load raw storage values
      
      * test raw storage drain and restore
      
      * update snapshot tests
      
      * improve logs
      
      * clippy suggestions
      
      * address comments
      
      * fix example
      
      * fix test
      
      * clippy
      ead46b9e
  18. Apr 27, 2023
  19. Apr 21, 2023
    • Liam Aharon's avatar
      try-runtime: dynamic storage query sizes (#13923) · bc1a5992
      Liam Aharon authored
      
      
      * improve batch rpc error message
      
      * wip aimd storage data fetch
      
      * complete aimd function refactor
      
      * make batch_request function async
      
      * improve function name
      
      * fix load_child_remote issue
      
      * slight efficiency improvement
      
      * improve logs and variable name
      
      * remove redundant comment
      
      * improve comment
      
      * address pr comments
      
      * Update utils/frame/remote-externalities/src/lib.rs
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * simplify client handling
      
      * fix type issue
      
      * fix clippy issue
      
      * try to trigger ci
      
      * try to trigger ci
      
      ---------
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      bc1a5992
  20. 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
  21. Dec 14, 2022
  22. Dec 12, 2022
    • Kian Paimani's avatar
      Remove implicit approval chilling upon slash. (#12420) · 0b296916
      Kian Paimani authored
      
      
      * don't read slashing spans when taking election snapshot
      
      * update cargo.toml
      
      * bring back remote test
      
      * fix merge stuff
      
      * fix npos-voters function sig
      
      * remove as much redundant diff as you can
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarAndronik <[email protected]>
      
      * fix
      
      * Update frame/staking/src/pallet/impls.rs
      
      * update lock
      
      * fix all tests
      
      * review comments
      
      * fmt
      
      * fix offence bench
      
      * clippy
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_staking
      
      Co-authored-by: default avatarAndronik <[email protected]>
      Co-authored-by: default avatarAnkan <[email protected]>
      Co-authored-by: command-bot <>
      0b296916
    • Niklas Adolfsson's avatar
      rpc server with HTTP/WS on the same socket (#12663) · 84303ca7
      Niklas Adolfsson authored
      * jsonrpsee v0.16
      
      add backwards compatibility
      
      run old http server on http only
      
      * cargo fmt
      
      * update jsonrpsee 0.16.1
      
      * less verbose cors log
      
      * fix nit in log: WS -> HTTP
      
      * revert needless changes in Cargo.lock
      
      * remove unused features in tower
      
      * fix nits; add client-core feature
      
      * jsonrpsee v0.16.2
      84303ca7
  23. Oct 18, 2022
  24. Sep 01, 2022
  25. Jul 26, 2022
    • Sebastian Kunert's avatar
      Prepare for rust 1.62.1 (#11903) · 9f409dc0
      Sebastian Kunert authored
      
      
      * Update UI test output for rust 1.62.1
      
      * switch ci to staging image to check that everything works
      
      * fix artifacts node-bench-regression-guard
      
      * Imeplement `scale_info::TypeInfo` manually to silence aggressive rust warning
      
      * Fix more clippy lints
      
      * Make clippy happy by relying on auto-deref were possible
      
      * Add tracking issue to the comments
      
      * pin ci image
      
      Co-authored-by: default avataralvicsam <[email protected]>
      9f409dc0
  26. Apr 30, 2022
  27. Apr 27, 2022
    • Squirrel's avatar
      Updating shell.nix nightly (#11266) · 3ecb5306
      Squirrel authored
      
      
      * The 2022-02-10 nightly can't build some deps
      
      There's a sig that returns `impl IntoIterator<Item = (&'static str, OsString)>` and an Option is being retured but it's incorrectly not allowing a `?` in the method.
      
      * removing duplicate test
      
      * [ci] add job cargo-check-nixos
      
      * add dummy variables nix check
      
      * fix check-dependent jobs
      
      * fix check-dependent-project template
      
      Co-authored-by: default avataralvicsam <[email protected]>
      3ecb5306
  28. Apr 11, 2022
    • Bastian Köcher's avatar
      Prepare for rust stable 1.60 (#11138) · f517e57f
      Bastian Köcher authored
      
      
      * Prepare for rust stable 1.59
      
      Besides preparing the UI tests this also adds a new script update-rust-stable.sh script for
      simplifying the update of a rust stable version. This script will run all UI tests for the new
      rust stable version and updating the expected output.
      
      * Ensure we run the UI tests in CI
      
      * use staging ci image
      
      * More test updates
      
      * Unignore test (#11097)
      
      * empty commit for pipeline rerun
      
      * empty commit for pipeline rerun
      
      * Try to make clippy happy
      
      * More clippy fixes
      
      * FMT
      
      * ci image production
      
      Co-authored-by: default avataralvicsam <[email protected]>
      Co-authored-by: default avatarAlexander Samusev <[email protected]>
      f517e57f
  29. Mar 04, 2022
    • Kian Paimani's avatar
      Trie version migration pallet (#10073) · 6cfdbe5c
      Kian Paimani authored
      
      
      * starting
      
      * Updated from other branch.
      
      * setting flag
      
      * flag in storage struct
      
      * fix flagging to access and insert.
      
      * added todo to fix
      
      * also missing serialize meta to storage proof
      
      * extract meta.
      
      * Isolate old trie layout.
      
      * failing test that requires storing in meta when old hash scheme is used.
      
      * old hash compatibility
      
      * Db migrate.
      
      * runing tests with both states when interesting.
      
      * fix chain spec test with serde default.
      
      * export state (missing trie function).
      
      * Pending using new branch, lacking genericity on layout resolution.
      
      * extract and set global meta
      
      * Update to branch 4
      
      * fix iterator with root flag (no longer insert node).
      
      * fix trie root hashing of root
      
      * complete basic backend.
      
      * Remove old_hash meta from proof that do not use inner_hashing.
      
      * fix trie test for empty (force layout on empty deltas).
      
      * Root update fix.
      
      * debug on meta
      
      * Use trie key iteration that do not include value in proofs.
      
      * switch default test ext to use inner hash.
      
      * small integration test, and fix tx cache mgmt in ext.
      test  failing
      
      * Proof scenario at state-machine level.
      
      * trace for db upgrade
      
      * try different param
      
      * act more like iter_from.
      
      * Bigger batches.
      
      * Update trie dependency.
      
      * drafting codec changes and refact
      
      * before removing unused branch no value alt hashing.
      more work todo rename all flag var to alt_hash, and remove extrinsic
      replace by storage query at every storage_root call.
      
      * alt hashing only for branch with value.
      
      * fix trie tests
      
      * Hash of value include the encoded size.
      
      * removing fields(broken)
      
      * fix trie_stream to also include value length in inner hash.
      
      * triedbmut only using alt type if inner hashing.
      
      * trie_stream to also only use alt hashing type when actually alt hashing.
      
      * Refactor meta state, logic should work with change of trie treshold.
      
      * Remove NoMeta variant.
      
      * Remove state_hashed trigger specific functions.
      
      * pending switching to using threshold, new storage root api does not
      make much sense.
      
      * refactoring to use state from backend (not possible payload changes).
      
      * Applying from previous state
      
      * Remove default from storage, genesis need a special build.
      
      * rem empty space
      
      * Catch problem: when using triedb with default: we should not revert
      nodes: otherwhise thing as trie codec cannot decode-encode without
      changing state.
      
      * fix compilation
      
      * Right logic to avoid switch on reencode when default layout.
      
      * Clean up some todos
      
      * remove trie meta from root upstream
      
      * update upstream and fix benches.
      
      * split some long lines.
      
      * UPdate trie crate to work with new design.
      
      * Finish update to refactored upstream.
      
      * update to latest triedb changes.
      
      * Clean up.
      
      * fix executor test.
      
      * rust fmt from master.
      
      * rust format.
      
      * rustfmt
      
      * fix
      
      * start host function driven versioning
      
      * update state-machine part
      
      * still need access to state version from runtime
      
      * state hash in mem: wrong
      
      * direction likely correct, but passing call to code exec for genesis
      init seem awkward.
      
      * state version serialize in runtime, wrong approach, just initialize it
      with no threshold for core api < 4 seems more proper.
      
      * stateversion from runtime version (core api >= 4).
      
      * update trie, fix tests
      
      * unused import
      
      * clean some TODOs
      
      * Require RuntimeVersionOf for executor
      
      * use RuntimeVersionOf to resolve genesis state version.
      
      * update runtime version test
      
      * fix state-machine tests
      
      * TODO
      
      * Use runtime version from storage wasm with fast sync.
      
      * rustfmt
      
      * fmt
      
      * fix test
      
      * revert useless changes.
      
      * clean some unused changes
      
      * fmt
      
      * removing useless trait function.
      
      * remove remaining reference to state_hash
      
      * fix some imports
      
      * Follow chain state version management.
      
      * trie update, fix and constant threshold for trie layouts.
      
      * update deps
      
      * Update to latest trie pr changes.
      
      * fix benches
      
      * Verify proof requires right layout.
      
      * update trie_root
      
      * Update trie deps to  latest
      
      * Update to latest trie versioning
      
      * Removing patch
      
      * update lock
      
      * extrinsic for sc-service-test using layout v0.
      
      * Adding RuntimeVersionOf to CallExecutor works.
      
      * fmt
      
      * error when resolving version and no wasm in storage.
      
      * use existing utils to instantiate runtime code.
      
      * migration pallet
      
      * Patch to delay runtime switch.
      
      * Revert "Patch to delay runtime switch."
      
      This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
      
      * fix test
      
      * fix child migration calls.
      
      * useless closure
      
      * remove remaining state_hash variables.
      
      * Fix and add more tests
      
      * Remove outdated comment
      
      * useless inner hash
      
      * fmt
      
      * remote tests
      
      * finally ksm works
      
      * batches are broken
      
      * clean the benchmarks
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      * brand new version
      
      * fix build
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update primitives/storage/src/lib.rs
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * fmt and opt-in feature to apply state change.
      
      * feature gate core version, use new test feature for node and test node
      
      * Use a 'State' api version instead of Core one.
      
      * fix merge of test function
      
      * use blake macro.
      
      * Fix state api (require declaring the api in runtime).
      
      * Opt out feature, fix macro for io to select a given version
      instead of latest.
      
      * run test nodes on new state.
      
      * fix
      
      * new test structure
      
      * new testing stuff from emeric
      
      * Add commit_all, still not working
      
      * Fix all tests
      
      * add comment
      
      * we have PoV tracking baby
      
      * document stuff, but proof size is still wrong
      
      * FUCK YEAH
      
      * a big batch of review comments
      
      * add more tests
      
      * tweak test
      
      * update config
      
      * some remote-ext stuff
      
      * delete some of the old stuff
      
      * sync more files with master to minimize the diff
      
      * Fix all tests
      
      * make signed migration a bit more relaxed
      
      * add witness check to signed submissions
      
      * allow custom migration to also go above limit
      
      * Fix these pesky tests
      
      * ==== removal of the unsigned stuff ====
      
      * Make all tests work again
      
      * separate the tests from the logic so it can be reused easier
      
      * fix overall build
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarcheme <[email protected]>
      
      * Slightly better termination
      
      * some final tweaks
      
      * Fix tests
      
      * Restrict access to signed migrations
      
      * address most of the review comments
      
      * fix defensive
      
      * New simplified code
      
      * Fix weights
      
      * fmt
      
      * Update frame/state-trie-migration/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * make the tests correctly fail
      
      * Fix build
      
      * Fix build
      
      * try and fix the benchmarks
      
      * fix build
      
      * Fix cargo file
      
      * Fix runtime deposit
      
      * make rustdoc happy
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_state_trie_migration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/state-trie-migration/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarcheme <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      6cfdbe5c
  30. Jan 28, 2022
  31. Jan 03, 2022
  32. Dec 15, 2021
  33. Dec 04, 2021
  34. Nov 11, 2021
    • David's avatar
      Upgrade jsonrpsee to v0.4.1 (#10022) · eeb80f9e
      David authored
      
      
      * Upgrade jsonrpsee to v0.4.1
      
      * remove needless BlockT trait bound
      
      * use default wss port in URL
      
      * Fix try_runtime build
      
      * Partially fix for "remote-tests" feature
      
      * Review feedback
      
      * fmt
      
      * Sort out trait bounds for benches
      
      * Fmt
      
      * fmt again?
      
      * fmt with nightly-2021-09-13
      
      * Upgrade try-runtime as well
      
      * fmt
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      eeb80f9e
  35. Nov 09, 2021
  36. Nov 01, 2021
  37. Oct 13, 2021
  38. Sep 21, 2021