Skip to content

Remove unused polygon sync flags - #16035

Merged
taratorio merged 6 commits into
mainfrom
remove_polygon_sync_flag
Jul 14, 2025
Merged

taratorio merged 6 commits into
mainfrom
remove_polygon_sync_flag

Conversation

@mh0lt

@mh0lt mh0lt commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

These flags are redundant

--bor.milestone
--bor.waypoints
--polygon.sync

Their removal will cause a break for any command line with them set, but the fix is just to remove the flag.
This is safe as these flags are no longer used in the codebase.

rootCmd.PersistentFlags().BoolVar(&cfg.GraphQLEnabled, "graphql", false, "enables graphql endpoint (disabled by default)")
rootCmd.PersistentFlags().Uint64Var(&cfg.Gascap, "rpc.gascap", 50_000_000, "Sets a cap on gas that can be used in eth_call/estimateGas")
rootCmd.PersistentFlags().Uint64Var(&cfg.MaxTraces, "trace.maxtraces", 200, "Sets a limit on traces that can be returned in trace_filter")
rootCmd.PersistentFlags().BoolVar(&polygonSync, "polygon.sync", true, "Enable if Erigon has been synced using the new polygon sync component")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mh0lt need to remove the polygonSync var too - otherwise it will be left as false and that will cause a regression (all rpcs will switch back to the old mode) - would suggest to get rid of the polygonSync checks in the rpcs too

@taratorio
taratorio enabled auto-merge (squash) July 14, 2025 09:25
@taratorio
taratorio merged commit dded863 into main Jul 14, 2025
@taratorio
taratorio deleted the remove_polygon_sync_flag branch July 14, 2025 18:32
bloxster pushed a commit that referenced this pull request Jul 28, 2026
The 3.5 series removed several flag families that the docs never absorbed, so
release/3.5 (the deployed branch) still tells users to pass flags that no
longer parse.

* --p2p.allowed-ports (8 occurrences / 4 files). Removed by #21335
  "p2p/sentry: share one p2p.Server across all eth protocols" (in 3.5, not
  3.4): all eth protocol versions now share a single p2p.Server, so one
  listening port set via --port is sufficient. The migrating-from-geth
  examples are updated accordingly. This also fixes a latent casing bug in
  that page, which wrote --P2P.allowed-ports; Go flags are case-sensitive.

* --clique.checkpoint / .snapshots / .signatures / .datadir. Clique is gone
  from the tree entirely — no clique package remains.

* --diagnostics.endpoint.port and the --diagnostics.* lines in the
  downloader / sentry / txpool / rpc-daemon --help blocks. Removed by #21351
  "cmd/diag, go.mod: remove diag CLI". The "Diagnostics" section of
  default-ports.md documented only this flag and is dropped with it.

* --polygon.sync in the rpc-daemon --help block. Removed by #16035
  "Remove unused polygon sync flags"; the polygon flags that remain are
  polygon.pos.ssf, polygon.pos.ssf.block and polygon.wit-protocol.

* --rpc.maxgetproofrewindblockcount.limit in the same block.
  MaxGetProofRewindBlockCount survives as an internal config field
  (http_cfg.go, default 100_000) but has no CLI registration, so it is not
  settable and must not be documented as a flag.

Verified per family: no Go string literal and no corresponding identifier on
release/3.5, release/3.6 or main, and present through release/3.4 where
applicable.

Also in this change:

* --beacon.api.ide.timeout -> --beacon.api.idle.timeout in caplin.md. The
  table carried the note "flag name is `ide` not `idle` — typo in source".
  That was accurate for v3.4, where flags.go really did define
  "beacon.api.ide.timeout", but #20289 "cmd: fix typo in flag
  beacon.api.ide.timeout" corrected the source for 3.5 and the note was left
  behind. Every live branch now defines only beacon.api.idle.timeout, so the
  flag name is corrected and the note removed. Default (25s) is unchanged and
  matches Value: 25.

* Fix a 404: the Ethereum on ARM GitHub link pointed at
  diglos/ethereum-on-arm; the project is at diglos/ethereumonarm.

* Type two bare code fences (architecture.md, database.md) per the docs
  style rule, so Prism highlights them.

The --help paste blocks had only their obsolete lines removed rather than
being regenerated wholesale; regenerating them from freshly built
downloader/sentry/txpool/rpcdaemon binaries is worth doing as a follow-up.

