-
Notifications
You must be signed in to change notification settings - Fork 217
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 createMigrationPlan
accept a list of addresses
#2637
Merged
iohk-bors
merged 5 commits into
master
from
jonathanknowles/multi-asset-migration-api-tweaks
May 3, 2021
Merged
Make createMigrationPlan
accept a list of addresses
#2637
iohk-bors
merged 5 commits into
master
from
jonathanknowles/multi-asset-migration-api-tweaks
May 3, 2021
Conversation
This file contains 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
The migration planning endpoint will need to accept some data: the set of addresses to which the wallet balance should be migrated. Without a set of addresses, it's impossible to construct the coin selections required for a migration plan, as every coin selection output must have an address: these can only be provided by the caller. However, the "migrateByronWallet" and "migrateShelleyWallet" operations at the "migrations" endpoint already accept POST data. We need a way to discriminate between the following operations: 1. Creating a plan. 2. Creating a plan and executing it immediately. Assuming both types of operation require data to be POSTed, this means we need different endpoint paths.
This family of API operations will eventually change from HTTP GET to HTTP POST, as each operation requires a list of addresses to be sent within the request body. Therefore, it no longer makes sense to use the `get` prefix. Additionally, since the result returned is an entire migration plan and not just a few pieces of information, we might as well change the "Info" suffix to a "Plan" suffix. (This naming is consistent with the already-established concept of creating a migration plan.)
This change adjusts each of the following API operations to require a non-empty list of addresses as an HTTP POST request body parameter: - `createByronWalletMigrationPlan` - `createShelleyWalletMigrationPlan`
jonathanknowles
changed the title
Adjust
Adjust May 3, 2021
createMigrationPlan
operations to accept a list of addressescreateMigrationPlan
to accept a list of addresses
jonathanknowles
changed the title
Adjust
Make May 3, 2021
createMigrationPlan
to accept a list of addressescreateMigrationPlan
accept a list of addresses
Anviking
approved these changes
May 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
May 3, 2021
2637: Make `createMigrationPlan` accept a list of addresses r=jonathanknowles a=jonathanknowles # Issue Number ADP-840 # Overview This PR adjusts the following API operations to accept a non-empty list of addresses: - `createByronWalletMigrationPlan` - `createShelleyWalletMigrationPlan` These operations need addresses in order to construct the coin selections required for a migration plan, as every coin selection output must have an address, and these can only be provided by the caller. If the caller supplies **_n_** addresses, but the migration planner needs to create **_m_** outputs where **_m_** > **_n_**, then the server implementations of the above endpoints will reuse the given addresses in a cyclic fashion. (This was already the case in the old migration implementation.) Co-authored-by: Jonathan Knowles <[email protected]>
Build failed: Log extract:
|
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
May 3, 2021
2637: Make `createMigrationPlan` accept a list of addresses r=jonathanknowles a=jonathanknowles # Issue Number ADP-840 # Overview This PR adjusts the following API operations to accept a non-empty list of addresses: - `createByronWalletMigrationPlan` - `createShelleyWalletMigrationPlan` These operations need addresses in order to construct the coin selections required for a migration plan, as every coin selection output must have an address, and these can only be provided by the caller. If the caller supplies **_n_** addresses, but the migration planner needs to create **_m_** outputs where **_m_** > **_n_**, then the server implementations of the above endpoints will reuse the given addresses in a cyclic fashion. (This was already the case in the old migration implementation.) Co-authored-by: Jonathan Knowles <[email protected]>
Build failed: Timed out here:
Looks very much like: |
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
May 3, 2021
2637: Make `createMigrationPlan` accept a list of addresses r=jonathanknowles a=jonathanknowles # Issue Number ADP-840 # Overview This PR adjusts the following API operations to accept a non-empty list of addresses: - `createByronWalletMigrationPlan` - `createShelleyWalletMigrationPlan` These operations need addresses in order to construct the coin selections required for a migration plan, as every coin selection output must have an address, and these can only be provided by the caller. If the caller supplies **_n_** addresses, but the migration planner needs to create **_m_** outputs where **_m_** > **_n_**, then the server implementations of the above endpoints will reuse the given addresses in a cyclic fashion. (This was already the case in the old migration implementation.) Co-authored-by: Jonathan Knowles <[email protected]>
Build failed: |
bors r+ |
Build succeeded: |
1 task
iohk-bors bot
added a commit
that referenced
this pull request
May 6, 2021
2638: Update e2e tests with migration plan endpoint r=rvl a=piotr-iohk # Issue Number ADP-840 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] Updated e2e tests to comply with changes from #2637 # Comments In #2637 migration cost ep was removed in favor of migrations/plan. Updating tests to comply with this change. 2641: update migration-tests.nix r=rvl a=piotr-iohk # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] I have updated migration-tests.nix... # Comments ... Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot
added a commit
that referenced
this pull request
May 6, 2021
2638: Update e2e tests with migration plan endpoint r=rvl a=piotr-iohk # Issue Number ADP-840 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] Updated e2e tests to comply with changes from #2637 # Comments In #2637 migration cost ep was removed in favor of migrations/plan. Updating tests to comply with this change. Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot
added a commit
that referenced
this pull request
May 6, 2021
2638: Update e2e tests with migration plan endpoint r=piotr-iohk a=piotr-iohk # Issue Number ADP-840 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] Updated e2e tests to comply with changes from #2637 # Comments In #2637 migration cost ep was removed in favor of migrations/plan. Updating tests to comply with this change. Co-authored-by: Piotr Stachyra <[email protected]>
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.
Issue Number
ADP-840
Overview
This PR adjusts the following API operations to accept a non-empty list of addresses:
createByronWalletMigrationPlan
createShelleyWalletMigrationPlan
These operations need addresses in order to construct the coin selections required for a migration plan, as every coin selection output must have an address, and these can only be provided by the caller.
If the caller supplies n addresses, but the migration planner needs to create m outputs where m > n, then the server implementations of the above endpoints will reuse the given addresses in a cyclic fashion. (This was already the case in the old migration implementation.)