1. Aug 08, 2019
  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. Aug 02, 2019
  4. Aug 01, 2019
  5. 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
  6. Jul 16, 2019
    • Jim Posen's avatar
      Contract storage limit (#3126) · 768eb1af
      Jim Posen authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      * srml-contracts: Remove hard-coded code hashes from tests.
      
      This makes it easier to update existing and add new test Wasm modules.
      
      * Test maximum contract storage write size.
      
      * Implement storage value limit for contracts.
      
      * Bump node runtime spec version.
      768eb1af
  7. Jul 10, 2019
  8. Jun 27, 2019
    • Jim Posen's avatar
      srml-contract: Contract refactors (#2924) · 068d99d4
      Jim Posen authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      * srml-contract: Refactor away unnecessary Option.
      
      * srml-contract: Add assertion to gas_left test.
      
      * srml-contract: Refactor try_evict_or_and_pay_rent to make tests pass.
      
      * srml-contract: Add tests and comments for bugs in rent payment logic.
      
      * srml-contract: Minor cleanup using GasMeter constructor.
      
      * Bump node runtime impl version.
      068d99d4
  9. Jun 26, 2019
    • Jim Posen's avatar
      srml-contract: Fix Gas type to u64 (#2944) · 4c52aec2
      Jim Posen authored
      * srml-contract: Move gas costs from Config to Schedule.
      
      * srml-contract: Define Gas units fixed as u64.
      
      This removes Gas as a configurable type on the contracts Trait.
      
      * Bump node runtime spec/impl versions.
      4c52aec2
  10. Jun 21, 2019
  11. Jun 20, 2019
    • Sergey Pepyakin's avatar
      Ditch the input buffer (#2911) · 83d38815
      Sergey Pepyakin authored
      * Pass input data via the scratch buffer.
      
      Remove calls to ext_input_*.
      
      * Fix tests and docs
      
      * Bump the version.
      
      * Remove ext_input_* from COMPLEXITY.md
      
      * Return back the length check and add more comments
      
      * Update the documentation of the scratch buffer.
      
      * Fix a silly mistake.
      83d38815
  12. Jun 19, 2019
  13. May 23, 2019
  14. May 22, 2019
    • Gavin Wood's avatar
      Remove `As` (#2602) · 3860d7c8
      Gavin Wood authored
      
      
      * Start to remove the `As` bound on `SimpleArtithmetic`
      
      This just introduces standard numeric bounds, assuming a minimum of
      `u32`. Also included is a saturating from/into trait allowing ergonomic
      infallible conversion when you don't care if it saturates.
      
      * Remove As from Balances trait
      
      * Remove As from Aura module
      
      * Remove As from Babe module
      
      * Expunge `As` from contract
      
      * Council module
      
      * Democracy
      
      * Finality tracker
      
      * Grandpa
      
      * First bit of indices
      
      * indices
      
      * Line lengths
      
      * session
      
      * system
      
      * Staking
      
      * Square up all other uses of As.
      
      * RHD update
      
      * Fix build/test
      
      * Remove As trait
      
      * line widths
      
      * Remove final As ref
      
      * Update srml/staking/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update core/client/src/cht.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update core/client/db/src/light.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * whitespace
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Bring back u32 check for number on CLI
      3860d7c8
  15. May 14, 2019
    • Sergei Pepyakin's avatar
      Pass topics along with events (#2563) · d57f6f93
      Sergei Pepyakin authored
      * Introduce an IndexedEvent
      
      * Plumb topics through the Ext interface.
      
      * Add topics to ext_deposit_event
      
      * Charging for events.
      
      * Check the number of topics.
      
      * Check for duplicate topics.
      
      * Bump API version.
      
      * Move derive(*Eq) under test.
      
      * Use sorting for finding duplicates.
      d57f6f93
  16. Apr 30, 2019
    • thiolliere's avatar
      Contract accounting removal (#2230) · c7d9ca37
      thiolliere authored and Sergey Pepyakin's avatar Sergey Pepyakin committed
      
      
      * first partial implementation
      
      * update rent allowance
      
      * fmt
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * remove comments
      
      * reward surcharge claims
      
      * remove rent allowance in param + code_hash changed
      
      * Fix bug
      
      * fix tests
      
      * fmt
      
      * impl getter setter rent allowance
      
      * fmt
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * comments
      
      * doc + be->le
      
      * doc
      
      * doc
      
      * fix improve fast return
      
      * renamings
      
      * rename + COMPLEXITY
      
      * COMPLEXITY
      
      * add test
      
      * etrinsic claim surcharge delay configurable
      
      * comment addressed
      
      * move and rewrite of pay_rent
      
      * remove child trie
      
      * fmt
      
      * use derive
      
      * arithmetic operation
      
      * fix
      
      * fix storage root + checked_mul + test
      
      * WIP: test
      
      * WIP
      
      * add tests and fix
      
      * fmt
      
      * typo and doc suggestions
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * WIP
      
      * address some comments
      
      divide tests + some docs
      
      * use br_table
      
      * remove unused function
      
      * Bump the runtime version
      
      * insert_with
      
      * Add some comments.
      
      * Refactor
      
      * Shuffle and fix comments
      
      * More comment fixes.
      
      * dues limited
      
      * Add comment
      
      * Handicap
      
      * Docs.
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Coalesce block_passed in a block
      
      * Fix build
      
      * Paid → Ok
      
      * match → if
      
      * Imrpove handicap description
      c7d9ca37
  17. Apr 11, 2019
    • Andrew Jones's avatar
      Introduce `ext_println` to contract runtime (#2239) · 1e0c1d88
      Andrew Jones authored
      * Implement `ext_println` in contract runtime
      
      * Only allow contracts to import `ext_println` on dev chains
      
      * Configure dev chain to allow contracts with `ext_println`
      
      * Increment spec version
      
      * Docs
      
      * Rename config to the more specific enable_println
      1e0c1d88
  18. Apr 03, 2019
  19. Mar 28, 2019
  20. Mar 06, 2019
  21. Feb 09, 2019
  22. Feb 07, 2019
  23. 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
  24. Jan 24, 2019
  25. Jan 22, 2019
    • 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
  26. Jan 21, 2019
  27. Jan 19, 2019
  28. 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
  29. Dec 12, 2018
  30. 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
  31. Nov 05, 2018
  32. Oct 17, 2018
  33. Sep 24, 2018
  34. Sep 21, 2018
  35. Sep 15, 2018
  36. 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
  37. 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
  38. 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