Skip to content

Commit

Permalink
revert to lotus version without ddo
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Sep 27, 2023
1 parent b30013c commit 8a8b833
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 59 deletions.
File renamed without changes.
5 changes: 3 additions & 2 deletions cmd/boost/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ func main() {
offlineDealCmd,
providerCmd,
walletCmd,
directDealAllocate,
directDealGetAllocations,
//TODO: enable when DDO ends up in a network upgrade
//directDealAllocate,
//directDealGetAllocations,
},
}
app.Setup()
Expand Down
4 changes: 4 additions & 0 deletions db/directdeals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
)

func TestDirectDealsDB(t *testing.T) {
t.Skip("direct deals is disabled until it gets into a Filecoin network upgrade")

req := require.New(t)
ctx := context.Background()

Expand Down Expand Up @@ -86,6 +88,8 @@ func TestDirectDealsDB(t *testing.T) {
}

func TestDirectDealsDBSearch(t *testing.T) {
t.Skip("direct deals is disabled until it gets into a Filecoin network upgrade")

req := require.New(t)
ctx := context.Background()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ require (
github.com/filecoin-project/boost-graphsync v0.13.9
github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7
github.com/filecoin-project/go-fil-markets v1.28.3
github.com/filecoin-project/lotus v1.23.4-0.20230901110834-4afb22466d7a
github.com/filecoin-project/lotus v1.23.2-0.20230622154405-168d022018ce
github.com/ipfs/boxo v0.10.1
github.com/ipfs/kubo v0.21.0-rc1
github.com/ipni/go-libipni v0.2.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5
github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8=
github.com/filecoin-project/kubo-api-client v0.0.1 h1:IR1b+sm+VYxSRvbgECVv9SbhIgygcXcSoN1Q7xsHDXg=
github.com/filecoin-project/kubo-api-client v0.0.1/go.mod h1:c36PPMIVOkKfHDwDG5U05gUlPRY9wNuh/BePwo0e+6Y=
github.com/filecoin-project/lotus v1.23.4-0.20230901110834-4afb22466d7a h1:n4FSssksnFxLJkyMA+MSmGxUrPFP2yVmfJrbVbpiCyE=
github.com/filecoin-project/lotus v1.23.4-0.20230901110834-4afb22466d7a/go.mod h1:zqy69/dlzXk6EQvuyWGFOEAIlNxISBP3bGZtblMBZ0Q=
github.com/filecoin-project/lotus v1.23.2-0.20230622154405-168d022018ce h1:L2mdvWIMbM61Lkn+0SloBT8/PzK1flwTuyxRtvhMD5Y=
github.com/filecoin-project/lotus v1.23.2-0.20230622154405-168d022018ce/go.mod h1:i3Vp77jzX9m4D3f7v0wcv0j0BJvdso58yI/cgNNg16Q=
github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM=
github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg=
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
Expand Down
44 changes: 7 additions & 37 deletions node/config/doc_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions storagemarket/contract_deal_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ func (c *ContractDealMonitor) getDealProposal(ctx context.Context, topicContract
From: &fromEthAddr,
To: &toEthAddr,
Data: params,
}, ethtypes.NewEthBlockNumberOrHashFromPredefined("latest"))
//}, ethtypes.NewEthBlockNumberOrHashFromPredefined("latest"))
}, "latest")
if err != nil {
return nil, fmt.Errorf("eth call erred: %w", err)
}
Expand Down Expand Up @@ -308,7 +309,8 @@ func (c *ContractDealMonitor) getExtraData(ctx context.Context, topicContractAdd
From: &fromEthAddr,
To: &toEthAddr,
Data: params,
}, ethtypes.NewEthBlockNumberOrHashFromPredefined("latest"))
//}, ethtypes.NewEthBlockNumberOrHashFromPredefined("latest"))
}, "latest")
if err != nil {
return nil, fmt.Errorf("eth call erred: %w", err)
}
Expand Down
25 changes: 13 additions & 12 deletions storagemarket/direct_deals_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"github.com/filecoin-project/boostd-data/model"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v12/miner"
"github.com/filecoin-project/go-state-types/builtin/v12/verifreg"
lapi "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/v1api"
ltypes "github.com/filecoin-project/lotus/chain/types"
Expand Down Expand Up @@ -330,6 +328,8 @@ func (ddp *DirectDealsProvider) execDeal(ctx context.Context, entry *smtypes.Dir
}
}

_ = clientId

// Add the piece to a sector
sdInfo := lapi.PieceDealInfo{
// "Old" builtin-market deal info
Expand All @@ -345,16 +345,17 @@ func (ddp *DirectDealsProvider) execDeal(ctx context.Context, entry *smtypes.Dir

// Direct Data Onboarding
// When PieceActivationManifest is set, builtin-market deal info must not be set
PieceActivationManifest: &miner.PieceActivationManifest{
CID: entry.PieceCID,
Size: entry.PieceSize,
VerifiedAllocationKey: &miner.VerifiedAllocationKey{
Client: abi.ActorID(clientId),
ID: verifreg.AllocationId(uint64(entry.AllocationID)), // TODO: fix verifreg v9 or v12
},
//Notify []DataActivationNotification
Notify: nil,
},
//TODO: enable PieceActivationManifest when DDO ends up in a network upgrade
//PieceActivationManifest: &miner.PieceActivationManifest{
//CID: entry.PieceCID,
//Size: entry.PieceSize,
//VerifiedAllocationKey: &miner.VerifiedAllocationKey{
//Client: abi.ActorID(clientId),
//ID: verifreg.AllocationId(uint64(entry.AllocationID)), // TODO: fix verifreg v9 or v12
//},
////Notify []DataActivationNotification
//Notify: nil,
//},

// Best-effort deal asks
KeepUnsealed: entry.KeepUnsealedCopy,
Expand Down
4 changes: 2 additions & 2 deletions storagemarket/types/mock_types/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a8b833

Please sign in to comment.