go-perun
go-perun copied to clipboard
[channel] Params.id may be inconsistent with object properties
Location
channel/params.go
Problem
Params.id
is derived from the other properties of Params and is used to identify an object instance. However, since most properties of Params are exported, we can change them without changing Params.id, hence, leaving the object in an inconsistent state. This caused problems before (e.g., #56) and can lead to security-relevant bugs.
Proposal
We remove property Params.id
and always calculate the identifier on the fly.