stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

Fix: 5159, 5169, 5171, 5172, and others #5191

Closed jcnelson closed 1 week ago

jcnelson commented 1 week ago

This fixes a few reported issues in the neighbor walk state machine, as well as a few unreported / privately requested ones:


The majority of line noise from this PR comes from that last test refactoring above. Also, in order to get it to build as an integration test, I had to switch a lot of #[cfg(test)] statements to #[cfg(any(test, feature = "testing"))]. This affected many files.

jcnelson commented 1 week ago

Putting this as a draft for now. I'm testing this live on mainnet and on Nakamoto testnet and I've noticed a couple problems I'll address in this PR.

jcnelson commented 1 week ago

@kantai Do you think it is a good use of time to go and patch the thousands of lines of test-only code where there are unused variables?

kantai commented 1 week ago

@kantai Do you think it is a good use of time to go and patch the thousands of lines of test-only code where there are unused variables?

Probably not. Run cargo fix and see what it can do, and leave the rest of the warnings as is. It's better to have the warnings than to silence them with blanket allows.

wileyj commented 1 week ago

This LGTM, but I think we'd be better off if the p2p::convergence tests stayed in net::tests::neighbors, and we just updated the CI to add another integration test job to execute them there (instead of in stacks-node).

unless this is needed to merge this PR, can you open an issue and we'll take that off your pile?

jcnelson commented 1 week ago

unless this is needed to merge this PR, can you open an issue and we'll take that off your pile?

I'd like it in this PR. We needed to have been running these tests the whole time; we would have caught some of these problems earlier if we did.

wileyj commented 1 week ago

unless this is needed to merge this PR, can you open an issue and we'll take that off your pile?

I'd like it in this PR. We needed to have been running these tests the whole time; we would have caught some of these problems earlier if we did.

👍 let me know where i can help and you'll have it

jcnelson commented 1 week ago

Thank you everyone for taking this over so I could take on #5193 :pray: