1. Jul 29, 2019
  2. Jul 26, 2019
    • André Silva's avatar
      node: Update BABE protocol parameters (#3211) · cae69836
      André Silva authored
      * node: update babe parameters to target 6 second block time
      
      * node: add comment on MILLISECS_PER_BLOCK constant
      cae69836
    • André Silva's avatar
      Use milliseconds for timestamp resolution (#3210) · 3138dd6c
      André Silva authored
      
      
      * node: tabify constants file
      
      * node: define minimum period and slot duration in milliseconds
      
      * core: srml: use milliseconds for timestamp resolution
      
      * core: update slot_duration to millis in tests
      
      * node: bump spec_version
      
      * node: fix integration test
      
      * node: fix executor test
      
      * Update node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarKian Peymani <[email protected]>
      
      * node: fix docs on timestamp resolution
      
      * node: add docs on u64 for millis
      3138dd6c
  3. Jul 25, 2019
    • Michael Müller's avatar
      Handle local storage race conditions better (#3177) · 81c7f855
      Michael Müller authored
      * Make local_storage_compare_and_set take Option for old_value
      
      * Adapt srml/im-online to API changes
      
      * Bump version
      
      * Bump version again
      
      * Replace match
      81c7f855
    • André Silva's avatar
      srml: staking: track session index of current era start (#3203) · d4554b37
      André Silva authored
      * srml: staking: track session index of current era start
      
      * node: bump spec_version
      d4554b37
    • Kian Peymani's avatar
      Weight annotation. (#3157) · f9e5a374
      Kian Peymani authored
      
      
      * Make extrinsics extensible.
      
      Also Remove old extrinsic types.
      
      * Rest of mockup. Add tips.
      
      * Fix some build issues
      
      * Runtiem builds :)
      
      * Substrate builds.
      
      * Fix a doc test
      
      * Compact encoding
      
      * Extract out the era logic into an extension
      
      * Weight Check signed extension. (#3115)
      
      * Weight signed extension.
      
      * Revert a bit + test for check era.
      
      * Update Cargo.toml
      
      * Update node/cli/src/factory_impl.rs
      
      * Update node/executor/src/lib.rs
      
      * Update node/executor/src/lib.rs
      
      * Don't use len for weight - use data.
      
      * Operational Transaction; second attempt (#3138)
      
      * working poc added.
      
      * some fixes.
      
      * Update doc.
      
      * Fix all tests + final logic.
      
      * more refactoring.
      
      * nits.
      
      * System block limit in bytes.
      
      * Silent the storage macro warnings.
      
      * More logic more tests.
      
      * Fix import.
      
      * Refactor names.
      
      * Fix build.
      
      * Update srml/balances/src/lib.rs
      
      * Final refactor.
      
      * Bump transaction version
      
      * Fix weight mult test.
      
      * Fix more tests and improve doc.
      
      * Bump.
      
      * Make some tests work again.
      
      * Fix subkey.
      
      * Remove todos + bump.
      
      * First draft of annotating weights.
      
      * Refactor weight to u64.
      
      * More refactoring and tests.
      
      * New convert for weight to fee
      
      * more tests.
      
      * remove merge redundancy.
      
      * Fix system test.
      
      * Bring back subkey stuff.
      
      * a few stress tests.
      
      * fix some of the grumbles.
      
      * Final nits.
      
      * Update srml/system/src/lib.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Scale weights by 1000.
      
      * Bump.
      
      * Fix decl_storage test.
      f9e5a374
  4. Jul 24, 2019
    • André Silva's avatar
      Use BABE instead of AuRa in node (#3171) · 8b7d0fb9
      André Silva authored
      * babe: add babe module trait
      
      * babe: track current slot and epoch start slot
      
      * babe: implement ShouldEndSession based on epochs
      
      * babe: rename weight type to avoid ambiguities
      
      * babe: expose epoch start slot in Epoch digest
      
      * babe: use epoch start for validating epoch transitions
      
      * babe: make the epoch duration a parameter type
      
      * babe: remove unused fields from config
      
      * node: update runtime to use babe instead of aura
      
      * node: use babe instead of aura
      
      * core: generate sr25519 keys from seed and add to keystore
      
      * core: remove AuthorityKeyring
      
      * node: remove unused primitive types related to babe crypto
      
      * uniform babe primitives crate import name
      
      * wrap long lines
      
      * babe: fix find_epoch_digest
      
      * fork-tree: fix find_node_where
      
      * node: set babe epoch duration to "10 minutes"
      
      * babe: cleanup import key cache if authorities don't change
      
      * node: make integration test compile (but fail)
      
      * node: bump spec_version
      
      * node: fix import
      
      * babe: don't use constants in storage fields array sizes
      
      * babe: account for first epoch slot way in the past
      
      * babe: signal next epoch change (not current)
      
      * babe: calculate next epoch randomness with next epoch index
      
      * babe: track next epoch in node
      
      * babe: cache current epoch and authorities separately
      
      * babe: generate valid babe vrf proofs in integration test
      
      * babe: cleanup claim_slot
      
      * babe: perform threshold calculation according to spec
      
      * babe: compute relative weight in threshold
      
      * babe: more precise threshold calculation
      
      * babe: use floats for threshold exponent calculation
      
      * babe: update constant c
      8b7d0fb9
    • Bastian Köcher's avatar
      Expose instancing in metadata (#3188) · 7c8bd73c
      Bastian Köcher authored
      * Expose instancing in metadata
      
      - Introduces metadata v7
      - If a module is using instancing, the storage exposes the instance in
      metadata
      - Metadata module name is now the upper case one given to
      `construct_runtime!`
      
      * Remove obsolete macro
      
      * Just expose one prefix
      
      * Bump spec
      
      * Fix prefix generation
      7c8bd73c
    • thiolliere's avatar
      Staking rate targeting and specific rewards. (#2882) · 15ccaa46
      thiolliere authored
      * PNPoS implementation
      
      * wip: change staking api
      
      * code readibility
      
      * fix overflow
      
      * comment
      
      * license
      
      * doc
      
      * reorganize a bit
      
      * rename to proper english + doc
      
      * address comments
      
      * refactor unused mock
      
      * fix add_point
      
      * update tests
      
      * add not equalize to ci
      
      * Revert "add not equalize to ci"
      
      This reverts commit 1c61c258
      
      .
      
      * bring test back
      
      * update locks
      
      * fix genesis config
      
      * add authorship event handler + test
      
      * uncouple timestamp from staking
      
      * use on finalize instead
      
      * remove todo
      
      * simplify mock
      
      * address comment
      
      * doc
      
      * merge test
      
      * fmt
      
      * remove todo todo
      
      * move add_reward_point to regular function
      
      * doc
      
      * doc
      
      * increase version
      
      * doc and fmt
      
      * Update srml/staking/src/inflation.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Fix some doc typos
      15ccaa46
    • Bastian Köcher's avatar
      Switch `srml-session` keys to `decl_storage!` (#3184) · 8c1ed555
      Bastian Köcher authored
      * Switch `srml-session` keys to `decl_storage!`
      
      * Expose `DEDUP_KEY_PREFIX` in constants
      
      * Fix test
      
      * Bump spec version
      8c1ed555
  5. Jul 22, 2019
    • Gavin Wood's avatar
      Extensible transactions (and tips) (#3102) · 2b43a43d
      Gavin Wood authored
      * Make extrinsics extensible.
      
      Also Remove old extrinsic types.
      
      * Rest of mockup. Add tips.
      
      * Fix some build issues
      
      * Runtiem builds :)
      
      * Substrate builds.
      
      * Fix a doc test
      
      * Compact encoding
      
      * Extract out the era logic into an extension
      
      * Weight Check signed extension. (#3115)
      
      * Weight signed extension.
      
      * Revert a bit + test for check era.
      
      * Update Cargo.toml
      
      * Update node/cli/src/factory_impl.rs
      
      * Update node/executor/src/lib.rs
      
      * Update node/executor/src/lib.rs
      
      * Don't use len for weight - use data.
      
      * Operational Transaction; second attempt (#3138)
      
      * working poc added.
      
      * some fixes.
      
      * Update doc.
      
      * Fix all tests + final logic.
      
      * more refactoring.
      
      * nits.
      
      * System block limit in bytes.
      
      * Silent the storage macro warnings.
      
      * More logic more tests.
      
      * Fix import.
      
      * Refactor names.
      
      * Fix build.
      
      * Update srml/balances/src/lib.rs
      
      * Final refactor.
      
      * Bump transaction version
      
      * Fix weight mult test.
      
      * Fix more tests and improve doc.
      
      * Bump.
      
      * Make some tests work again.
      
      * Fix subkey.
      
      * Remove todos + bump.
      
      * Ignore expensive test.
      
      * Bump.
      2b43a43d
    • David Craven's avatar
      Refactors the offchain worker api (#3150) · 5453dd17
      David Craven authored
      * Update offchain primitives.
      
      * Update offchain worker.
      
      * Update im-online.
      
      * Update service.
      
      * Update node and node-template.
      
      * Update runtime version.
      
      * Fix build.
      
      * Fix offchain worker tests.
      
      * Generalize authority_pubkey.
      
      * Add test.
      
      * Update lib.rs
      5453dd17
  6. Jul 20, 2019
    • Michael Müller's avatar
      Introduce srml/im-online (#3079) · aa8c06a0
      Michael Müller authored
      
      
      * Fix grammar and typo
      
      * Extend network service
      
      * Extend offchain API
      
      * Support creating unsigned UncheckedExtrinsic
      
      * Introduce srml/im-online
      
      * Bump impl and spec version
      
      * Fix web-wasm test
      
      * Apply suggestions from code review
      
      Remove parity-multiaddr dependency
      
      Co-Authored-By: default avatarPierre Krieger <[email protected]>
      
      * Replace transmute with from_raw_parts
      
      * Replace PeerId.to_string() with .to_base58()
      
      Co-Authored-By: default avatarPierre Krieger <[email protected]>
      
      * Update Cargo.lock
      
      * Bump impl and spec version (again)
      
      It was updated in master in the meantime.
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarSergei Pepyakin <[email protected]>
      
      * Address comments
      
      * Add public function is_online_in_current_session()
      
      * Bump spec_version
      
      * Fix doc tests
      
      * Improve comments
      
      * Remove superfluous line
      
      * Name parameters consistently
      
      * Implement comments
      
      * Switch From to TryFrom
      
      * Use Vec instead of HashSet
      
      * Fix tests
      
      * Revert me: local testing
      
      * Fix check if already sent during session
      
      We gossip each session, hence we need to check
      if already sent in this session (not era).
      
      * Fix typos
      
      * Consistent terminology
      
      * Revert "Revert me: local testing"
      
      This reverts commit 73fbc29f.
      
      * Introduce IsMember trait
      
      * Implement misc comments
      
      * Remove unused function
      
      * Fix test
      
      * Fix external_addresses being written
      
      * Fix test
      
      * Add necessary trait bound
      
      * Do not increment version
      
      * Update lib.rs
      aa8c06a0
  7. Jul 19, 2019
    • Amar Singh's avatar
      Transaction Fee Multiplier (#2854) · afa58301
      Amar Singh authored
      
      
      * added fee calculations; need some type conversions
      
      * cleaned up make_payment and other stuff
      
      * rename vars to compile
      
      * add WeightToFee type
      
      * clean test files after new type added to balances
      
      * fmting
      
      * fix balance configs in tests
      
      * more fixing mocks and tests
      
      * more comprehensive block weight limit test
      
      * fix compilation errors
      
      * more srml/executive tests && started fixing node/executor tests
      
      * new fee multiplier; still overflows :(
      
      * perbill at the end attempt; needs to be changed
      
      * clean fmting, rename some vars
      
      * new PoC implementation.
      
      * test weight_to_fee range and verify functionality
      
      * 12 of 15 tests in node executor are passing
      
      * 1 test failing; big_block imports are failing for wrong reasons
      
      * Update srml/executive/src/lib.rs
      
      Co-Authored-By: default avatarKian Peymani <[email protected]>
      
      * Some cleanup.
      
      * consolidate tests in runtime impls
      
      * clean and condition executive for stateful fee range test
      
      * remove comments to self
      
      * Major cleanup.
      
      * More cleanup.
      
      * Fix lock files.
      
      * Fix build.
      
      * Update node-template/runtime/Cargo.toml
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Per-block update.
      
      * nit.
      
      * Update docs.
      
      * Fix contracts test.
      
      * Stateful fee update.
      
      * Update lock files.
      
      * Update node/runtime/src/impls.rs
      
      * Revamped again with fixed64.
      
      * fix cargo file.
      
      * nits.
      
      * Some cleanup.
      
      * Some nits.
      
      * Fix build.
      
      * Bump.
      
      * Rename to WeightMultiplier
      
      * Update node/executor/src/lib.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Add weight to election module mock.
      
      * Fix build.
      
      * finalize merge
      
      * Update srml/system/src/lib.rs
      
      * Bring back fees.
      
      * Some nits.
      
      * Code shifting for simplicity.
      
      * Fix build + more tests.
      
      * Update weights.rs
      
      * Update core/sr-primitives/src/weights.rs
      
      * Update lib.rs
      
      * Fix test build
      afa58301
    • André Silva's avatar
      srml: grandpa: Pause/resume current authority set (#3068) · 77d0cb24
      André Silva authored
      * grandpa: add pause/resume signals to runtime module
      
      * grandpa: add tests for srml pause/resume transitions
      
      * node: bump spec_version
      
      * Apply suggestions from code review
      
      * Update core/finality-grandpa/primitives/src/lib.rs
      
      * Update core/finality-grandpa/primitives/src/lib.rs
      77d0cb24
  8. Jul 17, 2019
  9. Jul 16, 2019
  10. Jul 13, 2019
  11. Jul 11, 2019
    • Gavin Wood's avatar
      Convert unnecessary storage item to static. (#3093) · f923ae2a
      Gavin Wood authored
      * Convert unnecessary storage item to static.
      
      * Polish
      
      * 6 second blocks.
      
      * Compile fixes
      
      * Bump runtime
      
      * Fix
      
      * Another fix
      
      * Import `srml_support::traits::Get`
      
      * Export MinimumPeriod from `decl_module!`
      
      * Remove `config` from Timestamp
      
      * Clean up warnings
      f923ae2a
  12. Jul 10, 2019
  13. 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
  14. 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
  15. 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
  16. 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
  17. Jul 02, 2019