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: Share resource arrays across transactions #5035

Merged
merged 30 commits into from Apr 7, 2023

Conversation

jannotti
Copy link
Contributor

This PR will allow v9 apps to access resources named in any top-level transaction of the group, rather than only the resources named by this transaction. Non-appl transactions are treated as though they name of accounts and resources that are required to process the transaction.

@jannotti jannotti force-pushed the avm-group-resources branch 2 times, most recently from 0971904 to ac0b64f Compare January 19, 2023 21:24
@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Merging #5035 (0eb3923) into master (c27422c) will increase coverage by 0.14%.
The diff coverage is 85.84%.

❗ Current head 0eb3923 differs from pull request most recent head 530c76a. Consider uploading reports for the commit 530c76a to get more accurate results

@@            Coverage Diff             @@
##           master    #5035      +/-   ##
==========================================
+ Coverage   53.77%   53.92%   +0.14%     
==========================================
  Files         450      451       +1     
  Lines       56193    56401     +208     
==========================================
+ Hits        30218    30414     +196     
- Misses      23625    23636      +11     
- Partials     2350     2351       +1     
Impacted Files Coverage Δ
daemon/algod/api/server/v2/utils.go 10.85% <0.00%> (-0.07%) ⬇️
data/transactions/application.go 65.71% <0.00%> (-0.25%) ⬇️
data/transactions/logic/doc.go 61.53% <ø> (ø)
data/transactions/logic/opcodes.go 84.84% <ø> (ø)
data/transactions/teal.go 84.00% <ø> (ø)
ledger/eval/cow.go 66.15% <ø> (ø)
ledger/eval/cow_creatables.go 10.86% <0.00%> (ø)
ledger/testing/consensusRange.go 23.07% <ø> (ø)
data/transactions/logic/resources.go 81.94% <81.94%> (ø)
data/transactions/logic/eval.go 90.75% <95.42%> (+0.50%) ⬆️

... and 6 files with indirect coverage changes

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

@jannotti jannotti force-pushed the avm-group-resources branch 2 times, most recently from cdea9ff to 72b3af4 Compare January 26, 2023 17:20
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.

My comments so far from spending time in the logic package. More to come

data/transactions/logic/resources.go Show resolved Hide resolved
data/transactions/logic/resources.go Outdated Show resolved Hide resolved
data/transactions/logic/resources.go Outdated Show resolved Hide resolved
data/transactions/logic/resources.go Outdated Show resolved Hide resolved
data/transactions/logic/resources.go Outdated Show resolved Hide resolved
data/transactions/logic/resources.go Outdated Show resolved Hide resolved
data/transactions/teal.go Outdated Show resolved Hide resolved
data/transactions/logic/resources.go Show resolved Hide resolved
@jannotti jannotti force-pushed the avm-group-resources branch 2 times, most recently from e56a06b to 79a5f42 Compare February 16, 2023 16:27
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.

This is the last of my implementation comments. I'll start taking a closer look at tests now

data/transactions/logic/resources.go Show resolved Hide resolved
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.

Existing tests look good, I just left some minor comments.

Holding back on approving because I don't recall seeing any tests of a v9 app calling a v8 one, especially with regard to the strict foreign resource checks. It would be really nice to have coverage there.

data/transactions/logic/evalAppTxn_test.go Outdated Show resolved Hide resolved
data/transactions/logic/evalStateful_test.go Outdated Show resolved Hide resolved
ledger/apptxn_test.go Show resolved Hide resolved
test/scripts/e2e_subs/shared-resources.py Outdated Show resolved Hide resolved
data/transactions/logic/resources_test.go Outdated Show resolved Hide resolved
data/transactions/logic/resources_test.go Outdated Show resolved Hide resolved
data/transactions/logic/assembler_test.go Outdated Show resolved Hide resolved
data/transactions/logic/evalStateful_test.go Outdated Show resolved Hide resolved
data/transactions/logic/evalStateful_test.go Outdated Show resolved Hide resolved
algorandskiy
algorandskiy previously approved these changes Apr 5, 2023
data/transactions/logic/evalStateful_test.go Show resolved Hide resolved
I already have tests for the bug fix (the change is in
EvalContext.availableAccount(), but they rely on a fair bit of code I
have in the next PR, so I will include it there.
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.

None yet

6 participants