-
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
Additional checks for input existence in transactions #2405
Conversation
-- all tx inputs have address and amount | ||
, expectField #inputs $ \inputs' -> do | ||
let addrAmt = (fmap source inputs') | ||
addrAmt `shouldSatisfy` (all isJust) |
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.
Test fails here... it turns out that for delegation inputs are not there in the output of the join/quit transaction.
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.
@KtorZ as far as your simplifications to the checks, I see you have removed this one and also the one from multi-output transactions. I'd argue that these are redundant, especially that one above was failing before (not because of fixtureWallet
thing). It is OK now (after #2370 I suppose) but still worth checking.
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.
Whoops, sorry, you didn't remove that. It was the commit diff that mislead me 😅
Anyway... I have added small additional check to multi-output tx in cdf556a.
-- as the tx is incoming | ||
, expectField #inputs $ \inputs' -> do | ||
let addrAmt2 = (fmap source inputs') | ||
addrAmt2 `shouldSatisfy` (all isNothing) |
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.
Fails here 🤔 ... inputs are there on incoming transaction on fixtureWallet
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.
I can confirm this also on shelley-test-cluster
. So it seems that:
- in case of transaction
fixtureWalletSrc
->fixtureWalletDest
there are resolved inputs visible onincoming
transaction onfixtureWalletDest
. - in case of transaction
emptyWallet
->fixtureWallet
there are NO resolved inputs visible onincoming
transaction onfixtureWallet
Could this be due to fixtureWallet share the same key or something, so they are able to resolve the inputs in case of transaction between them?
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.
Yeah it's a bit fucked up. Since the scenario is using fixtureWallet
, the UtxO from the wallet comes from one of the fixture transaction made when initializing the cluster. There are many pre-funded fixture wallets with 10 UTxO, but in order not to spend 10 days funding them all, the cluster generate pretty large transaction with ~100 outputs. So a single fixture transaction funds about 10 fixture wallets.
Now it means that, a particular fixture wallet will know the value of all inputs of its funding fixture transaction and therefore, when picking two fixtureWallet one after the other, it may likely happen that both wallets are able to resolve inputs of any UTxO coming from their original fixture transaction.
I fixed it by simply using fixtureWalletWith [...]
which generates completly new and uncorrelated UTxOs.
-- as the tx is incoming | ||
, expectField #inputs $ \inputs' -> do | ||
let addrAmt2 = (fmap source inputs') | ||
addrAmt2 `shouldSatisfy` (all isNothing) |
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.
Doesn't fail here... The difference is that the destination wallet is emptyWallet
.
37ee67f
to
cabc8b9
Compare
… integration tests
It's a bit fucked up. Since the scenario is using fixtureWallet, the UtxO from the wallet comes from one of the fixture transaction made when initializing the cluster. There are many pre-funded fixture wallets with 10 UTxO, but in order not to spend 10 days funding them all, the cluster generate pretty large transaction with ~100 outputs. So a single fixture transaction funds about 10 fixture wallets. Now it means that, a particular fixture wallet will know the value of all inputs of its funding fixture transaction and therefore, when picking two fixtureWallet one after the other, it may likely happen that both wallets are able to resolve inputs of any UTxO coming from their original fixture transaction. I fixed it by simply using fixtureWalletWith [...] which generates completly new and uncorrelated UTxOs.
cabc8b9
to
bd2916b
Compare
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.
Reviewed it, fixed it and removed some redundant cases 👍
bors merge |
2370: [ADP-500] Change addresses are not listed as soon as a transaction is no longer pending r=KtorZ a=hasufell # Issue Number ADP-500 # Overview - [x] created an integration test that checks the accepctance criteria and fails on the current branch - [x] fixed the code in `knownAddresses` to also return all used change addresses # Comments ## Questions Do we need to communicate this to API users? 2405: Additional checks for input existence in transactions r=KtorZ a=piotr-iohk # Issue Number It turns out there are no checks for that. A bit related to #2327. # Overview - 1c7215b Additional checks for inputs in incoming and outgoing transactions in integration tests - cabc8b9 Additional checks for inputs in join/quit pool transactions # Comments <!-- Additional comments or screenshots to attach if any --> <!-- 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) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Julian Ospald <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Piotr Stachyra <[email protected]>
Build failed (retrying...):
|
2405: Additional checks for input existence in transactions r=KtorZ a=piotr-iohk # Issue Number It turns out there are no checks for that. A bit related to #2327. # Overview - 1c7215b Additional checks for inputs in incoming and outgoing transactions in integration tests - cabc8b9 Additional checks for inputs in join/quit pool transactions # Comments <!-- Additional comments or screenshots to attach if any --> <!-- 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) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Piotr Stachyra <[email protected]> Co-authored-by: KtorZ <[email protected]>
Build failed:
|
bors merge |
2405: Additional checks for input existence in transactions r=KtorZ a=piotr-iohk # Issue Number It turns out there are no checks for that. A bit related to #2327. # Overview - 1c7215b Additional checks for inputs in incoming and outgoing transactions in integration tests - cabc8b9 Additional checks for inputs in join/quit pool transactions # Comments <!-- Additional comments or screenshots to attach if any --> <!-- 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) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Piotr Stachyra <[email protected]> Co-authored-by: KtorZ <[email protected]>
Build failed:
|
bors r+ |
Build succeeded: |
Issue Number
It turns out there are no checks for that.
A bit related to #2327.
Overview
2605a9f
Additional checks for inputs in incoming and outgoing transactions in integration tests
1247f9a
Additional checks for inputs in join/quit pool transactions
bd2916b
remove redundant cases & fix fixture wallet sharing common funding UTxOs
It's a bit fucked up. Since the scenario is using fixtureWallet, the
UtxO from the wallet comes from one of the fixture transaction made
when initializing the cluster. There are many pre-funded fixture
wallets with 10 UTxO, but in order not to spend 10 days funding them
all, the cluster generate pretty large transaction with ~100
outputs. So a single fixture transaction funds about 10 fixture
wallets.
Now it means that, a particular fixture wallet will know the value
of all inputs of its funding fixture transaction and therefore, when
picking two fixtureWallet one after the other, it may likely happen
that both wallets are able to resolve inputs of any UTxO coming from
their original fixture transaction.
I fixed it by simply using fixtureWalletWith [...] which generates
completly new and uncorrelated UTxOs.
cdf556a
Add input check for multi-address pending tx
Comments