Repository navigation
refactor(host): take the seam types from libp2p/core - #80
Conversation
W5.2 merged, so the host drops Host.Mock.Core. Error, Registry, Dedup, Policy, and Swarm import Libp2p.Core, and the real types match the mock field for field. Host.Mock.Negotiate stays. The merged negotiate package types its upgrader over its own core mock, so the host cannot pass it real seam values until issue etheorem#53 lands. The mock now names the real core types. The docs and the skipped host legs name what the swap waits on. Part of etheorem#70
|
Review at head The rebaseThe tip carried #79, #82, #84, and #83 since the branch was cut. The The core swap
I compared the real core with the deleted mock field for field:
The nit I fixedThe #82 rebase staled four prose spots: they named #53, #76, and #77
The overageOverage on record: the core-mock window closed at 19:22 UTC on Gates
Merge orderThe PR merges now. The second part of #70, the negotiate retype of the APPROVE |
Summary
PR #61 merged with two own mocks. This PR drops the first,
Host.Mock.Core, now that W5.2 merged in #64. The second,Host.Mock.Negotiate, cannot go yet: the merged negotiate package types its upgrader over its own core mock (issue #53), so the host cannot hand it real seam values. Part of #70.What changed
libp2p/host:Error,Registry,Dedup,Policy, andSwarmimportLibp2p.Core(or the one submodule they need) in place of the mock. The real types match the mock field for field;RoleandErroradd aHashableinstance, which the host does not use.Mock/Core.leanis deleted.Mock/Negotiate.leannames the real core types. Its module doc says why it stays, and that the swap is a retype: the merged upgrader takes noadmitcheckpoint and exports nonegotiateStream.Tests:
Tests/Host.leanopensLibp2p.Core. Its module doc and the skip reason of the unit 1b legs name the swaps they wait on: [SEAM] W5.5 negotiate: drop the stale varint and streams mocks inside #40 #53, [SEAM] W5.3 security/noise: drop the core mock after PR #69 #76 (PR refactor(security): take the seam types from libp2p/core #79), [SEAM] W5.4 mux: drop the core mock and land Mux.yamux after PR #49 #77, and the rest of [SEAM] W5.6 host: the mock connections of #61 #70.Test plan
lake build --wfailis green.lake testpasses: 27169 passed, 0 failed, 10 skipped. It passes again withLEAN_NUM_THREADS=1.Risk / trust footprint
None added or removed.
#print axiomsover the package theorems:Notes for reviewers
Host.Mock.Corerow for PR feat(host): W5.6, the host with dedup, serving, and shutdown #61 on [TRACKING] Machine-Checked Devcon Week: the task tree #25 can be struck when this merges. TheHost.Mock.Negotiaterow stays open.Mux.yamuxvalue of [SEAM] W5.4 mux: drop the core mock and land Mux.yamux after PR #49 #77.LICENSE (LGPL version 3)