Skip to content

makecache command

Source (upstream pre-purge) Current
File cmd/geth/misccmd.go misccmd_pow.go
Symbol makecache makecache
Ref dde2da0ef~1 etc/v1.17.3-full-node

Generates ethash verification cache to disk for testing. Moved to misccmd_pow.go to keep misccmd.go identical to upstream. Adapted from pre-purge3 with --epoch.length flag from core-geth (ECIP-1099 support).

3-way merge — purge → getc ← upstream

pre-purgecore-geth
// makecache generates an ethash verification cache into the provided folder.
func makecache(ctx *cli.Context) error {
args := ctx.Args().Slice()
if len(args) != 2 {
utils.Fatalf(`Usage: geth makecache <block number> <outputdir>`)
}
block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil {
utils.Fatalf("Invalid block number: %v", err)
}
epochLength := ctx.Uint64(utils.EthashEpochLengthFlag.Name)
ethash.MakeCache(block, epochLength, args[1])
return nil
}
core-geth validation — **Identical** ✅ | | | |---|---| | File | [`misccmd.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/cmd/geth/misccmd.go) | | Symbol | `makecache` | | Ref | `v1.12.20` |

← CLI, Config & Genesis