Skip to content

feat(networkconfig): CLI for custom SSV config generation#2156

Merged
MatusKysel merged 15 commits into
networkconfig-from-beacon-nodefrom
networkconfig-generate-ssv
May 27, 2025
Merged

feat(networkconfig): CLI for custom SSV config generation#2156
MatusKysel merged 15 commits into
networkconfig-from-beacon-nodefrom
networkconfig-generate-ssv

Conversation

@nkryuchkov
Copy link
Copy Markdown
Contributor

Part of PRs that will replace #1308

Based on #2153

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2025

Codecov Report

Attention: Patch coverage is 24.19355% with 94 lines in your changes missing coverage. Please review.

Project coverage is 49.5%. Comparing base (ae9dde4) to head (ff3f2d2).
Report is 1 commits behind head on networkconfig-from-beacon-node.

Files with missing lines Patch % Lines
cli/generate_config.go 0.0% 64 Missing ⚠️
cli/operator/node.go 0.0% 18 Missing ⚠️
networkconfig/ssv.go 71.4% 8 Missing and 4 partials ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nkryuchkov nkryuchkov marked this pull request as ready for review April 17, 2025 00:59
Copy link
Copy Markdown
Contributor

@iurii-ssv iurii-ssv left a comment

Choose a reason for hiding this comment

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

Minor suggestions

Comment thread networkconfig/ssv.go Outdated
Comment thread networkconfig/ssv.go
Comment on lines +56 to +62
type marshaledConfig struct {
DomainType string `json:"DomainType,omitempty" yaml:"DomainType,omitempty"`
RegistrySyncOffset *big.Int `json:"RegistrySyncOffset,omitempty" yaml:"RegistrySyncOffset,omitempty"`
RegistryContractAddr string `json:"RegistryContractAddr,omitempty" yaml:"RegistryContractAddr,omitempty"`
Bootnodes []string `json:"Bootnodes,omitempty" yaml:"Bootnodes,omitempty"`
DiscoveryProtocolID string `json:"DiscoveryProtocolID,omitempty" yaml:"DiscoveryProtocolID,omitempty"`
}
Copy link
Copy Markdown
Contributor

@iurii-ssv iurii-ssv Apr 17, 2025

Choose a reason for hiding this comment

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

