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

add mnlistdiffs #4

Merged
merged 4 commits into from
Jan 2, 2019
Merged

add mnlistdiffs #4

merged 4 commits into from
Jan 2, 2019

Conversation

pvrooyen
Copy link

@pvrooyen pvrooyen commented Aug 1, 2018

Help needed with:

  • Confirming implementation correct
  • Unit tests

Currently 2 tests (maybe more) is failing here - marked with todo comments. I suspect that it is because of invalid json hex supplied in /test/data/messages.json for mnlistdiff and getmnlistdiff

@antouhou
Copy link
Collaborator

antouhou commented Aug 2, 2018

What kind of help with unit tests do you exactly need? You want someone to join you with writing test cases?

@pvrooyen
Copy link
Author

pvrooyen commented Aug 3, 2018

@antouhou actually if we can get those 2 tests that are failing through it should be fine. As per PR description I don't know how to generate test messages.

Here are the failing tests:
https://github.com/dashevo/dashcore-p2p/blob/1d496e4ff181484a4b868664ae67b20ef68898e5/test/messages/index.js#L77
https://github.com/dashevo/dashcore-p2p/blob/1d496e4ff181484a4b868664ae67b20ef68898e5/test/messages/index.js#L82

@Cofresi
Copy link

Cofresi commented Aug 5, 2018

mnlistdiff still errors after typo fix. You might want to not include that message, because it will always come from a full node as a response to getmnlistdiff and is not needed in this p2p library.
BTW if you haven't already noticed the main travis error is because you have a local link to dashcore-lib in package.json

@pvrooyen
Copy link
Author

pvrooyen commented Aug 6, 2018

@Cofresi thanks for the attempted fixes. Problem is that those are generic tests so you cannot really exclude them specifically.

Can you in fact do a getmnlistdiff rpc request? If so I might rethink to keep the P2P architecture and just go for RPC.

Im getting 'Method not found'

@pvrooyen
Copy link
Author

@antouhou @Cofresi @KamuelaFranco

I am leaving this PR here for now but not going to spend time to try and fix the errors. We are not using P2P for mnlistdiffs anymore so maybe we can just close this PR without merging?

@nmarley
Copy link

nmarley commented Dec 27, 2018

Rebased onto master. If we do end up getting this in, it would be nice to squash and possibly break out into fewer commits. But if we squash-merge (my preference), then I guess it won't matter.

@nmarley nmarley changed the title MNLISTDIFFS add mnlistdiffs Dec 31, 2018
@nmarley
Copy link

nmarley commented Dec 31, 2018

I have again squashed and rebased onto the latest master. I also made a couple temporary branches in case someone wanted to see this branch before my rebases.

Very original branch before rebase can be found here now: https://github.com/dashevo/dashcore-p2p/tree/feat-mndifflist-old

The rebased before squash and latest master is here: https://github.com/dashevo/dashcore-p2p/tree/TEMP-feat-mndifflist-rebased

@antouhou @Cofresi @KamuelaFranco Can you see the above comment from Pierre and verify whether we need this PR at all?

I'd love to get this PR merged or closed and branch deleted within a day or two if possible. Thanks!

@Cofresi
Copy link

Cofresi commented Jan 1, 2019

@nmarley tests are fixed now. The message for mnlistdiff in messages.json had a wrong message header (command name was wrong) and payload. Replaced with a much shorter testvector for mnlistdiff. Also fixed setter and getter in messages/commands/mnlistdiff.js which caused errors.

mnlistdiff.js is not parsing the payload yet, but I still think this should be merged into dashcore-p2p to reflect the updated command list in core. We can work on the mnlistdiff payload when we will actually have a use for it. Maybe you'll want to bump the version before merging.

@nmarley
Copy link

nmarley commented Jan 2, 2019

Great, thank you!

Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

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

ACK

@nmarley nmarley merged commit 86a2fc5 into master Jan 2, 2019
@nmarley
Copy link

nmarley commented Jan 7, 2019

Since this has now been merged, I'm going to remove the temp branches that I created earlier ^. We have these in the daily git archives if anyone needs them, just reach out.

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.

None yet

5 participants