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

Algod: Simulate endpoint stack-change exposure #5440

Merged
merged 56 commits into from
Jul 12, 2023

Conversation

ahangsu
Copy link
Contributor

@ahangsu ahangsu commented Jun 1, 2023

Summary

This PR should handle #5014, which exposes execution stack trace to simulation endpoint.

Test Plan

  • simulation_eval_test.go extend a previous test which exposes logic sig pc trace to expose stack trace.
  • simulation_eval_test.go extend a similar previous logic sig pc exposure test(with logic sig failed) to expose stack trace.
  • restClient_test.go extend a previous test which calls application replicating itself exposes pc trace to expose stack trace.
  • simulation_eval_test.go test an application containing bury/frame_bury/proto opcodes (version >= 8), which trigger specified logic for stack change descriptions.

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #5440 (b2bdb2d) into master (32466b9) will decrease coverage by 0.02%.
The diff coverage is 83.94%.

@@            Coverage Diff             @@
##           master    #5440      +/-   ##
==========================================
- Coverage   55.78%   55.77%   -0.02%     
==========================================
  Files         446      446              
  Lines       63258    63400     +142     
==========================================
+ Hits        35291    35362      +71     
- Misses      25588    25664      +76     
+ Partials     2379     2374       -5     
Impacted Files Coverage Δ
daemon/algod/api/server/v2/utils.go 9.16% <0.00%> (-0.44%) ⬇️
data/basics/teal.go 21.59% <ø> (ø)
data/transactions/logic/pairing.go 0.00% <0.00%> (ø)
data/transactions/logic/opcodes.go 67.85% <12.34%> (-19.92%) ⬇️
cmd/goal/clerk.go 8.99% <50.00%> (+0.10%) ⬆️
data/transactions/logic/eval.go 92.19% <98.10%> (-0.12%) ⬇️
data/transactions/logic/assembler.go 94.13% <100.00%> (+0.02%) ⬆️
data/transactions/logic/box.go 94.96% <100.00%> (ø)
data/transactions/logic/debugger.go 69.86% <100.00%> (ø)
data/transactions/logic/frames.go 100.00% <100.00%> (ø)
... and 2 more

... and 10 files with indirect coverage changes

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

@ahangsu ahangsu marked this pull request as ready for review June 12, 2023 17:07
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.

Great tests, I only have minor comments. The most important is probably what to do about dig and frame_dig

ledger/simulation/simulation_eval_test.go Outdated Show resolved Hide resolved
ledger/simulation/simulation_eval_test.go Outdated Show resolved Hide resolved
daemon/algod/api/algod.oas2.json Outdated Show resolved Hide resolved
daemon/algod/api/server/v2/utils.go Outdated Show resolved Hide resolved
ledger/simulation/trace.go Outdated Show resolved Hide resolved
data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
ledger/simulation/simulation_eval_test.go Show resolved Hide resolved
test/e2e-go/restAPI/restClient_test.go Outdated Show resolved Hide resolved
test/e2e-go/restAPI/restClient_test.go Outdated Show resolved Hide resolved
data/transactions/logic/opcodes.go Outdated Show resolved Hide resolved
jasonpaulos
jasonpaulos previously approved these changes Jun 29, 2023
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.

Looks great!

@ahangsu ahangsu requested a review from jannotti June 29, 2023 18:49
daemon/algod/api/algod.oas2.json Outdated Show resolved Hide resolved
daemon/algod/api/algod.oas2.json Outdated Show resolved Hide resolved
cmd/goal/clerk.go Show resolved Hide resolved
daemon/algod/api/algod.oas2.json Outdated Show resolved Hide resolved
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 Outdated Show resolved Hide resolved
ledger/simulation/trace.go Outdated Show resolved Hide resolved
@ahangsu ahangsu requested a review from jannotti July 12, 2023 17:09
Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

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

Time to merge and face the onslaught of stack -> Stack conflicts in my branch!

@jannotti jannotti merged commit aeef625 into algorand:master Jul 12, 2023
@ahangsu ahangsu deleted the simulate-stack-change branch July 12, 2023 18:42
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.

3 participants