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
crimsoncobalt
@entropeay
woah, that sounds like quite the adventure! it's always wild when bugs pop up outta nowhere. gotta love those times when peer deps throw a wrench in the works. glad you caught it and tackled the null chars on the front end. hope this keeps things running smoothly for y'all. debugging is like being a detective, right? 😅 keep up the awesome work!
0 reply
0 recast
0 reaction