madara
madara copied to clipboard
bug:Retrieving class for contract version 0 reported an error
Bug Report
Madara version:
commit: 38ef50e00a7c53ef55b5b2eb9a9f59426738de03 Current behavior:
In the file starknet-rpc-test/get_class_at.rs, line 67:
let program: LegacyProgram = serde_json::from_str(data.as_str())?;
reported: Error: invalid type: map, expected string at line 1 column 134
"{"prime":"0x800000000000011000000000000000000000000000000000000000000000001","builtins":["pedersen","range_check","bitwise"],"data":[{"Int":{"value":{"val":[2147450879,67600385]}}},{"Int":{"value":{"val":[1]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147188732,1073971200]}}},{"Int":{"value":{"val":[2147188733,1073971201]}}},{"Int":{"value":{"val":[2147188736,1210482689]}}},{"Int":{"value":{"val":[3]}}},{"Int":{"value":{"val":[2147188736,1208123394]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147581952,285507585]}}},{"Int":{"value":{"val":[0,0,0,0,0,0,17,134217728]}}},{"Int":{"value":{"val":[2147385344,1210351617]}}},{"Int":{"value":{"val":[4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,16,134217728]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147450880,1208385537]}}},{"Int":{"value":{"val":[1918985076,1131376244,1130458220]}}},{"Int":{"value":{"val":[2147057663,1073905664]}}},{"Int":{"value":{"val":[2147057658,1073971201]}}},{"Int":{"value":{"val":[2147057659,1073971202]}}},{"Int":{"value":{"val":[2147057660,1073971203]}}},{"Int":{"value":{"val":[2147057661,1073971204]}}},{"Int":{"value":{"val":[2147057664,1210482689]}}},{"Int":{"value":{"val":[7]}}},{"Int":{"value":{"val":[2147057664,1208123397]}}},{"Int":{"value":{"val":[2147057664,1208123398]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147450880,1208385537]}}},{"Int":{"value":{"val":[1130458220,1918988921,5007714]}}},{"Int":{"value":{"val":[2147057663,1073905664]}}},{"Int":{"value":{"val":[2147057658,1073971201]}}},{"Int":{"value":{"val":[2147057659,1073971202]}}},{"Int":{"value":{"val":[2147057660,1073971203]}}},{"Int":{"value":{"val":[2147057661,1073971204]}}},{"Int":{"value":{"val":[2147057664,1210482689]}}},{"Int":{"value":{"val":[7]}}},{"Int":{"value":{"val":[2147057664,1208123397]}}},{"Int":{"value":{"val":[2147057664,1208123398]}}},{"Int":{"value":{"val":[2147450878,546013183]}}},{"Int":{"value":{"val":[2147450880,1208385537]}}},//<-- This is where column 134 should be
Expected behavior:
No error reported
Steps to reproduce:
Run work_ok_retrieving_class_for_contract_version_0 unit test
Related code:
insert short code snippets here
ContractClass::Legacy(c) => {
// decompress program
let mut d = GzDecoder::new(&c.program[..]);
let mut data = String::new();
d.read_to_string(&mut data).unwrap();
let program: LegacyProgram = serde_json::from_str(data.as_str())?;
Other information:
This test is currently ignored: https://github.com/keep-starknet-strange/madara/blob/38ef50e00a7c53ef55b5b2eb9a9f59426738de03/starknet-rpc-test/get_class_at.rs#L47C13-L47C20 until #1469 is solved.
Which is the purpose of your PR #1523.
This issue seems to say that the test is failing at a commit that does not contain your PR changes. Does it still fail on your #1523 branch?
@tdelabro Thank you for your commit. This issue arose from a recent update to the codebase. My PR #1523 addresses the missing "main_scope" field reported in issue #1469. The solution was tested with commit 5e68494fe9d96b522afe95167e51a7429e1dce1b.
@fishseabowl can you list the next steps please? What to merge now? What to fix later?
@fishseabowl can you list the next steps please? What to merge now? What to fix later?
@tdelabro The PR #1523 is ready to be merged. After that, we'll look into why ContractClass::Legacy serde_json format isn't decoding correctly in this issue #1585 and fix it. Thanks
#1523 has been merged
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
I changing a lot of stuffs related to this here: https://github.com/keep-starknet-strange/madara/pull/1631
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
repository archived in favor of https://github.com/madara-alliance/madara