Skip to content

Comments

l2geth: Add commands to initialize from a URL, and dump the current chainstate#2048

Merged
mslipper merged 2 commits intoethereum-optimism:developfrom
mslipper:feat/eng-1906-geth-init-url
Jan 23, 2022
Merged

l2geth: Add commands to initialize from a URL, and dump the current chainstate#2048
mslipper merged 2 commits intoethereum-optimism:developfrom
mslipper:feat/eng-1906-geth-init-url

Conversation

@mslipper
Copy link
Collaborator

This PR adds two commands to l2geth:

  • geth init <url> <genesisHash>, which will download a remote genesis JSON file, compare its hash to the one specified on the CLI, then reinitialize the chain config.
  • geth dump-chain-cfg, which will dump the current chain config to stdout.

These commands will make it easier for us to adopt the upcoming gas schedule hardfork.

Fixes: ENG-1906

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2022

🦋 Changeset detected

Latest commit: b0582a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/l2geth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tynes
Copy link
Contributor

tynes commented Jan 22, 2022

Do you mind adding a changeset for this?

@mslipper mslipper force-pushed the feat/eng-1906-geth-init-url branch from 2761135 to 9cfa74d Compare January 22, 2022 00:30
@mslipper
Copy link
Collaborator Author

My bad. Changeset added.

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2022

Codecov Report

Merging #2048 (b0582a3) into develop (f8531d8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2048   +/-   ##
========================================
  Coverage    74.58%   74.58%           
========================================
  Files           79       79           
  Lines         2554     2554           
  Branches       401      401           
========================================
  Hits          1905     1905           
  Misses         649      649           
Flag Coverage Δ
batch-submitter 62.50% <ø> (ø)
contracts 90.48% <ø> (ø)
core-utils 57.50% <ø> (ø)
data-transport-layer 38.64% <ø> (ø)
message-relayer 70.86% <ø> (ø)
sdk 88.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8531d8...b0582a3. Read the comment docs.

@tynes
Copy link
Contributor

tynes commented Jan 22, 2022

Looks like a linting error needs to be fixed, but the functionality looks good to me

@mslipper
Copy link
Collaborator Author

Cool, will fix the lint error then merge.

@mslipper mslipper force-pushed the feat/eng-1906-geth-init-url branch 2 times, most recently from 5d782c3 to 692e9d3 Compare January 22, 2022 01:15
…hainstate

This PR adds two commands to l2geth:

- `geth init <url> <genesisHash>`, which will download a remote genesis JSON file, compare its hash to the one specified on the CLI, then reinitialize the chain config.
- `geth dump-chain-cfg`, which will dump the current chain config to stdout.

These commands will make it easier for us to adopt the upcoming gas schedule hardfork.

Fixes: ENG-1906
@mslipper mslipper force-pushed the feat/eng-1906-geth-init-url branch from 692e9d3 to ae96d78 Compare January 22, 2022 01:18
@mslipper mslipper merged commit 2108412 into ethereum-optimism:develop Jan 23, 2022
theochap pushed a commit that referenced this pull request Dec 10, 2025
theochap pushed a commit that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cannon Area: cannon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants