-
Notifications
You must be signed in to change notification settings - Fork 700
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
litep2p/peerstore: Fix bump last updated time #4971
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
lexnv
added
A1-insubstantial
Pull request requires no code review (e.g., a sub-repository hash update).
R0-silent
Changes should not be mentioned in any release notes
I2-bug
The node fails to follow expected behavior.
D0-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder.
labels
Jul 8, 2024
bkchr
approved these changes
Jul 8, 2024
skunert
approved these changes
Jul 8, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Jul 8, 2024
TomaszWaszczyk
pushed a commit
to TomaszWaszczyk/polkadot-sdk
that referenced
this pull request
Jul 13, 2024
This PR bumps the last time of a reputation update of a peer. Doing so ensures the peer remains in the peerstore for longer than 1 hour. Libp2p updates the `last_updated` field as well. Small summary for the peerstore: - A: when peers are reported the `last_updated` time is set to current time (not done before this PR) - B: peers that were not updated for 1 hour are removed from the peerstore - the reputation of the peers is decaying to zero over time - peers are reported with a reputation change (positive or negative depending on the behavior) Because, (A) was not updating the `last_updated` time, we might lose the reputation of peers that are constantly updated after 1hour because of (B). cc @paritytech/networking Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
ordian
added a commit
that referenced
this pull request
Jul 15, 2024
* master: (120 commits) network/tx: Ban peers with tx that fail to decode (#5002) Try State Hook for Bounties (#4563) [statement-distribution] Add metrics for distributed statements in V2 (#4554) added sync command (#4818) Bridges V2 refactoring backport and `pallet_bridge_messages` simplifications (#4935) xcm-executor: Improve logging (#4996) Remove usage of `sp-std` on templates (#5001) fixed cmd bot commenting not working (#5000) Explain usage of `<T: Config>` in FRAME storage + Update parachain pallet template (#4941) Expose metadata-hash feature from polkadot crate (#4886) Add `MAX_INSTRUCTIONS_TO_DECODE` to XCMv2 (#4978) add notices to the implementer's guide docs that changed for elastic scaling (#4983) `polkadot-parachain` simplifications and deduplications (#4916) Update Templates README docs (#4980) allow clear_origin in safe xcm builder (#4777) litep2p/peerstore: Fix bump last updated time (#4971) Make `tracing::log` work in the runtime (#4863) sp-core: Improve docs generated by `generate_feature_enabled_macro` (#4968) [Backport] Version bumps and prdocs reordering from 1.14.0 (#4955) Assets: can_decrease/increase for destroying asset is not successful (#3286) ...
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this pull request
Aug 2, 2024
This PR bumps the last time of a reputation update of a peer. Doing so ensures the peer remains in the peerstore for longer than 1 hour. Libp2p updates the `last_updated` field as well. Small summary for the peerstore: - A: when peers are reported the `last_updated` time is set to current time (not done before this PR) - B: peers that were not updated for 1 hour are removed from the peerstore - the reputation of the peers is decaying to zero over time - peers are reported with a reputation change (positive or negative depending on the behavior) Because, (A) was not updating the `last_updated` time, we might lose the reputation of peers that are constantly updated after 1hour because of (B). cc @paritytech/networking Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A1-insubstantial
Pull request requires no code review (e.g., a sub-repository hash update).
D0-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder.
I2-bug
The node fails to follow expected behavior.
R0-silent
Changes should not be mentioned in any release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR bumps the last time of a reputation update of a peer.
Doing so ensures the peer remains in the peerstore for longer than 1 hour.
Libp2p updates the
last_updated
field as well.Small summary for the peerstore:
last_updated
time is set to current time (not done before this PR)Because, (A) was not updating the
last_updated
time, we might lose the reputation of peers that are constantly updated after 1hour because of (B).cc @paritytech/networking