Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: check filter against lightPush, basic implementation #2185

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Oct 15, 2024

Problem

We observe some full nodes in the network that accept subscription request from js-waku but do not push messages later.

Solution

As mitigation for it implement basic handler for sending ephemeral message during subscription setup and check.

Notes

@@ -56,6 +56,6 @@ export function messageHashStr(
message: IProtoMessage | IDecodedMessage
): string {
const hash = messageHash(pubsubTopic, message);
const hashStr = bytesToUtf8(hash);
const hashStr = bytesToHex(hash);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fix for messageHashStr when it doesn't transform bytes properly and shows weird symbols

@weboko
Copy link
Collaborator Author

weboko commented Oct 15, 2024

This is temporary approach and should be revisited in #2075

Copy link

github-actions bot commented Oct 15, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 85.85 KB (+0.55% 🔺) 1.8 s (+0.55% 🔺) 1.6 s (+13.36% 🔺) 3.3 s
Waku Simple Light Node 137.47 KB (+0.12% 🔺) 2.8 s (+0.12% 🔺) 2 s (-20.15% 🔽) 4.7 s
ECIES encryption 22.88 KB (0%) 458 ms (0%) 482 ms (+17.54% 🔺) 940 ms
Symmetric encryption 22.37 KB (0%) 448 ms (0%) 809 ms (+175.42% 🔺) 1.3 s
DNS discovery 72.9 KB (0%) 1.5 s (0%) 1.7 s (+41.38% 🔺) 3.2 s
Peer Exchange discovery 74.1 KB (0%) 1.5 s (0%) 1.2 s (-16.14% 🔽) 2.7 s
Local Peer Cache Discovery 68.03 KB (0%) 1.4 s (0%) 1.3 s (+7.18% 🔺) 2.6 s
Privacy preserving protocols 76.02 KB (0%) 1.6 s (0%) 2 s (+126.59% 🔺) 3.5 s
Waku Filter 80.36 KB (+0.91% 🔺) 1.7 s (+0.91% 🔺) 1.1 s (-8.48% 🔽) 2.7 s
Waku LightPush 75.03 KB (0%) 1.6 s (0%) 1.6 s (+11.06% 🔺) 3.1 s
History retrieval protocols 77.03 KB (0%) 1.6 s (0%) 928 ms (-27.98% 🔽) 2.5 s
Deterministic Message Hashing 7.39 KB (0%) 148 ms (0%) 511 ms (+179.49% 🔺) 659 ms

@weboko weboko marked this pull request as ready for review October 15, 2024 23:12
@weboko weboko requested a review from a team as a code owner October 15, 2024 23:12
Copy link
Collaborator

@danisharora099 danisharora099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice browser tests are failing now, unrelated to the PR though

@weboko
Copy link
Collaborator Author

weboko commented Oct 16, 2024

I notice browser tests are failing now, unrelated to the PR though

I suppose there was an outage and wrong versions / configs were used lol

15 10 2024 23:15:55.796:ERROR [launcher]: ChromeHeadless stderr: [7983:7983:1015/231555.287086:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (

@weboko weboko merged commit 9f08363 into weboko/reliability-filter Oct 16, 2024
10 of 11 checks passed
@weboko weboko deleted the weboko/filter-light-push-check branch October 16, 2024 22:48
weboko added a commit that referenced this pull request Oct 16, 2024
* feat: lighten retry logic for LightPush

* update tests

* remove base protocol sdk from light push, add unit tests for light push

* remove replaced test

* ensure numPeersToUse is respected

* turn off check for missing messages

* fix recurring ping

* add useful logs

* skip tests

* remove comment

* feat: check filter subscriptions against lightPush (#2185)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants