Skip to content

Test against Py 3.11 + Break out non-DryRun-executing functions in blackbox.py into new script inspector.py#48

Merged
tzaffi merged 8 commits intoalgorand:mainfrom
tzaffi:prelude-to-45
Jan 13, 2023
Merged

Test against Py 3.11 + Break out non-DryRun-executing functions in blackbox.py into new script inspector.py#48
tzaffi merged 8 commits intoalgorand:mainfrom
tzaffi:prelude-to-45

Conversation

@tzaffi
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi commented Jan 12, 2023

In an attempt to make PR #45 easier to follow, I'm front running this one in first.

No new functionality is being introduced.

C.I. Improvements

Originally, graviton introduced an algod for the purposes of dry run testing. Later, PyTeal improved on it by bringing wwinder's nightly docker build. Now, the chickens have come home to roost and it's time to bring the PyTeal improved C.I. process back to graviton.

Related issues - to be resolved:

@tzaffi tzaffi changed the title Test against Py 11 + Reordering of Classes in blackbox.py Test against Py 3.11 + Reordering of Classes in blackbox.py Jan 12, 2023
@tzaffi tzaffi changed the title Test against Py 3.11 + Reordering of Classes in blackbox.py Test against Py 3.11 + Reorg of Classes in blackbox.py Jan 12, 2023
Comment thread graviton/blackbox.py
MAX_APP_ARG_LIMIT = atc.AtomicTransactionComposer.MAX_APP_ARG_LIMIT


class DryRunProperty(Enum):
Copy link
Copy Markdown
Contributor Author

@tzaffi tzaffi Jan 12, 2023

Choose a reason for hiding this comment

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

This, and several other non-DryRun-execution related code has been broken out to inspector.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

much better

Comment thread graviton/inspector.py
@@ -0,0 +1,847 @@
from base64 import b64decode
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All this code came from blackbox.py. No changes other than the re-location.

@tzaffi tzaffi changed the title Test against Py 3.11 + Reorg of Classes in blackbox.py Test against Py 3.11 + Break out non-executing functions in blackbox.py into new script inspector.py Jan 12, 2023
tzaffi pushed a commit to tzaffi/graviton that referenced this pull request Jan 13, 2023
inspector.max_stack_height() == 2
inspector.status() == ("REJECT" if x == 0 else "PASS")
inspector.final_scratch() == ({} if x == 0 else {0: x})
assert inspector.stack_top() == x**2
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for some reason, assertions were dropped. So I'm resuscitating these.

@tzaffi tzaffi changed the title Test against Py 3.11 + Break out non-executing functions in blackbox.py into new script inspector.py Test against Py 3.11 + Break out non-DryRun-executing functions in blackbox.py into new script inspector.py Jan 13, 2023
Comment thread .github/workflows/build.yml Outdated
with:
config: ${{ env.SANDBOX_CONFIG }}
- name: Start algod
run: make algod-start
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice x2

Comment thread graviton/invariant.py
)
from graviton.blackbox import ExecutionMode
from graviton.inspector import DryRunInspector, DryRunProperty, mode_has_property
from graviton.models import PyTypes
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

much better

@bbroder-algo
Copy link
Copy Markdown

i like it, good move forward

@tzaffi
Copy link
Copy Markdown
Contributor Author

tzaffi commented Jan 13, 2023

i like it, good move forward

Can i haz thummms up pleez

Copy link
Copy Markdown
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

generally lgtm, just moving classes from blackbox.py to inspector.py, and renamed BlackboxResults to DryRunResults. Together with a much simpler build.yml using Will's algod image.

@tzaffi tzaffi merged commit 4486987 into algorand:main Jan 13, 2023
@tzaffi tzaffi deleted the prelude-to-45 branch January 13, 2023 19:41
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.

3 participants