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

Add support for node discovery v5 #42

Closed
wants to merge 15 commits into from

Conversation

timxor
Copy link

@timxor timxor commented Jun 27, 2018

WIP: Please do not merge yet

Fixes #19.

Issue update for node discovery v5

Completion status: ~46%
Today's date: Saturday August 25th 2018
Target finish date: Monday September 3rd 2018
Task break down: ~46% = [6.5 / 14] = [ ((4 βœ… + (3🚧/2)) ) / (14βœ…πŸš§βœ–οΈ)]
Issue: #19
Pull request: #42

Structural tasks

Task name Implemented Task Description
node records βœ–οΈ No add node records support for node discovery v5
packet types 🚧 Wip add packet types support for node discovery v5
topics 🚧 Wip add topics support for node discovery v5
cli parameter βœ… Yes add v5 cli parameter support for node discovery v5
documentation βœ… Yes add v5 cli parameter support for node discovery v5

Version 5 demo example tasks

Demo name Implemented
peer-communication-v5.js 🚧 Wip
peer-communication-les-v5.js βœ–οΈ No

New test coverage tasks

Test name Implemented Test Description
dpt-message-v5.js βœ–οΈ No static tests for v5 message types, node records, topics
dpt-simulator-v5.js βœ–οΈ No dpt integration communication tests for v5
eth-simulator-v5.js βœ–οΈ No eth integration communication tests for v5
les-simulator-v5.js βœ–οΈ No les integration communication tests for v5
util.js βœ… Yes

Pass existing tests, style, coverage

Name Passing
coveralls βœ–οΈ No
travis βœ… Yes

almost there πŸ˜€

Alt Text

@timxor timxor mentioned this pull request Jun 27, 2018
@holgerd77
Copy link
Member

Hi Tim, cool, that already looks like a substantial amount of work and additions, happy to see the progress! Will think about the testing questions, can't promise though that I will make it today.

Let's not over-rush now in the other direction πŸ˜„ , you can really take your time, I would actually prefer a bit if this can ripen a bit during 2-3 weeks of ongoing work. Of course this also depends on the time-slots you can set free.

Anyway, cool to see progress here!

@holgerd77
Copy link
Member

holgerd77 commented Jun 28, 2018

Hi Tim, can you make version an option in dpt/server.js - probably defaulting to 0x04 if not provided - remove the VERSION constant and then do appropriate switches depending on what version someone chooses to initialize the server with?

For testing you should probably be able to build upon the integration tests and extend the DPT setup in integration/util.js with possibilities to either instantiate a v4 or v5 setup (or a mixed one? πŸ˜„ ) and then add some tests to the integration/dpt-simulator.js file who should behave like they should behave 😸.

Not sure if this is enough for tests but that would be a start, does this makes sense or do I miss something? Maybe also start early with this since according to my experience especially on the devp2p library having some tests makes further development a lot easier.

@timxor
Copy link
Author

timxor commented Jun 28, 2018

Awesome sounds good. Yeah, baby steps! Sure thing, will have a bunch of free time this weekend. Good call on the cli args for versioning, that ran through my mind, will add!

@holgerd77
Copy link
Member

@tcsiwula Just to make sure that there is no misunderstanding: version should be an option for the constructor in server.js, so options.version. This can of course be used from CLI but also in other programmatic contexts.

@timxor
Copy link
Author

timxor commented Jul 2, 2018

@holgerd77 option for the constructor, got it, thanks for clarifying -- pr update coming today

@timxor
Copy link
Author

timxor commented Jul 2, 2018

Hey @holgerd77 how is your linting working for the CI or whatever? I saw there was a "standard": { "parser": "babel-eslint" } though not to sure how to get this working or auto detecting with my ide.

@holgerd77
Copy link
Member

@tcsiwula Just run npm run lint for checking.

@timxor
Copy link
Author

timxor commented Jul 3, 2018

What about for fixing my linting errors? Running:

eslint --fix src

Oops! Something went wrong! :(

ESLint: 4.19.1.
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:

.
Should I make a .eslint config or how should I handle this and what settings?

@holgerd77
Copy link
Member

Just temporarily add "--fix" to the standard lint command in package.json and fix the remaining ones manually.

@coveralls
Copy link

coveralls commented Jul 3, 2018

Pull Request Test Coverage Report for Build 134

  • 10 of 11 (90.91%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.08%) to 88.487%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dpt/server.js 4 5 80.0%
Totals Coverage Status
Change from base Build 124: -0.08%
Covered Lines: 908
Relevant Lines: 963

πŸ’› - Coveralls

@timxor timxor changed the title WIP: Add support for node discovery v5 with backwards compatibility for v4 Add support for node discovery v5 Aug 26, 2018
@timxor
Copy link
Author

timxor commented Aug 26, 2018

Issue update for node discovery v5

Completion status: ~46%
Today's date: Saturday August 25th 2018
Target finish date: Monday September 3rd 2018
Task break down: ~46% = [6.5 / 14] = [ ((4 βœ… + (3🚧/2)) ) / (14βœ…πŸš§βœ–οΈ)]
Issue: #19
Pull request: #42

Structural tasks

Task name Implemented Task Description
node records βœ–οΈ No add node records support for node discovery v5
packet types 🚧 Wip add packet types support for node discovery v5
topics 🚧 Wip add topics support for node discovery v5
cli parameter βœ… Yes add v5 cli parameter support for node discovery v5
documentation βœ… Yes add v5 cli parameter support for node discovery v5

Version 5 demo example tasks

Demo name Implemented
peer-communication-v5.js 🚧 Wip
peer-communication-les-v5.js βœ–οΈ No

New test coverage tasks

Test name Implemented Test Description
dpt-message-v5.js βœ–οΈ No static tests for v5 message types, node records, topics
dpt-simulator-v5.js βœ–οΈ No dpt integration communication tests for v5
eth-simulator-v5.js βœ–οΈ No eth integration communication tests for v5
les-simulator-v5.js βœ–οΈ No les integration communication tests for v5
util.js βœ… Yes

Pass existing tests, style, coverage

Name Passing
coveralls βœ–οΈ No
travis βœ… Yes

update next on monday πŸ˜€

Alt Text

@fjl
Copy link

fjl commented Sep 5, 2018

It's best if you start with node records. The actual v5 protocol in geth is a temporary placeholder.

@timxor
Copy link
Author

timxor commented Sep 10, 2018

@fjl thanks for the heads up, sounds good ^_^

@fjl fjl mentioned this pull request Sep 21, 2018
5 tasks
@fjl
Copy link

fjl commented Sep 21, 2018

@tcsiwula There is now a tracking issue for the actual protocol spec. Let's discuss there :).

@holgerd77
Copy link
Member

Hi @tcsiwula, thanks for all the active engagement in the direct protocol discussion with @fjl, I am also realizing that this is much more a work-in-progress spec than I thought. I would nevertheless try to see that we find some clean finish for this bounty PR, so that we don't have to carry this into 2019. πŸ˜›

Do you think it's realistic to get to a point where we have a somewhat complete version of a currently consistent draft state of the protocol implemented, or - if this is still too much work left - can't judge at the moment: do you see a consistent set of subfeatures/-parts that can be finished implementing, so that

a) tests are running and
b) this doesn't prevent the old protocol v4 version from running

(that would be the base conditions I could think of now, feel free to add).

Best
Holger

@timxor timxor mentioned this pull request Dec 31, 2018
@timxor
Copy link
Author

timxor commented Dec 31, 2018

Succeeded by new PR #48 allowing administrative access & direct collaborator branch discovery-v5

@timxor timxor closed this Dec 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants