1. 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
  2. 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
  3. 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
  4. Dec 23, 2020
  5. Dec 22, 2020
  6. Dec 12, 2020
  7. Dec 10, 2020
  8. Dec 09, 2020
  9. Dec 08, 2020
    • Tomasz Drwięga's avatar
      Streamline frame_system weight parametrization (#6629) · 39a776cd
      Tomasz Drwięga authored
      
      
      * Basic weights builder.
      
      * Fixing WiP
      
      * Make the tests work.
      
      * Fix weights in node/runtime.
      
      * WiP.
      
      * Update pallets with new weights parameters.
      
      * Validate returns a Result now.
      
      * Count mandatory weight separately.
      
      * DRY
      
      * BREAKING: Updating state root, because of the left-over weight-tracking stuff
      
      * Update tests affected by Mandatory tracking.
      
      * Fixing tests.
      
      * Fix defaults for simple_max
      
      * Update frame/system/src/weights.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Rework the API a bit.
      
      * Fix compilation & tests.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add extra docs & rename few things.
      
      * Fix whitespace in ASCII art.
      
      * Update frame/system/src/limits.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix max_extrinsic calculations.
      
      * Fix conflicts.
      
      * Fix compilation.
      
      * Fix new code.
      
      * re-remove generic asset
      
      * Fix usage.
      
      * Update state root.
      
      * Update proxy.
      
      * Fix tests.
      
      * Move weights validity to integrity_test
      
      * Remove redundant BlockWeights.
      
      * Add all/non_mandatory comment
      
      * Add test.
      
      * Remove fn block_weights
      
      * Make the macro prettier.
      
      * Fix some docs.
      
      * Make max_total behave more predictabily.
      
      * Add BlockWeights to metadata.
      
      * fix balances test
      
      * Fix utility test.
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      39a776cd
  10. Dec 03, 2020
  11. Nov 30, 2020
  12. Nov 25, 2020
  13. Nov 20, 2020
  14. Nov 18, 2020
  15. Nov 03, 2020
  16. 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
  17. Oct 28, 2020
  18. Oct 26, 2020
  19. Oct 21, 2020
  20. Oct 20, 2020
    • Bastian Köcher's avatar
      Fix logging from inside the WASM runtime (#7355) · 203acda6
      Bastian Köcher authored
      * Fix logging from inside the WASM runtime
      
      When using `RuntimeLogger` to log something from the runtime, we didn't
      set any logging level. So, we actually did not log anything from the
      runtime as logging is disabled by default. This pr fixes that by setting
      the logging level to `TRACE`. It also adds a test to ensure this does
      not break again ;)
      
      * Update frame/support/src/debug.rs
      203acda6
  21. Oct 19, 2020
  22. Oct 14, 2020
  23. Oct 12, 2020
  24. Oct 08, 2020
  25. Oct 07, 2020
  26. Oct 05, 2020
  27. Sep 22, 2020
  28. Sep 18, 2020
    • Benjamin Kampmann's avatar
      Tracing for wasm with bridging to native (#6916) · a9c73113
      Benjamin Kampmann authored
      
      
      * implement events handling, implement parent_id for spans & events
      
      * add events to sp_io::storage
      
      * update test
      
      * add tests
      
      * adjust limit
      
      * let tracing crate handle parent_ids
      
      * re-enable current-id tracking
      
      * add test for threads with CurrentSpan
      
      * fix log level
      
      * remove redundant check for non wasm traces
      
      * remove duplicate definition in test
      
      * Adding conditional events API
      
      * prefer explicit parent_id over current,
      
      enhance test
      
      * limit changes to client::tracing event implementation
      
      * remove From impl due to fallback required on parent_id
      
      * make tracing codecable
      
      * replace with global tracing
      
      * new tracing interface
      
      * impl TracingSubscriber in client
      
      * implement access to global TracingSubscriber from primitives
      
      * span for wasm
      
      * increment towards Wasm Tracing Subscriber implementation
      
      * increment, remove sp-tracing from runtime-interface
      
      * increment, it compiles
      
      * attained original functionality with new mechanism
      
      * implement remaining TracingSubscriber functions
      
      * remove spans from decl_module
      
      * add handling for encoded values
      
      * Revert "replace with global tracing"
      
      This reverts commit 8824a60deea54d9b437407a21c8ceaf6a1902ee5.
      
      * Wasm Side Tracing
      
      * tracing on wasm
      
      * enable tracing wasm on node-runtime
      
      * export all the macros in std
      
      * tracing subscriber on wasm-side only
      
      * pass spans and events over and record them
      
      * reactivate previous code and  cleanup
      
      * further cleaning up
      
      * extend the span macros, activate through executive
      
      * tracking the actual extrinsic, too
      
      * style
      
      * fixing tests
      
      * spaces -> tabs
      
      * attempting to reactivate params
      
      * activate our tests in CI
      
      * some passing
      
      * tests passing
      
      * with core lazy
      
      * global tracer for wasm side with pass over
      
      * fixing metadata referencing
      
      * remove const_fn feature requirement
      
      * reenable dispatch traces
      
      * reset client tracing
      
      * further cleaning up
      
      * fixing runtime-test
      
      * move tracing-build setup into runtime-test
      
      * Merge DebugWriter from tracing and frame-support, move to sp-std
      
      * remove dangling fixme
      
      * Docs for tracing primitives
      
      * cleaning up a bit more
      
      * Wasm interface docs
      
      * optimise docs.rs setup
      
      * adding tracing flags to uncomment
      
      * remove brace
      
      * fixing imports
      
      * fixing broken syntax
      
      * add required modules
      
      * nicer formatting
      
      * better target management
      
      * adding low level storage tracing events into frame
      
      * add custom Debug impl for WasmMetadata
      
      * cloning profiler
      
      * adding info about cloning profiler
      
      * using in-scope for within calls
      
      * proper time tracing, cleaning up println
      
      * allow to disable tracing on runtime_interface-macro
      
      * disable tracing for wasm-tracing-interface
      
      * simplify wasm-tracing-api
      
      * update client to new interface
      
      * fixing docs and tests for sp-tracing
      
      * update integration tests
      
      * re-activating enter_span
      
      * dropping FIXME, it's documented
      
      * fix formatting
      
      * fix formatting
      
      * fix imports
      
      * more debug info
      
      * inform wasm about it being disabled by returning 1
      
      * only one tracer, but enabled multi-all support
      
      * make trait pub again for tests
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * fixing wasm doc tests for proper usage
      
      * remove unnecessary import
      
      * fixing formatting
      
      * minor style fixes
      
      * downgrading wabt
      
      * update error message for UI
      
      * Fix interface test
      
      * next attempt to fix macros
      
      * geee
      
      * revert tracing on hashed for future PR
      
      * remove local macros, use originals
      
      * we are able to convert to static items
      
      * implement more WasmValue types
      
      * adding support to convert str, debug and encoded values
      
      * more minor fixes
      
      * revert unsafe 'static making
      
      * fix indentation
      
      * remove commented lines
      
      * bump all them tracing versions
      
      * cleaning up docs and info
      
      * document new flag
      
      * the new layered system handles span cloning better
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      Co-authored-by: default avatarMatt Rutherford <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      a9c73113
  29. Sep 17, 2020
    • Wei Tang's avatar
      Use tracing-based subscriber logging (#6825) · 9fdd4672
      Wei Tang authored
      
      
      * init_logger: switch from log-based to tracing-based and add compatibility layer
      
      * Move tracing profiling subscriber related config realization
      
      * sp-tracing: change profiling to be a layer instead of a subscriber
      
      * Enable profiling layer in cli
      
      * Change all test env_logger init to sp_tracing::try_init_simple
      
      * Remove all local env_logger dependency
      
      * Add missing tracing-subscriber dependency
      
      * frame-sudo: fix tests
      
      * frame-support: fix tests
      
      * Fix frame/pallet and executor tests
      
      * Fix the remaining tests
      
      * Use subscriber's try_init as recommended by @davidbarsky
      
      * Be explict that the tracing-log feature is needed
      
      * Set subscriber writer to stderr
      
      * Shorter line width
      
      * Update cargo lock tracing version
      
      * Fix sc_tracing crate compile
      
      * Fix sc_authority_discovery crate test
      
      * unremove default-features
      
      * Leave enabled to default true
      
      * Warn if global default cannot be set
      
      * Fix unused import
      
      * Remove unused PROXY_TARGET
      
      * Change all reference from rc5 to rc6
      
      * Change all reference of rc2 to rc6
      
      * Fix styling
      
      * Fix typo
      
      * make logger init error'ing
      
      * re-fixing the test issue
      
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      9fdd4672
  30. Sep 16, 2020
    • Shawn Tabrizi's avatar
      WeightInfo for Vesting Pallet (#7103) · 9aa8698c
      Shawn Tabrizi authored
      * WeightInfo for Vesting Pallet
      
      * clean up weight docs
      
      * Update lib.rs
      
      * try to pipe max locks
      
      * Update for new type
      
      * add warning when locks > MaxLocks
      
      * Update lib.rs
      
      * fix compile
      
      * remove aliasing, fix trait def
      
      * Update
      9aa8698c
  31. Sep 15, 2020
  32. Sep 11, 2020
  33. Sep 09, 2020
  34. Aug 26, 2020
  35. Aug 12, 2020