Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .changeset/switched_to_max_contract_size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

# Switched to max contract size.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/quic-go/quic-go v0.59.0
github.com/quic-go/webtransport-go v0.10.0
go.etcd.io/bbolt v1.4.3
go.sia.tech/core v0.19.0
go.sia.tech/core v0.19.1-0.20260122000638-bfbefbf60715
go.sia.tech/mux v1.4.0
go.uber.org/zap v1.27.1
golang.org/x/crypto v0.47.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
go.sia.tech/core v0.19.0 h1:mj/lsixiI25hNTq1FzLHs94BCewTABulkqq2pHSHmdo=
go.sia.tech/core v0.19.0/go.mod h1:Gge/hpiE9m1ugPLz8RR1ZMoYZTPWLEdRWviHr/4rVeA=
go.sia.tech/core v0.19.1-0.20260122000638-bfbefbf60715 h1:rOD7P3OrPwpQddyhkhWbewouAuekNKx0z/KCLm1Ufo0=
go.sia.tech/core v0.19.1-0.20260122000638-bfbefbf60715/go.mod h1:hqdJ1o37uC+iRf02WD22gBMht2Q658QsQQwKSJ+4ZC8=
go.sia.tech/mux v1.4.0 h1:LgsLHtn7l+25MwrgaPaUCaS8f2W2/tfvHIdXps04sVo=
go.sia.tech/mux v1.4.0/go.mod h1:iNFi9ifFb2XhuD+LF4t2HBb4Mvgq/zIPKqwXU/NlqHA=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
Expand Down
6 changes: 3 additions & 3 deletions rhp/v4/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ func (s *Server) handleRPCFormContract(stream net.Conn) error {

ourKey := s.hostKey.PublicKey()
tip := s.chain.Tip()
if err := req.Validate(ourKey, tip, settings.MaxCollateral, settings.MaxContractDuration); err != nil {
if err := req.Validate(ourKey, tip, settings.MaxContractDuration); err != nil {
return err
}
prices := req.Prices
Expand Down Expand Up @@ -768,7 +768,7 @@ func (s *Server) handleRPCRefreshContract(stream net.Conn, partial bool) error {

// validate the request
cs := s.chain.TipState()
if err := req.Validate(s.hostKey.PublicKey(), cs.Index, state.Revision, settings.MaxCollateral, partial); err != nil {
if err := req.Validate(s.hostKey.PublicKey(), cs.Index, state.Revision, partial); err != nil {
return rhp4.NewRPCError(rhp4.ErrorCodeBadRequest, err.Error())
}

Expand Down Expand Up @@ -948,7 +948,7 @@ func (s *Server) handleRPCRenewContract(stream net.Conn) error {

// validate the request
tip := s.chain.Tip()
if err := req.Validate(s.hostKey.PublicKey(), tip, state.Revision, settings.MaxCollateral, settings.MaxContractDuration); err != nil {
if err := req.Validate(s.hostKey.PublicKey(), tip, state.Revision, settings.MaxContractDuration); err != nil {
return rhp4.NewRPCError(rhp4.ErrorCodeBadRequest, err.Error())
}

Expand Down
Loading