You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a rare scenario, when at least a whole epoch containing a report ref slot is missed, the Oracle reports data for a narrower frame.
The method get_reference_blockstamp is used in the Oracle to fetch a slot and block that will be used for report collection. The method finds the nearest non-missed slot and uses it to collect data. This solution assumes that the state does not change without a block. However, there is a scenario in which the state of validators is changed for a missed slot. This scenario comes up during epoch transition, where the state is updated even if a first slot in epoch is missed during the state_transition execution in the first non-missed slot.
In the example, an epoch including ref slot of an Oracle report is missed. According to the current implementation, the Oracle will collect report on slot 31 (block 10), while the state for slot 32 will be different from the state for slot 31. The state for slot 32 will be changed in the chain of method calls state_transition -> process_slots -> process_epoch when the next block is included in the chain at slot 64 (block 11), which is outside the epoch and after the ref slot.
Since the Oracle collects a snapshot of the state, rather than the difference between reports, the subsequent Oracle report will take into account all changes during the period not covered by the previous report, but the boundary of the report frames will be shifted by the number of missed epochs:
|<------------->|<--------------->| actual frames
|<-------------->|<-------------->| expected frames
---|----------------|----------------|----------------> time
^ ^^ ^
ref slot missed epochs ref slot
The text was updated successfully, but these errors were encountered:
Thanks for describing the case, I think there is low chance that this situation would take place in wild. Looks like the only impact is shifting of frames and no accuracy lost. Would be very nice to fix in one of future oracle updated.
Issue
In a rare scenario, when at least a whole epoch containing a report ref slot is missed, the Oracle reports data for a narrower frame.
The method get_reference_blockstamp is used in the Oracle to fetch a slot and block that will be used for report collection. The method finds the nearest non-missed slot and uses it to collect data. This solution assumes that the state does not change without a block. However, there is a scenario in which the state of validators is changed for a missed slot. This scenario comes up during epoch transition, where the state is updated even if a first slot in epoch is missed during the
state_transition
execution in the first non-missed slot.Example
Let's consider an example:
In the example, an epoch including
ref slot
of an Oracle report is missed. According to the current implementation, the Oracle will collect report on slot 31 (block 10), while the state for slot 32 will be different from the state for slot 31. The state for slot 32 will be changed in the chain of method callsstate_transition -> process_slots -> process_epoch
when the next block is included in the chain at slot 64 (block 11), which is outside the epoch and after theref slot
.Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beacon-chain-state-transition-function
Impact
Since the Oracle collects a snapshot of the state, rather than the difference between reports, the subsequent Oracle report will take into account all changes during the period not covered by the previous report, but the boundary of the report frames will be shifted by the number of missed epochs:
The text was updated successfully, but these errors were encountered: