Skip to content

Conversation

@igor-sirotin
Copy link
Collaborator

Some findings during implementing #7113

Description

  1. CreateRequestToJoin - return error if not enough Signatures was provided

  2. generateCommunityRequestsForSigning - return error if any of given addresses to reveal was not found in wallet accounts, or was found, but didn't match requirements (non-chat & non-watch).

@status-im-auto
Copy link
Member

status-im-auto commented Dec 5, 2025

Jenkins Builds

Click to see older builds (22)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 95bcf95 #1 2025-12-05 00:09:48 ~4 min linux/status-go 📦zip
✔️ 95bcf95 #1 2025-12-05 00:10:47 ~4 min macos/status-go 📦zip
✔️ 95bcf95 #1 2025-12-05 00:13:15 ~7 min windows/status-go 📦zip
✔️ 95bcf95 #1 2025-12-05 00:14:01 ~8 min linux/nwaku 📦zip
✔️ 95bcf95 #1 2025-12-05 00:15:00 ~9 min macos/nwaku 📦zip
95bcf95 #1 2025-12-05 00:21:09 ~15 min windows/nwaku 📄log
✖️ 95bcf95 #1 2025-12-05 00:29:21 ~23 min tests-rpc 📄log
✖️ 95bcf95 #1 2025-12-05 00:29:34 ~23 min tests-rpc 📄log
✖️ 95bcf95 #1 2025-12-05 00:31:24 ~25 min tests 📄log
✖️ 95bcf95 #1 2025-12-05 00:33:21 ~27 min tests 📄log
✖️ 95bcf95 #2 2025-12-05 14:25:31 ~18 min tests-rpc 📄log
✔️ 8167c78 #2 2025-12-05 15:14:36 ~4 min linux/status-go 📦zip
✔️ 8167c78 #2 2025-12-05 15:15:15 ~4 min macos/status-go 📦zip
✔️ 8167c78 #2 2025-12-05 15:18:44 ~8 min linux/nwaku 📦zip
✔️ 8167c78 #2 2025-12-05 15:18:46 ~8 min windows/status-go 📦zip
✔️ 8167c78 #2 2025-12-05 15:19:32 ~8 min macos/nwaku 📦zip
8167c78 #2 2025-12-05 15:25:49 ~15 min windows/nwaku 📄log
✖️ 8167c78 #2 2025-12-05 15:30:53 ~20 min tests-rpc 📄log
✖️ 8167c78 #3 2025-12-05 15:31:16 ~20 min tests-rpc 📄log
✖️ 8167c78 #2 2025-12-05 15:35:50 ~25 min tests 📄log
✖️ 8167c78 #2 2025-12-05 15:39:43 ~29 min tests 📄log
✖️ 8167c78 #4 2025-12-05 15:57:06 ~17 min tests-rpc 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b92a4b7 #3 2025-12-05 19:02:39 ~4 min linux/status-go 📦zip
✔️ b92a4b7 #3 2025-12-05 19:03:13 ~4 min macos/status-go 📦zip
✔️ b92a4b7 #3 2025-12-05 19:06:13 ~7 min linux/nwaku 📦zip
✔️ b92a4b7 #3 2025-12-05 19:06:13 ~7 min windows/status-go 📦zip
✔️ b92a4b7 #3 2025-12-05 19:07:26 ~8 min macos/nwaku 📦zip
b92a4b7 #3 2025-12-05 19:13:43 ~14 min windows/nwaku 📄log
✖️ b92a4b7 #5 2025-12-05 19:19:13 ~20 min tests-rpc 📄log
✖️ b92a4b7 #3 2025-12-05 19:20:49 ~22 min tests-rpc 📄log
✖️ b92a4b7 #3 2025-12-05 19:25:08 ~26 min tests 📄log
✖️ b92a4b7 #3 2025-12-05 19:25:58 ~27 min tests 📄log
✖️ b1317b0 #4 2025-12-05 22:00:25 ~1 min tests 📄log
✔️ b1317b0 #4 2025-12-05 22:03:10 ~4 min macos/status-go 📦zip
✔️ b1317b0 #4 2025-12-05 22:03:28 ~5 min linux/status-go 📦zip
✔️ b1317b0 #4 2025-12-05 22:05:58 ~7 min linux/nwaku 📦zip
✔️ b1317b0 #4 2025-12-05 22:06:16 ~7 min windows/status-go 📦zip
✔️ b1317b0 #4 2025-12-05 22:07:30 ~8 min macos/nwaku 📦zip
b1317b0 #4 2025-12-05 22:11:14 ~12 min windows/nwaku 📄log
✖️ b1317b0 #4 2025-12-05 22:18:55 ~20 min tests-rpc 📄log
✖️ b1317b0 #6 2025-12-05 22:19:05 ~20 min tests-rpc 📄log
✔️ b1317b0 #4 2025-12-05 22:28:35 ~29 min tests 📄log
✖️ b1317b0 #7 2025-12-05 22:37:11 ~17 min tests-rpc 📄log

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.79%. Comparing base (55bbc73) to head (b1317b0).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
protocol/messenger_communities.go 66.66% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #7178       +/-   ##
============================================
+ Coverage    34.87%   59.79%   +24.92%     
============================================
  Files          798      813       +15     
  Lines       111336   113419     +2083     
============================================
+ Hits         38825    67822    +28997     
+ Misses       67595    38747    -28848     
- Partials      4916     6850     +1934     
Flag Coverage Δ
functional 33.59% <40.74%> (-1.28%) ⬇️
unit 55.36% <44.44%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
protocol/communities/manager.go 60.16% <100.00%> (+39.98%) ⬆️
protocol/messenger_communities.go 49.74% <66.66%> (+30.56%) ⬆️

... and 521 files with indirect coverage changes

requestToJoin.CalculateID()

addSignature := len(request.Signatures) == len(request.AddressesToReveal)
if len(request.Signatures) != len(request.AddressesToReveal) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we call CreateRequestToJoin for an open community also?
If so the list of signatures is empty in that case and this will always return.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or AddressesToReveal is also empty in that case? I really don't remember.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've tested with Status Desktop.
Created a simplest community (auto accept, no permissions, no minted tokens). Member was still required to reveal addresses and input password for signatures. So it's the same flow, we should be good.

return nil, fmt.Errorf("address %s not found in wallet", address)
}

if len(addressesToReveal) > 0 && !containsAddress(addressesToReveal, walletAccount.Address.Hex()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, this condition en(addressesToReveal) > 0 was used in some tests. Basically, if it's empty, then all wallet accounts will be returned 🤔 Is this intended?

A few tests were relying on this behaviour, passing empty list of addresses:

s.joinCommunity(community, s.alice, alicePassword, []string{})
s.joinCommunity(community, s.bob, bobPassword, []string{})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe we should explicitly return an error when an empty addressesToReveal is given?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added explicit error return here

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Thank you for opening this pull request!

We require pull request titles and commits to follow the Conventional Commits specification and it looks like your PR needs to be adjusted.

Details:

According to the conventional-commits specification, some of the commit messages are not valid.

@igor-sirotin
Copy link
Collaborator Author

Functional tests are not passing, because we don't set signatures arg at all.
Signatures are implemented in #7113. So I will wait for it to merged, then finish this PR. Then test_membership_no_valid_tokens_fake_address can also be fixed in this PR.

@igor-sirotin igor-sirotin moved this from Code Review to Blocked in Status Desktop/Mobile Board Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

4 participants