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
chore: expand replication range #885
Conversation
523b990
to
366c2e8
Compare
sn_networking/src/record_store.rs
Outdated
// Blindly sent to validation to allow double spend can be detected. | ||
// TODO: consider avoid throw duplicated chunk to validation. | ||
// Chunk with existing key do not to be stored again. | ||
// `Spend` or `Register` with same content_hash do not to be stored again, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//
Spendor
Register with same content_hash do not to be stored again,
do need to be stored
no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's for the case of same key AND same content_cash
, so do not need to be stored again
c90b054
to
40f814f
Compare
fa7d9e6
to
bb157fc
Compare
bb157fc
to
eb5f3ec
Compare
This reverts commit df8b357.
eb5f3ec
to
5065a97
Compare
Description
Summary generated by Reviewpad on 23 Oct 23 14:12 UTC
This pull request expands the replication range in the code. It modifies the
sn_networking/src/cmd.rs
,sn_networking/src/lib.rs
, andsn_node/src/replication.rs
files. The changes include updating theREPLICATE_RANGE
constant to be twice theCLOSE_GROUP_SIZE
, and using this new range in the code logic to determine whether a peer is in the close range. The patch also involves making adjustments to the replication process based on whether the target peer is a dead peer or a new peer.