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_: shards.staging fleet #5160

Merged
merged 1 commit into from
May 16, 2024
Merged

feat_: shards.staging fleet #5160

merged 1 commit into from
May 16, 2024

Conversation

richard-ramos
Copy link
Member

Adds the staging fleet to the list of available fleets in status-go

@status-im-auto
Copy link
Member

status-im-auto commented May 14, 2024

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3eb93eb #1 2024-05-14 19:49:43 ~4 min linux 📦zip
✔️ 3eb93eb #1 2024-05-14 19:50:16 ~5 min ios 📦zip
✔️ 3eb93eb #1 2024-05-14 19:51:04 ~6 min android 📦aar
✔️ 3eb93eb #1 2024-05-14 20:29:22 ~44 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 6b45d63 #2 2024-05-15 23:19:48 ~1 min android 📦aar
✔️ 6b45d63 #2 2024-05-15 23:19:59 ~2 min linux 📦zip
✔️ 6b45d63 #2 2024-05-15 23:20:58 ~3 min ios 📦zip
✔️ 6b45d63 #2 2024-05-15 23:59:49 ~41 min tests 📄log

Copy link
Member

@jakubgs jakubgs left a comment

Choose a reason for hiding this comment

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

Why are we hardcoding store nodes in services/mailservers/fleet.go? What's the point of ENR DNS discovery and bootnodes if we do that?

Copy link
Contributor

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

Left few comments not related to this change but good to have.

Approving for now as i don't want these to block this.

@@ -0,0 +1,28 @@
{
"Rendezvous": false,
"NoDiscovery": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean, not to use this fleet for discovery? Because i already see my desktop app is connected to some of the nodes in shards.staging fleet.

Copy link
Member Author

Choose a reason for hiding this comment

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

These two items are for WakuV1, rendezvous + discovery for V2 are setup in WakuV2Config attribute

@@ -231,5 +231,41 @@ func DefaultMailservers() []Mailserver {
Fleet: params.FleetShardsTest,
Version: 2,
},
Mailserver{
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to configure all mail servers here?
Shouldn't they be discovered by discv5 anyways?

Copy link
Member Author

Choose a reason for hiding this comment

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

While I agree that hardcoding the storenodes here is bad, currently for Status we use an specific set of trusted storenodes that have high availability and store at least 30d of data. Using discv5 would mean that it is possible to discover store nodes that do not have these guarantees. And it's also problematic because the way status works right now, it will not request history for a period of time that it has already requested the history before, so if we choose a random storenode and we request history for some time interval, and that storenode has no data for that interval, then, the client will no longer retrieve history for that period of time.

I wonder if storev3 sync solves this?

params.FleetStatusTest,
params.FleetStatusProd,
params.FleetShardsTest,
params.FleetShardsStaging,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should remove all old fleets that are no longer part of static sharding?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, looking at fleets.status.im, those fleets are still active.
I think if we remove these fleets from this part of code, we'd likely need to make sure those fleets are gone too, otherwise a deployment of status-go to those fleets will likely fail.
cc: @jakubgs to confirm if this is correct

Copy link
Member

Choose a reason for hiding this comment

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

The only fleets that should be removed are wakuv2.* fleets.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since the desktop and mobile apps are using only clusterID 16, I was wondering if there is a need for all the other Waku fleets that no longer use clusterID. Maybe better to check with Franck/Hanno though.

"Enabled": true,
"Fleet": "shards.staging",
"BootNodes": [],
"TrustedMailServers": [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add priority list of mailservers here rather than in code?

@richard-ramos
Copy link
Member Author

@jakubgs: Why are we hardcoding store nodes in services/mailservers/fleet.go? What's the point of ENR DNS discovery and bootnodes if we do that?

I think this file existed before we even had DNS Discovery, and updating the code to remove the hardcode has been kicked down the road for a while... I'll open an issue.

However something interesting to take into account is that using only dns discovery is not a good solution and we'd likely need to have the list of storenodes somewhere, either by using multiaddresses with IP Addresses instead of domain names in the node config, or reliying in discv5, and compare the peerID of the discovered nodes with a list of trusted nodes to make sure we use specific store nodes...

It has happened before that core contributors have had problems with their DNS for some reason, and then the core contributor couldn't retrieve the bootnodes and ended up with 0 peers. If the same situation happened with the storenodes dns discovery url, it would mean that no history nodes would be available for the user

@jakubgs
Copy link
Member

jakubgs commented May 15, 2024

Fair enough.

@richard-ramos
Copy link
Member Author

Issue for removing the hardcoded storenodes can be found here: #5171

@richard-ramos richard-ramos merged commit bc8b6d2 into develop May 16, 2024
9 checks passed
@richard-ramos richard-ramos deleted the staging-fleet branch May 16, 2024 00:09
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.

None yet

6 participants