-
Notifications
You must be signed in to change notification settings - Fork 889
Data column custody info #7648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: unstable
Are you sure you want to change the base?
Data column custody info #7648
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eserilev Nice, this looks great overall!
The main comment is that we should probably store the effective epoch/slot instead of the current slot - this is when the new CGC is applied in DA check.
@michaelsproul have a question re: schema version increment This PR introduces a new column, but the database will only contain a value for this column if a recent cgc change has occurred and custody backfill hasn't finished. In that case, is a version increment necessary? An upgrade should be a no-op. A downgrade might also be a no-op because we should not delete this column from the db if a record exists as that would break our ability to track the recent cgc change |
@eserilev I think a schema update is cleanest, especially if we go with my idea from here to make the As Jimmy pointed out via DM, a DB downgrade that deletes the value would also guard against starting up with a stale value in the scenario where we downgrade and then re-upgrade. I.e. run the new version, downgrade, run the old version for a bit, upgrade again --> end up using the stale value from the first time we ran. However this is probably not super relevant because by the time we are running Fulu on real networks, downgrading to a prior schema should not be allowed (we could even add a check in the downgrade that only allows downgrading if |
The |
beacon_node/beacon_chain/src/schema_change/migration_schema_v27.rs
Outdated
Show resolved
Hide resolved
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @eserilev
Looking good, i think we can merge this soon - I've left a few comments, the main one is the effective_epoch
comment that needs fix I think.
a5a39b0
to
a13bb65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Issue Addressed
#7647
Proposed Changes
Introduces a new record in the blobs db
DataColumnCustodyInfo
When
DataColumnCustodyInfo
exists in the db this indicates that a recent cgc change has occurred and/or that a custody backfill sync is currently in progress (custody backfill will be added as a separate PR). When a cgc change has occurredearliest_available_slot
will be equal to the slot at which the cgc change occured. During custody backfill syncearliest_available_slot
should be updated incrementally as it progresses.Note that ifadvertise_false_custody_group_count
is enabled we do not add aDataColumnCustodyInfo
record in the db as that would affect the status v2 response.(See comment #7648 (comment))
IfDataColumnCustodyInfo
doesn't exist in the db this indicates that we have fulfilled our custody requirements up to the DA window.(It now always exist, and the slot will be set to
None
once backfill is complete)StatusV2 now uses
DataColumnCustodyInfo
to calculate theearliest_available_slot
if aDataColumnCustodyInfo
record exists in the db, if it'sNone
, then we return theoldest_block_slot
.