{"action":"created","issue":{"url":"https://api.github.com/repos/web3j/web3j/issues/381","repository_url":"https://api.github.com/repos/web3j/web3j","labels_url":"https://api.github.com/repos/web3j/web3j/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/web3j/web3j/issues/381/comments","events_url":"https://api.github.com/repos/web3j/web3j/issues/381/events","html_url":"https://github.com/web3j/web3j/issues/381","id":299654656,"number":381,"title":"How to execute miner.start() using web3j?","user":{"login":"IcyLemon","id":19788374,"avatar_url":"https://avatars3.githubusercontent.com/u/19788374?v=4","gravatar_id":"","url":"https://api.github.com/users/IcyLemon","html_url":"https://github.com/IcyLemon","followers_url":"https://api.github.com/users/IcyLemon/followers","following_url":"https://api.github.com/users/IcyLemon/following{/other_user}","gists_url":"https://api.github.com/users/IcyLemon/gists{/gist_id}","starred_url":"https://api.github.com/users/IcyLemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IcyLemon/subscriptions","organizations_url":"https://api.github.com/users/IcyLemon/orgs","repos_url":"https://api.github.com/users/IcyLemon/repos","events_url":"https://api.github.com/users/IcyLemon/events{/privacy}","received_events_url":"https://api.github.com/users/IcyLemon/received_events","type":"User","site_admin":false},"labels":[{"id":436310335,"url":"https://api.github.com/repos/web3j/web3j/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-23T09:52:14Z","updated_at":"2018-02-23T11:14:23Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nMy environment is:\r\ngeth client node: Windows 10, 64\r\ngeth version: 1.7.3-stable\r\nweb3j version: 3.2.0\r\n\r\nI encountered a problem, When I deploy a smart contract using web3j as follows:\r\n```\r\n// deploy a contract called counter\r\nCounter counter = Counter.deploy(web3j, credentials, GAS_PRICE, GAS_LIMIT).send();\r\n// get the address of contract\r\nString contractAddress = counter.getContractAddress();\r\n```\r\nI found that once Counter.deploy(...) was executed, the following messages appeared on the console of the geth client node web3j connected:\r\n> INFO [02-23|16:38:01] Submitted contract creation              fullhash=0x06fd8da755e0f46824f777a034bef97ae264608310bc3a88a181a38664e1bb65 contract=0xE0919e456ED15a0d59a13f56931039eDA3E9514a\r\n\r\nThen the web3j java code blocked. **Only after I manually executed the following command on the console of the geth client node, the contract was deployed successfully**:\r\n> miner.start(1);admin.sleepBlocks(1);miner.stop();\r\n\r\nSo my question is that **how to execute miner.start() in web3j so that I need not to manually execute it on the console of the geth client node** ?\r\n\r\nThanks a lot.\r\n\r\n        \r\n        "},"comment":{"url":"https://api.github.com/repos/web3j/web3j/issues/comments/367981552","html_url":"https://github.com/web3j/web3j/issues/381#issuecomment-367981552","issue_url":"https://api.github.com/repos/web3j/web3j/issues/381","id":367981552,"user":{"login":"iikirilov","id":9802500,"avatar_url":"https://avatars0.githubusercontent.com/u/9802500?v=4","gravatar_id":"","url":"https://api.github.com/users/iikirilov","html_url":"https://github.com/iikirilov","followers_url":"https://api.github.com/users/iikirilov/followers","following_url":"https://api.github.com/users/iikirilov/following{/other_user}","gists_url":"https://api.github.com/users/iikirilov/gists{/gist_id}","starred_url":"https://api.github.com/users/iikirilov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iikirilov/subscriptions","organizations_url":"https://api.github.com/users/iikirilov/orgs","repos_url":"https://api.github.com/users/iikirilov/repos","events_url":"https://api.github.com/users/iikirilov/events{/privacy}","received_events_url":"https://api.github.com/users/iikirilov/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T11:14:23Z","updated_at":"2018-02-23T11:14:23Z","author_association":"COLLABORATOR","body":"@IcyLemon Just to clarify, you are using a private blockchain to test this where no other node is mining?\r\n\r\nParity does not have a miner so you need to install a third-party app. More info [here](https://github.com/paritytech/parity/wiki/Mining).\r\n\r\nGeth has a `miner_start` function. This need to be implemented in web3j from the class noted above. More info [here](https://github.com/ethereum/go-ethereum/wiki/Management-APIs#miner). It would be useful to implement all the functions in the `miner` namespace."}}
{"actor":{"display_login":"iikirilov"}}