-
Notifications
You must be signed in to change notification settings - Fork 6
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
[feature] Resend txn & Handle dropped txns #70
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 1.017 ETH (199.93 USD @ $196.59/ETH) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 267 years, 2 months from now. 1) bshevchenko has been approved to start work. Will do in a most accurate way :) Learn more on the Gitcoin Issue Details page. |
@bshevchenko Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@gitcoinbot yeap |
…action resolver
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 1.017 ETH (180.69 USD @ $177.67/ETH) has been submitted by: @tymat please take a look at the submitted work:
|
… additional validates for model
…transactions made for cron
…, fixed query class name
⚡️ A tip worth 1.01700 ETH (182.63 USD @ $179.58/ETH) has been granted to @bshevchenko for this issue from @tymat. ⚡️ Nice work @bshevchenko! To redeem your tip, login to Gitcoin at https://gitcoin.co/explorer and select 'Claim Tip' from dropdown menu in the top right, or check your email for a link to the tip redemption page.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done The funding of 1.017 ETH (183.94 USD @ $180.87/ETH) attached to this issue has been approved & issued to @bshevchenko. Additional Tips for this Bounty:
|
Feature
What is the feature?
This feature is covered by two scenarios.
Scenario 1 (Handling Dropped Txns)
Whenever a signed transaction is sent to the Ethereum blockchain, it is stored in the "Mempool" before getting mined in a future block. There is a limit to the size of the Mempool. In instances where the blockchain is overloaded with a large number of transactions, the Mempool eventually becomes full. This causes some pending transactions to be dropped from the Mempool.
When a transaction is dropped from the Mempool, the user needs to resend the transaction (preferably with a higher gas price). We have faced these scenarios a few times in the last couple of months. Users who are under the assumption that their transaction will be mined after the network settles down, are later surprised to note that their transaction actually cannot be found in the pending transactions as well (because it got dropped out of the Mempool).
Scenario 2 (Re-sending txns with higher gas price)
The second scenario also occurs when the blockchain network is congested. In this scenario, a user who sent a transaction with a gas price of say, 5 gwei, would have to wait for long time before their transaction is mined (if the average gas price during that time is say, 20 gwei). In such cases, some users may prefer and afford re-sending the same transaction with a higher gas price of say, 30 gwei, to force their transaction through.
In order to resend a transaction with updated gas price, this new transaction must have the same nonce as the older one. By modifying just the
gas price
of the transaction object, the new transaction can be signed again and sent to the Ethereum node. Both those transactions would now have the same nonce, but the latest one with a higher gas price. Whenever one of them is mined, the other is automatically dropped.How can it be done?
Solution
The solution to both problems is to save the transaction so that it can be resent or reused later.
watchTransaction
resendTransaction
group_id
to unwatch themSchema
In
dao-server
, createwatching_transactions
table consisting of the following:id
- Primary key for recording transactions. Prefer UUID over auto-generated integer.user_id
- Id of the user who signed the transactiongroup_id
- Id of the original transaction to group resent transactions. If this is the original transaction, this is justid
. If this refers to a resent transaction, this refers to that transaction'sid
.transaction_object
-JSON.stringify
-ied transaction object. This stores the transaction parameters to be reused when it needs to be resent with higher gas. Consult https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsendtransactionsigned_transaction
- Signed transaction object in HEX format. https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsendrawtransactioncreated_at
andupdated_at
- Default timestamptxhash
- Field to index or search a transactionGraphQL
Types:
WatchedTransaction
id
(ID) - UUID of the watched transactionuser
(User) - Signer of the transactiontransactionObject
(String) - The JSONified transaction data objectMutations:
watchTransaction
Given a transaction, save it to the database to be resent.
txhash
(String) - The hash of a transaction that is referred by the UItransactionObject
(String) - The JSONified transaction data object Resend txn & Handle dropped txns bounty[feature] Resend txn & Handle dropped txns #70 opened on Aug 1 by roynalnaruto
5
[feature] Email Notifications on Comments bounty
[feature] Email Notifications on Comments #69 opened on Jul 30 by roynalnaruto
6
ProTip! no:milestone will show everything without a milestone.
© 2019 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
API
Training
Blog
About
watchedTransaction
(WatchedTransaction) - Newly created transactionresendTransaction
Given an old transaction, resend it with new parameters or gas prices.
id
(ID) - ID of the transaction to be resenttransactionObject
(String) - The JSONified transaction data objectsignedTransaction
(String) - Signed transaction in HEX format*
watchedTransaction
(WatchedTransaction) - Newly resent transactionQuery:
watchedTransaction
Given a transaction txhash, find the last watched transaction in the group with that txhash .
txhash
(ID) - Txhash of the watched transactionwatchedTransaction
(WatchedTransaction) - Found transactionOther Comments
The scenario #2 has front-end integration as well. The github issue for that is here.
The text was updated successfully, but these errors were encountered: