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

conformance test 010 and 009 #45

Merged
merged 5 commits into from May 17, 2021
Merged

conformance test 010 and 009 #45

merged 5 commits into from May 17, 2021

Conversation

Mirko-von-Leipzig
Copy link
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented May 14, 2021

Note that this includes the missing test messages for case 009.

@niklaslong niklaslong changed the title conformance test 010 and 090 conformance test 010 and 009 May 14, 2021
Copy link
Collaborator

@niklaslong niklaslong left a comment

Choose a reason for hiding this comment

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

Looks great with a few comments, the main thing being the message kind change.

src/protocol/message.rs Outdated Show resolved Hide resolved
//
// Current behaviour:
//
// zcashd: Ignores the following messages
Copy link
Collaborator

Choose a reason for hiding this comment

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

Somewhat expected as the node isn't seeded with any data?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its.. inconsistent. I did initially seed it with blocks, and then GetBlocks, and GetData(block) work as expected.

Then one has GetData(tx) which actually returns NotFound despite not having data.

I would actually hope that all of these queries should result in an {empty} style response, or NotFound for the GetData.

Essentially I think the node never sends an empty response except for GetData(tx) - because the bitcoin protocol lists it as an example:

notfound is a response to a getdata, sent if any requested data items could not be relayed, for example, because the requested transaction was not in the memory pool or relay set. 

In the end I opted to not seed anything until we can decide what is expected and correct. Happy to add the seeding back.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be good to have both cases? This would also serve as documentation for the current behaviour in each case and make it easier for ECC/ZF to evaluate what the spec should be.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll split up the test case into seeded and unseeded

src/tests/conformance/messages.rs Outdated Show resolved Hide resolved
src/tests/conformance/messages.rs Show resolved Hide resolved
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review May 17, 2021 08:54
@Mirko-von-Leipzig
Copy link
Collaborator Author

I've changed to using a macro for the enum asserts. Let me know what you think.

Copy link
Collaborator

@niklaslong niklaslong left a comment

Choose a reason for hiding this comment

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

Looking good other than a few small things, love the macro 🎉

src/tests/mod.rs Show resolved Hide resolved
src/tests/conformance/messages.rs Outdated Show resolved Hide resolved
src/tests/conformance/messages.rs Show resolved Hide resolved
@niklaslong niklaslong merged commit 5957afa into master May 17, 2021
@niklaslong niklaslong deleted the conf_010 branch May 17, 2021 11:57
zeapoz pushed a commit to zeapoz/zcash that referenced this pull request Apr 13, 2023
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

2 participants