1. Jul 11, 2019
  2. Jul 10, 2019
  3. Jul 09, 2019
    • thiolliere's avatar
      Make use of child storage for testExternalities and basicExternalities (#3009) · 0bc753ff
      thiolliere authored
      * impl test using both storage and child_storage
      
      * few fixes
      
      * remove unused code
      
      * impl PartialEq with children keys
      
      * fmt
      
      * implementation of basic with children + rename new
      
      * assert and test
      
      * no panic in runtime
      
      * address comments
      
      * fix
      0bc753ff
    • Max Inden's avatar
      Introduce flag to enable sentry nodes to participate in grandpa gossip (#3018) · cf5b132b
      Max Inden authored
      Given the following situation: A validator 'A' is not supposed to be
      connected to the public internet to protect it from e.g. a DoS attack.
      Instead it connects to a sentry node 'sentry-A' which connects to the
      public internet. Validator 'B' can reach validator 'A' via sentry node
      'sentry-A' and vice versa.
      
      A sentry node needs to participate in the grandpa gossip without
      becoming a validator itself in order to forward these message to its
      validator. This commit adds a new command line flag (`--grandpa-voter`)
      forcing a node to participate in the grandpa voting process even though
      no `--key` was specified. Due to the fact that it does not have a key,
      it does not become a validator in the network.
      
      In order to simulate the above situation this commit also adds a Docker
      Compose file (`scripts/sentry-node/docker-compose.yml`) with further
      documentation.
      cf5b132b
    • Gavin Wood's avatar
      Allow sub accounts to be derived from an TypeId. (#3039) · 180e30ea
      Gavin Wood authored
      * Allow sub accounts to be derived from an TypeId.
      
      * Deduplicate
      
      * Fix
      
      * Rephrase.
      180e30ea
    • Pierre Krieger's avatar
      Change the import queue traits to take &mut self instead of &self (#3058) · 3e6f9051
      Pierre Krieger authored
      * SharedFinalityProofRequestBuilder -> BoxFinalityProofRequestBuilder
      
      * SharedThings -> BoxThings
      
      * Fix tests
      
      * build_request_data now takes &mut self
      
      * The other traits now also take &mut self
      
      * More or less fix tests
      
      * Fix tests
      
      * Fix more tests
      
      * Moar tests
      
      * Don't call make_block_import multiple time
      
      * Fix doctest
      3e6f9051
    • Tomasz Drwięga's avatar
      [offchain] Support for sign & verify for crypto keys (#3023) · 4dc625ff
      Tomasz Drwięga authored
      * Implement sign & verify.
      
      * Use phrases and password.
      
      * Sign & verify with authority keys.
      
      * Fix tests.
      
      * WiP
      
      * WiP
      
      * Allow the caller to decide on 'CryptoKind'.
      
      * Remove TODO.
      
      * Make seed private back.
      
      * Fix non-std build and bump version.
      
      * Use Into<u32> instead of asses.
      
      * Add missing typedef.
      4dc625ff
  4. Jul 08, 2019
    • Pierre Krieger's avatar
      d5dc301e
    • asynchronous rob's avatar
      Dispatch on-disabled digests from consensus modules (#3055) · bdd6e8bd
      asynchronous rob authored
      * on-disable primitives for engines
      
      * dispatch on-disabled digests from SRML consensus
      
      * bump runtime versions
      
      * use find_map
      bdd6e8bd
    • Bastian Köcher's avatar
      Make `RUSTFLAGS` configurable in `wasm-builder` (#3057) · 198e5c9f
      Bastian Köcher authored
      * Make `RUSTFLAGS` configurable in `wasm-builder`
      
      * Version ups
      
      * Update `Cargo.lock`
      198e5c9f
    • Pierre Krieger's avatar
      9be1ee8b
    • Pierre Krieger's avatar
      Network crate cleanups (#3049) · 09086cf7
      Pierre Krieger authored
      * Remove useless internal messages
      
      * Remove NetworkService::disconnect_peer
      
      * Remove NetworkMsg altogether
      
      * Rename ProtocolMsg ServerToWorkerMsg
      
      * Remove useless code
      
      * Add example for parse_str_addr
      
      * Move parse_str_addr and ProtocolId to config
      
      * Don't reexport the content of config
      
      * Rework the imports
      
      * More reexports rework
      
      * Add documentation
      
      * Move finalization report to network future
      
      * Move on_block_imported to worker
      
      * get_value/put_value no longer locking
      
      * local_peer_id() no longer locks
      
      * Remove FetchFuture
      
      * Service imports cleanup
      
      * Produce the network state in the network task
      
      * Merge network task and RPC network task
      
      * Move network methods to NetworkWorker
      
      * Remove Arc peers system from network
      
      * add_reserved_peer now goes through the channel
      
      * Remove Mutex around network swarm
      
      * Remove the FnOnce alias traits
      
      * Replace is_offline with num_connected
      
      * Improve style of poll()
      
      * Fix network tests
      
      * Some doc in service module
      
      * Remove macro export
      
      * Minor doc changes
      
      * Remove the synchronized() method of the import queue
      
      * Line width
      
      * Line widths
      
      * Fix import queue tests
      
      * Fix CLI tests
      09086cf7
    • asynchronous rob's avatar
      Slash and prove membership of prior sessions (#2970) · 60c54f0d
      asynchronous rob authored
      
      
      * skeleton for tracking historical sessions
      
      * refactor OpaqueKeys
      
      * some more skeleton work
      
      * adjust session to new OpaqueKeys API
      
      * further refactoring of key-type-ids
      
      * session gets validator ID parameter
      
      * run up against compiler
      
      * tweak staking to support new session changes
      
      * first run at child storage for deduplication
      
      * Make session use `AccountId` as `ValidatorId`
      
      * run up against child trie issues
      
      * switch to using normal trie but with a fixed prefix
      
      * clear out some println
      
      * add dedup test
      
      * flesh out historical module more
      
      * introduce ExposureOf for staking
      
      * test the historical module
      
      * WASM compiles
      
      * tests all compile
      
      * do some mock change
      
      * fix bulk of tests
      
      * fix staking tests
      
      * test obsolecence mechanic
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * some more style nits
      
      * a couple more nits
      
      * tweak tries
      
      * fix typo thie -> this
      60c54f0d
    • Arkadiy Paronyan's avatar
      a44650f1
  5. Jul 07, 2019
  6. Jul 06, 2019
  7. Jul 05, 2019
  8. Jul 04, 2019
    • André Silva's avatar
      grandpa: round catchup messages (#2801) · 968ff41f
      André Silva authored
      
      
      * grandpa: initial structure for catch up messages
      
      * grandpa: answer catch up requests
      
      * grandpa: inject catch up messages into global stream
      
      * grandpa: keep track of pending catch up request
      
      * grandpa: block catchup until all referenced blocks are imported
      
      * grandpa: unify catch up and commit streams
      
      * grandpa: simplify communication stream/sink types
      
      * grandpa: note gossip validator on catch up message import
      
      * grandpa: fix cost on catch up message validation
      
      * grandpa: check signatures on catch up messages
      
      * grandpa: clean up catch up request handling state
      
      * grandpa: adjust costs on invalid catch up requests
      
      * grandpa: release lock before pushing catch up message
      
      * grandpa: validate catch up request against peer view
      
      * grandpa: catch up docs
      
      * grandpa: fix tests
      
      * grandpa: until_imported: add tests for catch up messages
      
      * grandpa: add tests for catch up message gossip validation
      
      * grandpa: integrate HistoricalVotes changes
      
      * grandpa: add test for neighbor packet triggering catch up
      
      * grandpa: add test for full voter catch up
      
      * grandpa: depend on finality-grandpa 0.8 from crates
      
      * granda: use finality-grandpa test helpers
      
      * grandpa: add PSM cost for answering catch up requests
      
      * grandpa: code style fixes
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * grandpa: more trailing commas
      
      * grandpa: lower cost of invalid catch up requests near set change
      
      * grandpa: process catch up sending on import of neighbor message
      
      * grandpa: add comments on HistoricalVotes
      
      * grandpa: use finality-grandpa v0.8.1 from crates.io
      
      * grandpa: fix test compilation
      968ff41f
    • Bastian Köcher's avatar
      Make `wasm-builder` less spammy (#3020) · 120d7269
      Bastian Köcher authored
      * Don't clutter the output that much
      
      * Support building from `crates` or from `path`
      
      * Upgrade the versions
      
      * Update `Cargo.lock`
      120d7269
    • cheme's avatar
      Update trie dependencies. (#3017) · 263af0ae
      cheme authored
      * Update trie dependencies.
      
      * bump rutime impl version.
      263af0ae
    • 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
    • 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
  9. 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
    • 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
  10. Jul 02, 2019
    • Tomasz Drwięga's avatar
      Persistent Local Storage for offchain workers. (#2894) · 0e90af17
      Tomasz Drwięga authored
      
      
      * WiP.
      
      * Implement offchain storage APIs.
      
      * Change compare_and_set to return bool.
      
      * Add offchain http test.
      
      * Fix tests.
      
      * Bump spec version.
      
      * Fix warnings and test.
      
      * Fix compilation.
      
      * Remove unused code.
      
      * Introduce Local (fork-aware) and Persistent storage.
      
      * Fix borked merge.
      
      * Prevent warning on depreacated client.backend
      
      * Fix long lines.
      
      * Clean up dependencies.
      
      * Update core/primitives/src/offchain.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Update core/primitives/src/offchain.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      0e90af17
    • Gavin Wood's avatar
      Initial mechanics for 80:20 fee split (#2912) · c3f6617d
      Gavin Wood authored
      
      
      * Initial mechanics for 80:20 fee split
      
      Also:
      - Introduce extra functions for Imbalance manipulation;
      - Store treasury pot in an account, letting total issuance account for
        it.
      
      * Fix some tests
      
      * Fix some tests
      
      * Minor cleanups
      
      * Update parity-codec version (#2855)
      
      * Update parity-codec version
      
      * Update grandpa, rhododendron and trie-bench
      
      * Use primitive-types from crates.io
      
      * Bump impl version
      
      * Fix trie-bench version
      
      * Fix lock files
      
      * Fix versions
      
      * Update codec to 4.1
      
      * merge fix
      
      * Revert merge
      
      * More reversions
      
      * Remove accidental code
      
      * Update locks
      
      * Bump runtime
      
      * Update locks
      
      * Tweaks and label TODO
      
      * Update srml/treasury/src/lib.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Update issue number
      
      * Update core/sr-primitives/src/traits.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Fix wasm build
      
      * Fix subkey build
      c3f6617d