1. 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
  2. Jul 29, 2020
  3. Jul 28, 2020
  4. Jul 27, 2020
  5. Jul 21, 2020
  6. Jul 20, 2020
  7. Jul 17, 2020
  8. Jul 10, 2020
  9. 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
  10. 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
  11. Jul 07, 2020
  12. Jun 25, 2020
  13. Jun 24, 2020
  14. 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
  15. Jun 19, 2020
  16. 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
  17. Jun 12, 2020
  18. Jun 10, 2020
  19. 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
  20. 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
  21. May 28, 2020
  22. May 26, 2020
  23. May 25, 2020
  24. May 21, 2020
  25. May 20, 2020
    • Tomasz Drwięga's avatar
      Maximum extrinsic weight limit (#6067) · f74a7171
      Tomasz Drwięga authored
      * Only check single extrinsics weight limit in validate_transaction.
      
      * Add missing parameter to all pallets.
      
      * Add tests, fix default configuration.
      
      * Bump spec version.
      
      * Use AvailableBlockRation to calculate MaxExtrinsicWeight
      f74a7171
  26. May 16, 2020
  27. May 15, 2020
  28. May 05, 2020
  29. Apr 28, 2020
    • Benjamin Kampmann's avatar
      add `std` feature to newly added dependency in contracts pallet (#5801) · 99ad3284
      Benjamin Kampmann authored
      * remove unnecessary re-export
      
      * enable unleash
      
      * Revert "enable unleash"
      
      This reverts commit 30f11d7befea904d5e9c8c117a1b79eb3e184150.
      
      * Revert "remove unnecessary re-export"
      
      This reverts commit 74229f99587d1e17985b5e7f656f70d32b0e9ebe.
      
      * fix missing std def
      
      * Revert "Revert "enable unleash""
      
      This reverts commit 323fb913c38c8f1ac7424dd22e5f918ff6a0b596.
      
      * Revert "Revert "Revert "enable unleash"""
      
      This reverts commit 3f199674ae024edc32a2ab7ce3a15013d2b285a1.
      99ad3284