Skip to content

Commit

Permalink
Adjust namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
flcl42 committed Dec 12, 2024
1 parent ea070a9 commit 35154d8
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ The target is to provide a performant well-tested implementation of a wide range
| Protocol | Version | Status |
|--------------------|--------------------|-----------------|
| TCP | tcp ||
| QUIC | quic-v1 | |
| QUIC | quic-v1 | 🚧 |
| multistream-select | /multistream/1.0.0 ||
| plaintext | /plaintext/2.0.0 ||
| noise | /noise ||
| tls | /tls/1.0.0 | 🚧 |
| WebTransport | | ⬜ help wanted |
| yamux | /yamux/1.0.0 ||
| Circuit Relay | /libp2p/circuit/relay/0.2.0/* | ⬜ help wanted |
| Circuit Relay | /libp2p/circuit/relay/0.2.0/* | 🚧 |
| hole punching | | ⬜ help wanted |
| **Application layer**
| Identify | /ipfs/id/1.0.0 ||
| ping | /ipfs/ping/1.0.0 ||
| pubsub | /floodsub/1.0.0 ||
| | /meshsub/1.0.0 ||
| | /meshsub/1.1.0 | 🚧 |
| | /meshsub/1.2.0 | |
| | /meshsub/1.2.0 | 🚧 |
| **Discovery**
| mDns | basic ||
| | DNS-SD | 🚧 |
| [discv5](https://github.com/Pier-Two/Lantern.Discv5) | 5.1 | 🚧 help wanted |
| [discv5](https://github.com/Pier-Two/Lantern.Discv5) (wrapper) | 5.1 | 🚧 help wanted |

⬜ - not yet implemented<br>
🚧 - work in progress<br>
Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Core.TestsBase/E2e/TestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Microsoft.Extensions.Logging;
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Protocols;
using Nethermind.Libp2p.Stack;
using System.Collections.Concurrent;

namespace Nethermind.Libp2p.Core.TestsBase.E2e;
Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Core.TestsBase/E2e/TestMuxerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Microsoft.Extensions.DependencyInjection;
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Stack;
using NUnit.Framework;

namespace Nethermind.Libp2p.Core.TestsBase.E2e;
Expand Down
6 changes: 4 additions & 2 deletions src/libp2p/Libp2p.Core/ILibp2pBuilderContext.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: MIT

using Nethermind.Libp2p.Core;

namespace Nethermind.Libp2p.Stack;
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: MIT

namespace Nethermind.Libp2p.Core;

public interface IProtocolStackSettings
{
Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Core/Peer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Core.Exceptions;
using Nethermind.Libp2p.Core.Extensions;
using Nethermind.Libp2p.Stack;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;

Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Core/PeerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Microsoft.Extensions.Logging;
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Stack;

namespace Nethermind.Libp2p.Core;

Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Core/PeerFactoryBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: MIT

using Microsoft.Extensions.DependencyInjection;
using Nethermind.Libp2p.Stack;

namespace Nethermind.Libp2p.Core;

Expand Down
2 changes: 0 additions & 2 deletions src/libp2p/Libp2p.Core/ProtocolStackSettings.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: MIT

using Nethermind.Libp2p.Stack;

namespace Nethermind.Libp2p.Core;

public class ProtocolStackSettings : IProtocolStackSettings
Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p.E2eTests/E2eTestSetup.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Nethermind.Libp2p;
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Core.TestsBase;
using Nethermind.Libp2p.Stack;
using System.Text;

namespace Libp2p.E2eTests;
Expand Down
1 change: 0 additions & 1 deletion src/libp2p/Libp2p.Protocols.Identify/IdentifyProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Multiformats.Address.Net;
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols.Identify;
using Nethermind.Libp2p.Stack;
using System.Net.Sockets;
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Core.Dto;
Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p.Protocols.Noise/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Noise protocol
# TLS protocol

- [libp2p spec](https://github.com/libp2p/specs/blob/master/noise)
- [The Noise Protocol Framework](https://www.noiseprotocol.org/noise.html)
Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p.Protocols.Tls.Tests/TlsProtocolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Nethermind.Libp2p.Protocols.TLS.Tests;
public class TlsProtocolTests
{
[Test]
[Ignore("Infinite loop")]
[Ignore("Needs a fix on Windows")]
public async Task Test_ConnectionEstablished_AfterHandshake()
{
// Arrange
Expand Down
2 changes: 2 additions & 0 deletions src/libp2p/Libp2p.sln
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ Global
{EC505F21-FC69-4432-88A8-3CD5F7899B08} = {0DC1C6A1-0A5B-43BA-9605-621C21A16716}
{F14C0226-D2B1-48B8-BC6A-163BE2C8A4C6} = {6F3D9AA9-C92D-4998-BC4E-D5EA068E8D0D}
{BFE1CCB2-59A3-4A69-B543-EBC9C16E39F7} = {6F3D9AA9-C92D-4998-BC4E-D5EA068E8D0D}
{C3CDBAAE-C790-443A-A293-D6E2330160F7} = {6F3D9AA9-C92D-4998-BC4E-D5EA068E8D0D}
{89BD907E-1399-4BE7-98CC-E541EAB21842} = {6F3D9AA9-C92D-4998-BC4E-D5EA068E8D0D}
{EC0B1626-C006-4138-A119-FE61CDAB824D} = {6F3D9AA9-C92D-4998-BC4E-D5EA068E8D0D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p/Libp2pPeerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Nethermind.Libp2p.Core.Discovery;
using Nethermind.Libp2p.Protocols;

namespace Nethermind.Libp2p.Stack;
namespace Nethermind.Libp2p;

public class Libp2pPeerFactory(IProtocolStackSettings protocolStackSettings, PeerStore peerStore, ILoggerFactory? loggerFactory = null) : PeerFactory(protocolStackSettings, peerStore, loggerFactory)
{
Expand Down
4 changes: 2 additions & 2 deletions src/libp2p/Libp2p/Libp2pPeerFactoryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols;

namespace Nethermind.Libp2p.Stack;
namespace Nethermind.Libp2p;

public class Libp2pPeerFactoryBuilder(IServiceProvider? serviceProvider = default) : PeerFactoryBuilderBase<Libp2pPeerFactoryBuilder, Libp2pPeerFactory>(serviceProvider),
ILibp2pPeerFactoryBuilder
Expand Down Expand Up @@ -42,7 +42,7 @@ protected override ProtocolRef[] BuildStack(ProtocolRef[] additionalProtocols)
{
ProtocolRef tcp = Get<IpTcpProtocol>();

ProtocolRef[] encryption = enforcePlaintext ? [Get<PlainTextProtocol>()] : [Get<NoiseProtocol>(), Get<TlsProtocol>()];
ProtocolRef[] encryption = enforcePlaintext ? [Get<PlainTextProtocol>()] : [Get<NoiseProtocol>()/*, Get<TlsProtocol>()*/];

