1. Aug 12, 2019
    • Gavin Wood's avatar
      Era change can be forced on and forced off (#3374) · c6834327
      Gavin Wood authored
      * Forcing can be on or off.
      
      * Add a testcase.
      c6834327
    • Gav Wood's avatar
      Revert "Forcing can be on or off." · 677aeca0
      Gav Wood authored
      This reverts commit dc35cabd.
      677aeca0
    • Gav Wood's avatar
      Forcing can be on or off. · dc35cabd
      Gav Wood authored
      dc35cabd
    • Jim Posen's avatar
      srml-contracts: Contract calls/instantiations to return exit statuses (#3320) · 215f6cc7
      Jim Posen authored
      * srml-contracts: Rename ext_scratch_copy to ext_scratch_read.
      
      This is to disambiguate from the next ext_scratch_write function.
      
      * Remove unnecessary OutputBuf and EmptyOutputBuf.
      
      * Replace VmExecError with a result type of custom structs.
      
      * Do not drop the scratch buffer on traps and regular returns.
      
      This just reduces the number of allocations required during nested
      contract calls and instantiations.
      
      * Semantics for returning a status code and data from contract calls.
      
      * Remove CallReceipt and InstantiateReceipt.
      
      With forthcoming changes to return data from instantiate calls, the two
      types of receipts become very similar to each other and to
      ExecReturnValue. Instead, replace them with ExecReturnValue and
      a regular 2-tuple in the case of instantiation.
      
      * Modify contract function signatures to allow returning status codes.
      
      * Introduce ext_sandbox_write runtime function.
      
      * Test all the things.
      
      * Bump node runtime spec version.
      
      * Style fixes.
      215f6cc7
  2. Aug 11, 2019
  3. Aug 09, 2019
    • Bastian Köcher's avatar
      Adds `--no-validator` CLI flag (#3348) · 14a70910
      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
      14a70910
  4. Aug 08, 2019
    • cheme's avatar
      Child storage tests and genesis fix. (#3185) · c36d2477
      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
      c36d2477
    • Jim Posen's avatar
      srml-contracts: Refactor away some duplication in runtime functions. (#3257) · 225c1b52
      Jim Posen authored
      * srml-contracts: Storage access micro-optimization.
      
      * srml-contracts: Refactor runtime functions to reduce duplication.
      
      * Bump node runtime impl version.
      225c1b52
    • Xiliang Chen's avatar
      add post_dispatch (#3229) · e4a92a91
      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
      e4a92a91
  5. Aug 07, 2019
    • Arkadiy Paronyan's avatar
      Set uncles inherent (#3317) · d6eb5dd8
      Arkadiy Paronyan authored
      * Include uncles
      
      * Filter missing uncles
      
      * Moved inherent registration to a new crate
      
      * Ignore invalid inherent encoding
      d6eb5dd8
    • Bastian Köcher's avatar
      Make `DefaultByte` implement `Send + Sync` (#3333) · 872173f0
      Bastian Köcher authored
      * Make `DefaultByte` implement `Send + Sync`
      
      * Update runtime version.
      872173f0
    • Andrew Jones's avatar
      Derive CompactAs for Perbill/mill/U128 (#3327) · 4f92dfaa
      Andrew Jones authored
      * Derive CompactAs for Perbill/mill/U128
      
      * Increment impl_version
      4f92dfaa
    • Gavin Wood's avatar
      Refactor key management (#3296) · ed61b1fd
      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.
      ed61b1fd
    • Bastian Köcher's avatar
      Update to schnorrkel `0.8.0` (#3267) · e2d9619d
      Bastian Köcher authored
      
      
      * Update to schnorrkel `0.8.0`
      
      * Increase `spec_version`
      
      * Bump schnorrkel to 0.8.3 (#3283)
      
      * Schnorrkel 0.8.1 (builds on bkchr upgrade branch)
      
      * Add tests for known hard/soft derivation values
      
      * Bump all schnorrkel versions
      
      * Flatten for easier inspection
      
      * 0.8.2
      
      * 0.8.3
      
      * Update subkey/Cargo.toml
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update `Cargo.lock`
      
      * 0.8.4
      
      * Fix cargo lock file.
      
      * Adding an error message for `NotMarkedSchnorrkel` as that was missing.
      Also fixing a typo, strage -> stage.
      e2d9619d
  6. Aug 06, 2019
  7. Aug 02, 2019
    • Sergey Pepyakin's avatar
      srml-contracts: Minor fixes to docs. (#3262) · 805cd6b0
      Sergey Pepyakin authored
      
      
      * Adjust documentation.
      
      * Bump impl_version.
      
      * Update srml/contracts/src/wasm/runtime.rs
      
      Co-Authored-By: default avatarHero Bird <[email protected]>
      
      * Remove incorrect doc.
      805cd6b0
    • André Silva's avatar
      node: use BABE predigest data to find authorship (#3293) · 3181e0cb
      André Silva authored
      * node: use BABE predigest data to find authorship
      
      * node: bump spec_version
      
      * babe: use u32 for authority index
      3181e0cb
    • cheme's avatar
      Trie simplification. (#2815) · ba281ecc
      cheme authored
      * switch to simple codec, trie broken for now
      
      * Actualy use trie_root_noext
      
      * align some hash, failing test on EMCH comment
      
      * Fix trie code over layout instead of hash, revert legacy code for legacy
      mainnet ??
      
      * stub behind LayOut
      
      * fix no_std
      
      * temp solution for legacy trie behind feature legacy-key in various crate
      
      * use remote project
      
      * rc client db need prefix
      
      * update trie deps
      
      * bum spec runtime version
      
      * Removing legacy as default.
      
      * Switch mode to non legacy.
      
      * bump runtime version
      
      * Remove legacy trie compatibility features.
      
      * fix warning
      
      * bump version
      
      * change hash on new test.
      
      * Move dependency (#11 trie PR) patched to a parity repo.
      Bench reverted to correct hasher.
      Some renaming and doc improvments.
      
      * ChildBitmap renaming to BitMap.
      
      * Renaming of LayOut to Layout.
      
      * formatting.
      
      * Removing abreviation such as _ix nb_ or bm.
      
      * Update deps and apply renaming 'Buff' -> 'Buffer'.
      
      * Align to latest trie crates naming changes.
      
      * Update trie dependency.
      
      * Update trie dependency.
      
      * change block_import test hash
      
      * update trie deps (trie use new scale codec but it does not seems to be
      an issue).
      
      * update to use latest trie version (no mgmt of multiple radix).
      
      * tabify
      
      * Restoring test to 10 000.
      
      * Use published crate, trie bench is currently down until publishing
      (require another pr to update version).
      
      * Update trie-bench.
      ba281ecc
    • Gavin Wood's avatar
      Check the genesis hash in transactions regardless of era. (#3286) · 22359681
      Gavin Wood authored
      * Check the genesis hash in transactions regardless of era.
      
      * Fix check-fees, too.
      
      * Undo.
      
      * Subkey supports new signing.
      
      * Remove unneeded type param.
      
      * Bump tx version
      
      * Build.
      
      * Another build fix
      
      * Build again
      
      * Cleanup
      
      * Another fix.
      
      * Fix
      
      * Fixes
      
      * 6 second blocks.
      
      * Fixes
      
      * Build fix
      
      * Fix
      
      * Fix.
      22359681
  8. Aug 01, 2019
  9. Jul 30, 2019
  10. Jul 29, 2019
  11. 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
  12. 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
  13. 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