Missed Block help with troubleshooting v8.0.0

So now you need a function to convert a slot number into a date time value for your timezone.

See: And so it begins: reflections on this first Shelley epoch

Shelley first slot: “2020-07-29 21:44:51 UTC”, epoch 208, slot 4492800

echo $(date -d"2020-07-29 21:44:51 UTC" "+%s") - 4492800 | bc # == 1591566291

slot0sec=1591566291

This is a magic number representing the unix time stamp (seconds since 1970-01-01 00:00:00 UTC) for an imaginary slot 0 which assumes that every slot in the past was 1 second in duration. This allows us to calculate the timestamp of any slot since the Shelley era began when slots have all been 1 second duration.

Thanks goes to @HeptaSean for helping me work out that magic number some time ago.

So here is how you can use it to calculate your date time value:

slot=94253339; slot0sec=1591566291;  date --date=@$(("$slot0sec + $slot"))

Sun 04 Jun 2023 05:13:50 AEST

When you run the above on your machine you will see the output for your timezone. (AEST is Australian eastern standard time).

1 Like