You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to rewrite the FROST cryptographic protocol from Rust to Solidity, and vm.randomBytes would be very useful for that. I could set fuzz.seed = '0xdeadbeef' in Solidity, and use StdRng::from_seed(...) in Rust. This way I can get the same random number generator, which is very convenient for debugging and copying the implementation from Rust code.
I think it makes sense to add RngCore methods as new cheat codes:
vm.randomBytes4 (next_u32)
vm.randomBytes8 (next_u64)
vm.randomBytes (fill_bytes)
Additional context
No response
The text was updated successfully, but these errors were encountered:
I've worked with both Solidity and Rust before, I am confident I can leverage that experience to tackle this issue
How I plan on tackling this issue
I will thoroughly review the RngCore documentation to ensure a solid understanding of how to implement the methods as cheat codes and integrate them effectively into the project.
Component
Forge
Describe the feature you would like
I'm trying to rewrite the FROST cryptographic protocol from Rust to Solidity, and
vm.randomBytes
would be very useful for that. I could setfuzz.seed = '0xdeadbeef'
in Solidity, and useStdRng::from_seed(...)
in Rust. This way I can get the same random number generator, which is very convenient for debugging and copying the implementation from Rust code.I think it makes sense to add
RngCore
methods as new cheat codes:vm.randomBytes4
(next_u32
)vm.randomBytes8
(next_u64
)vm.randomBytes
(fill_bytes
)Additional context
No response
The text was updated successfully, but these errors were encountered: