1. Jan 17, 2019
  2. Jan 16, 2019
    • Gav Wood's avatar
      Split Indices module from Balances (#1404) · c9f047fe
      Gav Wood authored
      * Indices module
      
      * Remove indices stuff from balances
      
      * Rejob node, move Lookup into system.
      
      * Fix up some modules.
      
      * Fix democracy tests
      
      * Fix staking tests
      
      * Fix more tests
      
      * Final test fixes
      
      * Bump runtime versions
      
      * Assets uses compact dispatchers
      
      * Contracts module uses indexed addressing
      
      * Democracy has more compact encoding
      
      * Example now demonstrates compact eencoding
      
      * Sudo uses indexed address
      
      * Upgrade key also uses indexed lookups
      
      * Assets more compact types.
      
      * Fix test
      
      * Rebuild runtime, whitespace
      
      * Remove TOODs
      
      * Remove TODOs
      
      * Add a couple of tests back to balances.
      
      * Update lib.rs
      
      * Update lib.rs
      c9f047fe
  3. Jan 15, 2019
  4. Jan 14, 2019
  5. Jan 11, 2019
  6. Jan 10, 2019
  7. Jan 09, 2019
  8. Jan 08, 2019
    • Shawn Tabrizi's avatar
      Updating parking_lot dependencies to 0.7.1 (#1361) · c4010edb
      Shawn Tabrizi authored and Benjamin Kampmann's avatar Benjamin Kampmann committed
      c4010edb
    • Wei Tang's avatar
      Make AuthorityId generic (#1296) · 71d889b6
      Wei Tang authored and Benjamin Kampmann's avatar Benjamin Kampmann committed
      * BlockAuthorityId convenience type
      
      * Rename AuthorityId -> Ed25519AuthorityId to make it more precise
      
      * Generalize AuthorityId up to substrate-client
      
      * Fix in client-db
      
      * rename: BlockAuthorityId -> AuthorityIdFor
      
      * typo: should be digest item
      
      * Fix test-runtime authorityId mismatch
      
      One states that AuthorityId is u64 while the other states that it's Ed25519AuthorityId.
      
      * Fix more u64 - Ed25519AuthorityId mismatch
      
      * Fix compile of most of the srml modules
      
      * Continue to pin aura and grandpa with ed25519 and fix compile
      
      * Add MaybeHash trait
      
      * Fix node-runtime compile
      
      * Fix network tests
      71d889b6
  9. Jan 07, 2019
    • Gav Wood's avatar
      Invulnerabiity from slashing for certain validators (#1355) · 043831cf
      Gav Wood authored
      
      
      * Invulnerabiity from slashing
      
      * Update srml/staking/src/lib.rs
      
      Co-Authored-By: default avatargavofyork <[email protected]>
      043831cf
    • cheme's avatar
      Decl_storage macro : force traits. (#1317) · d271a464
      cheme authored
      * Missing trait def on two calls.
      
      Slight mcla refact on transfo.
      
      * Allways provide GenesisConfig even when useless (for runtime module
      export).
      
      * Revert "Allways provide GenesisConfig even when useless (for runtime module"
      
      This reverts commit 84a29bc592023d1ee107519c58693ec19dbde2d2.
      
      * Fix Vec usage (from rstd).
      d271a464
    • Luke Schoen's avatar
      Update SRML Council: prevent excess votes/computation (#1162) · cb524013
      Luke Schoen authored
      * fix: Add assertions to prevent excess votes and computation, and to end council seat election when no empty seats
      
      * Add assertion to prevent a vote from voters that provide a list of votes that exceeds the desired seats length, since otherise an attacker may be able to submit a very long list of `votes` that far exceeds the amount of candidates and waste more computation than a reasonable voting bond would cover. Added additional associated test that may be run with `cargo test -p srml-council`
      
      * Add assertion so expired council seats are not up for election when desired seat count changes during the voting period such that there are no longer any empty seats
      
      * Update comment to refer to `reporter` instead of `who` (target of inactivity), since the origin is the `reporter`
      
      * Update commment to refer more specifically to how many vote indexes, since `InactiveGracePeriod` is measured in vote indexes
      
      * Update comment for `ApprovalsOf` since previously the comment was a duplicate of the comment for `LastActiveOf`'s
      
      * Create variable to refer to `retaining_seats` to improve readability
      
      * Reference Notes: https://hackmd.io/nr6kPD2sR4urmljtvHs0CQ
      
      * WIP - length votes should be less than length candidates. pushing changes for reference so can fix
      
      * fix: Amount of candidate approval votes cannot exceed candidates amount. Candidates amount must be over zero.
      
      * Fix so that amount of candidate approval votes cannot exceed amount of candidates (instead of desired seats)
      
      * Add assertion to `set_approvals` such that amount of candidates to receive approval votes must be greater than zero. Add associated test
      
      * fix: Remove assertion preventing votes when empty seats is 0
      
      * review-fix: Replace with is_zero and add corresponding test
      
      * Update seats.rs
      
      * Update seats.rs
      cb524013
  10. Jan 06, 2019
  11. Dec 22, 2018
    • Bastian Köcher's avatar
      Make `deposit_event` work with none generic events (#1309) · d15cc633
      Bastian Köcher authored
      * Make `deposit_event` work with none generic events
      
      `fn deposit_event() = default` will now be used for none generic events
      `fn deposit_event<T>() = default` is now for generic events.
      
      * Update wasm files
      
      * Fixes some spelling mistakes
      
      * Update wasm and fix new module
      d15cc633
  12. Dec 21, 2018
    • Gav Wood's avatar
      Sudo module (#1315) · ef8b9465
      Gav Wood authored
      * Sudo module
      
      * Fix comment
      
      * Fix errors
      
      * Fix test
      
      * Update hashes
      
      * Final test fixes and build
      
      * Final hex change
      ef8b9465
  13. Dec 20, 2018
    • cheme's avatar
      Include default values in storage metadata (#1264) · 23634b6b
      cheme authored
      * Add a 'default' field to metadata. It contains code to generate the
      default value.
      
      * wasm update
      
      * Make 'default' field an `Option`
      
      * Boxed fn is not static, that won't be fine
      
      * static fn won't do it to as it cannot get T param, will try fat trait
      
      * Fat pointer over phantom data compatible with static instantiation
      
      * DecodeDifferent is cool, using it for decoding.
      
      * using once cell to do what would require copying lazy_static internals.
      
      * Remove cache when no_std (non compatible deps)
      
      * wasm bins update
      
      * Fuse tooling struct and enum derive.
      23634b6b
  14. Dec 19, 2018
  15. Dec 16, 2018
  16. Dec 14, 2018
    • Luke Schoen's avatar
      Update SRML Assets: add total supply query, refactor with specific tests (#1185) · b2ce2f4b
      Luke Schoen authored
      * Update SRML Assets: add total supply query, refactor with specific unit tests, update assertions
      
      * Add feature and tests to allow querying total supply
      
      * Add assertion and tests to ensure that transfer amount is greater than or equal to one unit
      
      * Replace broad `it_works` function test with various specific unit tests
      
      * Fix `destroy` function by moving assertion before the action
      
      * Fix typos `Transfered` should be `Transferred`, `requried` should be `required`
      
      * Reference: https://hackmd.io/nr6kPD2sR4urmljtvHs0CQ?view#Assets-Module
      
      * refactor: Order imports alphabetically
      
      * review-fix: Replace non-zero check with shorter equivalent
      
      * review-fix: Restore order of non-zero assertion and destroy account
      
      * Update lib.rs
      b2ce2f4b
  17. Dec 13, 2018
  18. Dec 12, 2018
  19. Dec 10, 2018
    • asynchronous rob's avatar
      Punish offline validators, aura-style (#1216) · 6299b42a
      asynchronous rob authored
      * make offline-reporting infrastructure more generic
      
      * add a listener-trait for watching when the timestamp has been set
      
      * prevent inclusion of empty offline reports
      
      * add test for exclusion
      
      * generate aura-offline reports
      
      * ability to slash many times for being offline "multiple" times
      
      * Logic for punishing validators for missing aura steps
      
      * stub tests
      
      * pave way for verification of timestamp vs slot
      
      * alter aura import queue to wait for timestamp
      
      * check timestamp matches seal
      
      * do inherent check properly
      
      * service compiles
      
      * all tests compile
      
      * test srml-aura logic
      
      * aura tests pass
      
      * everything builds
      
      * some more final tweaks to block authorship for aura
      
      * switch to manual delays before step
      
      * restore substrate-consensus-aura to always std and address grumbles
      
      * update some state roots in executor tests
      
      * node-executor tests pass
      
      * get most tests passing
      
      * address grumbles
      6299b42a
    • Gav Wood's avatar
      Governance: Voters put money where mouth is (#1183) · 66cbe232
      Gav Wood authored
      * Referendums only gett enacted after a delay; successful voters must
      lock funds up until enactment.
      
      * Build fixes.
      
      * Configurable council enact delay, fix test builds.
      
      * Fix spelling
      
      * Remove TODO
      66cbe232
    • cheme's avatar
      Allow spaces in types for decl_storage proc_macro (#1245) · 5f48493b
      cheme authored
      * Do not try to fix type display for metadata in rust.
      
      * Fix test (adding extra space (we can see it as a canary: if at some
      point quote got a better output the test will fail and js space removal
      could be remove)).
      5f48493b
    • Tomasz Drwięga's avatar
      Move pool maintainance to a background task. (#1236) · 507c13e3
      Tomasz Drwięga authored
      * Move pool maintainance to a background task.
      
      * Remove commented code.
      
      * Add issue number to TODOs
      
      * Fix warnings and tests.
      507c13e3
    • Bastian Köcher's avatar
      Make `decl_module` not require a return type for functions (#1230) · acf1b77b
      Bastian Köcher authored
      If no return type is specified, `Result` is added and
      `Ok(())` is returned by default.
      
      Closes: #1182
      acf1b77b
  20. Dec 09, 2018
    • cheme's avatar
      `decl_storage` as a proc_macro (#1176) · ed5b78ea
      cheme authored
      
      
      * `decl_storage` parsing of the macro (TODO change tool crate structure)
      
      * Start formatting, for now use inner macro.
      Still missing optional formating last part (genesis ...).
      
      * Calling extra genesis macro
      
      * decl_storage lines parsing.
      
      * genesis macro as quote (need some cleaning reorg)
      
      * dirty $crate substitute
      
      * proc crate reorg.
      
      * PR impl : skip usage of phantom data, it only applies in test and
      council (others required it).
      
      * Remaining macro of decl_storage, warning stringify behave sometime
      oddly.
      
      * Formatting code and some cleaning.
      
      * Include line parsing to main struct (cannot use existing macro anymore).
      
      * Remove genesis phantom data when there is already a field with type
      parameter.
      
      * Revert wasm files
      
      * Remove old version of `decl_storage`.
      
      * Fix false positive for phantom trait (additional type check on config
      build).
      
      * slight changes:
      - return token errors instead of panic
      - do not use useless intermediate vec
      
      * Update srml/support/procedural/tools/derive/src/lib.rs
      
      remove indent
      
      Co-Authored-By: default avatarcheme <[email protected]>
      
      * Switch iterations to fold, remove unused import.
      ed5b78ea
  21. Dec 04, 2018
  22. Dec 03, 2018
  23. Nov 30, 2018
    • Drew Stone's avatar
      Implement macro for session change trait over arbitrary tuples (limit 19) (#1177) · 2327b213
      Drew Stone authored
      * Implement macro for session change trait
      
      * Consolidate tuple macro into one
      2327b213
    • Bastian Köcher's avatar
      Rewrite `impl_runtime_apis!` and `decl_runtime_apis!` as proc-macro (#1174) · ed421c56
      Bastian Köcher authored
      
      
      * Rewrites `impl_runtime_apis!` macro as `proc-macro`
      
      * Adds some documentation
      
      * Require the `impl_runtime_apis` to use a path for accessing the trait
      
      * Make the runtime implement `GetNodeBlockType`
      
      * Moves first chunk of runtime api code into the `impl_runtime_apis` macro
      
      This also renames `ClientWithApi` into `RuntimeApi`.
      
      * Make `impl_runtime_apis` use `runtime` api version automatically
      
      * `decl_runtime_apis` automatically adds `Block: BlockT` as generic parameter
      
      * Remove function generic arguments in block builder api
      
      * Remove some unnused stuff from the `decl_runtime_apis` macro
      
      * Make `InherentData` working again
      
      * Make `impl_runtime_apis!` implement the `RuntimeApi` side as well
      
      * Make it compile again after rebasing with master
      
      * Split `sr-api-macros` into multiple files
      
      * Reimplement `decl_runtime_apis!` as proc_macro
      
      * Use `decl_runtime_apis!` for `Core` as well and improve error reporting
      
      * Adds documentation for `decl_runtime_apis!` and `impl_runtime_apis!`
      
      * Move some code
      
      * Adds compile fail tests
      
      * Adds a test and fixes some bugs
      
      * Make `impl_runtime_apis!` support `_` as parameter name
      
      * Fixes build errors with wasm
      
      * Wasm rebuild after master rebase
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarbkchr <[email protected]>
      
      * Addresses some grumbles
      
      * Adds test to ensure that method signatures need to match
      
      * New wasm files
      ed421c56
  24. Nov 21, 2018
    • asynchronous rob's avatar
      Minimal switch of substrate-node to GRANDPA /Aura (#1128) · 11fe84a7
      asynchronous rob authored
      
      
      * add beginnings of SRML grandpa library
      
      * get srml-grandpa compiling
      
      * tests for srml-grandpa
      
      * add optional session integration to grandpa SRML
      
      * start integration into node runtime
      
      * Allow extracting pending change from header digest
      
      * Make it compile on wasm
      
      * make tests compile again
      
      * Move Authority Key fetching into service, simplify service factory construction
      
      * Generalize Authority Consensus Setup system
      
      * Add Authority Setup Docs
      
      * Allow CLI params to be extensible
      
       - move params to structopts
       - split parsing and default command execution
       - add custom config to node
       - extended parsing of custom config
       - extending params via structop's flatten
      
      * Minor fixes on cli extension params:
       - added docs
       - re-add actual app name, rather than node-name
       - make strategy and subcommand optional
      
      * better cli params
      
      * synchronize GRANDPA and normal node authorities
      
      * Implement grandpa::network for gossip consensus
      
      * run_grandpa in Node
      
      * Fix missed merge error
      
      * Integrate grandpa import queue
      
      * more specific type def
      
      * link up linkhalf and import block
      
      * make grandpa future send
      
      * get compiling
      
      * Fix new params convention and license header
      
      * get it running
      
      * rebuild node runtime WASM
      
      * change logging level
      
      * Update node/cli/src/params.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/params.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Clean up and Fixme for mutable config
      
      * Move GrandpaService Integration into grandpa, feature gated but on per default
      
      * Fixing grandpa runtime module test
      
      * Update wasm runtime hashes for tests
      
      * GRANDPA: use post-header hash when logging scheduled changes
      
      * add an extra bit of logging to authorities
      
      * fixing missing constrain
      
      * remove old code
      
      * move `NewAuthorities` to an event in srml-grandpa
      
      * fix node-executor tests to use grandpa log
      
      * Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests
      
      * Update to latest wasm runtimes
      
      * address grumbles
      
      * address grumbles
      
      * only derive deserialize when using std
      
      * Clean up use of Deserialize
      11fe84a7
    • Gav Wood's avatar
      Remove unneeded bounds. (#1149) · 84da9d4a
      Gav Wood authored
      * Remove unneeded bounds.
      
      * Other wasm.
      84da9d4a
  25. Nov 20, 2018
  26. Nov 19, 2018
  27. Nov 18, 2018
    • Bastian Köcher's avatar
      Revert and redo #952 (#1133) · d149f335
      Bastian Köcher authored
      * Revert "Pruning changes trie without digests (#952)"
      
      This reverts commit 6f9a505f.
      
      * pruning changes tries without digests
      
      * u64::max_value()
      
      * Update wasm files and fix merge conflict
      
      * Fixes tests
      d149f335
  28. Nov 17, 2018