Skip to content

Commit

Permalink
Merge branch 'master' into update-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
yycen committed Sep 20, 2023
2 parents 47eb0e7 + fbb0ef7 commit 40c5c77
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ecdsa/resharing/local_party_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ signing:

signErrCh := make(chan *tss.Error, len(signPIDs))
signOutCh := make(chan tss.Message, len(signPIDs))
signEndCh := make(chan common.SignatureData, len(signPIDs))
signEndCh := make(chan *common.SignatureData, len(signPIDs))

for j, signPID := range signPIDs {
params := tss.NewParameters(tss.S256(), signP2pCtx, signPID, len(signPIDs), newThreshold)
Expand Down
2 changes: 1 addition & 1 deletion ecdsa/signing/finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (round *finalization) Start() *tss.Error {
return round.WrapError(fmt.Errorf("signature verification failed"))
}

round.end <- *round.data
round.end <- round.data

return nil
}
Expand Down
12 changes: 6 additions & 6 deletions ecdsa/signing/local_party.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type (

keys keygen.LocalPartySaveData
temp localTempData
data common.SignatureData
data *common.SignatureData

// outbound messaging
out chan<- tss.Message
end chan<- common.SignatureData
end chan<- *common.SignatureData
}

localMessageStore struct {
Expand Down Expand Up @@ -102,7 +102,7 @@ func NewLocalParty(
params *tss.Parameters,
key keygen.LocalPartySaveData,
out chan<- tss.Message,
end chan<- common.SignatureData) tss.Party {
end chan<- *common.SignatureData) tss.Party {
return NewLocalPartyWithKDD(msg, params, key, nil, out, end)
}

Expand All @@ -113,15 +113,15 @@ func NewLocalPartyWithKDD(
key keygen.LocalPartySaveData,
keyDerivationDelta *big.Int,
out chan<- tss.Message,
end chan<- common.SignatureData,
end chan<- *common.SignatureData,
) tss.Party {
partyCount := len(params.Parties().IDs())
p := &LocalParty{
BaseParty: new(tss.BaseParty),
params: params,
keys: keygen.BuildLocalSaveDataSubset(key, params.Parties().IDs()),
temp: localTempData{},
data: common.SignatureData{},
data: &common.SignatureData{},
out: out,
end: end,
}
Expand Down Expand Up @@ -151,7 +151,7 @@ func NewLocalPartyWithKDD(
}

func (p *LocalParty) FirstRound() tss.Round {
return newRound1(p.params, &p.keys, &p.data, &p.temp, p.out, p.end)
return newRound1(p.params, &p.keys, p.data, &p.temp, p.out, p.end)
}

func (p *LocalParty) Start() *tss.Error {
Expand Down
4 changes: 2 additions & 2 deletions ecdsa/signing/local_party_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestE2EConcurrent(t *testing.T) {

errCh := make(chan *tss.Error, len(signPIDs))
outCh := make(chan tss.Message, len(signPIDs))
endCh := make(chan common.SignatureData, len(signPIDs))
endCh := make(chan *common.SignatureData, len(signPIDs))

updater := test.SharedPartyUpdater

Expand Down Expand Up @@ -161,7 +161,7 @@ func TestE2EWithHDKeyDerivation(t *testing.T) {

errCh := make(chan *tss.Error, len(signPIDs))
outCh := make(chan tss.Message, len(signPIDs))
endCh := make(chan common.SignatureData, len(signPIDs))
endCh := make(chan *common.SignatureData, len(signPIDs))

updater := test.SharedPartyUpdater

Expand Down
2 changes: 1 addition & 1 deletion ecdsa/signing/round_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
)

// round 1 represents round 1 of the signing part of the GG18 ECDSA TSS spec (Gennaro, Goldfeder; 2018)
func newRound1(params *tss.Parameters, key *keygen.LocalPartySaveData, data *common.SignatureData, temp *localTempData, out chan<- tss.Message, end chan<- common.SignatureData) tss.Round {
func newRound1(params *tss.Parameters, key *keygen.LocalPartySaveData, data *common.SignatureData, temp *localTempData, out chan<- tss.Message, end chan<- *common.SignatureData) tss.Round {
return &round1{
&base{params, key, data, temp, out, end, make([]bool, len(params.Parties().IDs())), false, 1}}
}
Expand Down
2 changes: 1 addition & 1 deletion ecdsa/signing/rounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type (
data *common.SignatureData
temp *localTempData
out chan<- tss.Message
end chan<- common.SignatureData
end chan<- *common.SignatureData
ok []bool // `ok` tracks parties which have been verified by Update()
started bool
number int
Expand Down
2 changes: 1 addition & 1 deletion eddsa/resharing/local_party_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ signing:

signErrCh := make(chan *tss.Error, len(signPIDs))
signOutCh := make(chan tss.Message, len(signPIDs))
signEndCh := make(chan common.SignatureData, len(signPIDs))
signEndCh := make(chan *common.SignatureData, len(signPIDs))

for j, signPID := range signPIDs {
params := tss.NewParameters(tss.Edwards(), signP2pCtx, signPID, len(signPIDs), newThreshold)
Expand Down
2 changes: 1 addition & 1 deletion eddsa/signing/finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (round *finalization) Start() *tss.Error {
if !ok {
return round.WrapError(fmt.Errorf("signature verification failed"))
}
round.end <- *round.data
round.end <- round.data

return nil
}
Expand Down
10 changes: 5 additions & 5 deletions eddsa/signing/local_party.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ type (

keys keygen.LocalPartySaveData
temp localTempData
data common.SignatureData
data *common.SignatureData

// outbound messaging
out chan<- tss.Message
end chan<- common.SignatureData
end chan<- *common.SignatureData
}

localMessageStore struct {
Expand Down Expand Up @@ -70,15 +70,15 @@ func NewLocalParty(
params *tss.Parameters,
key keygen.LocalPartySaveData,
out chan<- tss.Message,
end chan<- common.SignatureData,
end chan<- *common.SignatureData,
) tss.Party {
partyCount := len(params.Parties().IDs())
p := &LocalParty{
BaseParty: new(tss.BaseParty),
params: params,
keys: keygen.BuildLocalSaveDataSubset(key, params.Parties().IDs()),
temp: localTempData{},
data: common.SignatureData{},
data: &common.SignatureData{},
out: out,
end: end,
}
Expand All @@ -94,7 +94,7 @@ func NewLocalParty(
}

func (p *LocalParty) FirstRound() tss.Round {
return newRound1(p.params, &p.keys, &p.data, &p.temp, p.out, p.end)
return newRound1(p.params, &p.keys, p.data, &p.temp, p.out, p.end)
}

func (p *LocalParty) Start() *tss.Error {
Expand Down
2 changes: 1 addition & 1 deletion eddsa/signing/local_party_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestE2EConcurrent(t *testing.T) {

errCh := make(chan *tss.Error, len(signPIDs))
outCh := make(chan tss.Message, len(signPIDs))
endCh := make(chan common.SignatureData, len(signPIDs))
endCh := make(chan *common.SignatureData, len(signPIDs))

updater := test.SharedPartyUpdater

Expand Down
2 changes: 1 addition & 1 deletion eddsa/signing/round_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

// round 1 represents round 1 of the signing part of the EDDSA TSS spec
func newRound1(params *tss.Parameters, key *keygen.LocalPartySaveData, data *common.SignatureData, temp *localTempData, out chan<- tss.Message, end chan<- common.SignatureData) tss.Round {
func newRound1(params *tss.Parameters, key *keygen.LocalPartySaveData, data *common.SignatureData, temp *localTempData, out chan<- tss.Message, end chan<- *common.SignatureData) tss.Round {
return &round1{
&base{params, key, data, temp, out, end, make([]bool, len(params.Parties().IDs())), false, 1}}
}
Expand Down
2 changes: 1 addition & 1 deletion eddsa/signing/rounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type (
data *common.SignatureData
temp *localTempData
out chan<- tss.Message
end chan<- common.SignatureData
end chan<- *common.SignatureData
ok []bool // `ok` tracks parties which have been verified by Update()
started bool
number int
Expand Down

0 comments on commit 40c5c77

Please sign in to comment.