1. Mar 30, 2021
  2. Mar 23, 2021
  3. Mar 16, 2021
  4. Mar 11, 2021
  5. Mar 03, 2021
  6. Mar 01, 2021
    • Bastian Köcher's avatar
      Init `RuntimeLogger` automatically for each runtime api call (#8128) · 68390d40
      Bastian Köcher authored
      
      
      * Init `RuntimeLogger` automatically for each runtime api call
      
      This pr change the runtime api in such a way to always and automatically
      enable the `RuntimeLogger`. This enables the user to use `log` or
      `tracing` from inside the runtime to create log messages. As logging
      introduces some extra code and especially increases the size of the wasm
      blob. It is advised to disable all logging completely with
      `sp-api/disable-logging` when doing the wasm builds for the on-chain
      wasm runtime.
      
      Besides these changes, the pr also brings most of the logging found in
      frame to the same format "runtime::*".
      
      * Update frame/im-online/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update test-utils/runtime/Cargo.toml
      
      * Fix test
      
      * Don't use tracing in the runtime, as we don't support it :D
      
      * Fixes
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      68390d40
  7. Feb 26, 2021
  8. Feb 22, 2021
  9. Feb 10, 2021
  10. Feb 09, 2021
  11. Feb 04, 2021
  12. Jan 25, 2021
  13. Jan 07, 2021
    • Shawn Tabrizi's avatar
      Better Handle Dead Accounts in Balances (#7843) · 93ecff9b
      Shawn Tabrizi authored
      
      
      * Don't mutate storage when account is dead and should stay dead
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * more concrete storage noop
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      93ecff9b
  14. Jan 06, 2021
  15. Jan 05, 2021
    • thiolliere's avatar
      Improve error message on where clause on pallet error (#7821) · ccce3405
      thiolliere authored
      * improve error message on where clause on pallet error
      
      * Revert "improve error message on where clause on pallet error"
      
      This reverts commit 5a3cc38976813fccef3357833553ce30f5b988ea.
      
      * Revert "Revert "improve error message on where clause on pallet error""
      
      This reverts commit e3b3fca6bc4fa89816f80dbcb82dc4536a9b2549.
      ccce3405
  16. 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
  17. Dec 24, 2020
    • thiolliere's avatar
      Add `pallet` attribute macro to declare pallets (#6877) · 6dfad092
      thiolliere authored
      
      
      * rename system Config to system Trait.
      
      command used:
      ```
      find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/system::Trait>::/system::Config>::/g' {} \;
      find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/impl frame_system::Trait for /impl frame_system::Config for /g' {} \;
      find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/impl system::Trait for /impl system::Config for /g' {} \;
      ```
      plus some manual ones especially for frame-support tests and frame-system
      
      * make construct_runtime handle Pallet and Module
      
      pallets can now be implemented on struct named Pallet or Module, both
      definition are valid.
      This is because next macro will generate only Pallet placeholder.
      
      * introduce pallet attribute macro
      
      currently just with tests, frame_system and other example hasn't been
      upgraded
      
      * allow to print some upgrade helper from decl_storage
      
      * Improved error msg, typo.
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Improved error msg, typo.
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Improved error message on unexpected attributes + ui test
      
      * add test for transactional
      
      * various typo
      
      * some tips when spans are lost
      
      * allow pallet to depend on other pallet instances
      
      * make event type metadata consistent with call and constant
      
      * error messages
      
      * ignore doc example
      
      * fix pallet upgrade template
      
      * fixup
      
      * fix doc
      
      * fix indentation
      
      * Apply suggestions code formatting
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * some renames + fix compilation
      
      * remove unsupported genesis config type alias
      
      * merge fixup
      
      * fix ui tests
      
      * additional doc
      
      * implement StorageInstance with new syntax
      
      * fix line width
      
      * fix doc: because pallet doc goes below reexport doc
      
      * Update frame/support/procedural/src/pallet/parse/event.rs
      
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/test/tests/pallet_ui.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * improve doc as suggested
      
      * revert construct_runtime Pallet part.
      
      This revert the changes on construct_runtime. Now construct_runtime is
      unchanged and instead pallet macro create a type alias
      `type Module<..> = Pallet<..>` to be used by construct_runtime
      
      * refactor with less intricated code
      
      * fix ui test with new image
      
      * fix ui tests
      
      * add minor tests
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      6dfad092
  18. Nov 30, 2020
  19. Nov 25, 2020
  20. Nov 20, 2020
  21. Oct 29, 2020
    • Bastian Köcher's avatar
      Make sure pallet versions are set at genesis (#7451) · e1b56f8d
      Bastian Köcher authored
      
      
      * Make sure pallet versions are set at genesis
      
      This pr ensures that pallet versions are also set at genesis. It does
      this by hooking into the runtime `GenesisConfig` which means that it
      will only work when the storage is setup using this genesis config. So,
      the version will not be set in pallet local tests. However, I think this
      isn't such a problem. The genesis config will call `on_genesis` on all
      pallets. This function comes from the new trait `OnGenesis`. Currently
      the user is not able to provide any custom implementation of this trait.
      
      Besides that it also implements `Clone` and `Copy` for the pallet
      version struct.
      
      This pr also moves the macro for generating the runtime genesis config
      to `frame-support` as most of the other FRAME related macros.
      
      * Reduce line width
      
      * Update frame/support/src/traits.rs
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      e1b56f8d
    • Qinxuan Chen's avatar
      Replace bitmask with bitflags (#7159) · bd450c24
      Qinxuan Chen authored
      
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      bd450c24
  22. Oct 21, 2020
  23. Oct 19, 2020
  24. Oct 12, 2020
  25. Aug 12, 2020
  26. Aug 04, 2020
  27. Jul 21, 2020
  28. Jul 04, 2020
    • André Silva's avatar
      babe: report equivocations (#6362) · a9c21b8b
      André Silva authored
      * slots: create primitives crate for consensus slots
      
      * offences: add method to check if an offence is unknown
      
      * babe: initial equivocation reporting implementation
      
      * babe: organize imports
      
      * babe: working equivocation reporting
      
      * babe: add slot number to equivocation proof
      
      * session: move duplicate traits to session primitives
      
      * babe: move equivocation stuff to its own file
      
      * offences: fix test
      
      * session: don't have primitives depend on frame_support
      
      * babe: use opaque type for key owner proof
      
      * babe: cleanup client equivocation reporting
      
      * babe: cleanup equivocation code in pallet
      
      * babe: allow sending signed equivocation reports
      
      * node: fix compilation
      
      * fix test compilation
      
      * babe: return bool on check_equivocation_proof
      
      * babe: add test for equivocation reporting
      
      * babe: add more tests
      
      * babe: add test for validate unsigned
      
      * babe: take slot number in generate_key_ownership_proof API
      
      * babe: add benchmark for equivocation proof checking
      
      * session: add benchmark for membership proof checking
      
      * offences: fix babe benchmark
      
      * babe: add weights based on benchmark results
      
      * babe: adjust weights after benchmarking on reference hardware
      
      * babe: reorder checks in check_and_report_equivocation
      a9c21b8b
  29. 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
  30. Jun 11, 2020
  31. May 27, 2020
  32. May 23, 2020
  33. May 15, 2020
  34. May 06, 2020
    • André Silva's avatar
      grandpa: report equivocations (#3868) · fbd2ac8f
      André Silva authored
      * session: runtime api for generating session membership proofs
      
      * grandpa: add runtime api for creating equivocation report txs
      
      * grandpa: submit signed equivocation report transactions
      
      * grandpa: use proper equivocation report type
      
      * grandpa: report equivocations
      
      * grandpa: validate equivocation proof
      
      * grandpa: update to finality-grandpa 0.9.1
      
      * grandpa: fix encoding of session membership proof
      
      * grandpa: initialize set id session mapping for genesis session
      
      * grandpa: fix bug in set_id session validation
      
      * fix compilation
      
      * cleanup from merge conflicts
      
      * cleanup crate tomls
      
      * grandpa: refactor equivocation handling to separate trait
      
      * node-template: fix compilation
      
      * fix test compilation
      
      * bump finality-grandpa to v0.10.2
      
      * rpc: fix runtime version test
      
      * CHERRY-PICK #4200: Add documentation to SubmitSignedTransaction and actually make it work
      
      Squashed commit of the following:
      
      commit 4f2cb0b1c588a06f2f3b478bb4b28b5cb29d54b9
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:29:33 2019 +0100
      
          Split the method to avoid confusing type error message.
      
      commit c5bf24eeaaf902add89ed1b046b22c4a4aaeb2cd
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:19:55 2019 +0100
      
          Make accounts optional, fix logic.
      
      commit 97db1ef556e023cf6847e5ffdb036c0e3ea6fb0a
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 10:06:20 2019 +0100
      
          Remove warning.
      
      commit 535f5c116d1a2e826eaf90c3f7e6798e443d61d8
      Merge: 516257217 0f1a5f65
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 07:08:05 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit 516257217bac89fcebd083712f4ea68b7b23b55a
      Merge: ac98248c6 2e68c80c
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Dec 2 13:57:25 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit ac98248c6c56cff381130645a82a13d29933cf83
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:34:52 2019 +0100
      
          Forgotten import.
      
      commit 67a3c19031506c28e31c6bc4a90fff62d467dd58
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:32:10 2019 +0100
      
          Fix naming and bounds.
      
      commit 93e768ea9df97a4629fca1f9bc4b108fdb33f876
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:01:05 2019 +0100
      
          Add documentation to signed transactions and actually make them work.
      
      * grandpa: skip block initialization on report submission method
      
      * primitives: allow transaction pool access by default for offchain calls
      
      * grandpa: unused parameters
      
      * grandpa: remove unused method
      
      * grandpa: enable equivocation reporting
      
      * grandpa: add workaround for parameter encoding
      
      * grandpa: fix localized_payload calls in tests
      
      * fix submit_report_equivocation_extrinsic in runtimes
      
      * node: fix submit transaction test compilation
      
      * node: bump spec_version
      
      * rpc: fix api version test
      
      * grandpa: allow custom equivocation offence type
      
      * grandpa: add test for authorities::next_change_height
      
      * grandpa: cleanup report_equivocation function
      
      * node: move reporting app crypto to node-primitives
      
      * grandpa: move equivocation traits to own module
      
      * grandpa: rename app-crypto crate import
      
      * grandpa: export equivocation types
      
      * node: bump spec_version
      
      * grandpa: rename EquivocationReport to EquivocationProof
      
      * grandpa: add missing docs to primitives
      
      * grandpa: add missing docs to equivocation
      
      * node: fix compilation
      
      * grandpa: add missing docs to pallet
      
      * node: bump spec_version
      
      * fix whitespace
      
      * grandpa: return error on offence reporting
      
      * grandpa: expose session and validator count in proofs through traits
      
      * grandpa: use strong key in module KeyOwnerProofSystem
      
      * grandpa: move key ownership proof to grandpa runtime api
      
      * grandpa: remove unnecessary cloning when checking equivocation proof
      
      * grandpa: make report_equivocation a method in Environment
      
      * support: implement KeyOwnerProofSystem for ()
      
      * grandpa: move KeyOwnerProofSystem to module trait
      
      * test-utils: fix runtime compilation
      
      * grandpa: fix test compilation
      
      * grandpa: fix test compilation after merge
      
      * grandpa: simplify transaction submission types
      
      * grandpa: validate equivocation report in signed extension
      
      * client: fix test
      
      * node: use ValidateEquivocationReport signed extension
      
      * grandpa: expose key ownership proof under opaque type
      
      * grandpa: better docs on key ownership proofs
      
      * grandpa: add note about signed extension
      
      * grandpa: add ValidateEquivocationReport::new
      
      * grandpa: remove skip_initialize_block from runtime api
      
      * grandpa: use new offchain transaction submission API
      
      * grandpa: take set_id in generate_key_ownership_proof
      
      * grandpa: update to finality-grandpa v0.12.2
      
      * grandpa: cleanup usages of AuthoritySet::current
      
      * grandpa: fix test
      
      * grandpa: add mocking utilities for equivocation reporting
      
      * grandpa: add test for equivocation reporting
      
      * grandpa: move SetIdSession initialization
      
      * grandpa: add more tests
      
      * node: enable historical session manager
      
      * node: bump spec_version
      
      * node: use strong key types in KeyOwnerProofSystem definitions
      
      * grandpa: export GrandpaEquivocationOffence type
      fbd2ac8f