# Week 6 The coding has started. The first PR got merged : * [Add basic FCR structure and CLI options with test structure](https://github.com/harsh-ps-2003/lighthouse/pull/1) I wrote the code to feature-gate the FCR so that it can be enabled and disabled at runtime. But I guess a simple Option is more preferrable, as it might be unnecessary for eventual integration into Lighthouse. Another thing is that the [spec has changed a bit](https://github.com/mkalinin/confirmation-rule/pull/17/files). This change modifies how the "support" for a block is calculated, specifically affecting the selection of the checkpoint state used for weighting during the confirmation process. Previously, The "support" for a block was always calculated using the state from the `prev_slot_justified_checkpoint`. ```python prev_slot_justified_state = store.checkpoint_states[store.prev_slot_justified_checkpoint] support = get_weight(store, block_root, prev_slot_justified_state) ``` In other words, the checkpoint for weighting was fixed to the most recently justified checkpoint at the previous slot. But now, the checkpoint used for weighting is now conditional based on the slot position within the epoch. Instead of always using the last justified checkpoint, the new logic distinguishes the first slot of each epoch, allowing the protocol to reference a possibly more up-to-date or appropriate checkpoint state when evaluating support. ```python # At the first slot of every epoch, use prev_slot_unrealized_justified_checkpoint if get_current_slot(store) % SLOTS_PER_EPOCH == 0: weighting_checkpoint = store.prev_slot_unrealized_justified_checkpoint else: # For all other slots, use prev_slot_justified_checkpoint. weighting_checkpoint = store.prev_slot_justified_checkpoint # The support is then calculated using the checkpoint state from the chosen checkpoint. support = get_weight(store, block_root, store.checkpoint_states[weighting_checkpoint]) ``` Next I set of PRs will be for the core logic of FCR Signing out. Peace...