go-ethereum/cmd
lightclient 827a60e9f8 cmd/geth: add flag to set genesis (#32844)
This PR is an alternative to #32556.

Instead of trying to be smart and reuse `geth init`, we can introduce a
new flag `--genesis` that loads the `genesis.json` from file into the
`Genesis` object in the same path that the other network flags currently
work in.

Question: is something like `--genesis` enough to start deprecating
`geth init`?

--

```console
$ geth --datadir data --hoodi
..
INFO [10-06|22:37:11.202]  - BPO2:                        @1762955544
..
$ geth --datadir data --genesis genesis.json
..
INFO [10-06|22:37:27.988]  - BPO2:                       @1862955544
..
```

Pull the genesis [from the
specs](https://raw.githubusercontent.com/eth-clients/hoodi/refs/heads/main/metadata/genesis.json)
and modify one of the BPO timestamps to simulate a shadow fork.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-12-10 16:33:08 +00:00
..
abidump all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
abigen cmd/abigen, accounts/abi/bind: implement abigen version 2 (#31379) 2025-03-17 15:56:55 +01:00
blsync beacon/blsync: add checkpoint import/export file feature (#31469) 2025-04-03 16:04:11 +02:00
clef cmd/clef: update Safe API documentation links in changelog (#32136) 2025-07-09 14:09:11 -06:00
devp2p cmd/devp2p/internal/ethtest: accept responses in any order (#32834) 2025-10-08 19:23:44 +02:00
era cmd/era: fix iterator error source handling in checkAccumulator (#32698) 2025-09-22 14:27:54 -06:00
ethkey cmd: fix some typos in readmes (#29405) 2024-04-11 14:06:49 +03:00
evm fix some lint issues 2025-10-28 12:35:00 +08:00
geth cmd/geth: add flag to set genesis (#32844) 2025-12-10 16:33:08 +00:00
keeper go.mod, cmd/keeper/go.mod: upgrade victoria metrics dependency (#32720) 2025-09-30 12:50:20 +02:00
rlpdump build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
utils cmd/geth: add flag to set genesis (#32844) 2025-12-10 16:33:08 +00:00
workload cmd/workload: filter fuzzer test (#31613) 2025-10-13 19:21:01 +02:00