Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(network/config): pass custom ssv config & get beacon config from node & remove hardcoded network values #1308

Open
wants to merge 85 commits into
base: stage
Choose a base branch
from

Conversation

nkryuchkov
Copy link
Contributor

@nkryuchkov nkryuchkov commented Feb 6, 2024

Closes #1687, #1865

Changes:

  • split networkconfig.NetworkConfig into networkconfig.SSV and networkconfig.Beacon
  • pass custom SSV network config (networkconfig.SSV) in yaml
  • get beacon config (networkconfig.Beacon) from beacon node
  • script for custom SSV (networkconfig.SSV) config generation
  • refactor code around the networkconfig package
  • get rid of BeaconNetwork interface as it's hard to work with
  • use network values from config instead of hardcoded ones as a preparation for local testnet

olegshmuelov
olegshmuelov previously approved these changes Mar 19, 2024
@nkryuchkov nkryuchkov force-pushed the override-spec-beacon-config branch from 02bff36 to 2ac7d3d Compare November 11, 2024 17:00
Copy link
Contributor

@y0sher y0sher left a comment

Choose a reason for hiding this comment

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

mostly small comments and questions :)

# Conflicts:
#	beacon/goclient/genesisgoclient/adapter.go
#	beacon/goclient/goclient.go
#	beacon/goclient/signing.go
#	cli/operator/node.go
#	cli/operator/node_test.go
#	ekm/eth_key_manager_signer.go
#	ekm/signer_key_manager_test.go
#	eth/eventhandler/event_handler.go
#	message/validation/genesis/consensus_validation.go
#	message/validation/genesis/validation.go
#	message/validation/genesis/validation_test.go
#	message/validation/validation_test.go
#	network/discovery/dv5_service.go
#	network/discovery/dv5_service_test.go
#	network/discovery/forking_dv5_listener.go
#	network/discovery/util_test.go
#	network/p2p/p2p_test.go
#	network/peers/connections/helpers_test.go
#	network/topics/controller_test.go
#	network/topics/msg_validator_test.go
#	network/topics/pubsub.go
#	network/topics/scoring.go
#	networkconfig/config.go
#	networkconfig/holesky-e2e.go
#	networkconfig/holesky-stage.go
#	networkconfig/holesky.go
#	networkconfig/local-testnet.go
#	networkconfig/mainnet.go
#	networkconfig/test-network.go
#	operator/duties/attester.go
#	operator/duties/attester_genesis_test.go
#	operator/duties/committee.go
#	operator/duties/committee_test.go
#	operator/duties/proposer_genesis_test.go
#	operator/duties/scheduler.go
#	operator/duties/scheduler_test.go
#	operator/duties/sync_committee.go
#	operator/duties/sync_committee_genesis_test.go
#	operator/duties/sync_committee_test.go
#	operator/duties/voluntary_exit.go
#	operator/duties/voluntary_exit_genesis_test.go
#	operator/node.go
#	operator/validator/controller.go
#	operator/validator/controller_test.go
#	operator/validator/router_test.go
#	operator/validator/task_executor.go
#	operator/validator/task_executor_test.go
#	protocol/genesis/qbft/roundtimer/timer.go
#	protocol/genesis/qbft/roundtimer/timer_test.go
#	protocol/genesis/ssv/runner/proposer.go
#	protocol/genesis/ssv/spectest/ssv_mapping_test.go
#	protocol/genesis/ssv/testing/runner.go
#	protocol/genesis/ssv/testing/validator.go
#	protocol/genesis/ssv/validator/opts.go
#	protocol/genesis/types/domain.go
#	protocol/v2/blockchain/beacon/client.go
#	protocol/v2/ssv/runner/committee.go
#	protocol/v2/ssv/spectest/ssv_mapping_test.go
#	protocol/v2/ssv/testing/runner.go
#	protocol/v2/ssv/validator/opts.go
#	registry/storage/shares_test.go
#	utils/boot_node/node.go
#	utils/testutils.go
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 42.00000% with 551 lines in your changes missing coverage. Please review.

Project coverage is 47.3%. Comparing base (c57d7f5) to head (fd82a62).
Report is 2 commits behind head on stage.

Files with missing lines Patch % Lines
networkconfig/mock.go 0.0% 190 Missing ⚠️
cli/generate_config.go 0.0% 68 Missing ⚠️
cli/operator/node.go 0.0% 65 Missing ⚠️
networkconfig/beacon.go 0.0% 62 Missing ⚠️
beacon/goclient/spec.go 59.2% 45 Missing and 10 partials ⚠️
networkconfig/ssv.go 74.2% 15 Missing and 3 partials ⚠️
beacon/goclient/proposer.go 0.0% 13 Missing ⚠️
networkconfig/config.go 0.0% 11 Missing ⚠️
operator/validator/controller.go 61.9% 8 Missing ⚠️
beacon/goclient/aggregator.go 0.0% 5 Missing ⚠️
... and 24 more
Additional details and impacted files

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

@nkryuchkov nkryuchkov requested a review from y0sher January 15, 2025 19:11
# Conflicts:
#	cli/operator/node.go
#	exporter/api/query_handlers_test.go
#	operator/node.go
#	protocol/v2/ssv/spectest/ssv_mapping_test.go
#	protocol/v2/ssv/validator/non_committee_validator.go
@MatheusFranco99 MatheusFranco99 self-requested a review January 17, 2025 12:01
Copy link
Contributor

@MatheusFranco99 MatheusFranco99 left a comment

Choose a reason for hiding this comment

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

@y0sher sorry for the delay

@nkryuchkov just some minor comment suggestions

Note: this review is only for the message_rate.go

network/topics/params/message_rate.go Outdated Show resolved Hide resolved
network/topics/params/message_rate.go Show resolved Hide resolved
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.

Remove hardcoded slots/epoch numbers Pass custom network config and beacon options
4 participants