1. Aug 07, 2019
    • 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
  2. Aug 06, 2019
    • thiolliere's avatar
      Update to parity-scale-codec (#3232) · 4ed67e03
      thiolliere authored
      
      
      * WIP: update codec
      
      * WIP
      
      * compiling
      
      * WIP
      
      * rename parity-scale-codec to codec
      
      * WIP
      
      * fix
      
      * remove old comments
      
      * use published crates
      
      * fix expected error msg
      
      * bump version
      
      * fmt and fix
      
      * remove old comment
      
      * fix wrong decoding impl
      
      * implement encode like for structures
      
      * undo removal of old pending changes
      
      * trailingzeroinput
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * update codec
      
      * fmt
      
      * version is 1.0.0
      
      * show more error
      
      * fmt
      4ed67e03
  3. Jul 29, 2019
    • Kian Paimani's avatar
      Refactor sr_primitives. (#3214) · 79feb23a
      Kian Paimani authored
      * refactor sr_primitives.
      
      * Fix try build error.
      
      * Line-width
      
      * Ui test.
      
      * Final fixes.
      
      * Fix build again.
      
      * bring back ui test.
      
      * Fix unsigned import.
      
      * Another ui fix.
      
      * Also refactor substrate-primitives
      
      * Fix benchmarks.
      
      * Fix doc test.
      
      * fix doc tests
      79feb23a
  4. Jul 25, 2019
  5. Jul 24, 2019
  6. Jul 23, 2019
    • DemiMarie-parity's avatar
      BABE Epochs (#3028) · f78a7807
      DemiMarie-parity authored and asynchronous rob's avatar asynchronous rob committed
      
      
      * Add `epoch` field to `SlotInfo`
      
      * Add slot calculations
      
      * More work on epochs in BABE
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Typo: `/` not `%` for division
      
      * Delete useless `LastSlotInEpoch::put(false)`
      
      * Bump `spec_version`
      
      * Make test suite pass again
      
      * Implement BABE epoch randomness signing
      
      * Try to fix compilation
      
      Currently causes a stack overflow in the compiler
      
      * Fix rustc stack overflow
      
      * Add missing `PartialEq` and `Eq` implementations
      
      * Fix compile errors in test suite
      
      * Another silly compile error
      
      * Clone `epoch`
      
      * Fix compile error in benchmarks
      
      * Implement `clone` for `Epoch`
      
      * Merge master
      
      * AUTHORING TEST PASSES!!!
      
      * Fix compilation
      
      * Bump `spec_version`
      
      * Fix compilation
      
      * Fix compilation (again)
      
      * Remove an outdated FIXME
      
      * Fix run.sh and move it to scripts/
      
      * Delete commented-out code
      
      * Fix documentation
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Fix BABE initialization and refactor
      
      * Respond to review
      
      * typo
      
      * Remove useless data in `CheckedHeader::Deferred`
      
      * Remove `slot_number` from Epoch
      
      It is not needed, and only served to waste space and cause confusion.
      
      * Remove epoch from BABE digests
      
      * Move digest.rs to primitives
      
      * Fix incorrect warning names
      
      * Fix compile error
      
      * Consistent field naming for BABE digests
      
      * More compiler error fixex
      
      * Unbound variable
      
      * more compile errors
      
      * another compile error
      
      * Fix compile errors in runtime
      
      * another compile error
      
      * Another compile error
      
      * Fix wasm build
      
      * missing import
      
      * Fix more compile errors
      
      * yet another compile error
      
      * compile fix in test runtime
      
      * Fix and simplify the BABE runtime
      
      The BABE runtime was massively overcomplicated and also wrong.  It
      assumed it needed to:
      
      1. delay new authorities taking effect until the next epoch
      2. not delay emitting `Consensus` digests to mark epoch changes
      
      However, the first is handled by the `srml_session` crate, and the
      second is flat-out incorrect: `Consensus` digests take effect
      immediately.  Furthermore, `srml_babe` tried to duplicate the
      functionality of `srml_session::PeriodicSession`, but did it both
      clumsily and incorrectly.  Fortunately, the new code is simpler and far
      more likely to be correct.
      
      * Use `system` to get the test authorities
      
      The genesis block used by tests defines no authorities.  Only the test
      suite is affected.
      
      * Fix test runtime impl for BabeApi::epoch() with std
      
      * Fix compilation
      
      * Cached authorities are in the form of an epoch
      
      not a `Vec<AuthorityId>`.
      
      * `slots_per_epoch` is not fixed in general
      
      The BABE code previously assumed `slots_per_epoch` to be a constant,
      but that assumption is false in general.  Furthermore, removing this
      assumption also allows a lot of code to go away.
      
      * fix compile error
      
      * Implement epoch checker
      
      * Fix runtime compilation
      
      * fork-tree: add method for finding a node in the tree
      
      * babe: register epoch transitions in fork tree and validate them
      
      * fork-tree: add method for arbitrary pruning
      
      * Expose the queued validator set to SRML modules
      
      BABE needs to know not only what the current validator set is, but also
      what the next validator set will be.  Expose this to clients of the
      session module.
      
      * Bump hex-literal
      
      Hopefully this will fix the panic
      
      * babe: prune epoch change fork tree on finality
      
      * babe: validate epoch index on transition
      
      * babe: persist epoch changes tree
      
      * Fix compile error in tests
      
      * Fix compile error in tests
      
      * Another compile error in tests
      
      * Fix compilation of tests
      
      * core: move grandpa::is_descendent_of to client utils
      
      * babe: use is_descendent_of from client utils
      
      * babe: extract slot_number from pre_digest in import_block
      
      * Move BABE testsuite to its own file
      
      * Initial part of test code
      
      * Missing `WeightMultiplierUpdate` in test-runtime
      
      * bump `spec_version`
      
      * Add a test that a very bogus is rejected
      
      * Run the tests again
      
      * Fix compiler diagnostics
      
      * Bump `spec_version`
      
      * Initial infrastructure for mutation testing
      
      * Mutation testing of block import
      
      * babe: revert epoch changes in case of block import error
      
      * babe: fix logging target
      
      * babe: BabeBlockImport doesn't box inner BlockImport
      
      * babe: fix epoch check in block import
      
      * babe: populate authorities cache on block authorship
      
      * babe: remove unused functions
      
      * babe: use RANDOMNESS_LENGTH const
      
      * babe: remove unneeded config parameters
      
      * core: revert change to hex dependency version
      
      * cleanup gitignore
      
      * babe: add docs to aux_schema
      
      * babe: remove useless drops in tests
      
      * babe: remove annoying macos smart quotes
      
      * fork-tree: docs
      
      * fork-tree: add tests
      
      * babe: style
      
      * babe: rename randomness config variable
      
      * babe: remove randomness helper function
      
      * babe: style fixes
      
      * babe: add docs
      
      * babe: fix tests
      
      * node: bump spec_version
      
      * babe: fix tests
      f78a7807
  7. Jul 22, 2019
    • Gavin Wood's avatar
      Extensible transactions (and tips) (#3102) · 78bc5edc
      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.
      78bc5edc
    • David Craven's avatar
      Refactors the offchain worker api (#3150) · a3d19bae
      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
      a3d19bae
  8. Jul 20, 2019
    • Michael Müller's avatar
      Introduce srml/im-online (#3079) · c70b8144
      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 73fbc29ff3e5ed71d99436318260b4f007e837f4.
      
      * 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
      c70b8144