Skip to content

feat(event): governance action created#590

Merged
wolf31o2 merged 1 commit intomainfrom
feat/governance-action-created
Jan 26, 2026
Merged

feat(event): governance action created#590
wolf31o2 merged 1 commit intomainfrom
feat/governance-action-created

Conversation

@wolf31o2
Copy link
Copy Markdown
Member

@wolf31o2 wolf31o2 commented Jan 25, 2026

Closes #484


Summary by cubic

Adds full governance action extraction and serialization to ProposalProcedure events. Clients now receive detailed Conway governance data, including action specifics and parameter updates.

  • New Features
    • Added GovActionData and helpers to support Info, NoConfidence, HardForkInitiation, TreasuryWithdrawal, UpdateCommittee, NewConstitution, and ParameterChange actions.
    • Populates actionData in ProposalProcedureData via extractGovActionData, with hex/string encoding for IDs, hashes, and addresses.
    • Mapped ProtocolParameterUpdate fields, ExUnits, ExecutionCosts, and voting thresholds; added rationalToFloat for cbor.Rat.
    • Added unit tests for action extraction, GovActionId conversion, and rational conversions.

Written for commit 131c310. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Enhanced governance proposal handling with richer, typed representations for actions (treasury withdrawals, committee updates, new constitution, protocol parameter changes, hard-fork initiation, no-confidence, info).
    • Improved extraction and presentation of protocol parameters, execution costs, voting thresholds, and related numeric values for clearer proposal details.
  • Tests

    • Added unit tests validating governance action parsing and numeric conversions (including edge cases).

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@wolf31o2 wolf31o2 requested a review from a team as a code owner January 25, 2026 19:19
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

Adds a typed union for governance actions and numerous concrete action payload structs (Info, NoConfidence, HardForkInitiation, TreasuryWithdrawal, UpdateCommittee, NewConstitution, ParameterChange, and related nested types such as ProtocolParameterUpdateData, ExUnitsData, ExecutionCosts, and voting thresholds). Extends ProposalProcedureData with an ActionData field. Implements extractors to convert internal GovAction representations into the new public structs (including helpers for protocol parameter conversion and rational-to-float conversion). Adds unit tests covering GovAction extraction, GovActionId handling, and rational conversion.

Possibly related PRs

  • feat: governance event type #578: Modifies event/governance.go and the governance data model; introduces GovernanceEvent/ProposalProcedureData changes that are directly related to adding GovActionData and extraction logic.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding governance action data extraction and serialization to event handling.
Linked Issues check ✅ Passed Issue #484 title indicates this PR addresses governance action creation requirements; the implementation adds comprehensive governance action data extraction, serialization, and type definitions as expected.
Out of Scope Changes check ✅ Passed All changes are directly related to governance action data extraction: new types for action variants, extraction helpers, integration with ProposalProcedureData, and supporting tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@wolf31o2
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 25, 2026

✅ Actions performed

Full review triggered.

@wolf31o2
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 25, 2026

✅ Actions performed

Full review triggered.

@wolf31o2 wolf31o2 merged commit 3b17b2c into main Jan 26, 2026
11 checks passed
@wolf31o2 wolf31o2 deleted the feat/governance-action-created branch January 26, 2026 03:21
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.

Governance Action created

2 participants