Skip to content

About Preparams Selection Logic During Reshare Phase #136

@treeforest

Description

@treeforest

Hello,

I noticed that during the reshare phase, new nodes always use the preparams at index 1. However, after the first reshare, in the second reshare, they might end up using the same preparams again.

Currently, the code snippet is:

preParams := p.ecdsaPreParams[0]
if isNewPeer {
	preParams = p.ecdsaPreParams[1]
	participantPeerIDs = newPeerIDs
} else {
	participantPeerIDs = oldKeyInfo.ParticipantPeerIDs
}

Would it be better to select preparams based on version % 2 and (version + 1) % 2 instead, to alternate the preparams and avoid reuse?

Looking forward to your thoughts. Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions