Repository navigation
feat: add support for DKG sidecar target config hash - #130
Merged
Merged
Conversation
Add ability to specify target config hash via --set charon.dkgSidecar.targetConfigHash which exposes TARGET_CONFIG_HASH environment variable to the DKG sidecar runtime.
OisinKyne
reviewed
Sep 29, 2025
Co-authored-by: Oisín Kyne <4981644+OisinKyne@users.noreply.github.com> Signed-off-by: JeanDaniel Bussy <SilverSurfer972@gmail.com>
Replace bitnami/kubectl:1.33.3 (non-existent version) with alpine/k8s:1.31.4. The bitnami/kubectl image was causing ErrImagePull failures in the ENR generation job. alpine/k8s provides both kubectl binary and shell required by the init containers.
OisinKyne
previously approved these changes
Oct 1, 2025
added 3 commits
October 9, 2025 13:11
Add comprehensive format validation for charon.dkgSidecar.targetConfigHash: - Must start with '0x' prefix - Must be exactly 66 characters (0x + 64 hex digits) - Must contain only valid hexadecimal characters (0-9, a-f, A-F) Changes: - Add validation rules in validate.yaml using hasPrefix, len, and regexMatch - Update values.yaml documentation with format requirements and example - Create example values file showing proper usage - Regenerate README with helm-docs to reflect new documentation Format: 0x7f0fd29abb11674b4e61000de26bff3600237aab0402427bd1409756665c2115 Represents: 32-byte (256-bit) Keccak256 hash Validation catches common errors: - Missing 0x prefix - Wrong length - Invalid hex characters - Empty string is allowed (optional parameter)
Add comprehensive test coverage for charon.dkgSidecar.targetConfigHash: 1. New test file: test-target-config-hash-set.yaml - Dedicated test to verify TARGET_CONFIG_HASH env var is set correctly - Validates env var matches expected value - Checks format: 0x prefix, 66 character length - Uses busybox for lightweight verification - Only runs when tests.dkgSidecar.targetConfigHash is set 2. Updated test-dkg-sidecar-fresh-state.yaml - Added TARGET_CONFIG_HASH env var to DKG sidecar init container - Ensures test environment matches production StatefulSet configuration - Conditional on tests.dkgSidecar.targetConfigHash value 3. Added test configuration to values.yaml - New tests.dkgSidecar.targetConfigHash field - Default test hash: 0x7f0fd29abb11674b4e61000de26bff3600237aab0402427bd1409756665c2115 - Enables both new test and passes hash to existing DKG sidecar tests Test coverage: Validates runtime behavior of targetConfigHash parameter, complements existing template-time validation in validate.yaml.
Regenerated README with helm-docs to include new test configuration: - tests.dkgSidecar.targetConfigHash parameter (line 140) - Documents it's for testing purposes - Shows default test hash value - Enables test-target-config-hash-set.yaml test when set
OisinKyne
approved these changes
Oct 9, 2025
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.
Summary
charon.dkgSidecar.targetConfigHashto allow specifying target config hash for DKG cluster selectionTARGET_CONFIG_HASHenvironment variable to the DKG sidecar init container runtimeChanges
1. Core Functionality
charon.dkgSidecar.targetConfigHashinvalues.yamlTARGET_CONFIG_HASHconditionally set in StatefulSet0xprefix (66 characters total)0x7f0fd29abb11674b4e61000de26bff3600237aab0402427bd1409756665c21152. Validation (
validate.yaml)Comprehensive format validation catches errors at template-time:
0xprefix3. Documentation
values-examples/with-target-config-hash.yamlwith usage guide4. Test Coverage
Validation Tests (Template-time)
0xprefix fails with clear errorHelm Tests (Runtime)
New test file:
test-target-config-hash-set.yamlTARGET_CONFIG_HASHenv var is set correctlyUpdated test:
test-dkg-sidecar-fresh-state.yamlTARGET_CONFIG_HASHenv var to DKG sidecar init containerUsage
Basic Deployment with Target Config Hash
Using Example Values File
Run Tests
Test Plan
Manual Testing
Automated Testing
Breaking Changes
None - this is a new optional parameter with backward-compatible defaults.
Related Issues
Enables DKG sidecar to target specific cluster definitions when multiple invites exist for an operator address.