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
Gossip ratelimiting #3040
Closed
rustyrussell
wants to merge
15
commits into
ElementsProject:master
from
rustyrussell:guilt/dont-rexmit-recvd-gossip
Closed
Gossip ratelimiting #3040
rustyrussell
wants to merge
15
commits into
ElementsProject:master
from
rustyrussell:guilt/dont-rexmit-recvd-gossip
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
We overrode this with travis, but it's not a travis issue. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We've been slack, but it's going to be important for testing ratelimiting. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
In particular, the timestamp might be wrong once we start checking that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
sig is only non-const so we can override if NULL, but talz helps us here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Write helpers to split it into non-timestamp, non-signature parts, and simply compare those. We extract a helper to do channel_update, too. This is more generic than our previous approach, and simpler. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Default is 5 x gossip interval == 5 minutes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Never make them less than gossip_min_interval apart. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Make update_local_channel use a timer if it's too soon to make another update. 1. Implement cupdate_different() which compares two updates. 2. make update_local_channel() take a single arg for timer usage. 3. Set timestamp of non-disable update back 5 minutes, so we can always generate a disable update if we need to. 4. Make update_local_channel() itself do the "unchanged update" suppression. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
gossipd.c is doing too many things: this is a start. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This is useful for various "partial timestamp" forms of propagation in future, esp. minisketch. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
One day is plenty of time to propagate the update. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
If you send a message which simply changes timestamp and signature, we drop it. You shouldn't be doing that, and the door to ignoring them was opened by by option_gossip_query_ex, which would allow clients to ignore updates with the same checksum. This is more aggressive at reducing spam messages, but we allow refreshes (to be conservative, we allow them even when 1/2 of the way through the refresh period). I dropped the now-unnecessary sleep from test_gossip_pruning, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
And similar for node_announcement. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
185f954
to
5dd585e
Compare
Closing to break it up into more reviewable pieces. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We more aggressively suppress our own gossip, and we have a ratelimit on others' gossip. We also enforce timestamp sanity on gossip we receive (I'm surprised we didn't already!).
Closes: #2993
Closes: #2994