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

clarify migrate endpoint end-user documentation #1684

Merged
merged 1 commit into from
May 25, 2020

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented May 25, 2020

Issue Number

#1675

Overview

The sense of 'migrate' seemed unclear to people. So this attempts to give more precisions about
what it really is about. The same description should be copied over for the Shelley equivalent.

Comments

The sense of 'migrate' seemed unclear to people. So this attempts to give more precisions about
what it really is about. The same description should be copied over for the Shelley equivalent.
@KtorZ KtorZ added the IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG label May 25, 2020
@KtorZ KtorZ requested a review from paweljakubas May 25, 2020 12:53
@KtorZ KtorZ self-assigned this May 25, 2020
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

Question about the corresponding cost endpoint. The description for endpoint calculate migration cost reads:

Calculate the exact cost of migrating from a Byron wallet to the specified set of addresses.

Addresses are not provided as a parameter to the cost endpoint, as they are for the migrate endpoint. (Is the cost not influenced by the number of addresses?)

@KtorZ
Copy link
Member Author

KtorZ commented May 25, 2020

Is the cost not influenced by the number of addresses?

Hmmm. No. The algorithm can be seen as two steps:

a) Construct coin selections needed to migrate funds.
b) Assign an address to each change output, cycling them if necessary.

So, the number of addresses is known, from the migration itself. It is true that in principle, the address could influence the selection, because their individual size is not known and, is not fixed in Byron. The fee estimation is using the worst-case scenario (i.e. random addresses with derivation payload) to do calculation, but Shelley addresses are much shorter. This could be a potential improvement of the algorithm / fee estimator used by the algorithm.

@piotr-iohk
Copy link
Contributor

OK, but then saying:

Calculate the exact cost of migrating from a Byron wallet to the specified set of addresses.

sounds a bit awkward when you don't specify any addresses.

@paweljakubas
Copy link
Contributor

@piotr-iohk
Copy link
Contributor

@paweljakubas I'm referring to calculate migration cost endpoint -> https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronWalletMigrationInfo

You don't specify addresses on that endpoint but the description reads:

Calculate the exact cost of migrating from a Byron wallet to the specified set of addresses.

@paweljakubas
Copy link
Contributor

paweljakubas commented May 25, 2020

ah, ok. my bad. in the context of getByronWalletMigrationInfo the "to the specified set of addresses" is not needed, indeed! Agree here. It is the migration cost of whole funds in the wallet specified by wallet id.

@KtorZ KtorZ merged commit 22e9097 into master May 25, 2020
@KtorZ KtorZ deleted the KtorZ/migrate-doc-adjustment branch May 25, 2020 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants