Yes. The original signed transaction from the externally owned account will fail. Consequently, updates down all adjacent branches will fail with it.
Hope it helps.
Update.
It depends on how the calling contract invokes the function that reverts.
pragma solidity 0.4.20;
contract Complainer {
function doRevert() public pure returns(bool success) {
revert(); // because let's fail
return true;
}
}
contract Adjacent {
bool state;
event LogStateChange(address sender, bool succeeded);
function setState() public returns(bool success) {
state = true;
LogStateChange(msg.sender, true);
return true;
}
}
contract Originator {
Complainer c;
Adjacent a;
event LogSucceeded(address sender, bool succeeded);
event LogResult(address sender, bool adjacentResponse, bool complainerResponse);
function Originator(address complainer, address adjacent) public {
c = Complainer(complainer);
a = Adjacent(adjacent);
}
function test() public returns(bool success) {
LogSucceeded(msg.sender, true); // you only get this if the transaction did not fail
bool aResponse = a.setState(); // this would set an internal state and emit an event if it succeeded. Does not.
bool cResponse = c.doRevert(); // this will revert and undo the previous two steps including the adjacent contract
LogResult(msg.sender, aResponse, cResponse); // does not happen because the transaction has failed
return true; // does not happen
}
function test2() public returns(bool success) {
LogSucceeded(msg.sender, true); // you only get this if the transaction did not fail
bool aResponse = a.setState(); // this will set an internal state and emit an event
bool cResponse = c.call(bytes4(sha3("doRevert()"))); // this will revert and return false
LogResult(msg.sender, aResponse, cResponse); // this will happen because the transaction has not failed
return true; // success
}
}
REVERTs will have their state reverted, but if you were to call this function not from an external signed transaction but from another contract it would not revert state changes made in the calling contract, the calling contract would have access to the error and be able to continue. – Silas Davis Mar 03 '18 at 21:33