Skip to content

execution/protocol/rules: remove obsolete clique PoA engine#20532

Merged
yperbasis merged 8 commits into
mainfrom
yperbasis/rm_clique
Apr 14, 2026
Merged

execution/protocol/rules: remove obsolete clique PoA engine#20532
yperbasis merged 8 commits into
mainfrom
yperbasis/rm_clique

Conversation

@yperbasis

Copy link
Copy Markdown
Member

Summary

  • Remove the entire execution/protocol/rules/clique package (~2,350 lines) — Clique PoA is no longer used by any supported network
  • Remove CliqueConfig struct, CliqueRules constant, clique DB tables, CLI flags, RPC API registration, and all engine instantiation paths
  • Move SealHash/encodeSigHeader into the aura package (only remaining consumer)
  • Simplify DeveloperGenesisBlock to produce a non-clique genesis directly

Test plan

  • make erigon — builds successfully
  • make integration — builds successfully
  • make lint — passes clean (multiple runs)
  • CI unit tests
  • CI all tests

🤖 Generated with Claude Code

Clique proof-of-authority is no longer used by any supported network.
Remove the entire execution/protocol/rules/clique package and all
references: config structs, CLI flags, DB tables, RPC API registration,
and engine instantiation paths. Move SealHash/encodeSigHeader into the
aura package (the only remaining consumer). Simplify DeveloperGenesisBlock
to produce a non-clique genesis directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yperbasis yperbasis linked an issue Apr 13, 2026 that may be closed by this pull request
Remove clique CLI flags, RPC methods, and evm seal options from docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated Clique PoA consensus engine and all associated configuration, RPC, CLI flags, DB tables, and documentation, leaving AuRa/Ethash/Bor as the supported consensus paths.

Changes:

  • Deleted the execution/protocol/rules/clique package and removed all instantiation paths, configs, and DB tables tied to Clique.
  • Removed Clique-related CLI flags, RPC namespace registration, and documentation references.
  • Moved the Clique-style SealHash/signature-header encoding logic into the AuRa package (the remaining consumer).

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rpc/jsonrpc/daemon.go Drops the clique RPC namespace registration.
node/rulesconfig/config.go Removes Clique engine creation and related DB path logic.
node/ethconfig/gen_config.go Removes TOML (un)marshalling for Clique config.
node/ethconfig/config.go Removes the Clique config field from node eth config.
node/eth/backend.go Removes Clique-based rules config selection during backend init.
node/cli/default_flags.go Removes Clique snapshot/datadir flags from default CLI flags.
execution/types/accounts/account.go Removes Clique-specific mimetype constant.
execution/tracing/tracers/js/tracer_test.go Updates chain config literals to no longer reference Clique.
execution/tests/blockgen/chain_makers.go Updates comments that referenced Clique-only testing.
execution/protocol/rules/merge/merge.go Updates comment to no longer mention Clique as an eth1 engine.
execution/protocol/rules/clique/verifier.go Deletes Clique verifier implementation.
execution/protocol/rules/clique/snapshot_test.go Deletes Clique snapshot/voting tests.
execution/protocol/rules/clique/snapshot.go Deletes Clique snapshot/voting logic.
execution/protocol/rules/clique/keys.go Deletes Clique snapshot key helpers.
execution/protocol/rules/clique/clique_test.go Deletes Clique regression test(s).
execution/protocol/rules/clique/clique.go Deletes Clique engine implementation and helpers (incl. RPC API).
execution/protocol/rules/clique/api.go Deletes Clique RPC API implementation.
execution/protocol/rules/aura/aura.go Internalizes SealHash/signature-header encoding previously sourced from Clique.
execution/chain/spec/genesis.go Simplifies Developer genesis creation to be non-Clique.
execution/chain/spec/clique.go Removes Clique chainspec config and snapshot config type.
execution/chain/rules.go Removes CliqueRules constant.
execution/chain/chain_config.go Removes CliqueConfig and Config.Clique fields; updates consensus comment.
execution/builder/finish.go Removes Clique-specific nonce handling branch (now obsolete).
docs/gitbook/src/fundamentals/configuring-erigon/README.md Removes documentation for Clique-related CLI flags.
docs/DEV_CHAIN.md Updates dev-chain docs to reflect removal of Clique-based dev mode flags.
db/kv/tables.go Removes Clique DB tables and simplifies ConsensusTables.
db/config3/config3.go Removes Clique mention from FullImmutabilityThreshold comment.
cmd/utils/flags.go Removes Clique CLI flags/config wiring; updates dev genesis creation.
cmd/rpcdaemon/cli/config.go Removes Clique remote-engine special casing (now obsolete).
cmd/rpcdaemon/README.md Removes Clique RPC namespace/methods from RPC daemon docs.
cmd/integration/commands/stages.go Removes migration support for legacy Clique consensus DB path.
cmd/evm/README.md Removes docs for Clique sealing support in evm tool.
Comments suppressed due to low confidence (1)

rpc/jsonrpc/daemon.go:195

  • cfg.API entries that aren’t handled by this switch are silently ignored. Now that the clique namespace has been removed, users can still pass --http.api=...,clique (or have it in existing configs) and get no feedback. Consider adding a default case to warn/error on unknown API namespaces (at least for removed ones like clique) to avoid silent misconfiguration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread execution/chain/chain_config.go Outdated
Comment thread docs/DEV_CHAIN.md Outdated
Comment thread execution/chain/spec/genesis.go Outdated
yperbasis and others added 2 commits April 13, 2026 20:11
Remove empty else block in migration code and drop clique config
from test fixture JSON.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread execution/chain/chain_config.go
Comment thread cmd/utils/flags.go
Comment thread cmd/utils/flags.go
Comment thread execution/chain/spec/genesis.go
yperbasis and others added 2 commits April 14, 2026 12:52
# Conflicts:
#	execution/protocol/rules/clique/keys.go
- Add RulesName.Validate() to reject unsupported consensus engine names
  (e.g. "clique") at genesis load time instead of silently falling back
  to ethash.
- Remove the no-op --dev.period CLI flag.
- Fund the derived dev signer address in the genesis alloc.
- Set Rules: EtHashRules in DeveloperGenesisBlock for consistency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yperbasis yperbasis requested a review from domiwei as a code owner April 14, 2026 11:09
@yperbasis yperbasis enabled auto-merge April 14, 2026 11:17
@yperbasis yperbasis added this pull request to the merge queue Apr 14, 2026
@yperbasis yperbasis changed the title consensus: remove obsolete clique PoA engine execution/protocol/rules: remove obsolete clique PoA engine Apr 14, 2026
Merged via the queue into main with commit f3ca54f Apr 14, 2026
36 checks passed
@yperbasis yperbasis deleted the yperbasis/rm_clique branch April 14, 2026 13:45
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.

Remove Clique

3 participants