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

Update onProposedFederationChange in order to register SVP spend tx in the Bridge #365

Merged

Conversation

apancorb
Copy link
Contributor

@apancorb apancorb commented Dec 6, 2024

Description

With this approach we add the proposedFederation to the list of watched federations that the BitcoinWrapper listens to. Since the svp spend tx will be considered as a peg-out from the perspective of the BitcoinWrapper federation listener it will allow it to be registered with no problem.

Motivation and Context

https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP419.md

How Has This Been Tested?

This was tested in Regtest, and complete the SVP protocol:

2024-12-11-11:49:16.930 INFO [c.r.p.BridgeSupport] [registerSvpSpendTx] Going to commit the proposed federation.

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 apancorb self-assigned this Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@marcos-iov marcos-iov force-pushed the feat/powpeg_validation_protocol-phase4 branch from 5244d90 to 931420f Compare December 9, 2024 19:49
@apancorb apancorb force-pushed the feat/allow_svp_spend_tx branch from 111ea90 to 57bb818 Compare December 11, 2024 10:03
@apancorb apancorb force-pushed the feat/allow_svp_spend_tx branch from 487f63b to e76a824 Compare December 11, 2024 12:03
Comment on lines +59 to +61
// add proposed federation to active btc to rsk client so
// it can register svp spend tx in the bridge
bitcoinWrapper.addFederationListener(newProposedFederation, btcToRskClientActive);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main and only change of the PR, the rest are small refactors

Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this done already in btcReleaseClient.start?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope

@apancorb apancorb changed the title Refactor coinsReceivedOrSent to account for SVP spend tx Add proposed federation to BitcoinWrapper listener in order to register SVP spend tx in the Bridge Dec 11, 2024
@apancorb apancorb changed the title Add proposed federation to BitcoinWrapper listener in order to register SVP spend tx in the Bridge Update onProposedFederationChange in order to register SVP spend tx in the Bridge Dec 11, 2024
@apancorb apancorb marked this pull request as ready for review December 11, 2024 12:10
@apancorb apancorb requested a review from a team as a code owner December 11, 2024 12:10
@marcos-iov marcos-iov merged commit 815a509 into feat/powpeg_validation_protocol-phase4 Dec 12, 2024
9 checks passed
@marcos-iov marcos-iov deleted the feat/allow_svp_spend_tx branch December 12, 2024 20:34
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