Limit on Vec Byte log size

Is there a limit on log size for Vec

We’re emitting metadata vec as metadata_values: Vec in a log struct.

Getting this error on the indexer side when trying to parse:

FuelError: Invalid vec byte data size.

(Getting via contract function, the values return just fine)

Hi @xpluscal,

This is actually an error thrown by the TS SDK during decoding. We have checks that validate the size of the bytes passed to the decoder against the type being decoded to defend against overflow and underflow issues.

Where are you retrieving the log bytes and how are you building the struct decoder? A small reproduction would be helpful here.

Hey @danielbate the decoder used is envio’s HyperIndex decoder aka not ours. I’m in talks with their team now to figure it out.

So from your end there’s no inherent limit?

So basically we can assume that their decoder doesn’t decode the value correctly?

What’s being logged in the event for the indexer is a couple of things, here’s the log struct:


pub struct InitEditionEvent {
    pub contract_id: ContractId,
    pub owner: Identity,
    pub name: String,
    pub symbol: String,
    pub metadata_keys: Vec<String>,
    pub metadata_values: Vec<Metadata>,
    pub price: u64,
    pub start_date: u64,
    pub end_date: u64,
}

We check for a byte length less than max u32 but I’d expect it to throw for that much earlier. Here is where the vec decode throws.

Their may be an issue with the decoder yes but it sounds like it wraps our coders if it’s throwing our errors. Do you have the logged bytes?