[BUG]: Handle JSON-RPC notifications and empty batches correctly
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Empieza en minichain/rpc.py y sigue cómo se distribuyen las solicitudes y se construyen las respuestas. Revisa las pruebas existentes de solicitudes RPC y de lotes, y añade cobertura para una notificación, una notificación en un lote y un lote vacío. La tarea estará completa cuando las notificaciones no produzcan ninguna respuesta y un lote vacío devuelva un error -32600 Invalid Request, y las pruebas RPC existentes pasen.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
Description
I noticed two JSON-RPC 2.0 compliance issues in MiniChain's RPC request handling.
Currently, requests without an id receive a response with "id": null, even though JSON-RPC notifications should not receive any response. Also, sending an empty batch ([]) returns an empty array instead of an Invalid Request error.
Steps to Reproduce
1. Notification handling
Send the following request:
{
"jsonrpc": "2.0",
"method": "mc_blockNumber"
}
Observe that the server returns a JSON-RPC response even though the request is a notification.
2. Empty batch handling
Send an empty batch:
[]
Observe that the server returns an empty array instead of an error response.
Expected Behavior
- Valid notification requests should be processed without returning a JSON-RPC response.
- An empty batch should return a single error response with code
-32600and messageInvalid Request.
Actual Behavior
- Notifications currently receive a response with
"id": null. - Empty batches currently return
[].
Proposed Fix
Update the request-handling logic in minichain/rpc.py to follow JSON-RPC 2.0 notification and batch-processing requirements.
Testing
- Test valid notification requests.
- Test notifications inside a batch.
- Test empty batch requests.
- Ensure existing RPC request and batch tests continue to pass.
Steps to Reproduce
No response
Logs and Screenshots
No response
Environment Details
No response
Impact
Medium
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Lenguaje dominante
- Python
- Estrellas
- 12
- Forks
- 27
- Merge medio
- 2 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 StabilityNexus/MiniChain
-
automatic-copyright-year: keep README copyright currentPosiblemente ocupada @anshulchikhale30-p la tomó hace 7 días. Abiertodocumentation enhancement
Dificultad 3/5 Medio día Aptitud para principiantes 35/100
StabilityNexus/MiniChain#189 ·
Los mantenedores suelen responder en 1 día
-
Difficulty: bound per-block EMA moves, add a difficulty floor, and preserve state across restartsPosiblemente ocupada @anshulchikhale30-p la tomó hace 7 días. Abiertobug documentation enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
StabilityNexus/MiniChain#187 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Blocks on a different parent are classified INVALID and get the sender bannedPosiblemente ocupada @kansalakshat la tomó hace 7 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
StabilityNexus/MiniChain#185 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: P2P sync downloads full 500-block chunks without headers-first validationPosiblemente ocupada @anshulchikhale30-p la tomó hace 14 días. Abiertobug documentation enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
StabilityNexus/MiniChain#178 ·
Los mantenedores suelen responder en 1 día
-
[FEATURE]: Add transaction and receipt lookup RPC methodsPosiblemente ocupada @Thushara3005 la tomó hace 10 días. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
StabilityNexus/MiniChain#176 ·
Los mantenedores suelen responder en 1 día
Todos los issues de StabilityNexus/MiniChain
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/datasets#9128 ·
Los mantenedores suelen responder en 1 día
-
priority:low ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenHands/extensions#975 ·
Los mantenedores suelen responder en 1 día
-
Function/dict state handlers can't supply provider-state injected values (`generate.provider_state`)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pact-foundation/pact-python#1789 ·
Los mantenedores suelen responder en 9 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
juandresrodca/AdminForge#66 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día