Skip to content

Commit 74209d6

Browse files
committed
Increase unwind threshold for kani block proofs
1 parent af06b2d commit 74209d6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lading_payload/src/block.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ mod verification {
811811
/// Function `chunk_bytes` will always fail with an error if the passed
812812
/// `block_byte_sizes` is empty.
813813
#[kani::proof]
814+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
814815
fn chunk_bytes_empty_sizes_error() {
815816
let total_bytes: NonZeroU32 = kani::any();
816817
let block_byte_sizes = [];
@@ -826,6 +827,7 @@ mod verification {
826827
/// Function `chunk_bytes` should not fail if no member of block sizes is
827828
/// large than `total_bytes`.
828829
#[kani::proof]
830+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
829831
fn chunk_bytes_sizes_under_under_check() {
830832
let total_bytes: NonZeroU32 = kani::any_where(|x: &NonZeroU32| x.get() < 64);
831833
let mut block_chunks: [u32; 10] = [0; 10];
@@ -841,6 +843,7 @@ mod verification {
841843
/// Function `chunk_bytes` should not fail if no member of block sizes is
842844
/// large than `total_bytes`.
843845
#[kani::proof]
846+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
844847
fn chunk_bytes_sizes_under_equal_check() {
845848
let total_bytes: NonZeroU32 = kani::any();
846849
let mut block_chunks: [u32; 10] = [0; 10];
@@ -857,6 +860,7 @@ mod verification {
857860
/// Function `chunk_bytes` will fail if any member of `block_byte_sizes` is
858861
/// larger than `total_bytes`.
859862
#[kani::proof]
863+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
860864
fn chunk_bytes_sizes_under_equal_over_check() {
861865
let total_bytes: NonZeroU32 = kani::any();
862866
let mut block_chunks: [u32; 10] = [0; 10];
@@ -873,6 +877,7 @@ mod verification {
873877

874878
/// Function `chunk_bytes` does not fail to return some chunks.
875879
#[kani::proof]
880+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
876881
fn chunk_bytes_never_chunk_empty() {
877882
let total_bytes: NonZeroU32 = kani::any();
878883
let byte_sizes: [NonZeroU32; 5] = [
@@ -895,7 +900,7 @@ mod verification {
895900
/// Function `chunk_bytes` does not return a chunk that is not present in
896901
/// the byte sizes.
897902
#[kani::proof]
898-
#[kani::unwind(15)]
903+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
899904
fn chunk_bytes_always_present() {
900905
let total_bytes: NonZeroU32 = kani::any();
901906
let byte_sizes: [NonZeroU32; 5] = [
@@ -920,7 +925,7 @@ mod verification {
920925
/// Function `chunk_bytes` does not populate values above the returned
921926
/// index, that is, they all remain zero.
922927
#[kani::proof]
923-
#[kani::unwind(15)]
928+
#[kani::unwind(101)] // unwind threshold set to block_chunks.len() ^ 2 + 1
924929
fn chunk_bytes_never_populate_above_index() {
925930
let total_bytes: NonZeroU32 = kani::any();
926931
let byte_sizes: [NonZeroU32; 5] = [

0 commit comments

Comments
 (0)