restore: snapct handling peer ip:port duplicates#8494
restore: snapct handling peer ip:port duplicates#8494jvarela-jump wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements duplicate IP:port detection for gossip peers in the snapshot control (snapct) tile. The changes prevent multiple peers from advertising the same RPC address, which could cause conflicts in the peer selection and connection logic.
Changes:
- Added
gossip_addr_is_duplicatefunction to check if an address is already in use by configured servers or other gossip peers - Modified gossip contact info handling to detect and reject duplicate RPC addresses with appropriate warning logs
- Updated logging to use the entry's actual address (which may be 0 if rejected) instead of the advertised address
- Removed the FIXME comment about making the code more strict about duplicate IP:port's, as this functionality is now implemented
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Performance Measurements ⏳
|
815d0a3 to
45b3dad
Compare
Performance Measurements ⏳
|
src/discof/restore/fd_snapct_tile.c
Outdated
There was a problem hiding this comment.
I think we should not insert a new entry for a duplicate gossip rpc address...
9b3c9d3 to
81129fc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Performance Measurements ⏳
|
81129fc to
4dfe12b
Compare
Performance Measurements ⏳
|
4dfe12b to
5df1580
Compare
Performance Measurements ⏳
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5df1580 to
aa7e28d
Compare
Performance Measurements ⏳
|
aa7e28d to
0426540
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Performance Measurements ⏳
|
0426540 to
70452ed
Compare
Performance Measurements ⏳
|
70452ed to
1add363
Compare
Performance Measurements ⏳
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Performance Measurements ⏳
|
| FD_TEST( ULONG_MAX==gossip_ci_map_idx_query_const( ctx->gossip.ci_map, pubkey, ULONG_MAX, ctx->gossip.ci_table ) ); | ||
| /* If the entry is not allowed, clean the entry entirely, since | ||
| it will not be added to the map. */ | ||
| if( !entry->allowed ) fd_memset( entry, 0, sizeof(gossip_ci_entry_t) ); |
There was a problem hiding this comment.
hmm... thinking about this, this means every time a gossip peer that is not allowed is received, then we would have to do the pubkey compare and memset every time?
Handling cases where gossip peers advertise duplicate ip:port.