Parcourir la source

book/sc: invoke() add info on downsides of listed approach

x il y a 2 ans
Parent
commit
9b5dd4c44b
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      doc/src/arch/sc/sc.md

+ 8 - 0
doc/src/arch/sc/sc.md

@@ -51,3 +51,11 @@ call `invoke()` exactly `n` times.
 If this doesn't happen, then there's a mismatch and the call fails with an
 error.
 
+This logic is handled completely inside the contract without needing host
+functions.
+
+The downside is that the entire calldata for a smart contract is bundled
+in a tx, and isn't generated on the fly. This makes tx size bigger.
+However since we need ZK proofs, I expect the calldata would need to
+bundle the proofs for all invoked calls anyway.
+