Skip to content
  1. Dec 09, 2022
  2. Dec 08, 2022
  3. Dec 06, 2022
  4. Dec 05, 2022
  5. Dec 04, 2022
    • Bastian Köcher's avatar
      frame-executive: Reject invalid inherents in the executive (#12365) · 1943e25c
      Bastian Köcher authored
      
      
      * frame-executive: Reject invalid inherents in the executive
      
      We already had support for making a block fail if an inherent returned, but it was part of the
      signed extension `CheckWeight`. Rejecting blocks with invalid inherents should happen on the
      `frame-executive` level without requiring any special signed extension. This is crucial to prevent
      any kind of spamming of the network that could may happen with blocks that include failing inherents.
      
      * FMT
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update primitives/runtime/src/transaction_validity.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      1943e25c
  6. Dec 03, 2022
  7. Nov 25, 2022
  8. Nov 15, 2022
  9. Nov 11, 2022
  10. Nov 08, 2022
    • Shawn Tabrizi's avatar
      New Weights for All Pallets (#12325) · 78cddd76
      Shawn Tabrizi authored
      * new weights for everything
      
      * fix
      
      * fmt
      
      * new batch
      
      * fmt
      
      * new batch
      
      * Update run_all_benchmarks.sh
      
      * add headers
      
      * update weights
      
      * Update lib.rs
      
      * block and extrinsic weight
      78cddd76
  11. Nov 07, 2022
    • Sam Johnson's avatar
      Add pallet dev mode (#12536) · 7c4bfc97
      Sam Johnson authored
      
      
      * stub for construct_dev_runtime!
      
      * revert
      
      * stub for dev_mode proc macro
      
      * preliminary docs for pallet::dev_mode (attribute) proc macro
      
      * add dev_mode to pallet_macros module
      
      * add docs item for dev_mode to frame_support
      
      * parsing of #[pallet(dev_mode)]
      
      * strip out dev_mode stub since it will be an arg for pallet instead
      
      * make pallet Def struct aware of dev mode
      
      * WIP
      
      * revert changes to call.rs
      
      * pass dev_mode to pallet parsing code
      
      * auto-specify default weights when in dev mode if not specified
      
      * add proof / expect for syn::parse in dev mode weight processing
      
      * set all storages to unbounded when in dev mode
      
      * just use 0
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * add invalid pallet arg test
      
      * add passing dev mode pallet test
      
      * add test confirming that dev mode features only work in dev mode
      
      * cargo fmt + clean up
      
      * bump CI
      
      * fix pallet ui test
      
      * add docs for dev mode
      
      * add warning about using dev mode in production circumstances
      
      * remove comment about no other attributes being supported
      
      * fix unneeded assignment
      
      * make warning more explicit
      
      * more explicit warning about using dev mode in production
      
      * simpler assignment for dev_mode boolean
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add note about MEL requirement
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add comment specifying why weights can be omitted in example
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * tweak wording of comments
      
      * bump ci
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      7c4bfc97
  12. Nov 03, 2022
  13. Nov 02, 2022
  14. Oct 20, 2022
  15. Oct 18, 2022
  16. Oct 06, 2022
    • Sam Johnson's avatar
      macro stubs for all pallet:: macros to improve documentation visibility and... · af58e8e8
      Sam Johnson authored
      
      macro stubs for all pallet:: macros to improve documentation visibility and discovery + revamp of pallet macro documentation (#12334)
      
      * proof of concept working for pallet::whitelist_storage
      
      * fix comments
      
      * pallet macros docs rewrite WIP
      
      * fix issue with cargo fmt cobbling links
      
      * tweak capitalization
      
      * fix docs for storage_version
      
      * fix docs for pallet::hooks
      
      * fix several comments
      
      * fix invalid link
      
      * fix wrapping and add missing links for pallet::hooks docs
      
      * run rewrap on all text blocks in frame_support::pallet docs
      
      * cargo fmt
      
      * fix up pallet::call_index docs
      
      * fix docs for pallet::extra_constants
      
      * fix docs for pallet::error
      
      * fix docs for pallet::event
      
      * fix docs for pallet::event
      
      * * fix docs for pallet::storage
      * fix docs for pallet::getter
      * fix docs for pallet::storage_prefix
      * fix docs for pallet::unbounded
      * fix docs for pallet::whitelist_storage
      * fix docs for #[cfg(..)] (for storage items and attributes)
      * fix docs for pallet::storage macro expansion
      
      * fix docs for pallet::type_value
      
      * fix docs for pallet::genesis_config
      
      * fix docs for pallet::genesis_build
      
      * fix docs for pallet::inherent
      
      * fix docs for pallet::validate_unsigned
      
      * fix docs for pallet::origin
      
      * fix docs for general notes on instantiable pallets
      
      * fix docs for example of a non-instantiable pallet
      
      * fix docs for example of an instantiable pallet
      
      * fix docs for upgrade guidelines
      
      * fix docs for upgrade guidelines
      
      * fix docs for upgrade checking and final notes
      
      * fix some examples near the beginning
      
      * extract docs for `pallet::whitelist_storage`
      
      * add docs for pallet_macro_stub
      
      * fix order of pallet::config and pallet::constant
      
      * set up stub for pallet::config
      
      * set up stub for pallet::constant
      
      * fix
      
      * set up stub for pallet::disable_frame_system_supertrait_check
      
      * set up stub for pallet::generate_storage_info
      
      * set up stub for pallet::storage_version
      
      * set up stub for pallet::hooks
      
      * set up stub for pallet::weight
      
      * set up stub for pallet::compact
      
      * set up stub for pallet::call_index
      
      * set up stub for pallet::extra_constants
      
      * set up stub for pallet::error
      
      * set up stub for pallet::event
      
      * set up stub for pallet::generate_deposit
      
      * set up stub for pallet::storage
      
      * set up stub for pallet::getter
      
      * set up stub for pallet::storage_prefix
      
      * set up stub for pallet::unbounded
      
      * set up stub for pallet::type_value
      
      * set up stub for pallet::genesis_config
      
      * set up stub for pallet::genesis_build
      
      * set up stub for pallet::inherent
      
      * set up stub for pallet::validate_unsigned
      
      * set up stub for pallet::origin
      
      * fix comment
      
      * cargo fmt
      
      * tweak error message
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * switch order of derives
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * tweak wording
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * add more context info about `MAX_MODULE_ERROR_ENCODED_SIZE`
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * tweak wording about where clause
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * clarify wording about system/events key
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * use "The Event enum" instead of "item"
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * fix bad wording
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * use enum instead of type
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * expect => expects
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * add additional note about storage prefix
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * clearer note about GenesisConfig
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Use "The impl" instead of "The item"
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * add note and link to tight-coupling docs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * cargo fmt
      
      * remove spaces around parenthesis
      
      * fix missing text for pallet::config
      
      * fix issue with pallet::constant intro
      
      * fix wording about codec index
      
      * fix pallet::error wording
      
      * fix comment about 1 byte => 256 errors
      
      * fix where clause comment
      
      * fix comment about where pallet events are stored
      
      * rewrap some text
      
      * fix pallet::storage docs
      
      * fix pallet::storage_prefix docs
      
      * tweak docs for pallet::genesis_build
      
      * tweak docs for pallet::config
      
      * specify that pallet::event must be present if pallet::config is present
      
      * add note about why we would want to bypass the supertrait check
      
      * mention that pallet::generate_store attribute is only valid on pallet struct
      
      * add note about adding new calls to the end to maintain existing order
      
      * add note about pallet::type_value and pallet::storage
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * add note about using pallet::type_value alongside pallet::storage
      
      * include warning about modifying disaptchables on other pallet::call_index docs page
      
      * fix incorrect comment
      
      * add much more information for pallet::inherent
      
      * move pallet::pallet macro expansion notes back to their rightful place
      
      * re-run CI
      
      * fix macro expansion appearing in wrong place for pallet::pallet
      
      * replicate pallet::pallet docs on the pallet::pallet macro stub
      
      * force CI re-run
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: parity-processbot <>
      af58e8e8
  17. Oct 05, 2022
  18. Oct 03, 2022
  19. Sep 23, 2022
  20. Sep 21, 2022
  21. 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
  22. Sep 19, 2022
  23. Sep 16, 2022
    • Sam Johnson's avatar
      Add special tag to exclude runtime storage items from benchmarking (#12205) · c0e007b5
      Sam Johnson authored
      * initial setup
      
      * add WhitelistedStorageKeys trait
      
      * add (A, B) tuple implementation for whitelisted_storage_keys()
      
      * fix formatting
      
      * implement WhitelistedStorageKeys for all tuple combinations
      
      * impl_for_tuples up to 128 for WhitelistedStorageKeys
      
      * refactor to #[benchmarking(cached)]
      
      * tweak error message and mark BlockNumber as cached
      
      * add benchmarking(cached) to the other default types
      
      * add docs for benchmarking(cached)
      
      * properly parse storage type declaration
      
      * make storage_alias structs public so we can use them in this macro
      
      * use BTreeMap since TrackedStorageKey missing Ord outside of std
      
      * make WhitelistedStorageKeys accessible
      
      * basic detection of benchmarking(cached) 💥
      
      * proper parsing of #[benchmarking(cached)] from pallet parse macro
      
      * store presence of #[benchmarking(cached)] macro on StorageDef
      
      * will be used for later expansion
      
      * compiling blank impl for WhitelistedStorageKeys
      
      * move impl to expand_pallet_struct
      
      * use frame_support::sp_std::vec::Vec properly
      
      * successfully compiling with storage info loaded into a variable 💥
      
      * plausible implementation for whitelisted_storage_keys()
      
      * depends on the assumption that storage_info.encode() can be loaded
        into TrackedStorageKey::new(..)
      
      * use Pallet::whitelisted_storage_keys() instead of hard-coded list
      
      * AllPallets::whitelisted_storage_keys() properly working 💥
      
      * collect storage names
      
      * whitelisted_storage_keys() impl working 💥
      
      
      
      * clean up
      
      * fix compiler error
      
      * just one compiler error
      
      * fix doc compiler error
      
      * use better import path
      
      * fix comment
      
      * whoops
      
      * whoops again
      
      * fix macro import issue
      
      * cargo fmt
      
      * mark example as ignore
      
      * use keyword tokens instead of string parsing
      
      * fix keyword-based parsing of benchmarking(cached)
      
      * preliminary spec for check_whitelist()
      
      * add additional test for benchmarking whitelist
      
      * add TODO note
      
      * remove irrelevant line from example
      
      * use filter_map instead of filter and map
      
      * simplify syntax
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * clean up
      
      * fix test
      
      * fix tests
      
      * use keyword parsing instead of string parsing
      
      * use collect() instead of a for loop
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix compiler error
      
      * clean up benchmarking(cached) marking code
      
      * use cloned()
      
      * refactor to not use panic! and remove need for pub types in storage_alias
      
      * remove unneeded use
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * remove unneeded visibility changes
      
      * don't manually hard code hash for treasury account as hex
      
      * proper Ord, PartialOrd, and Hash impls for TrackedStorageKey
      
      * now based just on key, and available in no-std
      
      * use BTreeSet instead of BTreeMap
      
      * fix comments
      
      * cargo fmt
      
      * switch to pallet::whitelist and re-do it basti's way :D
      
      * make PartialOrd for TrackedStorageKey consistent with Ord
      
      * more correct implementation of hash-related traits for TrackedStorageKey
      
      * fix integration test
      
      * update TODO
      
      * remove unused keyword
      
      * remove more unused keywords
      
      * use into_iter()
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update frame/support/procedural/src/pallet/parse/mod.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * add docs for whitelisted
      
      * fix comment
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      c0e007b5
  24. Sep 13, 2022
  25. 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
    • Kian Paimani's avatar
      Fuzz testing for nomination pools (#12002) · 11372795
      Kian Paimani authored
      
      
      * some additional tests and stuff
      
      * make sanity public
      
      * add some sort of fuzz test for pools
      
      * breaks every now and then
      
      * breaks every now and then
      
      * IT WORKS AND PASSES 100k TESTS
      
      * cleanup
      
      * safe id addition
      
      * fix assert_eq_error_rate
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/nomination-pools/src/tests.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add some doc
      
      * Fix
      
      * ".git/.scripts/fmt.sh" 1
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: command-bot <>
      11372795
  26. Sep 08, 2022
  27. Sep 05, 2022
  28. Sep 02, 2022
  29. Sep 01, 2022