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

feat(kad): update republish interval and expiration time defaults #3230

Merged
merged 97 commits into from
Mar 29, 2024

Conversation

lidel
Copy link
Member

@lidel lidel commented Dec 12, 2022

Description

This patch applies changes from libp2p/specs#451. In particular, the new defaults are:

  • Record Expiration: 48h
  • Record Republish Interval: 22h

Closes #3229.

Notes

Links to any relevant issues

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Applies changes from libp2p/specs#451

New defaults are:
Record Expiration: 48h
Record Republish Interval: 22h

Closes #3229
@lidel lidel requested a review from mxinden December 12, 2022 18:07
@thomaseizinger thomaseizinger changed the title feat(dht): updated republish and expiration feat(dht): update republish interval and expiration time defaults Dec 13, 2022
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

@lidel thank you for tackling this. Very much appreciate you making sure implementations are consistent.

Can you add a changelog entry? Otherwise this is good to go from my end.

protocols/kad/src/behaviour.rs Outdated Show resolved Hide resolved
@mxinden mxinden changed the title feat(dht): update republish interval and expiration time defaults feat(dht)!: update republish interval and expiration time defaults Dec 19, 2022
@mxinden
Copy link
Member

mxinden commented Dec 19, 2022

@thomaseizinger I added ! to the title, given that this is a breaking change. Let me know in case I misunderstand the conventions of conventional commits.

@thomaseizinger
Copy link
Contributor

@thomaseizinger I added ! to the title, given that this is a breaking change. Let me know in case I misunderstand the conventions of conventional commits.

I guess this is semantically breaking yeah.

@mxinden
Copy link
Member

mxinden commented Jan 19, 2023

@lidel friendly ping. Can you add a changelog entry? Let us know if you want us to take over.

@thomaseizinger thomaseizinger added the need/author-input Needs input from the original author label Jan 19, 2023
@github-actions github-actions bot added the Stale label Mar 21, 2023
@github-actions github-actions bot closed this Mar 28, 2023
@thomaseizinger thomaseizinger deleted the feat/update-dht-defaults branch April 26, 2023 16:38
@guillaumemichel guillaumemichel restored the feat/update-dht-defaults branch January 23, 2024 18:53
@guillaumemichel
Copy link
Contributor

My first contribution here (:

Just added the changelog entry, let me know if anything else is required.

Copy link
Contributor

mergify bot commented Jan 23, 2024

This pull request has merge conflicts. Could you please resolve them @lidel? 🙏

@thomaseizinger thomaseizinger added this to the v0.54.0 milestone Jan 24, 2024
Copy link
Contributor

mergify bot commented Feb 19, 2024

This pull request has merge conflicts. Could you please resolve them @lidel? 🙏

dhuseby and others added 3 commits March 28, 2024 16:22
Rewording the the choices to clearly direct technical questions to GH dicussions and community discussion to discuss.libp2p.io.

Pull-Request: #5116.
dependabot bot and others added 24 commits March 28, 2024 16:31
The same as #5196

There are some problem when merging #5196, resubmit this mr.

Pull-Request: #5255.
In browsers, only the code 1000 and codes between 3000-4999 are allowed to be set by userland code: https://websockets.spec.whatwg.org/#dom-websocket-close

I found this while debugging use-after-free errors in our WASM application. Turns out, when connections are timing out, libp2p in rust drops them, but does not seem to close them explicitly (we are using libp2p-swarm). This led to these WebSockets still emitting events, the handlers of which were already dropped on the rust side, though.

A long investigation led me to have a look into the `Result` that gets returned from `close_with_code_and_reason`, and it turns out it's an error! Specifically:
```
InvalidAccessError: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1001 is neither.
```

This PR only fixes the failing closing of the WebSocket, not the remaining use-after-free problem.

Pull-Request: #5229.
## Description
mergify automatic approval for dependabot PR's was disabled on
#5208 following
malfunctioning.
This PR re-enables mergify's automatic merge of Dependabot PR's and the
`trivial` label with the syntax [suggested on mergify's
doc](https://docs.mergify.com/integrations/dependabot/#2-pr-approval)
@jxs jxs added the send-it label Mar 29, 2024
@mergify mergify bot merged commit 9805339 into master Mar 29, 2024
71 of 72 checks passed
@mergify mergify bot deleted the feat/update-dht-defaults branch March 29, 2024 11:34
@jxs jxs changed the title feat(dht)!: update republish interval and expiration time defaults feat(kad): update republish interval and expiration time defaults Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author send-it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kad: Update republish and expiration interval to new spec