Skip to content

Conversation

@s-h-ubham
Copy link
Contributor

This PR introduces a robust slashing module to the PolyBFT consensus engine. The new module detects validators who double-sign blocks and initiates slashing by creating and submitting system transactions to the slashing contract.

@s-h-ubham s-h-ubham requested a review from R-Santev July 23, 2025 09:19
Copy link
Collaborator

@R-Santev R-Santev Oct 24, 2025

Choose a reason for hiding this comment

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

We don't support the IBFT consensus, so no need to make updates there

// initDoubleSigningTracker initializes double signing tracker
//
// (which is used for creating slashing evidence).
func (c *consensusRuntime) initDoubleSigningTracker(logger hcf.Logger, store *StakeStore) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This method is unused

Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the repo standards, new contracts should be added to the core-contracts repository, which is included here as a submodule. After that, use artifacts-gen to generate and import the artifacts for use in this repository.

HydraStakingContractV1 = types.StringToAddress("0x1041")
// DefaultBurnContract is an address of eip1559 default proxy contract
DefaultBurnContract = types.StringToAddress("0x105")
DefaultBurnContract = types.StringToAddress("0x106")
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can't update the existing contracts' addresses as these contracts are already deployed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this somehow useful?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this file didn’t exist previously, I’m not sure how it contributes to backward compatibility.

}

// GetPendingSlashProofs retrieves executable slashing exit event proofs
func (c *consensusRuntime) GetPendingSlashProofs() ([]types.Proof, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is unused?

@ocenasolutions
Copy link

Hello Team!

Technical Partnership Proposal

Hydra Chain - Slashing Module Development Support


Executive Summary

Our engineering team has been actively monitoring the Hydra-Chain/hydragon-node repository for the past 2-3 months. We've identified an opportunity to accelerate the development of critical infrastructure, specifically the Slashing Module (PR #122), which has been in review status with requested changes.


Our Observation

Repository Analysis

Metric Status
Open Pull Requests 13 PRs pending
PR #122 Status Open with requested changes
Feature Criticality High (Validator Security)
Lines Changed +3,109 / -273 across 34 files

Key Finding

The Slashing Module PR has been open with reviewer feedback requiring significant architectural changes:

  • Smart contract integration needs alignment with core-contracts submodule standards
  • Unused methods flagged for cleanup (initDoubleSigningTracker, GetPendingSlashProofs)
  • IBFT consensus modifications marked as unnecessary
  • Contract deployment strategy needs revision for production compatibility

What We Bring to the Table

Deep Codebase Familiarity

Our developers have:

  • Studied the PolyBFT consensus engine architecture
  • Analyzed the validator staking mechanisms
  • Reviewed the smart contract deployment patterns
  • Understood the system transaction infrastructure

Immediate Value

We can help complete the Slashing Module by:

  1. Refactoring smart contracts to follow core-contracts submodule standards
  2. Removing unnecessary IBFT consensus modifications
  3. Cleaning up unused methods and dead code
  4. Implementing proper contract address management for post-deployment compatibility
  5. Writing comprehensive test coverage

Proposed Engagement

Phase 1: PR #122 Completion (Slashing Module)

  • Address all reviewer feedback from @R-Santev
  • Refactor contract architecture
  • Implement double-signing detection properly
  • Deliver production-ready slashing infrastructure

Phase 2: Ongoing Development Support

  • Tackle remaining 12 open PRs
  • Provide continuous development bandwidth
  • Maintain code quality and security standards

Why Partner With Us?

Advantage Description
Zero Ramp-Up Time Already familiar with your codebase
Blockchain Expertise Experienced with PoS/PolyBFT consensus mechanisms
Immediate Availability Ready to start contributing now
Quality Focus Committed to following your established patterns

Technical Credentials

Our team has experience with:

  • Go/Golang - Primary language of hydragon-node
  • Solidity - Smart contract development
  • Consensus Protocols - BFT variants, validator management
  • Blockchain Infrastructure - Node operations, system transactions

Next Steps

  1. Introductory Call - Discuss your roadmap and priorities
  2. Technical Deep Dive - Review PR Feature/slashing #122 requirements together
  3. Trial Contribution - Demonstrate our capabilities on a scoped task
  4. Partnership Agreement - Formalize ongoing collaboration

Contact

We're ready to help accelerate Hydra Chain's development. Let's discuss how we can support your team in shipping the Slashing Module and beyond.

www.ocena.in
Business@ocena.in

Let's build together.


This proposal is based on our independent analysis of the public hydragon-node repository. We respect your team's architectural decisions and aim to complement your existing development efforts.

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.

5 participants