1. Nov 11, 2019
  2. Nov 10, 2019
    • Bastian Köcher's avatar
      Substrate runtime interface 2.0 (#4057) · a86bb37b
      Bastian Köcher authored
      * Adds first version of traits for generating the host functions
      
      * First steps of the procedural macro
      
      * Implements generation of the host extern functions
      
      * Prefix ext host function with snake case trait name
      
      * Implement host functions implementation on the host
      
      * Change `HostFunctions` interface
      
      * Implement `HostFunctions` for tuples
      
      * Make `WasmExecutor` generic over the host functions
      
      * Begin to add a test and make it compile
      
      * Make the test succeed
      
      * Add test to ensure that host functions are not found
      
      * It's alive! Make the `set_storage` test work
      
      * Add test for mutable references
      
      * Code cleanup and documentation etc
      
      * Add marker trait for types that should be passed as SCALE encoded
      
      * Inherit the visibility from the trait and more improvements
      
      * More impls and move them into their own file
      
      * Code simplification by dropping one trait
      
      * Give it a better name
      
      * Implement traits for arrays
      
      * Refactor code to support pass by codec/inner
      
      * Docs
      
      * Implement pass by inner for some crypto types and add a test
      
      * Implement exchangeable function support
      
      * Rewrite sr-io with as runtime interface
      
      * Start reworking after master merge
      
      * Adds `PassByCodec` derive
      
      * Adds `PassByInner` derive
      
      * Fix compilation errors
      
      * More implementations
      
      * Implement runtime interface traits for `str`
      
      * Make `sr-io` compile again
      
      * Fix more compilation errors
      
      * More progress on getting stuff back to compile
      
      * More compilation fixes
      
      * Fix warnings
      
      * Remove le conversions
      
      * Add support for `wasm_only` interfaces
      
      * Implement `Allocator` interface
      
      * Improve error message
      
      * Move `WasmAllocator` to `sr-io` and more clean ups
      
      * Use correct function signature for wasm functions
      
      * Store the host functions with the Wasm runtime
      
      * Docs update
      
      * Fix compilation after master merge
      
      * Remove `sr-io/without_std`
      
      * Make `srml-support` tests run again
      
      * More compilation error fixes
      
      * Use correct doc syntax
      
      * Fix test-runtime
      
      * Fix compilation
      
      * Catch native panics when executing the wasm runtime
      
      As with the native runtime, we now catch all native panics when we
      execute the wasm runtime. The panics inside the wasm runtime were
      already catched before by the wasm executor automatically, but any panic
      in the host functions could bring down the node. The recent switch to
      execute the native counterpart of the host function in `sr-io`, makes
      this change required. The native `sr-io` functions just `panic` when
      something is not provided or any other error occured.
      
      * Fix compilation
      
      * Don't panic in a panic
      
      * Move `sr-sandbox` to new runtime interface
      
      * Fixes tests after sandbox changes
      
      * Make sure we detect invalid utf8
      
      * Fixes after master merge
      
      * Adds pass by enum strategy
      
      * Fix wasmtime integration
      
      * Some macro structure clean up
      
      * Rework and test exchangebale host functions
      
      * PassBy derive macros documentation
      
      * Docs for `runtime_interface` macro
      
      * Support wild card argument names
      
      * Adds ui tests
      
      * Make sure that we are backwards compatible to the old runtime interfaces
      
      * Documentation
      
      * Fixes after latest master merge
      
      * Make `wasmtime` happy
      
      * Make `full_crypto` work
      
      * Make the new interface versionable
      
      * Rename `Sanboxing` to `Sandbox`
      
      * Don't finalize in test while importing
      
      * Fix Performance regression
      
      * Fix test
      a86bb37b
  3. Nov 07, 2019
  4. Nov 06, 2019
  5. Nov 05, 2019
  6. Nov 03, 2019
  7. Nov 01, 2019
  8. Oct 31, 2019
  9. Oct 30, 2019
  10. Oct 29, 2019
    • Gavin Wood's avatar
      More robust punishment (#3952) · 2b74b2d4
      Gavin Wood authored
      * Introduce new option "always force new era".
      
      * Take appropriate action, even for small offences.
      
      - Deselect the offender in all circumstances
      - Ensure that deselection forces a new era
      - Ensure that forcing a new era works with the always-forcing.
      
      * Bump runtime
      2b74b2d4
  11. Oct 28, 2019
    • Bastian Köcher's avatar
      Remove footgun around session keys/handlers (#3949) · 43961e85
      Bastian Köcher authored
      * Remove footgun around session keys/handlers
      
      - `OpaqueKeys` now has an associated type `KeyTypeIdProviders`. This can
      be used in the runtime as input for `SessionHandler` from the session
      trait.
      - `impl_opaque_keys` now works with modules and extracts the `KeyTypeId`
      from the module directly.
      - Added some checks to the `session` storage initialization that checks
      that the `SessionHandler` and `Keys` use the same number of keys and
      that the order is equal.
      
      * Update core/sr-primitives/src/traits.rs
      43961e85
    • Kian Paimani's avatar
      RPC to query transaction fee + weight + info (#3876) · 4f6f830a
      Kian Paimani authored
      * initial version for testing
      
      * New version that compiles
      
      * optional at block parameter
      
      * Fix some more view grumbles.
      
      * Update srml/transaction-payment/src/lib.rs
      4f6f830a
    • Kian Paimani's avatar
      Updates to elections-phragmen and some runtime docs. (#3940) · 33e56523
      Kian Paimani authored
      * minor changes
      
      * Refactors for phragmen-election
      
      * Bump.
      
      * Fix genesis stuff
      
      * Fix rest of the errors
      33e56523
    • Max Inden's avatar
      *: Disable authority discovery module (#3914) · 5c505d19
      Max Inden authored
      The authority discovery module enables authorities to be discoverable
      and discover other authorities to improve interconnection among them. In
      order to achieve this the module needs to know when the authority set
      changes, thus when a session changes.
      
      One has to register a module as a *session handler* in order for it to
      be notified of changing sessions. The order and number of these *session
      handlers* **MUST** correspond to the order and number of the *session
      keys*.
      
      Commit 7fc21cea added the authority discovery to the `SessionHandlers`.
      Given that the authority discovery module piggybacks on the Babe session
      keys the commit violated the above constraint.
      
      This commit reverts most of 7fc21cea, leaving `core/authority-discovery`
      and `srml/authority-discovery` untouched.
      5c505d19
  12. Oct 27, 2019
  13. Oct 25, 2019
  14. Oct 24, 2019
    • thiolliere's avatar
      Fix treasury kept and spend when emptied (#3880) · 81618967
      thiolliere authored
      * Now construct_runtime must include treasury config so account is created at genesis.
      * if it doesn't though it is ok, account will be created when the amount put is more than existential deposit.
      81618967
    • Kian Paimani's avatar
      Better Parameterisation for Fee system (#3823) · 37bda95b
      Kian Paimani authored
      * Better fee parameters
      
      * Fix build
      
      * Better runtime tests
      
      * Price to Weight ratio as type parameter (#3856)
      
      * Price to Weight ration as type parameter
      
      * Kian feedback
      
      * Some renames.
      
      * Fix executor tests
      
      * Getting Closer.
      
      * Phantom Data
      
      * Actually fix executor tests.
      
      * Fix tests.
      
      * Remove todo
      
      * Fix build
      37bda95b
    • Gavin Wood's avatar
      Add SECP256k1/ECDSA support for transaction signing (#3861) · cc0b1d08
      Gavin Wood authored
      
      
      * Add SECP256k1/ECDSA support for transaction signing.
      
      * Refactoring and fixes
      
      * Fix for contracts
      
      * Avoid breaking runtime host function
      
      * Build fixes, make subkey work more generaically.
      
      * Fix tests
      
      * Dedpulicate a bit of code, remove unneeded code, docs
      
      * Bump runtime version
      
      * Fix a test and clean up some code.
      
      * Derivation can derive seed.
      
      * Whitespace
      
      * Bump runtime again.
      
      * Update core/primitives/src/crypto.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update core/primitives/src/ecdsa.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Fix AppVerify
      cc0b1d08
  15. Oct 23, 2019
  16. Oct 22, 2019
    • Tomasz Drwięga's avatar
      Runtime logging. (#3821) · a31c01b3
      Tomasz Drwięga authored
      * Implement Printable for tuples.
      
      * Add debugging function.
      
      * Add debug 1.
      
      * Implement  for everything.
      
      * RuntimeDebug derive.
      
      * Introduce RuntimeDebug.
      
      * Add some dummy logging.
      
      * Replace RuntimeDebug with Debug.
      
      * Revert "Replace RuntimeDebug with Debug."
      
      This reverts commit bc47070a.
      
      * Working on Debug for all.
      
      * Fix bounds.
      
      * Add debug utils.
      
      * Implement runtime logging.
      
      * Add some docs and clean up.
      
      * Clean up derives.
      
      * Fix custom derive impl.
      
      * Bump runtime.
      
      * Fix long lines.
      
      * Fix doc test.
      
      * Use CARGO_CFG_STD.
      
      * Revert "Use CARGO_CFG_STD."
      
      This reverts commit ea429566.
      
      * Use parse_macro_input
      
      * Update lockfile.
      
      * Apply review suggestions.
      
      * Remove stray re-export.
      
      * Add no-std impl.
      
      * Update lockfile.
      a31c01b3
    • asynchronous rob's avatar
      Explicitly declare decl_storage! getters as functions (#3870) · 0b972942
      asynchronous rob authored
      * parse decl_storage getters with fn keyword
      
      * test for get in decl_storage
      
      * update all decl_storage! getters
      
      * bump version
      
      * adjust missed doc line
      0b972942
  17. Oct 21, 2019
  18. Oct 19, 2019
    • Ashley's avatar
      Move sr-arithmetic to a new crate and add in a fuzzer (#3799) · dccaf161
      Ashley authored
      
      
      * Split up sr_arithmetic.rs
      
      * Add some basic fuzzing
      
      * Add more tests
      
      * Add printing to fuzzing
      
      * Clean things up
      
      * Remove arbitrary
      
      * Remove comments
      
      * More cleaning, fix small error that was causing a panic
      
      * Add rational128
      
      * Remove old random tests
      
      * introduce panic
      
      * fuzzing should panic properly
      
      * Bit of cleanup
      
      * Add a test uncovered via fuzzing that fails!
      
      * Few small changes
      
      * Move sr-arithmetic to its own crate
      
      * Fix fuzzing
      
      * Got rid of fuzzer Cargo.lock
      
      * Added no_std
      
      * re-export assert_eq_error_rate
      
      * bump impl and spec version
      
      * re add convert into
      
      * Add an ignore to the test
      
      * Enabled benchmarking
      
      * Reindent
      
      * Clean up biguint fuzzer
      
      * Clean up biguint more
      
      * shuffle sr-primitives/traits about
      
      * Remove unused dependencies
      
      * Apply clippy suggestions
      
      * upgrade primitive-types versions
      
      * Run tests against num-bigint
      
      * Get rid of allocation in assert_biguints_eq
      
      * Add an optimisation to multiply_by_rational
      
      * rename parts_per_x -> per_things
      
      * Change fuzzer cargo.toml
      
      * Remove allocation from BigUint PartialEq impl
      
      * Remove accidental indentation
      
      * Renmove Lazy and Convert traits
      
      * Copy assert_eq_error_rate macro back to sr-primitives
      
      * Add documentation to fuzzers
      
      * fix sr-primitives assert_eq_error_rate
      
      * add cfg(test)
      
      * Update core/sr-arithmetic/src/traits.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update core/sr-arithmetic/src/traits.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update core/sr-arithmetic/fuzzer/src/biguint.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Allow rounding up in rational128
      
      * Make changes to biguint.rs
      
      * Update core/sr-arithmetic/src/traits.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Final touches
      
      * Convert to num_bigint::BigUint to compare
      
      * remove unused mut
      
      * more small changes
      
      * shuffle sr-primitives trait imports
      
      * more code review
      
      * move assert_eq_error_rate to lib.rs
      
      * Update core/sr-arithmetic/fuzzer/src/biguint.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Get rid of S
      
      * Simplify rational128 honggfuzz link
      
      * Insignificantly change rational128 fuzzing code
      
      * Slightly tidy up some of the arithmetic logic
      
      * Get rid of sr_arithmetic again(?) and fix sr-primitives/weights
      
      * Apply updates to sr_arithmetic.rs to crate
      dccaf161
  19. Oct 18, 2019
  20. Oct 17, 2019
    • Kian Paimani's avatar
      refactor: Transaction-Payment module (#3816) · df1582be
      Kian Paimani authored
      * Initial draft that compiles
      
      * Extract payment stuff from balances
      
      * Extract multiplier update stuff from system
      
      * Some fixes.
      
      * Update len-fee as well
      
      * some review comments.
      
      * Remove todo
      
      * bump
      df1582be
  21. Oct 16, 2019
    • thiolliere's avatar
      Refactor decl storage (#3765) · e0f3fa38
      thiolliere authored
      * split implementation in multiple files:
        * transformation -> genesis_config/  getters.rs  instance_trait.rs  metadata.rs  mod.rs  store_trait.rs
        * mod.rs -> parser.rs
        * impl.rs -> storage_struct.rs
      * parser is isolated into parse module, it could be improved as well but this can be done in another PR
      * modules contains a defintion of decl_storage input which must be ok to work with.
      * implementation change:
        * T: Trait might be more often bound to 'static (anyway we only use static one and it is needed for metadata current implementation).
        * GenesisConfig no longer requires its fields to be Clone (possible since to EncodeLike feature)
        * builder for map storages must return precise type Vec<(key, value)>
      e0f3fa38
    • Tomasz Drwięga's avatar
      Move srml RPC extensions to separate crates (#3791) · ead7e0ef
      Tomasz Drwięga authored
      
      
      * Move srml-system RPC out.
      
      * Fix tests for system-rpc module.
      
      * Contracts RPC moved.
      
      * Fix rpc test.
      
      * Clean up.
      
      * Update lockfile.
      
      * Bump runtime version.
      
      * Update srml/contracts/rpc/runtime-api/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Bump impl version.
      ead7e0ef
    • Fabio Tudone's avatar
      Fix #1536: do not require to construct a block for encoding it (#3813) · ba43ca16
      Fabio Tudone authored
      * Fix #1536: do not require to construct a block for encoding it
      
      * Bump `impl_version`
      
      * Improve `Block::encode_from` signature and rustdoc (from review by @bkchr)
      ba43ca16
  22. Oct 11, 2019