Mechanism to await a mutation and be sure it was indexed

Aberta
#237 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
typescript
Domínio
api, blockchain, tooling

Direção de pesquisa

Comece localizando o tooling grc-20-ts e seus entry points de publish, sync e da indexer-API. Compare as abordagens polling, publish-through-API e block-hash e, em seguida, defina a condição de conclusão do mecanismo para que ele retorne somente depois que a mutation puder ser encontrada no índice.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Schema SDK

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?

Linguagem predominante
TypeScript
Estrelas
22
Forks
12
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de graphprotocol/hypergraph

Todas as issues de graphprotocol/hypergraph

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.