1. Oct 29, 2020
  2. Oct 26, 2020
  3. Oct 23, 2020
  4. Oct 08, 2020
    • Alexander Theißen's avatar
      seal: Add automated weights for contract API calls (#7017) · 443725f0
      Alexander Theißen authored
      
      
      * seal: Add capability to put uninstrumented code (for benchmarks)
      
      Benchmarks should only measure the overhead of the API calls itself.
      For that reason we want to run them without instrumentation.
      
      * seal: Cap the the data length for deposited events
      
      Data used in events has storage implications for archive nodes.
      Those need to keep the events in storage forever. For that reason
      we want to limit the amount of storage that can be used inside events.
      
      * seal: Fix error reporting in the case out of bound sandbox access
      
      * seal: Refactor existing benchmarks
      
      * seal: Convert benchmark file to tabs
      
      * seal: Add benchmarks for functions called by contracts
      
      * seal: Create a default schedule from benchmark generated WeightInfo
      
      * seal: Make use of WeightInfo in extrinsic weight annotations
      
      * seal: Replace the old schedule by the benchmark generated one
      
      * Review: Fix copy paste typo in schedule construction
      
      * Review: Fix stale docs
      
      * Fix whitespace errors
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * Review: Use checked_div in order to be more defensive
      
      * Review: Rename no_charge to already_charged
      
      * Review: Whitelist caller of extrinsics
      
      * Review: Remove trailing whitespace
      
      * Review: Remove confusing "self::" syntax
      
      * Review: Add docs for the benchmark prepration submodule
      
      * Review: Move code generation functions to own module
      
      * Review: Refactor and document benchmark helper functions
      
      * Remove additional empty line
      
      * Added missing comment on caller_funding
      
      * Update frame/contracts/src/benchmarking/code.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * Fix missing sp_std::prelude import in code.rs
      
      * cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_contracts --heap-pages 4096
      
      * Use weights from the benchmark machine for the substrate node
      
      * Remove prefixes from Schedule members
      
      * Data lengths in the WeightInfo Trait are specified in kilobytes
      
      * Rename ApiWeights to HostFunctionWeights
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      443725f0
  5. Sep 22, 2020
    • Benjamin Kampmann's avatar
      Releasing 2.0 – two dot 😮 (#7182) · ecdc9442
      Benjamin Kampmann authored
      Tagging the release of substrate 2.0
      
      
      [ci: skip-checks]
      ecdc9442
    • Bastian Köcher's avatar
      Rename `ModuleToIndex` to `PalletRuntimeSetup` (#7148) · 86594727
      Bastian Köcher authored
      * Rename `ModuleToIndex` to `PalletRuntimeSetup`
      
      Besides the renaming it also adds support getting the name of a pallet
      as configured in the runtime.
      
      * Rename it to `PalletInfo`
      
      * Remove accidentally added files
      86594727
    • Steve Degosserie's avatar
      Update READMEs, fix links (#7176) · 22632efc
      Steve Degosserie authored
      * Re-generate READMEs to fix doc links; set readme field in package manifests
      
      * Re-generate READMEs to fix doc links; set readme field in package manifests
      
      * Re-generate READMEs to fix doc links; set readme field in package manifests
      
      * Re-generate READMEs to fix doc links; set readme field in package manifests
      
      * Revert stuff that shouldn't have been committed
      
      * Revert stuff that shouldn't have been committed
      
      * Fix parent relative link generation
      
      * Manually remove this incorrect link for now.
      22632efc
  6. Sep 21, 2020
  7. 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
  8. Sep 11, 2020
  9. Aug 21, 2020
  10. Aug 20, 2020
    • Benjamin Kampmann's avatar
      prepping for releasing rc6 (#6922) · 2416aa79
      Benjamin Kampmann authored
      * Bump version
      
      * update test-utils crates to be ready for publishing
      
      * adding changelog
      
      * Adding automaticly generated READMEs
      
      * fixing versions
      
      * another version mishap
      2416aa79
  11. Aug 10, 2020
    • Alexander Theißen's avatar
      seal: Change prefix and module name from "ext_" to "seal_" for contract callable functions (#6798) · 04b185e3
      Alexander Theißen authored
      * seal: Change prefix "ext_" to "seal_" for contract callable functions
      
      The word Ext is a overloaded term in the context of substrate. It usually
      is a trait which abstracts away access to external resources usually in order
      to mock them away for the purpose of tests. The contract module has its own
      `Ext` trait in addition the the substrate `Ext` which makes things even more
      confusing.
      
      In order to differentiate the contract callable functions more clearly from
      this `Ext` concept we rename them to use the "seal_" prefix instead.
      
      This should change no behaviour at all. This is a pure renaming commit.
      
      * seal: Rename import module from "env" to "seal0"
      
      * seal: Fixup integration test
      
      * seal: Add more tests for new import module names
      04b185e3
  12. Aug 03, 2020
    • Ashley's avatar
      Convert spaces to tabs (#6799) · 07facb13
      Ashley authored
      07facb13
    • Alexander Theißen's avatar
      seal: Fix and improve error reporting (#6773) · 6671d017
      Alexander Theißen authored
      * seal: Rework ext_transfer, ext_instantiate, ext_call error handling
      
      * Deny calling plain accounts (must use transfer now)
      * Return proper module error rather than ad-hoc strings
      * Return the correct error codes from call,instantiate (documentation was wrong)
      * Make ext_transfer fallible again to make it consistent with ext_call
      
      * seal: Improve error messages on memory access failures
      
      * seal: Convert contract trapped to module error
      
      * seal: Add additional tests for transfer, call, instantiate
      
      These tests verify that those functions return the error types
      which are declared in its docs.
      
      * Make it more pronounced that to_execution_result handles trap_reason
      
      * Improve ReturnCode docs
      
      * Fix whitespace issues in wat files
      
      * Improve ReturnCode doc
      
      * Improve ErrorOrigin doc and variant naming
      
      * Improve docs on ExecResult and ExecError
      
      * Encode u32 sentinel value as hex
      
      * with_nested_context no longer accepts an Option for trie
      
      * Fix successful typo
      
      * Rename InvalidContractCalled to NotCallable
      6671d017
  13. Jul 29, 2020
  14. Jul 28, 2020
  15. Jul 27, 2020
  16. Jul 21, 2020
  17. Jul 20, 2020
  18. Jul 17, 2020
  19. Jul 10, 2020
  20. Jul 09, 2020
    • Alexander Theißen's avatar
      seal: Rework contracts API (#6573) · 25de5b5c
      Alexander Theißen authored
      * Transition getter functions to not use scratch buffer
      
      * Remove scratch buffer from ext_get_storage
      
      * Remove scratch buffer from ext_call
      
      * Remove scratch buffer from ext_instantiate
      
      * Add ext_input and remove scratch buffer
      
      * Rework error handling (changes RPC exposed data)
      
      * ext_return passes a flags field instead of a return code
      	* Flags is only for seal and not for the caller
      	* flags: u32 replaced status_code: u8 in RPC exposed type
      * API functions use a unified error type (ReturnCode)
      * ext_transfer now traps on error to be consistent with call and instantiate
      
      * Remove the no longer used `Dispatched` event
      
      * Updated inline documentation
      
      * Prevent skipping of copying the output for getter API
      
      * Return gas_consumed from the RPC contracts call interface
      
      * Updated COMPLEXTITY.md
      
      * Rename ext_gas_price to ext_weight_to_fee
      
      * Align comments with spaces
      
      * Removed no longer used `ExecError`
      
      * Remove possible panic in `from_typed_value`
      
      * Use a struct as associated data for SpecialTrap::Return
      
      * Fix nits in COMPLEXITY.md
      
      * Renamed SpecialTrap to TrapReason
      
      * Fix test
      
      * Finish renaming special_trap -> trap_reason
      
      * Remove no longer used get_runtime_storage
      
      * fixup! Remove no longer used get_runtime_storage
      
      * Removed tabs for comment aligment
      25de5b5c
  21. Jul 08, 2020
    • Shawn Tabrizi's avatar
      Add `WeightInfo` to all pallets with benchmarks. (#6575) · 2302898b
      Shawn Tabrizi authored
      * Start adding weight info
      
      * More weightinfo
      
      * finish weight info
      
      * more fixes
      
      * inital update of node runtime
      
      * fix the rest of the compilation
      
      * update balances
      
      * add docs
      
      * fix balances tests
      
      * Fix more tests
      
      * Fix compile
      
      * Fix pallet-evm tests
      2302898b
  22. Jul 07, 2020
  23. Jun 25, 2020
  24. Jun 24, 2020
  25. Jun 23, 2020
    • Sergey Pepyakin's avatar
      pallet-contracts: migrate to nested storage transaction mechanism (#6382) · f36b7857
      Sergey Pepyakin authored
      
      
      * Add a simple direct storage access module
      
      * WIP
      
      * Completely migrate to the transactional system.
      
      * Format
      
      * Fix wasm compilation
      
      * Get rid of account_db module
      
      * Make deposit event eager
      
      * Make restore_to eager
      
      * It almost compiles.
      
      * Make it compile.
      
      * Make the tests compile
      
      * Get rid of account_db
      
      * Drop the result.
      
      * Backport the book keeping.
      
      * Fix all remaining tests.
      
      * Make it compile for std
      
      * Remove a stale TODO marker
      
      * Remove another stale TODO
      
      * Add proof for `terminate`
      
      * Remove a stale comment.
      
      * Make restoration diverging.
      
      * Remove redudnant trait: `ComputeDispatchFee`
      
      * Update frame/contracts/src/exec.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Introduce proper errors into the storage module.
      
      * Adds comments for contract storage module.
      
      * Inline `ExecutionContext::terminate`.
      
      * Restore_to should not let sacrifice itself if the contract present on the stack.
      
      * Inline `transfer` function
      
      * Update doc - add "if succeeded"
      
      * Adapt to TransactionOutcome changes
      
      * Updates the docs for `ext_restore_to`
      
      * Add a proper assert.
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      f36b7857
  26. Jun 19, 2020
  27. 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
  28. Jun 12, 2020
  29. Jun 10, 2020
  30. Jun 08, 2020
    • Benjamin Kampmann's avatar
      Intent to release rc3 (#6290) · 881072e5
      Benjamin Kampmann authored
      881072e5
    • Hernando Castano's avatar
      Use Subscription Manager from `jsonrpc-pubsub`: The Sequel (#6254) · 9bd23e7f
      Hernando Castano authored
      
      
      * Bump jsonrpc pubsub, core, http, and ws
      
      Right now these are the packages which _need_ to be updated
      so I can just the latest `jsonrpc-pubsub` code. Once a release
      it cut upstream the rest of the dependencies should be updated
      as well.
      
      * Use jsonrpc-pubsub's SubscriptionManager
      
      This places sc-rpc-api::Subscriptions
      
      * Bump jsonrpc-core outside of sc-rpc-*
      
      * Update client/rpc tests
      
      Right now one of the `author` tests is failing, I
      need to think a bit about how best to fix it.
      
      * Remove Subscriptions manager
      
      There's no need for this implementation since we're
      using the one from `jsonrpc-pubsub` now
      
      * Fix author RPC test
      
      This test used to check for a numerial subscription ID,
      whereas now it uses a string based ID which is the default
      provided by `jsonrpc-pubsub`'s subscription manager.
      
      * Remove unused NumericIdProvider
      
      * Add missing bracket
      
      Removed one too many with that last one, lol
      
      * Bump `jsonrpc` to v14.2
      
      There's an exception though. `jsonrpc-derive` cannot be bumped
      past v14.0.5 just yet since it has a dependency on `quote` pinned
      to v1.0.1. This means that at the moment it won't build on Substrate
      since it's using v1.0.3.
      
      * Track `jsonrpc-derive` master branch
      
      * Bump `quote` version to v1.0.6
      
      * Bump `jsonrpc-derive` to v14.2.1
      
      This includes support for `quote` v1.0.6
      
      * Use exact version for jsonrpc crates
      
      Doing this to make sure any updates in jsonrpc don't
      accidently trickle down to Polkadot.
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      9bd23e7f
  31. Jun 04, 2020
    • André Silva's avatar
      8f5a52fe
    • Hernando Castano's avatar
      Use Subscription Manager from `jsonrpc-pubsub` (#6208) · ea1eb4e5
      Hernando Castano authored
      * Bump jsonrpc pubsub, core, http, and ws
      
      Right now these are the packages which _need_ to be updated
      so I can just the latest `jsonrpc-pubsub` code. Once a release
      it cut upstream the rest of the dependencies should be updated
      as well.
      
      * Use jsonrpc-pubsub's SubscriptionManager
      
      This places sc-rpc-api::Subscriptions
      
      * Bump jsonrpc-core outside of sc-rpc-*
      
      * Update client/rpc tests
      
      Right now one of the `author` tests is failing, I
      need to think a bit about how best to fix it.
      
      * Remove Subscriptions manager
      
      There's no need for this implementation since we're
      using the one from `jsonrpc-pubsub` now
      
      * Fix author RPC test
      
      This test used to check for a numerial subscription ID,
      whereas now it uses a string based ID which is the default
      provided by `jsonrpc-pubsub`'s subscription manager.
      
      * Remove unused NumericIdProvider
      
      * Add missing bracket
      
      Removed one too many with that last one, lol
      
      * Bump `jsonrpc` to v14.2
      
      There's an exception though. `jsonrpc-derive` cannot be bumped
      past v14.0.5 just yet since it has a dependency on `quote` pinned
      to v1.0.1. This means that at the moment it won't build on Substrate
      since it's using v1.0.3.
      
      * Track `jsonrpc-derive` master branch
      
      * Bump `quote` version to v1.0.6
      
      * Bump `jsonrpc-derive` to v14.2.1
      
      This includes support for `quote` v1.0.6
      ea1eb4e5