-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Teal7 to AVM8, and consolidate Teal to AVM versioning (#470)
* swapping base64 modes to match the rest (#446) * Merge master into teal7 (#450) * AVM 7: Address integration branch feedback (#452) * Add Execute Method (#444) * adding execute method to allow omission of begin/submit for common use case * exec docstring * update testcase Co-authored-by: Hang Su <hang.su@algorand.com> * Merge branch 'master' into teal7 (#463) * fix misspelling of uint (#431) * fix misspelling of uint * Clarify minimum Python version management docs (#435) * Foreign prefix on App and Asset arrays (#440) * replacing foreignapps with applications * fix assets as well * Add Execute Method (#444) * adding execute method to allow omission of begin/submit for common use case * exec docstring * update testcase Co-authored-by: Hang Su <hang.su@algorand.com> Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Hang Su <hang.su@algorand.com> * Consolidate TEAL and AVM versioning (#441) * fix misspelling of uint (#431) * fix misspelling of uint * Clarify minimum Python version management docs (#435) * Convert TEAL version references to program version by hand * Replace `teal#Options` with `avm#Options` * Deprecate `*_TEAL_VERSION` in favor of `*_PROGRAM_VERSION` * Fix docs typo Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * Minor `versions.rst` changes * Fix `verifyTealVersion` in new opcode files * Fix linter errors * Fix language discrepencies introduced by the merge * Remove incorrect avm replacement * Fix inconsistent language introduced by merge Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * max program version Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: Jacob Daitzman <jdtzmn@gmail.com>
- Loading branch information
1 parent
7c24013
commit ba260e6
Showing
60 changed files
with
764 additions
and
687 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
.. _versions: | ||
|
||
TEAL Versions | ||
AVM Versions | ||
============= | ||
|
||
Each version of PyTeal compiles contracts for a specific version of TEAL. Newer versions of TEAL | ||
Each version of PyTeal compiles contracts for a specific AVM version. Newer versions of the AVM | ||
introduce new opcodes and transaction fields, so PyTeal must be updated to support these new | ||
features. Below is a table which shows the relationship between TEAL and PyTeal versions. | ||
features. Below is a table which shows the relationship between AVM and PyTeal versions. | ||
|
||
============ ============== | ||
TEAL Version PyTeal Version | ||
AVM Version PyTeal Version | ||
============ ============== | ||
1 <= 0.5.4 | ||
2 >= 0.6.0 | ||
3 >= 0.7.0 | ||
4 >= 0.8.0 | ||
5 >= 0.9.0 | ||
6 >= 0.10.0 | ||
7 >= 0.14.0 | ||
============ ============== | ||
|
||
In order to support TEAL v2, PyTeal v0.6.0 breaks backward compatibility with v0.5.4. PyTeal | ||
In order to support AVM v2, PyTeal v0.6.0 breaks backward compatibility with v0.5.4. PyTeal | ||
programs written for PyTeal version 0.5.4 and below will not compile properly and most likely will | ||
display an error of the form :code:`AttributeError: * object has no attribute 'teal'`. | ||
|
||
**WARNING:** before updating PyTeal to a version with generates TEAL v2 contracts and fixing the | ||
**WARNING:** before updating PyTeal to a version with generates AVM v2 contracts and fixing the | ||
programs to use the global function :any:`compileTeal` rather the class method :code:`.teal()`, make | ||
sure your program abides by the TEAL safety guidelines `<https://developer.algorand.org/docs/reference/teal/guidelines/>`_. | ||
Changing a v1 TEAL program to a v2 TEAL program without any code changes is insecure because v2 | ||
TEAL programs allow rekeying. Specifically, you must add a check that the :code:`RekeyTo` property | ||
sure your program abides by the AVM safety guidelines `<https://developer.algorand.org/docs/reference/teal/guidelines/>`_. | ||
Changing a v1 AVM program to a v2 AVM program without any code changes is insecure because v2 | ||
AVM programs allow rekeying. Specifically, you must add a check that the :code:`RekeyTo` property | ||
of any transaction is set to the zero address when updating an older PyTeal program from v0.5.4 and | ||
below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.