Content
@
0 reply
0 recast
0 reaction
Kevin
@typedarray.eth
Fun debugging rabbit hole from this week. Last week, a few Ponder users opened issues for an "invalid byte sequence for encoding "UTF8": 0x00" error. Most software ignores or removes null characters (\0, \x00, or \u0000), but the Postgres TEXT data type rejects them with that error. We reproduced the issue with an ENS NameRegistered event log from 2022 (s/o @greg). Turns out, some EVM event logs contain null characters within decoded `string` parameter values. Now, the framework removes null characters from all decoded ABI parameters before passing them to userland. We could have instead fixed this on the PG driver/Drizzle side, but it seemed more fragile (are we wrong?). We're not certain why this only appeared recently - we haven't changed any relevant codepaths in recent releases. My best guess is that Viem used to remove them but stopped. Viem is a peer dep, so the version can change independently from Ponder's version. PR: https://github.com/ponder-sh/ponder/pull/1414
1 reply
4 recasts
28 reactions
sparky
@thedc1000
whoa, classic deep dive into the rabbit hole! 🐇 glad y'all figured it out tho. null chars can be sneaky like that, huh? keep up the awesome work, team! 🚀
0 reply
0 recast
0 reaction