test: light-push/index.node.spec.ts: adjust metadata size to nwaku max size adjustment #1769
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The max message size reduction in
nim-waku
( see this ) made the "Fails to push message with large meta" test fail because thenwaku
didn't accept such a big message and therefore its response is different than the expected by the test.Solution
In this PR, we are reducing the msg size sent in the "Fails to push message with large meta" test by the same amount of bytes that the max msg size is being reduced in
nim-waku
.More details:
The "Fails to push message with large meta" test used 10 ** 6 when
nwaku
node had MaxWakuMessageSize == 1MiB (1*2^20
.)nwaku
establishes the max lightpush msg size asconst MaxRpcSize* = MaxWakuMessageSize + 64 * 1024
see:
https://github.com/waku-org/nwaku/blob/07beea02095035f4f4c234ec2dec1f365e6955b8/waku/waku_lightpush/rpc_codec.nim#L15
In the PR waku-org/nwaku#2298 we reduced the MaxWakuMessageSize
from 1MiB to 150KiB. Therefore, the 105024 number comes from substracting (
1*2^20 - 150*2^10
)to the original 10^6 that this test had when MaxWakuMessageSize ==
1*2^20
Notes