github eqlabs/pathfinder v0.6.1

latest releases: v0.14.4, v0.14.3, v0.14.2...
17 months ago

This 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.

Don't miss a new pathfinder release

NewReleases is sending notifications on new releases.