Alpha/VDF: reduce the nonce revelation period and the VDF difficulty
What
Reduced the nonce revelation period from 960 levels to 300 levels (ie 40 minutes), roughly matching the reduction of the cycle length in Rio. Reduced accordingly the VDF difficulty as well, from 8B to 2.4B.
Why
This should have been done in Rio.
Note: 960 * 10800 / 30720 = 337.5 (which corresponds to 45 minutes). We used a smaller value just to have a round value.
Manually testing the MR
We tested the MR with these 2 methods.
(1) Update the difficulty in this bench and run it with dune exec benchmark/bench_vdf_self_contained.exe.
(2) Take a mainnet snapshot corresponding to a level with a cycle position after the nonce revelation period and before having a VDF solution (so in the first half of the cycle but after level 960). Set a UAU soon after this level, migrate to Alpha using this MR's branch, run the VDF daemon and then bake normally. Check when the VDF daemon injects a revelation operation.
Check the times: adjust to your CPU's frequency and check that the adjusted time is a around half the cycle length (that is around 12h) for a 2GHz CPU.