Skip to content

node discovery initial draft#1

Merged
ninaiiad merged 15 commits intomainfrom
ng/discovery
Apr 15, 2026
Merged

node discovery initial draft#1
ninaiiad merged 15 commits intomainfrom
ng/discovery

Conversation

@ninaiiad
Copy link
Copy Markdown
Collaborator

@ninaiiad ninaiiad commented Apr 2, 2026

No description provided.

@ninaiiad ninaiiad force-pushed the ng/discovery branch 2 times, most recently from 5b521cb to 37113a0 Compare April 2, 2026 10:47
signature,
})
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should consider keeping ENR records in RLP format and not decoding / encoding

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe future optimisation?

#[derive(Copy, Clone, PartialEq, Eq, Default, PartialOrd, Ord, Debug)]
pub struct Distance(U256);

pub const MAX_NODES_PER_BUCKET: usize = 16;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make configurable?

nodes: ArrayVec<Node<T>, MAX_NODES_PER_BUCKET>,
pending: Option<PendingNode<T>>,
pending_timeout: Duration,
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets return to this and consider simplifying

@ninaiiad ninaiiad merged commit 41b8bf6 into main Apr 15, 2026
4 checks passed
@ninaiiad ninaiiad deleted the ng/discovery branch April 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants