Skip to content

networkconfig: make hardcoded values configurable#2164

Merged
MatusKysel merged 57 commits into
networkconfig-extract-beacon-paramsfrom
networkconfig-make-hardcoded-configurable
May 27, 2025
Merged

networkconfig: make hardcoded values configurable#2164
MatusKysel merged 57 commits into
networkconfig-extract-beacon-paramsfrom
networkconfig-make-hardcoded-configurable

Conversation

@nkryuchkov
Copy link
Copy Markdown
Contributor

Part of PRs that will replace #1308

Depends on #2156

Required as a preparation for the local testnet

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.

LGTM, left minor suggestions

Comment thread beacon/goclient/spec.go Outdated
if epochsPerSyncCommitteePeriodDecoded, ok := epochsPerSyncCommitteePeriodRaw.(uint64); ok {
epochsPerSyncCommitteePeriod = phase0.Epoch(epochsPerSyncCommitteePeriodDecoded)
} else {
gc.log.Warn("epochs per sync committee not known by chain, using default value",
Copy link
Copy Markdown
Contributor

@iurii-ssv iurii-ssv Apr 22, 2025

Choose a reason for hiding this comment

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

I'm not sure if "not known by chain" phrasing is best, maybe something like "isn't provided by Beacon node" (or similar) would better describe what it actually entails ?

Comment thread beacon/goclient/sync_committee_contribution.go
Comment thread beacon/goclient/types.go
Comment thread networkconfig/beacon.go Outdated
Comment thread networkconfig/test-network.go Outdated
Bootnodes: []string{
"enr:-Li4QFIQzamdvTxGJhvcXG_DFmCeyggSffDnllY5DiU47pd_K_1MRnSaJimWtfKJ-MD46jUX9TwgW5Jqe0t4pH41RYWGAYuFnlyth2F0dG5ldHOIAAAAAAAAAACEZXRoMpD1pf1CAAAAAP__________gmlkgnY0gmlwhCLdu_SJc2VjcDI1NmsxoQN4v-N9zFYwEqzGPBBX37q24QPFvAVUtokIo1fblIsmTIN0Y3CCE4uDdWRwgg-j",
},
TotalEthereumValidators: 10, // just some random number
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this value (for testnet) should be high enough so we never accidentally reach the message-limits derived from it while testing something with local testnet (unless ofc we are testing those message-limits specifically)

otherwise we might encounter some hard-to-debug failures just because of that ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good idea

…-from-beacon-node

# Conflicts:
#	beacon/goclient/goclient.go
#	beacon/goclient/spec.go
#	cli/operator/node.go
…dcoded-configurable

# Conflicts:
#	beacon/goclient/aggregator.go
#	beacon/goclient/spec.go
#	beacon/goclient/sync_committee_contribution.go
Copy link
Copy Markdown
Contributor

@oleg-ssvlabs oleg-ssvlabs left a comment

Choose a reason for hiding this comment

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

great job!

Comment thread beacon/goclient/spec.go
Comment thread beacon/goclient/spec.go
Comment thread beacon/goclient/sync_committee_contribution.go Outdated
@MatusKysel MatusKysel requested a review from Copilot May 9, 2025 06:37
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 refactors the network configuration to replace various hardcoded values with configurable parameters, preparing the project for local testnet deployment. Key changes include using externally defined beacon configurations, updating peer scoring and topic parameters to use dynamic network values, and revising mock and client code to incorporate the new configurable values.

Reviewed Changes

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

Show a summary per file
File Description
networkconfig/holesky-e2e.go Updated beacon and SSV configuration to use dynamic parameters.
networkconfig/beacon_mock.go Renamed and updated mock methods for beacon configuration.
networkconfig/beacon.go Added new getters (e.g. EpochDuration, IntervalDuration) to BeaconConfig.
network/topics/* Updated topic options and scoring parameters to use network configuration.
beacon/goclient/* Refactored sync committee, spec, signing, and aggregator code to reference new config values.
message/validation/* Revised validation logic to use configurable epoch duration.
Comments suppressed due to low confidence (1)

networkconfig/beacon_mock.go:67

  • [nitpick] The renaming of the mock method from 'EpochsPerSyncCommitteePeriod' to 'EpochStartTime' may cause confusion; please ensure these changes are fully consistent with the corresponding interface methods in beacon.go.
func (mr *MockBeaconMockRecorder) EpochStartTime(epoch any) *gomock.Call {

Comment thread network/topics/params/peer_score.go Outdated
Comment thread beacon/goclient/sync_committee_contribution.go Outdated
@nkryuchkov nkryuchkov requested a review from y0sher May 12, 2025 18:30
nkryuchkov added 10 commits May 21, 2025 11:01
…-from-beacon-node

# Conflicts:
#	beacon/goclient/attest_test.go
#	beacon/goclient/events_test.go
#	beacon/goclient/goclient.go
#	beacon/goclient/goclient_test.go
#	beacon/goclient/validator.go
#	cli/bootnode/boot_node.go
#	cli/operator/node.go
#	exporter/api/query_handlers_test.go
#	protocol/v2/blockchain/beacon/client.go
#	utils/boot_node/node.go
…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
…dcoded-configurable

# Conflicts:
#	beacon/goclient/aggregator.go
#	beacon/goclient/spec.go
#	beacon/goclient/sync_committee_contribution.go
#	message/validation/validation.go
#	networkconfig/beacon.go
#	networkconfig/beacon_mock.go
#	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/network_mock.go
#	networkconfig/sepolia.go
#	networkconfig/test-network.go
#	operator/duties/committee_test.go
#	operator/duties/scheduler.go
#	operator/duties/scheduler_test.go
#	operator/duties/sync_committee.go
#	operator/duties/sync_committee_test.go
Base automatically changed from networkconfig-generate-ssv to networkconfig-from-beacon-node May 27, 2025 13:02
Base automatically changed from networkconfig-from-beacon-node to networkconfig-extract-beacon-params May 27, 2025 13:12
…-make-hardcoded-configurable

# Conflicts:
#	beacon/goclient/aggregator.go
#	beacon/goclient/spec.go
#	beacon/goclient/sync_committee_contribution.go
#	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/ssv.go
#	networkconfig/test-network.go
@MatusKysel MatusKysel merged commit 21e346c into networkconfig-extract-beacon-params May 27, 2025
7 checks passed
@MatusKysel MatusKysel deleted the networkconfig-make-hardcoded-configurable branch May 27, 2025 14:04
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.

6 participants