Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up max teal version #146

Merged
merged 5 commits into from
Dec 20, 2021
Merged

up max teal version #146

merged 5 commits into from
Dec 20, 2021

Conversation

barnjamin
Copy link
Contributor

@barnjamin barnjamin commented Dec 20, 2021

Just upping the max version allowed so if folks are interested in toying around they can.

Generally I think we should try to do this for future versions as soon as a new teal version hits master/feature branches of go-algorand, even if we haven't defined the new ops yet

Optionally I can target some new feature branch here instead of trying to merge to master

Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as we already have some opcodes in go-algorand that require v6 so seems useful. @algochoi - could you chime in as well?

@tzaffi
Copy link
Contributor

tzaffi commented Dec 20, 2021

But there are some failing tests that are checking for version not being greater than 5, so these need to modified as well.

@algochoi
Copy link
Contributor

Looks fine to me, but I'm not too sure how useful this might be without defining any TEAL 6 opcodes like mentioned above.

@barnjamin
Copy link
Contributor Author

Teal 6 allows for some extra inner transaction fields to be set, namely the one I wanted was rekey_to and its only supported >= v6.

I found myself generating the teal then tweaking the first line but this seems easier.

Copy link
Member

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if you could add a test_compile_version_6 test too 😄

Otherwise, looks good

@jasonpaulos jasonpaulos merged commit ebc801d into algorand:master Dec 20, 2021
@jasonpaulos jasonpaulos mentioned this pull request Feb 23, 2022
@michaeldiamant michaeldiamant mentioned this pull request Mar 14, 2022
9 tasks
algoidurovic pushed a commit to algoidurovic/pyteal that referenced this pull request Mar 23, 2022
* up max teal version

* make test fail if its greater than version defined as MAX_TEAL_VERSION

* Fmt

* hardcode to 7

* Add version 6 test
algoidurovic added a commit that referenced this pull request Mar 31, 2022
* Optimization added for repeated int constants under 2**7 w/ tests

* fixed type problem and formatted

* Expanded test and added comment for clarification

* implement optimization utility with simple slot store/load canceling

* minor refactor

* reformat code

* Update pyteal/compiler/optimizer/optimizer.py

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>

* Update pyteal/compiler/optimizer/optimizer.py

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>

