Feature Flag for Legacy P2P Support#6056
Conversation
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
|
@erikgrinaker at any point did this PR work with regards to e2e tests? I keep seeing EDIT: Actually, with the legacy p2p stack, it still errors, but with |
|
It works with the simple.toml network, i.e. the simplest possible 4-node network. The ci.toml network won't work, e.g. because it requires support for seed mode. This PR is just a basic proof of concept, there's a lot of work remaining before it's at parity with the legacy stack. |
|
I would like to mark this PR r4r by having support for the feature flag only and having it build & pass. Did you envision anything specifically for this PR? |
|
This PR was just a quick-and-dirty proof of concept that I threw together in a couple of hours on my last day to see if the full stack was functional. It probably has bugs and omissions, and needs to be cleaned up. Whether you want to take this PR across the line or start fresh with a new PR is your call, but it wasn't really intended to be merged in its current form. |
|
Ok, thanks for the clarification. Let me figure out if I can get seed mode to work as well (in pex v2) in this PR and get CI to pass and then we can go from there in future PRs. |
|
Implementing seed mode with the new stack isn't trivial, we were discussing writing a separate daemon for it. As for why the legacy stack doesn't work, I'm not sure -- might have just forgotten some wiring or gotten something wrong somewhere. |
|
I see. So I'm a bit lost on how we can even finish this PR then, unless we change CI to just run |
|
You could default to the legacy stack, fix the issues causing it to break here, and clean up the code -- then implement the remaining P2P work until all E2E testnets pass with the new stack. Or alternatively implement all of the outstanding P2P work first, before wiring up the node. |
|
Let's leave the default to true to use the legacy p2p stack. Note, there are no issues with the legacy stack in this PR -- false alarm. I'll clean this up and merge it shortly. |
Codecov Report
@@ Coverage Diff @@
## master #6056 +/- ##
==========================================
- Coverage 60.77% 60.68% -0.10%
==========================================
Files 276 276
Lines 25521 25646 +125
==========================================
+ Hits 15511 15562 +51
- Misses 8402 8463 +61
- Partials 1608 1621 +13
|
This wires up the node to use either the new or old P2P stack based on the
node.useLegacyP2Pconstant, using the new stack by default. It's a real mess, but it passes the simplest E2E tests:Branched off of #5969.