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

Test is passing for wrong reason #704

Open
utkarshg6 opened this issue May 18, 2023 · 3 comments
Open

Test is passing for wrong reason #704

utkarshg6 opened this issue May 18, 2023 · 3 comments
Assignees

Comments

@utkarshg6
Copy link

utkarshg6 commented May 18, 2023

The test route_query_responds_with_none_when_asked_for_one_hop_round_trip_route_without_consuming_wallet_when_back_route_needs_two_hops is passing due to an unintended configuration rather than the intended behaviour.

It claims to be stimulating a failed query because of a hop-count problem when the query is actually failing because there are no full neighborships. If the test uses .add_arbitrary_full_neighbor instead of .add_arbitrary_half_neighbor, and the RouteQueryResponse turns out to be None, then the test is doing what the name suggests.

If you try replacing the function mentioned above, you'd find that we receive a RouteQueryResponse but if the test was doing as the name suggests, we shouldn't be receiving any response.

@utkarshg6 utkarshg6 changed the title Test is passing for wrong reasons Test is passing for wrong reason May 18, 2023
@dnwiebe
Copy link

dnwiebe commented May 18, 2023

Perhaps before spending too much effort on making this test pass correctly, figure out exactly what it's supposed to be testing and whether it has become obsolete (or perhaps was wrong-headed in the first place).

It's making a triangle of Nodes and then asserting that no over-and-back route with a minimum hop count of 1 can be found through them. That seems strange to me: I could find at least four routes:

A -> B, B -> A
A -> B, B -> C -> A
A -> C -> B, B -> A
A -> C -> B, B -> C -> A

Maybe the test should just be deleted.

@dnwiebe
Copy link

dnwiebe commented Feb 16, 2024

There may be other problems with this test: for one thing, it claims to use no consuming wallet when it looks as though the subject definitely does have a consuming wallet. Also, it talks about needing a two-hop return route, but I can't see why that would be necessary. Basically, review this test and correct what needs to be corrected.

@czarte
Copy link
Collaborator

czarte commented Feb 23, 2024

We have found this test as obsolete and we decided to delete it.

Dan's note:
While chasing down some puzzling test behavior, we discovered something new about our reduce-min-hops campaign. Before we did the min-hops change to allow min-hops to shrink below 3, the code was assuming that all one-hop routes were Gossip routes, and therefore should have no consuming wallet associated with them; all multi-hop routes were data routes and required a consuming wallet.

Now, though, we have one-hop routes that are data routes and need to have consuming wallets so that the exit Node can be paid, but they don't require consuming wallets because the routing code thinks they're Gossip routes.

This isn't an immediate problem, because our code is dropping consuming wallets into all the data routes anyway (I think); but it's something we didn't notice when we shrank the min-hops requirement, and we should keep it in mind.

@kauri-hero kauri-hero moved this to Ready for Development in MASQ Node v2 May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

3 participants