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

chore(go.mod): update hostd dependency to latest master #1741

Merged
merged 5 commits into from
Dec 13, 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
3 changes: 2 additions & 1 deletion autopilot/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ func (m *migrator) performMigrations(p *workerPool) {
} else if err != nil {
m.logger.Errorw("migration failed",
zap.Float64("health", j.Health),
zap.Stringer("slab", j.EncryptionKey))
zap.Stringer("slab", j.EncryptionKey),
zap.Error(err))
}
}
}(w)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
go.sia.tech/core v0.7.2-0.20241210224920-0534a5928ddb
go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806
go.sia.tech/gofakes3 v0.0.5
go.sia.tech/hostd v1.1.3-0.20241203052717-10e79b2b8e85
go.sia.tech/hostd v1.1.3-0.20241212081824-0f6d95b852db
go.sia.tech/jape v0.12.1
go.sia.tech/mux v1.3.0
go.sia.tech/web/renterd v0.69.0
Expand All @@ -32,7 +32,7 @@ require (

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/cloudflare/cloudflare-go v0.109.0 // indirect
github.com/cloudflare/cloudflare-go v0.111.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU=
github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
github.com/cloudflare/cloudflare-go v0.109.0 h1:Wjp+RfJD1lidIFUlrTBqUQnCBrUnmVsLxgzWYiURueg=
github.com/cloudflare/cloudflare-go v0.109.0/go.mod h1:m492eNahT/9MsN7Ppnoge8AaI7QhVFtEgVm3I9HJFeU=
github.com/cloudflare/cloudflare-go v0.111.0 h1:bFgl5OyR7iaV9DkTaoI2jU8X4rXDzEaFDaPfMTp+Ewo=
github.com/cloudflare/cloudflare-go v0.111.0/go.mod h1:w5c4Vm00JjZM+W0mPi6QOC+eWLncGQPURtgDck3z5xU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -51,8 +51,8 @@ github.com/shabbyrobe/gocovmerge v0.0.0-20230507112040-c3350d9342df/go.mod h1:dc
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
go.sia.tech/core v0.7.2-0.20241210224920-0534a5928ddb h1:JHX+qWKS9sAXmEroICAu2jPQkr3CYUF7iWd/zlATsBM=
Expand All @@ -61,8 +61,8 @@ go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806 h1:zmLtpmFQPKMukYMiQB
go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806/go.mod h1:6z3oHrQqcLoFEAT/l6XnvOivEGXgIfWBKcq0OqsouWA=
go.sia.tech/gofakes3 v0.0.5 h1:vFhVBUFbKE9ZplvLE2w4TQxFMQyF8qvgxV4TaTph+Vw=
go.sia.tech/gofakes3 v0.0.5/go.mod h1:LXEzwGw+OHysWLmagleCttX93cJZlT9rBu/icOZjQ54=
go.sia.tech/hostd v1.1.3-0.20241203052717-10e79b2b8e85 h1:iWitZVJDsazpQHjvmSUHMP6u4p5gySvogkAIQNaaVBU=
go.sia.tech/hostd v1.1.3-0.20241203052717-10e79b2b8e85/go.mod h1:7REKFrGbO6/Nv49K7p1G8ZwYhZWgIgWyD7iscEMRsEY=
go.sia.tech/hostd v1.1.3-0.20241212081824-0f6d95b852db h1:ey3ezMYHPzY+FZ4yL8xsAWnCJWI2J9z4rtpmRa8dj0A=
go.sia.tech/hostd v1.1.3-0.20241212081824-0f6d95b852db/go.mod h1:6wTgoXKmsLQT22lUcHI4/dUcb3mhXFR+9zYWIki8Qho=
go.sia.tech/jape v0.12.1 h1:xr+o9V8FO8ScRqbSaqYf9bjj1UJ2eipZuNcI1nYousU=
go.sia.tech/jape v0.12.1/go.mod h1:wU+h6Wh5olDjkPXjF0tbZ1GDgoZ6VTi4naFw91yyWC4=
go.sia.tech/mux v1.3.0 h1:hgR34IEkqvfBKUJkAzGi31OADeW2y7D6Bmy/Jcbop9c=
Expand Down
6 changes: 0 additions & 6 deletions internal/rhp/v4/rhp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"io"
"net"
"strings"
"time"

"go.sia.tech/core/consensus"
Expand Down Expand Up @@ -140,11 +139,6 @@ func (c *Client) AccountBalance(ctx context.Context, hk types.PublicKey, hostIP
err := c.tpool.withTransport(ctx, hk, hostIP, func(c rhp.TransportClient) (err error) {
balance, err = rhp.RPCAccountBalance(ctx, c, account)
if err != nil {
// TODO: remove this hack once the host is fixed
if strings.Contains(err.Error(), "internal error") {
err = nil
balance = types.ZeroCurrency
}
return err
}
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ func addStorageFolderToHost(ctx context.Context, hosts []*Host) error {
func announceHosts(hosts []*Host) error {
for _, host := range hosts {
settings := defaultHostSettings
settings.NetAddress = host.RHPv2Addr()
settings.NetAddress = host.rhp4Listener.Addr().(*net.TCPAddr).IP.String()
if err := host.settings.UpdateSettings(settings); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/test/e2e/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@ func TestDownloadAllHosts(t *testing.T) {
var randomHost []string
for _, host := range cluster.hosts {
if _, used := usedHosts[host.PublicKey()]; used {
randomHost = []string{host.settings.Settings().NetAddress, host.RHPv4Addr()}
randomHost = []string{host.RHPv2Addr(), host.RHPv4Addr()}
ChrisSchinnerl marked this conversation as resolved.
Show resolved Hide resolved
break
}
}
Expand Down
20 changes: 8 additions & 12 deletions internal/test/e2e/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ func (h *Host) UpdateSettings(settings settings.Settings) error {

// RHPv2Settings returns the host's current RHPv2 settings
func (h *Host) RHPv2Settings() (crhpv2.HostSettings, error) {
return h.rhpv2.Settings()
return h.settings.RHP2Settings()
}

// RHPv3PriceTable returns the host's current RHPv3 price table
func (h *Host) RHPv3PriceTable() (crhpv3.HostPriceTable, error) {
return h.rhpv3.PriceTable()
return h.settings.RHP3PriceTable()
}

// WalletAddress returns the host's wallet address
Expand Down Expand Up @@ -283,9 +283,11 @@ func NewHost(privKey types.PrivateKey, cm *chain.Manager, dir string, network *c
return nil, fmt.Errorf("failed to create rhp3 listener: %w", err)
}

settings, err := settings.NewConfigManager(privKey, db, cm, s, wallet, storage,
settings, err := settings.NewConfigManager(privKey, db, cm, s, storage, wallet,
settings.WithValidateNetAddress(false),
settings.WithRHP4AnnounceAddresses([]chain.NetAddress{{Protocol: rhp4.ProtocolTCPSiaMux, Address: rhp4Listener.Addr().String()}}),
settings.WithRHP2Port(uint16(rhp2Listener.Addr().(*net.TCPAddr).Port)),
settings.WithRHP3Port(uint16(rhp3Listener.Addr().(*net.TCPAddr).Port)),
settings.WithRHP4Port(uint16(rhp4Listener.Addr().(*net.TCPAddr).Port)),
)
if err != nil {
return nil, fmt.Errorf("failed to create settings manager: %w", err)
Expand All @@ -299,16 +301,10 @@ func NewHost(privKey types.PrivateKey, cm *chain.Manager, dir string, network *c
registry := registry.NewManager(privKey, db, zap.NewNop())
accounts := accounts.NewManager(db, settings)

rhpv2, err := rhpv2.NewSessionHandler(rhp2Listener, privKey, rhp3Listener.Addr().String(), cm, s, wallet, contracts, settings, storage, log.Named("rhpv2"))
if err != nil {
return nil, fmt.Errorf("failed to create rhpv2 session handler: %w", err)
}
rhpv2 := rhpv2.NewSessionHandler(rhp2Listener, privKey, cm, s, wallet, contracts, settings, storage, log.Named("rhpv2"))
go rhpv2.Serve()

rhpv3, err := rhpv3.NewSessionHandler(rhp3Listener, privKey, cm, s, wallet, accounts, contracts, registry, storage, settings, log.Named("rhpv2"))
if err != nil {
return nil, fmt.Errorf("failed to create rhpv3 session handler: %w", err)
}
rhpv3 := rhpv3.NewSessionHandler(rhp3Listener, privKey, cm, s, wallet, accounts, contracts, registry, storage, settings, log.Named("rhpv3"))
go rhpv3.Serve()

rhpv4 := rhp4.NewServer(privKey, cm, s, contracts, wallet, settings, storage, rhp4.WithPriceTableValidity(30*time.Minute), rhp4.WithContractProofWindowBuffer(1))
Expand Down
Loading