Readiness succeeds before a valid eth_chainId when no expected chain ID is supplied

Abierto
#131 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Osraka ya está trabajando en esto.

Desde el 26/11/2026.

  • #132 de @Osraka — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

Start with Server.start() and the readiness tests described in the issue. Check how the eth_chainId response is validated before the optional expected-chain comparison, then run the readiness tests with invalid-then-valid, invalid-until-timeout, valid-first, and explicit mismatch cases. Done means invalid responses do not signal readiness, while valid responses and the existing mismatch behavior work as described.

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

Descripción

At 2c4f686, Server.start() with a configured external URL and no expected chain ID reports readiness after any HTTP-200 string result for eth_chainId. That includes a warm-up response that isn't a chain ID. EIP-695 specifies a hexadecimal integer string.

I used a localhost-only fixture which returns "initializing" on its first probe, then "0x539". The real Prool server returns from start() after one probe. I expected it to wait for the second response. All eight existing readiness tests pass when run separately from the file's unrelated Anvil setup.

Would it make sense to validate the returned chain ID independently of comparing it with an expected chain? A small follow-up would cover invalid then valid, invalid until timeout, and the existing explicit chain-ID mismatch behavior without changing instance lifecycle behavior.

Readiness controls

I extended the localhost-only fixture to cover a permanently invalid response and a valid first response. On 2c4f686, the valid-first control succeeds with one probe, but all three invalid-then-valid variants stop after the invalid probe, and the invalid-only case resolves instead of timing out. With a local hexadecimal result check before the optional expected-chain comparison, all 13 tests passed (eight existing readiness cases and five new cases). No live RPC endpoint or Anvil process was used.

Lenguaje dominante
TypeScript
Estrellas
142
Forks
28
Merge medio
4 h 15 min
PR fusionados (30 d)
8

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wevm/prool

Todos los issues de wevm/prool

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.