update modes to explicitly specifying whether complete chain or leaves should be validated.
add new tests for explicit modes.