Skip to content

Conversation

@dorimedini-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator Author

dorimedini-starkware commented Oct 1, 2025

@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 9754472 to 8d45e17 Compare October 5, 2025 07:45
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 40cdcc7 to 7ae9c81 Compare October 5, 2025 07:45
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 8d45e17 to 18289c2 Compare October 5, 2025 09:37
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 7ae9c81 to f661e8b Compare October 5, 2025 09:37
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 18289c2 to 22ee8e9 Compare October 6, 2025 16:50
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 005607e to 015129c Compare October 14, 2025 10:21
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from b1c6cea to a010edf Compare October 14, 2025 10:21
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 015129c to da00d3d Compare October 15, 2025 11:15
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from a010edf to 1460e98 Compare October 15, 2025 11:16
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from da00d3d to 726ee8b Compare October 15, 2025 11:52
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 1460e98 to 68be87e Compare October 15, 2025 11:53
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from 726ee8b to ade5ad1 Compare October 19, 2025 07:04
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 68be87e to 87b8d4e Compare October 19, 2025 07:04
@dorimedini-starkware dorimedini-starkware force-pushed the 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract branch from ade5ad1 to 7860b39 Compare October 19, 2025 18:42
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 87b8d4e to 4fddda3 Compare October 19, 2025 18:42
Copy link
Contributor

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

Why not adding every util in the PR which you need to use it?

@AvivYossef-starkware reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware and @Yoni-Starkware)


crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 41 at r1 (raw file):

    func set_value(address: felt, value: felt) {
    }
}

I done see it in py test contracrt.
Consider create a new file test_contract_interface.cairo like we have in python

Code quote:

@contract_interface
namespace TestContract {
    func set_value(address: felt, value: felt) {
    }
}

crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 74 at r1 (raw file):

    assert new_value = value + 1;
    return ();
}

I know that its coppied from pyhton but consider giving better name to the function

Code quote:

@external
func entry_point{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*}() {
    const address = 15;

    let (value) = storage_read(address=address);
    storage_write(address=address, value=value + 1);
    let (new_value) = storage_read(address=address);

    assert new_value = value + 1;
    return ();
}

crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 115 at r1 (raw file):

) {
    let (diffs: felt*) = alloc();
    assert (diffs[0], diffs[1]) = (amount, 0);

does diffs represent the amount of deposit for 2 different tokens?
why we update the balance index is according the l1_address?

Code quote:

assert (diffs[0], diffs[1]) = (amount, 0);

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @meship-starkware)


crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 116 at r1 (raw file):

    let (diffs: felt*) = alloc();
    assert (diffs[0], diffs[1]) = (amount, 0);
    advance_counter(index=from_address, diff_0=amount, diff_1=0);

Suggestion:

    advance_counter(index=from_address, diff_0=amount, diff_1=0);

@graphite-app graphite-app bot changed the base branch from 09-30-blockifier_test_utils_add_test_contract2_cairo0_contract to graphite-base/9483 October 22, 2025 08:58
@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from 4fddda3 to a6e3a01 Compare October 22, 2025 10:22
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/9483 to main October 22, 2025 10:22
Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

tried to do that for most utils, but adding things to contracts makes the PR large sometimes + involves fixing existing tests

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware, @meship-starkware, and @Yoni-Starkware)


crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 41 at r1 (raw file):

Previously, AvivYossef-starkware wrote…

I done see it in py test contracrt.
Consider create a new file test_contract_interface.cairo like we have in python

the issue is that in the blockifier we compile each contract as a standalone file; we cannot compile several modules into one JSON


crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 115 at r1 (raw file):

Previously, AvivYossef-starkware wrote…

does diffs represent the amount of deposit for 2 different tokens?
why we update the balance index is according the l1_address?

removed the diffs, it wasn't needed


crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo line 116 at r1 (raw file):

    let (diffs: felt*) = alloc();
    assert (diffs[0], diffs[1]) = (amount, 0);
    advance_counter(index=from_address, diff_0=amount, diff_1=0);

Done.

@github-actions
Copy link

Benchmark movements: No major performance changes detected.

Copy link
Contributor

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

@AvivYossef-starkware reviewed 10 of 10 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @Yoni-Starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 10-01-blockifier_test_utils_add_functionality_to_test_contract_for_test_os_logic branch from a6e3a01 to 5309233 Compare October 22, 2025 15:01
Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 10 of 10 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 879fe35 Oct 22, 2025
23 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants