2

I'm running a private beacon chain with the Lighthouse client with some local validators:

Mar 23 10:35:08.281 INFO Block from local validator              block_slot: 13009, block_root: 0x2bab…25a6, service: http
Mar 23 10:35:12.010 INFO Attestation from local validator        slot: 13009, index: 0, source: 403, target: 403, service: http
Mar 23 10:35:14.001 INFO Synced                                  slot: 13009, epoch: 406, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier
Mar 23 10:35:20.247 INFO Block from local validator              block_slot: 13010, block_root: 0x91df…1c45, service: http
Mar 23 10:35:24.013 INFO Attestation from local validator        slot: 13010, index: 0, source: 403, target: 403, service: http
Mar 23 10:35:26.000 INFO Synced                                  slot: 13010, epoch: 406, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier

It shows a Block from local validator - fine, I guess that's a block as in block chain, isn't it? That block has a block_slot: 13009 - is that the block number? What is a slot?

What is an Attestation from local validator for slot: 13009?

Now, and this is what puzzles me most, once I shut down my validators, I will see the following:

Mar 23 10:39:02.001 INFO Synced                                  slot: 13028, epoch: 407, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier
Mar 23 10:39:14.000 INFO Synced to current epoch                 current_slot: 13029, head_slot: 13028, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier
Mar 23 10:39:26.000 INFO Synced to current epoch                 current_slot: 13030, head_slot: 13028, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier
Mar 23 10:39:38.001 INFO Synced to current epoch                 current_slot: 13031, head_slot: 13028, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier
Mar 23 10:39:50.001 INFO Synced to current epoch                 current_slot: 13032, head_slot: 13028, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier

What is current_slot: 13032? Is it empty on purpose? Why is it progressing even though the validators are offline?

Once I turn back on my validators, it creates blocks in the current slot skipping the previous ones:

Mar 23 10:40:20.267 INFO Block from local validator              block_slot: 13035, block_root: 0x829b…a2ef, service: http
Mar 23 10:40:24.016 INFO Attestation from local validator        slot: 13035, index: 0, source: 403, target: 403, service: http
Mar 23 10:40:26.000 INFO Synced                                  slot: 13035, epoch: 407, finalized_epoch: 398, finalized_root: 0x17e7…eee2, peers: 3, service: slot_notifier

So what is a slot and what is a block and why is there a need to have that differentiation?

3

I recommend the linked article for an overview of the beacon chain. The following is basically paraphrased from there:

Slots are twelve-second periods of time where blocks can be added to the beacon chain and/or shards. They can be empty, if no block is created during that slot.

Blocks are, as far as I know, what they used to be - an actual block containing block data.

If I am not mistaken, the need for both is in order to be able to coordinate nodes. With sharding, nodes will be looking at different shards of Eth2.0, and are shuffled around for security reasons. Slots allow the different nodes (particularly validators) to be moved around with a certain level of synchronization.

I think that answers all of the questions except for the mystery around block 13032. I'm not sure exactly what happened there. Perhaps the client finished a slot while it was closing, and still seals that last slot? I would guess in that direction, but don't know more than that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.