1. 21 Oct, 2020 4 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
    • Hero Bird's avatar
      Fix lazy bug (#528) · 44a3f49e
      Hero Bird authored
      * [storage] make Lazy::laze constructor crate private
      
      * [storage] fix Lazy SpreadLayout impl behaving incorrectly when not used
      
      * [storage] remove redundant state replacement in StorageEntry::push_packed_root
      
      * [storage] add regression test for the fixed bug
      
      * [storage] clean up code between LazyCell and StorageEntry
      
      * [storage] apply rustfmt
      44a3f49e
    • 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
  2. 20 Oct, 2020 1 commit
  3. 09 Oct, 2020 5 commits
  4. 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
  5. 07 Oct, 2020 1 commit
    • Andrew Jones's avatar
      Deserialize metadata (#488) · d7a47f4a
      Andrew Jones authored
      * Make public fields for InkProject and specs
      
      * Make layout fields public
      
      * Use scale-info from branch
      
      * Add Deserialize derives, use ReadOnlyRegistry
      
      * Deserialize contract metadata specs
      
      * Deserialize layout2 specs
      
      * WIP decode hex
      
      * Use impl_serde crate for hex byte string serde
      
      * Test for selector deserialization
      
      * Fix up custom deserialization
      
      * Export selector and add to_vec impl
      
      * Fmt
      
      * Fix up spec segments IntoCompact
      
      * Make name public
      
      * Update to latest scale-info master
      
      * Replace pub fields with getters
      
      * Replace pub fields with getters in spec
      
      * Fix search replace error with any::TypeId
      
      * Use scale-info 0.4
      
      * Fmt
      
      * Remove commented out getter
      
      * Fix up other scale-info deps
      
      * Clippy
      
      * Fix up message and constructor spec builder method names
      
      * Serialize empty bytes vec without 0x prefix
      d7a47f4a
  6. 05 Oct, 2020 1 commit
  7. 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