toposware / certificate-stark

An example of state-transition AIR program backed by the winterfell library.
Apache License 2.0
3 stars 1 forks source link

Use full-depth tree #12

Closed Nashtare closed 2 years ago

Nashtare commented 2 years ago

We're currently using two different Tree depth constants for unit tests and general use mode, i.e. 4 or 16.

The actual expected state of a subnet would be rather 2^32, which would require to generate an empty tree directly through hardcoded nodes at each layer, to prevent tree creation time to blow-up. It would be also helpful to test performances in real conditions.

This would be directly implemented in https://github.com/Toposware/winterfell/tree/main/crypto/src/merkle/mod.rs with the other helper methods.

Nashtare commented 2 years ago

@baumbata, I believe you had looked at this about 2 months ago, did you find anything blocking?

baumbata commented 2 years ago

I don't think there was anything blocking. I do have code written on a branch somewhere I could dust off. It just didn't get tested before I switched gears to working on the constraints for the composite AIR program.

Nashtare commented 2 years ago

Partially addressed with PR #18. Would need something like RocksDB to manage such a large tree with regular machines. Will consider reopening depending on the integration path when integrated to our framework.