ProtocolRef[] muxers = [Get<YamuxProtocol>()];

Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p/LogMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Extensions.Logging;

namespace Nethermind.Libp2p.Stack;
namespace Nethermind.Libp2p;

internal static partial class LogMessages
{
Expand Down
2 changes: 1 addition & 1 deletion src/libp2p/Libp2p/ServiceProviderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Nethermind.Libp2p.Protocols;
using Nethermind.Libp2p.Protocols.Pubsub;

namespace Nethermind.Libp2p.Stack;
namespace Nethermind.Libp2p;

public static class ServiceProviderExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion src/samples/chat/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Nethermind.Libp2p.Stack;
using Nethermind.Libp2p.Core;
using Multiformats.Address;
using Multiformats.Address.Protocols;
using Nethermind.Libp2p;

ServiceProvider serviceProvider = new ServiceCollection()
.AddLibp2p(builder => builder.AddAppLayerProtocol<ChatProtocol>())
Expand Down
2 changes: 1 addition & 1 deletion src/samples/perf-benchmarks/NoStackPeerFactoryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText:2023 Demerzel Solutions Limited
// SPDX-License-Identifier:MIT

using Nethermind.Libp2p.Stack;
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols;
using Nethermind.Libp2p;

namespace DataTransferBenchmark;

Expand Down
2 changes: 1 addition & 1 deletion src/samples/perf-benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System.Diagnostics;
using DataTransferBenchmark;
using Microsoft.Extensions.DependencyInjection;
using Nethermind.Libp2p.Stack;
using Nethermind.Libp2p.Core;
using Multiformats.Address;
using Nethermind.Libp2p;

await Task.Delay(1000);
{
Expand Down
2 changes: 1 addition & 1 deletion src/samples/pubsub-chat/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Nethermind.Libp2p.Stack;
using Nethermind.Libp2p.Core;
using System.Text;
using System.Text.Json;
using Nethermind.Libp2p.Protocols.Pubsub;
using Nethermind.Libp2p.Protocols;
using System.Text.RegularExpressions;
using Nethermind.Libp2p;

Regex omittedLogs = new(".*(MDnsDiscoveryProtocol|IpTcpProtocol).*");

Expand Down

0 comments on commit 35154d8

Please sign in to comment.