Reference checksum

create reference checksum, delete outdated state