1. Mar 26, 2019
    • joe petrowski's avatar
      Documentation for balances module (#1943) · 2ca08a95
      joe petrowski authored
      
      
      * comment updates
      
      * added rustdoc and readme
      
      * clarified LockableCurrency trait
      
      * Currency trait rustdocs
      
      * fixed typo
      
      * fixed suggestions round 1
      
      * UpdateBalanceOutcome docs (open for discussion)
      
      * rm description of enum, consolidation, rm ReclaimRebate
      
      * type clarification, examples overhaul, adoc formatting
      
      * adoc to md
      
      * format change for rustdoc
      
      * update links and fix typos
      
      * typos and links
      
      * updates according to comments
      
      * new example
      
      * small clarifications
      
      * trait implementation section
      
      * missing ```
      
      * small changes, ready for review
      
      * line width update
      
      * small tweaks
      
      * Update srml/balances/src/lib.rs
      
      Co-Authored-By: default avatarjoepetrowski <[email protected]>
      
      * Update srml/balances/src/lib.rs
      
      Co-Authored-By: default avatarjoepetrowski <[email protected]>
      
      * Update srml/balances/src/lib.rs
      
      Co-Authored-By: default avatarjoepetrowski <[email protected]>
      
      * Update srml/balances/src/lib.rs
      
      Co-Authored-By: default avatarjoepetrowski <[email protected]>
      
      * Update lib.rs
      
      * address review by thiolliere
      
      * remove common warning
      
      * Update docs
      
      * updated srml example
      2ca08a95
  2. Mar 22, 2019
  3. Mar 20, 2019
    • Gav Wood's avatar
      Introduce safe types for handling imbalances (#2048) · dcd77a14
      Gav Wood authored and asynchronous rob's avatar asynchronous rob committed
      * Be a little safer with total issuance.
      
      * PairT instead of _Pair
      
      * Remove rev causing upset
      
      * Remove fees stuff.
      
      * Fix build (including tests)
      
      * Update runtime, bump version
      
      * Fix
      
      * Handle gas refunds properly.
      
      * Rename identifier
      
      ala #2025
      
      * Address grumbles
      
      * New not-quite-linear-typing API
      
      * Slimmer API
      
      * More linear-type test fixes
      
      * Fix tests
      
      * Tidy
      
      * Fix some grumbles
      
      * Keep unchecked functions private
      
      * Remove another less-than-safe currency function and ensure that
      contracts module can never create cash.
      
      * Address a few grumbles and fix tests
      dcd77a14
  4. Mar 13, 2019
    • Gav Wood's avatar
      Overhaul crypto (Schnorr/Ristretto, HDKD, BIP39) (#1795) · d7fcf5dc
      Gav Wood authored
      * Rijig to Ristretto
      
      * Rebuild wasm
      
      * adds compatibility test with the wasm module
      
      * Add Ed25519-BIP39 support
      
      * Bump subkey version
      
      * Update CLI output
      
      * New keys.
      
      * Standard phrase/password/path keys.
      
      * Subkey uses S-URI for secrets
      
      * Move everything to use new HDKD crypto.
      
      * Test fixes
      
      * Ignore old test vector.
      
      * fix the ^^ old test vector.
      
      * Fix tests
      
      * Test fixes
      
      * Cleanups
      
      * Fix broken key conversion logic in grandpa
      
      CC @rphmeier
      
      * Remove legacy Keyring usage
      
      * Traitify `Pair`
      
      * Replace Ed25519AuthorityId with ed25519::Public
      
      * Expunge Ed25519AuthorityId type!
      
      * Replace Sr25519AuthorityId with sr25519::Public
      
      * Remove dodgy crypto type-punning conversions
      
      * Fix some tests
      
      * Avoid trait
      
      * Deduplicate DeriveJunction string decode
      
      * Remove cruft code
      
      * Fix test
      
      * Minor removals
      
      * Build fix
      
      * Subkey supports sign and verify
      
      * Inspect works for public key URIs
      
      * Remove more crypto type-punning
      
      * Fix typo
      
      * Fix tests
      d7fcf5dc
  5. Mar 06, 2019
  6. 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
  7. Feb 26, 2019
  8. Feb 21, 2019
  9. Feb 15, 2019
    • Xiliang Chen's avatar
      Transaction Fee Module (#1648) · fafffdb7
      Xiliang Chen authored
      * wip
      
      * Split bytes fee charging and charging by amount into different traits.
      
      * Move to edition 2018.
      
      * Implemented charge fee traits for fees module.
      
      * Implemented 'on_finalise' for fee module.
      
      * Updated fees finalize impl.
      
      * Renaming and documentation update.
      
      * Added overflow & underflow check for fee calculation.
      
      * Added mock and unit tests for fee module.
      
      * More unit tests for fees module.
      
      * Fixed srml-executive unit tests.
      
      * Remove transaction base/bytes fee from balances module, fix unit tests.
      
      * fix compile error
      
      * Fixed unit test.
      
      * Minor fixes.
      
      * Bump spec version.
      
      * Bump spec version.
      
      * Updated fees module and runtime wasm.
      
      * Fees module code style improvement; updated runtime wasm.
      
      * Bump spec and impl version.
      fafffdb7
  10. Feb 09, 2019
  11. Feb 08, 2019
  12. Feb 07, 2019
  13. Jan 30, 2019
    • Benjamin Kampmann's avatar
      Document more TODOs as tickets (#1418) · 15ae7cfe
      Benjamin Kampmann authored
      Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
      15ae7cfe
  14. Jan 24, 2019
  15. Jan 22, 2019
    • thiolliere's avatar
      compact param in calls (#1499) · 24929319
      thiolliere authored
      
      
      * impl #[codec(compact)] for param
      
      * update modules
      
      * test all and build runtime
      
      * Update srml/support/src/dispatch.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update srml/support/src/dispatch.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * delete wip comment
      
      * update param to use #[compact] instead of Cmpact<>
      
      * fmt
      
      * impl metadata
      
      * test metadata
      
      * add compact attr test
      
      * script buid
      
      * update test
      24929319
    • Sergei Pepyakin's avatar
      Dispatch Calls to other modules (#1473) · 58cd6530
      Sergei Pepyakin authored
      * WIP
      
      * Use system::Origin::Signed as an origin
      
      * Add a vm test for ext_dispatch_call
      
      * Take fee for dispatching a Call
      
      # Conflicts:
      #	node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm
      
      * Clean & Rebuild
      
      # Conflicts:
      #	node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm
      
      * Dispatch call test.
      
      * Rebuild the runtime.
      
      * Fix the length of the buffer.
      
      * Rebuild binaries.
      58cd6530
  16. Jan 17, 2019
    • Sergei Pepyakin's avatar
      Contracts module rejig (#1358) · c88b44f6
      Sergei Pepyakin authored
      
      
      * Move prepare under code.
      
      * Schedule update
      
      * CodeHash
      
      * create takes code_hash
      
      * pass mem def and use code in vm::execute
      
      * Actually save and load code
      
      * Use T::Hash as CodeHash
      
      * Explicit entrypoint name
      
      * Return code_hash and deposit an Event
      
      * Charge for deployed code with gas.
      
      * ImportSatisfyCheck and FunctionImplProvider
      
      * Progress.
      
      * Use new infrastructure for checking imports
      
      * Rename entrypoint to entrypoint_name
      
      * Use strings instead of a Error enum
      
      * Clean
      
      * WIP
      
      * Fix macro_define_env test.
      
      * Fix vm code tests.
      
      * Remove tests for now.
      
      * Fix borked merge
      
      * Fix build for wasm
      
      * fmt
      
      * Scaffolding for abstracting vm.
      
      * Hook up execution to exec layer.
      
      * Fix vm tests.
      
      * Use schedule directly in WasmLoader
      
      * Implement test language.
      
      * Add input_data test.
      
      * Max depth test
      
      * ext_caller
      
      * Simplify test.
      
      * Add TODO
      
      * Some tests and todos.
      
      * top_level
      
      * Clean.
      
      * Restore a couple of integration tests.
      
      * Add a few comments.
      
      * Add ext_address runtime call.
      
      * Deduplicate caller/self_account
      
      * Add not_exists test.
      
      * Change bool to TransferCause.
      
      * Add address tests.
      
      * Remove output_buf from parameter.
      
      * return from start fn.
      
      * Smart gas meter
      
      * Tracing
      
      * Fix prepare tests.
      
      * Code moving
      
      * Add ExecFeeToken
      
      * Use tokens everywhere.
      
      * Make it compile in no_std.
      
      * Lift all test requirements to TestAuxiliaries
      
      * A minor clean
      
      * First create tests
      
      * Remove unneeded TODO
      
      * Docs.
      
      * Code shuffling
      
      * Rename create → instantiate
      
      * Add test address.
      
      * Code shuffling
      
      * Add base_fee tests.
      
      * rejig the code
      
      * Add some comments
      
      * on_finalise comment
      
      * Move event deposit further
      
      * Update Cargo.lock
      
      * Use crates.io version of pwasm-utils
      
      * Format todo comments
      
      * Fix formatting
      
      * Comments
      
      * EmptyOutputBuf and OutputBuf split.
      
      * Restore code_hash
      
      * Fix node-executor.
      
      * Fix typo
      
      * Fix fmt
      
      * Update srml/contract/src/account_db.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/lib.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Line wraps
      
      * Wrapping macros
      
      * Add _ prefix
      
      * Grumbles
      
      * Doc updates.
      
      * Update srml/contract/src/wasm/mod.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/lib.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Add comment
      
      * Use saturation to signal overflow
      
      * Add prepare_test! macro
      
      * Require deploy function.
      
      * Add entry point tests
      
      * Add comment.
      
      * Rename code → code_cache to better describe
      
      * Get rid of weird match!
      
      * Recompile binaries
      
      * Add comments
      
      * refuse_instantiate_with_value_below_existential_deposit
      
      * Little fix
      
      * Make test more complete
      
      * Clean
      
      * Add integration test for instantiation
      
      * Rebuild runtime.
      
      * Add some tests.
      
      * Attach an issue to a TODO
      
      * Attach another issue
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/exec.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/exec.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Recompile node_runtime
      c88b44f6
  17. 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
  18. Jan 11, 2019
  19. 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
  20. Nov 12, 2018
    • Sergey Pepyakin's avatar
      srml-contract: Extract schedule (#1044) · 1f0f3c8f
      Sergey Pepyakin authored
      * Rename Config → Schedule.
      
      * Fetch and pass config.
      
      * Integrate config everywhere.
      
      * <<<E as Ext>::T as Trait> → <<E::T as Trait>
      
      * Update roots
      
      * Cache existential_deposit
      
      * Update COMPLEXITY.md
      
      * Update roots.
      1f0f3c8f
    • 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
  21. Oct 27, 2018
    • Benjamin Kampmann's avatar
      Consensus Engines Implementation: Aura (#911) · 50adea62
      Benjamin Kampmann authored
      * Generalize BlockImport
      
       - move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives
       - let Consensus provide  and  traits again
       - update consensus traits to latest development
       - implement traits on client::Client, test_client::TestClient
       - update RHD to use the new import_block API
      
      * Move ImportBlock into consensus-common
      * Send import notification in aura tests
      * Integrating aura into service
      * Make Signatures more generic
      * Aura Block Production with the given key
      * run aura on the thread pool
      * start at exact step start in aura
      * Add needed wasm blob, in leiu of better solutions.
      * Make API ids consistent with traits and bring upstream for sharing.
      * Add decrease_free_balance to Balances module
      * Encode `Metadata` once instead of two times
      * Bitops include xor
      * Upgrade key module.
      * Default pages to somewhat bigger.
      * Introduce upgrade key into node
      * Add `Created` event
      50adea62
  22. Oct 26, 2018
  23. Oct 23, 2018
  24. Oct 17, 2018
  25. Oct 16, 2018
    • Gav Wood's avatar
      Compact format for block number, nonce, balance (#910) · 8bc5242c
      Gav Wood authored
      * Try to make everything compact
      
      * Make `Clone` work
      
      * Fix
      
      * Move contracts and balances over to compact encoding
      
      * Session and timestamp are compact
      
      * Sataking uses compact numbers
      
      * Treasury now compact
      
      * Compact Democracy
      
      * Council is compact
      
      * Fix
      8bc5242c
  26. Oct 05, 2018
  27. Sep 27, 2018
  28. Sep 25, 2018
  29. Sep 15, 2018
  30. Sep 12, 2018
    • Gav Wood's avatar
      Phase 1 of repo reorg (#719) · 1e011625
      Gav Wood authored and Arkadiy Paronyan's avatar Arkadiy Paronyan committed
      * Remove unneeded script
      
      * Rename Substrate Demo -> Substrate
      
      * Rename demo -> node
      
      * Build wasm from last rename.
      
      * Merge ed25519 into substrate-primitives
      
      * Minor tweak
      
      * Rename substrate -> core
      
      * Move substrate-runtime-support to core/runtime/support
      
      * Rename/move substrate-runtime-version
      
      * Move codec up a level
      
      * Rename substrate-codec -> parity-codec
      
      * Move environmental up a level
      
      * Move pwasm-* up to top, ready for removal
      
      * Remove requirement of s-r-support from s-r-primitives
      
      * Move core/runtime/primitives into core/runtime-primitives
      
      * Remove s-r-support dep from s-r-version
      
      * Remove dep of s-r-support from bft
      
      * Remove dep of s-r-support from node/consensus
      
      * Sever all other core deps from s-r-support
      
      * Forgot the no_std directive
      
      * Rename non-SRML modules to sr-* to avoid match clashes
      
      * Move runtime/* to srml/*
      
      * Rename substrate-runtime-* -> srml-*
      
      * Move srml to top-level
      1e011625
  31. Sep 11, 2018
  32. Sep 10, 2018
    • Sergey Pepyakin's avatar
      Integrate contracts into substrate-demo runtime (#675) · 6c1b2c27
      Sergey Pepyakin authored
      * Introduce data and salt into ContractAddressFor
      
      * Accept salt arg in ext_create.
      
      * Integrate contracts into the demo runtime
      
      * Make libcontract compile to wasm
      
      * Remove salt parameter.
      
      This now is concern of userspace.
      
      * Rebuild binaries.
      6c1b2c27
  33. Sep 07, 2018
    • Gav Wood's avatar
      New extrinsic dispatch model (#678) · 761bc9f7
      Gav Wood authored
      * System and Balances switched to new call model
      
      * Fixed up executive for new pardigm
      
      * Consensus works with Origin
      
      * Timestamp ported over
      
      * Session now compatible
      
      * Ported staking
      
      * Treasury compatible
      
      * Expunge MaybeEmpty
      
      * Make democracy work
      
      * Council compatible
      
      * Remove some aux-dispatch stuff and fix balances
      
      * Rename aux -> origin, fix contracts
      
      * Fix test
      
      * Fix example
      
      * Update macro to remove superfluous cruft
      
      * Make work with new macro
      
      * Tests
      
      * Fix some tests
      
      * Tests
      
      * Fix grumbles
      
      * Final grumble
      761bc9f7
  34. Sep 05, 2018
  35. Sep 04, 2018
    • Gav Wood's avatar
      Introduce treasury and document (#646) · 7657a232
      Gav Wood authored
      * Introduce treasury and document
      
      * Revert bad changes
      
      * More reversions
      
      * Add example crate
      
      - Remove HasPublicAux
      - Rename Concrete -> Runtime
      
      * Actually commit stuff
      
      * Changes
      
      * Propagate block number in finalise.
      
      * Fix and build example
      
      * Fixes.
      
      * Fix compilation for treasury.
      
      * Fix the treasury test
      
      * Tests
      
      * Fix.
      
      * Fix tests
      
      * Fix a few grumbles
      
      * Fixes
      
      * Fix grumbles
      7657a232
  36. Sep 01, 2018
    • Sergey Pepyakin's avatar
      Contract runtime polishing (#601) · 73ad6734
      Sergey Pepyakin authored
      * Rename ext_transfer → ext_call
      
      There are several tests where gas was changed. This is due to shrinking
      the name and consequently a size of contracts.
      
      * Fix macros
      
      Specifically, make fixes that allows to use a function without arguments (apart from ctx).
      For example:
      
      ```rust
      ext_return_42(ctx) -> u32 => {
          Ok(42)
      }
      ```
      
      Also, add impl ConvertibleToWasm for u64.
      
      * Implement passing input data buffer from top-level
      
      This allows the transaction initiator to pass some input data that can be accessed from the executed contract.
      
      However, this only works for the top-level contract. The contract still cannot pass input data to the callee contract. The reason for that is that API doesn't support this presently.
      This will be addressed in the following commits.
      
      * Input data passing thru `ext_call`
      
      `ext_call` now takes a buffer (or more specifically, pointer  to the start of and size of a buffer).
      
      This allows contracts to pass input data while calling into other contracts.
      
      * Input data passing thru `ext_create`
      
      Same as previous commit but for `ext_create`.
      
      * Trap on decoding error instead of panicking
      
      * Don't cascade failure in ext_call
      
      Instead, if callee doesn't complete successfuly, return a non-zero status code.
      
      This will prevent cascading traps up to the top-level. Due to this some tests were altered so that they now expect successful transfer instead of a failure.
      
      * Don't cascade failure in ext_create
      
      Same as previous commit but for ext_create.
      
      * Specify how much gas to allot for a call
      
      * Specify how much gas to allot for a create
      
      * Update tests.rs
      73ad6734
  37. Aug 30, 2018
    • Gav Wood's avatar
      Separate out staking module into balances and payment (#629) · 8281618e
      Gav Wood authored
      * Initial commit.
      
      * Split out balances module
      
      * Minimise Balances trait requirements
      
      * Fix up balances, remove balances stuff from staking
      
      * Split off and fix up staking module
      
      * Fix executive tests
      
      * Fix up democracy module
      
      * make council work again
      
      * Remove unneeded cruft from democracy
      
      * Fix up contract module
      
      * Fix up rest of tests
      
      * Fix minor TODOs
      
      * Fix tests
      
      * Remove superfluous code
      
      * Move offline inherents to consensus module.
      
      Fixes #630
      
      * Version needs Decode.
      
      * Move Decode back
      
      * Fix nits
      
      * Refactor to allow custom message
      8281618e