1. Aug 17, 2019
  2. Aug 16, 2019
    • Bastian Köcher's avatar
      Move checks for renamed functions to `__check_reserved_function_names` (#3425) · a0f2e9b3
      Bastian Köcher authored
      * Move checks for renamed functions to `__check_reserved_function_names`
      
      * Fix trybuild test
      a0f2e9b3
    • Tomasz Drwięga's avatar
      Offences reporting and slashing (#3322) · 6cc44957
      Tomasz Drwięga authored
      
      
      * Remove offline slashing logic from staking.
      
      * Initial version of reworked offence module, can report offences
      
      * Clean up staking example.
      
      * Commit SlashingOffence
      
      * Force new era on slash.
      
      * Add offenders in the SlashingOffence trait.
      
      * Introduce the ReportOffence trait.
      
      * Rename `Offence`.
      
      * Add on_before_session_ending handler.
      
      * Move offence related stuff under sr-primitives.
      
      * Fix cargo check.
      
      * Import new im-online implementation.
      
      * Adding validator count to historical session storage as it's needed for slash calculations
      
      * Add a comment about offence.
      
      * Add BabeEquivocationOffence
      
      * GrandpaEquivocationOffence
      
      * slash_fraction and fix
      
      * current_era_start_session_index
      
      * UnresponsivnessOffence
      
      * Finalise OnOffenceHandler traits, and stub impl for staking.
      
      * slash_fraction doesn't really need &self
      
      * Note that offenders count is greater than 0
      
      * Add a test to ensure that I got the math right
      
      * Use FullIdentification in offences.
      
      * Use FullIndentification.
      
      * Hook up the offences module.
      
      * Report unresponsive validators
      
      * Make sure eras have the same length.
      
      * Slashing and rewards.
      
      * Fix compilation.
      
      * Distribute rewards.
      
      * Supply validators_count
      
      * Use identificationTuple in Unresponsivness report
      
      * Fix merge.
      
      * Make sure we don't slash if amount is zero.
      
      * We don't return an error from report_offence anymo
      
      * We actually can use vec!
      
      * Prevent division by zero if the reporters is empty
      
      * offence_forces_new_era/nominators_also_get_slashed
      
      * advance_session
      
      * Fix tests.
      
      * Update srml/staking/src/lib.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * slashing_performed_according_exposure
      
      * Check that reporters receive their slice.
      
      * Small clean-up.
      
      * invulnerables_are_not_slashed
      
      * Minor clean ups.
      
      * Improve docs.
      
      * dont_slash_if_fraction_is_zero
      
      * Remove session dependency from offences.
      
      * Introduce sr-staking-primitives
      
      * Move offence under sr_staking_primitives
      
      * rename session_index
      
      * Resolves todos re using SessionIndex
      
      * Fix staking tests.
      
      * Properly scale denominator.
      
      * Fix UnresponsivnessOffence
      
      * Fix compilation.
      
      * Tests for offences.
      
      * Clean offences tests.
      
      * Fix staking doc test.
      
      * Bump spec version
      
      * Fix aura tests.
      
      * Fix node_executor
      
      * Deposit an event on offence.
      
      * Fix compilation of node-runtime
      
      * Remove aura slashing logic.
      
      * Remove HandleReport
      
      * Update docs for timeslot.
      
      * rename with_on_offence_fractions
      
      * Add should_properly_count_offences
      
      * Replace ValidatorIdByIndex with CurrentElectedSet
      
      ValidatorIdByIndex was querying the current_elected set in each call, doing loading (even though its from cache), deserializing and cloning of element.
      
      Instead of this it is more efficient to use `CurrentElectedSet`. As a small bonus, the invariant became a little bit easier: now we just rely on the fact that `keys` and `current_elected` set are of the same length rather than relying on the fact that `validator_id_by_index` would work similar to `<[T]>::get`.
      
      * Clarify babe equivocation
      
      * Fix offences.
      
      * Rename validators_count to validator_set_count
      
      * Fix squaring.
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Docs for CurrentElectedSet.
      
      * Don't punish only invulnerables
      
      * Use `get/insert` instead of `mutate`.
      
      * Fix compilation
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update srml/offences/src/lib.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/babe/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Add aura todo.
      
      * Allow multiple reports for single offence report.
      
      * Fix slash_fraction calculation.
      
      * Fix typos.
      
      * Fix compilation and tests.
      
      * Fix staking tests.
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarLogan Saether <[email protected]>
      
      * Fix doc on time_slot
      
      * Allow slashing only on current era (#3411)
      
      * only slash in current era
      
      * prune journal for last era
      
      * comment own_slash
      
      * emit an event when old slashing events are discarded
      
      * Pave the way for pruning
      
      * Address issues.
      
      * Try to refactor collect_offence_reports
      
      * Other fixes.
      
      * More fixes.
      6cc44957
    • André Silva's avatar
      babe: Introduce secondary slots (Aurababeous) (#3380) · cb7527d2
      André Silva authored
      
      
      * babe: initial implementation of secondary slots
      
      * babe: validate secondary slot author
      
      * babe: implement weight based fork choice
      
      * babe: remove unused
      
      * aura: cleanup unused imports
      
      * babe: pass in parent weight when authoring and verifying
      
      * babe: use epoch randomness for picking secondary slot authors
      
      * babe: fix tests
      
      * babe: fix wasm build
      
      * babe: node-side code for disabling secondary slots
      
      * babe: allow enabling/disabling secondary slots from runtime
      
      * babe: fix test
      
      * babe: use blake2_256 for secondary slot assignment
      
      * babe: run block initialization in should_end_session
      
      * node: increase slot duration to 6s
      
      * babe: add docs
      
      * node: bump spec_version
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * babe: simplify secondary slot assignment calculation
      
      * babe: remove unnecessary comment
      
      * node: bump spec_version
      
      * babe: fix bad merge
      cb7527d2
    • Tomasz Drwięga's avatar
      Verify signature and session index during apply phase of im-online. (#3418) · 42fb0c7c
      Tomasz Drwięga authored
      * Verify signature and session index during apply phase of im-online.
      
      * Bump impl_version.
      
      * Add docs to SignedExtension
      42fb0c7c
    • Svyatoslav Nikolsky's avatar
      Fix light client synchronization on master (#3301) · 3825a21b
      Svyatoslav Nikolsky authored
      
      
      * value ranges in consensus cache
      
      * skip values in cache
      
      * read epoch0 + epoch1 data from genesis in babe
      
      * sync authorities + session validators at genesis
      
      * removed some debug printlns
      
      * fixed cache encoding
      
      * Revert "skip values in cache"
      
      This reverts commit ce451c32823aaa4b67d99ca5b58f1bf3984df4db.
      
      * Revert "value ranges in consensus cache"
      
      This reverts commit 9062f9434cddd14a01275ddbfcd904b04282e63b.
      
      * get rid of cache::AUTHORITIES in Babe
      
      * cleaning up
      
      * cleaning up
      
      * update spec version
      
      * lost changes
      
      * fixed tests
      
      * Update node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * fix once-per-block condition
      
      * fix standalone babe + temp_storage in BuildGenesis
      
      * fix benhes compilation
      
      * fixed comment
      
      * re-added light nodes to integration tests
      
      * finalize_with_ancestors from extra_requests
      
      * post-merge fix
      
      * aaand removed debug code
      
      * (another one)
      
      * fix warn in logs (do not call ForkTree::finalize twice for the same block)
      
      * sync digest.next_authorities with actual next authorities
      
      * more docs
      
      * reverting all commits affecting storage
      
      * also remove keys from babe trait
      
      * fixed warnings
      
      * post-merge fixes
      
      * reverted some redundant changes
      
      * reverted more changes
      3825a21b
    • André Silva's avatar
      session: add handler for genesis session (#3413) · d1dde7e0
      André Silva authored and Svyatoslav Nikolsky's avatar Svyatoslav Nikolsky committed
      * session: add handler for genesis session
      
      * node: bump spec version
      
      * aura: handle on_genesis_session
      
      * srml: make sure we don't re-initialize genesis authorities
      
      * session: fix mock
      
      * node: remove genesis authorities from chain spec
      
      * staking: fix mock
      
      * srml: don't initialize genesis authorities twice
      
      * aura: don't reinitialize genesis authorities
      
      * aura: fix runtime_io dependency
      
      * Bump runtime
      d1dde7e0
    • André Silva's avatar
      im-online: use new session keys (not upcoming session) (#3414) · 3590c9c3
      André Silva authored
      * im-online: use new session keys (not upcoming session)
      
      * node: bump spec_version
      
      * im-online: rename on_new_session queued validator set parameter
      3590c9c3
  3. Aug 15, 2019
  4. Aug 14, 2019
  5. Aug 13, 2019
  6. Aug 12, 2019
  7. Aug 11, 2019
  8. Aug 09, 2019
    • Bastian Köcher's avatar
      Adds `--no-validator` CLI flag (#3348) · c824c959
      Bastian Köcher authored
      * Implement `is_validator` for offchain-workers
      
      * Introduce `--no-validator` flag
      
      * Don't run babe/grandpa/im-online when `--no-validator` is given
      
      * Fixes compilation
      
      * Bump spec version
      
      * Improve error handling in executor
      
      * Add missing extern function
      
      * Revert making error public
      
      * Remove `--no-validator` CLI
      c824c959
  9. Aug 08, 2019
    • Logan Saether's avatar
      Fix documentation set_controller (#3340) · fe18b405
      Logan Saether authored
      The documentation for the `set_controller` function was copied from the function above it, however it does not do the same thing. Fixed the documentation to fit the correct description of what `set_controller` does.
      fe18b405
    • cheme's avatar
      Child storage tests and genesis fix. (#3185) · b0e1212d
      cheme authored
      * Using child storage, (srml-support only), test failing .
      
      * fix simple tests.
      
      * Enumerable by requiring owned struct (previous form only allow
      &'static).
      Broken tests are from genesis init.
      
      * implement for_child_keys_with_prefix
      
      * indent
      
      * clear_child_prefix fix.
      
      * clear_child_prefix fix 2.
      
      * fix for storage_impl, if/when allowing child and not child this could be
      reverted.
      
      * Fix lot of urlinked child genesis, still need to look upon actual
      genesis srml module code.
      Probably still a lot of broken code needing debugging.
      
      * switch well_known_key to their associated module child trie.
      Fix a genesis init (balance).
      Complete some testing.
      Comment some tests before using.
      
      * fixing test runtime child keys
      
      * latest commit fix broken genesis init
      
      * fix system balances child name.
      
      * Important fix: storage_root from test externalities need children (it is
      already the case for ext).
      
      * executive root with child calculation
      
      * Avoid empty trie on test ext.
      
      * Symetric removal of key for system.
      
      * commenting changes related tests.
      
      * Remove child module specifics.
      
      * fix issues.
      
      * fix some formatting
      
      * fix bench and bump runtime
      
      * Remove extend_storage_overlays, assimilate_storage do the same as is
      proper considering srml macro.
      
      * Fix warning for assimilate.
      
      * Removing kill as they do not impact any test cases.
      
      * Use tuple of storage map instead of two parameters. This changes the
      behavior of decl_storage genesis build closure (breaking api).
      
      * Do not use build storage before assimilate.
      
      * fix error
      
      * Update core/state-machine/src/backend.rs
      b0e1212d
    • Jim Posen's avatar
      srml-contracts: Refactor away some duplication in runtime functions. (#3257) · 0067b2d9
      Jim Posen authored
      * srml-contracts: Storage access micro-optimization.
      
      * srml-contracts: Refactor runtime functions to reduce duplication.
      
      * Bump node runtime impl version.
      0067b2d9
    • Xiliang Chen's avatar
      add post_dispatch (#3229) · 0f0df985
      Xiliang Chen authored
      * add post_dispatch
      
      * Update traits.rs
      
      * Update checked_extrinsic.rs
      
      * Update traits.rs
      
      * Update traits.rs
      
      * fix build issue
      
      * update runtime version
      
      * fix test build issue
      0f0df985
  10. Aug 07, 2019
    • Arkadiy Paronyan's avatar
      Set uncles inherent (#3317) · 58bd0d4c
      Arkadiy Paronyan authored
      * Include uncles
      
      * Filter missing uncles
      
      * Moved inherent registration to a new crate
      
      * Ignore invalid inherent encoding
      58bd0d4c
    • Bastian Köcher's avatar
      Make `DefaultByte` implement `Send + Sync` (#3333) · ea58b7c9
      Bastian Köcher authored
      * Make `DefaultByte` implement `Send + Sync`
      
      * Update runtime version.
      ea58b7c9
    • thiolliere's avatar
      Staking optimisation (#3300) · 556a9416
      thiolliere authored and asynchronous rob's avatar asynchronous rob committed
      * staking code api
      
      * doc + test
      
      * version bump
      
      * index fn
      
      * rename function
      
      * doc
      
      * adress comments
      
      * add complexity comment
      556a9416
    • Gavin Wood's avatar
      Refactor key management (#3296) · 1a524b82
      Gavin Wood authored
      
      
      * Add Call type to extensible transactions.
      
      Cleanup some naming
      
      * Merge Resource and BlockExhausted into just Exhausted
      
      * Fix
      
      * Another fix
      
      * Call
      
      * Some fixes
      
      * Fix srml tests.
      
      * Fix all tests.
      
      * Refactor crypto so each application of it has its own type.
      
      * Introduce new AuthorityProvider API into Aura
      
      This will eventually allow for dynamic determination of authority
      keys and avoid having to set them directly on CLI.
      
      * Introduce authority determinator for Babe.
      
      Experiment with modular consensus API.
      
      * Work in progress to introduce KeyTypeId and avoid polluting API
      with validator IDs
      
      * Finish up drafting imonline
      
      * Rework offchain workers API.
      
      * Rework API implementation.
      
      * Make it compile for wasm, simplify app_crypto.
      
      * Fix compilation of im-online.
      
      * Fix compilation of im-online.
      
      * Fix more compilation errors.
      
      * Make it compile.
      
      * Fixing tests.
      
      * Rewrite `keystore`
      
      * Fix session tests
      
      * Bring back `TryFrom`'s'
      
      * Fix `srml-grandpa`
      
      * Fix `srml-aura`
      
      * Fix consensus babe
      
      * More fixes
      
      * Make service generate keys from dev_seed
      
      * Build fixes
      
      * Remove offchain tests
      
      * More fixes and cleanups
      
      * Fixes finality grandpa
      
      * Fix `consensus-aura`
      
      * Fix cli
      
      * Fix `node-cli`
      
      * Fix chain_spec builder
      
      * Fix doc tests
      
      * Add authority getter for grandpa.
      
      * Test fix
      
      * Fixes
      
      * Make keystore accessible from the runtime
      
      * Move app crypto to its own crate
      
      * Update `Cargo.lock`
      
      * Make the crypto stuff usable from the runtime
      
      * Adds some runtime crypto tests
      
      * Use last finalized block for grandpa authority
      
      * Fix warning
      
      * Adds `SessionKeys` runtime api
      
      * Remove `FinalityPair` and `ConsensusPair`
      
      * Minor governance tweaks to get it inline with docs.
      
      * Make the governance be up to date with the docs.
      
      * Build fixes.
      
      * Generate the inital session keys
      
      * Failing keystore is a hard error
      
      * Make babe work again
      
      * Fix grandpa
      
      * Fix tests
      
      * Disable `keystore` in consensus critical stuff
      
      * Build fix.
      
      * ImOnline supports multiple authorities at once.
      
      * Update core/application-crypto/src/ed25519.rs
      
      * Merge branch 'master' into gav-in-progress
      
      * Remove unneeded code for now.
      
      * Some `session` testing
      
      * Support querying the public keys
      
      * Cleanup offchain
      
      * Remove warnings
      
      * More cleanup
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBenjamin Kampmann <[email protected]>
      
      * More cleanups
      
      * JSONRPC API for setting keys.
      
      Also, rename traits::KeyStore* -> traits::BareCryptoStore*
      
      * Bad merge
      
      * Fix integration tests
      
      * Fix test build
      
      * Test fix
      
      * Fixes
      
      * Warnings
      
      * Another warning
      
      * Bump version.
      1a524b82
    • Bastian Köcher's avatar
    • thiolliere's avatar
      Fix decl_storage map and linked_map for insert_ref (#3316) · 87e72d93
      thiolliere authored
      
      
      * test
      
      * fix
      
      * bumpd version
      
      * Update srml/support/procedural/src/storage/impls.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      87e72d93
  11. Aug 06, 2019
  12. Aug 02, 2019