IPFS File Datasource warning messages
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
Línea de trabajo
Comienza reproduciendo el flujo de CID repetido descrito alrededor de IpfsMetadataTemplate.create(cid) y el handler handleIpfsContent. Inspecciona cómo la creación repetida de datasources de archivos IPFS produce la advertencia del runtime host y, después, verifica si la advertencia es inocua y si se puede evitar la creación repetida sin cambiar el comportamiento de las relaciones entre entidades.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi,
I have deployed a subgraph in Subgraph studio.
I'm testing a IPFS File Datasource to gather off-chain metadata info into a chain based handler.
The entity of the off-chain data is defined as:
type IpfsMetadata @entity {
id: Bytes!
metaData: String!
}
The event driven entity is linked this way
type AssetTransfer @entity {
id: Bytes!
tokenId: BigInt!
cid: String!
metaData: IpfsMetadata
}
In mappings file, the following event handler set the relationship:
export function handleAssetTransfer(event: AssetTransferEvent): void {
let entity = new AsssetTransfer(idBytes);
const cid = event.params.cid;
entity.metaData = Bytes.fromUTF8(cid);
IpfsMetadataTemplate.create(cid);
.....
}
I have the following content handler:
export function handleIpfsContent(content: Bytes): void {
let cid = dataSource.stringParam();
let ipfs = new IpfsMetadata(Bytes.fromUTF8(cid));
ipfs.metaData = content.toString();
ipfs.save();
}
Currently, cid are always the same for every indexed event (it's a normal use case), so the following warning is shown through the dashboard after the first IpfsMetadata entity is created:
"no runtime host created, there is already a runtime host instantiated for this data source, address: xxxxxxx, name: IpfsMetadata, runner_index: 1246"
When I query the index to check the AssetTransfer entities, all of them are successfully linked to the unique IpfsMetadata entity, so everything seems to work fine.
However, I don't like the warning log at every new indexed event when cid parameter is repeated.
As entities associated with File Data Sources cannot be accessed by chain-based handlers, there is no way to check whether the IpfsMetada entity does exist to prevent creating a new file datasource template.
Shoud I be aware of the logged message?
Is there any other thing I can do to prevent the warning log?
Best regards
- Lenguaje dominante
- Rust
- Estrellas
- 3.2k
- Forks
- 1.1k
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
graphprotocol/graph-node#6719 ·
-
RUSTSEC-2026-0194: Quadratic run time when checking a start tag for duplicate attribute names Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
graphprotocol/graph-node#6673 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
graphprotocol/graph-node#6650 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
graphprotocol/graph-node#6722 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
graphprotocol/graph-node#6721 ·
Todos los issues de graphprotocol/graph-node
Issues similares
-
risk:low runtime status:in-progress type:test
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
EricSpencer00/Resilient#4835 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
cesarferreira/stax#890 ·