0chain / 0chain/zboxcli

Optimization proposal from Sculptex

Abierto
#673 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
28
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

https://discord.com/channels/992566329632641056/1045060754103078933/1373235805459316816

Quotes from the discord message from Sculptex:
I have an app that uses the cli tools on the back end to post transactions to the Blockchain (Solana + Züs). Now the miner Active Set is much smaller, just a small number of inactive miners has a more dramatic effect on tx times.

My understanding is that each tx is sent to a random subset of miners. If inoperative miners are included in this subset, then there is a 30s timeout experienced. This can clearly and consistently be seen, the times for cli tx commands to complete consistently falls in the range around 5-7 seconds, 35-37 seconds or even 65-67 seconds. This shows instances of timeouts. The 5+ odd seconds is consistent with a minimum number of blocks passing to ensure finalization which is fine, it's the clear stepping of additional 30 seconds that is a problem.

The simple fix is to reduce the default timeout for miner response in the order of a few seconds max, this way the tx will be retried much quicker with a different set of miners.

This will result in a much more consistent UX.

A different approach that I have had success with is to curate the Active Set list of miners to only include ones that are recently active, so instead of using mainnet/dns/network that returns the entire Active Set, you would have a service running that excludes any miners that are currently inactive, such as active/dns/network.

![Image](https://github.com/user-attachments/assets/b3aeefcd-fbfd-4863-898f-c3235d61e9b7)

![Image](https://github.com/user-attachments/assets/91b80ba5-5095-4fef-8acc-97b739120ca2)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Examine la lógica de envío de transacciones de la herramienta CLI, probablemente en el GoSDK, para encontrar dónde se seleccionan los subconjuntos de mineros y se configuran los tiempos de espera. El issue menciona reducir el tiempo de espera predeterminado para la respuesta del minero y posiblemente curar el Active Set. Comience examinando las funciones de llamadas de red y las configuraciones de tiempo de espera. Probar los cambios requerirá comprender el flujo de transacciones y posiblemente configurar un entorno de prueba para simular las respuestas de los mineros.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go, shell
Área
backend, cli, performance
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.