hub-monorepo
hub-monorepo copied to clipboard
castsByParent with `reverse` parameter fails on popular channels
What is the bug?
When using certain channels as parent for castsByParent
, the data lookup errors only when reverse=1.
ie.
const resp = await fetch(
`${API_URL}/v1/castsByParent?pageSize=1&reverse=1&url=https://warpcast.com/~/channel/${channel}`,
{
method: "GET",
}
);
Will succeed on some channels like bikes
and fail on ones like degen
.
Error returned is here:
{
code: 2,
details: 'db.internal_error/could not get message with key: [ ... ]',
metadata: { errcode: [ null ] }
}
https://github.com/farcasterxyz/hub-monorepo/blob/26ced763673da456f74c041ce7084e2813c83720/apps/hubble/src/addon/src/store/message.rs#L312
How can it be reproduced? (optional)
Try calling castsbyparent (api or at the rpc level) with url equal to the degen channel for instance, and set reverse to 1
.
Additional context (optional) Perhaps related to channel size?
Ty for taking a look 🙇 🟣