{"push_id":3179039349,"size":5,"distinct_size":2,"ref":"refs/heads/ltseeley-update-timeouts","head":"548ee8f2d8b8e3472eeb8daaea541bc088236cae","before":"c0c1639260ae45044cf60a7ca5b4f1b8d8f591ab","commits":[{"sha":"46478f49893e4790e9a6351dd15c6c433fd215c6","author":{"name":"Logan Seeley","email":"8599c409ebf1dce889d0b9e7e0681210979eea52@bitwise.io"},"message":"Update `on_block_new` and catch-up procedure\n\nUpdates the `on_block_new` method in the following ways:\n- Rearranged and commented for more logical ordering.\n- No longer checks for genesis block; this is unnecessary because we're\nalready checking for and discarding messages for old blocks, and we\nalways start with sequence number >= 1.\n- Always add the BlockNew message to the log as long as it's not old and\nits seal is valid; previously, this was handled separated here and for\ncatch-up, but it can just be done here in either case.\n- Check if this block can be used for catch-up; previously the catch up\nmethod would always be called and it would decide if the block was good\nfor catch-up, but we only need to call that method if this is the right\nblock for it.\n- Check if this block is the block for the current sequence number, and\nif it is then update the state (working block and timeouts) and\nbroadcast a PrePrepare if the node is the primary.\n\nUpdates catch-up method in the following ways:\n- Renames the method to `catchup` instead of `try_catchup`, since it is\nnow called only when catchup is possible.\n- Return a Result with just a unit instead of a bool, since the\n`on_block_new` method already determines if this block should be used\nfor catch-up.\n- No longer check if block number is < 2, since this method is now only\ngiven blocks >= 2.\n- Remove \"catch-up from no block new\" since we should never have this\ncondition for catch-up.\n- Only update the view if it is greater than the current view; this\nprevents us from accidentally going backwards.\n- Update the phase to `Committing` before committing the block so the\nphase can be properly switched to `Finished`.\n- Remove call to `msg_log.add_message` since this is now handled by\n`on_block_new` before the `catchup` method is called.\n- Instead of modifying the state here, we call `on_block_commit`\nmanually to update the state of the node to reflect that this block was\ncommitted.\n\nSigned-off-by: Logan Seeley <seeley@bitwise.io>","distinct":false,"url":"https://api.github.com/repos/Cargill/sawtooth-pbft/commits/46478f49893e4790e9a6351dd15c6c433fd215c6"},{"sha":"793f86500bee490729df23b97eb5504e23578228","author":{"name":"Logan Seeley","email":"8599c409ebf1dce889d0b9e7e0681210979eea52@bitwise.io"},"message":"Do not set working block in `pre_prepare`\n\nUpdates the `handlers::pre_prepare` method to not set the working block.\nThis is no longer necessary since this will always be set when a block\nis received (in `on_block_new`, during normal operation) or when a block\nis committed (in `on_block_committed`, during catch-up).\n\nSigned-off-by: Logan Seeley <seeley@bitwise.io>","distinct":false,"url":"https://api.github.com/repos/Cargill/sawtooth-pbft/commits/793f86500bee490729df23b97eb5504e23578228"},{"sha":"a58ba6c3b807326d62409add8d2617a5e4e18696","author":{"name":"Logan Seeley","email":"8599c409ebf1dce889d0b9e7e0681210979eea52@bitwise.io"},"message":"Do not discard block when forcing view change\n\nSince forced view changes only occur when a block is commited, there is\nno need to discard a block here.\n\nSigned-off-by: Logan Seeley <seeley@bitwise.io>","distinct":false,"url":"https://api.github.com/repos/Cargill/sawtooth-pbft/commits/a58ba6c3b807326d62409add8d2617a5e4e18696"},{"sha":"031979cff0f02e4024c9094b8fb61c90ac0e223e","author":{"name":"Logan Seeley","email":"8599c409ebf1dce889d0b9e7e0681210979eea52@bitwise.io"},"message":"Replace idle and commit timeouts with one timeout\n\nReplace the `idle_timeout` and the `commit_timeout` with a single\n`faulty_primary_timeout`; this is a departure from the PBFT definition\nand the view change RFC\n(https://github.com/hyperledger/sawtooth-rfcs/pull/29/files).\n\nThe new timeout is roughly equivalent to the `idle_timeout`, but with\nthe key difference that it is stopped when a node has both a BlockNew\nand a corresponding PrePrepare for the next block rather than just a\nBlockNew.\n\nThis timeout will guarantee liveness in the presence of a faulty primary\nby ensuring that the primary cannot indefinitely halt the network by\nfailing to produce a block or a PrePrepare. However, we do not need to\nuse a full commit timeout to ensure that a block is actually committed\non time, because whether or not a block is committed does not depend on\nthe primary. Once the primary has produced a block and a PrePrepare, the\nnetwork as a whole is responsible for validating the block and sending\nthe required messages to actually commit it; a faulty primary cannot\nprevent this on its own. This means that if there is a failure to commit\na block, then there are more than f faulty nodes, and therefore a view\nchange will not be able to provide liveness.\n\nThis change provides the same liveness guarantees as before, but\nprevents the network from unnecessarily starting a view change when it\nwill not help the network continue progress.\n\nSigned-off-by: Logan Seeley <seeley@bitwise.io>","distinct":true,"url":"https://api.github.com/repos/Cargill/sawtooth-pbft/commits/031979cff0f02e4024c9094b8fb61c90ac0e223e"},{"sha":"548ee8f2d8b8e3472eeb8daaea541bc088236cae","author":{"name":"Logan Seeley","email":"8599c409ebf1dce889d0b9e7e0681210979eea52@bitwise.io"},"message":"Parse faulty_primary_timeout from secs\n\nUpdate the configuration of the `faulty_primary_timeout` to parse the\nvalue from seconds instead of milliseconds.\n\nSigned-off-by: Logan Seeley <seeley@bitwise.io>","distinct":true,"url":"https://api.github.com/repos/Cargill/sawtooth-pbft/commits/548ee8f2d8b8e3472eeb8daaea541bc088236cae"}]}
{"actor":{"display_login":"ltseeley"}}