Skip to content

fix: detect consensus type by EIP-165 instead of probing a quorum method - #817

Open
mpolitzer wants to merge 1 commit into
mainfrom
fix/node-5
Open

mpolitzer wants to merge 1 commit into
mainfrom
fix/node-5

Conversation

@mpolitzer

Copy link
Copy Markdown
Member

In addition --prt flag now asserts the consensus is PRT.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the shared consensus detector and related CLI behavior changes.

No open issues 🎉

What changed in this PR

This PR centralizes EIP-165 consensus detection for the CLI, replacing quorum-method probing in application registration and deployment while sharing the detector with contract inspection.

Changes:

  • Adds shared consensus classification, model mapping, and Quorum validator checks.
  • Makes registration’s --prt flag assert the detected type and rejects PRT addresses in deployment’s --consensus path.
  • Updates tests and documents the CLI behavior changes.
File Description
pkg/​ethutil/​detect_consensus.go Adds shared EIP-165 detection and Quorum validation.
pkg/​ethutil/​detect_consensus_test.go Tests classification, probe failures, mappings, and validator checks.
cmd/​cartesi-rollups-cli/​root/​deploy/​broadcast_test.go Adds interface-probe responses to the deployment test backend.
cmd/​cartesi-rollups-cli/​root/​deploy/​application.go Uses shared detection and rejects custom PRT consensus addresses.
cmd/​cartesi-rollups-cli/​root/​deploy/​application_test.go Tests probe errors and rejected consensus types.
cmd/​cartesi-rollups-cli/​root/​contract/​contract.go Delegates inspection detection to the shared helper, preserving call options.
cmd/​cartesi-rollups-cli/​root/​contract/​contract_test.go Removes tests relocated to the shared detector package.
cmd/​cartesi-rollups-cli/​root/​app/​register/​register.go Detects consensus before parameter reads and treats --prt as an assertion.
cmd/​cartesi-rollups-cli/​root/​app/​register/​register_test.go Replaces quorum-probe tests with PRT assertion tests.
CHANGELOG.md Documents detection and flag behavior changes.

Review effort: Balanced

@mpolitzer
mpolitzer marked this pull request as ready for review November 13, 2026 17:11
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.

2 participants