-
Notifications
You must be signed in to change notification settings - Fork 225
ADP-455: return unsigned delegation certificate #2213
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
Conversation
7aa3cc1
to
2798019
Compare
dec15ff
to
4b91fea
Compare
c50b8b1
to
4238bda
Compare
bors try |
This is ready for review, except for the missing integration tests... @piotr-iohk anything specific you want covered? |
tryBuild failed: |
de668bb
to
8dcf5af
Compare
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
c17bedc
to
881fab6
Compare
bors try |
tryBuild failed: |
881fab6
to
b5f8caf
Compare
@piotr-iohk I added all integration tests and fixed the errors. But I'm still not 100% sure the output is what we want. |
bors try |
tryBuild succeeded: |
type: array | ||
minItems: 1 | ||
items: | ||
type: string |
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.
Can't this re-use the derivationIndex
schema instead?
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.
There is no such schema?
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.
x-derivationSegment: &derivationSegment
description: An individual segment within a derivation path.
type: string
example: 1852H
x-derivationPath: &derivationPath
description: A path for deriving a child key from a parent key.
type: array
minItems: 1
items: *derivationSegment
*derivationSegment / derivationPath.
lib/core-integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs
Show resolved
Hide resolved
lib/core-integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs
Outdated
Show resolved
Hide resolved
@KtorZ could you reply to #2213 (comment) since we're still not sure the output is actually correct |
c4a154b
to
9b379d2
Compare
df33084
to
16451e5
Compare
The output looks quite correct to me. For a first registration, we would expect two certificates, and they are qualified as expected. |
But trying with hex pool_id we're getting:
👇
|
I was more worried about the amounts in input and output... |
The code was becoming quite convoluted here with function names that were screaming for refactoring (when we start adding `'` to functions, it's usually a good sign that something can be simplified). The main change is actually in 'selectCoinsExternal' which is now parameterized over the selection to run. This way, the steps of assigning change addresses are factored out in this function and a lot of the duplication goes away. Another important change is that I've moved the signing and submission of join/quit outside of the body of the function. So that each step can be ran independently. This avoid the need for weird intermediate product types aggregating more and more information. Now, both functions are returning a 'DelegationAction' and merely checking that a join or quit is possible.
select coins for delegation simplifications
@hasufell there's one input selected, and a single change output. The delta is: |
bors merge |
Playing with the branch I observe that for the wallet that is already delegating to a pool, invoking a join action mostly results in:
Roughly 1 out of 5 is successful. The rest is this 👆 . For the case when wallet is not delegating... all seems to be OK. |
Build succeeded: |
@piotr-iohk on which commit did you do these tests 🤔 ? |
@KtorZ the last one from this branch. The same is actually now on E.g.: I'm seeing this on
👇
sometimes:
|
2255: do not enforce non-empty outputs for unsigned tx r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #2200 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - c60c5a6 📍 **do not enforce non-empty outputs for unsigned tx** Actually, there are many use-cases for empty outputs. This occurs in particular often when performing a selection for delegation: in this scenario, there are typically no outputs at all and, depending on the size of the selected input(s), there might be no change at all (because of the minUTxO value). # Comments <!-- Additional comments or screenshots to attach if any --> Should fix: - #2213 (comment) - #2213 (comment) Thanks @piotr-iohk 🙏 <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
2255: do not enforce non-empty outputs for unsigned tx r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #2200 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - c60c5a6 📍 **do not enforce non-empty outputs for unsigned tx** Actually, there are many use-cases for empty outputs. This occurs in particular often when performing a selection for delegation: in this scenario, there are typically no outputs at all and, depending on the size of the selected input(s), there might be no change at all (because of the minUTxO value). # Comments <!-- Additional comments or screenshots to attach if any --> Should fix: - #2213 (comment) - #2213 (comment) Thanks @piotr-iohk 🙏 <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
Issue Number
#2200
Overview
joinStakePool
Comments