1. Jul 04, 2019
    • Bastian Köcher's avatar
    • cheme's avatar
      Update trie dependencies. (#3017) · 263af0ae
      cheme authored
      * Update trie dependencies.
      
      * bump rutime impl version.
      263af0ae
    • Jim Posen's avatar
      srml-contract: Fail calls to removed contracts instead of succeeding. (#2968) · 617a90e8
      Jim Posen authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      * srml-contract: Refactor to reduce unnecessary storage lookups.
      
      * srml-contract: Fail calls to removed contracts.
      
      Previously, the calls would transfer funds and succeed without executing
      any code on the target account, which is unintuitive behavior.
      
      * Bump node runtime spec/impl versions.
      617a90e8
    • David Craven's avatar
      Generic keystore (#3008) · 47586361
      David Craven authored
      * Add KeyTypeId.
      
      * Implement clone for sr25519::Pair.
      
      * Extend Pair with to_raw_vec.
      
      * Implement TypedKey for Signature and Pair.
      
      * Add trait Public.
      
      * Make keystore generic.
      
      * Fixup clone.
      
      * Fix tests.
      
      * Update service.
      
      * Fix imports.
      
      * Fix build.
      
      * Fix babe build.
      
      * Fix subkey build.
      
      * Make authority setup generic.
      
      * Update node-template.
      
      * Fix build.
      
      * Remove unsafe code.
      
      * Fix tests.
      47586361
    • David Craven's avatar
      Session keys buffered for a session. (#2946) · 47b09bc0
      David Craven authored
      * Session keys buffered for the duration of a session.
      
      * Add queued_keys getter.
      
      * Make sure genesis state is consistent.
      
      * Add validator_count validators.
      
      * Compensate for session delay.
      
      * Remove unused code.
      
      * Add num_validators option.
      
      * Fix session numbers.
      
      * Fix merge.
      
      * Reintroduce changed.
      
      * Update runtime.
      
      * Make NextKeyFor private.
      
      * Move block initialization to function.
      
      * Update lib.rs
      
      * Add test for change propagation.
      
      * Fix docstring.
      
      * Use get instead of take.
      
      * Initialize validators from keys.
      
      * Next try.
      
      * Fix build.
      
      * Fix warning.
      
      * Make initial validator selection more transparent.
      
      * Make storage items private.
      
      * Reorder genesis initialization.
      
      * Update Cargo.lock
      
      * Update runtime version.
      
      * Update runtime version.
      
      * Update Cargo.lock
      
      * Update runtime version.
      
      * Add docs.
      47b09bc0
    • Bastian Köcher's avatar
      Build WASM binaries as part of cargo build (#2868) · 108704a2
      Bastian Köcher authored
      
      
      * Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
      
      Make use of `wasm-builder` in `test-runtime`.
      
      * Add build script and remove the wasm project
      
      * Port `node-runtime` to new wasm-builder
      
      * Make `substrate-executor` tests work with `wasm-builder`
      
      * Move `node-template` to `wasm-builder`
      
      * Remove `build.sh` :)
      
      * Remove the last include_bytes
      
      * Adds the missing build.rs files
      
      * Remove `build.sh` from CI
      
      * Debug CI
      
      * Make it work in CI
      
      * CI attempt 3
      
      * Make `substrate-runtime-test` compile on stable
      
      * Ahhh, some missed `include_bytes!`
      
      * AHH
      
      * Add suggestions
      
      * Improve search for `Cargo.lock` and don't panic if it is not found
      
      * Searching from manifest path was no good idea
      
      * Make the `wasm-builder` source better configurable
      
      * Expose the bloaty wasm binary as well
      
      * Make sure to rerun WASM recompilation on changes in dependencies
      
      * Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
      changes to env variables
      
      * Remove `build.sh` from READMEs
      
      * Rename the projects
      
      * Fixes CI
      
      * Update lock file
      
      * Fixes merge-conflict
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTriplEight <[email protected]>
      
      * Try to make windows happy
      
      * Replace all back slashes in paths with slashes
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarPierre Krieger <[email protected]>
      
      * Use cargo from `CARGO` env variable
      
      * Fix compilation
      
      * Use `rustup` for running the nightly build
      
      * Make individual projects skipable
      
      * Fix compilation
      
      * Fixes compilation
      
      * Build all WASM projects in one workspace
      
      * Replace more back slashes!
      
      * Remove `inlcude_bytes!`
      
      * Adds some documentation
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * More review comments
      
      * Update `Cargo.lock`
      
      * Set license
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * More review comments + adds `TRIGGER_WASM_BUILD` env
      
      * Fix doc tests
      
      * Increase version + update README
      
      * Switch crates.io version of `wasm-builder`
      
      * Update README
      
      * Switch to released version of `wasm-builder-runner`
      108704a2
    • Pierre Krieger's avatar
      Can now disable the keystore (#3004) · c9a1c36f
      Pierre Krieger authored
      
      
      * Can now disable the keystore
      
      * Fix service test
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Fix cli
      c9a1c36f
  2. Jul 03, 2019
    • Bastian Köcher's avatar
      Downgrade `memory-db` in `test-runtime` to fix WASM compilation (#3010) · aa83e354
      Bastian Köcher authored
      * Downgrade `memory-db` in `test-runtime` to fix WASM compilation
      
      * Remove unneeded `memory-db` dependency
      
      * Update `Cargo.lock`
      aa83e354
    • Bastian Köcher's avatar
      Allow where bounds on `decl_module!` and `decl_storage!` (#3000) · 4e1422b1
      Bastian Köcher authored
      * Introduces a `where` bound to `decl_macro!` and `decl_storage!`
      
      * More fixes
      
      * Adds documentation
      4e1422b1
    • Bastian Köcher's avatar
      Implement `From` module `Call` for outer `Call` (#3006) · 9f814b1f
      Bastian Köcher authored
      * Implement `From` module `Call` for outer `Call`
      
      * Fixes compilation and add test
      9f814b1f
    • Pierre Krieger's avatar
      Implement Executor for Service and SpawnHandle (#3007) · 14b15fc4
      Pierre Krieger authored
      * Implement Executor for Service and SpawnHandle
      
      * Update lib.rs
      
      * Fix the race condition
      14b15fc4
    • DemiMarie-parity's avatar
      BABE Randomness using PreRuntime digests (#2929) · 56fd09cf
      DemiMarie-parity authored
      
      
      * Initial work on exposing pre-runtime digests
      
      This provides the primitive API, as well as exposing it from BABE.
      
      * Initial work on using pre-digests in runtimes
      
      This includes both code to expose them from `srml_system`, as well as
      using it in (currently dead) code in `srml_babe`.
      
      * Bump `{spec,impl}_version`
      
      * Add `u64_backend` feature to curve25519-dalek
      
      Otherwise, it errors out at compile-time.
      
      * Bump `Cargo.lock`
      
      * Do not depend on the schnorrkel crate in the runtime
      
      The schnorrkel crate does not work on `#![no_std]`, but the runtime only
      needs constants from it.  This adds our own definitions of those
      constants, and checks them for correctness at compile-time.
      
      * Actually implement storage of VRF outputs
      
      * Trivial formatting change
      
      * Provide a `hash_randomness` function in BABE
      
      for processing VRF outputs.
      
      * Implement a basic randomness generating function
      
      It just XORs the VRF outputs together.
      
      * Actually implement on-chain randomness
      
      Blake2b is used for hashing.
      
      * Update dependencies
      
      * Run `cargo update` where needed
      
      * Re-add a newline at EOF
      
      * Remove broken and unsafe code
      
      XOR is not a hash function, and must not be used as such.  The
      implementation was also needlessly unsafe.
      
      * Run `cargo update` where needed
      
      * Remove spurious dependency
      
      * Document security guarantees of BABE randomness
      
      * Add a `RandomnessBeacon` trait
      
      * Document `RandomnessBeacon::random`
      
      * Fix silly compile error (unexpected type arguments)
      
      * Fix BABE randomness
      
      * Implement `FindAuthor` for `babe::Module`
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Respond to suggestions from code review and fix bugs
      
      * Store an authority index, not the authority itself.
      * Avoid unnecessary decoding.
      * Implement relative slots and BABE randomness fully and correctly.
      
      * Remove spurious dependency
      
      * Fix error reported by rust-analyzer
      
      * Update Cargo.lock files
      
      * `wrapping_add` → `checked_add`
      
      The epoch index will not overflow.  Panic if it does.
      
      * Move randomness documentation to trait
      
      * Fix compile error in test suite
      
      * Explain 2^64 limit
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      56fd09cf
  3. Jul 02, 2019
  4. Jul 01, 2019
    • kaichao's avatar
      typo fix in core (#2987) · eb63d506
      kaichao authored
      eb63d506
    • Roman Borschel's avatar
      Fix peer discovery delays. (#2982) · e63598b6
      Roman Borschel authored
      * Fix DiscoveryBehaviour::poll.
      
      The previous implementation regularly returned `NotReady` from `poll`
      despite the inner Kademlia behaviour having events ready, thus letting
      the `poll`ing be largely driven by the task wakeups from the Delay for
      the next random Kademlia query, inducing major delays in consuming
      the ready Kademlia events and thus slowing progress.
      
      The discovery test now passes quickly, as expected.
      
      * Ensure the Delay is polled right after reset.
      
      For task wakeup.
      e63598b6
    • Bastian Köcher's avatar
      Make constants exposable in metadata (#2975) · c3be75da
      Bastian Köcher authored
      
      
      * Some cleanup
      
      * Add module constant metadata declaration
      
      * Begin to integrate the constants in `decl_module`
      
      * Fixes tests
      
      * Fix compilation and add tests
      
      * Remove duplicate code
      
      * Expose constants in democracy and staking + further fixes
      
      * Update srml/metadata/src/lib.rs
      
      Co-Authored-By: default avatarYJ <[email protected]>
      
      * Hide `RawEvent` metadata function
      
      * Prevent whitespaces in types
      
      * Fix `offchain_worker` and `constants` with instances
      
      * Up the `impl_version`
      
      * Fix macro
      
      * Incrase impl_version
      c3be75da
    • Niklas Adolfsson's avatar
      cargo update -p smallvec (#2983) · 13b4915c
      Niklas Adolfsson authored
      13b4915c
  5. Jun 30, 2019
  6. Jun 29, 2019
  7. Jun 28, 2019
  8. Jun 27, 2019
    • Jim Posen's avatar
      srml-contract: Contract refactors (#2924) · 563a7136
      Jim Posen authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      * srml-contract: Refactor away unnecessary Option.
      
      * srml-contract: Add assertion to gas_left test.
      
      * srml-contract: Refactor try_evict_or_and_pay_rent to make tests pass.
      
      * srml-contract: Add tests and comments for bugs in rent payment logic.
      
      * srml-contract: Minor cleanup using GasMeter constructor.
      
      * Bump node runtime impl version.
      563a7136
    • Bastian Köcher's avatar
      Implement a proper generic resolution in `decl_storage!` (#2913) · da91f052
      Bastian Köcher authored
      
      
      * Add failing test case
      
      * move storage maps to blake2_128 (#2268)
      
      * remove default hash, introduce twox_128 and blake2
      
      * use blake2_128 & create ext_blake2_128
      
      * refactor code
      
      * add benchmark
      
      * factorize generator
      
      * fix
      
      * parameterizable hasher
      
      * some fix
      
      * fix
      
      * fix
      
      * fix
      
      * metadata
      
      * fix
      
      * remove debug print
      
      * map -> blake2_256
      
      * fix test
      
      * fix test
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * impl twox 128 concat (#2353)
      
      * impl twox_128_concat
      
      * comment addressed
      
      * fix
      
      * impl twox_128->64_concat
      
      * fix test
      
      * Fix compilation and cleanup some docs
      
      * Lol
      
      * Remove traits from storage types that are not generic
      
      * Get instance test almost working as wanted
      
      * Make `srml-support-test` compile again :)
      
      * Fixes test of srml-support
      
      * Fix compilation
      
      * Break some lines
      
      * Remove incorrect macro match arm
      
      * Integrates review feedback
      
      * Update documentation
      
      * Fix compilation
      da91f052
    • Bastian Köcher's avatar
      Remove `Mutex` from `core-service` (#2961) · e8eaec1d
      Bastian Köcher authored
      * Remove `Mutex` from `core-service`
      
      * Fixes sync test
      e8eaec1d
  9. Jun 26, 2019
    • Tomasz Drwięga's avatar
      Enable hosts filtering. (#2959) · 1e84f26f
      Tomasz Drwięga authored
      1e84f26f
    • Pierre Krieger's avatar
      Remove tokio dependencies (#2935) · 2393e9b5
      Pierre Krieger authored
      * Remove dependencies on tokio
      
      * Make service not depend on tokio
      
      * Fix service tests
      
      * Manually poll the import queue if failed to start
      
      * Spawn all tasks at the end
      
      * Remove executor from TelemetryOnConnect
      
      * Remove TaskExecutor from offchain workers
      
      * Remove TaskExecutor from AuthoritySetup
      
      * Remove TaskExecutor from service
      
      * Remove tokio dependency from RPC
      
      * Remove finality-grandpa from WASM checks
      
      * Fix offchain tests
      
      * Line widths
      
      * Fix RPC tests
      
      * Fix service tests
      
      * Fix bad futures polling
      
      * Address some concerns
      
      * Better error handling
      
      * Is it the connectivity test that's not passing? I don't know, let's try
      
      * Revert "Is it the connectivity test that's not passing? I don't know, let's try"
      
      This reverts commit 28bbe51f.
      
      * Fix test
      2393e9b5
    • cheme's avatar
      Additional state check. (#2915) · 08707e35
      cheme authored
      
      
      * check resulting state root on import.
      
      * get root from last method.
      
      * Fix test runtime (was changing state after root calculation).
      
      * Do reset new authorities (just take before root calculation).
      
      * bump impl runtime version.
      
      * Update core/sr-api-macros/tests/trybuild.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      08707e35
    • Stanislav Tkach's avatar
      Update codec version to the 4.1 version (#2948) · d6099e91
      Stanislav Tkach authored
      * Update codec version to the 4.1 version
      
      * Bump impl_version
      
      * Update lock files
      
      * Update codec to 4.1.1 version
      
      * Bump impl version
      d6099e91
    • Jim Posen's avatar
      srml-contract: Fix Gas type to u64 (#2944) · 827be5b5
      Jim Posen authored
      * srml-contract: Move gas costs from Config to Schedule.
      
      * srml-contract: Define Gas units fixed as u64.
      
      This removes Gas as a configurable type on the contracts Trait.
      
      * Bump node runtime spec/impl versions.
      827be5b5