Cairo 0 class hash contains the unicode bug #698
Description
In the process of copying pathfinder's code for the class hash you left out the unicode bug fix.
The function is there, but left unused for some reason.
For context, here is the pathfinder code.
The unicode re-encoding is required because rust's serde and the python library used by the sequencer encode unicode differently. This means your class hash will not match the python sequencer when there is unicode present in the class definition. This is the same bug which stalled mainnet last weekend. See our post-mortem for context.
Our implementation isn't very efficient since it was an emergency fix, but you definitely need it.
A good test case is simply taking the class definition from mainnet which showcased the bug: 0x00801AD5DC7C995ADDF7FBCE1C4C74413586ACB44F9FF44BA903A08A6153FA80
.
On a side note, if you're going to copy a large chunk of our code maybe just leave some comments crediting pathfinder as well 👍
Metadata
Metadata
Assignees
Labels
Type
Projects
Status