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

Optimise deny_payment #1267

Merged
merged 1 commit into from May 23, 2022
Merged

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented May 19, 2022

Seems we forgot to use optimization in cases if all constructors or methods don't accept payment.

@paritytech-cicd-pr
Copy link

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

⚠️ The ink! master is ahead of your branch, this might skew the comparison data below.

These are the results when building the examples/* contracts from this branch with cargo-contract 1.3.0-cef152e and comparing them to ink! master:

Δ Optimized Size Δ Used Gas Total Optimized Size Total Used Gas
accumulator -0.04 K 1.00 K
adder -0.10 K 2.04 K
contract-introspection -0.05 K 2.32 K
contract-terminate -0.02 K 0.92 K 275_000
contract-transfer 8.13 K 75_000
data-structures -0.01 K 1.73 K
delegate-calls -0.07 K -22 2.89 K 76_254
delegator -0.04 K -101 6.34 K 232_180
dns -0.08 K 8.81 K 225_000
erc1155 -0.55 K 16.74 K 450_000
erc20 -0.07 K 8.42 K 225_000
erc721 -0.19 K 11.62 K 600_000
flipper -0.07 K 1.24 K 75_000
forward-calls -0.01 K -5 2.87 K 151_422
incrementer -0.07 K 1.14 K
mother -0.21 K 12.20 K
multisig -0.01 K -9 25.11 K 470_147
rand-extension -0.13 K 3.79 K 75_000
seal-code-hash -0.19 K 1.39 K
seal-ecdsa -0.09 K 1.72 K
set-code-hash -0.08 K 1.49 K 150_000
subber -0.09 K 2.06 K
trait-erc20 -0.07 K 8.69 K 225_000
trait-flipper -0.03 K 0.97 K 75_000
trait-incrementer -0.06 K 1.12 K 150_000
updated-incrementer -0.08 K 9.55 K
upgradeable-flipper -0.07 K 1.48 K

Link to the run | Last update: Thu May 19 16:18:55 CEST 2022

@xgreenx xgreenx mentioned this pull request May 19, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2022

Codecov Report

Merging #1267 (1c30f69) into master (8ffb7c0) will increase coverage by 16.45%.
The diff coverage is 75.00%.

@@             Coverage Diff             @@
##           master    #1267       +/-   ##
===========================================
+ Coverage   62.32%   78.77%   +16.45%     
===========================================
  Files         227      228        +1     
  Lines        8645     8679       +34     
===========================================
+ Hits         5388     6837     +1449     
+ Misses       3257     1842     -1415     
Impacted Files Coverage Δ
crates/lang/src/codegen/dispatch/execution.rs 0.00% <0.00%> (ø)
crates/lang/codegen/src/generator/dispatch.rs 94.36% <100.00%> (+94.36%) ⬆️
...s/ui/contract/pass/constructor-payable-multiple.rs 33.33% <0.00%> (-4.17%) ⬇️
.../contract/pass/constructor-non-payable-multiple.rs 33.33% <0.00%> (-4.17%) ⬇️
...ang/tests/ui/contract/pass/constructor-selector.rs 46.15% <0.00%> (-3.85%) ⬇️
.../tests/ui/contract/pass/constructor-many-inputs.rs 6.25% <0.00%> (-0.42%) ⬇️
crates/allocator/src/bump.rs 0.00% <0.00%> (ø)
crates/lang/ir/src/ir/attrs.rs 82.27% <0.00%> (+3.60%) ⬆️
crates/lang/ir/src/ir/trait_def/item/mod.rs 90.16% <0.00%> (+4.91%) ⬆️
crates/lang/ir/src/ir/item_impl/constructor.rs 93.84% <0.00%> (+6.15%) ⬆️
... and 45 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 8ffb7c0...1c30f69. Read the comment docs.

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmichi cmichi merged commit 1bfccc7 into use-ink:master May 23, 2022
agryaznov added a commit that referenced this pull request Jun 6, 2022
agryaznov added a commit that referenced this pull request Jun 22, 2022
* Fix links in release notes (#1277)

* Revert "Optimise deny_payment. Use eerywhere semantic of deny. (#1267)"

This reverts commit 1bfccc7.

* Revert backward-incompatible piece of #1224: dependency on `[seal1] seal_set_storage`

* Revert backward-incompatible piece of #1233: removal of eth_compatibility crate

* bump crate versions + update RELEASES.md

* Mapping::insert_return_size is back, having now both `seal1` and `seal0` seal_set_storage versions used

* set_storage_silent -> set_storage_compat renaming

* spell fix

* Apply suggestions from code review

Co-authored-by: Michael Müller <mich@elmueller.net>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update crates/env/src/backend.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* doc comments enhanced

* `Mapping::insert()` to use backwards compatible seal fn

* unreleased changes planned for 4.x removed from 3.x

* Add more details to the release notes

* fix catched issue with changed api function signature

* fix storage trait dependent func

* Apply new versions naming policy: step1. Old versions to keep their names.

* Apply new versions naming policy: step2. Add `deprecated` attr and `# Compatibility` docs section

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* fixes after next review round

* more fixes after the review round

* fmt

* spellcheck config fix

* Small wording fixes

Co-authored-by: Michael Müller <mich@elmueller.net>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <hernando@hcastano.com>
@ascjones ascjones mentioned this pull request Feb 15, 2023
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.

None yet

5 participants