1. 10 May, 2021 1 commit
    • Michael Müller's avatar
      Implement MVP for new off-chain testing engine (#712) · 1a19f937
      Michael Müller authored
      * Add `engine` crate
      
      * Add `env_types` crate
      
      * Adapt `env`, `lang` and `storage`
      
      * Adapt examples
      
      * Adapt CI
      
      * Symlink license and readme
      
      * Throw `TypedEncoded` out of `engine`
      
      * Improve Erc20
      
      * Bump versions to rc3
      
      * Fix clippy error: Manual implementation of `Option::map` (#717)
      
      * Implement comments
      
      * Fix yml
      
      * Improve structure
      
      * Add tests
      
      * Fix function signature
      
      * Get rid of `engine`s singleton
      
      * Revert instantiate stuff
      
      * Implement review comments
      
      * Make `Storage` non-generic
      
      * Improve API for emmitted events
      
      * Migrate to `panic_any`
      
      * Clean up import
      
      * Import `panic_any`
      
      * Implement comments
      
      * Fix param
      
      * Use type
      
      * Store balances in chain storage
      
      * Fix tests
      
      * Use individual storage per contract
      
      * Implement comments
      1a19f937
  2. 15 Apr, 2021 1 commit
    • Michael Müller's avatar
      Fix nightly clippy errors (#760) · c50f93ce
      Michael Müller authored
      * Fix `clippy:wrong_self_convention`
      
      error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
         --> crates/primitives/src/key.rs:172:21
          |
      172 |     pub fn to_bytes(&self) -> [u8; 32] {
          |                     ^^^^^
          |
          = note: `-D clippy::wrong-self-convention` implied by `-D warnings`
          = help: consider choosing a less ambiguous name
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
      
      error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
         --> crates/primitives/src/key.rs:186:29
          |
      186 |     fn to_bytes_be_fallback(&self) -> [u8; 32] {
          |                             ^^^^^
          |
          = help: consider choosing a less ambiguous name
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
      
      * Fix `clippy:branches_sharing_code` for `bitvec`
      
      error: all if blocks contain the same code at the end
         --> crates/storage/src/collections/bitvec/mod.rs:280:9
          |
      280 | /             *self.len += 1;
      281 | |             if value {
      282 | |                 self.last_mut()
      283 | |                     .expect("must have at least a valid bit in this case")
      284 | |                     .set()
      285 | |             }
      286 | |         }
          | |_________^
          |
          = note: `-D clippy::branches-sharing-code` implied by `-D warnings`
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
      
      * Fix `clippy:branches_sharing_code` for `stash`
      
      error: all if blocks contain the same code at the start
         --> crates/storage/src/collections/stash/mod.rs:308:9
          |
      308 | /         if prev_vacant == next_vacant {
      309 | |             // There is only one other vacant entry left.
      310 | |             // We can update the single vacant entry in a single look-up.
      311 | |             let entry = self
      ...   |
      315 | |                 .flatten()
      316 | |                 .expect("`prev` must point to an existing entry at this point");
          | |________________________________________________________________________________^
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
      
      * Add benchmark for "Fix `clippy:wrong_self_convention`"
      
      * Revert "Add benchmark for "Fix `clippy:wrong_self_convention`""
      
      This reverts commit 9fabbfd1.
      
      * Remove empty line
      c50f93ce
  3. 25 Mar, 2021 1 commit
  4. 12 Mar, 2021 1 commit
  5. 02 Mar, 2021 1 commit
    • Michael Müller's avatar
      Minor improvements (#710) · 2b3d47c7
      Michael Müller authored
      * Fix nightly clippy warning: `inconsistent_struct_constructor`
      
      * Provide suggestion for fixing unitialized execution context
      
      * Ensure consistent versioning
      
      * Fix typos
      2b3d47c7
  6. 04 Feb, 2021 2 commits
    • Michael Müller's avatar
      Evaluate migration of `SmallVec` to `min_const_generics` (#598) · 3d337f46
      Michael Müller authored
      * Get rid of `generic-array`
      
      * Remove comment
      
      * Fmt and get rid of feature flags
      
      * Include Vec
      
      * Make clippy happy
      
      * Add `into_inner` back in
      
      * Do not allocate heap memory
      
      * Use `array_init` for initializing
      
      * Revert me: Activate `const-generics` feature in `array-init`
      
      * Remove `feature(array_map)`
      
      * Remove feature flag, since it is now stable on nightly
      
      * Add feature `ink-unstable`
      
      * Put `LazyArray` behind `ink-unstable` feature
      
      * Remove newline
      
      * Allow dead code in `LazyArray` when `ink-unstable` missing
      
      * Remove unnecessary allow
      3d337f46
    • Michael Müller's avatar
      Add generalized collection fuzz testing (#601) · a50bf6d3
      Michael Müller authored
      * Add generalized collection fuzz testing
      
      * Use `StorageHashMap::FromIter`
      
      * Use `saturating_mul`
      
      * Update to new `quickcheck` API
      
      * Adopt year to 2021 in license
      
      * Implement suggestions from review
      a50bf6d3
  7. 03 Feb, 2021 1 commit
  8. 02 Feb, 2021 1 commit
    • Michael Müller's avatar
      Fix broken intra-doc links + add CI stage to test example docs (#606) · 7aaf4dcc
      Michael Müller authored
      * Fix broken intra-doc links
      
      * Fix doc link
      
      * Add CI stage to test example docs
      
      * Revert me: Provoke doc failures in example
      
      * Remove intra-crate link to non-dependency
      
      * Remove `--all-features`
      
      * Revert "Revert me: Provoke doc failures in example"
      
      This reverts commit 563bfeb3.
      
      * Prettify paragraph
      
      * Remove unnecessary imports
      
      * Revert "Remove unnecessary imports"
      
      This reverts commit 05207133
      
      .
      
      * Remove unnecessary imports
      
      * Remove `cfg(doc)` path resolution for doc comments
      
      * Improve language and formatting
      
      * Upgrade `scale` and `scale-info` for `rand-extension`
      
      * Make http link work
      
      * Remove `crate::` prefix from doc links
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      7aaf4dcc
  9. 28 Jan, 2021 1 commit
    • Andrew Jones's avatar
      Update to new scale-info and codec releases (#663) · 68318131
      Andrew Jones authored
      * Update to scale-info 0.5
      
      * Update TypeInfo manual impls
      
      * Update parity-scale-code to 2.0
      
      * Add Encode ?Sized bounds
      
      * Change type display name for Key custom TypeInfo impl
      
      * Add missing ?Sized constraint
      
      * Fmt
      
      * Missing ?Sized bound in example
      68318131
  10. 04 Jan, 2021 1 commit
  11. 02 Dec, 2020 1 commit
  12. 27 Nov, 2020 1 commit
    • Michael Müller's avatar
      Make `Lazy::Drop` always clear up all its storage (#597) · 2100fa7c
      Michael Müller authored
      * Make `Lazy::Drop` always clear up all its storage
      
      * Fix typo: yet ➜ get
      
      * Fix macro import
      
      * Make tests off-chain since they interact with storage now due to Drop
      
      * Make use of `REQUIRES_DEEP_CLEAN_UP`
      
      * Clear up all footprint cells
      
      * Fix typo: yet ➜ get
      
      * Fix case
      
      * Macro ➜ fn
      2100fa7c
  13. 17 Nov, 2020 1 commit
  14. 06 Nov, 2020 1 commit
  15. 27 Oct, 2020 1 commit
    • Michael Müller's avatar
      Fuzz after master merge + automatic issue creation. (#537) · 24235f09
      Michael Müller authored
      * Prefix fuzz tests
      
      * Fuzz extensively after master merge + create issue on failure
      
      * Do not fuzz on regular test runs
      
      * Migrate deprecated 'only' to 'rules'
      
      * Indent correctly
      
      * Fuzz each crate separately
      
      * Add feature ink-fuzz-tests to crates which are missing it
      
      * Increase QUICKCHECK_TESTS to 50k
      
      * Set timeout to 1h
      
      * Improve issue title + body
      
      * Revert "Set timeout to 1h"
      
      This reverts commit 5888abaf.
      
      * Revert "Add feature ink-fuzz-tests to crates which are missing it"
      
      This reverts commit e0ece29e.
      
      * Fuzz only crates which have the ink-fuzz-tests feature
      
      * Indent consistently with two spaces
      
      * Make GitLab CI linter happy
      
      * Create issue when at least one test fails
      24235f09
  16. 21 Oct, 2020 3 commits
    • Michael Müller's avatar
      [storage] Add some tests for storage primitives (#529) · 2c1904fe
      Michael Müller authored
      * [chores] Fix typo entitiy ➜ entity
      
      * [storage] Extract push_pull_works_for_primitive macro
      
      * [storage] Add tests for Tuple
      
      * [storage] Add tests for Option, Result, Box
      
      * [storage] Add tests for Array
      
      * [storage] Add fuzz tests for primitives
      
      * [chores] Fix typo
      
      * [storage] Add fuzz test for HashMap::defrag
      
      * [storage] Improve unit tests
      
      * [storage] Clarify TestResult::discard
      2c1904fe
    • Michael Müller's avatar
      [core] Optimization for storage2::BinaryHeap (#508) · 958dbc1c
      Michael Müller authored
      
      
      * BinaryHeap::new()
      
      * Failing FromIterator test
      
      * Dumb push impl
      
      * Dumb peek impl
      
      * Naive push implementation
      
      * Copy in some reference impls for inspiration
      
      * WIP: use storage2::Vec and implement pop
      
      * Fix sift_up
      
      * Fix sift_down
      
      * Test with heap from slice
      
      * Add pass through clear impl
      
      * Add storage trait impls
      
      * Add binary_heap bench, start experimentation
      
      # Conflicts:
      #	core/Cargo.toml
      
      * Add tests for push/pull from storage
      
      * Get basic bench working for pushing largest value
      
      * Fmt
      
      * Prevent storage from being cleared in test env
      
      * iter batched
      
      * Make inline setup to test consistency
      
      * Revert to iter_batch tests
      
      * Add populated cache benches
      
      * Fmt
      
      * Factor out bench push
      
      * Refactor benchmark loop on push
      
      * Configure warm-up and measurement times to improve consistency
      
      * Remove redundant test
      
      * Refactor push benches
      
      * Refactor push benches again
      
      * Add Pop benchmark
      
      * Fmt
      
      * Add some comments to the benchmarks
      
      * Remove some todos
      
      * Use iter_batched_ref
      
      * Fix pop benchmark name
      
      * Add test for worst case O(log n) push
      
      * Fmt
      
      * Add push test
      
      * Add peek and pop test
      
      * Fix up sift comments and log tests
      
      * Comments
      
      * Add Reverse wrapper type for min heaps
      
      * Fmt
      
      * Peek mut
      
      * Fmt
      
      * Add empty tests
      
      * Check complexity of pushing smallest value
      
      * Test drop clears cells
      
      * Fix stable build
      
      * Basic property test
      
      * Fix wasm build
      
      * Fmt
      
      * Derive Default, PartialEq, Eq
      
      * Add property test to feature
      
      * Fix doc links
      
      * Fmt
      
      * Remove commented out println
      
      * Avoid potential false positive
      
      * Add punctuation
      
      * Comments
      
      * Fmt
      
      * [core] Fix comment
      
      * [core] Remove unnecessary println
      
      * [core] Store two children in one Cell
      
      * [core] Add group_count() for fuzz tests
      
      * [core] Apply cargo fmt
      
      * [core] Fix imports for std env
      
      * [core] Improve comments describing read/write ops
      
      * [core] Improve feature switch
      
      * [core] Improve code readability
      
      * [core] Apply general comments
      
      * [core] Add group.exists() and make more use of Group API
      
      * [core] Major renaming
      
      * [core] Implement AlwaysPacked for Children
      
      * [core] Improve comments and panic messages
      
      * [core] Improve comments
      
      * [core] Improve comments
      
      * [core] Improve comments
      
      * [core] Improve comments
      
      * [core] Improve comments
      
      * [core] Improve comments
      
      * [core] Migrate children.exists() to children.is_empty()
      
      * [core] Fix children.is_empty()
      
      * [core] Bring back PackedLayout impl
      
      * Move binary_heap to crates
      
      * Make it compile
      
      * Fix up doc test and benches
      
      * Fmt
      
      * Fix license headers
      
      * [core] Improve Children API
      
      * [core] Use super instead of crate import
      
      * [core] Fix comments
      
      * [core] Rename Elements to ChildrenVector
      
      * [core] Fix comments
      
      * [core] Fix footprint
      
      * [core] Improve count()
      
      * [core] Move iterator to correct file
      
      * [core] Restrain visibility
      
      * [core] Fix comments
      
      * [core] Fix imports
      
      * [core] Rename ChildrenVector to ChildrenVec
      
      * [core] Improve imports
      
      * [storage] Use crate import instead of super
      
      * [storage] Remove some pub(super)
      
      * [storage] Add #[inline]
      
      * [storage] Rename push_to to insert
      
      * [storage] Add rational for child_count
      
      * [storage] Apply cargo fmt
      
      * [core] Give me back my blank line
      
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      958dbc1c
    • Andrew Jones's avatar
      [core] storage2::BinaryHeap (#481) · 75ad19a2
      Andrew Jones authored
      * BinaryHeap::new()
      
      * Failing FromIterator test
      
      * Dumb push impl
      
      * Dumb peek impl
      
      * Naive push implementation
      
      * Copy in some reference impls for inspiration
      
      * WIP: use storage2::Vec and implement pop
      
      * Fix sift_up
      
      * Fix sift_down
      
      * Test with heap from slice
      
      * Add pass through clear impl
      
      * Add storage trait impls
      
      * Add binary_heap bench, start experimentation
      
      # Conflicts:
      #	core/Cargo.toml
      
      * Add tests for push/pull from storage
      
      * Get basic bench working for pushing largest value
      
      * Fmt
      
      * Prevent storage from being cleared in test env
      
      * iter batched
      
      * Make inline setup to test consistency
      
      * Revert to iter_batch tests
      
      * Add populated cache benches
      
      * Fmt
      
      * Factor out bench push
      
      * Refactor benchmark loop on push
      
      * Configure warm-up and measurement times to improve consistency
      
      * Remove redundant test
      
      * Refactor push benches
      
      * Refactor push benches again
      
      * Add Pop benchmark
      
      * Fmt
      
      * Add some comments to the benchmarks
      
      * Remove some todos
      
      * Use iter_batched_ref
      
      * Fix pop benchmark name
      
      * Add test for worst case O(log n) push
      
      * Fmt
      
      * Add push test
      
      * Add peek and pop test
      
      * Fix up sift comments and log tests
      
      * Comments
      
      * Add Reverse wrapper type for min heaps
      
      * Fmt
      
      * Peek mut
      
      * Fmt
      
      * Add empty tests
      
      * Check complexity of pushing smallest value
      
      * Test drop clears cells
      
      * Fix stable build
      
      * Basic property test
      
      * Fix wasm build
      
      * Fmt
      
      * Derive Default, PartialEq, Eq
      
      * Add property test to feature
      
      * Fix doc links
      
      * Fmt
      
      * Remove commented out println
      
      * Avoid potential false positive
      
      * Add punctuation
      
      * Comments
      
      * Fmt
      
      * Move binary_heap to crates
      
      * Make it compile
      
      * Fix up doc test and benches
      
      * Fmt
      
      * Fix license headers
      75ad19a2
  17. 08 Oct, 2020 1 commit
    • Hero Bird's avatar
      Rename EnvTypes -> Env (and many other renamings) (#513) · 8edbfd28
      Hero Bird authored
      * [env] rename Env -> EnvBackend, TypedEnv -> TypedEnvBackend
      
      * [env] rename EnvError -> Error
      
      * [*] rename ink_env::EnvTypes -> Environment
      
      Namely rename:
      ink_env::EnvTypes -> Environment
      ink_env::DefaultEnvTypes -> DefaultEnvironment
      
      * [*] update cfg-if dependency 0.1 -> 1.0
      
      * [alloc] rename ink_alloc -> ink_allocator
      
      * [env] forgot to rename in lib.rs
      
      * [env, lang] fix some bugs with ink_env::EnvError -> Error renaming
      
      * [ci] adjust renaming of ink_alloc -> ink_allocator
      
      * [env] apply rustfmt
      
      * [lang/macro] re-enable disabled UI test
      
      * [examples] DNS: apply rustfmt
      
      * [examples] ERC-20, ERC-721: apply rustfmt
      8edbfd28
  18. 01 Oct, 2020 1 commit
    • Hero Bird's avatar
      Split ink_core crate into ink_env and ink_storage (#500) · cfe52e98
      Hero Bird authored
      * [*] split ink_core into ink_env and ink_storage
      
      The workspace does not yet compile!
      
      * [env] make compile again
      
      * [env] fix doc tests
      
      * [storage] make crate compile again
      
      * [env] fix some doc comment links
      
      * [README] flipper example: remove unused import
      
      * [storage/derive] fix compilation of generated code
      
      * [README] add ink_storage and ink_env doc links
      
      * [env, primitives, storage] fix docs
      
      * [lang] make compile again
      
      * [lang/codegen] use absolute paths in #[ink::test] proc. macro
      
      * [examples] make compile again
      
      * [*] apply rustfmt
      
      * [env] remove unneeded dependencies
      
      * [storage] remove all unneeded dependencies and crate features
      
      * [*] update outdated dependencies
      
      * [env, lang] remove unused dependencies
      
      * [*] fix comments
      
      * [*] fix some intra doc links
      
      * [ci] adjust to split ink_env and ink_storage crates
      
      * [ci] forgot to handle split ink_env and ink_storage in docs
      
      * [storage] fix fuzz tests
      
      * [examples] apply rustfmt
      
      * [examples] apply rustfmt (ERC-721)
      cfe52e98