Skip to content

fix network argument to be a string and not a list#4243

Open
jakubgs wants to merge 1 commit into
masterfrom
fix-network-arg
Open

fix network argument to be a string and not a list#4243
jakubgs wants to merge 1 commit into
masterfrom
fix-network-arg

Conversation

@jakubgs
Copy link
Copy Markdown
Member

@jakubgs jakubgs commented May 14, 2026

Tried using TOML config format and encountered this unexpected error:

Failed to load secondary sources: 'nimbus-execution-client.toml(17, 11) expected '"["''

@jakubgs jakubgs requested review from jangko and tersec May 14, 2026 13:22
@jakubgs jakubgs self-assigned this May 14, 2026
Comment thread vendor/nim-zlib
@jakubgs jakubgs force-pushed the fix-network-arg branch from fde4418 to 77f00f0 Compare May 14, 2026 13:33
Tried using TOML config format and encountered this unexpected error:

Failed to load secondary sources: 'nimbus-execution-client.toml(17, 11) expected '"["''

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@jakubgs jakubgs force-pushed the fix-network-arg branch from 77f00f0 to 3a6d007 Compare May 14, 2026 13:34
@jangko
Copy link
Copy Markdown
Contributor

jangko commented May 14, 2026

The reason it is a list is nimbus can accept:

  1. --network:hoodi
  2. --network:1
  3. --network:hoodi --network:123
  4. --network:"/path/to/genesis" --network:123

The 3rd & 4th version allow nimbus to override the numerical network id.
What need to be fixed is the TOML parser, but right now nim-toml-serialization is less flexible and missing a crucial feature to parse dynamic field type like nim-json-serialization.

@jakubgs
Copy link
Copy Markdown
Member Author

jakubgs commented May 14, 2026

If overriding network ID is required why not have separate --network-id flag to make functionality explicit and flag parsing simpler?

Also, why would overriding the network ID be desirable in the first place?
And why providing genesis file shouldn't be a separate flag as well?

@jangko
Copy link
Copy Markdown
Contributor

jangko commented May 14, 2026

In the past nimbus have --network-id and --custom-network, they do not make parsing simpler. That's why --network-id is removed, and --custom-network been deprecated.

And why overriding network ID is needed? Looks like geth genesis file format is very popular among client implementer. But it does not contains network ID. It force chain ID to be used as network ID which is not always true. override network ID is a clean mechanism when client user want a different network ID from chain ID. (So it's an external/historical complexity)

And why providing genesis file shouldn't be a separate flag as well? both genesis file and built in named network are the same thing. You can choose a built in named network such as hoodi or a genesis.json of hoodi and it will be the same configuration for your client.

For now, isn't using bracket for your network field in your TOML file is simpler than try to fix the parser?

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.

3 participants