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: Assembly simplification & flexible costs #3857

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

jannotti
Copy link
Contributor

@jannotti jannotti commented Apr 1, 2022

Removes the need for writing many assembly routines, and adds flexibility to opcode cost model.

@jannotti jannotti changed the title Assembly refactor AVM: Assembly simplification & flexible costs Apr 1, 2022
@jannotti jannotti force-pushed the assembly-refactor branch from f02b8a8 to 2707590 Compare April 2, 2022 15:23
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2022

Codecov Report

Merging #3857 (d9f1480) into master (70a5532) will decrease coverage by 0.01%.
The diff coverage is 79.03%.

@@            Coverage Diff             @@
##           master    #3857      +/-   ##
==========================================
- Coverage   50.00%   49.98%   -0.02%     
==========================================
  Files         393      393              
  Lines       68353    68200     -153     
==========================================
- Hits        34178    34090      -88     
+ Misses      30450    30404      -46     
+ Partials     3725     3706      -19     
Impacted Files Coverage Δ
data/transactions/logic/opcodes.go 81.73% <60.86%> (-15.33%) ⬇️
data/transactions/logic/eval.go 89.80% <72.50%> (+0.08%) ⬆️
data/transactions/logic/assembler.go 82.36% <84.61%> (+1.03%) ⬆️
data/transactions/logic/doc.go 57.69% <100.00%> (+12.23%) ⬆️
data/transactions/logic/fields.go 76.25% <100.00%> (+29.44%) ⬆️
ledger/blockqueue.go 82.18% <0.00%> (-2.88%) ⬇️
ledger/tracker.go 74.67% <0.00%> (-2.15%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
data/transactions/verify/txn.go 44.15% <0.00%> (-0.87%) ⬇️
ledger/acctupdates.go 68.51% <0.00%> (-0.66%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70a5532...d9f1480. Read the comment docs.

Unify most assembly routines to minimize difference and ease doc gen
Flexible opcode costs and fewer assembly routines
@jannotti jannotti force-pushed the assembly-refactor branch from 74aba7a to 6c167eb Compare April 4, 2022 20:11
…anges

Remove unused function:  typeEnumTableMarkdown
Copy link
Contributor

@gmalouf gmalouf left a comment

Choose a reason for hiding this comment

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

I went through everything (thanks JJ for answering questions live) - leaving final approval to folks closer to the AVM. Highly supportive of the consolidation around how costs are handled; it is much easier to follow having them calculated/displayed off of a common type with the inputs gathered together.

Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

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

@jannotti Thanks for the effort here to enrich the cost model while also simplifying assembly. ☕

@jannotti jannotti merged commit 95c5b0e into algorand:master Apr 6, 2022
@jannotti jannotti deleted the assembly-refactor branch April 6, 2022 22:14
Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

acct_params_get is missing fields and types in langspec.json file

@jannotti
Copy link
Contributor Author

jannotti commented Apr 7, 2022

#3862 adds them

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.

AVM: Support opcode costs that vary by immediate or stack argument.
5 participants