---
# System prepended metadata

title: Proofs benchmark work

---

# Proofs benchmark work

## Inputs

Can we (today) vary these values at runtime?

- [ ] window_size_mib (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/filecoin-proofs/src/constants.rs#L12-L24))
- [ ] sector_size_gib (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/filecoin-proofs/src/constants.rs#L12-L24))
- [ ] !*wrapping_variant (?) == true
- [ ] drg_parents (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/drgraph.rs#L22-L25))
- [ ] expander_parents (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/stacked/graph.rs#L16-L17))
- [ ] graph_name (? - ignore) skip
- [ ] graph_parents ([here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/stacked/graph.rs#L178-L180)) skip
- [ ] porep_challenges (perhaps [here](https://github.com/filecoin-project/rust-fil-proofs/blob/1e326f572d85059675f80070eb78d1cef02dfda8/filecoin-proofs/src/constants.rs#L5))
- [ ] post_challenges (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/1e326f572d85059675f80070eb78d1cef02dfda8/storage-proofs/src/election_post.rs#L24))
- [ ] stacked_layers (const [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/filecoin-proofs/src/parameters.rs#L12), via [this method](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/stacked/proof.rs#L91-L94))
- [ ] wrapper_parents (potential [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/stacked/proof_scheme.rs#L23-L35)) (ignore)
- [ ] wrapper_parents_all (potentially [here](https://github.com/filecoin-project/rust-fil-proofs/blob/765d3f15a971a92c58dbef2c7a9ef88da9b387cf/storage-proofs/src/stacked/proof_scheme.rs#L23-L35)) (expander parents in the wrapper layer)
- [ ] construction (?) we only support "wrapping variant"

## Outputs

Do any of our benchmarks (today) capture these values?
`_time`: CPU time (not easy to estimate)
`_parallel`: wall clock time (need to check) 
Reading from disk vs snark generation time
Whole EPost
PoRep Vs Post, and micro benchmarks


## Porep

> use time_cpu_time and wall_clock_time = parallel

- [ ] commc_time: time to generate col commit (not available easily) - @schomatis: what's the difference with `window_comm_tree_time` which also generates the tree from the col commit?
- [x] commd_time
- [x] comm_r_last_time (comm_r_last)
- [~] encoding_window_time, @schomatis: have `label_encode_all_windows`, need to be able to divide it by number of windows
- [x] porep_commit_time (add commitments), @schomatis: wrapping entire `transform_and_replicate_layers`
- [x] window_comm_leaves_time (hashing window columns)
- [x] window_comm_tree_time (actual building the tree)
^ transform_and_replicate

- [ ] encoding_time (seal_pre_commit - public API)
- [ ] encoding_time_parallel (seal_pre_commit - public API)
- [ ] decoding_time (get_unsealed_range - public API)
- [ ] decoding_time_parallel (get_unsealed_range - public API)
^API (laser)

^pre commit

Commit phase
- [ ] porep_proof_gen (whole proof)
- [ ] porep_proof_gen_parallel
^API

- [ ] porep_snark_partition_constraints


## Post

- [x] epost_inclusions_time (inclusions is just the inclusion proofs w/out the snark)
- [x] epost_inclusions_time_parallel
- [x] epost_time (the whole PoSt)
- [x] epost_time_parallel
- [ ] epost_mtree_read (reading merkletree)
- [ ] epost_mtree_read_parallel
- [ ] post_leaf_read (read time for the actual leaf)
- [ ] post_snark_constraints 
- [ ] post_snark_partition_constraints 
- [x] post_proof_gen (whole proof)
- [x] post_proof_gen_parallel

## Microbenchmarks 

### Time

- [x] kdf_time
- [x] merkle_tree_datahash_time - sha2 on 64
- [x] merkle_tree_hash_time - pedersen_md on 64
- [ ] snark_constraint_time 
- [ ] wrapper_kdf_time
- [ ] window_read_time (read entire window from disk)
- [x] ticket_hash (32 bytes pedersen_md)



### Constraints

- [ ] replica_inclusion (constraints: single merkle path pedersen)
- [ ] data_inclusion (constraints: sha merklepath)
- [ ] window_inclusion (constraints: merkle inclusion path in comm_c)
- [ ] ticket_constraints - (skip)
- [ ] replica_inclusion (constraints: single merkle path pedersen)
- [ ] column_leaf_hash_constraints - (64 byte * stacked layers) pedersen_md
- [ ] kdf_constraints
- [ ] merkle_tree_datahash_constraints - sha2 constraints 64
- [ ] merkle_tree_hash_constraints - 64 byte pedersen
- [ ] ticket_proofs (constraints: pedersen_md inside the election post)

### Other

- [ ] rig_storage_read_mbs
- [ ] rig_storage_latency 


## Rig settings

- [x] rig_cores
- [x] rig_ram_gib
- [ ] rig_snark_parallelization (number of gpus used)
- [x] rig_storage_parallelization = 1

--- 


## Skipped

- [ ] window_read_time_parallel (ignore)
- [ ] replica_inclusions (skip)
- [ ] wrapper_lookup_read (skip)
- [ ] column_leaf (skip)
- [ ] column_leaves (skip)
- [ ] post_mtree_cached_gib (later, once partial caching is in)
- [ ] post_mtree_layers_cached (later, once paratial caching is in)
- [ ] data_inclusions (skip)
- [ ] post_inclusion_proofs (skip)
- [ ] window_data_inclusions (skip)
- [ ] window_inclusions (skip)
- [ ] window_replica_inclusions (skip)
- [ ] inclusion_proof (skip)
- [ ] labeling_proof (constraints: single label)
- [ ] labeling_proofs (skip)
- [ ] window_labeling_proof (skip)
- [ ] inclusion_proof skip
- [ ] post_ticket_gen (skip)
- [ ] wrapper_lookup_with_mtree (skip)
 [x] post_mtree_read (ignore)
- [x] post_mtree_read_parallel (ignore)
- [x] epost_data_access (ignore)
- [x] epost_data_access_parallel (ignore)
- [x] post_data_access (ignore)
- [x] post_data_access_parallel (ignore)
- [x] post_snark_partition_time (single snark) (ignore, as per @dig)
- [x] post_snark_time (ignore, as per @dig)
- [x] post_snark_time_parallel (ignore, as per @dig)
- [x] post_time (ignore, as per @dig)
- [x] post_time_parallel (ignore, as per @dig)
- [x] epost_leaves_read (ignore)
- [x] epost_leaves_read_parallel (ignore)
- [x] post_challenge_read (ignore)
- [ ] 
## Constants
(ignore)

- [ ] post_snark_partitions
- [ ] node_size
- [ ] node_size_gib
- [ ] node_size_mib
- [ ] window_nodes
- [ ] window_column_leaves
- [ ] commd_size
- [ ] commit_size
- [ ] commr_column_size
- [ ] commr_size
- [ ] commrlast_size
- [ ] kdf_hash_size
- [ ] kdf_hash_size_gib
- [ ] post_proof_size
- [ ] post_snark_size
- [ ] post_snark_size_kib
- [ ] posts_size_per_block
- [ ] posts_size_per_block_kib
- [ ] posts_size_per_year
- [ ] seal_onchain_commitments_size
- [ ] sector_size_gib
- [ ] sector_size_mib
- [ ] snark_size
- [ ] window_size
- [ ] window_size_gib
- [ ] window_size_mib
- [ ] commr_tree_depth
- [ ] polling_time
