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

Make settle release request more robust #2923

Open
wants to merge 237 commits into
base: master
Choose a base branch
from

Conversation

julia-zack
Copy link
Contributor

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

The available UTXOs and the requested amount in a request were being passing around some methods.

To avoid this, three different methods were created to settle the release of: pegout, migration, svp fund tx, since both utxos and requested amount are different for each release type.

julia-zack and others added 30 commits January 8, 2025 12:30
Add key to storage index

Remove declaration of svp fund tx hash since it is not being used yet. Remove _KEY suffix
Remove _KEY suffix. Save proposed federation the same way as pending one
Add proposedFederationIsSet logic

Getting rid of proposedFederationIsSet logic.

Add isProposedFederationSet logic.

Add rskip419 check in saveProposedFederation method

Save null version when proposed federation is null

Remove unnecessary private method

Refactor

Removes null activations from tests
Make variable final

Improve test name

Use all activations instead of lovell

Improve null handling
Add get proposed federation tests

Minor fix after rebase

Improve comment

Minor refactor

Minor refactor

Improve comment

Add test case

Throw exception when there is no storage version for non-null proposed federation

Add test cases

Add log. Add test case and refactor

Remove unused import
…sh methods and tests

Rebases

Reorders and renames tests
Rebases

Appends SVP prefix to FUND_TX_HASH_UNSIGNED and refactors tests
Rebases

Moves repeated arrange code to setup. Using Optional.
Rebases

Removes _ from the key

Using arrowhead631
Rebases

Rebases

Renames saveFundTransactionUnsignedHash to saveSvpFundTransactionUnsignedHash

Renames FundTransactionUnsignedHash instance fields
Remove unnecessary private method

Refactor
Add get proposed federation tests

Minor fix after rebase

Improve comment

Minor refactor

Add test case
…d federation

Add test cases

Add log. Add test case and refactor

Remove unused import
…sh methods and tests

Rebases

Moves repeated arrange code to setup. Using Optional.
Rebases
Adds test to assert empty is returned when hash hasn't been set or saved

Renames svp fields to match the RSKIP419 description. Adds more tests. Using standard.

Renames test
Improve variable name

Add comment

Minor refactors

Improve comments. Minor refactors

Improve comments

Refactor

Add tests for commitFederationAccordingToActivations

Remove unnecessary semicolon

Refactor to improve testing and readability

Add test cases

Remove some tests. Make bridge event logger not a mock. Make some methods private instead of protected. Fix log message

Improve test name

Change test name

Move reused method to utility class. Use real block instead of a mock

Make methods to be private instead of protected
Fix sonar complains

Add missing import

Move method to test class

Remove unused imports
… to bridge storage provider

Remove svp fund tx tests from federation storage provider tests, and adds them to bridge storage provider tests

Get rid of sonar complains

Add get methods to bridge

Put save, set and get tests in same nested class
Add tests. Add missing tests for minimum pegout tx value

Modify test
Refactor and add test case

Add test case

Remove mistaken comment

Add comment

Modify comment
Huge refactor to get rid of duplicated code

Minor refactor

Minor refactors

Renaming, refactors. Add missing test case.

Minor fix

Reorder, refactor

Fix typo, refactor

Rename

Create private method to get rid of duplicated code

Get rid of sonar complains
Rename already declared federator keys field.
Rename variables to match regular expressions
Minor renaming
@julia-zack julia-zack force-pushed the make_settleReleaseRequest_more_robust branch from d421692 to 9fcb0fa Compare January 9, 2025 20:34
@julia-zack julia-zack force-pushed the make_settleReleaseRequest_more_robust branch from f883092 to 44b47b5 Compare January 9, 2025 20:53
Remove assert methods that do not return void
Base automatically changed from refactor_svp_tests to feature/powpeg_validation_protocol-phase4 January 10, 2025 14:32
@julia-zack julia-zack force-pushed the make_settleReleaseRequest_more_robust branch from 44b47b5 to c4cfe2d Compare January 10, 2025 15:32
@julia-zack julia-zack marked this pull request as ready for review January 10, 2025 15:32
@julia-zack julia-zack requested a review from a team as a code owner January 10, 2025 15:32
apancorb
apancorb previously approved these changes Jan 10, 2025
Copy link
Contributor

@apancorb apancorb left a comment

Choose a reason for hiding this comment

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

Nice refactor :)

…ocol-phase4

Feature/powpeg validation protocol phase4
Base automatically changed from feature/powpeg_validation_protocol-phase4 to feature/powpeg_validation_protocol-integration January 10, 2025 18:51
@julia-zack julia-zack force-pushed the make_settleReleaseRequest_more_robust branch from 919e01b to cfffcbb Compare January 13, 2025 19:21
@julia-zack julia-zack force-pushed the make_settleReleaseRequest_more_robust branch from cfffcbb to 8f7889f Compare January 13, 2025 19:38
@marcos-iov marcos-iov force-pushed the feature/powpeg_validation_protocol-integration branch from 09ff25b to 2545809 Compare January 15, 2025 15:02
Base automatically changed from feature/powpeg_validation_protocol-integration to master January 24, 2025 18:45
@marcos-iov marcos-iov dismissed apancorb’s stale review January 24, 2025 18:45

The base branch was changed.

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.

4 participants