File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,24 @@ the contract macro ([documentation here](https://use-ink.github.io/ink/ink/attr.
221221__ Important:__ If a developer writes a contract for a chain that deviates
222222from the default Polkadot SDK types, they have to make sure to use that
223223chain's ` Environment ` .
224+
225+ ## Design decisions in ` pallet-revive ` that make it harder for ink!
226+
227+ Parity made a couple changes when forking ` pallet-revive ` from ` pallet-contracts ` , which
228+ make things harder/less performant for ink!.
229+
230+ We are tracking these changes here because they make it easier to understand the codebase.
231+ In the future, this list could also be used to improve the performance of ink! running
232+ on ` pallet-revive ` , if Parity is open to it.
233+
234+ (1) Individual host functions were migrated to pre-compiles. Instead of being able to
235+ just call into the host, these functions now have the performance overhead of calling
236+ into another contract. Functions throughout ink! are affected by this.
237+
238+ (2) The builtin pre-compiles don't support SCALE encoding, but instead expose only a
239+ Solidity interface. As ink! natively uses SCALE encoding we are required to
240+ re-encode arguments into the bloated Solidity ABI encoding, as well as decode them.
241+
242+ (3) ` pallet-revive ` uses two types for a contracts balance: the generic ` Balance ` (which
243+ is set in the chain configuration) and the Ethereum-native ` U256 ` . Currently users of
244+ ink! have to deal with both types as well.
You can’t perform that action at this time.
0 commit comments