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 | |
|---|---|---|---|
|
|
9a5be110fc |
@@ -138,7 +138,7 @@ func newEmptySRS(nG1, nG2 int) *SRS {
|
||||
}
|
||||
|
||||
func tau(round int, randomness []byte) *toxicWaste {
|
||||
val := blake2b.Sum256(randomness)
|
||||
val := blake2b.Sum256(append(randomness, byte(round)))
|
||||
tau := new(big.Int).Mod(
|
||||
new(big.Int).SetBytes(val[:]),
|
||||
g2.Q())
|
||||
|
||||
@@ -57,6 +57,11 @@ func TestBatchContribution(t *testing.T) {
|
||||
bc.Contribute([]byte("1111111111111111111111111111111111111111111111111111111111111111"))
|
||||
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)
|
||||
c.Assert(err, qt.IsNil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user