0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
615 stars 152 forks source link

`MastForest`: Ensure that the number of nodes is less than 2^30 #1392

Closed plafer closed 1 month ago

plafer commented 1 month ago

The serialization format of MastForest introduced in #1370 implicitly assumes that the internal value of a MastNodeId fits in 30 bits. Hence, MastForest should enforce this constraint.

sergerad commented 1 month ago

@plafer I would like to have a crack.

I'm assuming adding impl TryFrom<u32> for MastNodeId { is appropriate.

bobbinth commented 1 month ago

Closed by #1394. Thank you again @sergerad!