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

fix(network): validate spends even if we get did not get the majority #1942

Merged
merged 5 commits into from
Jul 6, 2024

Conversation

RolandSherwin
Copy link
Member

@RolandSherwin RolandSherwin commented Jul 5, 2024

  • We were not considering the records that were returned from the network if the quorum was not fulfilled. But these should be considered during validation.

What the PR buys us is that:
Quickly consolidate double spends attempts and store them in nodes. Clients were already safe, but nodes can possibly be out of sync for a while and would wait for replication to get them to sync. So it just reduces 1 step for the nodes

  • Also run spend simulation as its own CI run. The local network was getting overwhelemed.

sn_node/src/put_validation.rs Show resolved Hide resolved
@@ -33,6 +33,7 @@ impl Network {
let get_cfg = GetRecordCfg {
get_quorum: Quorum::Majority,
retry_strategy: None,
// This should not be set.
Copy link
Member

Choose a reason for hiding this comment

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

Why? Maybe a longer comment would help?

@RolandSherwin RolandSherwin force-pushed the spend_fix branch 2 times, most recently from 85d53d6 to 9341598 Compare July 5, 2024 21:43
@RolandSherwin RolandSherwin enabled auto-merge July 6, 2024 07:57
@RolandSherwin RolandSherwin added this pull request to the merge queue Jul 6, 2024
Merged via the queue into maidsafe:main with commit 45ca228 Jul 6, 2024
44 checks passed
@RolandSherwin RolandSherwin deleted the spend_fix branch July 6, 2024 08:36
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