Byzantine Fault Tolerance For Nondeterministic Applications