-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add syncArchiversList in the sync-v2 #5
Conversation
BLUE-8 Add syncArchiversList in the sync-v2 (archiver)
The syncV2 in Archiver is missing the syncArchiversList. Reference: syncV2 process in shardus core. The archiver should also sync the current active archivers list in the network as a part of syncV2. If not the archiver can miss some archiver info and will lead to issues in gossip data between archivers. |
export function addArchiver(archiver: ArchiverNodeInfo): void { | ||
const foundArchiver = activeArchivers.find((a) => a.publicKey === archiver.publicKey) | ||
if (!foundArchiver) { | ||
Logger.mainLogger.debug('Adding archiver', archiver) |
Check warning
Code scanning / CodeQL
Log injection Medium
user-provided value
Utils.insertSorted(activeArchiversByPublicKeySorted, archiver, NodeList.byAscendingPublicKey) | ||
Logger.mainLogger.debug( | ||
'activeArchiversByPublicKeySorted', | ||
activeArchiversByPublicKeySorted.map((archiver) => archiver.publicKey) |
Check warning
Code scanning / CodeQL
Log injection Medium
user-provided value
'activeArchiversByPublicKeySorted', | ||
activeArchiversByPublicKeySorted.map((archiver) => archiver.publicKey) | ||
) | ||
Logger.mainLogger.debug('New archiver added to active list', archiver) |
Check warning
Code scanning / CodeQL
Log injection Medium
user-provided value
) | ||
Logger.mainLogger.debug('New archiver added to active list', archiver) | ||
} | ||
Logger.mainLogger.debug('archivers list', activeArchivers) |
Check warning
Code scanning / CodeQL
Log injection Medium
https://linear.app/shm/issue/BLUE-8/add-syncarchiverslist-in-the-sync-v2-archiver
Summary:
Add syncArchiversList in the sync-v2 (archiver)
Sync active archivers list in the network as a part of syncV2.