Logical Consensus for Distributed Network Agreement