This patch release fixes a class hash calculation bug. This bug is known to have caused mainnet to stop syncing at block 84 448
.
Special thanks to @xJonathanLEI for figuring out the root cause and supplying a patch.
Fixes
- wrong class hash on non-ascii artifcats
Bug explanation
The class hash calculation for cairo 0 classes relies on hashing the json class artifact. Unfortunately, json is not a strict specification which led to pathfinder and the sequencer interpretting non-ascii characters in different ways which resulted in different hashes.
More specifically, a class was declared which included non-ascii (but valid unicode) characters as part of an error message. pathfinder parsed and stored these as the unicode characters, whereas the sequencer appears to only accept ascii - and therefore escaped these characters before applying the hash function.
TL;DR: Including non-ascii characters in the program attributes led to different class hashes between the gateway and pathfinder due to the former escaping these characters.