Skip to content

Conversation

@jimmygchen
Copy link
Member

@jimmygchen jimmygchen commented Oct 22, 2025

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

if a node's cgc increases on start up, we just need two things for custody backfill to do its thing

  • data column custody info needs to be updated to reflect the cgc change
  • CustodyContext::validator_registrations::epoch_validator_custody_requirements needs to be updated to reflect the cgc change
  • Add tests
  • Test on devnet-3
    • switch to supernode
    • switch to semisupernode
  • Test on live testnets
  • Update docs (functions)

@michaelsproul michaelsproul added the v8.0.0 Q4 2025 Fusaka Mainnet Release label Oct 22, 2025
@jimmygchen jimmygchen force-pushed the backfill-column-supernode branch from 401b8d0 to 8cedbd1 Compare October 22, 2025 13:23
@jimmygchen jimmygchen added the ready-for-review The code is ready for review label Oct 22, 2025
@jimmygchen jimmygchen mentioned this pull request Oct 22, 2025
jimmygchen added a commit that referenced this pull request Oct 22, 2025
…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
@mergify
Copy link

mergify bot commented Oct 22, 2025

Some required checks have failed. Could you please take a look @jimmygchen? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Oct 22, 2025
@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Oct 22, 2025
@eserilev
Copy link
Member

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

Copy link
Member

@eserilev eserilev left a 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

Copy link
Member

@pawanjay176 pawanjay176 left a 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.
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@eserilev eserilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good

jimmygchen added a commit that referenced this pull request Oct 23, 2025
…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
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Oct 23, 2025
@mergify mergify bot added the queued label Oct 23, 2025
mergify bot added a commit that referenced this pull request Oct 23, 2025
mergify bot added a commit that referenced this pull request Oct 23, 2025
@mergify mergify bot merged commit d8c6c57 into sigp:unstable Oct 23, 2025
37 checks passed
@mergify mergify bot removed the queued label Oct 23, 2025
mergify bot pushed a commit that referenced this pull request Oct 23, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge This PR is ready to merge. v8.0.0 Q4 2025 Fusaka Mainnet Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants