bug: ProposedBlock::Deserializable skips all validation in read_from validation bypass via deserialization
- Lingua principale
- Rust
- Stelle
- 132
- Fork
- 167
- Merge medio
- 1g 23h
- PR unite (30g)
- 110
Descrizione
### Packages versions
miden-protocol: next branch
### Bug description
ProposedBlock::read_from constructs the struct directly without calling new_at, so all validation is skipped during deserialization.
This is unlike ProposedBatch::read_from which correctly calls new_batch_inner.
Skipped checks: duplicate batches, timestamp monotonicity, batch expiration, chain consistency, NoteTracker (duplicate notes, circular deps, unauthenticated note auth), nullifier witnesses, account update consistency.
Impact: A corrupted/malicious serialized block passes deserialization and only fails later (or not at all), causing late failure and confusing errors.
### How can this be reproduced?
1. Serialize a valid ProposedBlock
2. Corrupt it (e.g., duplicate a batch ID)
3. Deserialize with read_from_bytes()
4. It succeeds validation skipped!
5. Only fails later when into_header_and_body() is called
ProposedBatch does this correctly by calling new_batch_inner in read_from. ProposedBlock should do the same with new_at.
### Relevant log output
```shell
No logs structural code issue.
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.