* Adding exponentiation to arithmatic ops docs (#134)

Add missing exponentiation operation in document

* updating to use new syntax for seq (#135)

* updating to use new syntax for seq

* rewording

* Make pylance recognize wildcard imports (#133)

* adding exports directly to top level __all__

* apply black formatter

* adding initial generate script

* fmt

* rm all from all

* adding check to travis

* reading in original __init__ and using its imports, dont write to filesystem if --check is passed

* make messages more profesh

* fix flags after black formatted them

* y

* flippin black formatter

* help text fix

* asdfasdf

* Include pyi files in build (#137)

* Revert "Optimization for constant assembly (#128)"

This reverts commit 5636ccd.

* Revert "String optimization and addition of Suffix() (#126)"

This reverts commit 7cb7b9a.

* Update to v0.9.1 (#138)

* Revert "Revert "String optimization and addition of Suffix() (#126)""

This reverts commit 564e602.

* Revert "Revert "Optimization for constant assembly (#128)""

This reverts commit cc405a5.

* Update examples.rst (#140)

* Fix type for App.globalGetEx in docs (#142)

* up max teal version (#146)

* up max teal version

* make test fail if its greater than version defined as MAX_TEAL_VERSION

* Fmt

* hardcode to 7

* Add version 6 test

* Formatting subroutines with name and newline (#148)

* using the subroutine name for the label

* adding newline before label declaration, fix tests to account for newline

* remove commented name, fix test

* only add newline for subroutines with comment

* naming with suffix

* adding test for invalid name

* Call type_of() in require_type() for better exception messages (#151)

* call type_of in require_type to catch exceptions

* fix formatting for types.py and types_test.py

* `method` pseudo-op support for ABI methods (#153)

- Add support for `method` pseudo-opcode in PyTeal.
- Add `name` field in `subroutine` to override __name__ from function implementation, for readability in generated code.

* Print diff of `__init__.pyi` (#166)

* Print diff of __init__.pyi

* Format

* Undo travis change

* C2C Feature Support (#149)

- `itxn_next` implementation / test
- `itxn_field` support for array field setting
- `gitxn / gitxna` implementation / test
- `gloadss` implementation / test

* Add BytesSqrt (#163)

* Add BytesSqrt

* Update pyteal/ast/unaryexpr_test.py

Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

* adding new globals from teal6 (#168)

* adding new globals from teal6

* fmt

* Acct params get (#165)

* Adding account param getter

* Add to init

* fix op names and type

* adding tests

* allow bytes to be passed

* tweak docs, add require check for any

* Change Subroutine Wrapped Callable to a class with call method (#171)

Allows for more information (name, return type, has return) about the subroutine extractable from wrapped fnImpl by subroutine

* Subroutine Type Annotations (#182)

This PR requires that any type annotation of a Subroutine parameter or return value be of type `Expr`. Missing annotations are assumed to be `Expr`'s as well. In a follow up PR #183 this restriction will be loosened.

* fix docs referencing what apps should eval to (#191)

* Move from Travis to Github Actions (#190)

* MultiValue expression implemented to support opcodes that return multiple values (#196)

* Optimization added for repeated int constants under 2**7 w/ tests

* fixed type problem and formatted

* Expanded test and added comment for clarification

* add multivalue expr and change maybevalue to derive from multivalue

* updated tests and formatting

* reorder output slots to reflect stack ordering

* add additional assertion in MaybeValue test to enforce slot ordering

* Support TEAL 6 txn fields LastLog, StateProofPK and opcodes divw, itxnas, gitxnas (#174)

* adding new teal6 ops, no pyteal expressions defined for them yet

* Add opcode support for divw

* Add opcode support for divw (#192)

* Add opcode support for itxnas and gitxnas (#193)

* Add opcode support for itxnas and gitxnas

* Update stale reference to inner transaction limit

* Fix allowed types for GitxnaExpr txnIndex

* Remove obsolete logic for handling GitxnaExpr.teal construction

* Remove unnecessary cast and fix gitxna runtime type checking

* Move type validation to constructors for gtxn and gitxn variants

* Add missed tests from prior commit

* Fix duplicate test case

* Move index validation from subclasses to TxnaExpr

* Inline validation functions per PR feedback

* Remove unused imports

* Refactor to isinstance tupled check

* Remove TEAL v1 min version test per PR feedback

* Fix constructor type checking for GtxnExpr

* Refactor to remove duplicate type check function

* Update last_log docstring

Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

* Expose state_proof_pk txn field

* Update transaction field docs to reflect TEAL v6

* Update transaction field docs to reflect TEAL v6

Co-authored-by: michaeldiamant <michaeldiamant@users.noreply.github.com>
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

* Fixed typo (#202)

* Add Github action to generate docset (#201)

* Add build docset step

* non-slim container

* Update docs to group transaction field tables like go-algorand (#204)

* Update accessing_transaction_field.rst to fix typo (#207)

* Add docs README to explain docs/ testing procedure (#205)

* v0.10.0 (#206)

* Update to v0.10.0

* Add latest commits to changelog

* fixing github actions to run on tags (#208)

* Update build.yml

* Update build.yml

* Fix typos in docstrings and error messages (#211)

* Test on Python 3.10 (#212)

* Update versions.rst (#210)

* Update versions.rst

content of [https://github.com/algorand/pyteal/releases] is not shown in [https://pyteal.readthedocs.io/en/latest/versions.html]

* Update docs/versions.rst

Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>

* Pass-by-Ref / Dynamic Scratch Variables via the `loads` and `stores` opcodes (#198)

* Pass-by-Reference Semantics
* Use a Dynamic ScratchVar to "iterate" over other ScratchVar's
* Another approach for E2E testing

* Fix build script invocation (#223)

* Bring #225 to master (#227)

* Ignore tests generating TEAL file outputs used for expected comparisons (#228)

* Fix typo in CONTRIBUTING.md (#229)

* Fix subroutine mutual recursion with different argument counts bug (#234)

* Fix mutual recursion bug

* Remove usage of set.pop

* Revert "Pass-by-Ref / Dynamic Scratch Variables via the `loads` and `stores` opcodes (#198)"

This reverts commit cf95165.

* v0.10.1 (#237)

* Revert "Revert "Pass-by-Ref / Dynamic Scratch Variables via the `loads` and `stores` opcodes (#198)""

This reverts commit 51ec8c9.

* Update user guide docs to reflect addition of DynamicScratchVar (#226)

* Update CONTRIBUTING.md on PEP 8 naming conventions policy (#241)

* implement optimization utility with simple slot store/load canceling

* minor refactor

* reformat code

* correct import format to match convention

* slot optimization awareness of reserved ids added

* fix typo

* remove dataclass usage

* slight reorg of compiler process in order to perform optimization on cfg

* clean up imports

* updated documentation and reformatted with new version of black

* remove unused imports and comments

* reformatting

* add additional optimizer unit tests

* improve testing and slight refactoring

* more renaming

* documentation and import changes

* fixed typos in docs

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com>
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
Co-authored-by: Edward D Gaudio <edwardgaudio@gmail.com>
Co-authored-by: Joe Polny <50534337+joe-p@users.noreply.github.com>
Co-authored-by: Hang Su <87964331+ahangsu@users.noreply.github.com>
Co-authored-by: Łukasz Ptak <StylishTriangles@users.noreply.github.com>
Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com>
Co-authored-by: Jack <87339414+algojack@users.noreply.github.com>
Co-authored-by: Glory Agatevure <agatevureglory@gmail.com>
Co-authored-by: Adriano Di Luzio <aldur@users.noreply.github.com>
Co-authored-by: PabloLION <36828324+PabloLION@users.noreply.github.com>
This was referenced Jun 9, 2022
@michaeldiamant michaeldiamant mentioned this pull request Sep 9, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants