draft of consensus+state code, compiles.