Skip to content

Conversation

@algoidurovic
Copy link
Contributor

Summary

Added integration tests for C2C:

  • Test that basic and complex/indirect reentry isn't allowed
  • Verify that the limit on inner transactions in a group is enforced
  • Verify that failure on inner app call causes an abort for the entire transaction group
  • Verify only the correct resources can be accessed. External resources explicitly passed in foreign object arrays are accessible along with apps and assets created previously in the tx group execution. Note: created accounts are not accessible at the moment.
  • Verify v6 teal contracts cannot invoke contracts with previous versions through inner app calls
  • Stress test: Create tx group execution with max fan out of inner txns and max call stack depth. Because a deep call stack maintains previous frames, memory usage may be a concern. Attempt to use the maximum allowed memory per stack frame.

Comment on lines +1606 to +1608
// This tests a valid form of reentry (which may not be the correct word here).
// When A calls B then returns to A then A calls C which calls B, the execution
// should not produce an error because B doesn't occur in the call stack twice.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice idea.

Comment on lines +2013 to +2014
eval = nextBlock(t, l, true, nil)
err := txgroup(t, l, eval, &callTxGroup[0], &callTxGroup[1], &callTxGroup[2], &callTxGroup[3], &callTxGroup[4], &callTxGroup[5], &callTxGroup[6], &callTxGroup[7], &callTxGroup[8], &callTxGroup[9], &callTxGroup[10], &callTxGroup[11], &callTxGroup[12], &callTxGroup[13], &callTxGroup[14], &callTxGroup[15])
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we decided to allow 256 calls even from a singleton app call (not a 16 app group) we should adjust this test. I'll let you know when I have that merged in.

@jannotti jannotti merged commit 593be3c into algorand:feature/contract-to-contract Jan 14, 2022
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.

2 participants