1. May 10, 2019
  2. May 06, 2019
    • Gavin Wood's avatar
      Clean up random seed to make a bit more flexible (#2456) · adba8991
      Gavin Wood authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      
      
      * Reformulate random seed to be more random
      
      - First 80 random values come from cycling the incomplete series (
        instead of filling with zeroes)
      - Calculate random material each usage (use a single amalgamated
        ring buffer to store them for avoiding 81 lookups each time)
      - Mutate inputs by hashing each with:
        - its index (into the 81)
        - an additional "subject" key provided by caller
      
      This keeps the final output low-influence while still allowing
      it to be used as the seed to independent contexts. (Hashing the
      result to give the final seed is no better than using parent_hash).
      
      * Docs
      
      * Bump runtime
      
      * Update notes
      
      * Remove feature(alloc)
      
      * Update srml/system/src/lib.rs
      
      Co-Authored-By: default avatargavofyork <[email protected]>
      adba8991
  3. Apr 24, 2019
    • Bastian Köcher's avatar
      Forward port blake2 storage support (#2360) · f0862606
      Bastian Köcher authored
      
      
      * move storage maps to blake2_128 (#2268)
      
      * remove default hash, introduce twox_128 and blake2
      
      * use blake2_128 & create ext_blake2_128
      
      * refactor code
      
      * add benchmark
      
      * factorize generator
      
      * fix
      
      * parameterizable hasher
      
      * some fix
      
      * fix
      
      * fix
      
      * fix
      
      * metadata
      
      * fix
      
      * remove debug print
      
      * map -> blake2_256
      
      * fix test
      
      * fix test
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * impl twox 128 concat (#2353)
      
      * impl twox_128_concat
      
      * comment addressed
      
      * fix
      
      * impl twox_128->64_concat
      
      * fix test
      
      * Fix compilation and cleanup some docs
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarbkchr <[email protected]>
      f0862606
  4. Apr 23, 2019
    • Sergei Pepyakin's avatar
      Use serde `derive` feature. (#2351) · e2bb4297
      Sergei Pepyakin authored
      * core/primitives
      
      * sr-primitives
      
      * sr-primitives
      
      * srml-treasury
      
      * substrate-executor
      
      * substrate-keystore
      
      * network-libp2p
      
      * substrate-service
      
      * srml-system
      
      * substrate-rpc
      
      * sr-version
      
      * substrate-telemetry
      
      * substrate-test-runtime
      
      * substrate-transaction-pool
      
      * node-template-runtime
      
      * node-primitives
      
      * srml-consensus
      
      * srml-contract
      
      * srml-democracy
      
      * srml-finality-tracker
      
      * srml-grandpa
      
      * srml-metadata
      
      * srml-support
      
      * Clean
      
      * Update locks
      e2bb4297
  5. Mar 29, 2019
    • Kian Peymani's avatar
      Extended Balance Type for Staking's Election (#2134) · 958cc7ef
      Kian Peymani authored
      * First draft of extended balance type
      
      * Test cleanup.
      
      * Update staking docs.
      
      * Add a good failing test case for quintill
      
      * Bring back saturating.
      
      * Some final fixes
      
      * A few more.
      
      * Update wasm; Bump spec;
      
      * Re-bump.
      
      * Custom lossy conversion from currency to vote
      
      * remove print
      
      * Fix reverse conversion issue.
      
      * void. Re-trigger ci.
      958cc7ef
    • joe petrowski's avatar
      Convert all UK spelling to US (#2138) · 0ddcbf74
      joe petrowski authored
      * all the ise
      
      * forgot a misspelling
      
      * a few more replacements
      
      * bump impl
      
      * rollback and fixes
      
      * bump impl again
      
      * Add aliases for RPC
      
      * Update on_demand.rs
      0ddcbf74
  6. Mar 28, 2019
    • thiolliere's avatar
      storage doublemap in decl_storage (#1918) · f9d0da0a
      thiolliere authored
      * factorization
      
      * introduce GenericUnhashedStorage
      
      * implement generator and storage
      
      * impl double map in storage macro
      
      * improve StorageDoubleMapXX methods
      
      * remove storage from example and impl test
      
      * remove old comments
      
      * wasm compatible
      
      * improve imports
      
      * rename storages
      
      * update runtime impl version
      
      * make code less verbose
      
      * impl hash config for second key in double map
      
      hash available are all of Hashable trait
      
      * use double map in decl_storage for contract
      
      * fix double map config issue
      
      * add hasher into metadata
      
      * update impl version and build wasm
      
      * doc
      
      * add attrs
      
      * update metadata version
      
      * update runtime version
      
      * fix unused storage
      f9d0da0a
  7. Mar 19, 2019
  8. Mar 15, 2019
    • thiolliere's avatar
      Implement parameterisable modules (#1800) · d743a8b7
      thiolliere authored
      * first implementation
      
      * remove done comment
      
      * origin done
      
      * impl log for instance
      
      * impl inherent for instance
      
      * Fix wasm build + full example build
      
      this requires parity codec implements codec for core::marker::PhantomData
      
      * patch parity-codec link to github branch
      
      * improve internal names and fix instance prefix
      
      * Fix in macros
      
      * add test modules for support
      
      this allow to test for construct_runtime as well.
      
      The reason to have put that in another crate is:
      * if we put test in `tests/` dir of srml/support then decl_storage fails to get
        srml-support access because it believes it is inside srml-support
        crate and so derive access to `quote!{ crate }` but this is wrong
        (and I don't see any way to prevent that, and it only bother us so I
        don't think that matters that much)
      * if we put test inside lib.rs then contruct_runtime cannot be used
        because it call some macros that are defined with macros
        (decl_outer_event and decl_outer_origin) and thus rustc complains.
      
      * defaultinstance to its own struct to avoid errors
      
      * enforce <T, I> for Event and Config, impl test
      
      * add origin, log, inherent to test
      
      * test more code generation
      
      * basic storage test
      
      * fix typo
      
      * rename a few imports and field
      
      * delete wip test in example and runtime
      
      * change default prefix to make it backward compatible with test
      
      * rename Instance to I and Instantiable to Instance
      
      note: the name of generic parameter I is only enforce by decl_module!
      and this could be rewritten
      
      * doc
      
      * clean old TODOs
      
      * update parity-codec to 3.2
      
      * update node impl version + builds
      
      * fix warning
      
      * fix unrelated grandpa test
      
      * refactor code
      d743a8b7
  9. Mar 06, 2019
    • Bastian Köcher's avatar
      Update copyrights to 2019 (#1932) · 7927054f
      Bastian Köcher authored
      7927054f
    • Gav Wood's avatar
      Aggregate all liquidity restrictions in a single place (#1921) · ccc11974
      Gav Wood authored
      * Clean up session key rotation
      
      * Fix build
      
      * Bump version
      
      * Introduce feature to balances.
      
      * Move staking locking logic over to central point
      
      * ^^^ rest
      
      * First part of assimilation
      
      * More assimilation
      
      * More assimilation
      
      * Fix most tests
      
      * Fix build
      
      * Move Balances to new locking system
      
      * :q!
      
      * Bump runtime version
      
      * Build runtime
      
      * Convenience function
      
      * Test fix.
      
      * Whitespace
      
      * Improve type legibility.
      
      * Fix comment.
      
      * More tests.
      
      * More tests.
      
      * Bump version
      
      * Caps
      
      * Whitespace
      
      * Whitespace
      
      * Remove unneeded function.
      ccc11974
  10. Mar 05, 2019
    • Hero Bird's avatar
      Make use of parity-codec "derive" crate feature (#1919) · 128d164f
      Hero Bird authored
      * Make use of parity-codec "derive" crate feature
      
      * Bump impl_version
      
      * Update wasm files and Cargo.lock files
      
      * Transferred to parity_codec derive feature for the rest of the crates
      
      * Update wasm binaries and lock files
      
      * Update core and node wasm binaries
      128d164f
  11. Feb 18, 2019
    • Tomasz Drwięga's avatar
      Fix linked map for trait types and Option (#1809) · 9a2f1b20
      Tomasz Drwięga authored
      * Fix linked map for traits.
      
      * Fix Option<_> variant.
      
      *  Improve naming a tad
      
      * Rebuild runtime
      
      * Encapsulate private data in the inner module.
      
      * Bump impl version.
      
      * Fix deriving codec in srml-example.
      
      * Fix derivation without importing parity-codec-derive.
      
      * Fix config() for map.
      9a2f1b20
  12. Feb 13, 2019
    • Tomasz Drwięga's avatar
      EnumerableStorageMap (#1763) · 9e271024
      Tomasz Drwięga authored
      * Refactor decl_storage a bit to allow easier impl of linked map.
      
      * A bunch of refactorings for storage generation.
      
      - Rename StorageMap and ChildrenStorageMap to avoid confusion with generator::StorageMap.
      - Separate implementation from the procedural macro code to clean it up.
      - Make sure that genesis is initialised using the `StorageValue/StorageMap`
        generated implementations instead of going RAW.
      
      * WiP: Writing test.
      
      * Basic implementation.
      
      * Implement enumeration.
      
      * Fix non-std issues.
      
      * fix warning
      
      * Fix test-client.
      
      * Address review grumbles - part 1
      
      * Avoid cloning the key, relax Storage requirements.
      
      * Rebuild runtime.
      
      * Remove dangling todo.
      9e271024
  13. Feb 09, 2019
  14. Feb 08, 2019
  15. Feb 06, 2019
    • Bastian Köcher's avatar
      Moves `node-template` into substrate repo (#1637) · 567122fa
      Bastian Köcher authored
      * Make runtime macros work without required `macro_use`
      
      * Adds node-template
      
      * Adds node-template-release tool
      
      * Fixes building `node-template` and improve the release
      
      * Add `profile.release` by release script to remove warning
      
      * Adds script for releasing the node template
      
      * Fixes compilation after master merge
      
      * Port node-template to edition 2018
      
      * Remove license
      
      * Fixes compilation after master merge
      
      * Add `node-template-release.sh` into the CI
      
      * WIP Ci integrate node template (#1701)
      
      * copy artifacts to s3 bucket latest path
      
      * typo
      
      * bucket name
      
      * Update wasm files
      567122fa
  16. Feb 03, 2019
  17. Jan 30, 2019
    • cheme's avatar
      Merge metadata by module (#1428) · ea2a03b7
      cheme authored
      Clean up metadata format. Merge events metadata into runtime metadata. Remove low value info (internal macro identifier and counters).
      ea2a03b7
  18. Jan 24, 2019
    • Bastian Köcher's avatar
      Fix warnings in substrate (#1523) · 5be23703
      Bastian Köcher authored
      * Fix warnings in substrate
      
      * More warnings removed and wasm updated
      
      * Fixes error on stable and grumbles
      
      * Update wasm files
      
      * Add links to the github issue for replacing `error-chain`
      5be23703
  19. Jan 22, 2019
    • Bastian Köcher's avatar
      Rewrite Inherent data (#1488) · 70b1af7b
      Bastian Köcher authored
      
      
      * Implement new inherent data
      
      * Fixes compilation on wasm
      
      * Fixes after rebase
      
      * Switch back to generate inherent stuff by macro
      
      * Update after rebase
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarbkchr <[email protected]>
      
      * Fix compilation after rebase
      
      * Address grumbles
      
      * Remove `InherentDataProviders` from `Client`
      
      * Update wasm files after rebase
      
      * Address grumbles
      
      * Fixes compilation after latest merge
      
      * Last fix
      70b1af7b
  20. Jan 21, 2019
    • cheme's avatar
      Temporary fix for serde issue (#1511) · 8ec759d3
      cheme authored
      * Generate serde bound instead of relying on serde_derive.
      
      * remove comment
      8ec759d3
    • Bastian Köcher's avatar
      Make runtime api calls native when possible (#1302) · 010e6311
      Bastian Köcher authored
      * Add simple benchmark for the runtime api
      
      * Make the executor support native calls
      
      * Some documentation
      
      * Hide behind `feature = "std"`
      
      * Rework the native calls
      
      * Make all tests compile again
      
      * Make every parameter using the Block serialized/deserialized in the native call
      
      * Forward `UnwindSafe` requirement
      
      * Remove debug stuff
      
      * Add some documentation
      
      * Fixes warnings
      
      * Fixes errors after master rebase
      
      * Fixes compilation after master rebase
      
      * Fixes compilation after rebase
      010e6311
  21. Jan 11, 2019
  22. Jan 09, 2019
  23. 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
  24. Dec 10, 2018
  25. 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
  26. Nov 30, 2018
    • 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
  27. Nov 12, 2018
    • Luke Schoen's avatar
      docs: Extends #999. Remove disused package readmes. Rename to sr-metadata. Fix... · 037f9dde
      Luke Schoen authored
      docs: Extends #999. Remove disused package readmes. Rename to sr-metadata. Fix Readme Rustdoc names (#1016)
      
      * docs: Remove safe-mix since is no longer local dependency
      
      * docs: Fix existing packages link. Still only includes Substrate Core
      
      * docs: Remove empty package Readmes. Remove old docs links. Rename to Readme
      
      * docs: Remove link to old docs
      
      * misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names
      
      * Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory
      
      * Change example to use package name that opens all packages in RustDocs
      
      * Fix list of packages names that are available to open in RustDocs
      
      * fix typo
      
      * fix ordering of CLI options and add missing backslash
      037f9dde
    • Gav Wood's avatar
      Remove unneeded Serde requirements (#1076) · 57b28963
      Gav Wood authored
      * Remove superfluous serde requirements.
      
      * Try to ensure hash is serde
      
      * Fixups
      
      * Building again
      
      * Attempt to reenable Block (doesn't build)
      
      * Fixes compilation for node cli
      
      * Fixes test compilation
      
      * Fix wasm
      
      * Fix tests
      
      * Remove unneeded changes
      
      * Fix up comments
      
      * Reenable some code
      
      * Compile error when origin misused.
      
      * Remove unnecessary includes of `serde_derive`
      
      * Cleanups
      57b28963
  28. Oct 25, 2018
  29. Oct 18, 2018
    • Bastian Köcher's avatar
      Move inherent implementation into the modules (#924) · 4132a49f
      Bastian Köcher authored
      * Adds new `ProvideInherent` trait
      
      Also implements the new trait for `srml/consensus` and `srml/timestamp`.
      
      * Adds `impl_outer_inherent!` macro
      
      * Reexport macros from `alloc`
      
      * Introduce `RuntimeString` and fix `ProvideInherent` on `no_std`
      
      * Replace `VersionString` with `RuntimeString`
      
      * Improvements for `impl_outer_inherent!`
      
      * Make `construct_runtime!` support `impl_outer_inherent!`
      
      * Fixes after rebase
      
      * Whitespace
      4132a49f
  30. Oct 10, 2018
  31. Oct 05, 2018
  32. Oct 01, 2018
  33. Sep 27, 2018
  34. Sep 20, 2018
    • Bastian Köcher's avatar
      Replace JSON metadata with custom metadata structures (#766) · 5d64be26
      Bastian Köcher authored
      * Move module metadata from json string to custom metadata
      
      * Revisit the metadata structures
      
      1. Move the structures into the metadata crate.
      2. Switch to using Cow/MaybeOwnedArray to support Encode/Decode
      
      * Adapt to new metadata structures
      
      * Convert event json metadata to new metadata structures
      
      * Convert storage json metadata to new metadata structures
      
      * Convert runtime metadata from json to new metadata structs
      
      * Implements new metadata structures in client and runtime
      
      * Fixes errors on `no_std`
      
      * Fixes errors after rebasing master
      
      * Do not use `Cow` anymore in metadata
      
      Also replace `String` with our own type definition `StringBuf`.
      This fixes compilation on `no_std`.
      
      * Wrap `RuntimeMetadata` in `RuntimeMetadataVersioned` to support versioning
      
      * Move metadata into `srml` and make core unaware of the implementation
      5d64be26