Pre-push gate: npm ci && npm run build green (onBrokenLinks/onBrokenAnchors
throw), generate-llms.py --check OK (74 pages), render-disk-sizes.py --check
OK, editorial-artifact scan clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lupin012 pushed a commit to cshintov/erigon that referenced this pull request Jul 30, 2026
… flag, disk sizes (erigontech#22799)

The `main` side of this week's documentation maintenance (w31). Carries
the same stale-flag cleanup as erigontech#22793 (`release/3.5`) and erigontech#22798
(`release/3.6`) under the dual-commit rule, plus three findings that
apply only to `main`.

## 1. Flags removed from the code but still documented

Identical to erigontech#22793 — see that PR for the per-family provenance:

* `--p2p.allowed-ports` — 8 occurrences / 4 files, removed by erigontech#21335
*"share one p2p.Server across all eth protocols"*; a single `--port` now
suffices. Also fixes the `--P2P.allowed-ports` casing bug.
* `--clique.checkpoint` / `.snapshots` / `.signatures` / `.datadir` —
clique is gone from the tree.
* `--diagnostics.*` — last present on `release/3.3`, already absent from
`release/3.4`.
* `--polygon.sync` — removed by erigontech#16035.
* `--rpc.maxgetproofrewindblockcount.limit` — an internal config field
with no CLI registration.

## 2. Wrong information corrected

Also identical to erigontech#22793: Beacon API timeouts are bare integer seconds
(`25`, not `25s` — they are `cli.Uint64Flag`, so `25s` does not parse);
the pre-erigontech#21335 two-listener port model removed from `default-ports.md`
and `multiple-instances.md`; `--p2p.protocol` default is `69, 70, 71`;
`--maxpeers` default is 64; the Ethereum on ARM link now points at the
canonical `EOA-Blockchain-Labs/ethereumonarm`; one unmatched
parenthesis.

## 3. `--db.read.concurrency` semantics — `main` only

erigontech#22408 *"node, commitment: fix parallel exec deadlock on many-core
machines"* rewrote this flag's behaviour, and three pages said the
opposite of what the code does.

Each parallel-execution worker holds a long-lived read transaction, so a
ceiling below the worker count would deadlock. The value is silently
**raised** to the worker count, and lowering the flag does not reduce
read concurrency at all — `--exec.workers` is the knob for that. The
docs advised the reverse: *"Low values are fine for low read-concurrency
nodes (for example, validators)"*.

Verified against source rather than the commit message: the clamp is
`cmd/utils/flags.go:2041` (`RoTxsLimit(c, cfg.ExecWorkerCount)`), and
the existing *"HTTP/WebSocket fail fast with an overload response"*
wording is **still accurate** (`rpc/http.go:241`, `httpOverloadedKey` /
`kv.ErrReadTxLimitExceeded`), so it is kept rather than dropped along
with the rest.

Does not apply to `release/3.5` or `release/3.6`, which predate erigontech#22408.

## 4. `--witness.cache.blocks` — new today

erigontech#22384 *"rpc/jsonrpc: eager in-memory cache for
`debug_executionWitness`"* registered `utils.WitnessCacheBlocksFlag`
earlier today, leaving the CLI reference one flag behind. It trades
memory for `debug_executionWitness` latency, so it is operator-facing
and in scope per the flag-coverage rule.

Documented from the source `Value`/`Usage`: default `0` (disabled),
clamped at `96`, embedded RPC only, requires commitment history. The
source `Usage` names the
`--prune.experimental.include-commitment-history` alias; the docs use
the canonical `--prune.include-commitment-history`.

## 5. Disk sizes

`disk-sizes.json` is brought in line with `release/3.5` (mainnet and
gnosis, all three modes, measured 2026-07-19 / 2026-07-21) and the
static markers in `hardware-requirements.mdx` re-rendered with
`render-disk-sizes.py`, so the live branches carry one consistent set of
numbers.

## Verification

* `npm ci && npm run build` — green (`onBrokenLinks` and
`onBrokenAnchors` both `throw`)
* `generate-llms.py --check` — OK, 4 files, 74 pages
* `render-disk-sizes.py --check` — OK
* Step-4c bidirectional sweep — **233 registered, 10 undocumented**,
i.e. the intentionally-undocumented internal/dev baseline, with no stale
flags remaining
* No `allowed-ports` / `diagnostics.` / `clique.` / `beacon.api.ide` /
`polygon.sync` / `maxgetproofrewind` / `eth/68` references left in
`docs/site/docs`

---------

Co-authored-by: Bloxster <gianni.morselli@erigon.tech>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
@awskii awskii mentioned this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants