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

A0-1973: Tune down contracts constants #930

Closed
wants to merge 2 commits into from

Conversation

pmikolajczyk41
Copy link
Member

Description

We follow Alex's advice and decrease two limits for pallet_contracts.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have bumped spec_version and transaction_version

@@ -678,9 +678,9 @@ impl pallet_contracts::Config for Runtime {
type DeletionQueueDepth = DeletionQueueDepth;
type DeletionWeightLimit = DeletionWeightLimit;
type Schedule = Schedule;
type CallStack = [pallet_contracts::Frame<Self>; 31];
type CallStack = [pallet_contracts::Frame<Self>; 5];
Copy link
Contributor

@deuszx deuszx Feb 15, 2023

Choose a reason for hiding this comment

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

Just FYI - this may cause currently deployed contracts to start failing.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, but if your contract needs 5 nested cross-contract calls, then probably you don't have an optimal architecture anyway

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. But previously you didn't know that when dry-running so could have decided to deploy it. I'm not blocking, just saying we should remember to mention it in the release notes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm kind of concerned why this is so small. Note that in EVM this is 256, so even 31 was already small, but now we are changing it to 5?! Would be great to know the core reason here...

Copy link
Contributor

Choose a reason for hiding this comment

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

5 seems too small to me, each delegate_call-type upgradable contract already adds 2 frames. This is severely limiting the smart contract functionality

Copy link
Member Author

Choose a reason for hiding this comment

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

@pmikolajczyk41
Copy link
Member Author

replaced by #938

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.

4 participants