Skip to content

Commit c579f34

Browse files
authored
Update common issues with contract size guidance
Added information about contract size optimizations and submission limits.
1 parent 137423d commit c579f34

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/common_issues.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
### `RecursionError: maximum recursion depth exceeded`
44

55
This may happen when your contract is too large. Try setting the flag `--recursion-limit` to something high
6-
like 2000. If it does not go away even with values above i.e. 10000, please [open an issue](https://github.com/OpShin/opshin/issues/new/choose).
6+
like 2000. If it does not go away even with values above i.e. 10000, please [open an issue](https://github.com/OpShin/opshin/issues/new/choose).
7+
8+
### The contract is too large to submit in a transaction
9+
10+
OpShin provides various optimizations to decrease contract size. Most of these are already activated by default but a number of [powerful optimizations can be added](https://book.opshin.dev/smart_contract_tour/advanced.html#compiler-flags):
11+
12+
- `-fdeduplicate` is a powerful optimization that can reduce contract size significantly. It deduplicates low level terms, but is expensive, which is why it is disabled by default.
13+
- `-O3` enables a range of powerful optimizations (including `-fdeduplicate`) but also removes all error traces and print statements. This significantly reduces contract size but makes debugging much more difficult.

0 commit comments

Comments
 (0)