1. Jul 09, 2019
    • André Silva's avatar
      srml: system: prune block hash mapping (#3062) · ef7587d9
      André Silva authored
      * srml: system: prune block number to hash mapping
      
      * srml: system: add test for block hash mapping pruning
      
      * node: bump runtime version
      
      * srml: system: wrap long line
      
      * srml: system: use parameter type for block hash count
      
      * srml: system: prune block hash mapping before storage root calculation
      
      * srml: system: keep the genesis hash in block number map
      ef7587d9
  2. Jul 08, 2019
    • 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
    • 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
  3. Jul 04, 2019
    • cheme's avatar
      Update trie dependencies. (#3017) · 263af0ae
      cheme authored
      * Update trie dependencies.
      
      * bump rutime impl version.
      263af0ae
    • 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
  4. Jul 03, 2019
    • 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
  5. Jul 02, 2019
    • asynchronous rob's avatar
      Fix periodic sessions and document behavior (#2974) · 5bf5e8f5
      asynchronous rob authored
      * Fix periodic sessions and document behavior
      
      * bump versions and test
      
      * Apply suggestions from code review
      
      * update docs
      
      * update docs again
      5bf5e8f5
    • 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
    • Jim Posen's avatar
      srml-contract: Validate that modules do not declare oversized tables. (#2969) · 4f73fe99
      Jim Posen authored
      * srml-contract: Validate that modules do not declare oversized tables.
      
      * Bump node runtime spec/impl versions.
      4f73fe99
    • Jim Posen's avatar
    • David Craven's avatar
      Turn storage items into parameters (#2883) · f835f9f6
      David Craven authored
      * balances: Turn storage items into parameters.
      
      * contract: Turn storage items into parameters.
      
      * council: Turn storage items into parameters.
      
      * finality-tracker: Turn storage items into parameters.
      
      * treasury: Turn storage items into parameters.
      
      * democracy: Fix tests.
      
      * example: Fix tests.
      
      * executive: Fix tests.
      
      * staking: Fix tests.
      
      * Update runtime.
      
      * Update template-node.
      
      * Update runtime version.
      
      * Fix executor tests.
      
      * Fix node cli tests.
      
      * Address grumbles.
      
      * Add removed default values to docs.
      
      * Make gas price a storage item.
      
      * Set associated consts must be callable outside of build.
      
      * Fix not enough gas to pay for transfer fee.
      
      * Fix build.
      
      * Emit metadata.
      
      * Fix build.
      
      * Add default values for all parameter types.
      
      * Fix build.
      
      * Fix build.
      
      * Fix build.
      
      * Fix build.
      f835f9f6
    • 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
  6. Jul 01, 2019
    • 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
  7. Jun 28, 2019
    • Kian Peymani's avatar
      Enable staking equalise. (#2886) · e5a71e54
      Kian Peymani authored
      * Enable equalise.
      
      * Bump.
      
      * Line-width
      
      * Add benchmarks for equalise.
      
      * Line-width
      
      * Re-trigger CI.
      
      * Fix test.
      
      * Some nits.
      
      * Rename.
      
      * Bump.
      e5a71e54
  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
  9. Jun 26, 2019
  10. Jun 25, 2019
  11. Jun 24, 2019
  12. Jun 21, 2019
  13. Jun 20, 2019
    • Sergey Pepyakin's avatar
      Ditch the input buffer (#2911) · dfcc0850
      Sergey Pepyakin authored
      * Pass input data via the scratch buffer.
      
      Remove calls to ext_input_*.
      
      * Fix tests and docs
      
      * Bump the version.
      
      * Remove ext_input_* from COMPLEXITY.md
      
      * Return back the length check and add more comments
      
      * Update the documentation of the scratch buffer.
      
      * Fix a silly mistake.
      dfcc0850
  14. Jun 19, 2019
  15. Jun 18, 2019
  16. Jun 17, 2019
  17. Jun 15, 2019
  18. Jun 14, 2019
    • Gavin Wood's avatar
      New sessions, kill consensus module (#2802) · dbf32262
      Gavin Wood authored
      
      
      * Draft of new sessions
      
      * Reintroduce tuple impls
      
      * Move staking module to new session API
      
      * More work on staking and grandpa.
      
      * Use iterator to avoid cloning and tuple macro
      
      * Make runtime build again
      
      * Polish the OpaqueKeys devex
      
      * Move consensus logic into system & aura.
      
      * Fix up system module
      
      * Get build mostly going. Stuck at service.rs
      
      * Building again
      
      * Update srml/staking/src/lib.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Refactoring out Consensus module, AuthorityIdOf, &c.
      
      * Refactored out DigestItem::AuthoritiesChanged. Building.
      
      * Remove tentative code
      
      * Remove invalid comment
      
      * Make Seal opaque and introduce nice methods for handling opaque items.
      
      * Start to use proper digest for Aura authorities tracking.
      
      * Fix up grandpa, remove system::Raw/Log
      
      * Refactor Grandpa to use new logging infrastructure.
      
      Also make authorityid/sessionkey static. Switch over to storing
      authorities in a straight Vec.
      
      * Building again
      
      * Tidy up some AuthorityIds
      
      * Expunge most of the rest of the AuthorityKey confusion.
      
      Also, de-generify Babe and re-generify Aura.
      
      * Remove cruft
      
      * Untangle last of the `AuthorityId`s.
      
      * Sort out finality_tracker
      
      * Refactor median getting
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Session tests works
      
      * Update core/sr-primitives/src/generic/digest.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Session tests works
      
      * Fix for staking from @dvc94ch
      
      * log an error
      
      * fix test runtime build
      
      * Some test fixes
      
      * Staking mock update to new session api.
      
      * Fix build.
      
      * Move OpaqueKeys to primitives.
      
      * Use on_initialize instead of check_rotate_session.
      
      * Update tests to new staking api.
      
      * fixup mock
      
      * Fix bond_extra_and_withdraw_unbonded_works.
      
      * Fix bond_with_little_staked_value_bounded_by_slot_stake.
      
      * Fix bond_with_no_staked_value.
      
      * Fix change_controller_works.
      
      * Fix less_than_needed_candidates_works.
      
      * Fix multi_era_reward_should_work.
      
      * Fix nominating_and_rewards_should_work.
      
      * Fix nominators_also_get_slashed.
      
      * Fix phragmen_large_scale_test.
      
      * Fix phragmen_poc_works.
      
      * Fix phragmen_score_should_be_accurate_on_large_stakes.
      
      * Fix phragmen_should_not_overflow.
      
      * Fix reward_destination_works.
      
      * Fix rewards_should_work.
      
      * Fix sessions_and_eras_should_work.
      
      * Fix slot_stake_is_least_staked_validator.
      
      * Fix too_many_unbond_calls_should_not_work.
      
      * Fix wrong_vote_is_null.
      
      * Fix runtime.
      
      * Fix wasm runtime build.
      
      * Update Cargo.lock
      
      * Fix warnings.
      
      * Fix grandpa tests.
      
      * Fix test-runtime build.
      
      * Fix template node build.
      
      * Fix stuff.
      
      * Update Cargo.lock to fix CI
      
      * Re-add missing AuRa logs
      
      Runtimes are required to know about every digest they receive ― they
      panic otherwise.  This re-adds support for AuRa pre-runtime digests.
      
      * Update core/consensus/babe/src/digest.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Kill log trait and all that jazz.
      
      * Refactor staking tests.
      
      * Fix ci runtime wasm check.
      
      * Line length 120.
      
      * Make tests build again
      
      * Remove trailing commas in function declarations
      
      The `extern_functions!` macro doesn’t like them, perhaps due to a bug in
      rustc.
      
      * Fix type error
      
      * Fix compilation errors
      
      * Fix a test
      
      * Another couple of fixes
      
      * Fix another test
      
      * More test fixes
      
      * Another test fix
      
      * Bump runtime.
      
      * Wrap long line
      
      * Fix build, remove redundant code.
      
      * Issue to track TODO
      
      * Leave the benchmark code alone.
      
      * Fix missing `std::time::{Instant, Duration}`
      
      * Indentation
      
      * Aura ConsensusLog as enum
      dbf32262
  19. Jun 12, 2019
  20. Jun 11, 2019
    • kaichao's avatar
      Make use of StorageHasher and HasherKind (#2836) · b1c50952
      kaichao authored
      * Make use of StorageHasher and HasherKind.
      
      * Use Storagehasher hasher function for key2 of double map.
      
      * Refactor to reuse hasher from implementation.
      
      * Bump up since there is srml changes.
      
      * Update metadata version.
      b1c50952
  21. Jun 07, 2019
    • Kian Peymani's avatar
      Enhanced Council. (#2407) · 84045689
      Kian Peymani authored
      * first --unclean-- working version of locks and weight decay
      
      * Refactor voter activity history.
      
      * Tuning offset calculation and tests
      
      * Remove print.
      
      * Configurable decay ratio.
      
      * Remove spaces.
      
      * Name for activity.
      
      * Fix some style
      
      * Re-write voters as chunked map-vec.
      
      * Adds panic todo.
      
      * Fix some of the grumbles.
      
      * Fix some of the grumbles.
      
      * Chunked approvals vector.
      
      * Introduce voter_index for set_approvas in favor of complexity.
      
      * Add a bit more docs
      
      * Add boolean approvals as scalar.
      
      * Some cleanups TODO removes.
      
      * enhance some error checking.
      
      * No more double_map
      
      * Combined voter info and fee.
      
      * Fix global tests
      
      * Bump.
      
      * Fix line length
      
      * Fix error message.
      
      * Kill As<T>.
      
      * Final fix.
      
      * _Further_ kill As.
      
      * Proper imbalance for fee.
      
      * Bump.
      
      * Fix spacing.
      
      * Update
      
      * Address grumbles.
      
      * Line width.
      84045689
  22. Jun 06, 2019
  23. Jun 05, 2019
    • Gavin Wood's avatar
      Sensible scheduling for referenda (#2753) · 9687db56
      Gavin Wood authored
      
      
      * Nonlinear locking and cleanups
      
      * Bump runtime version
      
      * Minor cleanup
      
      * Fix tests
      
      * Fix council tests
      
      * Fix flaw in turnout counting
      
      * Initial work on referendum schedules
      
      * Refactor council-democracy interface.
      
      * Fix build
      
      * Update srml/democracy/src/lib.rs
      
      Co-Authored-By: default avatarLuke Schoen <[email protected]>
      
      * Update srml/democracy/src/lib.rs
      
      Co-Authored-By: default avatarLuke Schoen <[email protected]>
      
      * Tests compile again
      
      * Tests!
      
      * Update todo
      
      * Fix build
      
      * Ensure votes arer not double-counted on member-transitions
      
      * Extra logic for normal council changes
      
      * Typo
      
      * A few grumbles addressed.
      9687db56
  24. Jun 04, 2019
    • Bastian Köcher's avatar
      Remove deprecated authorities function (#2785) · 94236e5d
      Bastian Köcher authored
      * Remove deprecated authorities function
      
      * Bump spec
      
      * Fixes compilation
      
      * Remove last piece
      94236e5d
    • Tomasz Drwięga's avatar
      JSON-RPC client generation (#2778) · e8739300
      Tomasz Drwięga authored
      * Bump jsonrpc & generate clients.
      
      * Initial version of JSON-RPC client.
      
      * Re-wort
      
      * Remove spurious `#[derive(Encode, Decode)]`
      
      They did not compile, since `Encode` and `Decode` are deliberately not
      implemented for `usize`.
      
      Fixes #2742.
      
      * Re-write rpc-client example.
      
      * Update to jsonrpc=12.0.0
      
      * Remove unnecessary import
      
      * Bump version.
      
      * Revert version bump.
      
      * Bump again.
      e8739300
    • DemiMarie-parity's avatar
      Add runtime support for `PreRuntime` and `Consensus` digests (#2757) · 46121f7c
      DemiMarie-parity authored
      * Try to fix runtime panic
      
      Does not work
      
      * Fix trivial typo
      
      * Add runtime support for `PreRuntime` and `Consensus` digests
      
      Fixes 6e253c89
      
      
      
      * Fix silly compile error.
      
      * Fix overly-long lines
      
      Also remove some in-progress code that would not wind up being useful
      anyway.
      
      * Respond to review comments
      
      * delete `unset RUSTC_WRAPPER` from scripts/common.sh
      * delete unnecessary `use aura::AURA_ENGINE_ID` from
        `node/runtime/src/lib.rs`
      * add comments explaining why `PreRuntime` and `Consensus` must be
        special-cased in `core/sr-primitives/lib.rs`
      * switch to using `$crate::rstd::marker::PhantomData` in
        `impl_outer_log!`
      * improve documentation of `DigestItem::Seal`
      
      * Fix compilation and add proof that we do not panic
      
      Also fix some warnings.
      
      * Apply suggestions from code review
      
      Mostly for readability
      
      Co-Authored-By: default avatarSergei Pepyakin <[email protected]>
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * $crate::rstd::marker::PhantomData → Default::default()
      
      The import is still needed, as `Default::default()` can’t be used in
      patterns.
      
      * Bump `spec_version`
      
      Also do some reformatting.
      46121f7c
    • Shawn Tabrizi's avatar
      Add support for tuples in `OnNewAccount` hook (#2765) · 2a2a6806
      Shawn Tabrizi authored
      
      
      * Add support for tuples in `OnNewAccount` hook
      
      * Bump impl version
      
      * Use `for_each_tuple` with `OnNewAccount` hook
      
      * Update `OnFreeBalanceZero` to also use `for_each_tuple`
      
      * Fix spelling/typo
      
      * Bump spec again
      
      * Update srml/support/src/traits.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update srml/system/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      2a2a6806