Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage rework #1217

Closed
wants to merge 63 commits into from
Closed

Commits on Apr 11, 2022

  1. Added and implemented all primitives of a new storage. Implemented `s…

    …torage_item` macro to generate implementation of all traits and use a right storage types for `StorageMapping` and `StorageValue`.
    xgreenx committed Apr 11, 2022
    Configuration menu
    Copy the full SHA
    b7a2e81 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2022

  1. Configuration menu
    Copy the full SHA
    2c06fcc View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2022

  1. Refactored StorageLayout.

    Erc20 and Erc1155 works with a new storage. The size reduced ~550 bytes
    xgreenx committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    992706e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17b433a View commit details
    Browse the repository at this point in the history
  3. BE looks better than LE=)

    xgreenx committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    09fb544 View commit details
    Browse the repository at this point in the history
  4. Fix comment

    xgreenx committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    184c550 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Removed all storage collections

    Removed all lazy stuff except `StorageMapping` and `StorageValue`. Later I will rename `StorageMapping` into `Mapping`.
    Removed `AtomicStatus` trait. Instead of it added `is_atomic!` macro that returns true if the object implements `AtomicGuard<true>`. It solves the problem when the struct contains generics. Now if the generic is marked as `AtomicGuard<true>` then the struct is atomic too, else it is not atomic.
    Implemented `#[ink_lang::storage_item]` for structs, enums, and unions.
    Started cleaning of the `SpreadLayout` and other stuff. The dispatching codegen already works without it.
    xgreenx committed May 6, 2022
    Configuration menu
    Copy the full SHA
    58c21ac View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/storage/src/lazy/mapping.rs
    #	crates/storage/src/traits/optspec.rs
    xgreenx committed May 6, 2022
    Configuration menu
    Copy the full SHA
    2a1dea4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5644402 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2022

  1. Removed SpreadLayout and all related stuff and traits.

    Created derives for a new traits.
    Added tests for derive.
    Added experimental `StorageType2` and auto-selecting of the storage key.
    Updated `storage_item` to be configurable and allow disabling auto derive for manual implementation.
    xgreenx committed May 9, 2022
    Configuration menu
    Copy the full SHA
    7e4b56d View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Updated all examples to use the latest changes.

    Added `OnCallInitializer` with `pull_or_init!` for upgradeable case.
    Renamed `StorageMapping` -> `Mapping`.
    Added some comments adn updated tests.
    xgreenx committed May 11, 2022
    Configuration menu
    Copy the full SHA
    4ab1b5f View commit details
    Browse the repository at this point in the history

Commits on May 12, 2022

  1. Removed StorageType2. StorageType is used everywhere now.

    Fixed tests. Added tests for `StorageType`. Updated comments.
    Renamed `AutomationStorageType` into `AutoStorageType`
    xgreenx committed May 12, 2022
    Configuration menu
    Copy the full SHA
    76c50ee View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/storage/src/collections/vec/tests.rs
    xgreenx committed May 12, 2022
    Configuration menu
    Copy the full SHA
    750bce2 View commit details
    Browse the repository at this point in the history
  3. Make clippy happy

    xgreenx committed May 12, 2022
    Configuration menu
    Copy the full SHA
    e8bf915 View commit details
    Browse the repository at this point in the history
  4. Make clippy happy.

    Added comments.
    xgreenx committed May 12, 2022
    Configuration menu
    Copy the full SHA
    6f868fb View commit details
    Browse the repository at this point in the history
  5. Update comment

    xgreenx committed May 12, 2022
    Configuration menu
    Copy the full SHA
    b74b9fd View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

  1. Unified metadata and storage key generation. The metadata contains al…

    …l names that are used during the calculation of the storage key. The updated key calculation for tuples.
    
    Introduced `StorageKeyComposer` to manage all rules for storage creation.
    Used a `SHA2` instead of `Blake2b` to calculate the storage key hash. It is because `SHA2` supports const calculation. It is required for tuples.
    Implemented UI tests for `#[ink_lang::storage_item]` and fixes bugs.
    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    02f478f View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	examples/erc20/Cargo.toml
    #	examples/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml
    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    414d0c0 View commit details
    Browse the repository at this point in the history
  3. Update metadata to version 4

    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    b8e74bd View commit details
    Browse the repository at this point in the history
  4. Fixed tests

    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    da38d41 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/storage/derive/src/lib.rs
    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    145850f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f107ca1 View commit details
    Browse the repository at this point in the history
  7. Fix tests

    xgreenx committed May 17, 2022
    Configuration menu
    Copy the full SHA
    078a04a View commit details
    Browse the repository at this point in the history

