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

[Epoch Sync] Change EpochSyncRequest/Response to direct network messages #12236

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

robin-near
Copy link
Contributor

It was previously a mistake to use routed messages. There's no reason to do that.

This also applies rate limiting to the network messages.

Closes #11937
Closes #12091

@robin-near robin-near requested a review from a team as a code owner October 16, 2024 18:22
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 53.44828% with 27 lines in your changes missing coverage. Please review.

Project coverage is 71.67%. Comparing base (d3f2ee5) to head (10272c6).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...rk/src/network_protocol/proto_conv/peer_message.rs 0.00% 10 Missing ⚠️
chain/network/src/peer/peer_actor.rs 0.00% 7 Missing ⚠️
chain/network/src/network_protocol/borsh_conv.rs 0.00% 6 Missing ⚠️
chain/network/src/rate_limits/messages_limits.rs 88.88% 3 Missing ⚠️
chain/network/src/network_protocol/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12236      +/-   ##
==========================================
- Coverage   71.68%   71.67%   -0.02%     
==========================================
  Files         836      836              
  Lines      167138   167176      +38     
  Branches   167138   167176      +38     
==========================================
+ Hits       119815   119817       +2     
- Misses      42095    42129      +34     
- Partials     5228     5230       +2     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (-0.01%) ⬇️
db-migration 0.16% <0.00%> (-0.01%) ⬇️
genesis-check 1.25% <0.00%> (-0.01%) ⬇️
integration-tests 38.88% <32.75%> (+0.01%) ⬆️
linux 71.31% <53.44%> (-0.02%) ⬇️
linux-nightly 71.25% <53.44%> (-0.02%) ⬇️
macos 54.34% <25.53%> (+0.03%) ⬆️
pytests 1.57% <0.00%> (-0.01%) ⬇️
sanity-checks 1.37% <0.00%> (-0.01%) ⬇️
unittests 65.43% <41.37%> (-0.02%) ⬇️
upgradability 0.21% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -446,4 +459,17 @@ mod tests {
}});
assert!(serde_json::from_value::<OverrideConfig>(json).is_err());
}

#[test]
fn test_epoch_sync_rate_limit() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

@robin-near robin-near added this pull request to the merge queue Oct 18, 2024
Merged via the queue into near:master with commit 7ce9e95 Oct 18, 2024
27 of 29 checks passed
@robin-near robin-near deleted the esync9 branch October 18, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants