remove NonePod and use dummy signed pods (#272)

* remove NonePod and use dummy signed pods

* apply suggestion by @arnaucube
This commit is contained in:
Eduard S. 2025-06-13 10:14:15 +02:00 committed by GitHub
parent 03485d6fd3
commit 3b4edab1f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 49 deletions

View file

@ -1464,12 +1464,9 @@ impl InnerCircuit for MainPodVerifyTarget {
}
// Padding
if input.signed_pods.len() != self.params.max_input_signed_pods {
// TODO: Instead of using an input for padding, use a canonical minimal SignedPod,
// without it a MainPod configured to support input signed pods must have at least one
// input signed pod :(
let pad_pod = &input.signed_pods[0];
let dummy = SignedPod::dummy();
for i in input.signed_pods.len()..self.params.max_input_signed_pods {
self.signed_pods[i].set_targets(pw, pad_pod)?;
self.signed_pods[i].set_targets(pw, &dummy)?;
}
}