Skip to content

Commit 3473413

Browse files
authored
fix: remove chain-id prompt from provision (#92)
1 parent 805959b commit 3473413

3 files changed

Lines changed: 0 additions & 32 deletions

File tree

cmd/dvb/provision.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ func runInteractiveMode(ctx context.Context, opts *provisionOptions) error {
187187
Mode: wizardOpts.Mode,
188188
SdkVersion: wizardOpts.BinaryVersion,
189189
ForkNetwork: wizardOpts.ForkNetwork,
190-
ChainId: wizardOpts.ChainID,
191190
}
192191

193192
namespace := "default"
@@ -639,7 +638,6 @@ type YAMLProvisionSpecOutput struct {
639638
Validators int `json:"validators" yaml:"validators"`
640639
FullNodes int `json:"fullNodes,omitempty" yaml:"fullNodes,omitempty"`
641640
Mode string `json:"mode" yaml:"mode"`
642-
ChainID string `json:"chainId,omitempty" yaml:"chainId,omitempty"`
643641
ForkNetwork string `json:"forkNetwork,omitempty" yaml:"forkNetwork,omitempty"`
644642
}
645643

cmd/dvb/provision_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func TestFormatProvisionYAML(t *testing.T) {
2626
Mode: "docker",
2727
SdkVersion: "v1.0.0",
2828
ForkNetwork: "mainnet",
29-
ChainId: "mainnet-1",
3029
}
3130

3231
var buf bytes.Buffer
@@ -74,7 +73,6 @@ func TestFormatProvisionYAML_OmitsEmptyFields(t *testing.T) {
7473
"networkType:",
7574
"networkVersion:",
7675
"fullNodes:",
77-
"chainId:",
7876
"namespace:",
7977
"forkNetwork:",
8078
}

cmd/dvb/wizard.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type WizardOptions struct {
2222
FullNodes int
2323
ForkNetwork string // Network to fork from (e.g., "mainnet", "testnet", ""). Empty means fresh genesis.
2424
Mode string // Execution mode: "local" or "docker"
25-
ChainID string // Chain ID for the devnet (e.g., "mainnet-1", "mydevnet-1")
2625
BinaryVersion string // Binary version to use (required when forking from snapshot)
2726
}
2827

@@ -122,32 +121,6 @@ func RunProvisionWizard(daemonClient *client.Client) (*WizardOptions, error) {
122121
}
123122
opts.BinaryVersion = binaryVersion
124123

125-
// Chain ID for forked network - must match source network's chain-id
126-
defaultChainID := forkNetwork + "-1"
127-
fmt.Printf(" Note: When forking, chain-id should match the source network's chain-id.\n")
128-
chainIDPrompt := promptui.Prompt{
129-
Label: "Chain ID",
130-
Default: defaultChainID,
131-
Validate: validateNonEmpty,
132-
}
133-
chainID, err := chainIDPrompt.Run()
134-
if err != nil {
135-
return nil, handlePromptError(err, "chain ID")
136-
}
137-
opts.ChainID = strings.TrimSpace(chainID)
138-
} else {
139-
// Fresh genesis - use devnet name as default chain-id
140-
defaultChainID := opts.Name + "-1"
141-
chainIDPrompt := promptui.Prompt{
142-
Label: "Chain ID",
143-
Default: defaultChainID,
144-
Validate: validateNonEmpty,
145-
}
146-
chainID, err := chainIDPrompt.Run()
147-
if err != nil {
148-
return nil, handlePromptError(err, "chain ID")
149-
}
150-
opts.ChainID = strings.TrimSpace(chainID)
151124
}
152125

153126
// 3. Number of Validators
@@ -183,7 +156,6 @@ func RunProvisionWizard(daemonClient *client.Client) (*WizardOptions, error) {
183156
fmt.Printf(" Name: %s\n", opts.Name)
184157
fmt.Printf(" Network: %s\n", opts.Network)
185158
fmt.Printf(" Mode: %s\n", opts.Mode)
186-
fmt.Printf(" Chain ID: %s\n", opts.ChainID)
187159
fmt.Printf(" Validators: %d\n", opts.Validators)
188160
fmt.Printf(" Full Nodes: %d\n", opts.FullNodes)
189161
if opts.ForkNetwork != "" {

0 commit comments

Comments
 (0)