Skip to content
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

get_custody_columns: Move node_id test against UINT256_MAX out of the while loop. #3742

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions specs/_features/eip7594/das-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ class DataColumnSidecar(Container):
def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequence[ColumnIndex]:
assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT

if node_id == UINT256_MAX:
hwwhww marked this conversation as resolved.
Show resolved Hide resolved
node_id = NodeID(0)

subnet_ids: List[uint64] = []
i = 0
while len(subnet_ids) < custody_subnet_count:
if node_id == UINT256_MAX:
node_id = NodeID(0)

while len(subnet_ids) < custody_subnet_count:
subnet_id = (
bytes_to_uint64(hash(uint_to_bytes(uint256(node_id + i)))[0:8])
% DATA_COLUMN_SIDECAR_SUBNET_COUNT
Expand Down