diff --git a/.gitignore b/.gitignore index f35581b..eb50229 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ filcrypto.pc filecoin.h filecoin.pc *.a +Cargo.lock simulator +Cargo.lock +rust/Cargo.lock diff --git a/cgo/helpers.go b/cgo/helpers.go index 5e16a0e..0cfc410 100644 --- a/cgo/helpers.go +++ b/cgo/helpers.go @@ -13,6 +13,7 @@ import ( ) var ( + emptyBool C.bool = false emptyUint8 C.uint8_t = 0 emptyUint64 C.uint64_t = 0 emptyUint C.size_t = 0 @@ -25,6 +26,13 @@ var ( emptySliceBoxedUint8 C.slice_boxed_uint8_t = C.slice_boxed_uint8_t{} ) +func AsBool(bl bool) C.bool { + if bl { + return !emptyBool + } + return emptyBool +} + func AsSliceRefUint8(goBytes []byte) SliceRefUint8 { len := len(goBytes) @@ -235,13 +243,49 @@ func NewAggregationInputs(commR ByteArray32, commD ByteArray32, sectorId uint64, } } -func NewPrivateReplicaInfo(pp RegisteredPoStProof, cacheDirPath string, commR ByteArray32, replicaPath string, sectorId uint64) PrivateReplicaInfo { +func NewPrivateSectorPathInfo( + endpoints string, + accessKey string, + secretKey string, + bucketName string, + landedDir string, + sectorName string, + region string, + multiRanges bool, +) PrivateSectorPathInfo { + return PrivateSectorPathInfo{ + endpoints: AllocSliceBoxedUint8([]byte(endpoints)), + access_key: AllocSliceBoxedUint8([]byte(accessKey)), + secret_key: AllocSliceBoxedUint8([]byte(secretKey)), + bucket_name: AllocSliceBoxedUint8([]byte(bucketName)), + landed_dir: AllocSliceBoxedUint8([]byte(landedDir)), + sector_name: AllocSliceBoxedUint8([]byte(sectorName)), + region: AllocSliceBoxedUint8([]byte(region)), + multi_ranges: AsBool(multiRanges), + } +} + +func NewPrivateReplicaInfo( + pp RegisteredPoStProof, + cacheDirPath string, + cacheInOss bool, + cacheSectorPathInfo PrivateSectorPathInfo, + commR ByteArray32, + replicaPath string, + replicaInOss bool, + replicaSectorPathInfo PrivateSectorPathInfo, + sectorId uint64, +) PrivateReplicaInfo { return PrivateReplicaInfo{ - registered_proof: pp, - cache_dir_path: AllocSliceBoxedUint8([]byte(cacheDirPath)), - replica_path: AllocSliceBoxedUint8([]byte(replicaPath)), - sector_id: C.uint64_t(sectorId), - comm_r: commR, + registered_proof: pp, + cache_dir_path: AllocSliceBoxedUint8([]byte(cacheDirPath)), + cache_in_oss: AsBool(cacheInOss), + cache_sector_path_info: cacheSectorPathInfo, + replica_path: AllocSliceBoxedUint8([]byte(replicaPath)), + replica_in_oss: AsBool(replicaInOss), + replica_sector_path_info: replicaSectorPathInfo, + sector_id: C.uint64_t(sectorId), + comm_r: commR, } } diff --git a/cgo/proofs.go b/cgo/proofs.go index 3f4bc4d..cd12401 100644 --- a/cgo/proofs.go +++ b/cgo/proofs.go @@ -93,8 +93,18 @@ func WriteWithoutAlignment(registeredProof RegisteredSealProof, srcFd int32, src return uint64(resp.value.total_write_unpadded), resp.value.comm_p.copy(), nil } -func SealPreCommitPhase1(registeredProof RegisteredSealProof, cacheDirPath SliceRefUint8, stagedSectorPath SliceRefUint8, sealedSectorPath SliceRefUint8, sectorId uint64, proverId *ByteArray32, ticket *ByteArray32, pieces SliceRefPublicPieceInfo) ([]byte, error) { - resp := C.seal_pre_commit_phase1(registeredProof, cacheDirPath, stagedSectorPath, sealedSectorPath, C.uint64_t(sectorId), proverId, ticket, pieces) +func SealPreCommitPhase1( + registeredProof RegisteredSealProof, + cacheDirPath SliceRefUint8, + stagedSectorPath SliceRefUint8, + sealedSectorPath SliceRefUint8, + sectorId uint64, + proverId *ByteArray32, + ticket *ByteArray32, + pieces SliceRefPublicPieceInfo, + hasDeal C.bool, +) ([]byte, error) { + resp := C.seal_pre_commit_phase1(registeredProof, cacheDirPath, stagedSectorPath, sealedSectorPath, C.uint64_t(sectorId), proverId, ticket, pieces, hasDeal) defer resp.destroy() if err := CheckErr(resp); err != nil { return nil, err diff --git a/cgo/types.go b/cgo/types.go index 5b0340a..251dd44 100644 --- a/cgo/types.go +++ b/cgo/types.go @@ -27,6 +27,7 @@ type PrivateReplicaInfo = C.PrivateReplicaInfo_t type PartitionSnarkProof = C.PartitionSnarkProof_t type PoStProof = C.PoStProof_t type PublicPieceInfo = C.PublicPieceInfo_t +type PrivateSectorPathInfo = C.PrivateSectorPathInfo_t type SliceRefPublicReplicaInfo = C.slice_ref_PublicReplicaInfo_t type SliceRefPrivateReplicaInfo = C.slice_ref_PrivateReplicaInfo_t diff --git a/install-filcrypto b/install-filcrypto index 9d6984d..0568e95 100755 --- a/install-filcrypto +++ b/install-filcrypto @@ -4,7 +4,7 @@ set -Exeo pipefail auth_header=() if [ -n "${GITHUB_TOKEN}" ]; then - auth_header=("-H" "Authorization: token ${GITHUB_TOKEN}") + auth_header=("-H" "Authorization: token ${GITHUB_TOKEN}") fi # set CWD to the root of filecoin-ffi diff --git a/proofs.go b/proofs.go index 3b63e6e..183392f 100644 --- a/proofs.go +++ b/proofs.go @@ -9,7 +9,9 @@ package ffi // #include "./filcrypto.h" import "C" import ( + "fmt" "os" + "path" "runtime" "github.com/filecoin-project/go-state-types/proof" @@ -25,6 +27,8 @@ import ( "github.com/filecoin-project/filecoin-ffi/cgo" ) +// var log = logging.Logger("ffi-proof") + // VerifySeal returns true if the sealing operation from which its inputs were // derived was valid, and false if not. func VerifySeal(info proof.SealVerifyInfo) (bool, error) { @@ -291,6 +295,7 @@ func SealPreCommitPhase1( minerID abi.ActorID, ticket abi.SealRandomness, pieces []abi.PieceInfo, + hasDeals bool, ) (phase1Output []byte, err error) { sp, err := toFilRegisteredSealProof(proofType) if err != nil { @@ -317,6 +322,7 @@ func SealPreCommitPhase1( &proverID, &ticketBytes, cgo.AsSliceRefPublicPieceInfo(filPublicPieceInfos), + cgo.AsBool(hasDeals), ) } @@ -820,11 +826,36 @@ func toFilPrivateReplicaInfo(src PrivateSectorInfo) (cgo.PrivateReplicaInfo, err return cgo.PrivateReplicaInfo{}, err } + cacheOss := cgo.NewPrivateSectorPathInfo( + src.CacheSectorPathInfo.Endpoints, + src.CacheSectorPathInfo.AccessKey, + src.CacheSectorPathInfo.SecretKey, + src.CacheSectorPathInfo.BucketName, + src.CacheSectorPathInfo.LandedDir, + src.CacheSectorPathInfo.SectorName, + src.CacheSectorPathInfo.Region, + src.CacheSectorPathInfo.MultiRanges, + ) + sealedOss := cgo.NewPrivateSectorPathInfo( + src.SealedSectorPathInfo.Endpoints, + src.SealedSectorPathInfo.AccessKey, + src.SealedSectorPathInfo.SecretKey, + src.SealedSectorPathInfo.BucketName, + src.SealedSectorPathInfo.LandedDir, + src.SealedSectorPathInfo.SectorName, + src.SealedSectorPathInfo.Region, + src.SealedSectorPathInfo.MultiRanges, + ) + return cgo.NewPrivateReplicaInfo( pp, src.CacheDirPath, + src.CacheInOss, + cacheOss, commR, src.SealedSectorPath, + src.SealedInOss, + sealedOss, uint64(src.SectorNumber), ), nil } @@ -853,11 +884,36 @@ func toFilPrivateReplicaInfos(src []PrivateSectorInfo, typ string) ([]cgo.Privat return nil, nil, err } + cacheOss := cgo.NewPrivateSectorPathInfo( + src[idx].CacheSectorPathInfo.Endpoints, + src[idx].CacheSectorPathInfo.AccessKey, + src[idx].CacheSectorPathInfo.SecretKey, + src[idx].CacheSectorPathInfo.BucketName, + src[idx].CacheSectorPathInfo.LandedDir, + src[idx].CacheSectorPathInfo.SectorName, + src[idx].CacheSectorPathInfo.Region, + src[idx].CacheSectorPathInfo.MultiRanges, + ) + sealedOss := cgo.NewPrivateSectorPathInfo( + src[idx].SealedSectorPathInfo.Endpoints, + src[idx].SealedSectorPathInfo.AccessKey, + src[idx].SealedSectorPathInfo.SecretKey, + src[idx].SealedSectorPathInfo.BucketName, + src[idx].SealedSectorPathInfo.LandedDir, + src[idx].SealedSectorPathInfo.SectorName, + src[idx].SealedSectorPathInfo.Region, + src[idx].SealedSectorPathInfo.MultiRanges, + ) + out[idx] = cgo.NewPrivateReplicaInfo( pp, src[idx].CacheDirPath, + src[idx].CacheInOss, + cacheOss, commR, src[idx].SealedSectorPath, + src[idx].SealedInOss, + sealedOss, uint64(src[idx].SectorNumber), ) } @@ -1108,3 +1164,27 @@ func toVanillaProofs(src [][]byte) ([]cgo.SliceBoxedUint8, func()) { return out, makeCleanerSBU(out, len(src)) } + +func InitLog() { + gofile := os.Getenv("GOLOG_FILE") + file := os.Getenv("RUSTLOG_FILE") + if len(file) == 0 { + if 0 < len(gofile) { + file = fmt.Sprintf("%v/rust-%v", path.Dir(gofile), path.Base(gofile)) + } else { + file = "/var/log/lotus/rust-log.log" + } + } + if len(file) == 0 { + fmt.Printf("FFI log filename is not given\n") + return + } + filLogFile, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE, 0644) + if err != nil { + fmt.Printf("CANNOT open FFI log file %v: %v\n", file, err) + return + } + cgo.InitLogFd(int32(filLogFile.Fd())) + // syscall.Dup2(int(filLogFile.Fd()), 1) + // syscall.Dup2(int(filLogFile.Fd()), 2) +} diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 096e2b5..ca66e95 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -23,18 +23,24 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", ] +[[package]] +name = "ahash" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0453232ace82dee0dd0b4c87a59bd90f7b53b314f3e0f61fe2ee7c8a16482289" + [[package]] name = "ahash" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", "version_check", "zerocopy", @@ -78,9 +84,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" dependencies = [ "backtrace", ] @@ -109,6 +115,119 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite 0.2.15", +] + +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.3.1", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + +[[package]] +name = "async-io" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +dependencies = [ + "async-lock", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite 0.2.15", +] + +[[package]] +name = "async-std" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io", + "async-lock", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite 0.2.15", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.83" @@ -117,7 +236,29 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "attohttpc" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247" +dependencies = [ + "http", + "log", + "native-tls", + "openssl", + "serde", + "serde_json", + "url", + "wildmatch", ] [[package]] @@ -137,6 +278,31 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-creds" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c8271d6207a6859749ae7fd8121aeb33dcf5116bd9bd560cda2d56b5819508" +dependencies = [ + "attohttpc", + "dirs", + "rust-ini", + "serde", + "serde-xml-rs", + "serde_derive", + "simpl", + "url", +] + +[[package]] +name = "aws-region" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f610af4a396f07592014dc3410f6ad78fab931852a99bb6cfdc1ad04b9329b80" +dependencies = [ + "simpl", +] + [[package]] name = "backtrace" version = "0.3.74" @@ -144,7 +310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -321,6 +487,19 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel 2.3.1", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bls-signatures" version = "0.15.0" @@ -366,6 +545,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "buf_redux" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" +dependencies = [ + "memchr", + "safemem", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -384,6 +573,18 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" + [[package]] name = "cbc" version = "0.1.2" @@ -404,15 +605,21 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.36" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ "jobserver", "libc", "shlex", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -425,20 +632,22 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", ] [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", + "wasm-bindgen", "windows-targets", ] @@ -483,6 +692,15 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "config" version = "0.12.0" @@ -518,6 +736,16 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -535,9 +763,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -670,7 +898,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -755,6 +983,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "crypto-mac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + [[package]] name = "cs_serde_bytes" version = "0.12.2" @@ -813,7 +1051,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -824,7 +1062,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -861,7 +1099,7 @@ checksum = "74ef43543e701c01ad77d3a5922755c6a1d71b22d942cb8042be4994b380caff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -882,7 +1120,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -892,7 +1130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -913,7 +1151,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "unicode-xid", ] @@ -942,6 +1180,26 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dirs" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -950,7 +1208,16 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", +] + +[[package]] +name = "dlv-list" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68df3f2b690c1b86e65ef7830956aededf3cb0a16f898f79b9a6f421a7b6211b" +dependencies = [ + "rand", ] [[package]] @@ -1023,6 +1290,15 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -1042,12 +1318,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1060,6 +1336,33 @@ dependencies = [ "libc", ] +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.15", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite 0.2.15", +] + [[package]] name = "execute" version = "0.2.13" @@ -1068,7 +1371,7 @@ checksum = "3a82608ee96ce76aeab659e9b8d3c2b787bffd223199af88c674923d861ada10" dependencies = [ "execute-command-macro", "execute-command-tokens", - "generic-array 1.1.0", + "generic-array 1.1.1", ] [[package]] @@ -1088,7 +1391,7 @@ checksum = "ce8cd46a041ad005ab9c71263f9a0ff5b529eac0fe4cc9b4a20f4f0765d8cf4b" dependencies = [ "execute-command-tokens", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -1146,9 +1449,9 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdlimit" @@ -1230,11 +1533,19 @@ dependencies = [ "yastl", ] +[[package]] +name = "file-lock" +version = "2.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "040b48f80a749da50292d0f47a1e2d5bf1d772f52836c07f64bfccc62ba6e664" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "filecoin-hashers" version = "13.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85413176cea16bfe171caafab023044820c0033b243b535b19116776ffd3f285" dependencies = [ "anyhow", "bellperson", @@ -1253,8 +1564,6 @@ dependencies = [ [[package]] name = "filecoin-proofs" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096b8b483f6ed5823150daf6cd22ee8e32b3dabcb4fd70dab70044e73bcab107" dependencies = [ "anyhow", "bellperson", @@ -1264,16 +1573,19 @@ dependencies = [ "ff", "filecoin-hashers", "fr32", + "fs2", "generic-array 0.14.7", "hex", "iowrap", "lazy_static", + "libc", "log", "memmap2 0.5.10", "merkletree", "once_cell", "rand", "rayon", + "rust-s3", "serde", "serde_json", "sha2 0.10.8", @@ -1281,14 +1593,13 @@ dependencies = [ "storage-proofs-porep", "storage-proofs-post", "storage-proofs-update", + "tokio", "typenum", ] [[package]] name = "filecoin-proofs-api" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aea8140d1e2d2ac18347e6121ee24d0e903f9cfdc2eb2ee507932e352c9e7b8" dependencies = [ "anyhow", "bincode", @@ -1296,6 +1607,7 @@ dependencies = [ "filecoin-proofs", "fr32", "lazy_static", + "log", "serde", "storage-proofs-core", ] @@ -1347,6 +1659,21 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "forest_hash_utils" version = "0.1.0" @@ -1369,8 +1696,6 @@ dependencies = [ [[package]] name = "fr32" version = "11.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "627a3f3108ee3287759a45f6d5aafe48b3017509df9b677115f88266d61e0815" dependencies = [ "anyhow", "blstrs", @@ -1390,12 +1715,130 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags 1.3.2", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + [[package]] name = "funty" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite 0.2.15", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite 0.2.15", + "pin-utils", + "slab", +] + [[package]] name = "fvm" version = "2.10.0" @@ -1574,9 +2017,9 @@ dependencies = [ [[package]] name = "fvm_ipld_hamt" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8512ddaa098c324e0c6b0d8cccacdcbc08834509db11f52d5f5cd7f1f10a39f8" +checksum = "1cc4806b6cd89fd69b7d3910492d2309fad0be2fd223686411ebfc78e16af93b" dependencies = [ "anyhow", "byteorder", @@ -1691,9 +2134,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +checksum = "2cb8bc4c28d15ade99c7e90b219f30da4be5c88e586277e8cbe886beeb868ab2" dependencies = [ "typenum", ] @@ -1704,7 +2147,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi", ] @@ -1716,7 +2159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" dependencies = [ "fallible-iterator", - "indexmap 2.6.0", + "indexmap 2.7.0", "stable_deref_trait", ] @@ -1732,6 +2175,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "group" version = "0.13.0" @@ -1745,6 +2200,35 @@ dependencies = [ "subtle", ] +[[package]] +name = "h2" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +dependencies = [ + "bytes 0.5.6", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", + "tracing-futures", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash 0.4.8", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1757,15 +2241,15 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash", + "ahash 0.8.11", "serde", ] [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "foldhash", ] @@ -1791,6 +2275,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1806,7 +2296,17 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac", + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -1818,7 +2318,7 @@ checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", "generic-array 0.14.7", - "hmac", + "hmac 0.8.1", ] [[package]] @@ -1830,6 +2330,39 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes 1.9.0", + "fnv", + "itoa 1.0.14", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +dependencies = [ + "bytes 0.5.6", + "http", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" + [[package]] name = "hwloc" version = "0.5.0" @@ -1845,6 +2378,43 @@ dependencies = [ "winapi 0.2.8", ] +[[package]] +name = "hyper" +version = "0.13.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +dependencies = [ + "bytes 0.5.6", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 0.4.8", + "pin-project", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" +dependencies = [ + "bytes 0.5.6", + "hyper", + "native-tls", + "tokio", + "tokio-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -1983,7 +2553,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2031,12 +2601,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.1", + "hashbrown 0.15.2", "serde", ] @@ -2056,6 +2626,15 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + [[package]] name = "iowrap" version = "0.2.1" @@ -2076,6 +2655,12 @@ dependencies = [ "serde_bytes", ] +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + [[package]] name = "itertools" version = "0.8.2" @@ -2114,9 +2699,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -2129,10 +2720,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2155,6 +2747,15 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -2172,9 +2773,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libm" @@ -2182,6 +2783,16 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + [[package]] name = "libsecp256k1" version = "0.7.1" @@ -2238,9 +2849,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -2257,6 +2868,9 @@ name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +dependencies = [ + "value-bag", +] [[package]] name = "mach2" @@ -2283,6 +2897,23 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58093314a45e00c77d5c508f76e77c3396afbbc0d01506e7fae47b018bac2b1d" +[[package]] +name = "maybe-async" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + [[package]] name = "memchr" version = "2.7.4" @@ -2319,8 +2950,6 @@ dependencies = [ [[package]] name = "merkletree" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ed8c0ce1e281870da29266398541a0dbab168f5fb5fd36d7ef2bbdbf808a3" dependencies = [ "anyhow", "arrayref", @@ -2328,11 +2957,29 @@ dependencies = [ "memmap2 0.5.10", "positioned-io", "rayon", + "rust-s3", "serde", "tempfile", + "tokio", "typenum", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2358,6 +3005,37 @@ dependencies = [ "web-time", ] +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + [[package]] name = "multibase" version = "0.9.1" @@ -2371,9 +3049,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" +checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" dependencies = [ "core2", "serde", @@ -2415,10 +3093,27 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "synstructure", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "neptune" version = "11.0.0" @@ -2441,6 +3136,17 @@ dependencies = [ "trait-set", ] +[[package]] +name = "net2" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "nom" version = "7.1.3" @@ -2490,7 +3196,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2539,8 +3245,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "crc32fast", - "hashbrown 0.15.1", - "indexmap 2.6.0", + "hashbrown 0.15.2", + "indexmap 2.7.0", "memchr", ] @@ -2575,6 +3281,60 @@ dependencies = [ "libc", ] +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ordered-multimap" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c672c7ad9ec066e428c00eb917124a06f08db19e2584de982cc34b1f4c12485" +dependencies = [ + "dlv-list", + "hashbrown 0.9.1", +] + [[package]] name = "overload" version = "0.1.1" @@ -2596,6 +3356,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -2612,7 +3378,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", @@ -2641,19 +3407,68 @@ dependencies = [ name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] -name = "pathdiff" -version = "0.2.2" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "percent-encoding" -version = "2.3.1" +name = "piper" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] [[package]] name = "pkg-config" @@ -2661,6 +3476,21 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "polling" +version = "3.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite 0.2.15", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "positioned-io" version = "0.3.3" @@ -2674,9 +3504,9 @@ dependencies = [ [[package]] name = "postcard" -version = "1.0.10" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7f0a8d620d71c457dd1d47df76bb18960378da56af4527aaa10f515eee732e" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" dependencies = [ "cobs", "embedded-io 0.4.0", @@ -2724,22 +3554,28 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" version = "1.0.37" @@ -2816,13 +3652,24 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + [[package]] name = "regalloc2" version = "0.10.2" @@ -2850,9 +3697,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2871,6 +3718,42 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" +[[package]] +name = "reqwest" +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +dependencies = [ + "base64", + "bytes 0.5.6", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite 0.2.15", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-tls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -2897,6 +3780,53 @@ dependencies = [ "thiserror", ] +[[package]] +name = "rust-ini" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b134767a87e0b086f73a4ce569ac9ce7d202f39c8eab6caa266e2617e73ac6" +dependencies = [ + "cfg-if 0.1.10", + "ordered-multimap", +] + +[[package]] +name = "rust-s3" +version = "0.27.0-beta1" +dependencies = [ + "async-std", + "async-trait", + "aws-creds", + "aws-region", + "base64", + "buf_redux", + "bytes 1.9.0", + "cfg-if 1.0.0", + "chrono", + "futures", + "hex", + "hmac 0.11.0", + "http", + "httparse", + "log", + "maybe-async", + "md5", + "mime", + "mime_guess", + "percent-encoding", + "quick-error", + "reqwest", + "safemem", + "serde", + "serde-xml-rs", + "serde_derive", + "sha2 0.9.9", + "simpl", + "tokio", + "twoway", + "url", +] + [[package]] name = "rustacuda_core" version = "0.1.2" @@ -2922,21 +3852,21 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustix" -version = "0.38.39" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", - "errno 0.3.9", + "errno 0.3.10", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2951,6 +3881,12 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + [[package]] name = "safer-ffi" version = "0.1.13" @@ -2983,27 +3919,71 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] +[[package]] +name = "serde-xml-rs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0bf1ba0696ccf0872866277143ff1fd14d22eec235d2b23702f95e6660f7dfa" +dependencies = [ + "log", + "serde", + "thiserror", + "xml-rs", +] + [[package]] name = "serde_bytes" version = "0.11.15" @@ -3015,13 +3995,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3038,11 +4018,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "itoa", + "itoa 1.0.14", "memchr", "ryu", "serde", @@ -3056,7 +4036,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3080,6 +4060,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.14", + "ryu", + "serde", +] + [[package]] name = "sha2" version = "0.9.9" @@ -3087,7 +4079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -3099,7 +4091,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", "sha2-asm", @@ -3123,8 +4115,6 @@ checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" [[package]] name = "sha2raw" version = "13.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73744f6a373edfc5624f452ec705a762e1154bb88c6699242bf37c56d99a6ebb" dependencies = [ "byteorder", "cpufeatures", @@ -3151,6 +4141,21 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simpl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a30f10c911c0355f80f1c2faa8096efc4a58cdf8590b954d5b395efa071c711" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + [[package]] name = "slice-group-by" version = "0.3.1" @@ -3166,6 +4171,17 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "winapi 0.3.9", +] + [[package]] name = "spin" version = "0.9.8" @@ -3177,9 +4193,9 @@ dependencies = [ [[package]] name = "sppark" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5090642d9ae844edd9a5c23cb1fce6724ca88d50c55178ee8d1f656df5826b" +checksum = "16bf457036c0a778140ce4c3bcf9ff30c5c70a9d9c0bb04fe513af025b647b2c" dependencies = [ "cc", "which", @@ -3240,8 +4256,6 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storage-proofs-core" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390385ae6787ad5d4312f3b6f0462c9f6615d9a7863376f8636604e6e43f3d28" dependencies = [ "aes", "anyhow", @@ -3275,8 +4289,6 @@ dependencies = [ [[package]] name = "storage-proofs-porep" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd8c6bbeb00933edb41152fdabf28d2519d6a1b6ea176a793e3198a07bb9acd" dependencies = [ "anyhow", "bellperson", @@ -3287,8 +4299,11 @@ dependencies = [ "byteorder", "chacha20", "crossbeam", + "ec-gpu-gen 0.7.1", + "errno 0.2.8", "fdlimit", "ff", + "file-lock", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -3318,8 +4333,6 @@ dependencies = [ [[package]] name = "storage-proofs-post" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779fbfe1455a57d2a7fd655ce1b2e97bf9f238b65c71919e92aa9df8f2ced8b1" dependencies = [ "anyhow", "bellperson", @@ -3338,8 +4351,6 @@ dependencies = [ [[package]] name = "storage-proofs-update" version = "18.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4b391917dbcffa2297295971a02cc54aa19aa8b5378d539a435e78f8050153" dependencies = [ "anyhow", "bellperson", @@ -3357,6 +4368,7 @@ dependencies = [ "serde", "storage-proofs-core", "storage-proofs-porep", + "subtle", ] [[package]] @@ -3395,9 +4407,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -3412,7 +4424,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3438,11 +4450,11 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "once_cell", "rustix", @@ -3460,22 +4472,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3497,6 +4509,47 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tokio" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +dependencies = [ + "bytes 0.5.6", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "memchr", + "mio", + "pin-project-lite 0.1.12", + "slab", +] + +[[package]] +name = "tokio-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +dependencies = [ + "bytes 0.5.6", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.1.12", + "tokio", +] + [[package]] name = "toml" version = "0.5.11" @@ -3518,11 +4571,47 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "toml_datetime", "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite 0.2.15", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "trait-set" version = "0.3.0" @@ -3534,17 +4623,38 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twoway" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" +dependencies = [ + "memchr", +] + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "unicase" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" + [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" @@ -3581,9 +4691,9 @@ checksum = "0976c77def3f1f75c4ef892a292c31c0bbe9e3d0702c63044d7c76db298171a3" [[package]] name = "url" -version = "2.5.3" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3602,12 +4712,33 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "value-bag" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3616,35 +4747,49 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", + "serde", + "serde_json", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3652,22 +4797,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-encoder" @@ -3704,7 +4849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ "bitflags 2.6.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "semver", ] @@ -3714,10 +4859,10 @@ version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" dependencies = [ - "ahash", + "ahash 0.8.11", "bitflags 2.6.0", "hashbrown 0.14.5", - "indexmap 2.6.0", + "indexmap 2.7.0", "semver", "serde", ] @@ -3753,9 +4898,9 @@ dependencies = [ "bitflags 2.6.0", "bumpalo", "cc", - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.5", - "indexmap 2.6.0", + "indexmap 2.7.0", "libc", "libm", "log", @@ -3790,7 +4935,7 @@ version = "25.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30e0c7f9983c2d60109a939d9ab0e0df301901085c3608e1c22c27c98390a027" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -3802,7 +4947,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -3821,7 +4966,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c8af1197703f4de556a274384adf5db36a146f9892bc9607bad16881e75c80" dependencies = [ "anyhow", - "cfg-if", + "cfg-if 1.0.0", "cranelift-codegen", "cranelift-control", "cranelift-entity", @@ -3849,7 +4994,7 @@ dependencies = [ "cranelift-bitset", "cranelift-entity", "gimli 0.29.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "log", "object", "postcard", @@ -3869,7 +5014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d7314e32c624f645ad7d6b9fc3ac89eb7d2b9aa06695d6445cec087958ec27d" dependencies = [ "anyhow", - "cfg-if", + "cfg-if 1.0.0", "libc", "windows-sys 0.52.0", ] @@ -3902,7 +5047,7 @@ checksum = "6879a8e168aef3fe07335343b7fbede12fa494215e83322e173d4018e124a846" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3913,10 +5058,20 @@ checksum = "3f571f63ac1d532e986eb3973bbef3a45e4ae83de521a8d573b0fe0594dc9608" dependencies = [ "anyhow", "heck", - "indexmap 2.6.0", + "indexmap 2.7.0", "wit-parser", ] +[[package]] +name = "web-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "web-time" version = "1.1.0" @@ -3939,6 +5094,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "wildmatch" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f44b95f62d34113cf558c93511ac93027e03e9c29a60dd0fd70e6e025c7270a" + [[package]] name = "winapi" version = "0.2.8" @@ -4082,6 +5243,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "wit-parser" version = "0.217.0" @@ -4090,7 +5260,7 @@ checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" dependencies = [ "anyhow", "id-arena", - "indexmap 2.6.0", + "indexmap 2.7.0", "log", "semver", "serde", @@ -4132,6 +5302,16 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "wyz" version = "0.5.1" @@ -4141,6 +5321,12 @@ dependencies = [ "tap", ] +[[package]] +name = "xml-rs" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432" + [[package]] name = "yansi" version = "1.0.1" @@ -4159,9 +5345,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", @@ -4171,13 +5357,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "synstructure", ] @@ -4199,27 +5385,27 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "synstructure", ] @@ -4240,7 +5426,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -4262,5 +5448,10 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] + +[[patch.unused]] +name = "wasmtime" +version = "0.37.0" +source = "git+https://github.com/filecoin-project/wasmtime?branch=fix/sse-feature#cbb8a3de28d7ff120b671af6a135879316b78688" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 19159e5..9c61fda 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "filcrypto" -description = "FFI Interface to Filecoin Proofs" -version = "0.7.5" authors = [ "nemo ", "dignifiedquire ", "laser ", ] +description = "FFI Interface to Filecoin Proofs" +edition = "2021" license = "MIT OR Apache-2.0" -repository = "https://github.com/filecoin-project/filecoin-ffi" +name = "filcrypto" +publish = false readme = "README.md" -edition = "2021" +repository = "https://github.com/EntropyPool/filecoin-ffi" resolver = "2" -publish = false +version = "0.7.5" [lib] crate-type = ["rlib", "staticlib"] @@ -54,6 +54,20 @@ yastl = "0.1.2" memmap2 = "0.9" tempfile = "3.12.0" +[patch.crates-io] +filecoin-proofs-api = { path = "../../rust-filecoin-proofs-api", version = "18.1", default-features = false } +filecoin-hashers = { path = "../../rust-fil-proofs/filecoin-hashers", version = "13.1", default-features = false } +filecoin-proofs = { path = "../../rust-fil-proofs/filecoin-proofs", version = "18.1", default-features = false } +fr32 = { path = "../../rust-fil-proofs/fr32", version = "11.1", default-features = false } +merkletree = { path = "../../merkletree", version = "0.23" } +sha2raw = { path = "../../rust-fil-proofs/sha2raw", version = "13.1" } +storage-proofs-core = { path = "../../rust-fil-proofs/storage-proofs-core", version = "18.1" } +storage-proofs-porep = { path = "../../rust-fil-proofs/storage-proofs-porep", version = "18.1" } +storage-proofs-post = { path = "../../rust-fil-proofs/storage-proofs-post", version = "18.1" } +storage-proofs-update = { path = "../../rust-fil-proofs/storage-proofs-update", version = "18.1" } + +wasmtime = { git = "https://github.com/filecoin-project/wasmtime", branch = "fix/sse-feature" } + [features] default = ["cuda", "multicore-sdr"] blst-portable = ["bls-signatures/blst-portable", "blstrs/portable"] diff --git a/rust/scripts/build-release.sh b/rust/scripts/build-release.sh index b93c287..61db731 100755 --- a/rust/scripts/build-release.sh +++ b/rust/scripts/build-release.sh @@ -33,7 +33,7 @@ main() { # local __linker_flags=$(cat ${__build_output_log_tmp} \ | grep native-static-libs\: \ - | head -n 1 \ + | tail -n 1 \ | cut -d ':' -f 3) echo "Linker Flags: ${__linker_flags}" @@ -81,7 +81,7 @@ main() { # generate pkg-config # sed -e "s;@VERSION@;$(git rev-parse HEAD);" \ - -e "s;@PRIVATE_LIBS@;${__linker_flags};" "filcrypto.pc.template" > "filcrypto.pc" + -e "s;@PRIVATE_LIBS@;${__linker_flags} -lhugetlbfs;" "filcrypto.pc.template" > "filcrypto.pc" # ensure header file was built # diff --git a/rust/src/fvm/machine.rs b/rust/src/fvm/machine.rs index c12ae8e..03db5e1 100644 --- a/rust/src/fvm/machine.rs +++ b/rust/src/fvm/machine.rs @@ -374,6 +374,7 @@ fn fvm_machine_execute_message( let events_root = events_root.map(|cid| cid.to_bytes().into_boxed_slice().into()); + // TODO: Do something with the backtrace. Ok(FvmMachineExecuteResponse { exit_code: exit_code.value() as u64, return_val, @@ -529,6 +530,7 @@ fn build_lotus_trace( return_data: return_data.data, codec: return_data.codec, }; + return Ok(new_trace); } ExecutionEvent::CallError(syscall_err) => { diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 8fd99b1..8d83b4a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -24,4 +24,4 @@ fn build_headers() -> std::io::Result<()> { .generate()?; Ok(()) -} +} \ No newline at end of file diff --git a/rust/src/proofs/api.rs b/rust/src/proofs/api.rs index a74ec3d..ac46a44 100644 --- a/rust/src/proofs/api.rs +++ b/rust/src/proofs/api.rs @@ -3,8 +3,8 @@ use std::fs; use blstrs::Scalar as Fr; use filecoin_proofs_api::seal; use filecoin_proofs_api::{ - self as api, update, PieceInfo, SectorId, StorageProofsError, UnpaddedByteIndex, - UnpaddedBytesAmount, + self as api, update, PieceInfo, PrivateSectorPathInfo as api_PrivateSectorPathInfo, SectorId, + StorageProofsError, UnpaddedByteIndex, UnpaddedBytesAmount, }; use rayon::prelude::*; use safer_ffi::prelude::*; @@ -26,6 +26,8 @@ fn destroy_boxed_slice(ptr: c_slice::Box) { drop(ptr); } +use crate::util::api::init_log; + // A byte serialized representation of a vanilla proof. pub type ApiVanillaProof = Vec; @@ -130,8 +132,10 @@ fn seal_pre_commit_phase1( prover_id: &[u8; 32], ticket: &[u8; 32], pieces: c_slice::Ref<'_, PublicPieceInfo>, + has_deals: bool, ) -> repr_c::Box { catch_panic_response("seal_pre_commit_phase1", || { + init_log(); let public_pieces: Vec = pieces.iter().map(Into::into).collect(); let result = seal::seal_pre_commit_phase1( @@ -143,6 +147,7 @@ fn seal_pre_commit_phase1( SectorId::from(sector_id), *ticket, &public_pieces, + has_deals, )?; let result = serde_json::to_vec(&result)?; @@ -573,20 +578,65 @@ fn generate_single_vanilla_proof( challenges: c_slice::Ref<'_, u64>, ) -> repr_c::Box { catch_panic_response("generate_single_vanilla_proof", || { - let sector_id = SectorId::from(replica.sector_id); - let cache_dir_path = as_path_buf(&replica.cache_dir_path)?; - let replica_path = as_path_buf(&replica.replica_path)?; - - let replica_v1 = api::PrivateReplicaInfo::new( - replica.registered_proof.into(), - replica.comm_r, + // let replica_v1 = api::PrivateReplicaInfo::new( + // replica.registered_proof.into(), + // replica.comm_r, + // cache_dir_path, + // replica_path, + // ); + + let PrivateReplicaInfo { + registered_proof, cache_dir_path, + cache_in_oss, + cache_sector_path_info, + comm_r, + replica_path, + replica_in_oss, + replica_sector_path_info, + sector_id, + } = replica; + + let sector_id = SectorId::from(sector_id); + let cache_dir_path = as_path_buf(&cache_dir_path)?; + let replica_path = as_path_buf(&replica_path)?; + + let api_replica_sector_path_info = api_PrivateSectorPathInfo { + endpoints: String::from_utf8(replica_sector_path_info.endpoints.to_vec()).unwrap(), + landed_dir: as_path_buf(&replica_sector_path_info.landed_dir).unwrap(), + access_key: String::from_utf8(replica_sector_path_info.access_key.to_vec()).unwrap(), + secret_key: String::from_utf8(replica_sector_path_info.secret_key.to_vec()).unwrap(), + bucket_name: String::from_utf8(replica_sector_path_info.bucket_name.to_vec()).unwrap(), + sector_name: String::from_utf8(replica_sector_path_info.sector_name.to_vec()).unwrap(), + region: String::from_utf8(replica_sector_path_info.region.to_vec()).unwrap(), + multi_ranges: replica_sector_path_info.multi_ranges, + }; + + let api_cache_sector_path_info = api_PrivateSectorPathInfo { + endpoints: String::from_utf8(cache_sector_path_info.endpoints.to_vec()).unwrap(), + landed_dir: as_path_buf(&cache_sector_path_info.landed_dir).unwrap(), + access_key: String::from_utf8(cache_sector_path_info.access_key.to_vec()).unwrap(), + secret_key: String::from_utf8(cache_sector_path_info.secret_key.to_vec()).unwrap(), + bucket_name: String::from_utf8(cache_sector_path_info.bucket_name.to_vec()).unwrap(), + sector_name: String::from_utf8(cache_sector_path_info.sector_name.to_vec()).unwrap(), + region: String::from_utf8(cache_sector_path_info.region.to_vec()).unwrap(), + multi_ranges: cache_sector_path_info.multi_ranges, + }; + + let replica_v1 = api::PrivateReplicaInfo::new_with_oss_config( + registered_proof.into(), replica_path, + replica_in_oss, + api_replica_sector_path_info, + comm_r, + cache_dir_path, + cache_in_oss, + api_cache_sector_path_info, ); let result = filecoin_proofs_api::post::generate_single_vanilla_proof( replica.registered_proof.into(), - sector_id, + SectorId::from(replica.sector_id), &replica_v1, &challenges, )?; @@ -1822,6 +1872,7 @@ pub mod tests { &prover_id, &ticket, pieces[..].into(), + false, ); let resp_b2 = seal_pre_commit_phase2( @@ -2354,8 +2405,30 @@ pub mod tests { let private_replicas = [PrivateReplicaInfo { registered_proof: registered_proof_winning_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id, }]; @@ -2476,8 +2549,30 @@ pub mod tests { let private_replicas = [PrivateReplicaInfo { registered_proof: registered_proof_window_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id, }]; @@ -2515,8 +2610,30 @@ pub mod tests { let legacy_private_replicas = [PrivateReplicaInfo { registered_proof: legacy_registered_proof_window_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id, }]; @@ -2587,15 +2704,59 @@ pub mod tests { PrivateReplicaInfo { registered_proof: registered_proof_window_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id, }, PrivateReplicaInfo { registered_proof: registered_proof_window_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id: sector_id2, }, ]; @@ -2934,6 +3095,7 @@ pub mod tests { &prover_id, &ticket, pieces[..].into(), + false, ); if resp_b1.status_code != FCPResponseStatus::NoError { @@ -2960,8 +3122,30 @@ pub mod tests { let private_replicas = [PrivateReplicaInfo { registered_proof: registered_proof_window_post, cache_dir_path: cache_dir_path_ref.to_vec().into_boxed_slice().into(), + cache_in_oss: false, + cache_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, comm_r: resp_b2.comm_r, replica_path: faulty_sealed_path_ref.to_vec().into_boxed_slice().into(), + replica_in_oss: false, + replica_sector_path_info: PrivateSectorPathInfo { + endpoints: Vec::from("".as_bytes()).into_boxed_slice().into(), + access_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + secret_key: Vec::from("".as_bytes()).into_boxed_slice().into(), + bucket_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + landed_dir: Vec::from("".as_bytes()).into_boxed_slice().into(), + sector_name: Vec::from("".as_bytes()).into_boxed_slice().into(), + region: Vec::from("".as_bytes()).into_boxed_slice().into(), + multi_ranges: false, + }, sector_id, }]; @@ -3123,6 +3307,7 @@ pub mod tests { &prover_id, &ticket, pieces[..].into(), + false, ); if resp_b1.status_code != FCPResponseStatus::NoError { diff --git a/rust/src/proofs/helpers.rs b/rust/src/proofs/helpers.rs index f70a003..b2782f1 100644 --- a/rust/src/proofs/helpers.rs +++ b/rust/src/proofs/helpers.rs @@ -2,11 +2,19 @@ use std::collections::btree_map::BTreeMap; use anyhow::Result; use filecoin_proofs_api::{self as api, SectorId}; +use filecoin_proofs_api::{ + PrivateReplicaInfo as api_PrivateReplicaInfo, + PrivateSectorPathInfo as api_PrivateSectorPathInfo, + // PublicReplicaInfo as api_PublicReplicaInfo, +}; use safer_ffi::prelude::*; -use super::types::{PrivateReplicaInfo, PublicReplicaInfo, RegisteredPoStProof}; use crate::util::types::as_path_buf; +use super::types::{ + PrivateReplicaInfo, PrivateReplicaInfoTmp, PublicReplicaInfo, RegisteredPoStProof, +}; + #[derive(Debug, Clone)] struct PublicReplicaInfoTmp { pub registered_proof: RegisteredPoStProof, @@ -45,15 +53,6 @@ pub fn to_public_replica_info_map( .collect() } -#[derive(Debug, Clone)] -struct PrivateReplicaInfoTmp { - pub registered_proof: RegisteredPoStProof, - pub cache_dir_path: std::path::PathBuf, - pub comm_r: [u8; 32], - pub replica_path: std::path::PathBuf, - pub sector_id: u64, -} - pub fn to_private_replica_info_map( replicas: c_slice::Ref, ) -> Result> { @@ -62,14 +61,15 @@ pub fn to_private_replica_info_map( let replicas: Vec<_> = replicas .iter() .map(|ffi_info| { - let cache_dir_path = as_path_buf(&ffi_info.cache_dir_path)?; - let replica_path = as_path_buf(&ffi_info.replica_path)?; - Ok(PrivateReplicaInfoTmp { registered_proof: ffi_info.registered_proof, - cache_dir_path, + cache_dir_path: as_path_buf(&ffi_info.cache_dir_path).unwrap(), + cache_in_oss: ffi_info.cache_in_oss, + cache_sector_path_info: ffi_info.cache_sector_path_info.clone(), comm_r: ffi_info.comm_r, - replica_path, + replica_path: as_path_buf(&ffi_info.replica_path).unwrap(), + replica_in_oss: ffi_info.replica_in_oss, + replica_sector_path_info: ffi_info.replica_sector_path_info.clone(), sector_id: ffi_info.sector_id, }) }) @@ -81,18 +81,54 @@ pub fn to_private_replica_info_map( let PrivateReplicaInfoTmp { registered_proof, cache_dir_path, + cache_in_oss, + cache_sector_path_info, comm_r, replica_path, + replica_in_oss, + replica_sector_path_info, sector_id, } = info; + let api_replica_sector_path_info = api_PrivateSectorPathInfo { + endpoints: String::from_utf8(replica_sector_path_info.endpoints.to_vec()).unwrap(), + landed_dir: as_path_buf(&replica_sector_path_info.landed_dir).unwrap(), + access_key: String::from_utf8(replica_sector_path_info.access_key.to_vec()) + .unwrap(), + secret_key: String::from_utf8(replica_sector_path_info.secret_key.to_vec()) + .unwrap(), + bucket_name: String::from_utf8(replica_sector_path_info.bucket_name.to_vec()) + .unwrap(), + sector_name: String::from_utf8(replica_sector_path_info.sector_name.to_vec()) + .unwrap(), + region: String::from_utf8(replica_sector_path_info.region.to_vec()).unwrap(), + multi_ranges: replica_sector_path_info.multi_ranges, + }; + + let api_cache_sector_path_info = api_PrivateSectorPathInfo { + endpoints: String::from_utf8(cache_sector_path_info.endpoints.to_vec()).unwrap(), + landed_dir: as_path_buf(&cache_sector_path_info.landed_dir).unwrap(), + access_key: String::from_utf8(cache_sector_path_info.access_key.to_vec()).unwrap(), + secret_key: String::from_utf8(cache_sector_path_info.secret_key.to_vec()).unwrap(), + bucket_name: String::from_utf8(cache_sector_path_info.bucket_name.to_vec()) + .unwrap(), + sector_name: String::from_utf8(cache_sector_path_info.sector_name.to_vec()) + .unwrap(), + region: String::from_utf8(cache_sector_path_info.region.to_vec()).unwrap(), + multi_ranges: cache_sector_path_info.multi_ranges, + }; + ( SectorId::from(sector_id), - api::PrivateReplicaInfo::new( + api_PrivateReplicaInfo::new_with_oss_config( registered_proof.into(), + replica_path, + replica_in_oss, + api_replica_sector_path_info, comm_r, cache_dir_path, - replica_path, + cache_in_oss, + api_cache_sector_path_info, ), ) }) diff --git a/rust/src/proofs/types.rs b/rust/src/proofs/types.rs index d8bbe4e..1822042 100644 --- a/rust/src/proofs/types.rs +++ b/rust/src/proofs/types.rs @@ -1,10 +1,9 @@ use std::io::SeekFrom; +use crate::util::types::Result; use filecoin_proofs_api as api; use safer_ffi::prelude::*; -use crate::util::types::Result; - /// FileDescriptorRef does not drop its file descriptor when it is dropped. Its /// owner must manage the lifecycle of the file descriptor. pub struct FileDescriptorRef(std::mem::ManuallyDrop); @@ -406,12 +405,30 @@ pub type ApiPartitionProof = c_slice::Box; #[derive_ReprC] #[repr(C)] -#[derive(Clone)] +#[derive(Debug, Clone)] +pub struct PrivateSectorPathInfo { + pub endpoints: c_slice::Box, // split by comma(,) + pub access_key: c_slice::Box, + pub secret_key: c_slice::Box, + pub bucket_name: c_slice::Box, + pub landed_dir: c_slice::Box, + pub sector_name: c_slice::Box, + pub region: c_slice::Box, + pub multi_ranges: bool, +} + +#[derive_ReprC] +#[repr(C)] +#[derive(Debug, Clone)] pub struct PrivateReplicaInfo { pub registered_proof: RegisteredPoStProof, pub cache_dir_path: c_slice::Box, + pub cache_in_oss: bool, + pub cache_sector_path_info: PrivateSectorPathInfo, pub comm_r: [u8; 32], pub replica_path: c_slice::Box, + pub replica_in_oss: bool, + pub replica_sector_path_info: PrivateSectorPathInfo, pub sector_id: u64, } @@ -497,6 +514,19 @@ pub type GenerateTreeRLastResponse = Result<[u8; 32]>; pub type GenerateTreeCResponse = Result<[u8; 32]>; +#[derive(Debug)] +pub struct PrivateReplicaInfoTmp { + pub registered_proof: RegisteredPoStProof, + pub cache_dir_path: std::path::PathBuf, + pub cache_in_oss: bool, + pub cache_sector_path_info: PrivateSectorPathInfo, + pub comm_r: [u8; 32], + pub replica_path: std::path::PathBuf, + pub replica_in_oss: bool, + pub replica_sector_path_info: PrivateSectorPathInfo, + pub sector_id: u64, +} + #[derive_ReprC] #[repr(C)] pub struct SealPreCommitPhase2 { diff --git a/rust/src/util/api.rs b/rust/src/util/api.rs index 35f9afa..b2bb6c8 100644 --- a/rust/src/util/api.rs +++ b/rust/src/util/api.rs @@ -1,5 +1,8 @@ use std::fs::File; -use std::os::unix::io::FromRawFd; +use std::fs::OpenOptions; +use std::path::PathBuf; + +// use std::os::unix::io::FromRawFd; use std::sync::Once; use anyhow::anyhow; @@ -7,7 +10,7 @@ use safer_ffi::prelude::*; use safer_ffi::slice::slice_boxed; use super::types::{ - catch_panic_response, catch_panic_response_no_log, GpuDeviceResponse, InitLogFdResponse, + catch_panic_response, GpuDeviceResponse, InitLogFdResponse, }; /// Protects the init off the logger. @@ -67,10 +70,19 @@ pub fn get_gpu_devices() -> repr_c::Box { /// This function must be called right at the start, before any other call. Else the logger will /// be initializes implicitely and log to stderr. #[ffi_export] -pub fn init_log_fd(log_fd: libc::c_int) -> repr_c::Box { - catch_panic_response_no_log(|| { - let file = unsafe { File::from_raw_fd(log_fd) }; - +pub fn init_log_fd(log_fd: libc::c_int) -> repr_c::Box { + catch_panic_response("init_log_fd",|| { + // let file = File::from_raw_fd(log_fd); + let log_file_path = match std::env::var("GOLOG_FILE") { + Ok(file_path) => { + let mut path = PathBuf::from(file_path); + path.set_file_name("rust-".to_owned() + &path.file_name().unwrap().to_os_string().into_string().unwrap()); + path + }, + Err(_) => PathBuf::from("/var/log/lotus/rust-log.log"), + }; + let file = OpenOptions::new().read(true).write(true).create(true).open(log_file_path).unwrap(); + let mut response = InitLogFdResponse::default(); if init_log_with_file(file).is_none() { return Err(anyhow!("There is already an active logger. `init_log_fd()` needs to be called before any other FFI function is called.")); } diff --git a/rust/src/util/mod.rs b/rust/src/util/mod.rs index 8389f11..7b111ef 100644 --- a/rust/src/util/mod.rs +++ b/rust/src/util/mod.rs @@ -1,2 +1,4 @@ pub mod api; +#[macro_use] +pub mod rpc; pub mod types; diff --git a/rust/src/util/rpc.rs b/rust/src/util/rpc.rs new file mode 100644 index 0000000..c236917 --- /dev/null +++ b/rust/src/util/rpc.rs @@ -0,0 +1,69 @@ +/* +use std::{thread, time}; + +use filecoin_webapi::polling::PollingState; +use log::{info, trace}; +use serde::ser::Serialize; +use serde_json::value::from_value; +use serde_json::{json, Value}; + +lazy_static! { + static ref REQWEST_CLIENT: Client = Client::builder() + .timeout(time::Duration::from_secs(30)) + .build() + .expect("cannot create http client"); + static ref HOST: String = env::var("FFI_REMOTE_COMMIT2_BASE_URL").unwrap(); +} + +#[allow(dead_code)] +pub(crate) fn webapi_post(path: &str, json: &T) -> Result { + let post = REQWEST_CLIENT.post(&format!("http://{}/{}", &*HOST, path)); + let response = post + .json(json) + .send() + .map_err(|e| format!("{:?}", e))? + .text() + .map_err(|e| format!("{:?}", e))?; + let value: Value = serde_json::from_str(&response).map_err(|e| format!("{:?}", e))?; + + if value.get("Err").is_some() { + return Err(format!("{:?}", value)); + } + + return Ok(value); +} + +#[allow(dead_code)] +pub(crate) fn webapi_post_polling(path: &str, json: &T) -> Result { + let state: PollingState = from_value(webapi_post(path, json)?).map_err(|e| format!("{:?}", e))?; + info!("webapi_post_polling request state: {:?}", state); + let proc_id = match state { + PollingState::Started(val) => val, + _ => { + return Err(format!("webapi_post_polling response error: {:?}", state)); + } + }; + + loop { + let poll_state: PollingState = + from_value(webapi_post("sys/query_state", &json!(proc_id))?).map_err(|e| format!("{:?}", e))?; + trace!("webapi_post_polling poll_state: {:?}", poll_state); + match poll_state { + PollingState::Done(result) => return Ok(result), + PollingState::Pending => {} + e @ _ => return Err(format!("poll_state error: {:?}", e)), + } + + // sleep 30s + let time = time::Duration::from_secs(30); + thread::sleep(time); + } +} + +#[allow(dead_code)] +macro_rules! webapi_post_polling { + ($path:literal, $json:expr) => { + crate::util::rpc::webapi_post_polling($path, $json); + }; +} +*/ diff --git a/types.go b/types.go index 66692af..9a7c0e5 100644 --- a/types.go +++ b/types.go @@ -128,11 +128,26 @@ type publicSectorInfo struct { SectorNum abi.SectorNumber } +type PrivateSectorPathInfo struct { + Endpoints string + AccessKey string + SecretKey string + BucketName string + LandedDir string + SectorName string + Region string + MultiRanges bool +} + type PrivateSectorInfo struct { proof.SectorInfo - CacheDirPath string - PoStProofType abi.RegisteredPoStProof - SealedSectorPath string + CacheDirPath string + CacheInOss bool + CacheSectorPathInfo PrivateSectorPathInfo + PoStProofType abi.RegisteredPoStProof + SealedSectorPath string + SealedInOss bool + SealedSectorPathInfo PrivateSectorPathInfo } // AllocationManager is an interface that provides Free() capability. diff --git a/workflows.go b/workflows.go index bf0a7b3..eccb884 100644 --- a/workflows.go +++ b/workflows.go @@ -122,7 +122,7 @@ func WorkflowProofsLifecycle(t TestHelper) { t.RequireNoError(err) // pre-commit the sector - sealPreCommitPhase1Output, err := SealPreCommitPhase1(sealProofType, sectorCacheDirPath, stagedSectorFile.Name(), sealedSectorFile.Name(), sectorNum, minerID, ticket, publicPieces) + sealPreCommitPhase1Output, err := SealPreCommitPhase1(sealProofType, sectorCacheDirPath, stagedSectorFile.Name(), sealedSectorFile.Name(), sectorNum, minerID, ticket, publicPieces, false) t.RequireNoError(err) sealedCID, unsealedCID, err := SealPreCommitPhase2(sealPreCommitPhase1Output, sectorCacheDirPath, sealedSectorFile.Name())