Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Given a day of the voting date find the hour that maximizes the…
… probability that the upgrade happens during working hours (#12204) Usage: `python3 estimate_epoch_start_time.py --chain_id mainnet --voting_date_day "2024-10-23" --timezone cet` <details><summary>Example Output</summary> ``` Epoch -1: 13 hours, 19 minutes Epoch -2: 13 hours, 15 minutes Epoch -3: 13 hours, 23 minutes Epoch -4: 13 hours, 17 minutes Exponential weighted average epoch length: 13 hours, 18 minutes Predicted start of epoch 1: 2024-10-22 05:18:32 CEST+0200 Tuesday Predicted start of epoch 2: 2024-10-22 18:37:26 CEST+0200 Tuesday Predicted start of epoch 3: 2024-10-23 07:56:19 CEST+0200 Wednesday Predicted start of epoch 4: 2024-10-23 21:15:12 CEST+0200 Wednesday Predicted start of epoch 5: 2024-10-24 10:34:05 CEST+0200 Thursday Predicted start of epoch 6: 2024-10-24 23:52:58 CEST+0200 Thursday Predicted start of epoch 7: 2024-10-25 13:11:51 CEST+0200 Friday Predicted start of epoch 8: 2024-10-26 02:30:45 CEST+0200 Saturday Predicted start of epoch 9: 2024-10-26 15:49:38 CEST+0200 Saturday Predicted start of epoch 10: 2024-10-27 04:08:31 CET+0100 Sunday Voting hours on 2024-10-23 UTC that result in upgrade during working hours (UTC 8:00-22:00): - 00:00, Upgrade Epoch: 4 - 01:00, Upgrade Epoch: 4 - 02:00, Upgrade Epoch: 4 - 03:00, Upgrade Epoch: 4 - 04:00, Upgrade Epoch: 4 - 05:00, Upgrade Epoch: 4 - 06:00, Upgrade Epoch: 5 - 07:00, Upgrade Epoch: 5 - 08:00, Upgrade Epoch: 5 - 09:00, Upgrade Epoch: 5 - 10:00, Upgrade Epoch: 5 - 11:00, Upgrade Epoch: 5 - 12:00, Upgrade Epoch: 5 - 13:00, Upgrade Epoch: 5 - 14:00, Upgrade Epoch: 5 - 15:00, Upgrade Epoch: 5 - 16:00, Upgrade Epoch: 5 - 17:00, Upgrade Epoch: 5 - 18:00, Upgrade Epoch: 5 - 19:00, Upgrade Epoch: 5 ``` </details>
- Loading branch information