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

[contracts] Review storage deposit pricing (StorageDepositLimitExhausted) #29

Closed
cmichi opened this issue Feb 7, 2022 · 1 comment · Fixed by #30
Closed

[contracts] Review storage deposit pricing (StorageDepositLimitExhausted) #29

cmichi opened this issue Feb 7, 2022 · 1 comment · Fixed by #30

Comments

@cmichi
Copy link
Contributor

cmichi commented Feb 7, 2022

To reproduce:

  • Extract the three contracts from contracts.zip. Those are the ink! master examples built with cargo +nightly contract build (so in debug mode). Latest cargo-contract release (0.17.0).
  • Run substrate-contracts-node --dev, I use the latest 0.5.0.
  • Upload flipper.contract, erc20.contract and erc721.contract from Alice (the order doesn't play a role).
  • The last upload will fail with system.ExtrinsicFailed / contracts.StorageDepositLimitExhausted.
  • If I open a new, private browser window and try to upload the third contract there it doesn't work either. I had suspected some UI bug with its local storage, but that doesn't seem to be the case.
  • It works if I upload the third contract from Bob.

Alice's balance after starting a fresh node:

transferrable 1.1529 MUNIT

Alice's balance when getting the error (so after uploading the second contract):

1.1516 MUNIT
transferrable 178,455.5042 UNIT
reserved 973,242.0000 UNIT

So seems like it's an issue with pricing the deposit.

Note that there is use-ink/ink#1112, where a user runs into contracts.StorageDepositLimitExhausted as well (though in a different set-up).

@cmichi cmichi changed the title [contracts] Getting StorageDepositLimitExhausted error [contracts] Review deposit pricing (StorageDepositLimitExhausted) Feb 7, 2022
@cmichi cmichi changed the title [contracts] Review deposit pricing (StorageDepositLimitExhausted) [contracts] Review storage deposit pricing (StorageDepositLimitExhausted) Feb 7, 2022
@athei athei transferred this issue from paritytech/substrate Feb 7, 2022
@athei
Copy link
Member

athei commented Feb 7, 2022

This is no bug in the contracts pallet as far as I can see it. The math checks out. It is just that the deposit values within the runtime configuration are way too high. 6 units per byte. That is insane. Moved it to the correct repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants