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

V18 of car filbase #11502

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
41 changes: 41 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
default:
image: registry.sxxfuture.net/lib/docker/lotus-builder/debian:230224-002040

stages:
- build

.build-snippet:
tags: [docker, x86, merak]
stage: build
variables:
GOPATH: $CI_PROJECT_DIR/.go
HTTP_PROXY: $DEFAULT_PROXY
HTTPS_PROXY: $DEFAULT_PROXY
http_proxy: $DEFAULT_PROXY
https_proxy: $DEFAULT_PROXY
RUSTFLAGS: ""
GOFLAGS: ""
cache:
- key:
files:
- go.mod
- go.sum
paths:
- .go/
- key: build-deps-$CI_COMMIT_REF_SLUG
paths:
- build/.update-modules
- build/.filecoin-install
- extern/serialization-vectors/
- extern/test-vectors/
- extern/filecoin-ffi/
before_script:
# ci cache will create empty dir, which should not exist
- '[ -z "$(ls extern/serialization-vectors)" ] && rm -r extern/serialization-vectors'
- '[ -z "$(ls extern/test-vectors)" ] && rm -r extern/test-vectors'
- '[ -z "$(ls extern/filecoin-ffi)" ] && rm -r extern/filecoin-ffi'
- mkdir -p .go

include:
- '.gitlab-ci/v18.yml'
- '.gitlab-ci/v18-filbase.yml'
17 changes: 17 additions & 0 deletions .gitlab-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM registry.sxxfuture.net/lib/docker/lotus-builder/debian:230224-002040 as builder
FROM ubuntu:20.04

COPY --from=builder /etc/ssl/certs /etc/ssl/certs
COPY --from=builder /lib/x86_64-linux-gnu/libdl.so.2 /lib/
COPY --from=builder /lib/x86_64-linux-gnu/librt.so.1 /lib/
COPY --from=builder /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/
COPY --from=builder /lib/x86_64-linux-gnu/libutil.so.1 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libltdl.so.7 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libnuma.so.1 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libhwloc.so.15 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /lib/

RUN mkdir -p /etc/OpenCL/vendors \
&& echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd

COPY lotus lotus-* /usr/local/bin/
4 changes: 4 additions & 0 deletions .gitlab-ci/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*

!lotus
!lotus-*
50 changes: 50 additions & 0 deletions .gitlab-ci/v18-filbase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"v18/filbase: build lotus":
extends: .build-snippet
artifacts:
name: "v18/filbase: binaries"
paths: [lotus, lotus-miner, lotus-worker]
script:
- make lotus lotus-miner lotus-worker
only:
refs:
- v18_of_car_filbase

"v18/filbase: build external binaries":
extends: .build-snippet
artifacts:
name: "v18/filbase: external binaries"
paths: [lotus-shed, lotus-wallet, lotus-gateway, lotus-stats]
script:
- make lotus-shed lotus-wallet lotus-gateway lotus-stats
only:
refs:
- v18_of_car_filbase
when: manual

"v18/filbase: build lotus (2k)":
extends: .build-snippet
variables:
GOFLAGS: "-tags=2k"
artifacts:
name: "v18-2k binaries"
paths: [lotus-shed, lotus, lotus-miner, lotus-worker, lotus-seed]
script:
- make lotus-shed lotus lotus-miner lotus-worker lotus-seed
only:
refs:
- v18_of_car_filbase
when: manual

"v18/filbase: build external binaries (2k)":
extends: .build-snippet
variables:
GOFLAGS: "-tags=2k"
artifacts:
name: "v18-2k external binaries"
paths: [lotus-wallet, lotus-gateway, lotus-stats]
script:
- make lotus-wallet lotus-gateway lotus-stats
only:
refs:
- v18_of_car_filbase
when: manual
66 changes: 66 additions & 0 deletions .gitlab-ci/v18.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"v18: build lotus":
extends: .build-snippet
artifacts:
name: "v18 binaries"
paths: [lotus, lotus-miner, lotus-worker]
script:
- make lotus lotus-miner lotus-worker
only:
refs:
- v18

"v18: build external binaries":
extends: .build-snippet
artifacts:
name: "v18 external binaries"
paths: [lotus-shed, lotus-wallet, lotus-gateway, lotus-stats]
script:
- make lotus-shed lotus-wallet lotus-gateway lotus-stats
only:
refs:
- v18
when: manual

"v18: build lotus (2k)":
extends: .build-snippet
variables:
GOFLAGS: "-tags=2k"
artifacts:
name: "v18-2k binaries"
paths: [lotus-shed, lotus, lotus-miner, lotus-worker, lotus-seed]
script:
- make lotus-shed lotus lotus-miner lotus-worker lotus-seed
only:
refs:
- v18
when: manual

"v18: build docker (2k)":
image: geektr/yumemi:builder-20221213
tags: [docker, x86, merak]
stage: build
needs: ["v18: build lotus (2k)"]
dependencies: ["v18: build lotus (2k)"]
variables:
# DOCKER_BUILDKIT: 1
docker_file: .gitlab-ci/Dockerfile
docker_tag: "@repo/v18:2k-aio-@datetime"
script:
- yumemi gitlab-ci docker build
only:
refs:
- v18

"v18: build external binaries (2k)":
extends: .build-snippet
variables:
GOFLAGS: "-tags=2k"
artifacts:
name: "v18-2k external binaries"
paths: [lotus-wallet, lotus-gateway, lotus-stats]
script:
- make lotus-wallet lotus-gateway lotus-stats
only:
refs:
- v18
when: manual
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"go.inferGopath": false
}
5 changes: 5 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports"
"github.com/filecoin-project/go-fil-markets/storagemarket/network"
)

//go:generate go run github.com/golang/mock/mockgen -destination=mocks/mock_full.go -package=mocks . FullNode
Expand Down Expand Up @@ -338,6 +339,7 @@ type FullNode interface {
ClientStartDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:admin
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
ClientStatelessDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:write
ClientStatelessDealSxx(ctx context.Context, params *StartDealParams) (*network.Proposal, error) //perm:write
// ClientGetDealInfo returns the latest information about a given deal.
ClientGetDealInfo(context.Context, cid.Cid) (*DealInfo, error) //perm:read
// ClientListDeals returns information about the deals made by the local client.
Expand Down Expand Up @@ -1039,6 +1041,9 @@ type StartDealParams struct {
DealStartEpoch abi.ChainEpoch
FastRetrieval bool
VerifiedDeal bool
// add by pan
Peerid *peer.ID
//
}

func (s *StartDealParams) UnmarshalJSON(raw []byte) (err error) {
Expand Down
6 changes: 6 additions & 0 deletions api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type StorageMiner interface {
// SectorGetExpectedSealDuration gets the expected time for a sector to seal
SectorGetExpectedSealDuration(context.Context) (time.Duration, error) //perm:read
SectorsUpdate(context.Context, abi.SectorNumber, SectorState) error //perm:admin
SectorsUpdateOfSxx(context.Context, abi.SectorNumber, SectorState, string) error //perm:admin
// SectorRemove removes the sector from storage. It doesn't terminate it on-chain, which can
// be done with SectorTerminate. Removing and not terminating live sectors will cause additional penalties.
SectorRemove(context.Context, abi.SectorNumber) error //perm:admin
Expand Down Expand Up @@ -293,6 +294,7 @@ type StorageMiner interface {
RuntimeSubsystems(ctx context.Context) (MinerSubsystems, error) //perm:read

DealsImportData(ctx context.Context, dealPropCid cid.Cid, file string) error //perm:admin
DealsImportDataOfSxx(ctx context.Context, dealPropCid cid.Cid, file string, worker string) error //perm:admin
DealsList(ctx context.Context) ([]*MarketDeal, error) //perm:admin
DealsConsiderOnlineStorageDeals(context.Context) (bool, error) //perm:admin
DealsSetConsiderOnlineStorageDeals(context.Context, bool) error //perm:admin
Expand Down Expand Up @@ -322,6 +324,8 @@ type StorageMiner interface {

CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storiface.SectorRef, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin

CheckProve(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storiface.SectorRef, update []bool, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin

ComputeProof(ctx context.Context, ssi []builtin.ExtendedSectorInfo, rand abi.PoStRandomness, poStEpoch abi.ChainEpoch, nv abinetwork.Version) ([]builtin.PoStProof, error) //perm:read

// RecoverFault can be used to declare recoveries manually. It sends messages
Expand Down Expand Up @@ -458,6 +462,8 @@ type PieceDealInfo struct {
DealProposal *market.DealProposal
DealSchedule DealSchedule
KeepUnsealed bool
RemoteFilepath string
Worker string
}

// DealSchedule communicates the time interval of a storage deal. The deal must
Expand Down
3 changes: 3 additions & 0 deletions api/api_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type Worker interface {
// storiface.WorkerCalls
DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (storiface.CallID, error) //perm:admin
AddPiece(ctx context.Context, sector storiface.SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (storiface.CallID, error) //perm:admin
// add by lin
AddPieceOfSxx(ctx context.Context, sector storiface.SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, path string) (storiface.CallID, error) //perm:admin
// end
SealPreCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
SealPreCommit2(ctx context.Context, sector storiface.SectorRef, pc1o storiface.PreCommit1Out) (storiface.CallID, error) //perm:admin
SealCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storiface.SectorCids) (storiface.CallID, error) //perm:admin
Expand Down
Loading