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

AVM: frame pointers #4319

Merged
merged 16 commits into from
Sep 28, 2022
Merged

AVM: frame pointers #4319

merged 16 commits into from
Sep 28, 2022

Conversation

jannotti
Copy link
Contributor

No description provided.

Copy link
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.

took a quick pass, looks like interesting fine grained manipulation over stack. I think the subroutine scheme in Pyteal will benefit from it, by getting rid of allocating scratch slots (plausibly trivially).

data/transactions/logic/frames.go Outdated Show resolved Hide resolved
data/transactions/logic/frames.go Outdated Show resolved Hide resolved
data/transactions/logic/eval.go Outdated Show resolved Hide resolved
data/transactions/logic/eval.go Show resolved Hide resolved
@jannotti jannotti force-pushed the avm-frame-pointers branch from 0822b24 to ec9f161 Compare August 2, 2022 18:31
@jannotti jannotti force-pushed the avm-frame-pointers branch 3 times, most recently from 969600e to ab8ed01 Compare August 7, 2022 16:47
@jannotti jannotti force-pushed the avm-frame-pointers branch 2 times, most recently from 144bcc6 to d7b245f Compare August 29, 2022 19:05
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.

Looking very good.

Still reading, but I wanted to provide some feedback at this juncture.

data/transactions/logic/frames_test.go Show resolved Hide resolved
data/transactions/logic/frames_test.go Outdated Show resolved Hide resolved
data/transactions/logic/doc.go Show resolved Hide resolved
data/transactions/logic/eval.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #4319 (74fa7eb) into master (d3c10f4) will increase coverage by 0.11%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #4319      +/-   ##
==========================================
+ Coverage   54.09%   54.21%   +0.11%     
==========================================
  Files         401      402       +1     
  Lines       51659    51830     +171     
==========================================
+ Hits        27947    28101     +154     
- Misses      21355    21364       +9     
- Partials     2357     2365       +8     
Impacted Files Coverage Δ
data/transactions/logic/doc.go 61.53% <ø> (ø)
data/transactions/logic/assembler.go 85.39% <82.55%> (-0.58%) ⬇️
data/transactions/logic/debugger.go 61.46% <100.00%> (ø)
data/transactions/logic/eval.go 89.40% <100.00%> (+0.09%) ⬆️
data/transactions/logic/frames.go 100.00% <100.00%> (ø)
data/transactions/logic/opcodes.go 84.56% <100.00%> (+0.09%) ⬆️
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
cmd/algoh/blockWatcher.go 77.77% <0.00%> (-3.18%) ⬇️
ledger/blockqueue.go 84.48% <0.00%> (-1.15%) ⬇️
cmd/tealdbg/debugger.go 72.69% <0.00%> (-0.81%) ⬇️
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Very useful functionality. Very much looking forward to seeing how PyTeal subroutines become sleeker and easier to handle thanks to all this.

I left several comments, some more nitpicky than others.

My biggest suggestion is that a solid e2e test for the functionality be included before a final merge.

data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
data/transactions/logic/frames.go Outdated Show resolved Hide resolved
data/transactions/logic/eval.go Show resolved Hide resolved
data/transactions/logic/frames.go Outdated Show resolved Hide resolved
data/transactions/logic/frames.go Show resolved Hide resolved
data/transactions/logic/frames_test.go Show resolved Hide resolved
data/transactions/logic/frames.go Show resolved Hide resolved
data/transactions/logic/eval.go Show resolved Hide resolved
data/transactions/logic/frames.go Outdated Show resolved Hide resolved
data/transactions/logic/frames.go Outdated Show resolved Hide resolved
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.

Good juncture to leave comments. Still reading

data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
data/transactions/logic/doc.go Outdated Show resolved Hide resolved
data/transactions/logic/assembler_test.go Show resolved Hide resolved
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.

Submitting a couple of more questions.

data/transactions/logic/frames.go Show resolved Hide resolved
data/transactions/logic/frames_test.go Show resolved Hide resolved
@jannotti jannotti force-pushed the avm-frame-pointers branch 2 times, most recently from 2ea3c34 to 3d4c884 Compare September 19, 2022 03:00
jannotti and others added 8 commits September 27, 2022 13:24
Also, a lot of cleanup of type tracking with frame_*

And, caught some examples of us not testing opcodes in "nonsense"
tests because the opcode was a substring of another opcode, like & is
a substring of &&. (Caught, because "bury" is a substring of
"frame_bury")

This means there is a change to the "old" compiled constants.  This is
normally not done, but here we added to an old nonsense test, we added
the corresponding bytes to the compiled output.
jasonpaulos
jasonpaulos previously approved these changes Sep 27, 2022
Copy link
Contributor

@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.

Except for the possibility of increasing costs for dupn or proto (maybe that investigation ought to be a separate issue?), this looks good to me

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.

I expect to add some more question in the afternoon, but might as well put some up now.

data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
data/transactions/logic/opcodes.go Show resolved Hide resolved
tzaffi
tzaffi previously approved these changes Sep 28, 2022
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.

All of the items that I have previously brought up have been considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants