-
Notifications
You must be signed in to change notification settings - Fork 983
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
Fix get_custody_columns
#3748
Fix get_custody_columns
#3748
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.
I would maybe just leave this variable as i
, otherwise it looks good!
also could consider mixing in a %
operator instead, but it would end up having the same effect as this code, and this seems fine enough
specs/_features/eip7594/das-core.md
Outdated
if node_id == UINT256_MAX: | ||
node_id = NodeID(0) | ||
# Overflow prevention | ||
if tmp_id == UINT256_MAX: |
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.
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
specs/_features/eip7594/das-core.md
Outdated
@@ -106,18 +106,20 @@ def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequen | |||
assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT | |||
|
|||
subnet_ids: List[uint64] = [] | |||
i = 0 | |||
i = uint256(node_id) |
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.
Ah sorry @ralexstokes I think I have the revert the previous commit. There is another i
usage in the return sorted(...)
... so it's less good to assign an i
here.
b256bba
to
c9e0e6d
Compare
Replace #3742
Thank @nalepae for raising the issue, and thank @zilm13 for proposing a fix for the bug. 🙏