Gracefully degradable algorithms for Byzantine agreement