Skip to content

Design and implement RawVec and RawHashMap #3

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

Closed
Robbepop opened this issue Dec 20, 2018 · 2 comments
Closed

Design and implement RawVec and RawHashMap #3

Robbepop opened this issue Dec 20, 2018 · 2 comments
Labels
A-ink_storage [ink_storage] Work Item B-design Designing a new component, interface or functionality.

Comments

@Robbepop
Copy link
Collaborator

Design: RawVec and RawHashMap

This issue tracks design decisions around RawVec and RawHashMap implementations.

Problem

The current storage::Vec and storage::HashMap are very different from their counterparts (dynarray and mapping) in Solidity. They are targeted for a higher level of abstraction and provide more guarantees to the user.

The Solidity types are bare-metal, provide nearly no guarantees to the user and are targeted more towards efficiency and performance. Even though the Solidity types are arguably less secure and should be avoided for those reasons to write smart contracts in general, they might still be of some use for very experienced smart contract writers.

@Robbepop Robbepop added B-design Designing a new component, interface or functionality. A-ink_storage [ink_storage] Work Item C-question Further information is requested labels Dec 21, 2018
@Robbepop Robbepop changed the title [pdsl_core] Design: RawVec and RawHashMap Design and implement RawVec and RawHashMap Dec 21, 2018
@Robbepop Robbepop removed the C-question Further information is requested label Dec 22, 2018
@Robbepop
Copy link
Collaborator Author

Robbepop commented Oct 1, 2019

In the presence of storage fees these low-level abstractions might be very user unfriendly since the users would need to do lots of manual management around those data structures. All in all they should generally be avoided. Yet there might be use-cases. We shall implement this as soon as someone finds a suitable use-case that cannot be efficiently supported by the currently existing abstractions and utilities.

@Robbepop
Copy link
Collaborator Author

Superseeded by newer ideas around storage::HashMap to make it aware of its keys and also let it work similar to Solidity-mappings. Closed.

Also: #347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_storage [ink_storage] Work Item B-design Designing a new component, interface or functionality.
Projects
None yet
Development

No branches or pull requests

1 participant