-
Notifications
You must be signed in to change notification settings - Fork 248
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
FetchCommunity
doesn't get a new community description after adding permissions
#4496
Comments
@igor-sirotin func (s *MessengerStoreNodeRequestSuite) TestRequestUpdateCommunityFromShard() {
s.createOwner()
s.createBob()
s.waitForAvailableStoreNode(s.owner)
community := s.createCommunity(s.owner)
expectedShard := &shard.Shard{
Cluster: shard.MainStatusShardCluster,
Index: 23,
}
shardRequest := &requests.SetCommunityShard{
CommunityID: community.ID(),
Shard: expectedShard,
}
_, err := s.owner.SetCommunityShard(shardRequest)
s.Require().NoError(err)
s.waitForAvailableStoreNode(s.bob)
community, err = s.owner.communitiesManager.GetByID(community.ID())
s.Require().NoError(err)
s.Require().NotNil(community)
s.Require().NotNil(community.Shard())
s.fetchCommunity(s.bob, community.CommunityShard(), community)
ownerEditRequest := &requests.EditCommunity{
CommunityID: community.ID(),
CreateCommunity: requests.CreateCommunity{
Name: "changed name",
Description: "changed description",
Color: community.Color(),
Membership: community.Permissions().Access,
},
}
_, err = s.owner.EditCommunity(ownerEditRequest)
s.Require().NoError(err)
community, err = s.owner.communitiesManager.GetByID(community.ID())
s.fetchCommunity(s.bob, community.CommunityShard(), community)
} |
My steps to reproduce: Instance A:
Instance B:
N collectibles are added to the list. The client detects these belong to a community. Fetches community from mailserver. Checks -o- If Account B joins the community, then the next collectible refresh does get the Extra Collectible metadata. |
@igor-sirotin fetchCommunity on the first call returns the correct community, on all next fetchCommunity calls - it returns current -1
|
huh interesting... In my tests, I wouldn't get the new token metadata no matter how many times I retried |
@dlipicar I think your case is a little bit more complex, as you deploy OnwerToken, so your response can be put into P.S. But I'm not sure that's the case |
I have got 2 scenarios and the results are really strange: Scenario 1.
Scenario 2.
Additionally when control node changes community name and I fetch community in CLI bridge the name is always old. |
Here're the action points we got from the call:
Also, we should think later of how should |
It seems that it's a test-only problem. We request the data from the store node too fast, faster then it's being published to the store node by the owner. I'll keep an eye on this, meanwhile go to the next step. |
Implemented a test for filters. Everything's ok there. |
Confirming that the "previous community name test" is failing because the envelope is too slow. Note that It's strange that this doesn't happen when creating the community. But I guess that's a question of time. We should add some code to wait for the store node to receive the envelopes. 2023-12-20T23:41:43.589Z INFO owner-waku-node wakuv2/waku.go:1045 publishing message via relay {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "pubsubTopic": "/waku/2/default-waku/proto", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000}
2023-12-20T23:41:43.589Z DEBUG owner-messenger pushnotificationclient/client.go:729 handling message sent
2023-12-20T23:41:43.589Z DEBUG owner-messenger protocol/messenger_communities.go:304 published org
2023-12-20T23:41:43.589Z DEBUG bob-messenger.StoreNodeRequestManager protocol/messenger_store_node_request_manager.go:357 local community description is not newer than existing {"requestID": {"requestType":0,"dataID":"0x02c4f8c5fe2d7d55bb09ea0323e418a6bb53659493c7a3c00e785ec6a133ccb5ef"}, "envelopesCount": 4, "existingClock": 1703115703527, "minimumDataClock": 1703115703527}
2023-12-20T23:41:43.589Z DEBUG owner-messenger.communityKeyDistributor protocol/communities_key_distributor.go:30 distributing keys {"communityID": "0x02c4f8c5fe2d7d55bb09ea0323e418a6bb53659493c7a3c00e785ec6a133ccb5ef"}
2023-12-20T23:41:43.589Z DEBUG owner-waku-node wakuv2/waku.go:1369 received new envelope {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000}
2023-12-20T23:41:43.589Z DEBUG owner-waku-node wakuv2/waku.go:1412 w envelope already cached {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116"}
2023-12-20T23:41:43.589Z DEBUG owner-waku-node wakuv2/waku.go:1425 posting event {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116"}
2023-12-20T23:41:43.590Z DEBUG owner-waku-node wakuv2/waku.go:1475 filters did match {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "pubsubTopic": "/waku/2/default-waku/proto", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000}
2023-12-20T23:41:43.590Z DEBUG owner-waku-node wakuv2/waku.go:1475 filters did match {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "pubsubTopic": "/waku/2/default-waku/proto", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000}
2023-12-20T23:41:43.590Z DEBUG store-node-waku wakuv2/waku.go:1369 received new envelope {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000}
2023-12-20T23:41:43.590Z DEBUG store-node-waku wakuv2/waku.go:1415 cached w envelope {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116"}
2023-12-20T23:41:43.590Z DEBUG store-node-waku wakuv2/waku.go:1425 posting event {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116"}
2023-12-20T23:41:43.590Z DEBUG store-node-waku wakuv2/waku.go:1470 filters did not match {"envelopeHash": "0x237550142739ba0b2ccd9236952eddd418708e872b88d492da3150829063c116", "pubsubTopic": "/waku/2/default-waku/proto", "contentTopic": "/waku/1/0xd4f16ee1/rfc26", "timestamp": 1703115703589889000} |
@igor-sirotin @mprakhov I found some buggy behaviour. I used MessengerStoreNodeRequestSuite::TestRequestBigCommunity on status.prod fleet.
|
test1: |
Another test - I created a new community and changed the name 4 times. Then I ran FetchCommunity test and displayed timestamp in HandleCommunityDescriptionMessage.
Indeed, fetched community had a name changed by a message with timestamp 1,703,161,401,939. |
So far it seems that waku envelopes are fetched in the wrong order. |
Ok, so there's a problem indeed with nim-waku implementation: waku-org/nwaku#2317 |
TestRequestMultipleCommunities
#4495, but without permissions.Let's gather the information here.
The text was updated successfully, but these errors were encountered: