Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

EIP-8 #498

Merged
merged 6 commits into from Feb 27, 2016
Merged

EIP-8 #498

merged 6 commits into from Feb 27, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Feb 22, 2016

cc @fjl
closes #349

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Feb 22, 2016
@arkpar arkpar closed this Feb 22, 2016
@arkpar arkpar reopened this Feb 22, 2016
@gavofyork
Copy link
Contributor

code looks fine; is it tested it with both types of clients?

@fjl
Copy link

fjl commented Feb 27, 2016

The EIP-8 changes to discovery are not easy to test unless you‎ temporarily change the code to add some padding and additional elements to packets.

To test the new handshake, you need to implement sending of EIP-8 style auth.
I didn't implement that in libweb3core and pydevp2p yet (will do it after Homestead). You can enable sending of EIP-8 auth in geth by setting RLPX_EIP8=yes as an environment variable.

I didn't look deeply, but please make sure that parsing of the devp2p hello message works according to EIP-8 requirements (ignore version mismatch, additional list elements).

trace!(target:"net", "Received handshake auth to {:?}", self.connection.socket.peer_addr());
if data.len() != AUTH_PACKET_SIZE {
fn read_auth(&mut self, secret: &Secret, data: &[u8]) -> Result<(), UtilError> {
trace!(target:"net", "Received handshake auth from {:?}", self.connection.socket.peer_addr());
Copy link
Contributor

Choose a reason for hiding this comment

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

style for typical use of : would have a space after...

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Feb 27, 2016
@arkpar
Copy link
Collaborator Author

arkpar commented Feb 27, 2016

Tested against geth's RLPX_EIP8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EIP-8 (RLPx changes for homestead)
3 participants