Skip to content
DropDue

Glossary/GLOSSARY

Test vector

A test vector is a known input paired with its known correct hash, used to check that an implementation standardizes and hashes identifiers the way the DROP specification requires.

In plain terms

It is the answer key. You feed your code an input whose correct output you already know. If the two strings match byte for byte, your standardization and your hashing agree with the specification for that case. If they do not, you have found a bug before it costs you anything. Vectors earn their keep on the awkward cases: an accented name, a phone number written four different ways, and the two composite list types, where the order the fields go in changes the result.

What it means for a registered broker

A hashing bug does not announce itself. It produces zero matches, and zero matches looks like a quiet, well behaved cycle. So the check has to be deliberate. Keep a small set of vectors covering all six list types, including both composite forms, and run them as a regression test every time the hashing code changes. The published specification supplies very little worked material, so most vectors have to be derived by hand from the normalization rules. Derive them once, pin them, and re-run them.