{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9076","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9076/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9076/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9076/events","html_url":"https://github.com/bitcoin/bitcoin/pull/9076","id":187175299,"number":9076,"title":"[WIP][Experimental] Add Hybrid full block SPV mode","user":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"labels":[{"id":149424,"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Wallet","name":"Wallet","color":"02d7e1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-11-03T20:03:50Z","updated_at":"2016-11-06T13:35:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9076","html_url":"https://github.com/bitcoin/bitcoin/pull/9076","diff_url":"https://github.com/bitcoin/bitcoin/pull/9076.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/9076.patch"},"body":"**work in progress, seeks conceptual review**\r\n**very experimental right now**\r\n\r\nThis adds a hybrid and pure SPV mode to bitcoin cores wallet (including GUI).\r\nThe main out-of-band block requests are handled over the new \"lock-free\" class `CBlockRequest`.\r\nThis is a generic interface to allow retrieving a range of blocks (only headers PoW check, no validation) and throw them through the `SyncTransaction()` signals (could also be useful for ZMQ, etc,).\r\n\r\n## Hybrid mode\r\nCan be enabled by `-spv`.\r\nIf enabled, the wallet tries to download blocks from the depth where the wallet was created (oldest key-birthday). Those requested blocks are getting prioritized in `FindNextBlocksToDownload()`.\r\nOnce the next block (in order/sequence) has been retrieved, it gets sent through the `SyncTransaction signal`. Those - non-verified transactions will get a `spv=true` flag (visible in the GUI as well as over RPC).\r\nThe blocks are kept on the disk for later verification.\r\nIn the background, the IBD/verification is still processing/downloading blocks. Once a transaction was verified by connecting/verifying its block, the SPV flag gets removed from the transaction.\r\n\r\n**This result in a hybrid full-block SPV mode where the users doesn't need to download more (they later need to verify the blocks near the tip anyways) but its possible to already see incoming transactions and send out coins**\r\n\r\n## Pure SPV\r\nCan be enabled by `-spvonly`.\r\nResult in not downloading blocks for verification.\r\n\r\n## Current limitations\r\n* No SPV 0-conf transactions (those are pretty unsafe anyways)\r\n* Fallback fee for SPV transaction (missing mempool/fee estimator)\r\n* It has only a simple spv re-org handing\r\n* currently incompatible with pruning\r\n\r\nThanks for feedback."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/258681226","html_url":"https://github.com/bitcoin/bitcoin/pull/9076#issuecomment-258681226","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9076","id":258681226,"user":{"login":"rebroad","id":1530283,"avatar_url":"https://avatars.githubusercontent.com/u/1530283?v=3","gravatar_id":"","url":"https://api.github.com/users/rebroad","html_url":"https://github.com/rebroad","followers_url":"https://api.github.com/users/rebroad/followers","following_url":"https://api.github.com/users/rebroad/following{/other_user}","gists_url":"https://api.github.com/users/rebroad/gists{/gist_id}","starred_url":"https://api.github.com/users/rebroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebroad/subscriptions","organizations_url":"https://api.github.com/users/rebroad/orgs","repos_url":"https://api.github.com/users/rebroad/repos","events_url":"https://api.github.com/users/rebroad/events{/privacy}","received_events_url":"https://api.github.com/users/rebroad/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T13:35:48Z","updated_at":"2016-11-06T13:35:48Z","body":"@john-connor can you post a link to any code you think would be useful please?"}}
{"actor":{"display_login":"rebroad"}}