mirror of
https://github.com/arnaucube/eth-kzg-ceremony-alt.git
synced 2026-01-28 14:26:40 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f62ebe6ab |
@@ -138,7 +138,7 @@ func newEmptySRS(nG1, nG2 int) *SRS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func tau(round int, randomness []byte) *toxicWaste {
|
func tau(round int, randomness []byte) *toxicWaste {
|
||||||
val := blake2b.Sum256(append(randomness, byte(round)))
|
val := blake2b.Sum256(randomness)
|
||||||
tau := new(big.Int).Mod(
|
tau := new(big.Int).Mod(
|
||||||
new(big.Int).SetBytes(val[:]),
|
new(big.Int).SetBytes(val[:]),
|
||||||
g2.Q())
|
g2.Q())
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ func TestBatchContribution(t *testing.T) {
|
|||||||
bc.Contribute([]byte("1111111111111111111111111111111111111111111111111111111111111111"))
|
bc.Contribute([]byte("1111111111111111111111111111111111111111111111111111111111111111"))
|
||||||
c.Assert(err, qt.IsNil)
|
c.Assert(err, qt.IsNil)
|
||||||
|
|
||||||
c.Assert(len(nb.Contributions), qt.Equals, 4)
|
|
||||||
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[1].PotPubKey), qt.IsFalse)
|
|
||||||
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[2].PotPubKey), qt.IsFalse)
|
|
||||||
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[3].PotPubKey), qt.IsFalse)
|
|
||||||
|
|
||||||
_, err = json.Marshal(nb)
|
_, err = json.Marshal(nb)
|
||||||
c.Assert(err, qt.IsNil)
|
c.Assert(err, qt.IsNil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user