feat: FLY-2250 two-step provider registration with admin approval#945
Open
volodymyrzahanych wants to merge 2 commits intov2.6.0from
Open
feat: FLY-2250 two-step provider registration with admin approval#945volodymyrzahanych wants to merge 2 commits intov2.6.0from
volodymyrzahanych wants to merge 2 commits intov2.6.0from
Conversation
LPS now adapts to the two-step registration flow introduced in LBC FLY-2245.
After submitting a registration request, the server waits indefinitely for an
admin to approve or reject via the discovery contract before starting operations.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
Security requirement — only admin-approved LPs can be listed in the discovery contract, preventing unauthorized providers from appearing in the registry.
Type of Change
Affected part of the project
Related Issues
Jira ticket
How to test
Unit Tests
Run the two packages that contain all registration-related tests:
Key tests to pay attention to:
TestRegistrationUseCase_Run_Pending_ThenApprovedTestRegistrationUseCase_Run_Pending_ThenRejectedTestRegistrationUseCase_Run_ApprovedOrPending_NoPauseCheckTestDiscoveryContractImpl_GetRegistrationStateLocal Compose Environment
Prerequisites: LBC repo at
~/liquidity-bridge-contract(or setLBC_REPO_PATH), Docker running.Happy path — approve registration:
cd docker-compose/local LBC_BRANCH=refactor/FLY-2245 bash lps-env.shExpected: LPS submits registration → script detects Pending state → restarts
lps01→ approves → LPS comes up healthy athttp://localhost:8080/health.Rejection path:
cd docker-compose/local LBC_BRANCH=refactor/FLY-2245 LBC_REGISTRATION_DECISION=reject bash lps-env.shExpected: LPS submits registration → script calls
rejectRegistration→ LPS logs"Registration rejected by admin..."and exits withlog.Fatal. Container stops.Fast poll interval for debugging:
Verify pending-state restart manually:
Reviewer Guidelines
This functionality is connected to LBC refactor/FLY-2245
Screenshots (if applicable)
Add screenshots or GIFs to help explain your changes.
Additional Notes
Add any other context about the pull request here.