Skip to content

refactor!: prohibiting static calls via non-static interface#18398

Merged
benesjan merged 1 commit intonextfrom
11-13-refactor_prohibiting_static_calls_via_non-static_interface
Nov 18, 2025
Merged

refactor!: prohibiting static calls via non-static interface#18398
benesjan merged 1 commit intonextfrom
11-13-refactor_prohibiting_static_calls_via_non-static_interface

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Nov 13, 2025

Fixes F-130

Allowing for this was sad and ugly so I dropped it.

@benesjan benesjan changed the base branch from next to graphite-base/18398 November 13, 2025 18:22
@benesjan benesjan force-pushed the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch from 223f04c to e16aacb Compare November 13, 2025 18:22
@benesjan benesjan changed the base branch from graphite-base/18398 to 11-08-refactor_restructuring_function_macros November 13, 2025 18:22
@benesjan benesjan force-pushed the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch 2 times, most recently from 159931f to f9a6e22 Compare November 13, 2025 19:05
returns_hash.get_preimage()
}

/// TODO(F-130): Drop this function. This should be present only on PrivateStaticCallInterface.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not closing this issue with this PR as there are more subtasks TODO

arg_a: Field,
arg_b: Field,
) -> Field {
AvmTest::at(address).add_args_return(arg_a, arg_b).view(context)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test here relies on the static call but in other places another ugly stale monstrosity expects the called function to b e non-view so I hack around this by directly using the context thingy.

// Indirectly call_static `set_storage_single`. Should revert since it's accessing self.storage.
#[external("public")]
fn nested_static_call_to_set_storage() {
AvmTest::at(self.address).set_storage_single(20).view(self.context);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test here relies on the static call but in other places another ugly stale monstrosity expects the called function to b e non-view so I hack around this by directly using the context thingy.

@benesjan benesjan marked this pull request as ready for review November 13, 2025 19:09
@AztecBot
Copy link
Collaborator

AztecBot commented Nov 13, 2025

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033[38;2;188;109;208mFLAKED\033[0m (\033[38;2;250;217;121m8;;http://ci.aztec-labs.com/11a1f5821f6ba608�11a1f5821f6ba6088;;�\033[0m): yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_multi_proof.test.ts (170s) (code: 1) group:e2e-p2p-epoch-flakes (\033[38;2;188;109;208mJan Beneš\033[0m: refactor!: prohibiting static calls via non-static interface (#18398))

@benesjan benesjan requested review from Thunkar and nventuro November 13, 2025 21:26
@benesjan benesjan force-pushed the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch from b8f587e to caf1409 Compare November 14, 2025 18:58
@benesjan benesjan force-pushed the 11-08-refactor_restructuring_function_macros branch from 38b4974 to 296e47c Compare November 14, 2025 18:58
@AztecBot AztecBot force-pushed the 11-08-refactor_restructuring_function_macros branch from 296e47c to ecd4088 Compare November 18, 2025 17:21
Base automatically changed from 11-08-refactor_restructuring_function_macros to next November 18, 2025 17:58
@benesjan benesjan force-pushed the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch from caf1409 to df09690 Compare November 18, 2025 18:01
@benesjan benesjan enabled auto-merge November 18, 2025 18:02
@benesjan benesjan changed the title refactor: prohibiting static calls via non-static interface refactor!: prohibiting static calls via non-static interface Nov 18, 2025
Fixes F-130

Allowing for this was sad and ugly so I dropped it.
@AztecBot AztecBot force-pushed the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch from df09690 to 23bc889 Compare November 18, 2025 18:24
@benesjan benesjan added this pull request to the merge queue Nov 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 18, 2025
@benesjan benesjan added this pull request to the merge queue Nov 18, 2025
Merged via the queue into next with commit 15f63c9 Nov 18, 2025
15 checks passed
@benesjan benesjan deleted the 11-13-refactor_prohibiting_static_calls_via_non-static_interface branch November 18, 2025 19:30
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.

3 participants