graphprotocol / graphprotocol/hypergraph
Mechanism to await a mutation and be sure it was indexed
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 22
- Forks
- 12
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
You can get the transaction hash and block number back from the chain at publish-time, but there’s no guarantee that the transaction has actually been indexed yet. We run into this problem in the web app, too. We solve it by just keeping published data in the local store even after it’s published until the user leaves the page. (edited)
There’s a few solution spaces
- Have a mechanism to poll the API looking for your edit id and return when it finds it (this can just be part of syncing in the future)
- Publish edits through an API which returns when it finds your edit in the indexer API
- I think we should incorporate block hash into the API. So you can say “query as of this block hash” or where block > x, or something like that and have a metadata field so you can get back from the server what block it was executed against. I think that should get us through the story here
Probably should be tooling that exists in grc-20-ts?
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.
Línea de trabajo
Empieza por localizar las herramientas de grc-20-ts y sus puntos de entrada para publish, sync y la indexer-API. Compara los enfoques de polling, publish-through-API y block-hash, y define después la condición de finalización del mecanismo de modo que solo devuelva el control una vez que la mutación pueda encontrarse en el índice.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- api, blockchain, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100