--- tags: ethereum,lighthouse --- # Attestation Duty updates when depedent root changes Tests for PR branch: https://github.com/sigp/lighthouse/pull/4170. ## Local Testnet ### Re-org Scenario The first scenario I was looking to verify was a re-org of slot 31 in epoch `N` that would cause duties for epoch `N+2` to change. However, this is very rare on Goerli, because *intentional* late block re-orgs are not allowed at epoch boundaries. I wasn't able to find one looking at data between 14 April - 21 April, where I had the updated validator client deployed on Goerli. However, I was able to verify this on a local testnet using `@sproul`'s idea: > we could probably make Lighthouse produce late blocks in slot 31 and re-org them at slot 0 if that would be useful This [test branch](https://github.com/sigp/lighthouse/commit/87bfb80d99fa328d088294ae0ef445bfabc1fb1b) contains code that achieves the above, and I was able to observe the VC requesting a full update from BN when the `dependent_root` slot got re-org'd. ## Goerli There were two instances that depedent root got updated over a ~9.5 hours window on my Goerli node. ## 1. Late block import In the below logs, dependent root was updated at `15:55:24.006` from `0x694a..` (slot 29) to `0x3a67..` (slot 31) in [epoch 171917](https://prater.beaconcha.in/epoch/171917). ```! Apr 26 15:36:00.006 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0xda98…5bc3, service: duties Apr 26 15:42:24.007 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0x7eaa…a963, service: duties Apr 26 15:48:48.244 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0x844e…f160, service: duties Apr 26 15:55:12.255 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0x694a…517a, service: duties Apr 26 15:55:24.006 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0x3a67…15aa, service: duties ``` (ps: ignore the incorrect time format, my node is still on BST TZ) This was because the gossip block for slot 31 arrived late (12.96s) on my node when duties were queried, hence the previous non empty slot 29 was used as the depenedent root, and the duties were updated in the next slot (correct behaviour). Late gossip block here: ```! Apr 26 15:55:12.970 DEBG Gossip block arrived late block_delay: 12.958165463s, slot: 550 1375, proposer_index: 166137, block_root: 0x3a6734831bded175166ec7cc346a1aed65aec01a8b4302bb2f933b3d713c15aa ``` ### Attestation performance for epoch 171919 (171917 + 2) - :heavy_check_mark: 363006 Success - :heavy_check_mark: 464287 Success - :heavy_check_mark: 464288 Success - :heavy_check_mark: 464292 Success ## 2. Disconnected Beacon node My Wifi network went offline briefly this morning, and an older block was used as dependent root ([epoch 171982](https://prater.beaconcha.in/epoch/171982)), this was updated to the correct `depedent_root` (`0xb6065`) after my beacon node got sync'd up again. ```! Apr 26 22:44:48.007 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0xe847…ba7f, service: duties Apr 26 22:51:12.368 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0x9bb8…ea91, service: duties Apr 26 22:56:36.006 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0xb606…73ee, service: duties Apr 26 22:57:36.013 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0xcf39…a997, service: duties Apr 26 23:04:00.301 DEBG Downloaded attester duties num_new_duties: 4, dependent_root: 0xda19…1834, service: duties ``` ### Attestation performance for epoch 171984 (171982 + 2) - :x: 363006 Missed, BN offline - :heavy_check_mark: 464287 Success - :heavy_check_mark: 464288 Success - :x: 464292 Missed, BN offline