go-perun icon indicating copy to clipboard operation
go-perun copied to clipboard

[channel] Params.id may be inconsistent with object properties

Open matthiasgeihs opened this issue 3 years ago • 0 comments

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.

matthiasgeihs avatar Sep 14 '21 20:09 matthiasgeihs