ViewData can pair the in-flight proposal with the prepared flag of another proposal
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- distributed-systems
Línea de trabajo
Lee internal/bft/viewchanger.go, especialmente prepareViewDataMsg, e inspecciona los métodos de InFlightData que llama. Añade el acceso coherente al estado de la propuesta y al estado de prepared descrito en el issue y úsalo al construir ViewData; ejecuta las pruebas relevantes del paquete Go y verifica que la propuesta y el indicador prepared reportados provengan de un mismo estado coherente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Written by Claude (Anthropic's AI assistant) on behalf of Hagar Meir.
What happens
ViewChanger.prepareViewDataMsg (internal/bft/viewchanger.go) builds the ViewData from two separate calls to InFlightData:
inFlight := v.getInFlight(lastDecision) // calls v.InFlight.InFlightProposal()
prepared := v.InFlight.IsInFlightPrepared()
Each call takes the InFlightData lock on its own. While the view changer builds the ViewData, the current view can still be running, because AbortView only queues the abort. It can then store a new in-flight proposal between the two calls, through StoreProposal when it saves a pre-prepare, or StorePrepares when it saves a commit. The ViewData then reports one proposal with the prepared flag of another, for example a proposal as prepared although it never was.
How to reproduce
Build ViewData with prepareViewDataMsg repeatedly while another goroutine stores proposals, and marks only some of them as prepared. On main, a few hundred out of 100,000 ViewData messages report as prepared a proposal that was never prepared.
Proposed fix
Add InFlightData.InFlightProposalAndPrepared, which returns the proposal and its prepared flag under one lock, and use it in prepareViewDataMsg.
This doesn't change any message format. The view data simply reports a consistent pair. Making the view changer wait for the previous view to stop before it builds the ViewData is a separate, larger change.
- Lenguaje dominante
- Go
- Estrellas
- 110
- Forks
- 40
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 34
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
- 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 hyperledger/SmartBFT
-
wal files are accumulatingAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
hyperledger/SmartBFT#736 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Set up a pr projectAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
hyperledger/SmartBFT#666 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
hyperledger/SmartBFT#628 · 12 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
hyperledger/SmartBFT#487 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
hyperledger/SmartBFT#439 ·
Los mantenedores suelen responder en 1 día
Todos los issues de hyperledger/SmartBFT
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
router-for-me/CLIProxyAPI#7209 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azure-storage-azcopy#3674 ·
Los mantenedores suelen responder en 1 día
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsPosiblemente ocupada @antcybersec la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
projectdiscovery/dsl#372 ·
Los mantenedores suelen responder en 1 día
-
blocked-needs-validation
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
projectcapsule/capsule#2265 ·
Los mantenedores suelen responder en 1 día
-
Remove "Model catalog refresh unavailable" warning from OpenRouter agent runsPosiblemente ocupada @superplanehq-integration la tomó hoy. Abiertosuperplane
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
superplanehq/superplane#9164 ·
Los mantenedores suelen responder en 1 día