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

wip: FixingBlock 174731 - ids.a Expected as Integer #431

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

whichqua
Copy link
Collaborator

@whichqua whichqua commented Nov 8, 2024

Issue Number: #429

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

The issue is triggered when calling the get_tx_info() function inside __validate_deploy__.
The steps to fix the issue:

  • Replicate the issue with a simple integration test
  • Find the root of the issue
  • Write a fix
  • Sepolia test

Breaking changes?

  • yes
  • no

@whichqua whichqua marked this pull request as ready for review November 14, 2024 14:59
from starkware.cairo.common.cairo_builtins import HashBuiltin
from starkware.starknet.common.syscalls import library_call, library_call_l1_handler
from starkware.cairo.common.math import assert_not_zero

Copy link
Collaborator

Choose a reason for hiding this comment

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

If there's any context you can add about this file (where it came from, why we have it, etc.) it would be good to add here.

Comment on lines 74 to 90
@raw_input
@external
func __validate_deploy__{
syscall_ptr: felt*,
pedersen_ptr: HashBuiltin*,
ecdsa_ptr: SignatureBuiltin*,
range_check_ptr
} (selector: felt, calldata_size: felt, calldata: felt*) {
alloc_locals;
// get the tx info
let (tx_info) = get_tx_info();
with_attr error_message("assertion failed") {
assert_nn(tx_info.signature_len - 2);
}

return ();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this still needed? If we don't need all of the unusual things here (e.g. @raw_input) in order to test this (as a regression test) then I would suggest removing it or at least adding some documentation about it. Otherwise I can see it adding a lot of confusion in the future.


#[rstest]
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the proxy impact this bug at all? I might apply my same concerns above if not, this is likely to add confusion in the future.

let deprecated_tx_info_ptr =
get_relocatable_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?;
let deprecated_tx_info_ptr = get_ptr_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

HAHAHAHAHAHAHAHHA ❤️

Copy link
Collaborator

@notlesh notlesh left a comment

Choose a reason for hiding this comment

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

LGTM, but I think we should clean up some of the test code that isn't relevant

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