-
Notifications
You must be signed in to change notification settings - Fork 64
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
Implement Topics #126
Closed
Closed
Implement Topics #126
Changes from all commits
Commits
Show all changes
407 commits
Select commit
Hold shift + click to select a range
df74c4b
Run cargo fmt
emhane 28188d0
Move hashing of topic up one layer to app
emhane 8c8b1ff
Remove unused deps
emhane bbe4329
Fix send_register_topics logic
emhane 622ca2b
Add warning
emhane 1746aaf
Fix regtopics
emhane 066e2a5
Fix regtopics
emhane dd12411
Allow NODES repsonse for RETOPIC
emhane b914ac4
Match NODES response for REGTOPIC req
emhane ed26c95
Add hack for topic query double nodes response
emhane ea80eab
Add warning to topic query double nodes response logic
emhane f817aee
Add debug info
emhane 741c19a
Add debug info
emhane df6fdb1
Add debug info
emhane 1b9e9c2
Add debug messages
emhane 003b816
Update regtopic active requests for addtional NODES response
emhane 505aff4
Amplify distances reqeusted for topics
emhane fe5a5d0
Add trace for responses
emhane c3311e6
Add trace messages
emhane 65cc66c
Add trace message
emhane 3916017
Fix reinsertion of active req handler
emhane b139738
Ignore wait time zero tickets
emhane fdea8b2
Add trace
emhane 888f9fc
Git increase request timeout
emhane 42879b3
Increase request timeout to receive REGCONFIRMATION
emhane 2fe218a
Fix distance amplification bug
emhane 1cf0aa5
Increase timeout handler
emhane dfb51a9
Add trace for TOPICQUERY
emhane f905849
Increase trace messages in buggy area
emhane e36e2a5
Fix endless while loop bug
emhane 995b450
Remove trace messages
emhane f804e9a
Add trace for topic query ad nodes not sending
emhane 3290184
Add extra ADNODE response body
emhane a212173
Receive AdNodes response on service level
emhane f5b5ef8
Reuse code for adding batches of new nodes to topics kbuckets
emhane 97c42e7
Fix carg clippy
emhane 024f548
Add debug for request service level
emhane b10885c
Fix reinsertion of active request bug
emhane 55815d3
Fix topic query response state bug
emhane 53c0dab
Fix topic query response state bug
emhane e688e71
Introduce state for topic query responses in handler
emhane e913344
Filter nodes in responses before insertion in kbuckets
emhane f46e694
Constrain response combo topics in handler
emhane ff5bb1d
Fix clippy warnings
emhane 6b2f3c9
Add trace messages
emhane ef768e4
Add trace message
emhane 88977c2
Rearrange imperative order to fix empty topic kbuckets bug
emhane 89aa724
Send ADNODES responses
emhane 24b3d1e
Remove TOPICQUERY query if no more peers
emhane 36dd5a1
Fix missing message decode AdNodes response
emhane cb7c336
Increase timeout for testing regconfirmation from 2 nodes
emhane dd21d02
Add trace info for TOPICQUERY dry state
emhane fdf3d5a
Add trace messages in buggy zone
emhane d5cabd9
Add trace in buggy zone
emhane 5607e96
Set queried peer upon return of result
emhane 31a82f8
Pass query through dry state before remove
emhane 4aa52f2
Set regconfirmation time out spearately in handler
emhane da33ffc
Handle timeout for topic requests
emhane b959a0e
Proceed as normal in handler if register confirmation does not come
emhane e6b8a11
Solve merge conflicts
emhane c21f8df
Run cargo fmt
emhane 6054069
Assign wait time based on similarity score
emhane b673eb0
Add discovered topic enrs to topic kbuckets
emhane 5e879c9
Add discovered topic nodes as trusted enrs after filter
emhane 6f7ee38
Add new enrs from pong to topic kbuckets also
emhane 1655dad
fmt
divagant-martian 9173669
Fix reception of pong response service
emhane 37396b2
Track ads by subnet
emhane 139fcd2
Fix clippy warnings
emhane 95f2a07
Add tests for subnet ticket wait time
emhane a482724
Filter tickets before selection
emhane 054520b
Filter returned ad nodes before inserting in query
emhane d68d0a7
Insert nodes with correct connection direction
emhane 3d13dac
Fix bug
emhane 0b6ddff
Remove old logic
emhane 7ece2b0
Remove block upon awaiting regconfirmation
emhane d2f2744
fixup! Remove block upon awaiting regconfirmation
emhane 983819b
Ban nodes that send invalid ticket and fix bug
emhane 42ee4e4
Run cargo fmt
emhane c107493
Check distances of returned nodes for topic reqs
emhane 9012e26
Fixup comments
emhane fbcdfdf
Comment code and fix misc bugs
emhane a2186b9
Update rust before running clippy and check-rustdoc-links
emhane 57a831e
Merge branch 'master' of github.com:sigp/discv5
emhane c38e2d0
Fix typo
emhane c760f41
Fix comment
emhane cf6fd4d
Put repeated code in sync closure
emhane 01ad49d
Fix retain statements and unsafe addition of discovered nodes to topi…
emhane e3e8126
Add bounds to discovered topic peers storage
emhane 84dfb3f
remove workflow difference
divagant-martian 941de59
Merge branch 'master' into tickets-v2
divagant-martian 17156b2
Update method for getting active ads
emhane 0a1d65f
Solve merge conflicts
emhane d5e5e95
fixup! Update method for getting active ads
emhane a78cf3f
Ensure topics republish
emhane f0a0e1e
Fix copy paste bug
emhane b9a53be
fixup! Ensure topics republish
emhane 2f9223a
Proceed with topic lookup upon newly discovered peers for topic
emhane d4ac5fc
Run cargo fmt
emhane 5cafcb4
Fix uncontacted peers first in topic request bug
emhane 8c38d10
Add trace message
emhane f1f6a94
fixup! Fix uncontacted peers first in topic request bug
emhane 31ff35f
Fix bug of proceeding with query if discovered called with empty enrs…
emhane 1595444
Fix discovery bug
emhane 62a0e39
Fix bug using uncontacted peers first for topic requests
emhane eeeaa33
Fix bug upon new discovered peers
emhane 4936e03
Fix find new topic query peers bug
emhane 64e287f
Add trace message for republish
emhane 8cca202
Add trace messages for re-registration on same node after ad-lifetime up
emhane b818e30
Fix sending double nodes in NODES response to topic request
emhane fb690be
Fix bug overriding reg attempt and speed up topic query in case of no…
emhane 4ac8600
Debug
emhane 0dfcba9
Fix replace ticket with regconfirmation bug
emhane 924c986
Debug distance mapping reg attempts and kbuckets
emhane e4596e1
Fix distance mapping bug
emhane ef4be68
Fix re-publishing topics on nodes have reached ticket limit bug
emhane 7ab9ae3
Fix bug sending the recipient's node in NODES response to a topic req…
emhane 586a5bf
Set ad lifetime
emhane 4497957
Update docs
emhane e2ced6e
Run cargo fmt
emhane f19d2bb
Change name to be meanigful to new logic
emhane 02ed526
Retrieve hosted ads for a topic from app level
emhane 5b3364e
Retrieve active registration attempts from app for debug
emhane 075e186
Retrieve table entries for a topic from app
emhane a67515e
Fix async bug
emhane 00669ec
Change trace to debug messages
emhane fcf5549
Only send DiscoveredTopic event for new peers
emhane 09fce24
Limit triggering TICKET, NODES and REGCONFIRMATION responses to a max…
emhane 880f63f
Set max regtopis per registration interval
emhane 3eff0ac
Fix bug of triggering reg-topics outside of interval
emhane 4b2dac3
Correct return type
emhane a8bdc31
Clarify docs
emhane c15c500
Correct docs
emhane 215467e
Correct docs
emhane 17a05fc
Correct docs
emhane 9fe32be
Fix typo
emhane d8a229c
Add missing docs for advertisement crate
emhane 9fbf099
Solve merge conflict
emhane 6130cb7
Fix typo
emhane 58217ad
Fix typo
emhane 043c2fe
Clarify bounds
emhane 6bad729
Follow Rust pattern of new and default
emhane b2a97cf
Merge branch 'tickets-v2' of github.com:emhane/discv5 into tickets-v2
emhane 080131b
Constrain ad insertion and deactivate pool tickets
emhane 1392646
Fix bug reinserting entry which cannot be immutably borrowed
emhane 3a70ac3
Add missing docs in discv app interface
emhane 30210cb
Move method to associated function
emhane 23af87e
fixup! Add missing docs in discv app interface
emhane d014b94
fixup! Move method to associated function
emhane c65debc
Fix broken docs
emhane 9636ea4
Fix clippy warning
emhane fc26548
Fix const function
emhane a0a1a26
Export global helper function
emhane b47b455
Remove static lifetime
emhane c5c158e
Correct poll behaviour for ticket stream
emhane 4757816
Attempt to simplify the handler
AgeManning 0b19596
Merge pull request #3 from sigp/simplify-handler
emhane 8617437
Remove ADNODES response
emhane ba15a64
Rlp encode topics for enr
emhane f88d89f
Use ticket wait time to communicate a successful registration instead…
emhane a5829af
Remove unused TicketsPool due to replacing comparison of ad candidate…
emhane 43376e2
Remove multiple responses to topic requests in Handler
emhane 7cd0fdf
Mix regtopic requests with normal active requests at service level as…
emhane e2c4551
Remove multiple responses to topic requests in service
emhane 9d02c67
Add ads returned in NODES responses to topic lookup query
emhane c90b338
fixup! Remove multiple responses to topic requests in service
emhane 9d1a376
Add nodes to topic kbuckets by FINDNODE iterative query
emhane db89688
Query for more peers upon dry topic lookup
emhane d2b5339
Fix bug in stream of topic lookups
emhane 1d7ef49
Verify enrs of ads returned by TOPICQUERY
emhane 813af26
Verify topics field in ENR upon incoming registration attempt
emhane fe8a335
Simplify code
emhane 0a26668
Minimize LOC
emhane deb42fd
Remove function relevant for potential future implementation of mutli…
emhane 50c462d
Use strings as topics in REGTOPICS
emhane 9359d19
Add trace message
emhane 8eed39f
Improve trace message
emhane f7221df
Fix bogus while loop logic
emhane 7fb23a1
Add peers to topic's kbuckets when query is done not during
emhane bd9604b
Only ad nodes which support topics version to topic kbuckets
emhane e11c6dd
Advertise this node as supporting topics
emhane c0dca81
Run cargo fmt
emhane 10d73be
Move enr version insertion to up a layer to discv5
emhane a6d57f2
Add debug
emhane 2470410
If topic lookup runs dry, find more peers
emhane 5a7f0e8
fixup! If topic lookup runs dry, find more peers
emhane d02bd7a
Allow peers which don't include version field in enr
emhane c830ed0
Fix typo
emhane 679635f
Fix typo
emhane 8bdd653
Use consants instead of string literals
emhane 36a60cc
Fix non-backwards compatibale changes as introduced by new stable rust
emhane 033cf82
Make name more verbose
emhane cfc837b
Clarify docs
emhane 0271c7d
Fix typo
emhane fdec540
Make name more verbose
emhane 7b10c0d
Merge branch 'tickets-v2' of github.com:emhane/discv5 into tickets-v2
emhane 2a5942a
Make name more verbose
emhane 21aa98d
Improve wording
emhane 89928a4
Correct typo
emhane 49ed28f
Correct typo
emhane 36b9c43
Correct typo
emhane 3bd661c
Correct typo
emhane 610fd7f
Improve docs semantics
emhane 830a29c
Correct typo
emhane 7a23172
Correct typo
emhane a72e750
Correct typo
emhane 00a7d8f
Correct typo
emhane f46d9da
Link constant in docs
emhane 58491e0
fixup! Merge branch 'tickets-v2' of github.com:emhane/discv5 into tic…
emhane 090a361
Correct typo
emhane 96af7f7
Correct typo
emhane b1a8440
Correct typo
emhane ef31700
Correct typo
emhane 642a962
Use custom type to make code more descriptive
emhane 6905c7b
Merge branch 'tickets-v2' of github.com:emhane/discv5 into tickets-v2
emhane a524876
Improve code structure
emhane bdb5974
Fix bug of replacing a topics registration attempts
emhane 1e8e28d
Make proper use of callbacks to ServiceRequests and fix misc typos
emhane a4e4d0b
Stop some continued registrations for a removed topic
emhane eb92b9b
fixup! Stop some continued registrations for a removed topic
emhane c79db97
Fix typo
emhane a142ad2
Misc fixes
emhane 1140597
Merge branch 'tickets-v2' of github.com:emhane/discv5 into tickets-v2
emhane ace89ab
Ignore VS Code custom spelling settings file
emhane a745f8e
Merge branch 'sigp:master' into tickets-v2
emhane 2068253
Properly implement version check
emhane ec1c50e
fixup! Ignore VS Code custom spelling settings file
emhane 7f32c61
Merge branch 'tickets-v2' of github.com:emhane/discv5 into tickets-v2
emhane 8dca222
Encapsulate RLP en-/decoding for topics enr field
emhane 08de697
fixup! Encapsulate RLP en-/decoding for topics enr field
emhane bcd51f8
Add test for en-/decoding topics enr field
emhane 39aa82a
Lay ground for uncostly subscribing (repeated look up) of a topic and…
emhane 82c6257
Fix bug of trying to register removed topic and misc grammar fixes
emhane a69a655
Move decryption of tickets to Hanlder
emhane 35201e3
Make use of the fact that nodes can only register themselves as ads
emhane 4baeafe
Move repeated code to closure
emhane ef1d76a
Clean up and comment
emhane ad01569
Remove unused methods
emhane 0b09f60
Correct name
emhane 3111592
Run cargo fmt
emhane 8386fba
Merge branch 'master' of github.com:sigp/discv5 into tickets-v2
emhane f2caf4a
Change name
emhane 2d5954d
Fix merge conflict
emhane 66f43ae
Fix bad return bug
emhane b699290
fixup! Fix bad return bug
emhane 86b7491
Set features in ENR
emhane 5b2209a
Return whole topic for human readable name for logs
emhane a18ae8c
Only log events for topics to maintain backwards compatibility
emhane b37e1b1
fixup! Only log events for topics to maintain backwards compatibility
emhane 69cd507
fixup! Only log events for topics to maintain backwards compatibility
emhane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ Cargo.lock | |
|
||
# VIM swap files | ||
*.sw[op] | ||
|
||
# VS Code settings files | ||
/.vscode/ |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dep can be accessed directly from the enr crate, as is re-exported and having it here causes problems trying to upgrade