homi: add a flag to deploy validators with public delegation - #1038
Open
hyunsooda wants to merge 1 commit into
Open
homi: add a flag to deploy validators with public delegation#1038hyunsooda wants to merge 1 commit into
hyunsooda wants to merge 1 commit into
Conversation
The permissionless genesis always deploys each validator's CnStaking without a PublicDelegation, and attaching one afterwards is not possible: CnStakingV4 binds its PD at initialize time with no setter, ABv2 cannot update a node's StakingContract, and deleteNode only accepts a Registered node. Testing any PD-dependent behaviour therefore required off-boarding and re-onboarding a validator. Add --public-delegation so the genesis can be built with a PD on every validator instead; without the flag nothing changes. The PD path differs in two ways the contracts enforce. Staking has to go through the PD because delegate() is PD-only once a PD is set, and the node's reward address has to be the PD itself because registerNodeGenesis rejects any other value for a PD-backed node. Constraint: CnStakingV4Factory burns INITIAL_LOCKUP as dead shares, so the manager needs that much on top of its stake Rejected: Take the lockup out of StakeAmts | would leave the stake just under the configured amount and shift the minStake boundary Rejected: Per-node PD switch | no caller needs mixed fixtures yet Confidence: high Scope-risk: narrow Not-tested: withdraw and claim through the PD unstaking lockup Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
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.
Proposed changes
The permissionless genesis always deploys each validator's CnStaking without a PublicDelegation, and one cannot be attached later, so testing PD-dependent behaviour meant off-boarding and re-onboarding a validator.
--public-delegationbuilds the genesis with a PD on every validator; without the flag the output is unchanged. The PD path routes the initial stake through the PD and sets the node's reward address to the PD, both of which the contracts require.Types of changes
Checklist
I have read the CLA Document and I hereby sign the CLAin first time contribute after having read CLA$ make test)Related issues
Further comments