Commits on May 18, 2022

  1. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/lang/codegen/Cargo.toml
    #	crates/lang/macro/Cargo.toml
    #	crates/storage/derive/Cargo.toml
    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    f719a74 View commit details
    Browse the repository at this point in the history
  2. Merge with new release

    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    6fe995c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca8a270 View commit details
    Browse the repository at this point in the history
  4. Fix ink-waterfall

    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    294ffc3 View commit details
    Browse the repository at this point in the history
  5. Size improvements

    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    9ff2b0c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    52d4070 View commit details
    Browse the repository at this point in the history
  7. Merge mother

    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    44ec9e7 View commit details
    Browse the repository at this point in the history
  8. More inline)

    xgreenx committed May 18, 2022
    Configuration menu
    Copy the full SHA
    58c969f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8c93461 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. More size improvements

    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    099442b View commit details
    Browse the repository at this point in the history
  2. Revert back panic on pull)

    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    377a26d View commit details
    Browse the repository at this point in the history
  3. One more optimization. When it will be end???=)

    `return_value` ends execution fully. We use whole buffer for that without "taking"
    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    97fa7b3 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	examples/mother/lib.rs
    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    07d3619 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3db8e6d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e88d535 View commit details
    Browse the repository at this point in the history
  7. We need to pass len...)

    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    c34e67c View commit details
    Browse the repository at this point in the history
  8. Make clippy happy

    xgreenx committed May 19, 2022
    Configuration menu
    Copy the full SHA
    0e136cf View commit details
    Browse the repository at this point in the history

Commits on May 20, 2022

  1. Configuration menu
    Copy the full SHA
    358c00d View commit details
    Browse the repository at this point in the history
  2. Remove bench

    xgreenx committed May 20, 2022
    Configuration menu
    Copy the full SHA
    2aeb623 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d34b1d View commit details
    Browse the repository at this point in the history

Commits on May 21, 2022

  1. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/storage/src/lazy/mapping.rs
    #	crates/storage/src/lazy/mod.rs
    #	crates/storage/src/lib.rs
    #	crates/storage/src/traits/mod.rs
    #	crates/storage/src/traits/optspec.rs
    xgreenx committed May 21, 2022
    Configuration menu
    Copy the full SHA
    88977bc View commit details
    Browse the repository at this point in the history

Commits on May 25, 2022

  1. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/lang/codegen/Cargo.toml
    #	crates/lang/macro/Cargo.toml
    #	crates/lang/src/codegen/dispatch/mod.rs
    #	crates/primitives/Cargo.toml
    #	crates/storage/derive/Cargo.toml
    xgreenx committed May 25, 2022
    Configuration menu
    Copy the full SHA
    45390a6 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2022

  1. Configuration menu
    Copy the full SHA
    9502e34 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2022

  1. Make clippy happy

    xgreenx committed May 27, 2022
    Configuration menu
    Copy the full SHA
    6441dfc View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2022

  1. Fixed storable tests

    xgreenx committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    7fa8cd0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    334160c View commit details
    Browse the repository at this point in the history
  3. Fix spellcheck

    xgreenx committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    d6bfac6 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. Configuration menu
    Copy the full SHA
    5f05846 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/storage/src/traits/impls/prims.rs
    xgreenx committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    e1fe78e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11c86dd View commit details
    Browse the repository at this point in the history
  3. Fix clippy

    xgreenx committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    345ca79 View commit details
    Browse the repository at this point in the history
  4. Fix readme

    xgreenx committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    b8e46bd View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Apply suggestions from code review

    Co-authored-by: Michael Müller <mich@elmueller.net>
    xgreenx and cmichi authored Jul 13, 2022
    Configuration menu
    Copy the full SHA
    eae9152 View commit details
    Browse the repository at this point in the history
  2. Update crates/lang/ir/src/ir/storage_item/config.rs

    Co-authored-by: Michael Müller <mich@elmueller.net>
    xgreenx and cmichi authored Jul 13, 2022
    Configuration menu
    Copy the full SHA
    2b35bd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1873108 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Merge branch 'master' into features/storage-rework

    # Conflicts:
    #	crates/lang/codegen/Cargo.toml
    #	crates/lang/macro/Cargo.toml
    #	examples/mother/lib.rs
    xgreenx committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    9436889 View commit details
    Browse the repository at this point in the history
  2. Update to 4.0.0

    xgreenx committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    188d46d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6f77d8 View commit details
    Browse the repository at this point in the history
  4. Updated errors.

    Improved error for `Storable` derive
    xgreenx committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    9b022f3 View commit details
    Browse the repository at this point in the history
  5. Fixed strerr text

    xgreenx committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    07698e0 View commit details
    Browse the repository at this point in the history