From 28f69d39de2f5ddaa9fc21bc52539f9910d12a91 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Sun, 26 Jan 2025 22:15:49 +1100 Subject: [PATCH] undo yamux revert (#9036) Using a plain ticket reference without TODO should still ensure we can track the issue. also added ticket reference for SszCollectionSchema.java Signed-off-by: Paul Harris --- .../teku/infrastructure/ssz/schema/SszCollectionSchema.java | 1 + .../teku/networking/p2p/libp2p/LibP2PNetworkBuilder.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/ssz/src/main/java/tech/pegasys/teku/infrastructure/ssz/schema/SszCollectionSchema.java b/infrastructure/ssz/src/main/java/tech/pegasys/teku/infrastructure/ssz/schema/SszCollectionSchema.java index 4484373b73c..9b04c382f48 100644 --- a/infrastructure/ssz/src/main/java/tech/pegasys/teku/infrastructure/ssz/schema/SszCollectionSchema.java +++ b/infrastructure/ssz/src/main/java/tech/pegasys/teku/infrastructure/ssz/schema/SszCollectionSchema.java @@ -49,6 +49,7 @@ default SszCollectionT createFromElements(final List elem } default TreeNode createTreeFromElements(final List elements) { + // https://github.com/Consensys/teku/issues/9035 // This is a generic implementation which works for both Vector and List but it potentially // could do better if construct the tree directly in List/Vector subclasses checkArgument(elements.size() <= getMaxLength(), "Too many elements for this collection type"); diff --git a/networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/libp2p/LibP2PNetworkBuilder.java b/networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/libp2p/LibP2PNetworkBuilder.java index 10a79d33644..eb9d1c0df68 100644 --- a/networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/libp2p/LibP2PNetworkBuilder.java +++ b/networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/libp2p/LibP2PNetworkBuilder.java @@ -217,7 +217,9 @@ protected Host createHost(final PrivKey privKey, final List advertise // Yamux must take precedence during negotiation if (config.isYamuxEnabled()) { - b.getMuxers().add(StreamMuxerProtocol.getYamux()); + // https://github.com/Consensys/teku/issues/7532 + final int maxBufferedConnectionWrites = 150 * 1024 * 1024; + b.getMuxers().add(StreamMuxerProtocol.getYamux(maxBufferedConnectionWrites)); } b.getMuxers().add(StreamMuxerProtocol.getMplex());