IO (Either String _)
to use MonadError instead
Postpone as this security imporovement is not critical for simulations in a trustworthy environment.
Idea: Replace boolean verification flag in CacheEntry
by type-level verification state tracking:
Cache entries now hold one of 2 different types, indicating whether an entry has been verified.
The add
and set
neighbour functions only accept the verified types.
Common operations on verified and unverified entries can then be put into a new type class.
Postpone until a working simulation environment exists, allowing assignment of "real" domains.
For development purpose it'd still be good to allow for using localhost
and *.localhost
domains.
I just got hit by this by running against a buggy version that never states its own responsibility but always sends a FORWARD.
Maybe not important for simulation scenarios, where no node is buggy or evil, but should be pretty easy to fix.