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(deps): update core/coreutils dependencies #1751

Merged
merged 5 commits into from
Dec 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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ require (
github.com/mattn/go-sqlite3 v1.14.24
github.com/montanaflynn/stats v0.7.1
github.com/shopspring/decimal v1.4.0
go.sia.tech/core v0.7.2-0.20241210224920-0534a5928ddb
go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806
go.sia.tech/core v0.8.0
go.sia.tech/coreutils v0.8.0
go.sia.tech/gofakes3 v0.0.5
go.sia.tech/hostd v1.1.3-0.20241212081824-0f6d95b852db
go.sia.tech/jape v0.12.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
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=
go.sia.tech/core v0.7.2-0.20241210224920-0534a5928ddb/go.mod h1:tM9tPD+1jp8d+dqVpX6idTyv5RpI0GEh5L5SyuOpqlc=
go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806 h1:zmLtpmFQPKMukYMiQByZzOODvMshriyLhK12BnIsmU8=
go.sia.tech/coreutils v0.7.1-0.20241211045514-6881993d8806/go.mod h1:6z3oHrQqcLoFEAT/l6XnvOivEGXgIfWBKcq0OqsouWA=
go.sia.tech/core v0.8.0 h1:J6vZQlVhpj4bTVeuC2GKkfkGEs8jf0j651Kl1wwOxjg=
go.sia.tech/core v0.8.0/go.mod h1:Wj1qzvpMM2rqEQjwWJEbCBbe9VWX/mSJUu2Y2ABl1QA=
go.sia.tech/coreutils v0.8.0 h1:1dcl0vxY+MBgAdJ7PdewAr8RkZJn4/6wAKEZfi4iYn0=
go.sia.tech/coreutils v0.8.0/go.mod h1:ml5MefDMWCvPKNeRVIGHmyF5tv27C9h1PiI/iOiTGLg=
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.20241212081824-0f6d95b852db h1:ey3ezMYHPzY+FZ4yL8xsAWnCJWI2J9z4rtpmRa8dj0A=
Expand Down
5 changes: 3 additions & 2 deletions internal/rhp/v4/rhp.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ func (c *Client) FundAccounts(ctx context.Context, hk types.PublicKey, hostIP st

// LatestRevision returns the latest revision of a contract.
func (c *Client) LatestRevision(ctx context.Context, hk types.PublicKey, addr string, contractID types.FileContractID) (revision types.V2FileContract, _ error) {
err := c.tpool.withTransport(ctx, hk, addr, func(c rhp.TransportClient) (err error) {
revision, err = rhp.RPCLatestRevision(ctx, c, contractID)
err := c.tpool.withTransport(ctx, hk, addr, func(c rhp.TransportClient) error {
res, err := rhp.RPCLatestRevision(ctx, c, contractID)
ChrisSchinnerl marked this conversation as resolved.
Show resolved Hide resolved
revision = res.Contract
return err
})
return revision, err
Expand Down
8 changes: 7 additions & 1 deletion internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ func (tc *TestCluster) ContractRoots(ctx context.Context, fcid types.FileContrac
if h == nil {
return nil, fmt.Errorf("no host found for contract %v", c)
}
return h.contracts.SectorRoots(fcid), nil
var roots []types.Hash256
state, unlock, err := h.contractsV2.LockV2Contract(fcid)
if err == nil {
roots = append(roots, state.Roots...)
defer unlock()
}
return append(roots, h.contracts.SectorRoots(fcid)...), nil
}

func (tc *TestCluster) IsPassedV2AllowHeight() bool {
Expand Down
38 changes: 21 additions & 17 deletions internal/test/e2e/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"go.sia.tech/coreutils/chain"
rhp4 "go.sia.tech/coreutils/rhp/v4"
"go.sia.tech/coreutils/syncer"
"go.sia.tech/coreutils/testutil"
"go.sia.tech/coreutils/wallet"
"go.sia.tech/hostd/host/accounts"
"go.sia.tech/hostd/host/contracts"
Expand Down Expand Up @@ -111,14 +112,15 @@ type Host struct {
s *syncer.Syncer
syncerCancel context.CancelFunc

store *sqlite.Store
wallet *wallet.SingleAddressWallet
settings *settings.ConfigManager
storage *storage.VolumeManager
index *index.Manager
registry *registry.Manager
accounts *accounts.AccountManager
contracts *contracts.Manager
store *sqlite.Store
wallet *wallet.SingleAddressWallet
settings *settings.ConfigManager
storage *storage.VolumeManager
index *index.Manager
registry *registry.Manager
accounts *accounts.AccountManager
contracts *contracts.Manager
contractsV2 *testutil.EphemeralContractor

rhpv2 *rhpv2.SessionHandler
rhpv3 *rhpv3.SessionHandler
Expand Down Expand Up @@ -307,7 +309,8 @@ func NewHost(privKey types.PrivateKey, cm *chain.Manager, dir string, network *c
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))
contractsV2 := testutil.NewEphemeralContractor(cm)
rhpv4 := rhp4.NewServer(privKey, cm, s, contractsV2, wallet, settings, storage, rhp4.WithPriceTableValidity(30*time.Minute))
go rhp.ServeRHP4SiaMux(rhp4Listener, rhpv4, log.Named("rhp4"))

return &Host{
Expand All @@ -317,14 +320,15 @@ func NewHost(privKey types.PrivateKey, cm *chain.Manager, dir string, network *c
s: s,
syncerCancel: syncerCancel,

store: db,
wallet: wallet,
settings: settings,
index: idx,
storage: storage,
registry: registry,
accounts: accounts,
contracts: contracts,
store: db,
wallet: wallet,
settings: settings,
index: idx,
storage: storage,
registry: registry,
accounts: accounts,
contracts: contracts,
contractsV2: contractsV2,

rhpv2: rhpv2,
rhpv3: rhpv3,
Expand Down
Loading