-
Notifications
You must be signed in to change notification settings - Fork 45
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
Ticking without ARB packet / Improvement on computor list #213
Open
fnordspace
wants to merge
9
commits into
develop
Choose a base branch
from
feature/2024-11-04-keep-index
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
- Add self-generated computor list and related flags - Implement saving of future computors at end of epoch for next epoch use - Update beginEpoch to use self-generated computor list when available - Modify processBroadcastComputors to compare ARB list with self-generated list - Modify tickProcessor to handle self-generated computor list scenarios - Add warnings and debug messages for unverified self-generated lists - Update main loop to display warning for unverified self-generated lists This commit allows the network to continue ticking with a self-generated computor list in the case of seamless transition when the ARB list is not available, improving network resilience while maintaining the ability to verify against the official ARB list when received.
- Add logic to maintain indices for computors keeping their status - Introduce temporary arrays to manage computor list reorganization - Implement two-phase approach for computor list generation: 1. Preserve indices for continuing computors 2. Fill remaining spots with new computors - Add error handling for unexpected scenarios - Update selfGeneratedComputors with the newly organized list This commit ensures that computors maintaining their status across epochs keep their original indices, while new computors are assigned to the remaining available slots. This change enhances the continuity and predictability of the network's computor assignment process.
Instead of allocating seperate memory for the temporary computor list we use the reorgBuffer. This also solves a problem where the compiler tries to optimize the function with the use of memset, which is not available.
Flag is not used.
In the case that the computorlist is self generated and not signed by the arbitrator we do not send computorlist to other nodes.
In case that the self-generated computorlist and the list of ARB is different. If a new list of ARB is broadcasted which matches continue ticking again.
philippwerner
requested changes
Nov 7, 2024
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.
Looks good to me, thanks! But I have some minor requests, see inline comments.
Fix issues during review. Make use of clang-format with style 'Microsoft' for formating. Switch bs->SetMem and bs->CopyMem to setMem and copyMem functions.
fnordspace
force-pushed
the
feature/2024-11-04-keep-index
branch
from
November 7, 2024 14:31
0880936
to
5354a08
Compare
fnordspace
commented
Nov 7, 2024
philippwerner
requested changes
Nov 7, 2024
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.
A few minor issues are left.
philippwerner
approved these changes
Nov 8, 2024
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.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a mechanism for nodes to compute and validate their own computor list during epoch transitions.
Key Features
EndEpoch()
andStartEpoch()
, usingsystem.futureComputors
useSelfGeneratedComputor
flag to track list status and ARB signature verificationprocessBroadcastComputors()
to hinder broadcasting self-generated listTesting
Nothing tested yet. The following tests are needed: