{"action":"created","issue":{"url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/364","repository_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain","labels_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/364/labels{/name}","comments_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/364/comments","events_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/364/events","html_url":"https://github.com/libbitcoin/libbitcoin-blockchain/issues/364","id":223477222,"number":364,"title":"Unblock safe store reads (no need for spin lock).","user":{"login":"evoskuil","id":1369335,"avatar_url":"https://avatars1.githubusercontent.com/u/1369335?v=3","gravatar_id":"","url":"https://api.github.com/users/evoskuil","html_url":"https://github.com/evoskuil","followers_url":"https://api.github.com/users/evoskuil/followers","following_url":"https://api.github.com/users/evoskuil/following{/other_user}","gists_url":"https://api.github.com/users/evoskuil/gists{/gist_id}","starred_url":"https://api.github.com/users/evoskuil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoskuil/subscriptions","organizations_url":"https://api.github.com/users/evoskuil/orgs","repos_url":"https://api.github.com/users/evoskuil/repos","events_url":"https://api.github.com/users/evoskuil/events{/privacy}","received_events_url":"https://api.github.com/users/evoskuil/received_events","type":"User","site_admin":false},"labels":[{"id":100504789,"url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/milestones/3","html_url":"https://github.com/libbitcoin/libbitcoin-blockchain/milestone/3","labels_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/milestones/3/labels","id":1761644,"number":3,"title":"4.0","description":"","creator":{"login":"evoskuil","id":1369335,"avatar_url":"https://avatars1.githubusercontent.com/u/1369335?v=3","gravatar_id":"","url":"https://api.github.com/users/evoskuil","html_url":"https://github.com/evoskuil","followers_url":"https://api.github.com/users/evoskuil/followers","following_url":"https://api.github.com/users/evoskuil/following{/other_user}","gists_url":"https://api.github.com/users/evoskuil/gists{/gist_id}","starred_url":"https://api.github.com/users/evoskuil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoskuil/subscriptions","organizations_url":"https://api.github.com/users/evoskuil/orgs","repos_url":"https://api.github.com/users/evoskuil/repos","events_url":"https://api.github.com/users/evoskuil/events{/privacy}","received_events_url":"https://api.github.com/users/evoskuil/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2016-05-12T06:06:02Z","updated_at":"2017-04-21T19:39:31Z","due_on":"2017-12-01T08:00:00Z","closed_at":null},"comments":0,"created_at":"2017-04-21T19:39:30Z","updated_at":"2017-04-22T08:37:37Z","closed_at":null,"body":"Many objects, including blocks and transactions, can be safely read **even during write** without possibility of corruption. The exceptions are metadata that is modified after the initial objects have been indexed.\r\n\r\n* tx output spender heights, which is currently read **only** while write is precluded (in validation).\r\n* tx height, which is used to store height **and** validation flags (so must be read/written atomically).\r\n* tx position, which is used to indicate position **and** confirmation (so must be read/written atomically).\r\n* fetch_transaction_position (requires above atomicity)\r\n* fetch_output (see spender height issue above)\r\n* last_height (safe)\r\n* filter_blocks and filter_transactions (safe)\r\n* fetch_locator_block_hashes and fetch_locator_block_headers (safe)\r\n* fetch_spend (atomic addition to hash table)\r\n* fetch_history (atomic addition to hash table, not across txs/blocks)\r\n* fetch_stealth (atomic addition to array, not across txs/blocks)\r\n\r\nFutures (these are safe now but won't be due to height overloading):\r\n\r\n* header height, will be used to store height **and** to indicate chain (so must be read/written atomically).\r\n* block and merkle_block (apart from header height) and eventually compact_block.\r\n* fetch_block_height  (requires above atomicity)\r\n\r\nTo implement atomicity without overextending locks, tx/block heights and positions must be read in construction of the transaction_result and block_result objects. This will be a slight performance hit in exchange for a major performance benefit (100% successful read while write).\r\n\r\nUnsafe:\r\n\r\n* fetch_block_locator (selection is by height/chain)\r\n\r\nThis can be resolved by caching the locator. It can be updated for each new block and incremented when it requires expansion (rarely). Ultimately this should be part of chain _state.\r\n"},"comment":{"url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/comments/296358055","html_url":"https://github.com/libbitcoin/libbitcoin-blockchain/issues/364#issuecomment-296358055","issue_url":"https://api.github.com/repos/libbitcoin/libbitcoin-blockchain/issues/364","id":296358055,"user":{"login":"evoskuil","id":1369335,"avatar_url":"https://avatars1.githubusercontent.com/u/1369335?v=3","gravatar_id":"","url":"https://api.github.com/users/evoskuil","html_url":"https://github.com/evoskuil","followers_url":"https://api.github.com/users/evoskuil/followers","following_url":"https://api.github.com/users/evoskuil/following{/other_user}","gists_url":"https://api.github.com/users/evoskuil/gists{/gist_id}","starred_url":"https://api.github.com/users/evoskuil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoskuil/subscriptions","organizations_url":"https://api.github.com/users/evoskuil/orgs","repos_url":"https://api.github.com/users/evoskuil/repos","events_url":"https://api.github.com/users/evoskuil/events{/privacy}","received_events_url":"https://api.github.com/users/evoskuil/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T08:37:37Z","updated_at":"2017-04-22T08:37:37Z","body":"All complete except for movement of fetch_locator and subsequent dead code removal. https://github.com/libbitcoin/libbitcoin-blockchain/pull/366"}}
{"actor":{"display_login":"evoskuil"}}