Skip to content

Commit

Permalink
Main v1.5.0 into Develop (#409)
Browse files Browse the repository at this point in the history
* [docs] update changelog

* [docs] update docs for version v1.3.0

* docs: update main docs page to holds holesky

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: add new info section on latest comment at quickstart page

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update CHANGELOG

Co-authored-by: Miguel Tenorio <[email protected]>

* fix: golang version for release

* Release v1.3.1 (#359)

* [docs] update changelog

* [docs] update docs for version v1.3.0

* docs: update main docs page to holds holesky

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: add new info section on latest comment at quickstart page

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update CHANGELOG

Co-authored-by: Miguel Tenorio <[email protected]>

* fix: golang version for release

* chore: Update client images to be ready for deneb forks

* feat: update courtney dependency

* fix: update unit_tests action

* fix: update build workflow

* fix: update codecov/codecov-action to v4

* fix: update doc-test dependencies versions

* fix: update templates commands in tests

* feat: update versions of clients

* fix: update lodestar command

* docs: update changelog

* docs: update documentation to version v1.3.1

* docs: update CHANGELOG.md

Co-authored-by: Adrian Tubal Páez Ruiz <[email protected]>

* docs: update CHANGELOG.md

Co-authored-by: Miguel Tenorio <[email protected]>

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>

* Fix homebrew (#360)

* feat: upgrade release action

* fix: downgrade docker/setup-buildx-action to v3

* fix: update reviewers on release PR

* fix:comment failing packages on Windows

* Release v1.3.2 (#365)

Dencun-ready release

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>

* Release v1.4.0 (#394)

* [docs] update changelog

* [docs] update docs for version v1.3.0

* docs: update main docs page to holds holesky

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: add new info section on latest comment at quickstart page

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update CHANGELOG

Co-authored-by: Miguel Tenorio <[email protected]>

* fix: golang version for release

* chore: Update client images to be ready for deneb forks

* feat: update courtney dependency

* fix: update unit_tests action

* fix: update build workflow

* fix: update codecov/codecov-action to v4

* fix: update doc-test dependencies versions

* fix: update templates commands in tests

* feat: update versions of clients

* fix: update lodestar command

* Update develop branch with main (#362)

* [docs] update changelog

* [docs] update docs for version v1.3.0

* docs: update main docs page to holds holesky

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: add new info section on latest comment at quickstart page

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update CHANGELOG

Co-authored-by: Miguel Tenorio <[email protected]>

* fix: golang version for release

* Release v1.3.1 (#359)

* [docs] update changelog

* [docs] update docs for version v1.3.0

* docs: update main docs page to holds holesky

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: add new info section on latest comment at quickstart page

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update CHANGELOG

Co-authored-by: Miguel Tenorio <[email protected]>

* fix: golang version for release

* chore: Update client images to be ready for deneb forks

* feat: update courtney dependency

* fix: update unit_tests action

* fix: update build workflow

* fix: update codecov/codecov-action to v4

* fix: update doc-test dependencies versions

* fix: update templates commands in tests

* feat: update versions of clients

* fix: update lodestar command

* docs: update changelog

* docs: update documentation to version v1.3.1

* docs: update CHANGELOG.md

Co-authored-by: Adrian Tubal Páez Ruiz <[email protected]>

* docs: update CHANGELOG.md

Co-authored-by: Miguel Tenorio <[email protected]>

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>

* Fix homebrew (#360)

* feat: upgrade release action

* fix: downgrade docker/setup-buildx-action to v3

* fix: update reviewers on release PR

* fix:comment failing packages on Windows

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>

* Update images dencun-ready (#364)

* feat: update client images to be dencun compatible

* docs: update changelog

* Remove obsolete version field (#373)

* fix: remove obsolete version field

* fix: update github actions (#366)

* fix: check-version PR reviewers (#382)

* Remove support for Goerli  (#372)

* Removed Goerli from NetworkSupported and adjusted networks test

* Removed Goerli from templates/envs

* Removed Goerli from templates/envs

* Mentioned Goerli support removal in the changelog, goerli.mdx, and README

* Fixed TestSupportMEVBoost

* Removed Georli from TestGenerativeEnvFile

* Adjusted Test case 6 in TestCheckVariable

* Removed Georli from networks list for TestSupportedNetworks

* Removed Goerli from cli.go

* Adjusted test cli_test.go "consensus node" network into NetworkMainnet

* Replaced Goerli network from test cases in generate_test.go with valid networks

* Removed Goerli from GenerateCmd()

* Replaced Goerli in test cases with Mainnet

* Removed Goerli from KeysCmd()

* Removed Goerli from FullNodeSubCmd()

* Removed NetworkGoerli

* Fixed index_out_of_range error in Holesky related test cases in "Select network"

* Adjusted error in TestCli regarding "consensus node" test case

* Update cli/sub_gen.go

* docs: Update cli.mdx

* docs: Update clients.mdx

* docs: Update generate.mdx

* docs: Update keys.mdx

* docs: Update networks.mdx

* docs: Replace Goerli with Sepolia in run-validator-mev[network].md

* docs: Remove Goerli from documentations

* feat: remove Goerli from ImportKeys and associated tests

* docs: remove Goerli from docs

* test: Add E2E test suite (#384)

* test: init e2e tests

* feat: add e2e test workflow

* chore: add codecov config

* feat: Add Smart Contracts logic for Lido (#386)

* feat: add MevBoostRelayAllowedList contract and code

* feat: add StakingRouter contract and code

* feat: add contracts go files to package "lido"

* feat: apply changes to go.sum and go.mod

* feat: adjust packages for contracts

* fix: adjust formatting in MEVBoostRelayAllowedList.go

* fix: update go.mod and go.sum

* test: create MEVBoostrelayAllowedList_test.go

* feat: update go.mod, go.sum

* style: adjust formatting

* feat: move lido package to internal package

* feat: add feeRecipient addresses for each network

* feat: adjust MEVBoostRelayAllowedList_test.go for method GetRelays

* style: add comments to GetRelays method

* feat: separate test and logic methods

* feat: put expectedRelays in .yaml file

* style: rename files, adjust formatting and add comments

* feat: import configs package

* feat: add public rpcs to configs and create method GetPublicRPCs

* style: adjust formatting

* feat: Allow keystores creation with eth1 withdrawal credentials (#235)

* feat: allow keystores creation with eth1 withdrawal credentials

* fix: error when passing empty withdrawal eth1 address

* chore: Add devcontainer config

* fix: Withdrawal credentials prefix zeros in deposit data.

* feat: Add json schema and logic to validate deposit_data.json

* test: Add e2e test for keys gen with eth1 withdrawal cred

* feat: Support installing deps on debian 12

* fix: fix e2e tests error in Windows

* fix: e2e sedge keys test for Windows

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: AntiD2ta <[email protected]>
Co-authored-by: Haneen Khalifa <[email protected]>

* feat: Add support for mev-boost on Holesky (#380)

* feat: add mev RelayUrls for Holesky

* feat: update holesky/envs_base.tmpl

* test: add test case in TestSupportMEVBoost

* docs: update docs, README.md, and CHANGELOG.md

* feat: update TestCli/consensus_node_holesky

* feat: update TestCli/consensus_node_holesky

---------

Co-authored-by: Marcos Antonio Maceo <[email protected]>

* feat: Update images to latest versions (#391)

* feat: update clients to latest images

* Fix misused eth1 flag for lighthouse CL

* docs: update changelog

---------

Co-authored-by: Yaroslav Kukharuk <[email protected]>

* feat: Add Lido Flow (#389)

* feat: add method GetRelaysURI and adjust mevboostrelaylist package

* feat: add lido flow for cli.go

* refactor: adjust prompts for lido flow

* feat: add non-interactive lido flow

* style: adjust formatting

* fix: adjust formatting

* test: add e2e test for non-interactive setup

* fix: adjust e2e test

* style: adjust formatting

* test: Add mocks test for non-interactive setup in cli/generate_test.go

* doc: documentation for lido csm on sedge

* test: adjust e2e tests for lido flow

* fix: update go.mod

* fix: Adjust generate_test.go

* feat: Add --lido to sedge keys

* feat: Overwrite WithdrawalAddress in prompts setup

* refactor: error messages

* refactor: adjust tests and naming

* test: adjust keys for holesky

* doc: Update Sedge with Lido guide (#390)

* feat: MEV prompt with lido

* refactor: Validate lido supported networks

* refactor: NodeOptionsFactory interface for cli

* refactor: NodeOptionsFactory interface for sedge generate

* fix: Holesky fork version

* refac: New pkg options for Sedge setup type logic

* feat(keys): Log keystore path after generation

* doc: Add --network holesky to sedge keys --lido example

* chore: Update go.mod

* fix documentation for update on commands

* doc: Update CHANGELOG

---------

Co-authored-by: Marcos Maceo <[email protected]>
Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: AntiD2ta <[email protected]>

* feat: Support ubuntu 24.04 deps install (#392)

* feat: Support installing deps on Ubuntu 24.04

* feat: Add gcc and g++ to suggested deps for build from source

* fix(cli): Mev-boost not being generated for holesky (#393)

* docs: update documentation for release v.1.4.0

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>
Co-authored-by: Kamil Chodoła <[email protected]>
Co-authored-by: Haneen Khalifa <[email protected]>
Co-authored-by: Carlos Bermudez Porto <[email protected]>
Co-authored-by: AntiD2ta <[email protected]>
Co-authored-by: Haneen Khalifa <[email protected]>
Co-authored-by: Yaroslav Kukharuk <[email protected]>

* fix: set golang to 1.21 on actions (#395)

* fix: update go version on dockerfile for buildx (#396)

* fix: update go version on actions for ppa (#397)

* Release v1.5.0

* feat: add op funding.json (#405)

* Remove Peer upper limit of peers on CL (#404)

* Remove Peer upper limit on teku because of new peers management

* Remove Peer force setup from CL layer

* Fix typo

* Delete sh.exe.stackdump

* docs: update changelog

* docs: update docs to latest version

* feat: add OP stack using nethermind to Sedge (#407)

* feat: add op-neth support

* docs: update changelog

* feat: add --Discovery.Discv5Enabled flag to op-nethermind

* fix: change --consensus-api-url to --consensus-url

* fix: remove references to op-enabled on full command

* feat: add --syncmode=execution-layer flag to op-l2 container

* fix: add more context on documentation

* docs: updated changelog

* Update docs/docs/quickstart/optimism.mdx

Co-authored-by: Miguel Tenorio <[email protected]>

---------

Co-authored-by: Miguel Tenorio <[email protected]>

* docs: update changelog

* fix: format lines

---------

Co-authored-by: Marek Moraczyński <[email protected]>
Co-authored-by: Kamil Chodoła <[email protected]>
Co-authored-by: Miguel Tenorio <[email protected]>

* fix: Remove repeated code

* fix: error with lido rewards

* feat: Adjust Makefile

* fix: Remove generated file

---------

Co-authored-by: Miguel Tenorio <[email protected]>
Co-authored-by: Adrian <[email protected]>
Co-authored-by: Kamil Chodoła <[email protected]>
Co-authored-by: Haneen Khalifa <[email protected]>
Co-authored-by: Carlos Bermudez Porto <[email protected]>
Co-authored-by: AntiD2ta <[email protected]>
Co-authored-by: Haneen Khalifa <[email protected]>
Co-authored-by: Yaroslav Kukharuk <[email protected]>
Co-authored-by: Marek Moraczyński <[email protected]>
  • Loading branch information
10 people authored Sep 11, 2024
1 parent 7204e13 commit 149bcdc
Show file tree
Hide file tree
Showing 39 changed files with 4,887 additions and 77 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Teku and Lighthouse import keys container error on Windows.

## [v1.5.0] - 2024-09-06

### Added
- Add support for Optimism and Base, using Nethermind Client on Mainnet and Sepolia.

### Changed
- Update client images to latest versions.

#### Fixed
- Remove Peer upper limit of peers on CL

## [v1.4.0] - 2024-07-10

### Fixed
Expand Down Expand Up @@ -41,7 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Update client images to Dencun-ready versions.
- Update client images to Dencun-ready versions.

## [v1.3.1] - 2024-02-14

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ run-cli: compile ## run cli
@./build/sedge cli --config ./config.yaml

generate: ## generate go files
@go generate ./...
@abigen --abi ./internal/lido/contracts/csmodule/CSModule.abi --bin ./internal/lido/contracts/csmodule/CSModule.bin --pkg csmodule --out ./internal/lido/contracts/csmodule/CSModule.go
@abigen --abi ./internal/lido/contracts/csfeedistributor/CSFeeDistributor.abi --bin ./internal/lido/contracts/csfeedistributor/CSFeeDistributor.bin --pkg csfeedistributor --out ./internal/lido/contracts/csfeedistributor/CSFeeDistributor.go
@abigen --abi ./internal/lido/contracts/csaccounting/CSAccounting.abi --bin ./internal/lido/contracts/csaccounting/CSAccounting.bin --pkg csaccounting --out ./internal/lido/contracts/csaccounting/CSAccounting.go
@abigen --abi ./internal/lido/contracts/mevboostrelaylist/MEVBoostRelayAllowedList.abi --bin ./internal/lido/contracts/mevboostrelaylist/MEVBoostRelayAllowedList.bin --pkg mevboostrelaylist --out ./internal/lido/contracts/mevboostrelaylist/MEVBoostRelayAllowedList.go

@go generate ./...

test: generate ## run tests
@mkdir -p coverage
Expand Down
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func setupJWT(p ui.Prompter, o *CliCmdOptions, skip bool) error {
}
switch o.jwtSourceType {
case SourceTypeCreate:
jwtPath, err := handleJWTSecret(o.generationPath)
jwtPath, err := handleJWTSecret(o.generationPath, "jwtsecret")
o.genData.JWTSecretPath = jwtPath
if err != nil {
return err
Expand Down
105 changes: 94 additions & 11 deletions cli/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ var (
)

const (
execution, consensus, validator, mevBoost = "execution", "consensus", "validator", "mev-boost"
execution, consensus, validator, mevBoost, optimism = "execution", "consensus", "validator", "mev-boost", "optimism"
jwtPathName = "jwtsecret"
)

type CustomFlags struct {
Expand All @@ -57,9 +58,18 @@ type CustomFlags struct {
customDeployBlock string
}

type OptimismFlags struct {
optimismName string
optimismExecutionName string
elOpExtraFlags []string
opExtraFlags []string
isBase bool
}

// GenCmdFlags is a struct that holds the flags of the generate command
type GenCmdFlags struct {
CustomFlags
OptimismFlags
executionName string
consensusName string
validatorName string
Expand Down Expand Up @@ -98,6 +108,7 @@ It will create a 'docker-compose.yml' and a '.env', which you will need later to
You can generate:
- Full Node (execution + consensus + validator)
- Full Node without Validator (execution + consensus)
- Optimism Full Node
- Execution Node
- Consensus Node
- Validator Node
Expand All @@ -112,6 +123,7 @@ You can generate:
cmd.AddCommand(ConsensusSubCmd(sedgeAction))
cmd.AddCommand(ValidatorSubCmd(sedgeAction))
cmd.AddCommand(MevBoostSubCmd(sedgeAction))
cmd.AddCommand(OpFullNodeSubCmd(sedgeAction))

cmd.PersistentFlags().BoolVar(&lidoNode, "lido", false, "generate Lido CSM node")
cmd.PersistentFlags().StringVarP(&generationPath, "path", "p", configs.DefaultAbsSedgeDataPath, "generation path for sedge data. Default is sedge-data")
Expand Down Expand Up @@ -250,7 +262,7 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio

// Generate jwt secrets if needed
if flags.jwtPath == "" {
flags.jwtPath, err = handleJWTSecret(generationPath)
flags.jwtPath, err = handleJWTSecret(generationPath, jwtPathName)
if err != nil {
return err
}
Expand All @@ -260,6 +272,14 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio
return err
}
}
var jwtSecretOP string
// If optimism is included in the services, generate the jwt secret for it
if utils.Contains(services, optimism) {
jwtSecretOP, err = handleJWTSecret(generationPath, jwtPathName+"-op")
if err != nil {
return err
}
}

// Overwrite feeRecipient and relayURLs for Lido Node
if lidoNode {
Expand All @@ -275,11 +295,25 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio

vlStartGracePeriod := configs.NetworkEpochTime(network) * time.Duration(flags.waitEpoch)

var consensusApiUrl string
var executionApiUrl string
var executionAuthUrl string
if combinedClients.Consensus == nil {
consensusApiUrl = flags.consensusApiUrl
}

if combinedClients.Execution == nil {
executionApiUrl = flags.executionApiUrl
executionAuthUrl = flags.executionAuthUrl
}

// Generate docker-compose scripts
gd := generate.GenData{
ExecutionClient: combinedClients.Execution,
ConsensusClient: combinedClients.Consensus,
ValidatorClient: combinedClients.Validator,
ExecutionOPClient: combinedClients.ExecutionOP,
OptimismClient: combinedClients.Optimism,
Network: network,
CheckpointSyncUrl: flags.checkpointSyncUrl,
FeeRecipient: flags.feeRecipient,
Expand All @@ -289,6 +323,9 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio
ElExtraFlags: flags.elExtraFlags,
ClExtraFlags: flags.clExtraFlags,
VlExtraFlags: flags.vlExtraFlags,
ElOpExtraFlags: flags.elOpExtraFlags,
OpExtraFlags: flags.opExtraFlags,
IsBase: flags.isBase,
MapAllPorts: flags.mapAllPorts,
Mev: !flags.noMev && utils.Contains(services, validator) && utils.Contains(services, consensus) && !flags.noValidator,
MevImage: flags.mevImage,
Expand All @@ -298,9 +335,9 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio
MevBoostEndpoint: flags.mevBoostUrl,
Services: services,
VLStartGracePeriod: uint(vlStartGracePeriod.Seconds()),
ExecutionApiUrl: flags.executionApiUrl,
ExecutionAuthUrl: flags.executionAuthUrl,
ConsensusApiUrl: flags.consensusApiUrl,
ExecutionApiUrl: executionApiUrl,
ExecutionAuthUrl: executionAuthUrl,
ConsensusApiUrl: consensusApiUrl,
ECBootnodes: flags.customEnodes,
CCBootnodes: flags.customEnrs,
CustomChainSpecPath: flags.CustomFlags.customChainSpec,
Expand All @@ -311,6 +348,7 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio
MevBoostOnValidator: flags.mevBoostOnVal,
ContainerTag: containerTag,
LatestVersion: flags.latestVersion,
JWTSecretOP: jwtSecretOP,
}
_, err = sedgeAction.Generate(actions.GenerateOptions{
GenerationData: gd,
Expand Down Expand Up @@ -338,7 +376,7 @@ func runGenCmd(out io.Writer, flags *GenCmdFlags, sedgeAction actions.SedgeActio
}

func valClients(allClients clients.OrderedClients, flags *GenCmdFlags, services []string) (*clients.Clients, error) {
var executionClient, consensusClient, validatorClient *clients.Client
var executionClient, consensusClient, validatorClient, executionOpClient, opClient *clients.Client
var err error

// execution client
Expand All @@ -353,6 +391,7 @@ func valClients(allClients clients.OrderedClients, flags *GenCmdFlags, services
if len(executionParts) > 1 {
log.Warn(configs.CustomExecutionImagesWarning)
executionClient.Image = strings.Join(executionParts[1:], ":")
flags.latestVersion = false
}
}
executionClient.SetImageOrDefault(strings.Join(executionParts[1:], ":"))
Expand All @@ -374,6 +413,7 @@ func valClients(allClients clients.OrderedClients, flags *GenCmdFlags, services
if len(consensusParts) > 1 {
log.Warn(configs.CustomConsensusImagesWarning)
consensusClient.Image = strings.Join(consensusParts[1:], ":")
flags.latestVersion = false
}
}
consensusClient.SetImageOrDefault(strings.Join(consensusParts[1:], ":"))
Expand All @@ -395,6 +435,7 @@ func valClients(allClients clients.OrderedClients, flags *GenCmdFlags, services
if len(validatorParts) > 1 {
log.Warn(configs.CustomValidatorImagesWarning)
validatorClient.Image = strings.Join(validatorParts[1:], ":")
flags.latestVersion = false

}
}
Expand All @@ -405,11 +446,53 @@ func valClients(allClients clients.OrderedClients, flags *GenCmdFlags, services
} else {
validatorClient = nil
}
// optimism client
if utils.Contains(services, optimism) {
optimismParts := strings.Split(flags.optimismName, ":")
opClient, err = clients.RandomChoice(allClients[optimism])
if err != nil {
return nil, err
}
if flags.optimismName != "" {
opClient.Name = "optimism"
if len(optimismParts) > 1 {
opClient.Image = strings.Join(optimismParts[1:], ":")
}
}
opClient.SetImageOrDefault(strings.Join(optimismParts[1:], ":"))
if err = clients.ValidateClient(opClient, optimism); err != nil {
return nil, err
}

optimismExecutionParts := strings.Split(flags.optimismExecutionName, ":")
executionOpClient = allClients[execution]["nethermind"]
if flags.optimismExecutionName != "" {
executionOpClient.Name = optimismExecutionParts[0]
if len(optimismExecutionParts) > 1 {
executionOpClient.Image = strings.Join(optimismExecutionParts[1:], ":")
}
}
executionOpClient.SetImageOrDefault(strings.Join(optimismExecutionParts[1:], ":"))
if err = clients.ValidateClient(executionOpClient, optimism); err != nil {
return nil, err
}

// If set execution-api-url, set execution and beacon to nil
if flags.executionApiUrl != "" {
executionClient = nil
consensusClient = nil
}
} else {
opClient = nil
executionOpClient = nil
}

return &clients.Clients{
Execution: executionClient,
Consensus: consensusClient,
Validator: validatorClient,
Execution: executionClient,
Consensus: consensusClient,
Validator: validatorClient,
ExecutionOP: executionOpClient,
Optimism: opClient,
}, err
}

Expand All @@ -434,7 +517,7 @@ func initGenPath(path string) error {
return nil
}

func handleJWTSecret(generationPath string) (string, error) {
func handleJWTSecret(generationPath, name string) (string, error) {
log.Info(configs.GeneratingJWTSecret)
if !filepath.IsAbs(generationPath) {
return "", fmt.Errorf(configs.GenerateJWTSecretError, fmt.Errorf("generation path must be absolute"))
Expand All @@ -445,7 +528,7 @@ func handleJWTSecret(generationPath string) (string, error) {
return "", fmt.Errorf(configs.GenerateJWTSecretError, err)
}

jwtPath, err := filepath.Abs(filepath.Join(generationPath, "jwtsecret"))
jwtPath, err := filepath.Abs(filepath.Join(generationPath, name))
if err != nil {
return "", fmt.Errorf(configs.GenerateJWTSecretError, err)
}
Expand Down
48 changes: 47 additions & 1 deletion cli/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ func TestGenerateCmd(t *testing.T) {
errors.New("invalid consensus client"),
},
{
"Validator missing consensus-api",
"Validator missing consensus-url",
subCmd{
name: "validator",
args: []string{},
Expand Down Expand Up @@ -1316,6 +1316,52 @@ func TestGenerateCmd(t *testing.T) {
globalFlags{},
nil,
},
{
"Optimism full node",
subCmd{
name: "op-full-node",
},
GenCmdFlags{},
globalFlags{},
nil,
},
{
"Optimism full node with api url",
subCmd{
name: "op-full-node",
},
GenCmdFlags{
executionApiUrl: "https://localhost:8545",
consensusApiUrl: "https://localhost:8000/api/endpoint",
},
globalFlags{},
nil,
},
{
"Optimism full node with only consensus api url",
subCmd{
name: "op-full-node",
},
GenCmdFlags{
consensusApiUrl: "https://localhost:8000/api/endpoint",
},
globalFlags{},
nil,
},
{
"Lido Full-node - Holesky without MEV",
subCmd{
name: "full-node",
},
GenCmdFlags{
noMev: true,
},
globalFlags{
network: NetworkHolesky,
lidoNode: true,
},
nil,
},
{
"Lido Full-node - Holesky without MEV",
subCmd{
Expand Down
Loading

0 comments on commit 149bcdc

Please sign in to comment.