-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Contracts Add deposit for dependencies #14079
Conversation
c0069e8
to
51000ec
Compare
bot bench $ pallet dev pallet_contracts |
@pgherveou https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2791408 was started for your command Comment |
@pgherveou Command |
This is going to require a migration as well for adding a property to ContractInfo |
Also since the length of the encoded ContractInfo can vary based on the size of the dependencies, we might need to alter the benchmark to take the worst situation into account (aka fill the map with max dependencies)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The terminate
benchmark needs to be done with max dependencies in order to account for the worst case. We need to check how bad this is. It is 32 transfers. Could be prohibitive.
I think we should leave that PR open until the new migration system is merged. So we avoid the situation of a master with missing migrations. |
merging master after #14084 , might need to self review a few things before it's ready for review again |
c4c4e7b
to
3cafdb6
Compare
bot bench $ pallet dev pallet_contracts |
@pgherveou Positional arguments are not supported anymore. I guess you meant |
bot bench substrate-pallet --pallet=pallet_contracts |
@pgherveou https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3261305 was started for your command Comment |
…=dev --target_dir=substrate --pallet=pallet_contracts
@pgherveou Command |
Co-authored-by: Juan <juangirini@gmail.com>
// Measured: `709` | ||
// Estimated: `9124` | ||
// Minimum execution time: 42_457_000 picoseconds. | ||
Weight::from_parts(44_556_000, 9124) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one increased markedly, on both dimensions. Any ideas why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did that when you were off #14523 but did not update the bench
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm but that one changed v12 migration, while the weights change in question is for the v10 one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right 🤔
bot merge |
Error: "Check reviews" status is not passing for paritytech/cumulus#2913 |
bot merge |
* Companion PR for paritytech/substrate#14079 * update lockfile for {"substrate", "polkadot"} --------- Co-authored-by: parity-processbot <>
cumulus companion: paritytech/cumulus#2913
To prevent a contract to be removed when it's invoked via
delegate_call
, this PR introduces two new runtime functionsadd_delegate_dependency
andremove_delegate_dependency
.add_delegate_dependency
will increase the refcount for the code hash, and add it to the newdelegate_dependencies
field of the Contract info. In order to prevent abuse adding a dependency will be protected by a percentage of the storage deposit of the original code.Likewise, since instantiating a contract, increment the refcount, the same amount will be added to the base deposit for using this code hash.
To make these updates possible we introduce the following new configuration fields: