-
Notifications
You must be signed in to change notification settings - Fork 293
column serving issue and other fixes #7528
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
Conversation
current_id = node_id | ||
|
||
while custody_groups.lenu64 < custody_group_count: | ||
let safe_count = min(custody_group_count, cfg.NUMBER_OF_CUSTODY_GROUPS) |
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.
https://github.com/ethereum/consensus-specs/blob/v1.6.0-beta.0/specs/fulu/das-core.md#get_custody_groups defines it as an error to do this:
assert custody_group_count <= NUMBER_OF_CUSTODY_GROUPS
# Skip computation if all groups are custodied
if custody_group_count == NUMBER_OF_CUSTODY_GROUPS:
return [CustodyIndex(i) for i in range(NUMBER_OF_CUSTODY_GROUPS)]
but that would make things more complicated to return anything like an Opt
or Result
, so there needs to be some default here. But sure, it's fine to effectively set this error handling as clamping.
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.
we can need the peer for blocks?
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.
we can need the peer for blocks?
That's compatible with not thinking it has any custody at all.
let columns = dataColumnsOpt.valueOr: DataColumnSidecars @[] | ||
debug "Inserting columns into database (backfill)", | ||
indices = columns.mapIt($it[].index) | ||
indices = columns.mapIt($it[].index).len |
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.
mapIt
will cause the allocation of an extra seq and some extra processing - if we're just getting the length, this is wasteful
* column serving issue and other fixes * another change * remove downscore * fixes
* column serving issue and other fixes * another change * remove downscore * fixes
No description provided.