{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/web3.py/issues/586","repository_url":"https://api.github.com/repos/ethereum/web3.py","labels_url":"https://api.github.com/repos/ethereum/web3.py/issues/586/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/web3.py/issues/586/comments","events_url":"https://api.github.com/repos/ethereum/web3.py/issues/586/events","html_url":"https://github.com/ethereum/web3.py/pull/586","id":292073939,"number":586,"title":"WIP: Resend transaction API","user":{"login":"monokh","id":11529637,"avatar_url":"https://avatars2.githubusercontent.com/u/11529637?v=4","gravatar_id":"","url":"https://api.github.com/users/monokh","html_url":"https://github.com/monokh","followers_url":"https://api.github.com/users/monokh/followers","following_url":"https://api.github.com/users/monokh/following{/other_user}","gists_url":"https://api.github.com/users/monokh/gists{/gist_id}","starred_url":"https://api.github.com/users/monokh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monokh/subscriptions","organizations_url":"https://api.github.com/users/monokh/orgs","repos_url":"https://api.github.com/users/monokh/repos","events_url":"https://api.github.com/users/monokh/events{/privacy}","received_events_url":"https://api.github.com/users/monokh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-27T00:51:31Z","updated_at":"2018-02-08T22:40:35Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ethereum/web3.py/pulls/586","html_url":"https://github.com/ethereum/web3.py/pull/586","diff_url":"https://github.com/ethereum/web3.py/pull/586.diff","patch_url":"https://github.com/ethereum/web3.py/pull/586.patch"},"body":"### What was wrong?\r\n\r\nThere is no convenient way to resend transactions.\r\n\r\n### How was it fixed?\r\n\r\nImplemented the following APIs:\r\n\r\n`w3.eth.replaceTransaction(txn_hash, new_transaction_dict)` : Submits a new transaction that replaces the transaction with `txn_hash`\r\n\r\n`w3.eth.modifyTransaction(txn_hash, **individual_fields_to_replace)` : Use new values as specified in `individual_fields_to_replace` but otherwise keep the same parameters when resending the transaction.\r\n\r\nIn both cases the following rules apply:\r\n\r\n- if no transaction can be found with the given hash an exception is thrown.\r\n- if the transaction has already been mined an exception is thrown.\r\n- The new transaction may contain any/all fields that are normally accepted as transaction params except nonce. If nonce is included, it must match the existing transaction.\r\n- If gasPrice is included in the new transaction, it must be greater than the existing transaction gas price (TODO: should we allow a way to bypass this validation)\r\n- if gasPrice is not included in the new transaction we should get two values, and use the maximum price of the two:\r\n  - The gas price of the pending transaction times 1.1 (the minimum required to propagate)\r\n  - The gas price as calculated by the current gas price engine\r\n\r\nTODO: \r\n\r\n- [x] Implement transaction existing validation\r\n- [x] Implement nonce validation\r\n- [x] Implement gas price validation and generation\r\n- [x] Integration tests\r\n- [x] Tests for new utils in `utils/transactions.py`\r\n- [x] Investigate geth integration tests\r\n- [x] Documentation\r\n- [ ] Fix tests - issues in eth-tester\r\n\r\n#### Cute Animal Picture\r\n\r\n![Cute animal picture](https://static.boredpanda.com/blog/wp-content/uploads/2016/11/frog-photography-tantoYensen-2-5836fb5fa3383__880.jpg)\r\n\r\nDepends on #585 \r\nFixes #492 "},"comment":{"url":"https://api.github.com/repos/ethereum/web3.py/issues/comments/364273413","html_url":"https://github.com/ethereum/web3.py/pull/586#issuecomment-364273413","issue_url":"https://api.github.com/repos/ethereum/web3.py/issues/586","id":364273413,"user":{"login":"carver","id":205327,"avatar_url":"https://avatars0.githubusercontent.com/u/205327?v=4","gravatar_id":"","url":"https://api.github.com/users/carver","html_url":"https://github.com/carver","followers_url":"https://api.github.com/users/carver/followers","following_url":"https://api.github.com/users/carver/following{/other_user}","gists_url":"https://api.github.com/users/carver/gists{/gist_id}","starred_url":"https://api.github.com/users/carver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carver/subscriptions","organizations_url":"https://api.github.com/users/carver/orgs","repos_url":"https://api.github.com/users/carver/repos","events_url":"https://api.github.com/users/carver/events{/privacy}","received_events_url":"https://api.github.com/users/carver/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T22:40:35Z","updated_at":"2018-02-08T22:40:35Z","author_association":"COLLABORATOR","body":"Great! It looks like passing the tests is all that's left."}}
{"actor":{"display_login":"carver"}}