Skip to content

Latest commit

 

History

History
34 lines (17 loc) · 1.81 KB

chapter3.md

File metadata and controls

34 lines (17 loc) · 1.81 KB

Chapter 3: Play with time

So far we have always been hooking up to the live blockchain visualising what is happening right now. We ideally want to be able to also go back to any point in time and replay history.

But to start with you have to break everything so we're back to square one:

broken

After a bit of toil, managed to get one relay chain working for one point in history:

relay-point-in-time

And then finally the parachains - but this time we're being driven by the data on the relay chain as to what parachain blocks to display:

parachains-in-time

Ah realise that the atmosphere is interfearing with the rainbows, leading to rendering grayness at certain depths. Bug be banished!

bug-banishd

So far so good and starting to look pretty again:

pretty-good

For quite a while I wanted to have Kusama's own style start to shine through. And so we have some initial dark side of Kusama showing it's true colors. We have also started spacing out the blocks on the x-axis based on the timestamps extrinsic in the blocks.

darkside

On the UI you can select any block number (say 1,000,000), but it would display the millionth block on both Kusama and Polkadot, but these are far away in time. I have changed the code so that it will map the block number to the timestamp and then find the corresponding timestamp on the other relay chain:

truetime

To be continued... (by your ideas in the issue tracker or a PR?)