go-ethereum/params
lightclient 13b157a461
core,params: add fork readiness indicator in logs (#31340)
closes #31310 

This has been requested a few times in the past and I think it is a nice
quality-of-life improvement for users. At a predetermined interval,
there will now be a "Fork ready" log when a future fork is scheduled,
but not yet active.

It can only possibly print after block import, which kinda avoids the
scenario where the client isn't progressing or is syncing and the user
thinks it's "ready" because it sees a ready log.

New output:

```console
INFO [03-08|21:32:57.472] Imported new potential chain segment     number=7 hash=aa24ee..f09e62 blocks=1 txs=0 mgas=0.000 elapsed="874.916µs" mgasps=0.000 snapdiffs=973.00B triediffs=7.05KiB triedirty=0.00B
INFO [03-08|21:32:57.473] Ready for fork activation                fork=Prague date="18 Mar 25 19:29 CET" remaining=237h57m0s timestamp=1,742,322,597
INFO [03-08|21:32:57.475] Chain head was updated                   number=7 hash=aa24ee..f09e62 root=19b0de..8d32f2 elapsed="129.125µs"
```

Easiest way to verify this behavior is to apply this patch and run `geth
--dev --dev.period=12`

```patch
diff --git a/params/config.go b/params/config.go
index 9c7719d901..030c4f80e7 100644
--- a/params/config.go
+++ b/params/config.go
@@ -174,7 +174,7 @@ var (
                ShanghaiTime:            newUint64(0),
                CancunTime:              newUint64(0),
                TerminalTotalDifficulty: big.NewInt(0),
-               PragueTime:              newUint64(0),
+               PragueTime:              newUint64(uint64(time.Now().Add(time.Hour * 300).Unix())),
                BlobScheduleConfig: &BlobScheduleConfig{
                        Cancun: DefaultCancunBlobConfig,
                        Prague: DefaultPragueBlobConfig,
```
2025-04-17 10:46:47 +02:00
..
forks core,params: add fork readiness indicator in logs (#31340) 2025-04-17 10:46:47 +02:00
bootnodes.go params: add hoodi testnet definition (#31406) 2025-03-18 12:07:49 +01:00
config.go core,params: add fork readiness indicator in logs (#31340) 2025-04-17 10:46:47 +02:00
config_test.go all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-10-20 14:41:51 +03:00
dao.go params: remove redundant consts, disable metro on AllProtocolChanges 2017-07-04 12:28:58 +03:00
denomination.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
network_params.go core/bloombits: remove old bloombits logic and chain indexer (#31081) 2025-03-21 10:47:58 +01:00
protocol_params.go params,core: add max and target value to chain config (#31002) 2025-02-04 15:43:18 +01:00
verkle_params.go cmd, core, params, trie: add verkle access witness gas charging (#29338) 2024-05-10 20:13:11 +02:00