You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Collection implementation uses the ID() method to compute the identifier for a collection by delegating the call to the ID() method of the corresponding LightCollection. This approach introduces potential malleability concerns. Specifically, it relies on LightCollection, which only references the TransactionIDs and excludes important details about the transactions themselves. This could result in identifiers that do not fully represent the entire Collection and its underlying data.
Update ID():
To address these concerns, the ID() method will be updated to compute the identifier based on the entire Collection instead of relying on c.Light().ID(). This ensures that the identifier includes all the information encapsulated within the Collection, not just the light references to transaction IDs.
It is safe to use MakeID() for this purpose because the Fingerprint() method is already implemented for Collection. This guarantees that MakeID will generate a unique and malleability-resistant identifier by considering all relevant fields within the Collection.
Collection Malleability
flow-go/model/flow/collection.go
Lines 5 to 8 in edf27b0
The current
Collection
implementation uses theID()
method to compute the identifier for a collection by delegating the call to theID()
method of the correspondingLightCollection
. This approach introduces potential malleability concerns. Specifically, it relies onLightCollection
, which only references theTransactionIDs
and excludes important details about the transactions themselves. This could result in identifiers that do not fully represent the entireCollection
and its underlying data.flow-go/model/flow/collection.go
Lines 36 to 38 in edf27b0
Proposed Solution
ID()
:To address these concerns, the
ID()
method will be updated to compute the identifier based on the entireCollection
instead of relying onc.Light().ID()
. This ensures that the identifier includes all the information encapsulated within theCollection
, not just the light references to transactionIDs
.It is safe to use
MakeID()
for this purpose because theFingerprint()
method is already implemented forCollection
. This guarantees thatMakeID
will generate a unique and malleability-resistant identifier by considering all relevant fields within theCollection
.Checksum()
function will be removed.Definition of Done
Collection.ID()
method has been updated usingMakeID
.Light().ID()
in the context ofCollection.ID()
have been removed, the unusedChecksum()
function has been removed.ID()
considers the entire Collection for identifier computation.The text was updated successfully, but these errors were encountered: