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: supporting peer exchange with nwaku #5983

Merged

Conversation

gabrielmer
Copy link

@gabrielmer gabrielmer commented Oct 23, 2024

Fixing and testing Peer Exchange support using nwaku.

The test TestPeerExchange should work once the following nwaku PRs are merged:

Once they are merged, I will update the nwaku submodule in this PR and it will be ready to be merged

Important changes:

  • updated nwaku submodule
  • added integration with new waku_get_my_peerid and waku_get_peerids_from_peerstore libwaku's functions
  • expanding WakuConfig with more nwaku configurations
  • added functionalities and bug fixes related to getting peers' data
  • implementing TestPeerExchange

Once the nwaku submodule is updated and libwaku is recompiled, you can run the test by executing

go test -tags="use_nwaku,gowaku_no_rln" -run TestPeerExchange ./wakuv2/... -count 1 -v -json | jq -r '.Output'

Closes waku-org/nwaku#3115

Copy link

github-actions bot commented Oct 23, 2024

We require commits to follow the Conventional Commits, but with _ for non-breaking changes.
Please fix these commit messages:

fixing test instructions
fixed linting
fixing conflicts
fixing flaky test
fix compilation error
updating nwaku
implementing feedback
comments
resolve conflicts
updating nwaku
cleanup
small refactor and logs
passing test
integrating waku_get_my_peerid
advancing with the px test
fixing address in use error
calling relaySubscrbe only if relay is enabled
start implementing lightpush test

wakuv2/nwaku.go Outdated
Comment on lines 372 to 387
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
NodeKey string `json:"key,omitempty"`
EnableRelay bool `json:"relay"`
LogLevel string `json:"logLevel"`
DnsDiscovery bool `json:"dnsDiscovery,omitempty"`
DnsDiscoveryUrl string `json:"dnsDiscoveryUrl,omitempty"`
MaxMessageSize string `json:"maxMessageSize,omitempty"`
Copy link
Author

Choose a reason for hiding this comment

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

Not sure why this happens, in my IDE looks aligned, is there a linting tool I should use?

Copy link
Member

Choose a reason for hiding this comment

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

In vscode, when installing the go extension, it asks to install gofmt then the linting happens automagically

@status-im-auto
Copy link
Member

status-im-auto commented Oct 23, 2024

Jenkins Builds

Click to see older builds (15)
Commit #️⃣ Finished (UTC) Duration Platform Result
18976d6 #1 2024-10-23 16:12:44 ~1 min ios 📄log
✖️ 18976d6 #1 2024-10-23 16:13:03 ~1 min tests 📄log
18976d6 #1 2024-10-23 16:13:22 ~2 min android 📄log
✖️ 18976d6 #1 2024-10-23 16:13:37 ~2 min tests-rpc 📄log
18976d6 #1 2024-10-23 16:13:42 ~2 min linux 📄log
65e19e7 #2 2024-10-24 14:25:45 ~54 sec android 📄log
65e19e7 #2 2024-10-24 14:25:52 ~56 sec linux 📄log
✖️ 65e19e7 #2 2024-10-24 14:26:33 ~1 min tests 📄log
65e19e7 #2 2024-10-24 14:26:46 ~1 min ios 📄log
✖️ 65e19e7 #2 2024-10-24 14:27:00 ~2 min tests-rpc 📄log
✖️ 2b5b1f3 #3 2024-10-24 16:09:38 ~1 min tests 📄log
✔️ 2b5b1f3 #3 2024-10-24 16:11:54 ~3 min ios 📦zip
✔️ 2b5b1f3 #3 2024-10-24 16:11:57 ~3 min linux 📦zip
✔️ 2b5b1f3 #3 2024-10-24 16:13:26 ~5 min android 📦aar
✖️ 2b5b1f3 #3 2024-10-24 16:14:09 ~6 min tests-rpc 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 280be14 #4 2024-10-24 16:27:05 ~1 min tests 📄log
✔️ 280be14 #4 2024-10-24 16:27:37 ~2 min android 📦aar
✔️ 280be14 #4 2024-10-24 16:28:15 ~2 min linux 📦zip
✔️ 280be14 #4 2024-10-24 16:28:33 ~3 min ios 📦zip
✖️ 280be14 #4 2024-10-24 16:31:16 ~5 min tests-rpc 📄log
✖️ f4c4502 #5 2024-10-25 08:00:31 ~1 min tests 📄log
✔️ f4c4502 #5 2024-10-25 08:01:19 ~2 min android 📦aar
✔️ f4c4502 #5 2024-10-25 08:01:42 ~2 min linux 📦zip
✔️ f4c4502 #5 2024-10-25 08:02:09 ~3 min ios 📦zip
✖️ f4c4502 #5 2024-10-25 08:04:47 ~5 min tests-rpc 📄log

@gabrielmer gabrielmer self-assigned this Oct 23, 2024
@gabrielmer gabrielmer marked this pull request as ready for review October 23, 2024 16:34
Copy link
Contributor

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

Wonderful! Thanks for it! 🙌

wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
wakuv2/nwaku.go Outdated Show resolved Hide resolved
@gabrielmer gabrielmer force-pushed the feat-supporting-peer-exchange-with-nwaku-2 branch from 65e19e7 to 2b5b1f3 Compare October 24, 2024 16:07
Copy link

codecov bot commented Oct 24, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
23 1 22 0
View the top 1 failed tests by shortest run time
tests.test_router.TestTransactionFromRoute test_tx_from_route
Stack Traces | 11s run time
tests/test_router.py:114: in test_tx_from_route
    assert tx_details["to"] == user_2.address
E   AssertionError: assert '0x70997970C5...50e0d17dc79C8' == '0x70997970c5...50e0d17dc79c8'
E     - 0x70997970c51812dc3a010c7d01b50e0d17dc79c8
E     ?           ^        ^   ^                ^
E     + 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
E     ?           ^        ^   ^                ^

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@gabrielmer gabrielmer merged commit 8c4c876 into feature/nwaku-in-status Oct 25, 2024
3 of 7 checks passed
@gabrielmer gabrielmer deleted the feat-supporting-peer-exchange-with-nwaku-2 branch October 25, 2024 08:03
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.

4 participants