We are facing an issue with the update_price_feeds_with_funder function when updating the Pyth price

I am using the update_price_feeds_with_funder function to generate the payload and submit a transaction every 30 seconds.

My price feed ID is:
0x44a93dddd8effa54ea51076c4e851b6cbbfd938e82eb90197de38fe8876bb66e

The testnet endpoint I’m using is:
https://hermes-beta.pyth.network/v2/updates/price/stream?ids[]

In my code, I’ve added logs to verify the fetched price, and the price updates correctly on each transaction. For example:

  • First transaction:
    price: '563526640', publish_time: 1746776909
  • Next transaction:
    price: '563596450', publish_time: 1746776939

The transactions are being submitted successfully. However, some transactions do not return any events, even though they are confirmed on-chain.

This inconsistency is causing issues — in particular, we are seeing the following Pyth error:
pyth: 0x80004

This is my code:


const priceIds = "0x44a93dddd8effa54ea51076c4e851b6cbbfd938e82eb90197de38fe8876bb66e";
const connection = new HermesClient("https://hermes-beta.pyth.network/v2/updates/price/stream?ids[]", {});
const priceFeedUpdateData = await connection.getLatestPriceUpdates(priceIds, {
    encoding: "base64",
});
const binaryDataAsNumbers: number[][] = priceFeedUpdateData.binary.data.map((base64String: string) =>
    Array.from(Buffer.from(base64String, "base64"))
);
const payloadResponse = {
    function: "0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387::pyth::update_price_feeds_with_funder",
    functionArguments: [binaryDataAsNumbers],
    typeArguments: [],
} as InputEntryFunctionData;

Can someone please look into this and help us resolve the issue?

Hey @Ajay, the transaction returns an event once the on-chain state changes and when it doesn’t change it means that the provided update data was not more fresh than the existing one. Are you sure that each time you are sending the transaction the update time is increasing? If so can you log the update data as well as the publish_time between updates and share the information about two consecutive updates?

The error 80004 also means price is stale; in your context it probably means that update data you sent was not fresh, the state didn’t get updated, and when you used it it passed your staleness threshold. What is your staleness threshold?

Hi @ali

Here is the Information about two consecutive updates:

In the first transaction:

  • Price: 569261464
  • Publish Time: 1746787890
    An event was emitted.

In the second transaction:

  • Price: 568762401
  • Publish Time: 1746787919
    No event was emitted.

In the third transaction:

  • Price: 569150459
  • Publish Time: 1746787950
    An event was emitted.

As you can see, the price and publish_time are different in all three transactions. However, only two of them emitted an event, while one did not.

  • Event Emitted Hash: 0xc95fbde9fff563ebf8a56b0bf236d41ace94b68efd83e6db159bdb0e9a04ef4d
  • Event Not Emitted Hash: 0x565ef6758a82b76a41a0395b718b5288f5f4264d13ebd9043a8fb71f85004a92

Could you pls look into this.

I checked this and it seems there was another transaction right before the one with no events that had the exact same update. that’s why. It seems others (or maybe yourself with a different account) are updating the price at the same time.

That being said it should not cause the staleness issue then. How often do you see it.