Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.6.2 #485

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions encoding/kzg/verifier/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,24 @@ func NewVerifier(config *kzg.KzgConfig, loadG2Points bool) (*Verifier, error) {
return nil, err
}
} else {
if len(config.G2PowerOf2Path) == 0 {
return nil, errors.New("G2PowerOf2Path is empty. However, object needs to load G2Points")
if len(config.G2PowerOf2Path) == 0 && len(config.G2Path) == 0 {
return nil, errors.New("both G2Path and G2PowerOf2Path are empty. However, object needs to load G2Points")
}

if config.SRSOrder == 0 {
return nil, errors.New("SRS order cannot be 0")
}

maxPower := uint64(math.Log2(float64(config.SRSOrder)))
_, err := kzg.ReadG2PointSection(config.G2PowerOf2Path, 0, maxPower, 1)
if err != nil {
return nil, fmt.Errorf("file located at %v is invalid", config.G2PowerOf2Path)
if len(config.G2PowerOf2Path) != 0 {
if config.SRSOrder == 0 {
return nil, errors.New("SRS order cannot be 0")
}

maxPower := uint64(math.Log2(float64(config.SRSOrder)))
_, err := kzg.ReadG2PointSection(config.G2PowerOf2Path, 0, maxPower, 1)
if err != nil {
return nil, fmt.Errorf("file located at %v is invalid", config.G2PowerOf2Path)
}
} else {
log.Println("verifier requires accesses to entire g2 points. It is a legacy usage. For most operators, it is likely because G2_POWER_OF_2_PATH is improperly configured.")
}
}

srs, err := kzg.NewSrs(s1, s2)
if err != nil {
log.Println("Could not create srs", err)
Expand Down
4 changes: 2 additions & 2 deletions operators/churner/churner.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

var (
bipMultiplier = big.NewInt(10000)
secondsTillExpiry = 90 * time.Second
secondsTillExpiry = 3600 * time.Second
)

type ChurnRequest struct {
Expand Down Expand Up @@ -285,7 +285,7 @@ func (c *churner) sign(ctx context.Context, operatorToRegisterAddress gethcommon
var salt [32]byte
copy(salt[:], saltKeccak256)

// set expiry to 90s in the future
// set expiry to 3600s in the future
expiry := big.NewInt(now.Add(secondsTillExpiry).Unix())

// sign and return signature
Expand Down
Loading