-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support "amend a pending transaction" #332
Comments
As mentioned above, there are two scenarios for handling pending transactions:
For 1, a status-checking-loop can be introduced to update their status periodically, e.g., every 10 mins Neuron will fetch the statuses of all pending transactions and mark those rejected ones, including those not found in the transaction pool; For 2, the new feature Replace by fee could be used to retry pending transactions, the workflow could be roughly described as follows:
|
Feel free to leave questions about the new feature and how to support it in Neuron @Magickbase/neuron |
|
When RBF is enabled by the ckb node, the rpc Ref: Adds
It can be verified on devnet with a longer block interval.
Disable the button to submit a replacement.
RBF requires the same set of inputs, so adding actions on a pending transaction would be intuitive. |
It should be corrected, the description used in the RFC(nervosnetwork/ckb#3734 (comment)) is |
Is there a draft of PRD for preview? |
It's still a work in progress and is expected to be completed this week. |
【Support "amend a pending transaction"】
|
I think the
What does |
OK
#100 An stealth address option will be added to the send page. |
Does it mean we should get the old transaction's status with polling? @Danie0918
For the current Neuron https://github.com/nervosnetwork/neuron/blob/develop/packages/neuron-wallet/src/block-sync-renderer/tx-status-listener.ts#L18-L41, the transaction's status
The amended transaction's fee should be bigger than Should we support changing the output when sending a replacement transaction? @Keith-CY @Danie0918 |
Polling is only required if the state is pending. BTW, can we distinguish between pending and rejected? |
Of course we can, but currently Neuron did not save these status |
It's the first case mentioned at #332 (comment), status of pending transactions should be examined and updated periodically, so a rejected transaction can be marked as |
I think it should be disallowed to update outputs. Personally speaking, the outputs represent the goal of the transaction, if I have another goal, I can make another transaction. In fact, rejected/pending transaction can also be retried with submitting a new transaction, but |
Sometimes there will be transactions that keep pending and cannot be retried until they are removed from Neurno by clearing the cache. It can be done by the following steps:
Because the strategy of picking cells is determined, the new transaction should include the same inputs as the pending one. But it depends, and may use different cells when the fee rate changes and the last input is not enough for the transaction fee, then a larger cell will be used. So when there's only 1 input, it would be undetermined.
Now there are two transactions sending 100 CKB to the same receiver.
Another case is that a transaction is sent with a low fee rate, so it won't be packaged by miners. It's not a cache problem, the transaction is already in the transaction pool. The only action a user can take is to raise a transaction with a higher fee rate to invalidate the previous one. In this case, the cell in the second transaction is deliberately set.
For these two cases, a new feature to invalidate a transaction in the pool should be introduced.
The great news is that
Replace by fee
was just supported in [email protected] with nervosnetwork/ckb#4079We should go through this function and adopt it in Neuron
The text was updated successfully, but these errors were encountered: