-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix DirectChainSpec flakiness #493
Conversation
It helps tracing at which point this issue happens
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Cost of Init Transaction
Cost of Commit TransactionCurrently only one UTxO per commit allowed (this is about to change soon)
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
f926b24
to
a95651a
Compare
This update is larger than the scope of this PR
This PR is somewhat related to #366 but with a much limited scope. In the latter issue it is said that in case of a failed posting, tx should simply be dropped. This PR provide an alternative to dropping and retrying by giving the node the ability to understand what the chain component knows and decide to wait for a UTxO to appear before posting a transaction. |
For the record: I tried the alternative approach of retrying |
The reason why retrying submission does not work in the tests is that the thrown |
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 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'm not feeling well for this change as it is only motivated by a single test and seemingly no production code is requiring getUTxO
.
Does this mean that only the DirectChainSpec
is prone to this race-condition?
Furthermore, @abailly-iohk, you mentioned this https://github.com/input-output-hk/hydra-poc/actions/runs/3053589859/jobs/4924406067#step:8:102 as the a motivating flakiness for this change, but that test does not even use any hydra-node component at all - definitely not the Hydra.Chain.Direct
?
Well, I could say that if there is a need for a (ETE) test to observe the UTxO, this might be an indication there is somewhere a "real" need for this that's awaiting. Driving features from tests is also a good way to uncover missing parts. I have only observed the flakiness in these tests but the ETE tests might be subject to it too. Perhaps the fact we have more nodes running, in a more involved setup, give the internal wallet enough time to catch-up? And yes, the motivating example is unrelated, it's a problem related to CI resources which this PR does not solve. |
This PR scratches an itch that's been bugging me for some time, eg, it fixes (EDIT: DOES NOT FIX) #492. What happens (I think) is that when seeding some UTxO from faucet we check the Utxo is visible from the Cardano client, but this does not mean the UTxO is already visible from the
TinyWallet
which needs to sync up its internal state using theChainSync
protocol, thus leading into a race condition.There could be alternative solutions but the one provided here is reasonably simple and it seems to me to make sense to have a way to observe the
UTxO
from theChain
component given they are always expected to be isomorphic to the L2 ones.