Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/powpeg validation protocol phase4 #2917

Conversation

julia-zack
Copy link
Contributor

@julia-zack julia-zack commented Jan 8, 2025

Implementation of the fourth -and last- phase of the PowPeg Spendability Protocol as specified in RSKIP419

Description

  • Define proposed-federation related CallTransaction.Function s in Bridge class.

  • Return active and retiring federations creation time in seconds instead of milliseconds.

  • Add methods to clear svp related values.

  • Use new java17 switch when registering a peg transaction.

  • Create method called from updateCollections to update svp state.

  • Refactor and renaming.

  • Set shuffleOutputs = false to fund transaction send request so the outputs are always put in the same order.

  • Change wrong amount being sent in spend tx.

  • Remove spent utxos after creating fund tx.

  • Create new SVP_FUND_TX and SVP_SPEND_TX in PegTxType enum.

  • Create new FederationContext class to have all the federations-related information.

  • Move some javadocs from BridgeSupport to FederationSupport.

  • Use the FederationChangeFunctions enum when executing vote federation change instead of using strings.

  • Use new java17 switch when executing a federation change function.

  • Increase federation validation period in testnet and regtest.

How Has This Been Tested?

  • Unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

apancorb and others added 30 commits January 8, 2025 12:40
…ate processValidationFailure method

Correct log

Correct test class name

Modify clearSvpValues to know and log which stage failed. Add tests for new behavior

Add fund tx signed hash log

Make events vbles static

Refactor clearSvpValues to make code more functional
…be called from support.

Assert any of svp values are present when clearing value. Add missing blank line

Make logging more accurate when clearing svp values in provider. Minor refactor for clearing svp values in support

Correct test
Minor refactors to avoid duplication code

Rewrite comment

Fix sonar complains

Handle exception when processing fund transaction. Add logs for when updating svp state

Add debug level log for when proposed fed does not exist

Not allow validation period end block to be part of validation ongoing period

Make updateSvpState private. Call it from updateCollections

Add missing import

Fix test
Copy link

github-actions bot commented Jan 8, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@julia-zack julia-zack marked this pull request as ready for review January 10, 2025 18:49
@julia-zack julia-zack requested a review from a team as a code owner January 10, 2025 18:49
@marcos-iov marcos-iov merged commit 8f3af1d into feature/powpeg_validation_protocol-integration Jan 10, 2025
9 checks passed
@marcos-iov marcos-iov deleted the feature/powpeg_validation_protocol-phase4 branch January 10, 2025 18:51
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