{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4985","repository_url":"https://api.github.com/repos/ethereum/cpp-ethereum","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4985/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4985/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4985/events","html_url":"https://github.com/ethereum/cpp-ethereum/issues/4985","id":318371226,"number":4985,"title":"Implement Hybrid Casper FFG","user":{"login":"gumb0","id":1863135,"avatar_url":"https://avatars0.githubusercontent.com/u/1863135?v=4","gravatar_id":"","url":"https://api.github.com/users/gumb0","html_url":"https://github.com/gumb0","followers_url":"https://api.github.com/users/gumb0/followers","following_url":"https://api.github.com/users/gumb0/following{/other_user}","gists_url":"https://api.github.com/users/gumb0/gists{/gist_id}","starred_url":"https://api.github.com/users/gumb0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gumb0/subscriptions","organizations_url":"https://api.github.com/users/gumb0/orgs","repos_url":"https://api.github.com/users/gumb0/repos","events_url":"https://api.github.com/users/gumb0/events{/privacy}","received_events_url":"https://api.github.com/users/gumb0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-27T11:17:26Z","updated_at":"2018-05-16T03:59:53Z","closed_at":null,"author_association":"MEMBER","body":"Summary of what should be done according to [EIP-1011](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md).\r\n\r\n- [ ] At fork block deploy SigHasher, PurityChecker and Casper contracts https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#deploying-casper-contract\r\nThis is similar to how we deploy BlockHash contract, see `Block::updateBlockhashContract()`\r\n- [ ] Once at each epoch start call Casper contract to init epoch https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#initialize-epochs\r\nThis is similar to how BlockHash contract is called each block, see `Block::updateBlockhashContract()`\r\n\r\n#### Handling vote transactions \r\nhttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#casper-votes\r\n- [ ] Allow zero signature transactions execution - we already have this mostly implemented for Account Abstraction EIP\r\n- [ ] Keep all vote transactions at the end of the block\r\n  - [ ] Enforce this in block validation - should be easy\r\n  - [ ] Enforce this in mining/pending block construction - might be problematic, as currently we just append new pending transactions to the end of the pending block. We probably would need to split the pending block to \"block without all vote transactions\" and \"block after applying vote transactions\".\r\n- [ ] Track gas spent on votes separately and check that it doesn't exceed block gas limit\r\n- [ ] Unsuccessful vote transactions are not included into the block\r\n  - [ ] Enforce this in block validation\r\n  - [ ] Enforce this in mining/pending block construction\r\n  - [ ] Remove unsuscessful votes from pending transaction list\r\n\r\n#### New fork choice rules\r\nhttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#fork-choice\r\n- [ ] When we check whether current canonical chain chainges, instead of comparing only `totalDifficulty`, use the new rules taking into account `highest_justified_epoch`, finalization of blocks etc. (these rules are still not completely clear to me) This check is currently in `BlockChain::insertBlockAndExtras()` https://github.com/ethereum/cpp-ethereum/blob/b387b5713738da12444af8d3a0f6390f2c87b76e/libethereum/BlockChain.cpp#L801-L802\r\n\r\nThis might require some changes in the database, like we might store the current last finalized block, fork score in each block details etc.\r\n\r\nSee also relevant python implementation  https://github.com/karlfloersch/pyethereum/blob/a66ab671e0bb19327bb8cd11d69664146451c250/ethereum/hybrid_casper/chain.py#L183\r\n\r\n- [ ] https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#block-reward Change POW block rewards\r\n\r\n#### New command line parameteres\r\nhttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-1011.md#client-settings\r\n- [ ] `--casper-fork-choice` -- enables/disables new fork choice rules\r\n- [ ] `--non-revert-min-deposit` -- used in fork choice logic\r\n- [ ] `--exclude`  -- used in fork choice logic\r\n- [ ] `--join-fork`  -- somewhat similar to `rewindToBlock` But also updates finalized epoch/block values in the DB\r\n- [ ] (optional) `--monitor-votes` - monitor vote transactions for slashing conditions and notify Casper contracts about them"},"comment":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/comments/389387195","html_url":"https://github.com/ethereum/cpp-ethereum/issues/4985#issuecomment-389387195","issue_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4985","id":389387195,"user":{"login":"djrtwo","id":1433595,"avatar_url":"https://avatars0.githubusercontent.com/u/1433595?v=4","gravatar_id":"","url":"https://api.github.com/users/djrtwo","html_url":"https://github.com/djrtwo","followers_url":"https://api.github.com/users/djrtwo/followers","following_url":"https://api.github.com/users/djrtwo/following{/other_user}","gists_url":"https://api.github.com/users/djrtwo/gists{/gist_id}","starred_url":"https://api.github.com/users/djrtwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djrtwo/subscriptions","organizations_url":"https://api.github.com/users/djrtwo/orgs","repos_url":"https://api.github.com/users/djrtwo/repos","events_url":"https://api.github.com/users/djrtwo/events{/privacy}","received_events_url":"https://api.github.com/users/djrtwo/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T03:59:52Z","updated_at":"2018-05-16T03:59:52Z","author_association":"NONE","body":"Just published some updates to the EIP that affect some of the components of this issue. See the changelog [here](https://github.com/djrtwo/EIPs/issues/5).\r\n"}}
{"actor":{"display_login":"djrtwo"}}