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

Base Key on [u8; 32] #971

Merged
merged 14 commits into from
Oct 21, 2021
Merged

Base Key on [u8; 32] #971

merged 14 commits into from
Oct 21, 2021

Conversation

Robbepop
Copy link
Collaborator

@Robbepop Robbepop commented Oct 20, 2021

Implements #950.

This change removes lots of APIs from Key type that may result in inefficient computation.
This required some changes in the rest of the ink! codebase.
Unfortunately this PR slightly pessimizes Wasm file sizes.
For example the ERC-20 contract Wasm file size is 29.4kB without this change and 29.5kB with this change.

Even through the pessimization with respect to Wasm file sizes I believe that this change will allow other optimizations.

This PR is best reviewed commit by commit.

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2021

Codecov Report

Merging #971 (d87fc87) into master (e8d4739) will decrease coverage by 0.11%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #971      +/-   ##
==========================================
- Coverage   78.86%   78.75%   -0.12%     
==========================================
  Files         243      244       +1     
  Lines        9124     9122       -2     
==========================================
- Hits         7196     7184      -12     
- Misses       1928     1938      +10     
Impacted Files Coverage Δ
crates/storage/src/lazy/lazy_cell.rs 97.36% <ø> (ø)
crates/primitives/src/key.rs 93.24% <92.30%> (+11.76%) ⬆️
...tes/env/src/engine/experimental_off_chain/impls.rs 56.31% <100.00%> (-0.43%) ⬇️
crates/env/src/engine/off_chain/tests.rs 100.00% <100.00%> (ø)
crates/metadata/src/layout/mod.rs 77.01% <100.00%> (-0.52%) ⬇️
crates/storage/src/lazy/lazy_array.rs 96.22% <100.00%> (+0.10%) ⬆️
crates/storage/src/lazy/lazy_imap.rs 92.94% <100.00%> (+0.08%) ⬆️
crates/eth_compatibility/src/lib.rs 0.00% <0.00%> (-74.08%) ⬇️
crates/primitives/src/key_ptr.rs 75.00% <0.00%> (-25.00%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8d4739...d87fc87. Read the comment docs.

Generic over T where T: Into<u64> so it accepts u32 as well etc.
…y-on-u8x32

# Conflicts:
#	.config/cargo_spellcheck.dic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants