Skip to content

Commit

Permalink
Increase max gossip compressed size (#8924)
Browse files Browse the repository at this point in the history
fixes #8921

Signed-off-by: Paul Harris <[email protected]>
  • Loading branch information
rolfyone authored Dec 16, 2024
1 parent f7c69c9 commit 414e909
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
### Bug Fixes
- Updated the gas change check for block building so that warnings only get raised if the change is off spec.
- Fixed an issue with the `/eth/v1/config/spec` API not returning all previously included configuration parameters.

- Increase the maximum size of a compressed message for libp2p to ensure uncompressed blocks can grow to max size.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ private static void addGossipParamsDValues(

private static void addGossipParamsMaxValues(
final NetworkingSpecConfig networkingSpecConfig, final GossipParamsBuilder builder) {
final int gossipMaxSize = networkingSpecConfig.getGossipMaxSize();
final int compressedMaxGossipSize = 32 + gossipMaxSize + (gossipMaxSize / 6);
builder
.maxGossipMessageSize(networkingSpecConfig.getGossipMaxSize())
.maxGossipMessageSize(compressedMaxGossipSize)
.maxPublishedMessages(1000)
.maxTopicsPerPublishedMessage(1)
.maxSubscriptions(MAX_SUBSCRIPTIONS_PER_MESSAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void createGossipParams_checkZeroDsSucceed() {
public void createGossipParams_setGossipMaxSizeFromNetworkSpecConfig() {
final GossipConfig gossipConfig = GossipConfig.builder().build();
final NetworkingSpecConfig networkingSpecConfig = spy(spec.getNetworkingConfig());
final int expectedGossipMaxSize = networkingSpecConfig.getGossipMaxSize();
final int expectedGossipMaxSize = 12233418;
reset(networkingSpecConfig);

final GossipParams gossipParams =
Expand Down

0 comments on commit 414e909

Please sign in to comment.