block and tx type/length validation functions complete. untested.