Skip to content

Conversation

@francesco-stacks
Copy link

Description

Applicable issues

  • fixes #

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

@francesco-stacks francesco-stacks self-assigned this Oct 30, 2025
@francesco-stacks francesco-stacks requested review from a team as code owners October 30, 2025 18:29
@francesco-stacks francesco-stacks added aac Avoiding Accidental Consensus aac-testing Avoiding Accidental Consensus Testing Specific Task labels Oct 30, 2025
@francesco-stacks francesco-stacks moved this to Status: In Review in Stacks Core Eng Oct 30, 2025
@francesco-stacks francesco-stacks changed the title chore: add consensus tests for MemoryExceededError chore: add consensus tests for MemoryBalanceExceeded Oct 30, 2025
/// - 20 transactions that call the contract (should fail with MemoryBalanceExceeded)
/// - 1 transaction that is expected to succeed
#[test]
fn test_memory_balance_exceeded_multiple_calls() {
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: shouldn't we rely on insta for all the consensus test?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, the idea is that this in particular is not meant to be a consensus test but a more classic "integration test", I just used the new framework for it. But good thing you brought it up because this doesn't belong in here.
When we are going to merge your PR that makes the symbols public and ready to be used in other files, I'll move it somewhere else.


// Tests that `MemoryBalanceExceeded` error occurs during a contract call.
// The transaction will fail but will still be committed to the block.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. Should remove this empty line.

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

Labels

aac Avoiding Accidental Consensus aac-testing Avoiding Accidental Consensus Testing Specific Task

Projects

Status: Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants