Have Batch contain Block and batch ID, ensuring eclipsed validators don't publish invalid shares

See prior commit message for more info.

With the plan for the batch sign ID to be just 5 bytes (potentially 4), this
does incur a +5 bytes cost compared to the ExternalBlock system *even in the
standard case*. The simplicity remains preferred at this time.
This commit is contained in:
Luke Parker
2023-08-31 23:04:37 -04:00
parent 9a5f8fc5dd
commit 9b7cb688ed
4 changed files with 13 additions and 8 deletions

View File

@@ -443,7 +443,7 @@ pub async fn handle_application_tx<
}
}
Transaction::Batch(batch) => {
Transaction::Batch(_, batch) => {
// Because this Batch has achieved synchrony, its batch ID should be authorized
TributaryDb::<D>::recognize_id(txn, Zone::Batch.label(), genesis, batch);
recognized_id(spec.set().network, genesis, RecognizedIdType::Batch, batch).await;