-
Notifications
You must be signed in to change notification settings - Fork 927
Trigger backfill on startup if user switches to a supernode or semi-supernode #8265
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
Conversation
401b8d0 to
8cedbd1
Compare
…upernode (#8265) Squashed commit of the following: commit 8cedbd1 Author: Jimmy Chen <[email protected]> Date: Thu Oct 23 00:20:17 2025 +1100 Remove unnecessary changes to reduce diff. commit 13cef6d Author: Jimmy Chen <[email protected]> Date: Thu Oct 23 00:10:54 2025 +1100 Minor clean ups. commit 045afbb Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 23:59:01 2025 +1100 Clean up and update function docs. commit 6904556 Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 23:51:17 2025 +1100 Add column backfill when node's custody type changes via CLI. commit 895e571 Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 17:39:55 2025 +1100 Add tests and TODOs
|
Some required checks have failed. Could you please take a look @jimmygchen? 🙏 |
|
This all looks pretty good to me. I have a devnet3 node running right now and am about to finish backfilling. Will test this out shortly |
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.
I got this working on a local devnet 3 node
The node was first started as a normal full node (cgc = 4). I then let it finish backfilling and restarted the node as a semi super node. It's now been doing custody backfill for the last hour (I still have like 4-5 hours to go). But seems like the triggering of custody backfill worked as intended. Nice work!
I think Pawan is right that we could use the current head epoch instead of the current slot clock epoch, but seems like this would probably work either way.
The tests seem pretty good too, I'd like to piggy back off those tests in this PR
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.
LGTM other than the calculation of current_epoch.
The tests are great, I have also tested the same manually.
| /// and will require a resync until we implement column backfill for this scenario. | ||
| /// # Behavior | ||
| /// * If [`NodeCustodyType::get_custody_count_override`] < validator_custody_at_head, it means the attached | ||
| /// validator stake has increased the node's CGC. We ignore the CLI input. |
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 comment is a little unclear. Maybe something along the lines of
/// the node has a higher contribution of custody from the number of validators attached compared to the one derived from cli flags
Something a little less verbose than that though :P
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.
Updated to
/// * If [`NodeCustodyType::get_custody_count_override`] < validator_custody_at_head, it means
/// validators have increased the CGC beyond the derived CGC from cli flags. We ignore the CLI input.
… apply other comment fixes.
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.
changes look good
…upernode (#8265) Squashed commit of the following: commit 2ed4f69 Author: Jimmy Chen <[email protected]> Date: Thu Oct 23 10:56:42 2025 +1100 Change CLI CGC increase effective epoch to be based on head_epoch and apply other comment fixes. commit 8cedbd1 Author: Jimmy Chen <[email protected]> Date: Thu Oct 23 00:20:17 2025 +1100 Remove unnecessary changes to reduce diff. commit 13cef6d Author: Jimmy Chen <[email protected]> Date: Thu Oct 23 00:10:54 2025 +1100 Minor clean ups. commit 045afbb Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 23:59:01 2025 +1100 Clean up and update function docs. commit 6904556 Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 23:51:17 2025 +1100 Add column backfill when node's custody type changes via CLI. commit 895e571 Author: Jimmy Chen <[email protected]> Date: Wed Oct 22 17:39:55 2025 +1100 Add tests and TODOs
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.
LGTM
Open PRs to include for the release - #7907 - #8247 - #8251 - #8253 - #8254 - #8265 - #8269 - #8266 Co-Authored-By: Jimmy Chen <[email protected]> Co-Authored-By: Jimmy Chen <[email protected]>
Issue Addressed
This PR adds backfill functionality to nodes switching to become a supernode or semi-supernode. Please note that we currently only support a CGC increase, i.e. if the node's already custodying 67 columns, switching to semi-supernode (64) will have no effect.
Proposed changes
From @eserilev