-
Notifications
You must be signed in to change notification settings - Fork 84
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
Automatic Transaction Re-submission in Chain-Component #366
Comments
To improve the UX for the
|
We recently added (#493) |
Regarding the trimming of the transaction from the pending set, would that be enough to manage transactions lost because of forks? Would it make sense to wait for a given number of blocks before trimming the transaction for more security? Regarding the re-submit, it's not clear to me if there is some sort of pool of pending transactions in Cardano like it exists in Bitcoin. If so, what if our transaction is not yet on the next block but is still pending to being inserted into the next block? Wouldn't we have to wait a bit to avoid submitting our transaction twice eventhoug it would not be needed? (pardon my, yet, poor understanding of Cardano protocol) |
It probably won't, but it's not the purpose of this story to be resistant to rollbacks. It's merely handling the realistic chance that our node had unfriendly peers/relays which ended up not diffusing the transaction robustly into a block. For handling rollbacks we have a dirt-road solution (not crashing), where the cobblestone road is in #185.
There is a mempool in every node, so it might be stuck in there, or anywhere between our node and the next block producing nodes. We could wait longer than trying to resubmit on every block received, but there is no danger in submitting a transaction multiple times, if we handle the error response as somewhat expected.
I'd say your understanding is already middle-class rich. |
Summary of convo on slack (https://input-output-rnd.slack.com/archives/CR599HMFX/p1664438601525909):
It seems the only sensible thing to do is to wait for the tx to appear on-chain (eg. wait for the |
We tried this yesterday by just submitting every transaction twice. It turns out that the second submission fails with a ledger error indicating the Anyhow, I concur in that we might only want to observe & notify clients instead of actively re-submitting as in "normal circumstances" a locally submitted transaction (without error) will end up in a block. |
We close the ticket as this is not something that would make sense with our current understanding of cardano-node. |
Just to clarify, this ticket was originally created in response to specifically that case:
The reason why a fork could happen is because of benign slot battles, or because of an actual attack conducted by one of the head participant (trying for example to drop another participant contestation by creating a fork of the chain where this contestation doesn't exist). This is a plausible attack vector which has to be acknowledged. Discussing with @ch1bo, it's true however that in such a scenario, a local node would see this as a "rollback" event and could thus react accordingly to that rollback (seeing that the contestation is absent in the new fork). Happy, to see this ticket close provided that there is at least something done with regards to re-submission of contestation in the event of rollbacks. |
We realise we don't strictly need this to be secure (check https://hydra.family/head-protocol/core-concepts/behavior for a high-level overview and the paper for formal stuff) BUT from a user experience perspective, not seeing a submitted tx after a while is problematic and should be reported. |
Why
Transactions driving the head state-machine may not end up in a block even though they have been submitted successfully for a variety of reasons (local rollback, forks later in the network, intermittent network failure...). But, we want (still valid) transactions to end up on-chain, eventually! This is particularly important for contest which are security-sensitive.
What
Automatically re-submitting transactions until they are including in a block should alleviate part of the problem and make sure that any valid transaction end up being inserted in the ledger. This is a simple strategy which won't handle conflicting transitions but will cope with rollbacks and intermittent propagation failures. Users only have to trigger actions once for them to (eventually) happen.
How
On submission:
Asynchronously, on every block tick (i.e. when observing a new block)
Tasks
getUTxO
still (Fix DirectChainSpec flakiness #493)The text was updated successfully, but these errors were encountered: