Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ job "{{ job.name }}" {
data = <<-EOH
#!/usr/bin/env bash

# Mutate genesis file to only have a single alloc to contract deployer
# Mutate genesis file to only have a single alloc to contract deployer, and chainID of holesky (17000)
${GETH_BIN} --dev dumpgenesis > local/default_genesis.json
jq -s '
.[0].alloc = .[1].alloc
| .[0].config.chainId = .[1].config.chainId
| .[0].config.chainId = 17000
Copy link
Collaborator

Choose a reason for hiding this comment

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

@mrekucci Is this right? Or do we need to change this in some other files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK an eth chain's chainID is set in the genesis.json upon calling geth init

Copy link
Collaborator

Choose a reason for hiding this comment

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

Basically I just want to know if this is the best place to override this. So I am guessing this value right now is picked up from some config values we set. Maybe we need to update that value for this particular profile. So purely nomad implementation doubt.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will pin the chain ID for other environments as well, we should create a new profile in the environments.yml file and use it for ci/integration tests.

Copy link
Contributor Author

@shaspitz shaspitz Feb 13, 2025

Choose a reason for hiding this comment

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

Does the mock l1 correspond to an environment in the way you've designed it? Doesn't seem so. The current change would only affect the mock l1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following up here -

This will pin the chain ID for other environments as well

^ This is my intention in this PR. The mock-l1 should never have a chain id other than 17000, 1, etc. The current behavior where the mock l1 has a chain id of 17864, is incorrect. And likely a symptom of copying config from our mev-commit chain setup somewhere.

Adding an entry to the environments.yml doesn't seem appropriate here as the mock l1 is not it's own environment, It's a nomad job.

If more desirable, I can set this chain id as an env var in the profiles.yml under the mock_l1_job. Would this suffice @mrekucci?

| .[0]
' local/default_genesis.json local/genesis_{{ env }}-{{ version }}.json > local/genesis.json
${GETH_BIN} --datadir local/data init local/genesis.json
Expand Down
Loading