retains crds values if the origin is still active#16576
retains crds values if the origin is still active#16576behzadnouri merged 2 commits intosolana-labs:masterfrom
Conversation
aa809f0 to
7a813bf
Compare
Codecov Report
@@ Coverage Diff @@
## master #16576 +/- ##
=======================================
Coverage 82.9% 82.9%
=======================================
Files 416 416
Lines 115439 115477 +38
=======================================
+ Hits 95784 95831 +47
+ Misses 19655 19646 -9 |
872c9bf to
4fcac53
Compare
e9f2851 to
a155f70
Compare
Local timestamps are updated for records associated with a pubkey if the origin is still active: https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311 However this is done inconsistently on some gossip paths (pull requests and pull responses) but not all (e.g. push messages). Additionally update_record_timestamp is inefficient since there can be ~800 values associated with each pubkey. This commit updates records timestamps only on contact-infos; and, instead utilizes origin's timestamp when purging old values.
a155f70 to
82616e0
Compare
carllin
left a comment
There was a problem hiding this comment.
Nice!
Small disambiguation on the problem description: by "origin timestamp" we don't mean the timestamp marked by the original sender, we mean the timestamp from the last refresh on the origin's CrdsValueLabel::ContactInfo, which is now refreshed on every message update from that origin.
yeah, that is correct |
Local timestamps are updated for records associated with a pubkey if the origin is still active: https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311 However this is done inconsistently on some gossip paths (pull requests and pull responses) but not all (e.g. push messages). Additionally update_record_timestamp is inefficient since there can be ~800 values associated with each pubkey. This commit updates records timestamps only on contact-infos; and, instead utilizes origin's timestamp when purging old values. (cherry picked from commit 2c82f21)
Local timestamps are updated for records associated with a pubkey if the origin is still active: https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311 However this is done inconsistently on some gossip paths (pull requests and pull responses) but not all (e.g. push messages). Additionally update_record_timestamp is inefficient since there can be ~800 values associated with each pubkey. This commit updates records timestamps only on contact-infos; and, instead utilizes origin's timestamp when purging old values. (cherry picked from commit 2c82f21) Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Problem
Local timestamps are updated for records associated with a pubkey if the
origin is still active:
https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311
However this is done inconsistently on some gossip paths (pull requests
and pull responses) but not all (e.g. push messages). Additionally
update_record_timestamp is inefficient since there can be ~800 values
associated with each pubkey.
This commit updates records timestamps only on contact-infos; and,
instead utilizes origin's timestamp when purging old values.
Summary of Changes