Since we are manually mapping SSVConfig <-> marshaledConfig fields it's probably a good idea to add a test that would check:

  • unmarshal->marshal (both yaml and json representations) yields the same result
  • and also to make sure newly added field is converted (and not missing) we maybe could hash string-representation of sample config and compare hash directly (so that if new field is added the actual hashed value would become different and we'll be notified by test failing)

although I guess that wouldn't work if the order of fields isn't preserved/sorted ... maybe we could enable sorting if that makes sense ?

I haven't checked for Yaml but looks like JSON marshaling applies sorting (from func description):

// Map values encode as JSON objects. The map's key type must either be a
// string, an integer type, or implement [encoding.TextMarshaler]. The map keys
// are sorted and used as JSON object keys by applying the following rules,
// subject to the UTF-8 coercion described for string values above:
//   - keys of any string type are used directly
//   - keys that implement [encoding.TextMarshaler] are marshaled
//   - integer keys are converted to strings

@MatusKysel MatusKysel requested a review from Copilot April 17, 2025 11:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a CLI tool for generating custom SSV node configuration files and updates the network configurations by converting registry contract addresses from strings to ethcommon.Address. Key changes include:

  • Updating the Options struct in operator/node.go with a new CustomNetwork field and deprecating CustomDomainType.
  • Converting registry contract address fields from string to ethcommon.Address across various network configuration files.
  • Adding a new CLI command (generate-config) and corresponding documentation for streamlined configuration generation.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
operator/node.go Introduces CustomNetwork field and deprecates CustomDomainType with updated comments.
networkconfig/test-network.go Converts registry contract address to ethcommon.HexToAddress.
networkconfig/ssv.go Changes RegistryContractAddr to ethcommon.Address and updates JSON/YAML marshaling.
networkconfig/sepolia.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/mainnet.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/local-testnet.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/hoodi.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/hoodi-stage.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/holesky.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/holesky-stage.go Uses ethcommon.HexToAddress for registry contract address conversion.
networkconfig/holesky-e2e.go Uses ethcommon.HexToAddress for registry contract address conversion.
cli/operator/node.go Updates usage of the registry contract address and logs a warning for deprecated usage.
cli/generate_config.go Adds a new CLI command that generates a configuration file based on passed flags.
cli/GENERATE_CONFIG.md Provides documentation on using the new configuration generator command.

Comment thread networkconfig/ssv.go Outdated
Comment thread cli/generate_config.go
Comment thread cli/GENERATE_CONFIG.md Outdated
Comment thread cli/generate_config.go Outdated
@nkryuchkov nkryuchkov changed the title networkconfig: CLI for custom SSV config generation feat(networkconfig): CLI for custom SSV config generation Apr 17, 2025
…rate-ssv

# Conflicts:
#	networkconfig/holesky-e2e.go
#	networkconfig/holesky-stage.go
#	networkconfig/holesky.go
#	networkconfig/hoodi-stage.go
#	networkconfig/hoodi.go
#	networkconfig/local-testnet.go
#	networkconfig/mainnet.go
#	networkconfig/sepolia.go
#	networkconfig/test-network.go
@MatusKysel MatusKysel merged commit f601c0f into networkconfig-from-beacon-node May 27, 2025
6 of 7 checks passed
@MatusKysel MatusKysel deleted the networkconfig-generate-ssv branch May 27, 2025 13:02
MatusKysel pushed a commit that referenced this pull request May 27, 2025
…de (#2153)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* fix issues after merging

* code review comments

* unexport supportedSSVConfigs

* fix a context bug

* pass network config name

* feat(networkconfig): CLI for custom SSV config generation (#2156)

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* fix linter

* add missing fields to LocalTestnet
MatusKysel added a commit that referenced this pull request May 28, 2025
… interface (#2145)

* networkconfig: split beacon and ssv configs

* move most parameters outside of BeaconNetwork interface

* get rid of BeaconNetwork interface

* some leftovers

* fix linter

* fix message validation tests

* fix linter again

* leftovers after merging

* fix issues after merging

* fix network name bug

* code review comments

* fix issues after merging

* update go.mod

* fix ekm tests

* remove unused import

* update go.mod

* fix issues after merging

* format/imports

* revert preparationSlots type change

* use uint64 for amount of slots and epochs

* use github.com/ssvlabs/eth2-key-manager@v1.5.5

* spec-alignment

* feat(networkconfig,beacon/goclient): get beacon config from beacon node (#2153)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* fix issues after merging

* code review comments

* unexport supportedSSVConfigs

* fix a context bug

* pass network config name

* feat(networkconfig): CLI for custom SSV config generation (#2156)

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* fix linter

* add missing fields to LocalTestnet

* update go.mod

* networkconfig: make hardcoded values configurable (#2164)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* fix linter

* fix a typo

* remove redundant comments

* fix a context bug

* fix issues after merging

* pass network config name

* networkconfig: narrow config usage (#2172)

* use SSV/Beacon configs instead of NetworkConfig where possible

* fix linter

* fix a comment

* fix issues after merging

* fix issues after merging

* beacon,networkconfig: move fork handling from beacon to networkconfig (#2178)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* pass network config name

* update go.mod

* fix issues after merging

* networkconfig: delete hardcoded beacon configs (#2183)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* networkconfig: delete mainnet beacon config

* networkconfig: delete rest of configs

* replace TestRealNetwork with TestNetwork

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* delete TestRealNetwork

* pass network config name

* update go.mod

* fix issues after merging

* fix issues after merging

* rename BeaconName to NetworkName

* refactor getting spec parameters

* update go.mod

* fix type assertion

* fix spec align

---------

Co-authored-by: y0sher <lyosher@gmail.com>
Co-authored-by: Matus Kysel <matus@ssvlabs.io>
nkryuchkov added a commit that referenced this pull request Jun 4, 2025
… interface (#2145)

* networkconfig: split beacon and ssv configs

* move most parameters outside of BeaconNetwork interface

* get rid of BeaconNetwork interface

* some leftovers

* fix linter

* fix message validation tests

* fix linter again

* leftovers after merging

* fix issues after merging

* fix network name bug

* code review comments

* fix issues after merging

* update go.mod

* fix ekm tests

* remove unused import

* update go.mod

* fix issues after merging

* format/imports

* revert preparationSlots type change

* use uint64 for amount of slots and epochs

* use github.com/ssvlabs/eth2-key-manager@v1.5.5

* spec-alignment

* feat(networkconfig,beacon/goclient): get beacon config from beacon node (#2153)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* fix issues after merging

* code review comments

* unexport supportedSSVConfigs

* fix a context bug

* pass network config name

* feat(networkconfig): CLI for custom SSV config generation (#2156)

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* fix linter

* add missing fields to LocalTestnet

* update go.mod

* networkconfig: make hardcoded values configurable (#2164)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* fix linter

* fix a typo

* remove redundant comments

* fix a context bug

* fix issues after merging

* pass network config name

* networkconfig: narrow config usage (#2172)

* use SSV/Beacon configs instead of NetworkConfig where possible

* fix linter

* fix a comment

* fix issues after merging

* fix issues after merging

* beacon,networkconfig: move fork handling from beacon to networkconfig (#2178)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* pass network config name

* update go.mod

* fix issues after merging

* networkconfig: delete hardcoded beacon configs (#2183)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* networkconfig: delete mainnet beacon config

* networkconfig: delete rest of configs

* replace TestRealNetwork with TestNetwork

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* delete TestRealNetwork

* pass network config name

* update go.mod

* fix issues after merging

* fix issues after merging

* rename BeaconName to NetworkName

* refactor getting spec parameters

* update go.mod

* fix type assertion

* fix spec align

---------

Co-authored-by: y0sher <lyosher@gmail.com>
Co-authored-by: Matus Kysel <matus@ssvlabs.io>
nkryuchkov added a commit that referenced this pull request Jun 4, 2025
… interface (#2145)

* networkconfig: split beacon and ssv configs

* move most parameters outside of BeaconNetwork interface

* get rid of BeaconNetwork interface

* some leftovers

* fix linter

* fix message validation tests

* fix linter again

* leftovers after merging

* fix issues after merging

* fix network name bug

* code review comments

* fix issues after merging

* update go.mod

* fix ekm tests

* remove unused import

* update go.mod

* fix issues after merging

* format/imports

* revert preparationSlots type change

* use uint64 for amount of slots and epochs

* use github.com/ssvlabs/eth2-key-manager@v1.5.5

* spec-alignment

* feat(networkconfig,beacon/goclient): get beacon config from beacon node (#2153)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* fix issues after merging

* code review comments

* unexport supportedSSVConfigs

* fix a context bug

* pass network config name

* feat(networkconfig): CLI for custom SSV config generation (#2156)

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* fix linter

* add missing fields to LocalTestnet

* update go.mod

* networkconfig: make hardcoded values configurable (#2164)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* fix linter

* fix a typo

* remove redundant comments

* fix a context bug

* fix issues after merging

* pass network config name

* networkconfig: narrow config usage (#2172)

* use SSV/Beacon configs instead of NetworkConfig where possible

* fix linter

* fix a comment

* fix issues after merging

* fix issues after merging

* beacon,networkconfig: move fork handling from beacon to networkconfig (#2178)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* pass network config name

* update go.mod

* fix issues after merging

* networkconfig: delete hardcoded beacon configs (#2183)

* beacon/goclient: get beacon config from beacon node

* use beacon config obtained from beacon node

* log config as JSON

* networkconfig: CLI for custom SSV config generation

* implement JSON marshaling and YAML marshaling/unmarshaling

* remove TotalEthereumValidators

* simplify marshaling/unmarshaling logic

* fix markdown formatting

* use yaml@v3

* add tests

* simplify unmarshaling

* delete a comment

* use Stringer to log node

* guard beacon config reads with mutex

* add a timeout log

* delete hardcoded beacon configs

* Revert "delete hardcoded beacon configs"

This reverts commit c2e2f8f.

* networkconfig: make hardcoded values configurable

* fix issues after merging

* code review comments

* fix issues after merging

* delete outer metrics for genesisForClient

* rewrite modulo calculation

* code review comments

* unexport supportedSSVConfigs

* revert the modulo calculation

* add EpochDuration mock

* G115

* fill missing fields in configs

* add a comment about eth spec

* fix error text

* use genesis validators root from config in computeVoluntaryExitDomain

* beacon,networkconfig: move forks from beacon to networkconfig

* get rid of using Genesis method

* use ForkAtEpoch instead of DataVersion

* generate mocks

* fix linter

* fix beacon tests

* beacon: delete ForkAtEpoch

* fix ekm tests

* update go.mod

* fix some TODOs

* networkconfig: delete mainnet beacon config

* networkconfig: delete rest of configs

* replace TestRealNetwork with TestNetwork

* fix linter

* fix a typo

* remove redundant comments

* remove Spec method

* delete a comment

* uncomment config print

* fix a context bug

* fix issues after merging

* delete TestRealNetwork

* pass network config name

* update go.mod

* fix issues after merging

* fix issues after merging

* rename BeaconName to NetworkName

* refactor getting spec parameters

* update go.mod

* fix type assertion

* fix spec align

---------

Co-authored-by: y0sher <lyosher@gmail.com>
Co-authored-by: Matus Kysel <matus@ssvlabs.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants