diff --git a/.circleci/config.yml b/.circleci/config.yml index f02395e2..368e3b46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ orbs: executors: golang: docker: - - image: circleci/golang:1.13 + - image: circleci/golang:1.16.4 resource_class: 2xlarge rust: docker: @@ -32,7 +32,7 @@ jobs: - go/mod-download - go/install-golangci-lint: gobin: $HOME/.local/bin - version: 1.32.0 + version: 1.44.2 - run: command: make go-lint @@ -109,6 +109,7 @@ jobs: - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - run: cd rust && rustup install $(cat rust-toolchain) - run: cd rust && rustup default $(cat rust-toolchain) + - run: cd rust && rustup target add wasm32-unknown-unknown - run: cd rust && rustup component add rustfmt - run: cd rust && rustup component add clippy - run: cd rust && cargo fetch @@ -145,6 +146,7 @@ jobs: - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - run: cd rust && rustup install $(cat rust-toolchain) - run: cd rust && rustup default $(cat rust-toolchain) + - run: cd rust && rustup target add wasm32-unknown-unknown - run: cd rust && rustup component add rustfmt - run: cd rust && rustup component add clippy - run: cd rust && cargo fetch @@ -209,7 +211,7 @@ commands: - run: name: Install Go command: | - curl https://dl.google.com/go/go1.13.7.darwin-amd64.pkg -o /tmp/go.pkg && \ + curl https://dl.google.com/go/go1.16.4.darwin-amd64.pkg -o /tmp/go.pkg && \ sudo installer -pkg /tmp/go.pkg -target / go version - run: diff --git a/bls.go b/bls.go index 4f436e86..e639a1b5 100644 --- a/bls.go +++ b/bls.go @@ -1,8 +1,10 @@ -//+build cgo +//go:build cgo +// +build cgo package ffi -// #cgo LDFLAGS: ${SRCDIR}/libfilcrypto.a +// #cgo linux LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-unresolved-symbols=ignore-all +// #cgo darwin LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-undefined,dynamic_lookup // #cgo pkg-config: ${SRCDIR}/filcrypto.pc // #include "./filcrypto.h" import "C" diff --git a/cgo/blockstore.go b/cgo/blockstore.go new file mode 100644 index 00000000..cc9d347f --- /dev/null +++ b/cgo/blockstore.go @@ -0,0 +1,130 @@ +package cgo + +import ( + "unsafe" + + blocks "github.com/ipfs/go-block-format" + "github.com/ipfs/go-cid" + blockstore "github.com/ipfs/go-ipfs-blockstore" +) + +/* +#include +typedef const uint8_t* buf_t; +*/ +import "C" + +func toCid(k C.buf_t, kLen C.int32_t) cid.Cid { + type cidRepr struct { + str string + } + return *(*cid.Cid)(unsafe.Pointer(&cidRepr{ + str: C.GoStringN((*C.char)(unsafe.Pointer(k)), kLen), + })) +} + +//export cgo_blockstore_get +func cgo_blockstore_get(handle C.uint64_t, k C.buf_t, kLen C.int32_t, block **C.uint8_t, size *C.int32_t) C.int32_t { + c := toCid(k, kLen) + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + + err := externs.View(ctx, c, func(data []byte) error { + *block = (C.buf_t)(C.CBytes(data)) + *size = C.int32_t(len(data)) + return nil + }) + + switch err { + case nil: + return 0 + case blockstore.ErrNotFound: + return ErrNotFound + default: + return ErrIO + } +} + +//export cgo_blockstore_put +func cgo_blockstore_put(handle C.uint64_t, k C.buf_t, kLen C.int32_t, block C.buf_t, blockLen C.int32_t) C.int32_t { + c := toCid(k, kLen) + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + b, _ := blocks.NewBlockWithCid(C.GoBytes(unsafe.Pointer(block), blockLen), c) + if externs.Put(ctx, b) != nil { + return ErrIO + } + return 0 +} + +//export cgo_blockstore_put_many +func cgo_blockstore_put_many(handle C.uint64_t, lengths *C.int32_t, lengthsLen C.int32_t, blockBuf C.buf_t) C.int32_t { + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + // Get a reference to the lengths vector without copying. + const MAX_LEN = 1 << 30 + if lengthsLen > MAX_LEN { + return ErrInvalidArgument + } + + lengthsGo := (*[MAX_LEN]C.int32_t)(unsafe.Pointer(lengths))[:lengthsLen:lengthsLen] + blocksGo := make([]blocks.Block, 0, lengthsLen) + for _, length := range lengthsGo { + if length > MAX_LEN { + return ErrInvalidArgument + } + // get the next buffer. We could use C.GoBytes, but that copies. + buf := (*[MAX_LEN]byte)(unsafe.Pointer(blockBuf))[:length:length] + + // read the CID. This function will copy the CID internally. + cidLen, k, err := cid.CidFromBytes(buf) + if err != nil { + return ErrInvalidArgument + } + buf = buf[cidLen:] + + // Read the block and copy it. Unfortunately, our blockstore makes no guarantees + // about not holding onto blocks. + block := make([]byte, len(buf)) + copy(block, buf) + b, _ := blocks.NewBlockWithCid(block, k) + + // Add it to the batch. + blocksGo = append(blocksGo, b) + + // Advance the block buffer. + blockBuf = (C.buf_t)(unsafe.Pointer(uintptr(unsafe.Pointer(blockBuf)) + uintptr(length))) + } + if externs.PutMany(ctx, blocksGo) != nil { + return ErrIO + } + return 0 +} + +//export cgo_blockstore_has +func cgo_blockstore_has(handle C.uint64_t, k C.buf_t, kLen C.int32_t) C.int32_t { + c := toCid(k, kLen) + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + has, err := externs.Has(ctx, c) + switch err { + case nil: + case blockstore.ErrNotFound: + // Some old blockstores still return this. + return 0 + default: + return ErrIO + } + if has { + return 1 + } + return 0 +} diff --git a/cgo/errors.go b/cgo/errors.go new file mode 100644 index 00000000..ac9c8cf7 --- /dev/null +++ b/cgo/errors.go @@ -0,0 +1,14 @@ +package cgo + +// #cgo linux LDFLAGS: ${SRCDIR}/../libfilcrypto.a -Wl,-unresolved-symbols=ignore-all +// #cgo darwin LDFLAGS: ${SRCDIR}/../libfilcrypto.a -Wl,-undefined,dynamic_lookup +// #cgo pkg-config: ${SRCDIR}/../filcrypto.pc +// #include "../filcrypto.h" +import "C" + +const ( + ErrInvalidHandle = C.ERR_INVALID_HANDLE + ErrNotFound = C.ERR_NOT_FOUND + ErrIO = C.ERR_IO + ErrInvalidArgument = C.ERR_INVALID_ARGUMENT +) diff --git a/cgo/extern.go b/cgo/extern.go new file mode 100644 index 00000000..bc844a93 --- /dev/null +++ b/cgo/extern.go @@ -0,0 +1,97 @@ +package cgo + +/* +#include +typedef const uint8_t* buf_t; +*/ +import "C" +import ( + "unsafe" + + "github.com/filecoin-project/go-address" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/crypto" +) + +//export cgo_extern_get_chain_randomness +func cgo_extern_get_chain_randomness( + handle C.uint64_t, pers C.int64_t, round C.int64_t, + entropy C.buf_t, entropyLen C.int32_t, + output C.buf_t, +) C.int32_t { + out := (*[32]byte)(unsafe.Pointer(output)) + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + + rand, err := externs.GetChainRandomness(ctx, crypto.DomainSeparationTag(pers), abi.ChainEpoch(round), C.GoBytes(unsafe.Pointer(entropy), entropyLen)) + + switch err { + case nil: + copy(out[:], rand) + return 0 + default: + return ErrIO + } +} + +//export cgo_extern_get_beacon_randomness +func cgo_extern_get_beacon_randomness( + handle C.uint64_t, pers C.int64_t, round C.int64_t, + entropy C.buf_t, entropyLen C.int32_t, + output C.buf_t, +) C.int32_t { + out := (*[32]byte)(unsafe.Pointer(output)) + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + + rand, err := externs.GetBeaconRandomness(ctx, crypto.DomainSeparationTag(pers), abi.ChainEpoch(round), C.GoBytes(unsafe.Pointer(entropy), entropyLen)) + + switch err { + case nil: + copy(out[:], rand) + return 0 + default: + return ErrIO + } +} + +//export cgo_extern_verify_consensus_fault +func cgo_extern_verify_consensus_fault( + handle C.uint64_t, + h1 C.buf_t, h1Len C.int32_t, + h2 C.buf_t, h2Len C.int32_t, + extra C.buf_t, extraLen C.int32_t, + minerIdOut *C.uint64_t, + epochOut *C.int64_t, + faultOut *C.int64_t, + gasUsedOut *C.int64_t, +) C.int32_t { + externs, ctx := Lookup(uint64(handle)) + if externs == nil { + return ErrInvalidHandle + } + + h1Go := C.GoBytes(unsafe.Pointer(h1), h1Len) + h2Go := C.GoBytes(unsafe.Pointer(h2), h2Len) + extraGo := C.GoBytes(unsafe.Pointer(extra), extraLen) + + res, gas := externs.VerifyConsensusFault(ctx, h1Go, h2Go, extraGo) + *gasUsedOut = C.int64_t(gas) + *faultOut = C.int64_t(res.Type) + + if res.Type != ConsensusFaultNone { + id, err := address.IDFromAddress(res.Target) + if err != nil { + return ErrIO + } + *epochOut = C.int64_t(res.Epoch) + *minerIdOut = C.uint64_t(id) + } + + return 0 +} diff --git a/cgo/interface.go b/cgo/interface.go new file mode 100644 index 00000000..2edde746 --- /dev/null +++ b/cgo/interface.go @@ -0,0 +1,37 @@ +package cgo + +import ( + "context" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/crypto" + blockstore "github.com/ipfs/go-ipfs-blockstore" +) + +type ConsensusFault struct { + // Address of the miner at fault (always an ID address). + Target address.Address + // Epoch of the fault, which is the higher epoch of the two blocks causing it. + Epoch abi.ChainEpoch + // Type of fault. + Type ConsensusFaultType +} + +type ConsensusFaultType int64 + +const ( + ConsensusFaultNone ConsensusFaultType = 0 + ConsensusFaultDoubleForkMining ConsensusFaultType = 1 + ConsensusFaultParentGrinding ConsensusFaultType = 2 + ConsensusFaultTimeOffsetMining ConsensusFaultType = 3 +) + +type Externs interface { + GetChainRandomness(ctx context.Context, personalization crypto.DomainSeparationTag, epoch abi.ChainEpoch, entropy []byte) ([]byte, error) + GetBeaconRandomness(ctx context.Context, personalization crypto.DomainSeparationTag, epoch abi.ChainEpoch, entropy []byte) ([]byte, error) + VerifyConsensusFault(ctx context.Context, h1, h2, extra []byte) (*ConsensusFault, int64) + + blockstore.Blockstore + blockstore.Viewer +} diff --git a/cgo/registry.go b/cgo/registry.go new file mode 100644 index 00000000..ea02672f --- /dev/null +++ b/cgo/registry.go @@ -0,0 +1,49 @@ +package cgo + +import ( + "context" + "sync" +) + +var ( + mu sync.RWMutex + registry map[uint64]registeredExterns + nextId uint64 +) + +type registeredExterns struct { + context.Context + Externs +} + +// Register a new item and get a handle. +func Register(ctx context.Context, externs Externs) uint64 { + mu.Lock() + defer mu.Unlock() + if registry == nil { + registry = make(map[uint64]registeredExterns) + } + id := nextId + nextId++ + registry[id] = registeredExterns{ctx, externs} + return id +} + +// Unregister a blockstore. +// +// WARNING: This method must be called at most _once_ with a handle previously returned by Register. +func Unregister(handle uint64) { + mu.Lock() + defer mu.Unlock() + + delete(registry, handle) +} + +// Lookup a blockstore by handle. +func Lookup(handle uint64) (Externs, context.Context) { + mu.RLock() + externs := registry[handle] + mu.RUnlock() + + return externs.Externs, externs.Context +} diff --git a/filcrypto.yml b/filcrypto.yml index 7428b663..aca48a51 100644 --- a/filcrypto.yml +++ b/filcrypto.yml @@ -8,8 +8,19 @@ GENERATOR: Includes: - ../filcrypto.h FlagGroups: - - {name: LDFLAGS, flags: ["-L${SRCDIR}/.."]} - - {name: pkg-config, flags: ["${SRCDIR}/../filcrypto.pc"]} + - name: LDFLAGS + traits: ["linux"] + flags: + - "-L${SRCDIR}/.." + - "-Wl,-unresolved-symbols=ignore-all" + - name: LDFLAGS + traits: ["darwin"] + flags: + - "-L${SRCDIR}/.." + - "-Wl,-undefined,dynamic_lookup" + - name: pkg-config + flags: + - "${SRCDIR}/../filcrypto.pc" PARSER: Defines: diff --git a/fvm.go b/fvm.go new file mode 100644 index 00000000..2e3fba85 --- /dev/null +++ b/fvm.go @@ -0,0 +1,206 @@ +//go:build cgo && (amd64 || arm64 || riscv64) +// +build cgo +// +build amd64 arm64 riscv64 + +package ffi + +// #cgo linux LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-unresolved-symbols=ignore-all +// #cgo darwin LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-undefined,dynamic_lookup +// #cgo pkg-config: ${SRCDIR}/filcrypto.pc +// #include "./filcrypto.h" +import "C" +import ( + "context" + gobig "math/big" + "runtime" + "unsafe" + + "github.com/filecoin-project/filecoin-ffi/cgo" + "github.com/filecoin-project/filecoin-ffi/generated" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/network" + "github.com/ipfs/go-cid" + "golang.org/x/xerrors" +) + +type FVM struct { + executor unsafe.Pointer +} + +const ( + applyExplicit = iota + applyImplicit +) + +type FVMOpts struct { + FVMVersion uint64 + Externs cgo.Externs + + Epoch abi.ChainEpoch + BaseFee abi.TokenAmount + BaseCircSupply abi.TokenAmount + NetworkVersion network.Version + StateBase cid.Cid +} + +// CreateFVM creates a new FVM instance. +func CreateFVM(opts *FVMOpts) (*FVM, error) { + baseFeeHi, baseFeeLo, err := splitBigInt(opts.BaseFee) + if err != nil { + return nil, xerrors.Errorf("invalid basefee: %w", err) + } + baseCircSupplyHi, baseCircSupplyLo, err := splitBigInt(opts.BaseCircSupply) + if err != nil { + return nil, xerrors.Errorf("invalid circ supply: %w", err) + } + + exHandle := cgo.Register(context.TODO(), opts.Externs) + resp := generated.FilCreateFvmMachine(generated.FilFvmRegisteredVersion(opts.FVMVersion), + uint64(opts.Epoch), + baseFeeHi, + baseFeeLo, + baseCircSupplyHi, + baseCircSupplyLo, + uint64(opts.NetworkVersion), + opts.StateBase.Bytes(), + uint(opts.StateBase.ByteLen()), + exHandle, exHandle, + ) + resp.Deref() + + defer generated.FilDestroyCreateFvmMachineResponse(resp) + + if resp.StatusCode != generated.FCPResponseStatusFCPNoError { + return nil, xerrors.New(generated.RawString(resp.ErrorMsg).Copy()) + } + + fvm := &FVM{ + executor: resp.Executor, + } + runtime.SetFinalizer(fvm, func(f *FVM) { + // Just to be extra safe + if f.executor == nil { + return + } + + executor := f.executor + f.executor = nil + generated.FilDropFvmMachine(executor) + cgo.Unregister(exHandle) + }) + + return fvm, nil +} + +func (f *FVM) ApplyMessage(msgBytes []byte, chainLen uint) (*ApplyRet, error) { + // NOTE: we need to call KeepAlive here (and below) because go doesn't guarantee that the + // receiver will live to the end of the function. If we don't do this, go _will_ garbage + // collect the FVM, causing us to run the finalizer while we're in the middle of using the + // FVM. + defer runtime.KeepAlive(f) + resp := generated.FilFvmMachineExecuteMessage(f.executor, + msgBytes, + uint(len(msgBytes)), + uint64(chainLen), + applyExplicit, + ) + resp.Deref() + + defer generated.FilDestroyFvmMachineExecuteResponse(resp) + + if resp.StatusCode != generated.FCPResponseStatusFCPNoError { + return nil, xerrors.New(generated.RawString(resp.ErrorMsg).Copy()) + } + + return &ApplyRet{ + Return: copyBytes(resp.ReturnPtr, resp.ReturnLen), + ExitCode: resp.ExitCode, + GasUsed: int64(resp.GasUsed), + MinerPenalty: reformBigInt(resp.PenaltyHi, resp.PenaltyLo), + MinerTip: reformBigInt(resp.MinerTipHi, resp.MinerTipLo), + }, nil +} + +func (f *FVM) ApplyImplicitMessage(msgBytes []byte) (*ApplyRet, error) { + defer runtime.KeepAlive(f) + resp := generated.FilFvmMachineExecuteMessage(f.executor, + msgBytes, + uint(len(msgBytes)), + 0, // this isn't an on-chain message, so it has no chain length. + applyImplicit, + ) + resp.Deref() + + defer generated.FilDestroyFvmMachineExecuteResponse(resp) + + if resp.StatusCode != generated.FCPResponseStatusFCPNoError { + return nil, xerrors.New(generated.RawString(resp.ErrorMsg).Copy()) + } + + return &ApplyRet{ + Return: copyBytes(resp.ReturnPtr, resp.ReturnLen), + ExitCode: resp.ExitCode, + GasUsed: int64(resp.GasUsed), + MinerPenalty: reformBigInt(resp.PenaltyHi, resp.PenaltyLo), + MinerTip: reformBigInt(resp.MinerTipHi, resp.MinerTipLo), + }, nil +} + +func (f *FVM) Flush() (cid.Cid, error) { + defer runtime.KeepAlive(f) + resp := generated.FilFvmMachineFlush(f.executor) + resp.Deref() + + defer generated.FilDestroyFvmMachineFlushResponse(resp) + + if resp.StatusCode != generated.FCPResponseStatusFCPNoError { + return cid.Undef, xerrors.New(generated.RawString(resp.ErrorMsg).Copy()) + } + + // cast will copy internally. + return cid.Cast(resp.StateRootPtr[:resp.StateRootLen]) +} + +type ApplyRet struct { + Return []byte + ExitCode uint64 + GasUsed int64 + MinerPenalty abi.TokenAmount + MinerTip abi.TokenAmount +} + +// NOTE: We only support 64bit platforms + +// returns hi, lo +func splitBigInt(i big.Int) (hi uint64, lo uint64, err error) { + if i.Sign() < 0 { + return 0, 0, xerrors.Errorf("negative number: %s", i) + } + words := i.Bits() + switch len(words) { + case 2: + hi = uint64(words[1]) + fallthrough + case 1: + lo = uint64(words[0]) + case 0: + default: + return 0, 0, xerrors.Errorf("exceeds max bigint size: %s", i) + } + return hi, lo, nil +} + +func reformBigInt(hi, lo uint64) big.Int { + var words []gobig.Word + if hi > 0 { + words = []gobig.Word{gobig.Word(lo), gobig.Word(hi)} + } else if lo > 0 { + words = []gobig.Word{gobig.Word(lo)} + } else { + return big.Zero() + } + int := new(gobig.Int) + int.SetBits(words) + return big.NewFromGo(int) +} diff --git a/fvm_test.go b/fvm_test.go new file mode 100644 index 00000000..220ca84b --- /dev/null +++ b/fvm_test.go @@ -0,0 +1,36 @@ +package ffi + +import ( + "math" + "testing" + + "github.com/filecoin-project/go-state-types/big" + "github.com/stretchr/testify/require" +) + +func checkSplitBigInt(t *testing.T, i big.Int, hi, lo uint64) { + hiA, loA, err := splitBigInt(i) + require.NoError(t, err) + require.Equal(t, hi, hiA, "hi not equal") + require.Equal(t, lo, loA, "lo not equal") +} + +func TestSplitBigIntZero(t *testing.T) { + checkSplitBigInt(t, big.Zero(), 0, 0) +} + +func TestSplitBigIntOne(t *testing.T) { + checkSplitBigInt(t, big.NewInt(1), 0, 1) +} + +func TestSplitBigIntMax64(t *testing.T) { + checkSplitBigInt(t, big.NewIntUnsigned(math.MaxUint64), 0, math.MaxUint64) +} + +func TestSplitBigIntLarge(t *testing.T) { + checkSplitBigInt(t, big.Mul(big.NewIntUnsigned(math.MaxUint64), big.NewInt(8)), 0x7, math.MaxUint64^0x7) +} +func TestSplitBigIntNeg(t *testing.T) { + _, _, err := splitBigInt(big.NewInt(-1)) + require.Error(t, err) +} diff --git a/generated/cgo_helpers.go b/generated/cgo_helpers.go index 62ea7c21..78920e59 100644 --- a/generated/cgo_helpers.go +++ b/generated/cgo_helpers.go @@ -4,7 +4,8 @@ package generated /* -#cgo LDFLAGS: -L${SRCDIR}/.. +#cgo linux LDFLAGS: -L${SRCDIR}/.. -Wl,-unresolved-symbols=ignore-all +#cgo darwin LDFLAGS: -L${SRCDIR}/.. -Wl,-undefined,dynamic_lookup #cgo pkg-config: ${SRCDIR}/../filcrypto.pc #include "../filcrypto.h" #include @@ -68,6 +69,168 @@ func (a *cgoAllocMap) Free() { a.mux.Unlock() } +// allocFilBLSDigestMemory allocates memory for type C.fil_BLSDigest in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilBLSDigestMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSDigestValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilBLSDigestValue = unsafe.Sizeof([1]C.fil_BLSDigest{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSDigest) Ref() *C.fil_BLSDigest { + if x == nil { + return nil + } + return x.ref215fc78c +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSDigest) Free() { + if x != nil && x.allocs215fc78c != nil { + x.allocs215fc78c.(*cgoAllocMap).Free() + x.ref215fc78c = nil + } +} + +// NewFilBLSDigestRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSDigestRef(ref unsafe.Pointer) *FilBLSDigest { + if ref == nil { + return nil + } + obj := new(FilBLSDigest) + obj.ref215fc78c = (*C.fil_BLSDigest)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSDigest) PassRef() (*C.fil_BLSDigest, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref215fc78c != nil { + return x.ref215fc78c, nil + } + mem215fc78c := allocFilBLSDigestMemory(1) + ref215fc78c := (*C.fil_BLSDigest)(mem215fc78c) + allocs215fc78c := new(cgoAllocMap) + allocs215fc78c.Add(mem215fc78c) + + var cinner_allocs *cgoAllocMap + ref215fc78c.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs215fc78c.Borrow(cinner_allocs) + + x.ref215fc78c = ref215fc78c + x.allocs215fc78c = allocs215fc78c + return ref215fc78c, allocs215fc78c + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSDigest) PassValue() (C.fil_BLSDigest, *cgoAllocMap) { + if x.ref215fc78c != nil { + return *x.ref215fc78c, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSDigest) Deref() { + if x.ref215fc78c == nil { + return + } + x.Inner = *(*[96]byte)(unsafe.Pointer(&x.ref215fc78c.inner)) +} + +// allocFilHashResponseMemory allocates memory for type C.fil_HashResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilHashResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilHashResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilHashResponseValue = unsafe.Sizeof([1]C.fil_HashResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilHashResponse) Ref() *C.fil_HashResponse { + if x == nil { + return nil + } + return x.refc52a22ef +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilHashResponse) Free() { + if x != nil && x.allocsc52a22ef != nil { + x.allocsc52a22ef.(*cgoAllocMap).Free() + x.refc52a22ef = nil + } +} + +// NewFilHashResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilHashResponseRef(ref unsafe.Pointer) *FilHashResponse { + if ref == nil { + return nil + } + obj := new(FilHashResponse) + obj.refc52a22ef = (*C.fil_HashResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilHashResponse) PassRef() (*C.fil_HashResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refc52a22ef != nil { + return x.refc52a22ef, nil + } + memc52a22ef := allocFilHashResponseMemory(1) + refc52a22ef := (*C.fil_HashResponse)(memc52a22ef) + allocsc52a22ef := new(cgoAllocMap) + allocsc52a22ef.Add(memc52a22ef) + + var cdigest_allocs *cgoAllocMap + refc52a22ef.digest, cdigest_allocs = x.Digest.PassValue() + allocsc52a22ef.Borrow(cdigest_allocs) + + x.refc52a22ef = refc52a22ef + x.allocsc52a22ef = allocsc52a22ef + return refc52a22ef, allocsc52a22ef + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilHashResponse) PassValue() (C.fil_HashResponse, *cgoAllocMap) { + if x.refc52a22ef != nil { + return *x.refc52a22ef, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilHashResponse) Deref() { + if x.refc52a22ef == nil { + return + } + x.Digest = *NewFilBLSDigestRef(unsafe.Pointer(&x.refc52a22ef.digest)) +} + // allocFilBLSSignatureMemory allocates memory for type C.fil_BLSSignature in C. // The caller is responsible for freeing the this memory via C.free. func allocFilBLSSignatureMemory(n int) unsafe.Pointer { @@ -230,173 +393,154 @@ func (x *FilAggregateResponse) Deref() { x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refb3efa36d.signature)) } -// allocFilAggregateProofMemory allocates memory for type C.fil_AggregateProof in C. +// allocFilBLSPrivateKeyMemory allocates memory for type C.fil_BLSPrivateKey in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilAggregateProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregateProofValue)) +func allocFilBLSPrivateKeyMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPrivateKeyValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilAggregateProofValue = unsafe.Sizeof([1]C.fil_AggregateProof{}) - -// unpackPCharString copies the data from Go string as *C.char. -func unpackPCharString(str string) (*C.char, *cgoAllocMap) { - allocs := new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) +const sizeOfFilBLSPrivateKeyValue = unsafe.Sizeof([1]C.fil_BLSPrivateKey{}) - str = safeString(str) - mem0 := unsafe.Pointer(C.CString(str)) - allocs.Add(mem0) - return (*C.char)(mem0), allocs +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSPrivateKey) Ref() *C.fil_BLSPrivateKey { + if x == nil { + return nil + } + return x.ref2f77fe3a } -type stringHeader struct { - Data unsafe.Pointer - Len int +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSPrivateKey) Free() { + if x != nil && x.allocs2f77fe3a != nil { + x.allocs2f77fe3a.(*cgoAllocMap).Free() + x.ref2f77fe3a = nil + } } -// safeString ensures that the string is NULL-terminated, a NULL-terminated copy is created otherwise. -func safeString(str string) string { - if len(str) > 0 && str[len(str)-1] != '\x00' { - str = str + "\x00" - } else if len(str) == 0 { - str = "\x00" +// NewFilBLSPrivateKeyRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSPrivateKeyRef(ref unsafe.Pointer) *FilBLSPrivateKey { + if ref == nil { + return nil } - return str + obj := new(FilBLSPrivateKey) + obj.ref2f77fe3a = (*C.fil_BLSPrivateKey)(unsafe.Pointer(ref)) + return obj } -// copyPUint8TBytes copies the data from Go slice as *C.uint8_t. -func copyPUint8TBytes(slice *sliceHeader) (*C.uint8_t, *cgoAllocMap) { - allocs := new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSPrivateKey) PassRef() (*C.fil_BLSPrivateKey, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref2f77fe3a != nil { + return x.ref2f77fe3a, nil + } + mem2f77fe3a := allocFilBLSPrivateKeyMemory(1) + ref2f77fe3a := (*C.fil_BLSPrivateKey)(mem2f77fe3a) + allocs2f77fe3a := new(cgoAllocMap) + allocs2f77fe3a.Add(mem2f77fe3a) - mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ - Data: slice.Data, - Len: int(sizeOfUint8TValue) * slice.Len, - Cap: int(sizeOfUint8TValue) * slice.Len, - })))) - allocs.Add(mem0) + var cinner_allocs *cgoAllocMap + ref2f77fe3a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs2f77fe3a.Borrow(cinner_allocs) + + x.ref2f77fe3a = ref2f77fe3a + x.allocs2f77fe3a = allocs2f77fe3a + return ref2f77fe3a, allocs2f77fe3a - return (*C.uint8_t)(mem0), allocs } -type sliceHeader struct { - Data unsafe.Pointer - Len int - Cap int +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSPrivateKey) PassValue() (C.fil_BLSPrivateKey, *cgoAllocMap) { + if x.ref2f77fe3a != nil { + return *x.ref2f77fe3a, nil + } + ref, allocs := x.PassRef() + return *ref, allocs } -// allocUint8TMemory allocates memory for type C.uint8_t in C. +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSPrivateKey) Deref() { + if x.ref2f77fe3a == nil { + return + } + x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref2f77fe3a.inner)) +} + +// allocFilPrivateKeyGenerateResponseMemory allocates memory for type C.fil_PrivateKeyGenerateResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocUint8TMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfUint8TValue)) +func allocFilPrivateKeyGenerateResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyGenerateResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfUint8TValue = unsafe.Sizeof([1]C.uint8_t{}) - -// packPCharString creates a Go string backed by *C.char and avoids copying. -func packPCharString(p *C.char) (raw string) { - if p != nil && *p != 0 { - h := (*stringHeader)(unsafe.Pointer(&raw)) - h.Data = unsafe.Pointer(p) - for *p != 0 { - p = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ - } - h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) - } - return -} - -// RawString reperesents a string backed by data on the C side. -type RawString string - -// Copy returns a Go-managed copy of raw string. -func (raw RawString) Copy() string { - if len(raw) == 0 { - return "" - } - h := (*stringHeader)(unsafe.Pointer(&raw)) - return C.GoStringN((*C.char)(h.Data), C.int(h.Len)) -} +const sizeOfFilPrivateKeyGenerateResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyGenerateResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilAggregateProof) Ref() *C.fil_AggregateProof { +func (x *FilPrivateKeyGenerateResponse) Ref() *C.fil_PrivateKeyGenerateResponse { if x == nil { return nil } - return x.ref22b6c4f6 + return x.ref2dba09f } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilAggregateProof) Free() { - if x != nil && x.allocs22b6c4f6 != nil { - x.allocs22b6c4f6.(*cgoAllocMap).Free() - x.ref22b6c4f6 = nil +func (x *FilPrivateKeyGenerateResponse) Free() { + if x != nil && x.allocs2dba09f != nil { + x.allocs2dba09f.(*cgoAllocMap).Free() + x.ref2dba09f = nil } } -// NewFilAggregateProofRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPrivateKeyGenerateResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilAggregateProofRef(ref unsafe.Pointer) *FilAggregateProof { +func NewFilPrivateKeyGenerateResponseRef(ref unsafe.Pointer) *FilPrivateKeyGenerateResponse { if ref == nil { return nil } - obj := new(FilAggregateProof) - obj.ref22b6c4f6 = (*C.fil_AggregateProof)(unsafe.Pointer(ref)) + obj := new(FilPrivateKeyGenerateResponse) + obj.ref2dba09f = (*C.fil_PrivateKeyGenerateResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilAggregateProof) PassRef() (*C.fil_AggregateProof, *cgoAllocMap) { +func (x *FilPrivateKeyGenerateResponse) PassRef() (*C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref22b6c4f6 != nil { - return x.ref22b6c4f6, nil + } else if x.ref2dba09f != nil { + return x.ref2dba09f, nil } - mem22b6c4f6 := allocFilAggregateProofMemory(1) - ref22b6c4f6 := (*C.fil_AggregateProof)(mem22b6c4f6) - allocs22b6c4f6 := new(cgoAllocMap) - allocs22b6c4f6.Add(mem22b6c4f6) - - var cstatus_code_allocs *cgoAllocMap - ref22b6c4f6.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs22b6c4f6.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref22b6c4f6.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs22b6c4f6.Borrow(cerror_msg_allocs) - - var cproof_len_allocs *cgoAllocMap - ref22b6c4f6.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs22b6c4f6.Borrow(cproof_len_allocs) + mem2dba09f := allocFilPrivateKeyGenerateResponseMemory(1) + ref2dba09f := (*C.fil_PrivateKeyGenerateResponse)(mem2dba09f) + allocs2dba09f := new(cgoAllocMap) + allocs2dba09f.Add(mem2dba09f) - var cproof_ptr_allocs *cgoAllocMap - ref22b6c4f6.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs22b6c4f6.Borrow(cproof_ptr_allocs) + var cprivate_key_allocs *cgoAllocMap + ref2dba09f.private_key, cprivate_key_allocs = x.PrivateKey.PassValue() + allocs2dba09f.Borrow(cprivate_key_allocs) - x.ref22b6c4f6 = ref22b6c4f6 - x.allocs22b6c4f6 = allocs22b6c4f6 - return ref22b6c4f6, allocs22b6c4f6 + x.ref2dba09f = ref2dba09f + x.allocs2dba09f = allocs2dba09f + return ref2dba09f, allocs2dba09f } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilAggregateProof) PassValue() (C.fil_AggregateProof, *cgoAllocMap) { - if x.ref22b6c4f6 != nil { - return *x.ref22b6c4f6, nil +func (x FilPrivateKeyGenerateResponse) PassValue() (C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { + if x.ref2dba09f != nil { + return *x.ref2dba09f, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -404,18 +548,11 @@ func (x FilAggregateProof) PassValue() (C.fil_AggregateProof, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilAggregateProof) Deref() { - if x.ref22b6c4f6 == nil { +func (x *FilPrivateKeyGenerateResponse) Deref() { + if x.ref2dba09f == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref22b6c4f6.status_code) - x.ErrorMsg = packPCharString(x.ref22b6c4f6.error_msg) - x.ProofLen = (uint)(x.ref22b6c4f6.proof_len) - hxfc4425b := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxfc4425b.Data = unsafe.Pointer(x.ref22b6c4f6.proof_ptr) - hxfc4425b.Cap = 0x7fffffff - // hxfc4425b.Len = ? - + x.PrivateKey = *NewFilBLSPrivateKeyRef(unsafe.Pointer(&x.ref2dba09f.private_key)) } // allocFil32ByteArrayMemory allocates memory for type C.fil_32ByteArray in C. @@ -499,89 +636,73 @@ func (x *Fil32ByteArray) Deref() { x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref373ec61a.inner)) } -// allocFilAggregationInputsMemory allocates memory for type C.fil_AggregationInputs in C. +// allocFilPrivateKeySignResponseMemory allocates memory for type C.fil_PrivateKeySignResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilAggregationInputsMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregationInputsValue)) +func allocFilPrivateKeySignResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeySignResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilAggregationInputsValue = unsafe.Sizeof([1]C.fil_AggregationInputs{}) +const sizeOfFilPrivateKeySignResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeySignResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilAggregationInputs) Ref() *C.fil_AggregationInputs { +func (x *FilPrivateKeySignResponse) Ref() *C.fil_PrivateKeySignResponse { if x == nil { return nil } - return x.ref90b967c9 + return x.refcdf97b28 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilAggregationInputs) Free() { - if x != nil && x.allocs90b967c9 != nil { - x.allocs90b967c9.(*cgoAllocMap).Free() - x.ref90b967c9 = nil +func (x *FilPrivateKeySignResponse) Free() { + if x != nil && x.allocscdf97b28 != nil { + x.allocscdf97b28.(*cgoAllocMap).Free() + x.refcdf97b28 = nil } } -// NewFilAggregationInputsRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPrivateKeySignResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilAggregationInputsRef(ref unsafe.Pointer) *FilAggregationInputs { +func NewFilPrivateKeySignResponseRef(ref unsafe.Pointer) *FilPrivateKeySignResponse { if ref == nil { return nil } - obj := new(FilAggregationInputs) - obj.ref90b967c9 = (*C.fil_AggregationInputs)(unsafe.Pointer(ref)) + obj := new(FilPrivateKeySignResponse) + obj.refcdf97b28 = (*C.fil_PrivateKeySignResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilAggregationInputs) PassRef() (*C.fil_AggregationInputs, *cgoAllocMap) { +func (x *FilPrivateKeySignResponse) PassRef() (*C.fil_PrivateKeySignResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref90b967c9 != nil { - return x.ref90b967c9, nil + } else if x.refcdf97b28 != nil { + return x.refcdf97b28, nil } - mem90b967c9 := allocFilAggregationInputsMemory(1) - ref90b967c9 := (*C.fil_AggregationInputs)(mem90b967c9) - allocs90b967c9 := new(cgoAllocMap) - allocs90b967c9.Add(mem90b967c9) - - var ccomm_r_allocs *cgoAllocMap - ref90b967c9.comm_r, ccomm_r_allocs = x.CommR.PassValue() - allocs90b967c9.Borrow(ccomm_r_allocs) - - var ccomm_d_allocs *cgoAllocMap - ref90b967c9.comm_d, ccomm_d_allocs = x.CommD.PassValue() - allocs90b967c9.Borrow(ccomm_d_allocs) - - var csector_id_allocs *cgoAllocMap - ref90b967c9.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown - allocs90b967c9.Borrow(csector_id_allocs) - - var cticket_allocs *cgoAllocMap - ref90b967c9.ticket, cticket_allocs = x.Ticket.PassValue() - allocs90b967c9.Borrow(cticket_allocs) + memcdf97b28 := allocFilPrivateKeySignResponseMemory(1) + refcdf97b28 := (*C.fil_PrivateKeySignResponse)(memcdf97b28) + allocscdf97b28 := new(cgoAllocMap) + allocscdf97b28.Add(memcdf97b28) - var cseed_allocs *cgoAllocMap - ref90b967c9.seed, cseed_allocs = x.Seed.PassValue() - allocs90b967c9.Borrow(cseed_allocs) + var csignature_allocs *cgoAllocMap + refcdf97b28.signature, csignature_allocs = x.Signature.PassValue() + allocscdf97b28.Borrow(csignature_allocs) - x.ref90b967c9 = ref90b967c9 - x.allocs90b967c9 = allocs90b967c9 - return ref90b967c9, allocs90b967c9 + x.refcdf97b28 = refcdf97b28 + x.allocscdf97b28 = allocscdf97b28 + return refcdf97b28, allocscdf97b28 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilAggregationInputs) PassValue() (C.fil_AggregationInputs, *cgoAllocMap) { - if x.ref90b967c9 != nil { - return *x.ref90b967c9, nil +func (x FilPrivateKeySignResponse) PassValue() (C.fil_PrivateKeySignResponse, *cgoAllocMap) { + if x.refcdf97b28 != nil { + return *x.refcdf97b28, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -589,144 +710,80 @@ func (x FilAggregationInputs) PassValue() (C.fil_AggregationInputs, *cgoAllocMap // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilAggregationInputs) Deref() { - if x.ref90b967c9 == nil { +func (x *FilPrivateKeySignResponse) Deref() { + if x.refcdf97b28 == nil { return } - x.CommR = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.comm_r)) - x.CommD = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.comm_d)) - x.SectorId = (uint64)(x.ref90b967c9.sector_id) - x.Ticket = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.ticket)) - x.Seed = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.seed)) + x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refcdf97b28.signature)) } -// allocFilSealCommitPhase2ResponseMemory allocates memory for type C.fil_SealCommitPhase2Response in C. +// allocFilBLSPublicKeyMemory allocates memory for type C.fil_BLSPublicKey in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilSealCommitPhase2ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase2ResponseValue)) +func allocFilBLSPublicKeyMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPublicKeyValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilSealCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase2Response{}) - -const sizeOfPtr = unsafe.Sizeof(&struct{}{}) - -// unpackSFilAggregationInputs transforms a sliced Go data structure into plain C format. -func unpackSFilAggregationInputs(x []FilAggregationInputs) (unpacked *C.fil_AggregationInputs, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilAggregationInputsMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_AggregationInputs)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_AggregationInputs)(h.Data) - return -} - -// packSFilAggregationInputs reads sliced Go data structure out from plain C format. -func packSFilAggregationInputs(v []FilAggregationInputs, ptr0 *C.fil_AggregationInputs) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilAggregationInputsValue]C.fil_AggregationInputs)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilAggregationInputsRef(unsafe.Pointer(&ptr1)) - } -} +const sizeOfFilBLSPublicKeyValue = unsafe.Sizeof([1]C.fil_BLSPublicKey{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealCommitPhase2Response) Ref() *C.fil_SealCommitPhase2Response { +func (x *FilBLSPublicKey) Ref() *C.fil_BLSPublicKey { if x == nil { return nil } - return x.ref5860b9a4 + return x.ref6d0cab13 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilSealCommitPhase2Response) Free() { - if x != nil && x.allocs5860b9a4 != nil { - x.allocs5860b9a4.(*cgoAllocMap).Free() - x.ref5860b9a4 = nil +func (x *FilBLSPublicKey) Free() { + if x != nil && x.allocs6d0cab13 != nil { + x.allocs6d0cab13.(*cgoAllocMap).Free() + x.ref6d0cab13 = nil } } -// NewFilSealCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilBLSPublicKeyRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilSealCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase2Response { +func NewFilBLSPublicKeyRef(ref unsafe.Pointer) *FilBLSPublicKey { if ref == nil { return nil } - obj := new(FilSealCommitPhase2Response) - obj.ref5860b9a4 = (*C.fil_SealCommitPhase2Response)(unsafe.Pointer(ref)) + obj := new(FilBLSPublicKey) + obj.ref6d0cab13 = (*C.fil_BLSPublicKey)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealCommitPhase2Response) PassRef() (*C.fil_SealCommitPhase2Response, *cgoAllocMap) { +func (x *FilBLSPublicKey) PassRef() (*C.fil_BLSPublicKey, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref5860b9a4 != nil { - return x.ref5860b9a4, nil + } else if x.ref6d0cab13 != nil { + return x.ref6d0cab13, nil } - mem5860b9a4 := allocFilSealCommitPhase2ResponseMemory(1) - ref5860b9a4 := (*C.fil_SealCommitPhase2Response)(mem5860b9a4) - allocs5860b9a4 := new(cgoAllocMap) - allocs5860b9a4.Add(mem5860b9a4) - - var cstatus_code_allocs *cgoAllocMap - ref5860b9a4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs5860b9a4.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref5860b9a4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs5860b9a4.Borrow(cerror_msg_allocs) - - var cproof_ptr_allocs *cgoAllocMap - ref5860b9a4.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs5860b9a4.Borrow(cproof_ptr_allocs) - - var cproof_len_allocs *cgoAllocMap - ref5860b9a4.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs5860b9a4.Borrow(cproof_len_allocs) - - var ccommit_inputs_ptr_allocs *cgoAllocMap - ref5860b9a4.commit_inputs_ptr, ccommit_inputs_ptr_allocs = unpackSFilAggregationInputs(x.CommitInputsPtr) - allocs5860b9a4.Borrow(ccommit_inputs_ptr_allocs) + mem6d0cab13 := allocFilBLSPublicKeyMemory(1) + ref6d0cab13 := (*C.fil_BLSPublicKey)(mem6d0cab13) + allocs6d0cab13 := new(cgoAllocMap) + allocs6d0cab13.Add(mem6d0cab13) - var ccommit_inputs_len_allocs *cgoAllocMap - ref5860b9a4.commit_inputs_len, ccommit_inputs_len_allocs = (C.size_t)(x.CommitInputsLen), cgoAllocsUnknown - allocs5860b9a4.Borrow(ccommit_inputs_len_allocs) + var cinner_allocs *cgoAllocMap + ref6d0cab13.inner, cinner_allocs = *(*[48]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs6d0cab13.Borrow(cinner_allocs) - x.ref5860b9a4 = ref5860b9a4 - x.allocs5860b9a4 = allocs5860b9a4 - return ref5860b9a4, allocs5860b9a4 + x.ref6d0cab13 = ref6d0cab13 + x.allocs6d0cab13 = allocs6d0cab13 + return ref6d0cab13, allocs6d0cab13 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealCommitPhase2Response) PassValue() (C.fil_SealCommitPhase2Response, *cgoAllocMap) { - if x.ref5860b9a4 != nil { - return *x.ref5860b9a4, nil +func (x FilBLSPublicKey) PassValue() (C.fil_BLSPublicKey, *cgoAllocMap) { + if x.ref6d0cab13 != nil { + return *x.ref6d0cab13, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -734,93 +791,80 @@ func (x FilSealCommitPhase2Response) PassValue() (C.fil_SealCommitPhase2Response // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealCommitPhase2Response) Deref() { - if x.ref5860b9a4 == nil { +func (x *FilBLSPublicKey) Deref() { + if x.ref6d0cab13 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref5860b9a4.status_code) - x.ErrorMsg = packPCharString(x.ref5860b9a4.error_msg) - hxf95e7c8 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxf95e7c8.Data = unsafe.Pointer(x.ref5860b9a4.proof_ptr) - hxf95e7c8.Cap = 0x7fffffff - // hxf95e7c8.Len = ? - - x.ProofLen = (uint)(x.ref5860b9a4.proof_len) - packSFilAggregationInputs(x.CommitInputsPtr, x.ref5860b9a4.commit_inputs_ptr) - x.CommitInputsLen = (uint)(x.ref5860b9a4.commit_inputs_len) + x.Inner = *(*[48]byte)(unsafe.Pointer(&x.ref6d0cab13.inner)) } -// allocFilClearCacheResponseMemory allocates memory for type C.fil_ClearCacheResponse in C. +// allocFilPrivateKeyPublicKeyResponseMemory allocates memory for type C.fil_PrivateKeyPublicKeyResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilClearCacheResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilClearCacheResponseValue)) +func allocFilPrivateKeyPublicKeyResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyPublicKeyResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilClearCacheResponseValue = unsafe.Sizeof([1]C.fil_ClearCacheResponse{}) +const sizeOfFilPrivateKeyPublicKeyResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyPublicKeyResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilClearCacheResponse) Ref() *C.fil_ClearCacheResponse { +func (x *FilPrivateKeyPublicKeyResponse) Ref() *C.fil_PrivateKeyPublicKeyResponse { if x == nil { return nil } - return x.refa9a80400 + return x.refee14e59d } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilClearCacheResponse) Free() { - if x != nil && x.allocsa9a80400 != nil { - x.allocsa9a80400.(*cgoAllocMap).Free() - x.refa9a80400 = nil +func (x *FilPrivateKeyPublicKeyResponse) Free() { + if x != nil && x.allocsee14e59d != nil { + x.allocsee14e59d.(*cgoAllocMap).Free() + x.refee14e59d = nil } } -// NewFilClearCacheResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPrivateKeyPublicKeyResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilClearCacheResponseRef(ref unsafe.Pointer) *FilClearCacheResponse { +func NewFilPrivateKeyPublicKeyResponseRef(ref unsafe.Pointer) *FilPrivateKeyPublicKeyResponse { if ref == nil { return nil } - obj := new(FilClearCacheResponse) - obj.refa9a80400 = (*C.fil_ClearCacheResponse)(unsafe.Pointer(ref)) + obj := new(FilPrivateKeyPublicKeyResponse) + obj.refee14e59d = (*C.fil_PrivateKeyPublicKeyResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilClearCacheResponse) PassRef() (*C.fil_ClearCacheResponse, *cgoAllocMap) { +func (x *FilPrivateKeyPublicKeyResponse) PassRef() (*C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refa9a80400 != nil { - return x.refa9a80400, nil + } else if x.refee14e59d != nil { + return x.refee14e59d, nil } - mema9a80400 := allocFilClearCacheResponseMemory(1) - refa9a80400 := (*C.fil_ClearCacheResponse)(mema9a80400) - allocsa9a80400 := new(cgoAllocMap) - allocsa9a80400.Add(mema9a80400) - - var cerror_msg_allocs *cgoAllocMap - refa9a80400.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsa9a80400.Borrow(cerror_msg_allocs) + memee14e59d := allocFilPrivateKeyPublicKeyResponseMemory(1) + refee14e59d := (*C.fil_PrivateKeyPublicKeyResponse)(memee14e59d) + allocsee14e59d := new(cgoAllocMap) + allocsee14e59d.Add(memee14e59d) - var cstatus_code_allocs *cgoAllocMap - refa9a80400.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsa9a80400.Borrow(cstatus_code_allocs) + var cpublic_key_allocs *cgoAllocMap + refee14e59d.public_key, cpublic_key_allocs = x.PublicKey.PassValue() + allocsee14e59d.Borrow(cpublic_key_allocs) - x.refa9a80400 = refa9a80400 - x.allocsa9a80400 = allocsa9a80400 - return refa9a80400, allocsa9a80400 + x.refee14e59d = refee14e59d + x.allocsee14e59d = allocsee14e59d + return refee14e59d, allocsee14e59d } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilClearCacheResponse) PassValue() (C.fil_ClearCacheResponse, *cgoAllocMap) { - if x.refa9a80400 != nil { - return *x.refa9a80400, nil +func (x FilPrivateKeyPublicKeyResponse) PassValue() (C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { + if x.refee14e59d != nil { + return *x.refee14e59d, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -828,12 +872,11 @@ func (x FilClearCacheResponse) PassValue() (C.fil_ClearCacheResponse, *cgoAllocM // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilClearCacheResponse) Deref() { - if x.refa9a80400 == nil { +func (x *FilPrivateKeyPublicKeyResponse) Deref() { + if x.refee14e59d == nil { return } - x.ErrorMsg = packPCharString(x.refa9a80400.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refa9a80400.status_code) + x.PublicKey = *NewFilBLSPublicKeyRef(unsafe.Pointer(&x.refee14e59d.public_key)) } // allocFilZeroSignatureResponseMemory allocates memory for type C.fil_ZeroSignatureResponse in C. @@ -917,77 +960,134 @@ func (x *FilZeroSignatureResponse) Deref() { x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.ref835a0405.signature)) } -// allocFilEmptySectorUpdateDecodeFromResponseMemory allocates memory for type C.fil_EmptySectorUpdateDecodeFromResponse in C. +// allocFilCreateFvmMachineResponseMemory allocates memory for type C.fil_CreateFvmMachineResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilEmptySectorUpdateDecodeFromResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateDecodeFromResponseValue)) +func allocFilCreateFvmMachineResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilCreateFvmMachineResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilEmptySectorUpdateDecodeFromResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateDecodeFromResponse{}) +const sizeOfFilCreateFvmMachineResponseValue = unsafe.Sizeof([1]C.fil_CreateFvmMachineResponse{}) + +// unpackPCharString copies the data from Go string as *C.char. +func unpackPCharString(str string) (*C.char, *cgoAllocMap) { + allocs := new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + str = safeString(str) + mem0 := unsafe.Pointer(C.CString(str)) + allocs.Add(mem0) + return (*C.char)(mem0), allocs +} + +type stringHeader struct { + Data unsafe.Pointer + Len int +} + +// safeString ensures that the string is NULL-terminated, a NULL-terminated copy is created otherwise. +func safeString(str string) string { + if len(str) > 0 && str[len(str)-1] != '\x00' { + str = str + "\x00" + } else if len(str) == 0 { + str = "\x00" + } + return str +} + +// packPCharString creates a Go string backed by *C.char and avoids copying. +func packPCharString(p *C.char) (raw string) { + if p != nil && *p != 0 { + h := (*stringHeader)(unsafe.Pointer(&raw)) + h.Data = unsafe.Pointer(p) + for *p != 0 { + p = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ + } + h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) + } + return +} + +// RawString reperesents a string backed by data on the C side. +type RawString string + +// Copy returns a Go-managed copy of raw string. +func (raw RawString) Copy() string { + if len(raw) == 0 { + return "" + } + h := (*stringHeader)(unsafe.Pointer(&raw)) + return C.GoStringN((*C.char)(h.Data), C.int(h.Len)) +} // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilEmptySectorUpdateDecodeFromResponse) Ref() *C.fil_EmptySectorUpdateDecodeFromResponse { +func (x *FilCreateFvmMachineResponse) Ref() *C.fil_CreateFvmMachineResponse { if x == nil { return nil } - return x.reff02a01b8 + return x.ref40465416 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilEmptySectorUpdateDecodeFromResponse) Free() { - if x != nil && x.allocsf02a01b8 != nil { - x.allocsf02a01b8.(*cgoAllocMap).Free() - x.reff02a01b8 = nil +func (x *FilCreateFvmMachineResponse) Free() { + if x != nil && x.allocs40465416 != nil { + x.allocs40465416.(*cgoAllocMap).Free() + x.ref40465416 = nil } } -// NewFilEmptySectorUpdateDecodeFromResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilCreateFvmMachineResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilEmptySectorUpdateDecodeFromResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateDecodeFromResponse { +func NewFilCreateFvmMachineResponseRef(ref unsafe.Pointer) *FilCreateFvmMachineResponse { if ref == nil { return nil } - obj := new(FilEmptySectorUpdateDecodeFromResponse) - obj.reff02a01b8 = (*C.fil_EmptySectorUpdateDecodeFromResponse)(unsafe.Pointer(ref)) + obj := new(FilCreateFvmMachineResponse) + obj.ref40465416 = (*C.fil_CreateFvmMachineResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilEmptySectorUpdateDecodeFromResponse) PassRef() (*C.fil_EmptySectorUpdateDecodeFromResponse, *cgoAllocMap) { +func (x *FilCreateFvmMachineResponse) PassRef() (*C.fil_CreateFvmMachineResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.reff02a01b8 != nil { - return x.reff02a01b8, nil + } else if x.ref40465416 != nil { + return x.ref40465416, nil } - memf02a01b8 := allocFilEmptySectorUpdateDecodeFromResponseMemory(1) - reff02a01b8 := (*C.fil_EmptySectorUpdateDecodeFromResponse)(memf02a01b8) - allocsf02a01b8 := new(cgoAllocMap) - allocsf02a01b8.Add(memf02a01b8) + mem40465416 := allocFilCreateFvmMachineResponseMemory(1) + ref40465416 := (*C.fil_CreateFvmMachineResponse)(mem40465416) + allocs40465416 := new(cgoAllocMap) + allocs40465416.Add(mem40465416) + + var cerror_msg_allocs *cgoAllocMap + ref40465416.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs40465416.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - reff02a01b8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsf02a01b8.Borrow(cstatus_code_allocs) + ref40465416.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs40465416.Borrow(cstatus_code_allocs) - var cerror_msg_allocs *cgoAllocMap - reff02a01b8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsf02a01b8.Borrow(cerror_msg_allocs) + var cexecutor_allocs *cgoAllocMap + ref40465416.executor, cexecutor_allocs = *(*unsafe.Pointer)(unsafe.Pointer(&x.Executor)), cgoAllocsUnknown + allocs40465416.Borrow(cexecutor_allocs) - x.reff02a01b8 = reff02a01b8 - x.allocsf02a01b8 = allocsf02a01b8 - return reff02a01b8, allocsf02a01b8 + x.ref40465416 = ref40465416 + x.allocs40465416 = allocs40465416 + return ref40465416, allocs40465416 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilEmptySectorUpdateDecodeFromResponse) PassValue() (C.fil_EmptySectorUpdateDecodeFromResponse, *cgoAllocMap) { - if x.reff02a01b8 != nil { - return *x.reff02a01b8, nil +func (x FilCreateFvmMachineResponse) PassValue() (C.fil_CreateFvmMachineResponse, *cgoAllocMap) { + if x.ref40465416 != nil { + return *x.ref40465416, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -995,97 +1095,153 @@ func (x FilEmptySectorUpdateDecodeFromResponse) PassValue() (C.fil_EmptySectorUp // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilEmptySectorUpdateDecodeFromResponse) Deref() { - if x.reff02a01b8 == nil { +func (x *FilCreateFvmMachineResponse) Deref() { + if x.ref40465416 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.reff02a01b8.status_code) - x.ErrorMsg = packPCharString(x.reff02a01b8.error_msg) + x.ErrorMsg = packPCharString(x.ref40465416.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref40465416.status_code) + x.Executor = (unsafe.Pointer)(unsafe.Pointer(x.ref40465416.executor)) } -// allocFilEmptySectorUpdateEncodeIntoResponseMemory allocates memory for type C.fil_EmptySectorUpdateEncodeIntoResponse in C. +// allocFilFvmMachineExecuteResponseMemory allocates memory for type C.fil_FvmMachineExecuteResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilEmptySectorUpdateEncodeIntoResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateEncodeIntoResponseValue)) +func allocFilFvmMachineExecuteResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFvmMachineExecuteResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilEmptySectorUpdateEncodeIntoResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateEncodeIntoResponse{}) +const sizeOfFilFvmMachineExecuteResponseValue = unsafe.Sizeof([1]C.fil_FvmMachineExecuteResponse{}) -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilEmptySectorUpdateEncodeIntoResponse) Ref() *C.fil_EmptySectorUpdateEncodeIntoResponse { - if x == nil { - return nil - } - return x.ref8d3238a7 +// copyPUint8TBytes copies the data from Go slice as *C.uint8_t. +func copyPUint8TBytes(slice *sliceHeader) (*C.uint8_t, *cgoAllocMap) { + allocs := new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ + Data: slice.Data, + Len: int(sizeOfUint8TValue) * slice.Len, + Cap: int(sizeOfUint8TValue) * slice.Len, + })))) + allocs.Add(mem0) + + return (*C.uint8_t)(mem0), allocs +} + +type sliceHeader struct { + Data unsafe.Pointer + Len int + Cap int +} + +// allocUint8TMemory allocates memory for type C.uint8_t in C. +// The caller is responsible for freeing the this memory via C.free. +func allocUint8TMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfUint8TValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfUint8TValue = unsafe.Sizeof([1]C.uint8_t{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilFvmMachineExecuteResponse) Ref() *C.fil_FvmMachineExecuteResponse { + if x == nil { + return nil + } + return x.ref88f63595 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilEmptySectorUpdateEncodeIntoResponse) Free() { - if x != nil && x.allocs8d3238a7 != nil { - x.allocs8d3238a7.(*cgoAllocMap).Free() - x.ref8d3238a7 = nil +func (x *FilFvmMachineExecuteResponse) Free() { + if x != nil && x.allocs88f63595 != nil { + x.allocs88f63595.(*cgoAllocMap).Free() + x.ref88f63595 = nil } } -// NewFilEmptySectorUpdateEncodeIntoResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilFvmMachineExecuteResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilEmptySectorUpdateEncodeIntoResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateEncodeIntoResponse { +func NewFilFvmMachineExecuteResponseRef(ref unsafe.Pointer) *FilFvmMachineExecuteResponse { if ref == nil { return nil } - obj := new(FilEmptySectorUpdateEncodeIntoResponse) - obj.ref8d3238a7 = (*C.fil_EmptySectorUpdateEncodeIntoResponse)(unsafe.Pointer(ref)) + obj := new(FilFvmMachineExecuteResponse) + obj.ref88f63595 = (*C.fil_FvmMachineExecuteResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilEmptySectorUpdateEncodeIntoResponse) PassRef() (*C.fil_EmptySectorUpdateEncodeIntoResponse, *cgoAllocMap) { +func (x *FilFvmMachineExecuteResponse) PassRef() (*C.fil_FvmMachineExecuteResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref8d3238a7 != nil { - return x.ref8d3238a7, nil + } else if x.ref88f63595 != nil { + return x.ref88f63595, nil } - mem8d3238a7 := allocFilEmptySectorUpdateEncodeIntoResponseMemory(1) - ref8d3238a7 := (*C.fil_EmptySectorUpdateEncodeIntoResponse)(mem8d3238a7) - allocs8d3238a7 := new(cgoAllocMap) - allocs8d3238a7.Add(mem8d3238a7) + mem88f63595 := allocFilFvmMachineExecuteResponseMemory(1) + ref88f63595 := (*C.fil_FvmMachineExecuteResponse)(mem88f63595) + allocs88f63595 := new(cgoAllocMap) + allocs88f63595.Add(mem88f63595) var cerror_msg_allocs *cgoAllocMap - ref8d3238a7.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs8d3238a7.Borrow(cerror_msg_allocs) + ref88f63595.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs88f63595.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - ref8d3238a7.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs8d3238a7.Borrow(cstatus_code_allocs) + ref88f63595.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs88f63595.Borrow(cstatus_code_allocs) - var ccomm_r_new_allocs *cgoAllocMap - ref8d3238a7.comm_r_new, ccomm_r_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommRNew)), cgoAllocsUnknown - allocs8d3238a7.Borrow(ccomm_r_new_allocs) + var cexit_code_allocs *cgoAllocMap + ref88f63595.exit_code, cexit_code_allocs = (C.uint64_t)(x.ExitCode), cgoAllocsUnknown + allocs88f63595.Borrow(cexit_code_allocs) - var ccomm_r_last_new_allocs *cgoAllocMap - ref8d3238a7.comm_r_last_new, ccomm_r_last_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommRLastNew)), cgoAllocsUnknown - allocs8d3238a7.Borrow(ccomm_r_last_new_allocs) + var creturn_ptr_allocs *cgoAllocMap + ref88f63595.return_ptr, creturn_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ReturnPtr))) + allocs88f63595.Borrow(creturn_ptr_allocs) - var ccomm_d_new_allocs *cgoAllocMap - ref8d3238a7.comm_d_new, ccomm_d_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommDNew)), cgoAllocsUnknown - allocs8d3238a7.Borrow(ccomm_d_new_allocs) + var creturn_len_allocs *cgoAllocMap + ref88f63595.return_len, creturn_len_allocs = (C.size_t)(x.ReturnLen), cgoAllocsUnknown + allocs88f63595.Borrow(creturn_len_allocs) - x.ref8d3238a7 = ref8d3238a7 - x.allocs8d3238a7 = allocs8d3238a7 - return ref8d3238a7, allocs8d3238a7 + var cgas_used_allocs *cgoAllocMap + ref88f63595.gas_used, cgas_used_allocs = (C.uint64_t)(x.GasUsed), cgoAllocsUnknown + allocs88f63595.Borrow(cgas_used_allocs) + + var cpenalty_hi_allocs *cgoAllocMap + ref88f63595.penalty_hi, cpenalty_hi_allocs = (C.uint64_t)(x.PenaltyHi), cgoAllocsUnknown + allocs88f63595.Borrow(cpenalty_hi_allocs) + + var cpenalty_lo_allocs *cgoAllocMap + ref88f63595.penalty_lo, cpenalty_lo_allocs = (C.uint64_t)(x.PenaltyLo), cgoAllocsUnknown + allocs88f63595.Borrow(cpenalty_lo_allocs) + + var cminer_tip_hi_allocs *cgoAllocMap + ref88f63595.miner_tip_hi, cminer_tip_hi_allocs = (C.uint64_t)(x.MinerTipHi), cgoAllocsUnknown + allocs88f63595.Borrow(cminer_tip_hi_allocs) + + var cminer_tip_lo_allocs *cgoAllocMap + ref88f63595.miner_tip_lo, cminer_tip_lo_allocs = (C.uint64_t)(x.MinerTipLo), cgoAllocsUnknown + allocs88f63595.Borrow(cminer_tip_lo_allocs) + + x.ref88f63595 = ref88f63595 + x.allocs88f63595 = allocs88f63595 + return ref88f63595, allocs88f63595 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilEmptySectorUpdateEncodeIntoResponse) PassValue() (C.fil_EmptySectorUpdateEncodeIntoResponse, *cgoAllocMap) { - if x.ref8d3238a7 != nil { - return *x.ref8d3238a7, nil +func (x FilFvmMachineExecuteResponse) PassValue() (C.fil_FvmMachineExecuteResponse, *cgoAllocMap) { + if x.ref88f63595 != nil { + return *x.ref88f63595, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1093,96 +1249,105 @@ func (x FilEmptySectorUpdateEncodeIntoResponse) PassValue() (C.fil_EmptySectorUp // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilEmptySectorUpdateEncodeIntoResponse) Deref() { - if x.ref8d3238a7 == nil { +func (x *FilFvmMachineExecuteResponse) Deref() { + if x.ref88f63595 == nil { return } - x.ErrorMsg = packPCharString(x.ref8d3238a7.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref8d3238a7.status_code) - x.CommRNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_r_new)) - x.CommRLastNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_r_last_new)) - x.CommDNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_d_new)) + x.ErrorMsg = packPCharString(x.ref88f63595.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref88f63595.status_code) + x.ExitCode = (uint64)(x.ref88f63595.exit_code) + hxfc4425b := (*sliceHeader)(unsafe.Pointer(&x.ReturnPtr)) + hxfc4425b.Data = unsafe.Pointer(x.ref88f63595.return_ptr) + hxfc4425b.Cap = 0x7fffffff + // hxfc4425b.Len = ? + + x.ReturnLen = (uint)(x.ref88f63595.return_len) + x.GasUsed = (uint64)(x.ref88f63595.gas_used) + x.PenaltyHi = (uint64)(x.ref88f63595.penalty_hi) + x.PenaltyLo = (uint64)(x.ref88f63595.penalty_lo) + x.MinerTipHi = (uint64)(x.ref88f63595.miner_tip_hi) + x.MinerTipLo = (uint64)(x.ref88f63595.miner_tip_lo) } -// allocFilEmptySectorUpdateProofResponseMemory allocates memory for type C.fil_EmptySectorUpdateProofResponse in C. +// allocFilFvmMachineFlushResponseMemory allocates memory for type C.fil_FvmMachineFlushResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilEmptySectorUpdateProofResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateProofResponseValue)) +func allocFilFvmMachineFlushResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFvmMachineFlushResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilEmptySectorUpdateProofResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateProofResponse{}) +const sizeOfFilFvmMachineFlushResponseValue = unsafe.Sizeof([1]C.fil_FvmMachineFlushResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilEmptySectorUpdateProofResponse) Ref() *C.fil_EmptySectorUpdateProofResponse { +func (x *FilFvmMachineFlushResponse) Ref() *C.fil_FvmMachineFlushResponse { if x == nil { return nil } - return x.ref5c2faef + return x.ref9eb3b4f4 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilEmptySectorUpdateProofResponse) Free() { - if x != nil && x.allocs5c2faef != nil { - x.allocs5c2faef.(*cgoAllocMap).Free() - x.ref5c2faef = nil +func (x *FilFvmMachineFlushResponse) Free() { + if x != nil && x.allocs9eb3b4f4 != nil { + x.allocs9eb3b4f4.(*cgoAllocMap).Free() + x.ref9eb3b4f4 = nil } } -// NewFilEmptySectorUpdateProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilFvmMachineFlushResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilEmptySectorUpdateProofResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateProofResponse { +func NewFilFvmMachineFlushResponseRef(ref unsafe.Pointer) *FilFvmMachineFlushResponse { if ref == nil { return nil } - obj := new(FilEmptySectorUpdateProofResponse) - obj.ref5c2faef = (*C.fil_EmptySectorUpdateProofResponse)(unsafe.Pointer(ref)) + obj := new(FilFvmMachineFlushResponse) + obj.ref9eb3b4f4 = (*C.fil_FvmMachineFlushResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilEmptySectorUpdateProofResponse) PassRef() (*C.fil_EmptySectorUpdateProofResponse, *cgoAllocMap) { +func (x *FilFvmMachineFlushResponse) PassRef() (*C.fil_FvmMachineFlushResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref5c2faef != nil { - return x.ref5c2faef, nil + } else if x.ref9eb3b4f4 != nil { + return x.ref9eb3b4f4, nil } - mem5c2faef := allocFilEmptySectorUpdateProofResponseMemory(1) - ref5c2faef := (*C.fil_EmptySectorUpdateProofResponse)(mem5c2faef) - allocs5c2faef := new(cgoAllocMap) - allocs5c2faef.Add(mem5c2faef) - - var cstatus_code_allocs *cgoAllocMap - ref5c2faef.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs5c2faef.Borrow(cstatus_code_allocs) + mem9eb3b4f4 := allocFilFvmMachineFlushResponseMemory(1) + ref9eb3b4f4 := (*C.fil_FvmMachineFlushResponse)(mem9eb3b4f4) + allocs9eb3b4f4 := new(cgoAllocMap) + allocs9eb3b4f4.Add(mem9eb3b4f4) var cerror_msg_allocs *cgoAllocMap - ref5c2faef.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs5c2faef.Borrow(cerror_msg_allocs) + ref9eb3b4f4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs9eb3b4f4.Borrow(cerror_msg_allocs) - var cproof_len_allocs *cgoAllocMap - ref5c2faef.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs5c2faef.Borrow(cproof_len_allocs) + var cstatus_code_allocs *cgoAllocMap + ref9eb3b4f4.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs9eb3b4f4.Borrow(cstatus_code_allocs) - var cproof_ptr_allocs *cgoAllocMap - ref5c2faef.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs5c2faef.Borrow(cproof_ptr_allocs) + var cstate_root_ptr_allocs *cgoAllocMap + ref9eb3b4f4.state_root_ptr, cstate_root_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.StateRootPtr))) + allocs9eb3b4f4.Borrow(cstate_root_ptr_allocs) - x.ref5c2faef = ref5c2faef - x.allocs5c2faef = allocs5c2faef - return ref5c2faef, allocs5c2faef + var cstate_root_len_allocs *cgoAllocMap + ref9eb3b4f4.state_root_len, cstate_root_len_allocs = (C.size_t)(x.StateRootLen), cgoAllocsUnknown + allocs9eb3b4f4.Borrow(cstate_root_len_allocs) + + x.ref9eb3b4f4 = ref9eb3b4f4 + x.allocs9eb3b4f4 = allocs9eb3b4f4 + return ref9eb3b4f4, allocs9eb3b4f4 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilEmptySectorUpdateProofResponse) PassValue() (C.fil_EmptySectorUpdateProofResponse, *cgoAllocMap) { - if x.ref5c2faef != nil { - return *x.ref5c2faef, nil +func (x FilFvmMachineFlushResponse) PassValue() (C.fil_FvmMachineFlushResponse, *cgoAllocMap) { + if x.ref9eb3b4f4 != nil { + return *x.ref9eb3b4f4, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1190,91 +1355,103 @@ func (x FilEmptySectorUpdateProofResponse) PassValue() (C.fil_EmptySectorUpdateP // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilEmptySectorUpdateProofResponse) Deref() { - if x.ref5c2faef == nil { +func (x *FilFvmMachineFlushResponse) Deref() { + if x.ref9eb3b4f4 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref5c2faef.status_code) - x.ErrorMsg = packPCharString(x.ref5c2faef.error_msg) - x.ProofLen = (uint)(x.ref5c2faef.proof_len) - hxff2234b := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxff2234b.Data = unsafe.Pointer(x.ref5c2faef.proof_ptr) - hxff2234b.Cap = 0x7fffffff - // hxff2234b.Len = ? + x.ErrorMsg = packPCharString(x.ref9eb3b4f4.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref9eb3b4f4.status_code) + hxf95e7c8 := (*sliceHeader)(unsafe.Pointer(&x.StateRootPtr)) + hxf95e7c8.Data = unsafe.Pointer(x.ref9eb3b4f4.state_root_ptr) + hxf95e7c8.Cap = 0x7fffffff + // hxf95e7c8.Len = ? + x.StateRootLen = (uint)(x.ref9eb3b4f4.state_root_len) } -// allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory allocates memory for type C.fil_EmptySectorUpdateRemoveEncodedDataResponse in C. +// allocFilWriteWithAlignmentResponseMemory allocates memory for type C.fil_WriteWithAlignmentResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateRemoveEncodedDataResponseValue)) +func allocFilWriteWithAlignmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithAlignmentResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilEmptySectorUpdateRemoveEncodedDataResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateRemoveEncodedDataResponse{}) +const sizeOfFilWriteWithAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithAlignmentResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Ref() *C.fil_EmptySectorUpdateRemoveEncodedDataResponse { +func (x *FilWriteWithAlignmentResponse) Ref() *C.fil_WriteWithAlignmentResponse { if x == nil { return nil } - return x.ref50783b83 + return x.refa330e79 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Free() { - if x != nil && x.allocs50783b83 != nil { - x.allocs50783b83.(*cgoAllocMap).Free() - x.ref50783b83 = nil +func (x *FilWriteWithAlignmentResponse) Free() { + if x != nil && x.allocsa330e79 != nil { + x.allocsa330e79.(*cgoAllocMap).Free() + x.refa330e79 = nil } } -// NewFilEmptySectorUpdateRemoveEncodedDataResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilWriteWithAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilEmptySectorUpdateRemoveEncodedDataResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateRemoveEncodedDataResponse { +func NewFilWriteWithAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithAlignmentResponse { if ref == nil { return nil } - obj := new(FilEmptySectorUpdateRemoveEncodedDataResponse) - obj.ref50783b83 = (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse)(unsafe.Pointer(ref)) + obj := new(FilWriteWithAlignmentResponse) + obj.refa330e79 = (*C.fil_WriteWithAlignmentResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) PassRef() (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse, *cgoAllocMap) { +func (x *FilWriteWithAlignmentResponse) PassRef() (*C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref50783b83 != nil { - return x.ref50783b83, nil + } else if x.refa330e79 != nil { + return x.refa330e79, nil } - mem50783b83 := allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory(1) - ref50783b83 := (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse)(mem50783b83) - allocs50783b83 := new(cgoAllocMap) - allocs50783b83.Add(mem50783b83) + mema330e79 := allocFilWriteWithAlignmentResponseMemory(1) + refa330e79 := (*C.fil_WriteWithAlignmentResponse)(mema330e79) + allocsa330e79 := new(cgoAllocMap) + allocsa330e79.Add(mema330e79) - var cstatus_code_allocs *cgoAllocMap - ref50783b83.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs50783b83.Borrow(cstatus_code_allocs) + var ccomm_p_allocs *cgoAllocMap + refa330e79.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsa330e79.Borrow(ccomm_p_allocs) var cerror_msg_allocs *cgoAllocMap - ref50783b83.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs50783b83.Borrow(cerror_msg_allocs) + refa330e79.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsa330e79.Borrow(cerror_msg_allocs) - x.ref50783b83 = ref50783b83 - x.allocs50783b83 = allocs50783b83 - return ref50783b83, allocs50783b83 + var cleft_alignment_unpadded_allocs *cgoAllocMap + refa330e79.left_alignment_unpadded, cleft_alignment_unpadded_allocs = (C.uint64_t)(x.LeftAlignmentUnpadded), cgoAllocsUnknown + allocsa330e79.Borrow(cleft_alignment_unpadded_allocs) + + var cstatus_code_allocs *cgoAllocMap + refa330e79.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsa330e79.Borrow(cstatus_code_allocs) + + var ctotal_write_unpadded_allocs *cgoAllocMap + refa330e79.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown + allocsa330e79.Borrow(ctotal_write_unpadded_allocs) + + x.refa330e79 = refa330e79 + x.allocsa330e79 = allocsa330e79 + return refa330e79, allocsa330e79 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilEmptySectorUpdateRemoveEncodedDataResponse) PassValue() (C.fil_EmptySectorUpdateRemoveEncodedDataResponse, *cgoAllocMap) { - if x.ref50783b83 != nil { - return *x.ref50783b83, nil +func (x FilWriteWithAlignmentResponse) PassValue() (C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { + if x.refa330e79 != nil { + return *x.refa330e79, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1282,89 +1459,96 @@ func (x FilEmptySectorUpdateRemoveEncodedDataResponse) PassValue() (C.fil_EmptyS // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Deref() { - if x.ref50783b83 == nil { +func (x *FilWriteWithAlignmentResponse) Deref() { + if x.refa330e79 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref50783b83.status_code) - x.ErrorMsg = packPCharString(x.ref50783b83.error_msg) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refa330e79.comm_p)) + x.ErrorMsg = packPCharString(x.refa330e79.error_msg) + x.LeftAlignmentUnpadded = (uint64)(x.refa330e79.left_alignment_unpadded) + x.StatusCode = (FCPResponseStatus)(x.refa330e79.status_code) + x.TotalWriteUnpadded = (uint64)(x.refa330e79.total_write_unpadded) } -// allocFilVerifyEmptySectorUpdateProofResponseMemory allocates memory for type C.fil_VerifyEmptySectorUpdateProofResponse in C. +// allocFilWriteWithoutAlignmentResponseMemory allocates memory for type C.fil_WriteWithoutAlignmentResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyEmptySectorUpdateProofResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyEmptySectorUpdateProofResponseValue)) +func allocFilWriteWithoutAlignmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithoutAlignmentResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilVerifyEmptySectorUpdateProofResponseValue = unsafe.Sizeof([1]C.fil_VerifyEmptySectorUpdateProofResponse{}) +const sizeOfFilWriteWithoutAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithoutAlignmentResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyEmptySectorUpdateProofResponse) Ref() *C.fil_VerifyEmptySectorUpdateProofResponse { +func (x *FilWriteWithoutAlignmentResponse) Ref() *C.fil_WriteWithoutAlignmentResponse { if x == nil { return nil } - return x.ref50b7b13 + return x.refc8e1ed8 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyEmptySectorUpdateProofResponse) Free() { - if x != nil && x.allocs50b7b13 != nil { - x.allocs50b7b13.(*cgoAllocMap).Free() - x.ref50b7b13 = nil +func (x *FilWriteWithoutAlignmentResponse) Free() { + if x != nil && x.allocsc8e1ed8 != nil { + x.allocsc8e1ed8.(*cgoAllocMap).Free() + x.refc8e1ed8 = nil } } -// NewFilVerifyEmptySectorUpdateProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilWriteWithoutAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyEmptySectorUpdateProofResponseRef(ref unsafe.Pointer) *FilVerifyEmptySectorUpdateProofResponse { +func NewFilWriteWithoutAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithoutAlignmentResponse { if ref == nil { return nil } - obj := new(FilVerifyEmptySectorUpdateProofResponse) - obj.ref50b7b13 = (*C.fil_VerifyEmptySectorUpdateProofResponse)(unsafe.Pointer(ref)) + obj := new(FilWriteWithoutAlignmentResponse) + obj.refc8e1ed8 = (*C.fil_WriteWithoutAlignmentResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyEmptySectorUpdateProofResponse) PassRef() (*C.fil_VerifyEmptySectorUpdateProofResponse, *cgoAllocMap) { +func (x *FilWriteWithoutAlignmentResponse) PassRef() (*C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref50b7b13 != nil { - return x.ref50b7b13, nil + } else if x.refc8e1ed8 != nil { + return x.refc8e1ed8, nil } - mem50b7b13 := allocFilVerifyEmptySectorUpdateProofResponseMemory(1) - ref50b7b13 := (*C.fil_VerifyEmptySectorUpdateProofResponse)(mem50b7b13) - allocs50b7b13 := new(cgoAllocMap) - allocs50b7b13.Add(mem50b7b13) + memc8e1ed8 := allocFilWriteWithoutAlignmentResponseMemory(1) + refc8e1ed8 := (*C.fil_WriteWithoutAlignmentResponse)(memc8e1ed8) + allocsc8e1ed8 := new(cgoAllocMap) + allocsc8e1ed8.Add(memc8e1ed8) - var cstatus_code_allocs *cgoAllocMap - ref50b7b13.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs50b7b13.Borrow(cstatus_code_allocs) + var ccomm_p_allocs *cgoAllocMap + refc8e1ed8.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsc8e1ed8.Borrow(ccomm_p_allocs) var cerror_msg_allocs *cgoAllocMap - ref50b7b13.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs50b7b13.Borrow(cerror_msg_allocs) - - var cis_valid_allocs *cgoAllocMap - ref50b7b13.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocs50b7b13.Borrow(cis_valid_allocs) + refc8e1ed8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsc8e1ed8.Borrow(cerror_msg_allocs) - x.ref50b7b13 = ref50b7b13 - x.allocs50b7b13 = allocs50b7b13 - return ref50b7b13, allocs50b7b13 + var cstatus_code_allocs *cgoAllocMap + refc8e1ed8.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsc8e1ed8.Borrow(cstatus_code_allocs) + + var ctotal_write_unpadded_allocs *cgoAllocMap + refc8e1ed8.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown + allocsc8e1ed8.Borrow(ctotal_write_unpadded_allocs) + + x.refc8e1ed8 = refc8e1ed8 + x.allocsc8e1ed8 = allocsc8e1ed8 + return refc8e1ed8, allocsc8e1ed8 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyEmptySectorUpdateProofResponse) PassValue() (C.fil_VerifyEmptySectorUpdateProofResponse, *cgoAllocMap) { - if x.ref50b7b13 != nil { - return *x.ref50b7b13, nil +func (x FilWriteWithoutAlignmentResponse) PassValue() (C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { + if x.refc8e1ed8 != nil { + return *x.refc8e1ed8, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1372,13 +1556,14 @@ func (x FilVerifyEmptySectorUpdateProofResponse) PassValue() (C.fil_VerifyEmptyS // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyEmptySectorUpdateProofResponse) Deref() { - if x.ref50b7b13 == nil { +func (x *FilWriteWithoutAlignmentResponse) Deref() { + if x.refc8e1ed8 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref50b7b13.status_code) - x.ErrorMsg = packPCharString(x.ref50b7b13.error_msg) - x.IsValid = (bool)(x.ref50b7b13.is_valid) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refc8e1ed8.comm_p)) + x.ErrorMsg = packPCharString(x.refc8e1ed8.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refc8e1ed8.status_code) + x.TotalWriteUnpadded = (uint64)(x.refc8e1ed8.total_write_unpadded) } // allocFilFauxRepResponseMemory allocates memory for type C.fil_FauxRepResponse in C. @@ -1439,7 +1624,7 @@ func (x *FilFauxRepResponse) PassRef() (*C.fil_FauxRepResponse, *cgoAllocMap) { allocsaa003f71.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - refaa003f71.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + refaa003f71.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown allocsaa003f71.Borrow(cstatus_code_allocs) var ccommitment_allocs *cgoAllocMap @@ -1472,81 +1657,85 @@ func (x *FilFauxRepResponse) Deref() { x.Commitment = *(*[32]byte)(unsafe.Pointer(&x.refaa003f71.commitment)) } -// allocFilFinalizeTicketResponseMemory allocates memory for type C.fil_FinalizeTicketResponse in C. +// allocFilSealPreCommitPhase1ResponseMemory allocates memory for type C.fil_SealPreCommitPhase1Response in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilFinalizeTicketResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFinalizeTicketResponseValue)) +func allocFilSealPreCommitPhase1ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase1ResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilFinalizeTicketResponseValue = unsafe.Sizeof([1]C.fil_FinalizeTicketResponse{}) +const sizeOfFilSealPreCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase1Response{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilFinalizeTicketResponse) Ref() *C.fil_FinalizeTicketResponse { +func (x *FilSealPreCommitPhase1Response) Ref() *C.fil_SealPreCommitPhase1Response { if x == nil { return nil } - return x.refb370fa86 + return x.ref132bbfd8 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilFinalizeTicketResponse) Free() { - if x != nil && x.allocsb370fa86 != nil { - x.allocsb370fa86.(*cgoAllocMap).Free() - x.refb370fa86 = nil +func (x *FilSealPreCommitPhase1Response) Free() { + if x != nil && x.allocs132bbfd8 != nil { + x.allocs132bbfd8.(*cgoAllocMap).Free() + x.ref132bbfd8 = nil } } -// NewFilFinalizeTicketResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilSealPreCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilFinalizeTicketResponseRef(ref unsafe.Pointer) *FilFinalizeTicketResponse { +func NewFilSealPreCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase1Response { if ref == nil { return nil } - obj := new(FilFinalizeTicketResponse) - obj.refb370fa86 = (*C.fil_FinalizeTicketResponse)(unsafe.Pointer(ref)) + obj := new(FilSealPreCommitPhase1Response) + obj.ref132bbfd8 = (*C.fil_SealPreCommitPhase1Response)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilFinalizeTicketResponse) PassRef() (*C.fil_FinalizeTicketResponse, *cgoAllocMap) { +func (x *FilSealPreCommitPhase1Response) PassRef() (*C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refb370fa86 != nil { - return x.refb370fa86, nil + } else if x.ref132bbfd8 != nil { + return x.ref132bbfd8, nil } - memb370fa86 := allocFilFinalizeTicketResponseMemory(1) - refb370fa86 := (*C.fil_FinalizeTicketResponse)(memb370fa86) - allocsb370fa86 := new(cgoAllocMap) - allocsb370fa86.Add(memb370fa86) + mem132bbfd8 := allocFilSealPreCommitPhase1ResponseMemory(1) + ref132bbfd8 := (*C.fil_SealPreCommitPhase1Response)(mem132bbfd8) + allocs132bbfd8 := new(cgoAllocMap) + allocs132bbfd8.Add(mem132bbfd8) + + var cerror_msg_allocs *cgoAllocMap + ref132bbfd8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs132bbfd8.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - refb370fa86.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsb370fa86.Borrow(cstatus_code_allocs) + ref132bbfd8.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs132bbfd8.Borrow(cstatus_code_allocs) - var cerror_msg_allocs *cgoAllocMap - refb370fa86.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsb370fa86.Borrow(cerror_msg_allocs) + var cseal_pre_commit_phase1_output_ptr_allocs *cgoAllocMap + ref132bbfd8.seal_pre_commit_phase1_output_ptr, cseal_pre_commit_phase1_output_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.SealPreCommitPhase1OutputPtr))) + allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_ptr_allocs) - var cticket_allocs *cgoAllocMap - refb370fa86.ticket, cticket_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Ticket)), cgoAllocsUnknown - allocsb370fa86.Borrow(cticket_allocs) + var cseal_pre_commit_phase1_output_len_allocs *cgoAllocMap + ref132bbfd8.seal_pre_commit_phase1_output_len, cseal_pre_commit_phase1_output_len_allocs = (C.size_t)(x.SealPreCommitPhase1OutputLen), cgoAllocsUnknown + allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_len_allocs) - x.refb370fa86 = refb370fa86 - x.allocsb370fa86 = allocsb370fa86 - return refb370fa86, allocsb370fa86 + x.ref132bbfd8 = ref132bbfd8 + x.allocs132bbfd8 = allocs132bbfd8 + return ref132bbfd8, allocs132bbfd8 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilFinalizeTicketResponse) PassValue() (C.fil_FinalizeTicketResponse, *cgoAllocMap) { - if x.refb370fa86 != nil { - return *x.refb370fa86, nil +func (x FilSealPreCommitPhase1Response) PassValue() (C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { + if x.ref132bbfd8 != nil { + return *x.ref132bbfd8, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1554,90 +1743,91 @@ func (x FilFinalizeTicketResponse) PassValue() (C.fil_FinalizeTicketResponse, *c // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilFinalizeTicketResponse) Deref() { - if x.refb370fa86 == nil { +func (x *FilSealPreCommitPhase1Response) Deref() { + if x.ref132bbfd8 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.refb370fa86.status_code) - x.ErrorMsg = packPCharString(x.refb370fa86.error_msg) - x.Ticket = *(*[32]byte)(unsafe.Pointer(&x.refb370fa86.ticket)) + x.ErrorMsg = packPCharString(x.ref132bbfd8.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref132bbfd8.status_code) + hxff2234b := (*sliceHeader)(unsafe.Pointer(&x.SealPreCommitPhase1OutputPtr)) + hxff2234b.Data = unsafe.Pointer(x.ref132bbfd8.seal_pre_commit_phase1_output_ptr) + hxff2234b.Cap = 0x7fffffff + // hxff2234b.Len = ? + + x.SealPreCommitPhase1OutputLen = (uint)(x.ref132bbfd8.seal_pre_commit_phase1_output_len) } -// allocFilGenerateDataCommitmentResponseMemory allocates memory for type C.fil_GenerateDataCommitmentResponse in C. +// allocFilPublicPieceInfoMemory allocates memory for type C.fil_PublicPieceInfo in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateDataCommitmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateDataCommitmentResponseValue)) +func allocFilPublicPieceInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicPieceInfoValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateDataCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GenerateDataCommitmentResponse{}) +const sizeOfFilPublicPieceInfoValue = unsafe.Sizeof([1]C.fil_PublicPieceInfo{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateDataCommitmentResponse) Ref() *C.fil_GenerateDataCommitmentResponse { +func (x *FilPublicPieceInfo) Ref() *C.fil_PublicPieceInfo { if x == nil { return nil } - return x.ref87da7dd9 + return x.refd00025ac } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateDataCommitmentResponse) Free() { - if x != nil && x.allocs87da7dd9 != nil { - x.allocs87da7dd9.(*cgoAllocMap).Free() - x.ref87da7dd9 = nil +func (x *FilPublicPieceInfo) Free() { + if x != nil && x.allocsd00025ac != nil { + x.allocsd00025ac.(*cgoAllocMap).Free() + x.refd00025ac = nil } } -// NewFilGenerateDataCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPublicPieceInfoRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateDataCommitmentResponseRef(ref unsafe.Pointer) *FilGenerateDataCommitmentResponse { +func NewFilPublicPieceInfoRef(ref unsafe.Pointer) *FilPublicPieceInfo { if ref == nil { return nil } - obj := new(FilGenerateDataCommitmentResponse) - obj.ref87da7dd9 = (*C.fil_GenerateDataCommitmentResponse)(unsafe.Pointer(ref)) + obj := new(FilPublicPieceInfo) + obj.refd00025ac = (*C.fil_PublicPieceInfo)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateDataCommitmentResponse) PassRef() (*C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { +func (x *FilPublicPieceInfo) PassRef() (*C.fil_PublicPieceInfo, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref87da7dd9 != nil { - return x.ref87da7dd9, nil + } else if x.refd00025ac != nil { + return x.refd00025ac, nil } - mem87da7dd9 := allocFilGenerateDataCommitmentResponseMemory(1) - ref87da7dd9 := (*C.fil_GenerateDataCommitmentResponse)(mem87da7dd9) - allocs87da7dd9 := new(cgoAllocMap) - allocs87da7dd9.Add(mem87da7dd9) - - var cstatus_code_allocs *cgoAllocMap - ref87da7dd9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs87da7dd9.Borrow(cstatus_code_allocs) + memd00025ac := allocFilPublicPieceInfoMemory(1) + refd00025ac := (*C.fil_PublicPieceInfo)(memd00025ac) + allocsd00025ac := new(cgoAllocMap) + allocsd00025ac.Add(memd00025ac) - var cerror_msg_allocs *cgoAllocMap - ref87da7dd9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs87da7dd9.Borrow(cerror_msg_allocs) + var cnum_bytes_allocs *cgoAllocMap + refd00025ac.num_bytes, cnum_bytes_allocs = (C.uint64_t)(x.NumBytes), cgoAllocsUnknown + allocsd00025ac.Borrow(cnum_bytes_allocs) - var ccomm_d_allocs *cgoAllocMap - ref87da7dd9.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown - allocs87da7dd9.Borrow(ccomm_d_allocs) + var ccomm_p_allocs *cgoAllocMap + refd00025ac.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsd00025ac.Borrow(ccomm_p_allocs) - x.ref87da7dd9 = ref87da7dd9 - x.allocs87da7dd9 = allocs87da7dd9 - return ref87da7dd9, allocs87da7dd9 + x.refd00025ac = refd00025ac + x.allocsd00025ac = allocsd00025ac + return refd00025ac, allocsd00025ac } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateDataCommitmentResponse) PassValue() (C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { - if x.ref87da7dd9 != nil { - return *x.ref87da7dd9, nil +func (x FilPublicPieceInfo) PassValue() (C.fil_PublicPieceInfo, *cgoAllocMap) { + if x.refd00025ac != nil { + return *x.refd00025ac, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1645,222 +1835,97 @@ func (x FilGenerateDataCommitmentResponse) PassValue() (C.fil_GenerateDataCommit // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateDataCommitmentResponse) Deref() { - if x.ref87da7dd9 == nil { +func (x *FilPublicPieceInfo) Deref() { + if x.refd00025ac == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref87da7dd9.status_code) - x.ErrorMsg = packPCharString(x.ref87da7dd9.error_msg) - x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref87da7dd9.comm_d)) + x.NumBytes = (uint64)(x.refd00025ac.num_bytes) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refd00025ac.comm_p)) } -// allocFilPartitionProofMemory allocates memory for type C.fil_PartitionProof in C. +// allocFilSealPreCommitPhase2ResponseMemory allocates memory for type C.fil_SealPreCommitPhase2Response in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPartitionProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionProofValue)) +func allocFilSealPreCommitPhase2ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase2ResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPartitionProofValue = unsafe.Sizeof([1]C.fil_PartitionProof{}) +const sizeOfFilSealPreCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase2Response{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPartitionProof) Ref() *C.fil_PartitionProof { +func (x *FilSealPreCommitPhase2Response) Ref() *C.fil_SealPreCommitPhase2Response { if x == nil { return nil } - return x.ref566a2be6 + return x.ref2aa6831d } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPartitionProof) Free() { - if x != nil && x.allocs566a2be6 != nil { - x.allocs566a2be6.(*cgoAllocMap).Free() - x.ref566a2be6 = nil +func (x *FilSealPreCommitPhase2Response) Free() { + if x != nil && x.allocs2aa6831d != nil { + x.allocs2aa6831d.(*cgoAllocMap).Free() + x.ref2aa6831d = nil } } -// NewFilPartitionProofRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilSealPreCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPartitionProofRef(ref unsafe.Pointer) *FilPartitionProof { +func NewFilSealPreCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase2Response { if ref == nil { return nil } - obj := new(FilPartitionProof) - obj.ref566a2be6 = (*C.fil_PartitionProof)(unsafe.Pointer(ref)) + obj := new(FilSealPreCommitPhase2Response) + obj.ref2aa6831d = (*C.fil_SealPreCommitPhase2Response)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPartitionProof) PassRef() (*C.fil_PartitionProof, *cgoAllocMap) { +func (x *FilSealPreCommitPhase2Response) PassRef() (*C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref566a2be6 != nil { - return x.ref566a2be6, nil + } else if x.ref2aa6831d != nil { + return x.ref2aa6831d, nil } - mem566a2be6 := allocFilPartitionProofMemory(1) - ref566a2be6 := (*C.fil_PartitionProof)(mem566a2be6) - allocs566a2be6 := new(cgoAllocMap) - allocs566a2be6.Add(mem566a2be6) + mem2aa6831d := allocFilSealPreCommitPhase2ResponseMemory(1) + ref2aa6831d := (*C.fil_SealPreCommitPhase2Response)(mem2aa6831d) + allocs2aa6831d := new(cgoAllocMap) + allocs2aa6831d.Add(mem2aa6831d) - var cproof_len_allocs *cgoAllocMap - ref566a2be6.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs566a2be6.Borrow(cproof_len_allocs) + var cerror_msg_allocs *cgoAllocMap + ref2aa6831d.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs2aa6831d.Borrow(cerror_msg_allocs) - var cproof_ptr_allocs *cgoAllocMap - ref566a2be6.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs566a2be6.Borrow(cproof_ptr_allocs) + var cstatus_code_allocs *cgoAllocMap + ref2aa6831d.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs2aa6831d.Borrow(cstatus_code_allocs) - x.ref566a2be6 = ref566a2be6 - x.allocs566a2be6 = allocs566a2be6 - return ref566a2be6, allocs566a2be6 + var cregistered_proof_allocs *cgoAllocMap + ref2aa6831d.registered_proof, cregistered_proof_allocs = (C.enum_fil_RegisteredSealProof)(x.RegisteredProof), cgoAllocsUnknown + allocs2aa6831d.Borrow(cregistered_proof_allocs) -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPartitionProof) PassValue() (C.fil_PartitionProof, *cgoAllocMap) { - if x.ref566a2be6 != nil { - return *x.ref566a2be6, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPartitionProof) Deref() { - if x.ref566a2be6 == nil { - return - } - x.ProofLen = (uint)(x.ref566a2be6.proof_len) - hxff73280 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxff73280.Data = unsafe.Pointer(x.ref566a2be6.proof_ptr) - hxff73280.Cap = 0x7fffffff - // hxff73280.Len = ? - -} - -// allocFilPartitionProofResponseMemory allocates memory for type C.fil_PartitionProofResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPartitionProofResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionProofResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPartitionProofResponseValue = unsafe.Sizeof([1]C.fil_PartitionProofResponse{}) - -// unpackSFilPartitionProof transforms a sliced Go data structure into plain C format. -func unpackSFilPartitionProof(x []FilPartitionProof) (unpacked *C.fil_PartitionProof, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPartitionProofMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PartitionProof)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PartitionProof)(h.Data) - return -} - -// packSFilPartitionProof reads sliced Go data structure out from plain C format. -func packSFilPartitionProof(v []FilPartitionProof, ptr0 *C.fil_PartitionProof) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPartitionProofValue]C.fil_PartitionProof)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPartitionProofRef(unsafe.Pointer(&ptr1)) - } -} - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPartitionProofResponse) Ref() *C.fil_PartitionProofResponse { - if x == nil { - return nil - } - return x.ref51343e7a -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPartitionProofResponse) Free() { - if x != nil && x.allocs51343e7a != nil { - x.allocs51343e7a.(*cgoAllocMap).Free() - x.ref51343e7a = nil - } -} - -// NewFilPartitionProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPartitionProofResponseRef(ref unsafe.Pointer) *FilPartitionProofResponse { - if ref == nil { - return nil - } - obj := new(FilPartitionProofResponse) - obj.ref51343e7a = (*C.fil_PartitionProofResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPartitionProofResponse) PassRef() (*C.fil_PartitionProofResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref51343e7a != nil { - return x.ref51343e7a, nil - } - mem51343e7a := allocFilPartitionProofResponseMemory(1) - ref51343e7a := (*C.fil_PartitionProofResponse)(mem51343e7a) - allocs51343e7a := new(cgoAllocMap) - allocs51343e7a.Add(mem51343e7a) - - var cstatus_code_allocs *cgoAllocMap - ref51343e7a.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs51343e7a.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref51343e7a.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs51343e7a.Borrow(cerror_msg_allocs) - - var cproofs_len_allocs *cgoAllocMap - ref51343e7a.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown - allocs51343e7a.Borrow(cproofs_len_allocs) + var ccomm_d_allocs *cgoAllocMap + ref2aa6831d.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown + allocs2aa6831d.Borrow(ccomm_d_allocs) - var cproofs_ptr_allocs *cgoAllocMap - ref51343e7a.proofs_ptr, cproofs_ptr_allocs = unpackSFilPartitionProof(x.ProofsPtr) - allocs51343e7a.Borrow(cproofs_ptr_allocs) + var ccomm_r_allocs *cgoAllocMap + ref2aa6831d.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs2aa6831d.Borrow(ccomm_r_allocs) - x.ref51343e7a = ref51343e7a - x.allocs51343e7a = allocs51343e7a - return ref51343e7a, allocs51343e7a + x.ref2aa6831d = ref2aa6831d + x.allocs2aa6831d = allocs2aa6831d + return ref2aa6831d, allocs2aa6831d } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPartitionProofResponse) PassValue() (C.fil_PartitionProofResponse, *cgoAllocMap) { - if x.ref51343e7a != nil { - return *x.ref51343e7a, nil +func (x FilSealPreCommitPhase2Response) PassValue() (C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { + if x.ref2aa6831d != nil { + return *x.ref2aa6831d, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -1868,136 +1933,96 @@ func (x FilPartitionProofResponse) PassValue() (C.fil_PartitionProofResponse, *c // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPartitionProofResponse) Deref() { - if x.ref51343e7a == nil { +func (x *FilSealPreCommitPhase2Response) Deref() { + if x.ref2aa6831d == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref51343e7a.status_code) - x.ErrorMsg = packPCharString(x.ref51343e7a.error_msg) - x.ProofsLen = (uint)(x.ref51343e7a.proofs_len) - packSFilPartitionProof(x.ProofsPtr, x.ref51343e7a.proofs_ptr) -} - -// allocFilGenerateFallbackSectorChallengesResponseMemory allocates memory for type C.fil_GenerateFallbackSectorChallengesResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateFallbackSectorChallengesResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateFallbackSectorChallengesResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGenerateFallbackSectorChallengesResponseValue = unsafe.Sizeof([1]C.fil_GenerateFallbackSectorChallengesResponse{}) - -// copyPUint64TBytes copies the data from Go slice as *C.uint64_t. -func copyPUint64TBytes(slice *sliceHeader) (*C.uint64_t, *cgoAllocMap) { - allocs := new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ - Data: slice.Data, - Len: int(sizeOfUint64TValue) * slice.Len, - Cap: int(sizeOfUint64TValue) * slice.Len, - })))) - allocs.Add(mem0) - - return (*C.uint64_t)(mem0), allocs + x.ErrorMsg = packPCharString(x.ref2aa6831d.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref2aa6831d.status_code) + x.RegisteredProof = (FilRegisteredSealProof)(x.ref2aa6831d.registered_proof) + x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_d)) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_r)) } -// allocUint64TMemory allocates memory for type C.uint64_t in C. +// allocFilSealCommitPhase1ResponseMemory allocates memory for type C.fil_SealCommitPhase1Response in C. // The caller is responsible for freeing the this memory via C.free. -func allocUint64TMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfUint64TValue)) +func allocFilSealCommitPhase1ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase1ResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfUint64TValue = unsafe.Sizeof([1]C.uint64_t{}) +const sizeOfFilSealCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase1Response{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateFallbackSectorChallengesResponse) Ref() *C.fil_GenerateFallbackSectorChallengesResponse { +func (x *FilSealCommitPhase1Response) Ref() *C.fil_SealCommitPhase1Response { if x == nil { return nil } - return x.ref7047a3fa + return x.ref61ed8561 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateFallbackSectorChallengesResponse) Free() { - if x != nil && x.allocs7047a3fa != nil { - x.allocs7047a3fa.(*cgoAllocMap).Free() - x.ref7047a3fa = nil +func (x *FilSealCommitPhase1Response) Free() { + if x != nil && x.allocs61ed8561 != nil { + x.allocs61ed8561.(*cgoAllocMap).Free() + x.ref61ed8561 = nil } } -// NewFilGenerateFallbackSectorChallengesResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilSealCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateFallbackSectorChallengesResponseRef(ref unsafe.Pointer) *FilGenerateFallbackSectorChallengesResponse { +func NewFilSealCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase1Response { if ref == nil { return nil } - obj := new(FilGenerateFallbackSectorChallengesResponse) - obj.ref7047a3fa = (*C.fil_GenerateFallbackSectorChallengesResponse)(unsafe.Pointer(ref)) + obj := new(FilSealCommitPhase1Response) + obj.ref61ed8561 = (*C.fil_SealCommitPhase1Response)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateFallbackSectorChallengesResponse) PassRef() (*C.fil_GenerateFallbackSectorChallengesResponse, *cgoAllocMap) { +func (x *FilSealCommitPhase1Response) PassRef() (*C.fil_SealCommitPhase1Response, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref7047a3fa != nil { - return x.ref7047a3fa, nil + } else if x.ref61ed8561 != nil { + return x.ref61ed8561, nil } - mem7047a3fa := allocFilGenerateFallbackSectorChallengesResponseMemory(1) - ref7047a3fa := (*C.fil_GenerateFallbackSectorChallengesResponse)(mem7047a3fa) - allocs7047a3fa := new(cgoAllocMap) - allocs7047a3fa.Add(mem7047a3fa) - - var cerror_msg_allocs *cgoAllocMap - ref7047a3fa.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs7047a3fa.Borrow(cerror_msg_allocs) + mem61ed8561 := allocFilSealCommitPhase1ResponseMemory(1) + ref61ed8561 := (*C.fil_SealCommitPhase1Response)(mem61ed8561) + allocs61ed8561 := new(cgoAllocMap) + allocs61ed8561.Add(mem61ed8561) var cstatus_code_allocs *cgoAllocMap - ref7047a3fa.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs7047a3fa.Borrow(cstatus_code_allocs) - - var cids_ptr_allocs *cgoAllocMap - ref7047a3fa.ids_ptr, cids_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.IdsPtr))) - allocs7047a3fa.Borrow(cids_ptr_allocs) - - var cids_len_allocs *cgoAllocMap - ref7047a3fa.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown - allocs7047a3fa.Borrow(cids_len_allocs) + ref61ed8561.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs61ed8561.Borrow(cstatus_code_allocs) - var cchallenges_ptr_allocs *cgoAllocMap - ref7047a3fa.challenges_ptr, cchallenges_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.ChallengesPtr))) - allocs7047a3fa.Borrow(cchallenges_ptr_allocs) + var cerror_msg_allocs *cgoAllocMap + ref61ed8561.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs61ed8561.Borrow(cerror_msg_allocs) - var cchallenges_len_allocs *cgoAllocMap - ref7047a3fa.challenges_len, cchallenges_len_allocs = (C.size_t)(x.ChallengesLen), cgoAllocsUnknown - allocs7047a3fa.Borrow(cchallenges_len_allocs) + var cseal_commit_phase1_output_ptr_allocs *cgoAllocMap + ref61ed8561.seal_commit_phase1_output_ptr, cseal_commit_phase1_output_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.SealCommitPhase1OutputPtr))) + allocs61ed8561.Borrow(cseal_commit_phase1_output_ptr_allocs) - var cchallenges_stride_allocs *cgoAllocMap - ref7047a3fa.challenges_stride, cchallenges_stride_allocs = (C.size_t)(x.ChallengesStride), cgoAllocsUnknown - allocs7047a3fa.Borrow(cchallenges_stride_allocs) + var cseal_commit_phase1_output_len_allocs *cgoAllocMap + ref61ed8561.seal_commit_phase1_output_len, cseal_commit_phase1_output_len_allocs = (C.size_t)(x.SealCommitPhase1OutputLen), cgoAllocsUnknown + allocs61ed8561.Borrow(cseal_commit_phase1_output_len_allocs) - x.ref7047a3fa = ref7047a3fa - x.allocs7047a3fa = allocs7047a3fa - return ref7047a3fa, allocs7047a3fa + x.ref61ed8561 = ref61ed8561 + x.allocs61ed8561 = allocs61ed8561 + return ref61ed8561, allocs61ed8561 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateFallbackSectorChallengesResponse) PassValue() (C.fil_GenerateFallbackSectorChallengesResponse, *cgoAllocMap) { - if x.ref7047a3fa != nil { - return *x.ref7047a3fa, nil +func (x FilSealCommitPhase1Response) PassValue() (C.fil_SealCommitPhase1Response, *cgoAllocMap) { + if x.ref61ed8561 != nil { + return *x.ref61ed8561, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2005,106 +2030,103 @@ func (x FilGenerateFallbackSectorChallengesResponse) PassValue() (C.fil_Generate // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateFallbackSectorChallengesResponse) Deref() { - if x.ref7047a3fa == nil { +func (x *FilSealCommitPhase1Response) Deref() { + if x.ref61ed8561 == nil { return } - x.ErrorMsg = packPCharString(x.ref7047a3fa.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref7047a3fa.status_code) - hxfa9955c := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) - hxfa9955c.Data = unsafe.Pointer(x.ref7047a3fa.ids_ptr) - hxfa9955c.Cap = 0x7fffffff - // hxfa9955c.Len = ? - - x.IdsLen = (uint)(x.ref7047a3fa.ids_len) - hxfa3f05c := (*sliceHeader)(unsafe.Pointer(&x.ChallengesPtr)) - hxfa3f05c.Data = unsafe.Pointer(x.ref7047a3fa.challenges_ptr) - hxfa3f05c.Cap = 0x7fffffff - // hxfa3f05c.Len = ? + x.StatusCode = (FCPResponseStatus)(x.ref61ed8561.status_code) + x.ErrorMsg = packPCharString(x.ref61ed8561.error_msg) + hxff73280 := (*sliceHeader)(unsafe.Pointer(&x.SealCommitPhase1OutputPtr)) + hxff73280.Data = unsafe.Pointer(x.ref61ed8561.seal_commit_phase1_output_ptr) + hxff73280.Cap = 0x7fffffff + // hxff73280.Len = ? - x.ChallengesLen = (uint)(x.ref7047a3fa.challenges_len) - x.ChallengesStride = (uint)(x.ref7047a3fa.challenges_stride) + x.SealCommitPhase1OutputLen = (uint)(x.ref61ed8561.seal_commit_phase1_output_len) } -// allocFilGeneratePieceCommitmentResponseMemory allocates memory for type C.fil_GeneratePieceCommitmentResponse in C. +// allocFilAggregationInputsMemory allocates memory for type C.fil_AggregationInputs in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGeneratePieceCommitmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGeneratePieceCommitmentResponseValue)) +func allocFilAggregationInputsMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregationInputsValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGeneratePieceCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GeneratePieceCommitmentResponse{}) +const sizeOfFilAggregationInputsValue = unsafe.Sizeof([1]C.fil_AggregationInputs{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGeneratePieceCommitmentResponse) Ref() *C.fil_GeneratePieceCommitmentResponse { +func (x *FilAggregationInputs) Ref() *C.fil_AggregationInputs { if x == nil { return nil } - return x.ref4b00fda4 + return x.ref90b967c9 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGeneratePieceCommitmentResponse) Free() { - if x != nil && x.allocs4b00fda4 != nil { - x.allocs4b00fda4.(*cgoAllocMap).Free() - x.ref4b00fda4 = nil +func (x *FilAggregationInputs) Free() { + if x != nil && x.allocs90b967c9 != nil { + x.allocs90b967c9.(*cgoAllocMap).Free() + x.ref90b967c9 = nil } } -// NewFilGeneratePieceCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilAggregationInputsRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGeneratePieceCommitmentResponseRef(ref unsafe.Pointer) *FilGeneratePieceCommitmentResponse { +func NewFilAggregationInputsRef(ref unsafe.Pointer) *FilAggregationInputs { if ref == nil { return nil } - obj := new(FilGeneratePieceCommitmentResponse) - obj.ref4b00fda4 = (*C.fil_GeneratePieceCommitmentResponse)(unsafe.Pointer(ref)) + obj := new(FilAggregationInputs) + obj.ref90b967c9 = (*C.fil_AggregationInputs)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGeneratePieceCommitmentResponse) PassRef() (*C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { +func (x *FilAggregationInputs) PassRef() (*C.fil_AggregationInputs, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref4b00fda4 != nil { - return x.ref4b00fda4, nil + } else if x.ref90b967c9 != nil { + return x.ref90b967c9, nil } - mem4b00fda4 := allocFilGeneratePieceCommitmentResponseMemory(1) - ref4b00fda4 := (*C.fil_GeneratePieceCommitmentResponse)(mem4b00fda4) - allocs4b00fda4 := new(cgoAllocMap) - allocs4b00fda4.Add(mem4b00fda4) + mem90b967c9 := allocFilAggregationInputsMemory(1) + ref90b967c9 := (*C.fil_AggregationInputs)(mem90b967c9) + allocs90b967c9 := new(cgoAllocMap) + allocs90b967c9.Add(mem90b967c9) - var cstatus_code_allocs *cgoAllocMap - ref4b00fda4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs4b00fda4.Borrow(cstatus_code_allocs) + var ccomm_r_allocs *cgoAllocMap + ref90b967c9.comm_r, ccomm_r_allocs = x.CommR.PassValue() + allocs90b967c9.Borrow(ccomm_r_allocs) - var cerror_msg_allocs *cgoAllocMap - ref4b00fda4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs4b00fda4.Borrow(cerror_msg_allocs) + var ccomm_d_allocs *cgoAllocMap + ref90b967c9.comm_d, ccomm_d_allocs = x.CommD.PassValue() + allocs90b967c9.Borrow(ccomm_d_allocs) - var ccomm_p_allocs *cgoAllocMap - ref4b00fda4.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocs4b00fda4.Borrow(ccomm_p_allocs) + var csector_id_allocs *cgoAllocMap + ref90b967c9.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown + allocs90b967c9.Borrow(csector_id_allocs) - var cnum_bytes_aligned_allocs *cgoAllocMap - ref4b00fda4.num_bytes_aligned, cnum_bytes_aligned_allocs = (C.uint64_t)(x.NumBytesAligned), cgoAllocsUnknown - allocs4b00fda4.Borrow(cnum_bytes_aligned_allocs) + var cticket_allocs *cgoAllocMap + ref90b967c9.ticket, cticket_allocs = x.Ticket.PassValue() + allocs90b967c9.Borrow(cticket_allocs) - x.ref4b00fda4 = ref4b00fda4 - x.allocs4b00fda4 = allocs4b00fda4 - return ref4b00fda4, allocs4b00fda4 + var cseed_allocs *cgoAllocMap + ref90b967c9.seed, cseed_allocs = x.Seed.PassValue() + allocs90b967c9.Borrow(cseed_allocs) + + x.ref90b967c9 = ref90b967c9 + x.allocs90b967c9 = allocs90b967c9 + return ref90b967c9, allocs90b967c9 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGeneratePieceCommitmentResponse) PassValue() (C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { - if x.ref4b00fda4 != nil { - return *x.ref4b00fda4, nil +func (x FilAggregationInputs) PassValue() (C.fil_AggregationInputs, *cgoAllocMap) { + if x.ref90b967c9 != nil { + return *x.ref90b967c9, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2112,87 +2134,156 @@ func (x FilGeneratePieceCommitmentResponse) PassValue() (C.fil_GeneratePieceComm // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGeneratePieceCommitmentResponse) Deref() { - if x.ref4b00fda4 == nil { +func (x *FilAggregationInputs) Deref() { + if x.ref90b967c9 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref4b00fda4.status_code) - x.ErrorMsg = packPCharString(x.ref4b00fda4.error_msg) - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.ref4b00fda4.comm_p)) - x.NumBytesAligned = (uint64)(x.ref4b00fda4.num_bytes_aligned) + x.CommR = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.comm_r)) + x.CommD = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.comm_d)) + x.SectorId = (uint64)(x.ref90b967c9.sector_id) + x.Ticket = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.ticket)) + x.Seed = *NewFil32ByteArrayRef(unsafe.Pointer(&x.ref90b967c9.seed)) } -// allocFilVanillaProofMemory allocates memory for type C.fil_VanillaProof in C. +// allocFilSealCommitPhase2ResponseMemory allocates memory for type C.fil_SealCommitPhase2Response in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilVanillaProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVanillaProofValue)) +func allocFilSealCommitPhase2ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase2ResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilVanillaProofValue = unsafe.Sizeof([1]C.fil_VanillaProof{}) +const sizeOfFilSealCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase2Response{}) + +// allocStructFilAggregationInputsMemory allocates memory for type C.struct_fil_AggregationInputs in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilAggregationInputsMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilAggregationInputsValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilAggregationInputsValue = unsafe.Sizeof([1]C.struct_fil_AggregationInputs{}) + +const sizeOfPtr = unsafe.Sizeof(&struct{}{}) + +// unpackSFilAggregationInputs transforms a sliced Go data structure into plain C format. +func unpackSFilAggregationInputs(x []FilAggregationInputs) (unpacked *C.struct_fil_AggregationInputs, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocStructFilAggregationInputsMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.struct_fil_AggregationInputs)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.struct_fil_AggregationInputs)(h.Data) + return +} + +// packSFilAggregationInputs reads sliced Go data structure out from plain C format. +func packSFilAggregationInputs(v []FilAggregationInputs, ptr0 *C.struct_fil_AggregationInputs) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfStructFilAggregationInputsValue]C.struct_fil_AggregationInputs)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilAggregationInputsRef(unsafe.Pointer(&ptr1)) + } +} // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVanillaProof) Ref() *C.fil_VanillaProof { +func (x *FilSealCommitPhase2Response) Ref() *C.fil_SealCommitPhase2Response { if x == nil { return nil } - return x.refb3e7638c + return x.ref5860b9a4 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVanillaProof) Free() { - if x != nil && x.allocsb3e7638c != nil { - x.allocsb3e7638c.(*cgoAllocMap).Free() - x.refb3e7638c = nil +func (x *FilSealCommitPhase2Response) Free() { + if x != nil && x.allocs5860b9a4 != nil { + x.allocs5860b9a4.(*cgoAllocMap).Free() + x.ref5860b9a4 = nil } } -// NewFilVanillaProofRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilSealCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVanillaProofRef(ref unsafe.Pointer) *FilVanillaProof { +func NewFilSealCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase2Response { if ref == nil { return nil } - obj := new(FilVanillaProof) - obj.refb3e7638c = (*C.fil_VanillaProof)(unsafe.Pointer(ref)) + obj := new(FilSealCommitPhase2Response) + obj.ref5860b9a4 = (*C.fil_SealCommitPhase2Response)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVanillaProof) PassRef() (*C.fil_VanillaProof, *cgoAllocMap) { +func (x *FilSealCommitPhase2Response) PassRef() (*C.fil_SealCommitPhase2Response, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refb3e7638c != nil { - return x.refb3e7638c, nil + } else if x.ref5860b9a4 != nil { + return x.ref5860b9a4, nil } - memb3e7638c := allocFilVanillaProofMemory(1) - refb3e7638c := (*C.fil_VanillaProof)(memb3e7638c) - allocsb3e7638c := new(cgoAllocMap) - allocsb3e7638c.Add(memb3e7638c) + mem5860b9a4 := allocFilSealCommitPhase2ResponseMemory(1) + ref5860b9a4 := (*C.fil_SealCommitPhase2Response)(mem5860b9a4) + allocs5860b9a4 := new(cgoAllocMap) + allocs5860b9a4.Add(mem5860b9a4) - var cproof_len_allocs *cgoAllocMap - refb3e7638c.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocsb3e7638c.Borrow(cproof_len_allocs) + var cstatus_code_allocs *cgoAllocMap + ref5860b9a4.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs5860b9a4.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref5860b9a4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs5860b9a4.Borrow(cerror_msg_allocs) var cproof_ptr_allocs *cgoAllocMap - refb3e7638c.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocsb3e7638c.Borrow(cproof_ptr_allocs) + ref5860b9a4.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs5860b9a4.Borrow(cproof_ptr_allocs) - x.refb3e7638c = refb3e7638c - x.allocsb3e7638c = allocsb3e7638c - return refb3e7638c, allocsb3e7638c + var cproof_len_allocs *cgoAllocMap + ref5860b9a4.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs5860b9a4.Borrow(cproof_len_allocs) + + var ccommit_inputs_ptr_allocs *cgoAllocMap + ref5860b9a4.commit_inputs_ptr, ccommit_inputs_ptr_allocs = unpackSFilAggregationInputs(x.CommitInputsPtr) + allocs5860b9a4.Borrow(ccommit_inputs_ptr_allocs) + + var ccommit_inputs_len_allocs *cgoAllocMap + ref5860b9a4.commit_inputs_len, ccommit_inputs_len_allocs = (C.size_t)(x.CommitInputsLen), cgoAllocsUnknown + allocs5860b9a4.Borrow(ccommit_inputs_len_allocs) + + x.ref5860b9a4 = ref5860b9a4 + x.allocs5860b9a4 = allocs5860b9a4 + return ref5860b9a4, allocs5860b9a4 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVanillaProof) PassValue() (C.fil_VanillaProof, *cgoAllocMap) { - if x.refb3e7638c != nil { - return *x.refb3e7638c, nil +func (x FilSealCommitPhase2Response) PassValue() (C.fil_SealCommitPhase2Response, *cgoAllocMap) { + if x.ref5860b9a4 != nil { + return *x.ref5860b9a4, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2200,93 +2291,101 @@ func (x FilVanillaProof) PassValue() (C.fil_VanillaProof, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVanillaProof) Deref() { - if x.refb3e7638c == nil { +func (x *FilSealCommitPhase2Response) Deref() { + if x.ref5860b9a4 == nil { return } - x.ProofLen = (uint)(x.refb3e7638c.proof_len) - hxf0d18b7 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxf0d18b7.Data = unsafe.Pointer(x.refb3e7638c.proof_ptr) - hxf0d18b7.Cap = 0x7fffffff - // hxf0d18b7.Len = ? + x.StatusCode = (FCPResponseStatus)(x.ref5860b9a4.status_code) + x.ErrorMsg = packPCharString(x.ref5860b9a4.error_msg) + hxfa9955c := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxfa9955c.Data = unsafe.Pointer(x.ref5860b9a4.proof_ptr) + hxfa9955c.Cap = 0x7fffffff + // hxfa9955c.Len = ? + x.ProofLen = (uint)(x.ref5860b9a4.proof_len) + packSFilAggregationInputs(x.CommitInputsPtr, x.ref5860b9a4.commit_inputs_ptr) + x.CommitInputsLen = (uint)(x.ref5860b9a4.commit_inputs_len) } -// allocFilGenerateSingleVanillaProofResponseMemory allocates memory for type C.fil_GenerateSingleVanillaProofResponse in C. +// allocFilAggregateProofMemory allocates memory for type C.fil_AggregateProof in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateSingleVanillaProofResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateSingleVanillaProofResponseValue)) +func allocFilAggregateProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregateProofValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateSingleVanillaProofResponseValue = unsafe.Sizeof([1]C.fil_GenerateSingleVanillaProofResponse{}) +const sizeOfFilAggregateProofValue = unsafe.Sizeof([1]C.fil_AggregateProof{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateSingleVanillaProofResponse) Ref() *C.fil_GenerateSingleVanillaProofResponse { +func (x *FilAggregateProof) Ref() *C.fil_AggregateProof { if x == nil { return nil } - return x.reff9d21b04 + return x.ref22b6c4f6 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateSingleVanillaProofResponse) Free() { - if x != nil && x.allocsf9d21b04 != nil { - x.allocsf9d21b04.(*cgoAllocMap).Free() - x.reff9d21b04 = nil +func (x *FilAggregateProof) Free() { + if x != nil && x.allocs22b6c4f6 != nil { + x.allocs22b6c4f6.(*cgoAllocMap).Free() + x.ref22b6c4f6 = nil } } -// NewFilGenerateSingleVanillaProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilAggregateProofRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateSingleVanillaProofResponseRef(ref unsafe.Pointer) *FilGenerateSingleVanillaProofResponse { +func NewFilAggregateProofRef(ref unsafe.Pointer) *FilAggregateProof { if ref == nil { return nil } - obj := new(FilGenerateSingleVanillaProofResponse) - obj.reff9d21b04 = (*C.fil_GenerateSingleVanillaProofResponse)(unsafe.Pointer(ref)) + obj := new(FilAggregateProof) + obj.ref22b6c4f6 = (*C.fil_AggregateProof)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateSingleVanillaProofResponse) PassRef() (*C.fil_GenerateSingleVanillaProofResponse, *cgoAllocMap) { +func (x *FilAggregateProof) PassRef() (*C.fil_AggregateProof, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.reff9d21b04 != nil { - return x.reff9d21b04, nil + } else if x.ref22b6c4f6 != nil { + return x.ref22b6c4f6, nil } - memf9d21b04 := allocFilGenerateSingleVanillaProofResponseMemory(1) - reff9d21b04 := (*C.fil_GenerateSingleVanillaProofResponse)(memf9d21b04) - allocsf9d21b04 := new(cgoAllocMap) - allocsf9d21b04.Add(memf9d21b04) + mem22b6c4f6 := allocFilAggregateProofMemory(1) + ref22b6c4f6 := (*C.fil_AggregateProof)(mem22b6c4f6) + allocs22b6c4f6 := new(cgoAllocMap) + allocs22b6c4f6.Add(mem22b6c4f6) + + var cstatus_code_allocs *cgoAllocMap + ref22b6c4f6.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs22b6c4f6.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - reff9d21b04.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsf9d21b04.Borrow(cerror_msg_allocs) + ref22b6c4f6.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs22b6c4f6.Borrow(cerror_msg_allocs) - var cvanilla_proof_allocs *cgoAllocMap - reff9d21b04.vanilla_proof, cvanilla_proof_allocs = x.VanillaProof.PassValue() - allocsf9d21b04.Borrow(cvanilla_proof_allocs) + var cproof_len_allocs *cgoAllocMap + ref22b6c4f6.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs22b6c4f6.Borrow(cproof_len_allocs) - var cstatus_code_allocs *cgoAllocMap - reff9d21b04.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsf9d21b04.Borrow(cstatus_code_allocs) + var cproof_ptr_allocs *cgoAllocMap + ref22b6c4f6.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs22b6c4f6.Borrow(cproof_ptr_allocs) - x.reff9d21b04 = reff9d21b04 - x.allocsf9d21b04 = allocsf9d21b04 - return reff9d21b04, allocsf9d21b04 + x.ref22b6c4f6 = ref22b6c4f6 + x.allocs22b6c4f6 = allocs22b6c4f6 + return ref22b6c4f6, allocs22b6c4f6 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateSingleVanillaProofResponse) PassValue() (C.fil_GenerateSingleVanillaProofResponse, *cgoAllocMap) { - if x.reff9d21b04 != nil { - return *x.reff9d21b04, nil +func (x FilAggregateProof) PassValue() (C.fil_AggregateProof, *cgoAllocMap) { + if x.ref22b6c4f6 != nil { + return *x.ref22b6c4f6, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2294,90 +2393,95 @@ func (x FilGenerateSingleVanillaProofResponse) PassValue() (C.fil_GenerateSingle // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateSingleVanillaProofResponse) Deref() { - if x.reff9d21b04 == nil { +func (x *FilAggregateProof) Deref() { + if x.ref22b6c4f6 == nil { return } - x.ErrorMsg = packPCharString(x.reff9d21b04.error_msg) - x.VanillaProof = *NewFilVanillaProofRef(unsafe.Pointer(&x.reff9d21b04.vanilla_proof)) - x.StatusCode = (FCPResponseStatus)(x.reff9d21b04.status_code) + x.StatusCode = (FCPResponseStatus)(x.ref22b6c4f6.status_code) + x.ErrorMsg = packPCharString(x.ref22b6c4f6.error_msg) + x.ProofLen = (uint)(x.ref22b6c4f6.proof_len) + hxfa3f05c := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxfa3f05c.Data = unsafe.Pointer(x.ref22b6c4f6.proof_ptr) + hxfa3f05c.Cap = 0x7fffffff + // hxfa3f05c.Len = ? + } -// allocFilPartitionSnarkProofMemory allocates memory for type C.fil_PartitionSnarkProof in C. +// allocFilVerifyAggregateSealProofResponseMemory allocates memory for type C.fil_VerifyAggregateSealProofResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPartitionSnarkProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionSnarkProofValue)) +func allocFilVerifyAggregateSealProofResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyAggregateSealProofResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPartitionSnarkProofValue = unsafe.Sizeof([1]C.fil_PartitionSnarkProof{}) +const sizeOfFilVerifyAggregateSealProofResponseValue = unsafe.Sizeof([1]C.fil_VerifyAggregateSealProofResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPartitionSnarkProof) Ref() *C.fil_PartitionSnarkProof { +func (x *FilVerifyAggregateSealProofResponse) Ref() *C.fil_VerifyAggregateSealProofResponse { if x == nil { return nil } - return x.ref4de03739 + return x.ref66180e0 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPartitionSnarkProof) Free() { - if x != nil && x.allocs4de03739 != nil { - x.allocs4de03739.(*cgoAllocMap).Free() - x.ref4de03739 = nil +func (x *FilVerifyAggregateSealProofResponse) Free() { + if x != nil && x.allocs66180e0 != nil { + x.allocs66180e0.(*cgoAllocMap).Free() + x.ref66180e0 = nil } } -// NewFilPartitionSnarkProofRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilVerifyAggregateSealProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPartitionSnarkProofRef(ref unsafe.Pointer) *FilPartitionSnarkProof { +func NewFilVerifyAggregateSealProofResponseRef(ref unsafe.Pointer) *FilVerifyAggregateSealProofResponse { if ref == nil { return nil } - obj := new(FilPartitionSnarkProof) - obj.ref4de03739 = (*C.fil_PartitionSnarkProof)(unsafe.Pointer(ref)) + obj := new(FilVerifyAggregateSealProofResponse) + obj.ref66180e0 = (*C.fil_VerifyAggregateSealProofResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPartitionSnarkProof) PassRef() (*C.fil_PartitionSnarkProof, *cgoAllocMap) { +func (x *FilVerifyAggregateSealProofResponse) PassRef() (*C.fil_VerifyAggregateSealProofResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref4de03739 != nil { - return x.ref4de03739, nil + } else if x.ref66180e0 != nil { + return x.ref66180e0, nil } - mem4de03739 := allocFilPartitionSnarkProofMemory(1) - ref4de03739 := (*C.fil_PartitionSnarkProof)(mem4de03739) - allocs4de03739 := new(cgoAllocMap) - allocs4de03739.Add(mem4de03739) + mem66180e0 := allocFilVerifyAggregateSealProofResponseMemory(1) + ref66180e0 := (*C.fil_VerifyAggregateSealProofResponse)(mem66180e0) + allocs66180e0 := new(cgoAllocMap) + allocs66180e0.Add(mem66180e0) - var cregistered_proof_allocs *cgoAllocMap - ref4de03739.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs4de03739.Borrow(cregistered_proof_allocs) + var cstatus_code_allocs *cgoAllocMap + ref66180e0.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs66180e0.Borrow(cstatus_code_allocs) - var cproof_len_allocs *cgoAllocMap - ref4de03739.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs4de03739.Borrow(cproof_len_allocs) + var cerror_msg_allocs *cgoAllocMap + ref66180e0.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs66180e0.Borrow(cerror_msg_allocs) - var cproof_ptr_allocs *cgoAllocMap - ref4de03739.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs4de03739.Borrow(cproof_ptr_allocs) + var cis_valid_allocs *cgoAllocMap + ref66180e0.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocs66180e0.Borrow(cis_valid_allocs) - x.ref4de03739 = ref4de03739 - x.allocs4de03739 = allocs4de03739 - return ref4de03739, allocs4de03739 + x.ref66180e0 = ref66180e0 + x.allocs66180e0 = allocs66180e0 + return ref66180e0, allocs66180e0 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPartitionSnarkProof) PassValue() (C.fil_PartitionSnarkProof, *cgoAllocMap) { - if x.ref4de03739 != nil { - return *x.ref4de03739, nil +func (x FilVerifyAggregateSealProofResponse) PassValue() (C.fil_VerifyAggregateSealProofResponse, *cgoAllocMap) { + if x.ref66180e0 != nil { + return *x.ref66180e0, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2385,102 +2489,86 @@ func (x FilPartitionSnarkProof) PassValue() (C.fil_PartitionSnarkProof, *cgoAllo // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPartitionSnarkProof) Deref() { - if x.ref4de03739 == nil { +func (x *FilVerifyAggregateSealProofResponse) Deref() { + if x.ref66180e0 == nil { return } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref4de03739.registered_proof) - x.ProofLen = (uint)(x.ref4de03739.proof_len) - hxf2fab0d := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxf2fab0d.Data = unsafe.Pointer(x.ref4de03739.proof_ptr) - hxf2fab0d.Cap = 0x7fffffff - // hxf2fab0d.Len = ? - + x.StatusCode = (FCPResponseStatus)(x.ref66180e0.status_code) + x.ErrorMsg = packPCharString(x.ref66180e0.error_msg) + x.IsValid = (bool)(x.ref66180e0.is_valid) } -// allocFilGenerateSingleWindowPoStWithVanillaResponseMemory allocates memory for type C.fil_GenerateSingleWindowPoStWithVanillaResponse in C. +// allocFilUnsealRangeResponseMemory allocates memory for type C.fil_UnsealRangeResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateSingleWindowPoStWithVanillaResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateSingleWindowPoStWithVanillaResponseValue)) +func allocFilUnsealRangeResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilUnsealRangeResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateSingleWindowPoStWithVanillaResponseValue = unsafe.Sizeof([1]C.fil_GenerateSingleWindowPoStWithVanillaResponse{}) +const sizeOfFilUnsealRangeResponseValue = unsafe.Sizeof([1]C.fil_UnsealRangeResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Ref() *C.fil_GenerateSingleWindowPoStWithVanillaResponse { +func (x *FilUnsealRangeResponse) Ref() *C.fil_UnsealRangeResponse { if x == nil { return nil } - return x.ref96c012c3 + return x.ref61e219c9 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Free() { - if x != nil && x.allocs96c012c3 != nil { - x.allocs96c012c3.(*cgoAllocMap).Free() - x.ref96c012c3 = nil +func (x *FilUnsealRangeResponse) Free() { + if x != nil && x.allocs61e219c9 != nil { + x.allocs61e219c9.(*cgoAllocMap).Free() + x.ref61e219c9 = nil } } -// NewFilGenerateSingleWindowPoStWithVanillaResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilUnsealRangeResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateSingleWindowPoStWithVanillaResponseRef(ref unsafe.Pointer) *FilGenerateSingleWindowPoStWithVanillaResponse { +func NewFilUnsealRangeResponseRef(ref unsafe.Pointer) *FilUnsealRangeResponse { if ref == nil { return nil } - obj := new(FilGenerateSingleWindowPoStWithVanillaResponse) - obj.ref96c012c3 = (*C.fil_GenerateSingleWindowPoStWithVanillaResponse)(unsafe.Pointer(ref)) + obj := new(FilUnsealRangeResponse) + obj.ref61e219c9 = (*C.fil_UnsealRangeResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateSingleWindowPoStWithVanillaResponse) PassRef() (*C.fil_GenerateSingleWindowPoStWithVanillaResponse, *cgoAllocMap) { +func (x *FilUnsealRangeResponse) PassRef() (*C.fil_UnsealRangeResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref96c012c3 != nil { - return x.ref96c012c3, nil + } else if x.ref61e219c9 != nil { + return x.ref61e219c9, nil } - mem96c012c3 := allocFilGenerateSingleWindowPoStWithVanillaResponseMemory(1) - ref96c012c3 := (*C.fil_GenerateSingleWindowPoStWithVanillaResponse)(mem96c012c3) - allocs96c012c3 := new(cgoAllocMap) - allocs96c012c3.Add(mem96c012c3) - - var cerror_msg_allocs *cgoAllocMap - ref96c012c3.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs96c012c3.Borrow(cerror_msg_allocs) - - var cpartition_proof_allocs *cgoAllocMap - ref96c012c3.partition_proof, cpartition_proof_allocs = x.PartitionProof.PassValue() - allocs96c012c3.Borrow(cpartition_proof_allocs) - - var cfaulty_sectors_len_allocs *cgoAllocMap - ref96c012c3.faulty_sectors_len, cfaulty_sectors_len_allocs = (C.size_t)(x.FaultySectorsLen), cgoAllocsUnknown - allocs96c012c3.Borrow(cfaulty_sectors_len_allocs) - - var cfaulty_sectors_ptr_allocs *cgoAllocMap - ref96c012c3.faulty_sectors_ptr, cfaulty_sectors_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr))) - allocs96c012c3.Borrow(cfaulty_sectors_ptr_allocs) + mem61e219c9 := allocFilUnsealRangeResponseMemory(1) + ref61e219c9 := (*C.fil_UnsealRangeResponse)(mem61e219c9) + allocs61e219c9 := new(cgoAllocMap) + allocs61e219c9.Add(mem61e219c9) var cstatus_code_allocs *cgoAllocMap - ref96c012c3.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs96c012c3.Borrow(cstatus_code_allocs) + ref61e219c9.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs61e219c9.Borrow(cstatus_code_allocs) - x.ref96c012c3 = ref96c012c3 - x.allocs96c012c3 = allocs96c012c3 - return ref96c012c3, allocs96c012c3 + var cerror_msg_allocs *cgoAllocMap + ref61e219c9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs61e219c9.Borrow(cerror_msg_allocs) + + x.ref61e219c9 = ref61e219c9 + x.allocs61e219c9 = allocs61e219c9 + return ref61e219c9, allocs61e219c9 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateSingleWindowPoStWithVanillaResponse) PassValue() (C.fil_GenerateSingleWindowPoStWithVanillaResponse, *cgoAllocMap) { - if x.ref96c012c3 != nil { - return *x.ref96c012c3, nil +func (x FilUnsealRangeResponse) PassValue() (C.fil_UnsealRangeResponse, *cgoAllocMap) { + if x.ref61e219c9 != nil { + return *x.ref61e219c9, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2488,96 +2576,89 @@ func (x FilGenerateSingleWindowPoStWithVanillaResponse) PassValue() (C.fil_Gener // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Deref() { - if x.ref96c012c3 == nil { +func (x *FilUnsealRangeResponse) Deref() { + if x.ref61e219c9 == nil { return } - x.ErrorMsg = packPCharString(x.ref96c012c3.error_msg) - x.PartitionProof = *NewFilPartitionSnarkProofRef(unsafe.Pointer(&x.ref96c012c3.partition_proof)) - x.FaultySectorsLen = (uint)(x.ref96c012c3.faulty_sectors_len) - hxf69fe70 := (*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr)) - hxf69fe70.Data = unsafe.Pointer(x.ref96c012c3.faulty_sectors_ptr) - hxf69fe70.Cap = 0x7fffffff - // hxf69fe70.Len = ? - - x.StatusCode = (FCPResponseStatus)(x.ref96c012c3.status_code) + x.StatusCode = (FCPResponseStatus)(x.ref61e219c9.status_code) + x.ErrorMsg = packPCharString(x.ref61e219c9.error_msg) } -// allocFilPoStProofMemory allocates memory for type C.fil_PoStProof in C. +// allocFilVerifySealResponseMemory allocates memory for type C.fil_VerifySealResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPoStProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPoStProofValue)) +func allocFilVerifySealResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifySealResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPoStProofValue = unsafe.Sizeof([1]C.fil_PoStProof{}) +const sizeOfFilVerifySealResponseValue = unsafe.Sizeof([1]C.fil_VerifySealResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPoStProof) Ref() *C.fil_PoStProof { +func (x *FilVerifySealResponse) Ref() *C.fil_VerifySealResponse { if x == nil { return nil } - return x.ref3451bfa + return x.refd4397079 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPoStProof) Free() { - if x != nil && x.allocs3451bfa != nil { - x.allocs3451bfa.(*cgoAllocMap).Free() - x.ref3451bfa = nil +func (x *FilVerifySealResponse) Free() { + if x != nil && x.allocsd4397079 != nil { + x.allocsd4397079.(*cgoAllocMap).Free() + x.refd4397079 = nil } } -// NewFilPoStProofRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilVerifySealResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPoStProofRef(ref unsafe.Pointer) *FilPoStProof { +func NewFilVerifySealResponseRef(ref unsafe.Pointer) *FilVerifySealResponse { if ref == nil { return nil } - obj := new(FilPoStProof) - obj.ref3451bfa = (*C.fil_PoStProof)(unsafe.Pointer(ref)) + obj := new(FilVerifySealResponse) + obj.refd4397079 = (*C.fil_VerifySealResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPoStProof) PassRef() (*C.fil_PoStProof, *cgoAllocMap) { +func (x *FilVerifySealResponse) PassRef() (*C.fil_VerifySealResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref3451bfa != nil { - return x.ref3451bfa, nil - } - mem3451bfa := allocFilPoStProofMemory(1) - ref3451bfa := (*C.fil_PoStProof)(mem3451bfa) - allocs3451bfa := new(cgoAllocMap) - allocs3451bfa.Add(mem3451bfa) + } else if x.refd4397079 != nil { + return x.refd4397079, nil + } + memd4397079 := allocFilVerifySealResponseMemory(1) + refd4397079 := (*C.fil_VerifySealResponse)(memd4397079) + allocsd4397079 := new(cgoAllocMap) + allocsd4397079.Add(memd4397079) - var cregistered_proof_allocs *cgoAllocMap - ref3451bfa.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs3451bfa.Borrow(cregistered_proof_allocs) + var cstatus_code_allocs *cgoAllocMap + refd4397079.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsd4397079.Borrow(cstatus_code_allocs) - var cproof_len_allocs *cgoAllocMap - ref3451bfa.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs3451bfa.Borrow(cproof_len_allocs) + var cerror_msg_allocs *cgoAllocMap + refd4397079.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsd4397079.Borrow(cerror_msg_allocs) - var cproof_ptr_allocs *cgoAllocMap - ref3451bfa.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) - allocs3451bfa.Borrow(cproof_ptr_allocs) + var cis_valid_allocs *cgoAllocMap + refd4397079.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocsd4397079.Borrow(cis_valid_allocs) - x.ref3451bfa = ref3451bfa - x.allocs3451bfa = allocs3451bfa - return ref3451bfa, allocs3451bfa + x.refd4397079 = refd4397079 + x.allocsd4397079 = allocsd4397079 + return refd4397079, allocsd4397079 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPoStProof) PassValue() (C.fil_PoStProof, *cgoAllocMap) { - if x.ref3451bfa != nil { - return *x.ref3451bfa, nil +func (x FilVerifySealResponse) PassValue() (C.fil_VerifySealResponse, *cgoAllocMap) { + if x.refd4397079 != nil { + return *x.refd4397079, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2585,144 +2666,123 @@ func (x FilPoStProof) PassValue() (C.fil_PoStProof, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPoStProof) Deref() { - if x.ref3451bfa == nil { +func (x *FilVerifySealResponse) Deref() { + if x.refd4397079 == nil { return } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref3451bfa.registered_proof) - x.ProofLen = (uint)(x.ref3451bfa.proof_len) - hxf65bf54 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) - hxf65bf54.Data = unsafe.Pointer(x.ref3451bfa.proof_ptr) - hxf65bf54.Cap = 0x7fffffff - // hxf65bf54.Len = ? - + x.StatusCode = (FCPResponseStatus)(x.refd4397079.status_code) + x.ErrorMsg = packPCharString(x.refd4397079.error_msg) + x.IsValid = (bool)(x.refd4397079.is_valid) } -// allocFilGenerateWindowPoStResponseMemory allocates memory for type C.fil_GenerateWindowPoStResponse in C. +// allocFilGenerateWinningPoStSectorChallengeMemory allocates memory for type C.fil_GenerateWinningPoStSectorChallenge in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWindowPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWindowPoStResponseValue)) +func allocFilGenerateWinningPoStSectorChallengeMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStSectorChallengeValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWindowPoStResponse{}) +const sizeOfFilGenerateWinningPoStSectorChallengeValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStSectorChallenge{}) -// unpackSFilPoStProof transforms a sliced Go data structure into plain C format. -func unpackSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) +// copyPUint64TBytes copies the data from Go slice as *C.uint64_t. +func copyPUint64TBytes(slice *sliceHeader) (*C.uint64_t, *cgoAllocMap) { + allocs := new(cgoAllocMap) defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { go a.Free() }) - len0 := len(x) - mem0 := allocFilPoStProofMemory(len0) + mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ + Data: slice.Data, + Len: int(sizeOfUint64TValue) * slice.Len, + Cap: int(sizeOfUint64TValue) * slice.Len, + })))) allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PoStProof)(h.Data) - return + + return (*C.uint64_t)(mem0), allocs } -// packSFilPoStProof reads sliced Go data structure out from plain C format. -func packSFilPoStProof(v []FilPoStProof, ptr0 *C.fil_PoStProof) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPoStProofValue]C.fil_PoStProof)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPoStProofRef(unsafe.Pointer(&ptr1)) +// allocUint64TMemory allocates memory for type C.uint64_t in C. +// The caller is responsible for freeing the this memory via C.free. +func allocUint64TMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfUint64TValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) } + return mem } +const sizeOfUint64TValue = unsafe.Sizeof([1]C.uint64_t{}) + // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWindowPoStResponse) Ref() *C.fil_GenerateWindowPoStResponse { +func (x *FilGenerateWinningPoStSectorChallenge) Ref() *C.fil_GenerateWinningPoStSectorChallenge { if x == nil { return nil } - return x.ref2a5f3ba8 + return x.ref69d2a405 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWindowPoStResponse) Free() { - if x != nil && x.allocs2a5f3ba8 != nil { - x.allocs2a5f3ba8.(*cgoAllocMap).Free() - x.ref2a5f3ba8 = nil +func (x *FilGenerateWinningPoStSectorChallenge) Free() { + if x != nil && x.allocs69d2a405 != nil { + x.allocs69d2a405.(*cgoAllocMap).Free() + x.ref69d2a405 = nil } } -// NewFilGenerateWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateWinningPoStSectorChallengeRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWindowPoStResponseRef(ref unsafe.Pointer) *FilGenerateWindowPoStResponse { +func NewFilGenerateWinningPoStSectorChallengeRef(ref unsafe.Pointer) *FilGenerateWinningPoStSectorChallenge { if ref == nil { return nil } - obj := new(FilGenerateWindowPoStResponse) - obj.ref2a5f3ba8 = (*C.fil_GenerateWindowPoStResponse)(unsafe.Pointer(ref)) + obj := new(FilGenerateWinningPoStSectorChallenge) + obj.ref69d2a405 = (*C.fil_GenerateWinningPoStSectorChallenge)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWindowPoStResponse) PassRef() (*C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { +func (x *FilGenerateWinningPoStSectorChallenge) PassRef() (*C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref2a5f3ba8 != nil { - return x.ref2a5f3ba8, nil + } else if x.ref69d2a405 != nil { + return x.ref69d2a405, nil } - mem2a5f3ba8 := allocFilGenerateWindowPoStResponseMemory(1) - ref2a5f3ba8 := (*C.fil_GenerateWindowPoStResponse)(mem2a5f3ba8) - allocs2a5f3ba8 := new(cgoAllocMap) - allocs2a5f3ba8.Add(mem2a5f3ba8) + mem69d2a405 := allocFilGenerateWinningPoStSectorChallengeMemory(1) + ref69d2a405 := (*C.fil_GenerateWinningPoStSectorChallenge)(mem69d2a405) + allocs69d2a405 := new(cgoAllocMap) + allocs69d2a405.Add(mem69d2a405) var cerror_msg_allocs *cgoAllocMap - ref2a5f3ba8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs2a5f3ba8.Borrow(cerror_msg_allocs) - - var cproofs_len_allocs *cgoAllocMap - ref2a5f3ba8.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown - allocs2a5f3ba8.Borrow(cproofs_len_allocs) - - var cproofs_ptr_allocs *cgoAllocMap - ref2a5f3ba8.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) - allocs2a5f3ba8.Borrow(cproofs_ptr_allocs) + ref69d2a405.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs69d2a405.Borrow(cerror_msg_allocs) - var cfaulty_sectors_len_allocs *cgoAllocMap - ref2a5f3ba8.faulty_sectors_len, cfaulty_sectors_len_allocs = (C.size_t)(x.FaultySectorsLen), cgoAllocsUnknown - allocs2a5f3ba8.Borrow(cfaulty_sectors_len_allocs) + var cstatus_code_allocs *cgoAllocMap + ref69d2a405.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs69d2a405.Borrow(cstatus_code_allocs) - var cfaulty_sectors_ptr_allocs *cgoAllocMap - ref2a5f3ba8.faulty_sectors_ptr, cfaulty_sectors_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr))) - allocs2a5f3ba8.Borrow(cfaulty_sectors_ptr_allocs) + var cids_ptr_allocs *cgoAllocMap + ref69d2a405.ids_ptr, cids_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.IdsPtr))) + allocs69d2a405.Borrow(cids_ptr_allocs) - var cstatus_code_allocs *cgoAllocMap - ref2a5f3ba8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs2a5f3ba8.Borrow(cstatus_code_allocs) + var cids_len_allocs *cgoAllocMap + ref69d2a405.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown + allocs69d2a405.Borrow(cids_len_allocs) - x.ref2a5f3ba8 = ref2a5f3ba8 - x.allocs2a5f3ba8 = allocs2a5f3ba8 - return ref2a5f3ba8, allocs2a5f3ba8 + x.ref69d2a405 = ref69d2a405 + x.allocs69d2a405 = allocs69d2a405 + return ref69d2a405, allocs69d2a405 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWindowPoStResponse) PassValue() (C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { - if x.ref2a5f3ba8 != nil { - return *x.ref2a5f3ba8, nil +func (x FilGenerateWinningPoStSectorChallenge) PassValue() (C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { + if x.ref69d2a405 != nil { + return *x.ref69d2a405, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2730,101 +2790,111 @@ func (x FilGenerateWindowPoStResponse) PassValue() (C.fil_GenerateWindowPoStResp // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWindowPoStResponse) Deref() { - if x.ref2a5f3ba8 == nil { +func (x *FilGenerateWinningPoStSectorChallenge) Deref() { + if x.ref69d2a405 == nil { return } - x.ErrorMsg = packPCharString(x.ref2a5f3ba8.error_msg) - x.ProofsLen = (uint)(x.ref2a5f3ba8.proofs_len) - packSFilPoStProof(x.ProofsPtr, x.ref2a5f3ba8.proofs_ptr) - x.FaultySectorsLen = (uint)(x.ref2a5f3ba8.faulty_sectors_len) - hxf3b8dbd := (*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr)) - hxf3b8dbd.Data = unsafe.Pointer(x.ref2a5f3ba8.faulty_sectors_ptr) - hxf3b8dbd.Cap = 0x7fffffff - // hxf3b8dbd.Len = ? + x.ErrorMsg = packPCharString(x.ref69d2a405.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref69d2a405.status_code) + hxf0d18b7 := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) + hxf0d18b7.Data = unsafe.Pointer(x.ref69d2a405.ids_ptr) + hxf0d18b7.Cap = 0x7fffffff + // hxf0d18b7.Len = ? - x.StatusCode = (FCPResponseStatus)(x.ref2a5f3ba8.status_code) + x.IdsLen = (uint)(x.ref69d2a405.ids_len) } -// allocFilGenerateWinningPoStResponseMemory allocates memory for type C.fil_GenerateWinningPoStResponse in C. +// allocFilGenerateFallbackSectorChallengesResponseMemory allocates memory for type C.fil_GenerateFallbackSectorChallengesResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWinningPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStResponseValue)) +func allocFilGenerateFallbackSectorChallengesResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateFallbackSectorChallengesResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStResponse{}) +const sizeOfFilGenerateFallbackSectorChallengesResponseValue = unsafe.Sizeof([1]C.fil_GenerateFallbackSectorChallengesResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWinningPoStResponse) Ref() *C.fil_GenerateWinningPoStResponse { +func (x *FilGenerateFallbackSectorChallengesResponse) Ref() *C.fil_GenerateFallbackSectorChallengesResponse { if x == nil { return nil } - return x.ref1405b8ec + return x.ref7047a3fa } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWinningPoStResponse) Free() { - if x != nil && x.allocs1405b8ec != nil { - x.allocs1405b8ec.(*cgoAllocMap).Free() - x.ref1405b8ec = nil +func (x *FilGenerateFallbackSectorChallengesResponse) Free() { + if x != nil && x.allocs7047a3fa != nil { + x.allocs7047a3fa.(*cgoAllocMap).Free() + x.ref7047a3fa = nil } } -// NewFilGenerateWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateFallbackSectorChallengesResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWinningPoStResponseRef(ref unsafe.Pointer) *FilGenerateWinningPoStResponse { +func NewFilGenerateFallbackSectorChallengesResponseRef(ref unsafe.Pointer) *FilGenerateFallbackSectorChallengesResponse { if ref == nil { return nil } - obj := new(FilGenerateWinningPoStResponse) - obj.ref1405b8ec = (*C.fil_GenerateWinningPoStResponse)(unsafe.Pointer(ref)) + obj := new(FilGenerateFallbackSectorChallengesResponse) + obj.ref7047a3fa = (*C.fil_GenerateFallbackSectorChallengesResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWinningPoStResponse) PassRef() (*C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { +func (x *FilGenerateFallbackSectorChallengesResponse) PassRef() (*C.fil_GenerateFallbackSectorChallengesResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref1405b8ec != nil { - return x.ref1405b8ec, nil + } else if x.ref7047a3fa != nil { + return x.ref7047a3fa, nil } - mem1405b8ec := allocFilGenerateWinningPoStResponseMemory(1) - ref1405b8ec := (*C.fil_GenerateWinningPoStResponse)(mem1405b8ec) - allocs1405b8ec := new(cgoAllocMap) - allocs1405b8ec.Add(mem1405b8ec) + mem7047a3fa := allocFilGenerateFallbackSectorChallengesResponseMemory(1) + ref7047a3fa := (*C.fil_GenerateFallbackSectorChallengesResponse)(mem7047a3fa) + allocs7047a3fa := new(cgoAllocMap) + allocs7047a3fa.Add(mem7047a3fa) var cerror_msg_allocs *cgoAllocMap - ref1405b8ec.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs1405b8ec.Borrow(cerror_msg_allocs) + ref7047a3fa.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs7047a3fa.Borrow(cerror_msg_allocs) - var cproofs_len_allocs *cgoAllocMap - ref1405b8ec.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown - allocs1405b8ec.Borrow(cproofs_len_allocs) + var cstatus_code_allocs *cgoAllocMap + ref7047a3fa.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs7047a3fa.Borrow(cstatus_code_allocs) - var cproofs_ptr_allocs *cgoAllocMap - ref1405b8ec.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) - allocs1405b8ec.Borrow(cproofs_ptr_allocs) + var cids_ptr_allocs *cgoAllocMap + ref7047a3fa.ids_ptr, cids_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.IdsPtr))) + allocs7047a3fa.Borrow(cids_ptr_allocs) - var cstatus_code_allocs *cgoAllocMap - ref1405b8ec.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs1405b8ec.Borrow(cstatus_code_allocs) + var cids_len_allocs *cgoAllocMap + ref7047a3fa.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown + allocs7047a3fa.Borrow(cids_len_allocs) + + var cchallenges_ptr_allocs *cgoAllocMap + ref7047a3fa.challenges_ptr, cchallenges_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.ChallengesPtr))) + allocs7047a3fa.Borrow(cchallenges_ptr_allocs) + + var cchallenges_len_allocs *cgoAllocMap + ref7047a3fa.challenges_len, cchallenges_len_allocs = (C.size_t)(x.ChallengesLen), cgoAllocsUnknown + allocs7047a3fa.Borrow(cchallenges_len_allocs) + + var cchallenges_stride_allocs *cgoAllocMap + ref7047a3fa.challenges_stride, cchallenges_stride_allocs = (C.size_t)(x.ChallengesStride), cgoAllocsUnknown + allocs7047a3fa.Borrow(cchallenges_stride_allocs) - x.ref1405b8ec = ref1405b8ec - x.allocs1405b8ec = allocs1405b8ec - return ref1405b8ec, allocs1405b8ec + x.ref7047a3fa = ref7047a3fa + x.allocs7047a3fa = allocs7047a3fa + return ref7047a3fa, allocs7047a3fa } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWinningPoStResponse) PassValue() (C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { - if x.ref1405b8ec != nil { - return *x.ref1405b8ec, nil +func (x FilGenerateFallbackSectorChallengesResponse) PassValue() (C.fil_GenerateFallbackSectorChallengesResponse, *cgoAllocMap) { + if x.ref7047a3fa != nil { + return *x.ref7047a3fa, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2832,95 +2902,98 @@ func (x FilGenerateWinningPoStResponse) PassValue() (C.fil_GenerateWinningPoStRe // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWinningPoStResponse) Deref() { - if x.ref1405b8ec == nil { +func (x *FilGenerateFallbackSectorChallengesResponse) Deref() { + if x.ref7047a3fa == nil { return } - x.ErrorMsg = packPCharString(x.ref1405b8ec.error_msg) - x.ProofsLen = (uint)(x.ref1405b8ec.proofs_len) - packSFilPoStProof(x.ProofsPtr, x.ref1405b8ec.proofs_ptr) - x.StatusCode = (FCPResponseStatus)(x.ref1405b8ec.status_code) + x.ErrorMsg = packPCharString(x.ref7047a3fa.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref7047a3fa.status_code) + hxf2fab0d := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) + hxf2fab0d.Data = unsafe.Pointer(x.ref7047a3fa.ids_ptr) + hxf2fab0d.Cap = 0x7fffffff + // hxf2fab0d.Len = ? + + x.IdsLen = (uint)(x.ref7047a3fa.ids_len) + hxf69fe70 := (*sliceHeader)(unsafe.Pointer(&x.ChallengesPtr)) + hxf69fe70.Data = unsafe.Pointer(x.ref7047a3fa.challenges_ptr) + hxf69fe70.Cap = 0x7fffffff + // hxf69fe70.Len = ? + + x.ChallengesLen = (uint)(x.ref7047a3fa.challenges_len) + x.ChallengesStride = (uint)(x.ref7047a3fa.challenges_stride) } -// allocFilGenerateWinningPoStSectorChallengeMemory allocates memory for type C.fil_GenerateWinningPoStSectorChallenge in C. +// allocFilVanillaProofMemory allocates memory for type C.fil_VanillaProof in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWinningPoStSectorChallengeMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStSectorChallengeValue)) +func allocFilVanillaProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVanillaProofValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGenerateWinningPoStSectorChallengeValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStSectorChallenge{}) +const sizeOfFilVanillaProofValue = unsafe.Sizeof([1]C.fil_VanillaProof{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWinningPoStSectorChallenge) Ref() *C.fil_GenerateWinningPoStSectorChallenge { +func (x *FilVanillaProof) Ref() *C.fil_VanillaProof { if x == nil { return nil } - return x.ref69d2a405 + return x.refb3e7638c } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWinningPoStSectorChallenge) Free() { - if x != nil && x.allocs69d2a405 != nil { - x.allocs69d2a405.(*cgoAllocMap).Free() - x.ref69d2a405 = nil +func (x *FilVanillaProof) Free() { + if x != nil && x.allocsb3e7638c != nil { + x.allocsb3e7638c.(*cgoAllocMap).Free() + x.refb3e7638c = nil } } -// NewFilGenerateWinningPoStSectorChallengeRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilVanillaProofRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWinningPoStSectorChallengeRef(ref unsafe.Pointer) *FilGenerateWinningPoStSectorChallenge { +func NewFilVanillaProofRef(ref unsafe.Pointer) *FilVanillaProof { if ref == nil { return nil } - obj := new(FilGenerateWinningPoStSectorChallenge) - obj.ref69d2a405 = (*C.fil_GenerateWinningPoStSectorChallenge)(unsafe.Pointer(ref)) + obj := new(FilVanillaProof) + obj.refb3e7638c = (*C.fil_VanillaProof)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWinningPoStSectorChallenge) PassRef() (*C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { +func (x *FilVanillaProof) PassRef() (*C.fil_VanillaProof, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref69d2a405 != nil { - return x.ref69d2a405, nil + } else if x.refb3e7638c != nil { + return x.refb3e7638c, nil } - mem69d2a405 := allocFilGenerateWinningPoStSectorChallengeMemory(1) - ref69d2a405 := (*C.fil_GenerateWinningPoStSectorChallenge)(mem69d2a405) - allocs69d2a405 := new(cgoAllocMap) - allocs69d2a405.Add(mem69d2a405) - - var cerror_msg_allocs *cgoAllocMap - ref69d2a405.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs69d2a405.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref69d2a405.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs69d2a405.Borrow(cstatus_code_allocs) + memb3e7638c := allocFilVanillaProofMemory(1) + refb3e7638c := (*C.fil_VanillaProof)(memb3e7638c) + allocsb3e7638c := new(cgoAllocMap) + allocsb3e7638c.Add(memb3e7638c) - var cids_ptr_allocs *cgoAllocMap - ref69d2a405.ids_ptr, cids_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.IdsPtr))) - allocs69d2a405.Borrow(cids_ptr_allocs) + var cproof_len_allocs *cgoAllocMap + refb3e7638c.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocsb3e7638c.Borrow(cproof_len_allocs) - var cids_len_allocs *cgoAllocMap - ref69d2a405.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown - allocs69d2a405.Borrow(cids_len_allocs) + var cproof_ptr_allocs *cgoAllocMap + refb3e7638c.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocsb3e7638c.Borrow(cproof_ptr_allocs) - x.ref69d2a405 = ref69d2a405 - x.allocs69d2a405 = allocs69d2a405 - return ref69d2a405, allocs69d2a405 + x.refb3e7638c = refb3e7638c + x.allocsb3e7638c = allocsb3e7638c + return refb3e7638c, allocsb3e7638c } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWinningPoStSectorChallenge) PassValue() (C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { - if x.ref69d2a405 != nil { - return *x.ref69d2a405, nil +func (x FilVanillaProof) PassValue() (C.fil_VanillaProof, *cgoAllocMap) { + if x.refb3e7638c != nil { + return *x.refb3e7638c, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -2928,95 +3001,93 @@ func (x FilGenerateWinningPoStSectorChallenge) PassValue() (C.fil_GenerateWinnin // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWinningPoStSectorChallenge) Deref() { - if x.ref69d2a405 == nil { +func (x *FilVanillaProof) Deref() { + if x.refb3e7638c == nil { return } - x.ErrorMsg = packPCharString(x.ref69d2a405.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref69d2a405.status_code) - hxf7a6dff := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) - hxf7a6dff.Data = unsafe.Pointer(x.ref69d2a405.ids_ptr) - hxf7a6dff.Cap = 0x7fffffff - // hxf7a6dff.Len = ? + x.ProofLen = (uint)(x.refb3e7638c.proof_len) + hxf65bf54 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxf65bf54.Data = unsafe.Pointer(x.refb3e7638c.proof_ptr) + hxf65bf54.Cap = 0x7fffffff + // hxf65bf54.Len = ? - x.IdsLen = (uint)(x.ref69d2a405.ids_len) } -// allocFilGetNumPartitionForFallbackPoStResponseMemory allocates memory for type C.fil_GetNumPartitionForFallbackPoStResponse in C. +// allocFilGenerateSingleVanillaProofResponseMemory allocates memory for type C.fil_GenerateSingleVanillaProofResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilGetNumPartitionForFallbackPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGetNumPartitionForFallbackPoStResponseValue)) +func allocFilGenerateSingleVanillaProofResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateSingleVanillaProofResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilGetNumPartitionForFallbackPoStResponseValue = unsafe.Sizeof([1]C.fil_GetNumPartitionForFallbackPoStResponse{}) +const sizeOfFilGenerateSingleVanillaProofResponseValue = unsafe.Sizeof([1]C.fil_GenerateSingleVanillaProofResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGetNumPartitionForFallbackPoStResponse) Ref() *C.fil_GetNumPartitionForFallbackPoStResponse { +func (x *FilGenerateSingleVanillaProofResponse) Ref() *C.fil_GenerateSingleVanillaProofResponse { if x == nil { return nil } - return x.refc0084478 + return x.reff9d21b04 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGetNumPartitionForFallbackPoStResponse) Free() { - if x != nil && x.allocsc0084478 != nil { - x.allocsc0084478.(*cgoAllocMap).Free() - x.refc0084478 = nil +func (x *FilGenerateSingleVanillaProofResponse) Free() { + if x != nil && x.allocsf9d21b04 != nil { + x.allocsf9d21b04.(*cgoAllocMap).Free() + x.reff9d21b04 = nil } } -// NewFilGetNumPartitionForFallbackPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateSingleVanillaProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGetNumPartitionForFallbackPoStResponseRef(ref unsafe.Pointer) *FilGetNumPartitionForFallbackPoStResponse { +func NewFilGenerateSingleVanillaProofResponseRef(ref unsafe.Pointer) *FilGenerateSingleVanillaProofResponse { if ref == nil { return nil } - obj := new(FilGetNumPartitionForFallbackPoStResponse) - obj.refc0084478 = (*C.fil_GetNumPartitionForFallbackPoStResponse)(unsafe.Pointer(ref)) + obj := new(FilGenerateSingleVanillaProofResponse) + obj.reff9d21b04 = (*C.fil_GenerateSingleVanillaProofResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGetNumPartitionForFallbackPoStResponse) PassRef() (*C.fil_GetNumPartitionForFallbackPoStResponse, *cgoAllocMap) { +func (x *FilGenerateSingleVanillaProofResponse) PassRef() (*C.fil_GenerateSingleVanillaProofResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refc0084478 != nil { - return x.refc0084478, nil + } else if x.reff9d21b04 != nil { + return x.reff9d21b04, nil } - memc0084478 := allocFilGetNumPartitionForFallbackPoStResponseMemory(1) - refc0084478 := (*C.fil_GetNumPartitionForFallbackPoStResponse)(memc0084478) - allocsc0084478 := new(cgoAllocMap) - allocsc0084478.Add(memc0084478) + memf9d21b04 := allocFilGenerateSingleVanillaProofResponseMemory(1) + reff9d21b04 := (*C.fil_GenerateSingleVanillaProofResponse)(memf9d21b04) + allocsf9d21b04 := new(cgoAllocMap) + allocsf9d21b04.Add(memf9d21b04) var cerror_msg_allocs *cgoAllocMap - refc0084478.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsc0084478.Borrow(cerror_msg_allocs) + reff9d21b04.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsf9d21b04.Borrow(cerror_msg_allocs) - var cstatus_code_allocs *cgoAllocMap - refc0084478.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsc0084478.Borrow(cstatus_code_allocs) + var cvanilla_proof_allocs *cgoAllocMap + reff9d21b04.vanilla_proof, cvanilla_proof_allocs = x.VanillaProof.PassValue() + allocsf9d21b04.Borrow(cvanilla_proof_allocs) - var cnum_partition_allocs *cgoAllocMap - refc0084478.num_partition, cnum_partition_allocs = (C.size_t)(x.NumPartition), cgoAllocsUnknown - allocsc0084478.Borrow(cnum_partition_allocs) + var cstatus_code_allocs *cgoAllocMap + reff9d21b04.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsf9d21b04.Borrow(cstatus_code_allocs) - x.refc0084478 = refc0084478 - x.allocsc0084478 = allocsc0084478 - return refc0084478, allocsc0084478 + x.reff9d21b04 = reff9d21b04 + x.allocsf9d21b04 = allocsf9d21b04 + return reff9d21b04, allocsf9d21b04 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGetNumPartitionForFallbackPoStResponse) PassValue() (C.fil_GetNumPartitionForFallbackPoStResponse, *cgoAllocMap) { - if x.refc0084478 != nil { - return *x.refc0084478, nil +func (x FilGenerateSingleVanillaProofResponse) PassValue() (C.fil_GenerateSingleVanillaProofResponse, *cgoAllocMap) { + if x.reff9d21b04 != nil { + return *x.reff9d21b04, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3024,142 +3095,98 @@ func (x FilGetNumPartitionForFallbackPoStResponse) PassValue() (C.fil_GetNumPart // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGetNumPartitionForFallbackPoStResponse) Deref() { - if x.refc0084478 == nil { +func (x *FilGenerateSingleVanillaProofResponse) Deref() { + if x.reff9d21b04 == nil { return } - x.ErrorMsg = packPCharString(x.refc0084478.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refc0084478.status_code) - x.NumPartition = (uint)(x.refc0084478.num_partition) -} - -// allocFilGpuDeviceResponseMemory allocates memory for type C.fil_GpuDeviceResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGpuDeviceResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGpuDeviceResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem + x.ErrorMsg = packPCharString(x.reff9d21b04.error_msg) + x.VanillaProof = *NewFilVanillaProofRef(unsafe.Pointer(&x.reff9d21b04.vanilla_proof)) + x.StatusCode = (FCPResponseStatus)(x.reff9d21b04.status_code) } -const sizeOfFilGpuDeviceResponseValue = unsafe.Sizeof([1]C.fil_GpuDeviceResponse{}) - -// allocPCharMemory allocates memory for type *C.char in C. +// allocFilPrivateReplicaInfoMemory allocates memory for type C.fil_PrivateReplicaInfo in C. // The caller is responsible for freeing the this memory via C.free. -func allocPCharMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfPCharValue)) +func allocFilPrivateReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateReplicaInfoValue)) if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfPCharValue = unsafe.Sizeof([1]*C.char{}) - -// unpackSString transforms a sliced Go data structure into plain C format. -func unpackSString(x []string) (unpacked **C.char, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocPCharMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]*C.char)(unsafe.Pointer(h0)) - for i0 := range x { - v0[i0], _ = unpackPCharString(x[i0]) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (**C.char)(h.Data) - return -} - -// packSString reads sliced Go data structure out from plain C format. -func packSString(v []string, ptr0 **C.char) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfPtr]*C.char)(unsafe.Pointer(ptr0)))[i0] - v[i0] = packPCharString(ptr1) + panic(fmt.Sprintln("memory alloc error: ", err)) } + return mem } +const sizeOfFilPrivateReplicaInfoValue = unsafe.Sizeof([1]C.fil_PrivateReplicaInfo{}) + // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGpuDeviceResponse) Ref() *C.fil_GpuDeviceResponse { +func (x *FilPrivateReplicaInfo) Ref() *C.fil_PrivateReplicaInfo { if x == nil { return nil } - return x.ref58f92915 + return x.ref81a31e9b } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilGpuDeviceResponse) Free() { - if x != nil && x.allocs58f92915 != nil { - x.allocs58f92915.(*cgoAllocMap).Free() - x.ref58f92915 = nil +func (x *FilPrivateReplicaInfo) Free() { + if x != nil && x.allocs81a31e9b != nil { + x.allocs81a31e9b.(*cgoAllocMap).Free() + x.ref81a31e9b = nil } } -// NewFilGpuDeviceResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPrivateReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilGpuDeviceResponseRef(ref unsafe.Pointer) *FilGpuDeviceResponse { +func NewFilPrivateReplicaInfoRef(ref unsafe.Pointer) *FilPrivateReplicaInfo { if ref == nil { return nil } - obj := new(FilGpuDeviceResponse) - obj.ref58f92915 = (*C.fil_GpuDeviceResponse)(unsafe.Pointer(ref)) + obj := new(FilPrivateReplicaInfo) + obj.ref81a31e9b = (*C.fil_PrivateReplicaInfo)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilGpuDeviceResponse) PassRef() (*C.fil_GpuDeviceResponse, *cgoAllocMap) { +func (x *FilPrivateReplicaInfo) PassRef() (*C.fil_PrivateReplicaInfo, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref58f92915 != nil { - return x.ref58f92915, nil + } else if x.ref81a31e9b != nil { + return x.ref81a31e9b, nil } - mem58f92915 := allocFilGpuDeviceResponseMemory(1) - ref58f92915 := (*C.fil_GpuDeviceResponse)(mem58f92915) - allocs58f92915 := new(cgoAllocMap) - allocs58f92915.Add(mem58f92915) + mem81a31e9b := allocFilPrivateReplicaInfoMemory(1) + ref81a31e9b := (*C.fil_PrivateReplicaInfo)(mem81a31e9b) + allocs81a31e9b := new(cgoAllocMap) + allocs81a31e9b.Add(mem81a31e9b) - var cstatus_code_allocs *cgoAllocMap - ref58f92915.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs58f92915.Borrow(cstatus_code_allocs) + var cregistered_proof_allocs *cgoAllocMap + ref81a31e9b.registered_proof, cregistered_proof_allocs = (C.enum_fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs81a31e9b.Borrow(cregistered_proof_allocs) - var cerror_msg_allocs *cgoAllocMap - ref58f92915.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs58f92915.Borrow(cerror_msg_allocs) + var ccache_dir_path_allocs *cgoAllocMap + ref81a31e9b.cache_dir_path, ccache_dir_path_allocs = unpackPCharString(x.CacheDirPath) + allocs81a31e9b.Borrow(ccache_dir_path_allocs) - var cdevices_len_allocs *cgoAllocMap - ref58f92915.devices_len, cdevices_len_allocs = (C.size_t)(x.DevicesLen), cgoAllocsUnknown - allocs58f92915.Borrow(cdevices_len_allocs) + var ccomm_r_allocs *cgoAllocMap + ref81a31e9b.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs81a31e9b.Borrow(ccomm_r_allocs) - var cdevices_ptr_allocs *cgoAllocMap - ref58f92915.devices_ptr, cdevices_ptr_allocs = unpackSString(x.DevicesPtr) - allocs58f92915.Borrow(cdevices_ptr_allocs) + var creplica_path_allocs *cgoAllocMap + ref81a31e9b.replica_path, creplica_path_allocs = unpackPCharString(x.ReplicaPath) + allocs81a31e9b.Borrow(creplica_path_allocs) - x.ref58f92915 = ref58f92915 - x.allocs58f92915 = allocs58f92915 - return ref58f92915, allocs58f92915 + var csector_id_allocs *cgoAllocMap + ref81a31e9b.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown + allocs81a31e9b.Borrow(csector_id_allocs) + + x.ref81a31e9b = ref81a31e9b + x.allocs81a31e9b = allocs81a31e9b + return ref81a31e9b, allocs81a31e9b } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGpuDeviceResponse) PassValue() (C.fil_GpuDeviceResponse, *cgoAllocMap) { - if x.ref58f92915 != nil { - return *x.ref58f92915, nil +func (x FilPrivateReplicaInfo) PassValue() (C.fil_PrivateReplicaInfo, *cgoAllocMap) { + if x.ref81a31e9b != nil { + return *x.ref81a31e9b, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3167,83 +3194,92 @@ func (x FilGpuDeviceResponse) PassValue() (C.fil_GpuDeviceResponse, *cgoAllocMap // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGpuDeviceResponse) Deref() { - if x.ref58f92915 == nil { +func (x *FilPrivateReplicaInfo) Deref() { + if x.ref81a31e9b == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref58f92915.status_code) - x.ErrorMsg = packPCharString(x.ref58f92915.error_msg) - x.DevicesLen = (uint)(x.ref58f92915.devices_len) - packSString(x.DevicesPtr, x.ref58f92915.devices_ptr) + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81a31e9b.registered_proof) + x.CacheDirPath = packPCharString(x.ref81a31e9b.cache_dir_path) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81a31e9b.comm_r)) + x.ReplicaPath = packPCharString(x.ref81a31e9b.replica_path) + x.SectorId = (uint64)(x.ref81a31e9b.sector_id) } -// allocFilBLSDigestMemory allocates memory for type C.fil_BLSDigest in C. +// allocFilPoStProofMemory allocates memory for type C.fil_PoStProof in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilBLSDigestMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSDigestValue)) +func allocFilPoStProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPoStProofValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilBLSDigestValue = unsafe.Sizeof([1]C.fil_BLSDigest{}) +const sizeOfFilPoStProofValue = unsafe.Sizeof([1]C.fil_PoStProof{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSDigest) Ref() *C.fil_BLSDigest { +func (x *FilPoStProof) Ref() *C.fil_PoStProof { if x == nil { return nil } - return x.ref215fc78c + return x.ref3451bfa } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilBLSDigest) Free() { - if x != nil && x.allocs215fc78c != nil { - x.allocs215fc78c.(*cgoAllocMap).Free() - x.ref215fc78c = nil +func (x *FilPoStProof) Free() { + if x != nil && x.allocs3451bfa != nil { + x.allocs3451bfa.(*cgoAllocMap).Free() + x.ref3451bfa = nil } } -// NewFilBLSDigestRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPoStProofRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilBLSDigestRef(ref unsafe.Pointer) *FilBLSDigest { +func NewFilPoStProofRef(ref unsafe.Pointer) *FilPoStProof { if ref == nil { return nil } - obj := new(FilBLSDigest) - obj.ref215fc78c = (*C.fil_BLSDigest)(unsafe.Pointer(ref)) + obj := new(FilPoStProof) + obj.ref3451bfa = (*C.fil_PoStProof)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSDigest) PassRef() (*C.fil_BLSDigest, *cgoAllocMap) { +func (x *FilPoStProof) PassRef() (*C.fil_PoStProof, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref215fc78c != nil { - return x.ref215fc78c, nil + } else if x.ref3451bfa != nil { + return x.ref3451bfa, nil } - mem215fc78c := allocFilBLSDigestMemory(1) - ref215fc78c := (*C.fil_BLSDigest)(mem215fc78c) - allocs215fc78c := new(cgoAllocMap) - allocs215fc78c.Add(mem215fc78c) + mem3451bfa := allocFilPoStProofMemory(1) + ref3451bfa := (*C.fil_PoStProof)(mem3451bfa) + allocs3451bfa := new(cgoAllocMap) + allocs3451bfa.Add(mem3451bfa) - var cinner_allocs *cgoAllocMap - ref215fc78c.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs215fc78c.Borrow(cinner_allocs) + var cregistered_proof_allocs *cgoAllocMap + ref3451bfa.registered_proof, cregistered_proof_allocs = (C.enum_fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs3451bfa.Borrow(cregistered_proof_allocs) - x.ref215fc78c = ref215fc78c - x.allocs215fc78c = allocs215fc78c - return ref215fc78c, allocs215fc78c + var cproof_len_allocs *cgoAllocMap + ref3451bfa.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs3451bfa.Borrow(cproof_len_allocs) + + var cproof_ptr_allocs *cgoAllocMap + ref3451bfa.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs3451bfa.Borrow(cproof_ptr_allocs) + + x.ref3451bfa = ref3451bfa + x.allocs3451bfa = allocs3451bfa + return ref3451bfa, allocs3451bfa } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSDigest) PassValue() (C.fil_BLSDigest, *cgoAllocMap) { - if x.ref215fc78c != nil { - return *x.ref215fc78c, nil +func (x FilPoStProof) PassValue() (C.fil_PoStProof, *cgoAllocMap) { + if x.ref3451bfa != nil { + return *x.ref3451bfa, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3251,80 +3287,148 @@ func (x FilBLSDigest) PassValue() (C.fil_BLSDigest, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSDigest) Deref() { - if x.ref215fc78c == nil { +func (x *FilPoStProof) Deref() { + if x.ref3451bfa == nil { return } - x.Inner = *(*[96]byte)(unsafe.Pointer(&x.ref215fc78c.inner)) + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref3451bfa.registered_proof) + x.ProofLen = (uint)(x.ref3451bfa.proof_len) + hxf3b8dbd := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxf3b8dbd.Data = unsafe.Pointer(x.ref3451bfa.proof_ptr) + hxf3b8dbd.Cap = 0x7fffffff + // hxf3b8dbd.Len = ? + } -// allocFilHashResponseMemory allocates memory for type C.fil_HashResponse in C. +// allocFilGenerateWinningPoStResponseMemory allocates memory for type C.fil_GenerateWinningPoStResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilHashResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilHashResponseValue)) +func allocFilGenerateWinningPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilHashResponseValue = unsafe.Sizeof([1]C.fil_HashResponse{}) +const sizeOfFilGenerateWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStResponse{}) + +// allocStructFilPoStProofMemory allocates memory for type C.struct_fil_PoStProof in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilPoStProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPoStProofValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilPoStProofValue = unsafe.Sizeof([1]C.struct_fil_PoStProof{}) + +// unpackSFilPoStProof transforms a sliced Go data structure into plain C format. +func unpackSFilPoStProof(x []FilPoStProof) (unpacked *C.struct_fil_PoStProof, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocStructFilPoStProofMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.struct_fil_PoStProof)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.struct_fil_PoStProof)(h.Data) + return +} + +// packSFilPoStProof reads sliced Go data structure out from plain C format. +func packSFilPoStProof(v []FilPoStProof, ptr0 *C.struct_fil_PoStProof) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfStructFilPoStProofValue]C.struct_fil_PoStProof)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPoStProofRef(unsafe.Pointer(&ptr1)) + } +} // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilHashResponse) Ref() *C.fil_HashResponse { +func (x *FilGenerateWinningPoStResponse) Ref() *C.fil_GenerateWinningPoStResponse { if x == nil { return nil } - return x.refc52a22ef + return x.ref1405b8ec } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilHashResponse) Free() { - if x != nil && x.allocsc52a22ef != nil { - x.allocsc52a22ef.(*cgoAllocMap).Free() - x.refc52a22ef = nil +func (x *FilGenerateWinningPoStResponse) Free() { + if x != nil && x.allocs1405b8ec != nil { + x.allocs1405b8ec.(*cgoAllocMap).Free() + x.ref1405b8ec = nil } } -// NewFilHashResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilHashResponseRef(ref unsafe.Pointer) *FilHashResponse { +func NewFilGenerateWinningPoStResponseRef(ref unsafe.Pointer) *FilGenerateWinningPoStResponse { if ref == nil { return nil } - obj := new(FilHashResponse) - obj.refc52a22ef = (*C.fil_HashResponse)(unsafe.Pointer(ref)) + obj := new(FilGenerateWinningPoStResponse) + obj.ref1405b8ec = (*C.fil_GenerateWinningPoStResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilHashResponse) PassRef() (*C.fil_HashResponse, *cgoAllocMap) { +func (x *FilGenerateWinningPoStResponse) PassRef() (*C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refc52a22ef != nil { - return x.refc52a22ef, nil + } else if x.ref1405b8ec != nil { + return x.ref1405b8ec, nil } - memc52a22ef := allocFilHashResponseMemory(1) - refc52a22ef := (*C.fil_HashResponse)(memc52a22ef) - allocsc52a22ef := new(cgoAllocMap) - allocsc52a22ef.Add(memc52a22ef) + mem1405b8ec := allocFilGenerateWinningPoStResponseMemory(1) + ref1405b8ec := (*C.fil_GenerateWinningPoStResponse)(mem1405b8ec) + allocs1405b8ec := new(cgoAllocMap) + allocs1405b8ec.Add(mem1405b8ec) + + var cerror_msg_allocs *cgoAllocMap + ref1405b8ec.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs1405b8ec.Borrow(cerror_msg_allocs) + + var cproofs_len_allocs *cgoAllocMap + ref1405b8ec.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown + allocs1405b8ec.Borrow(cproofs_len_allocs) - var cdigest_allocs *cgoAllocMap - refc52a22ef.digest, cdigest_allocs = x.Digest.PassValue() - allocsc52a22ef.Borrow(cdigest_allocs) + var cproofs_ptr_allocs *cgoAllocMap + ref1405b8ec.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) + allocs1405b8ec.Borrow(cproofs_ptr_allocs) - x.refc52a22ef = refc52a22ef - x.allocsc52a22ef = allocsc52a22ef - return refc52a22ef, allocsc52a22ef + var cstatus_code_allocs *cgoAllocMap + ref1405b8ec.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs1405b8ec.Borrow(cstatus_code_allocs) + + x.ref1405b8ec = ref1405b8ec + x.allocs1405b8ec = allocs1405b8ec + return ref1405b8ec, allocs1405b8ec } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilHashResponse) PassValue() (C.fil_HashResponse, *cgoAllocMap) { - if x.refc52a22ef != nil { - return *x.refc52a22ef, nil +func (x FilGenerateWinningPoStResponse) PassValue() (C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { + if x.ref1405b8ec != nil { + return *x.ref1405b8ec, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3332,84 +3436,91 @@ func (x FilHashResponse) PassValue() (C.fil_HashResponse, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilHashResponse) Deref() { - if x.refc52a22ef == nil { +func (x *FilGenerateWinningPoStResponse) Deref() { + if x.ref1405b8ec == nil { return } - x.Digest = *NewFilBLSDigestRef(unsafe.Pointer(&x.refc52a22ef.digest)) + x.ErrorMsg = packPCharString(x.ref1405b8ec.error_msg) + x.ProofsLen = (uint)(x.ref1405b8ec.proofs_len) + packSFilPoStProof(x.ProofsPtr, x.ref1405b8ec.proofs_ptr) + x.StatusCode = (FCPResponseStatus)(x.ref1405b8ec.status_code) } -// allocFilInitLogFdResponseMemory allocates memory for type C.fil_InitLogFdResponse in C. +// allocFilVerifyWinningPoStResponseMemory allocates memory for type C.fil_VerifyWinningPoStResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilInitLogFdResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilInitLogFdResponseValue)) +func allocFilVerifyWinningPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWinningPoStResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilInitLogFdResponseValue = unsafe.Sizeof([1]C.fil_InitLogFdResponse{}) +const sizeOfFilVerifyWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWinningPoStResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilInitLogFdResponse) Ref() *C.fil_InitLogFdResponse { +func (x *FilVerifyWinningPoStResponse) Ref() *C.fil_VerifyWinningPoStResponse { if x == nil { return nil } - return x.ref3c1a0a08 + return x.refaca6860c } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilInitLogFdResponse) Free() { - if x != nil && x.allocs3c1a0a08 != nil { - x.allocs3c1a0a08.(*cgoAllocMap).Free() - x.ref3c1a0a08 = nil +func (x *FilVerifyWinningPoStResponse) Free() { + if x != nil && x.allocsaca6860c != nil { + x.allocsaca6860c.(*cgoAllocMap).Free() + x.refaca6860c = nil } } -// NewFilInitLogFdResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilVerifyWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilInitLogFdResponseRef(ref unsafe.Pointer) *FilInitLogFdResponse { +func NewFilVerifyWinningPoStResponseRef(ref unsafe.Pointer) *FilVerifyWinningPoStResponse { if ref == nil { return nil } - obj := new(FilInitLogFdResponse) - obj.ref3c1a0a08 = (*C.fil_InitLogFdResponse)(unsafe.Pointer(ref)) + obj := new(FilVerifyWinningPoStResponse) + obj.refaca6860c = (*C.fil_VerifyWinningPoStResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilInitLogFdResponse) PassRef() (*C.fil_InitLogFdResponse, *cgoAllocMap) { +func (x *FilVerifyWinningPoStResponse) PassRef() (*C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref3c1a0a08 != nil { - return x.ref3c1a0a08, nil + } else if x.refaca6860c != nil { + return x.refaca6860c, nil } - mem3c1a0a08 := allocFilInitLogFdResponseMemory(1) - ref3c1a0a08 := (*C.fil_InitLogFdResponse)(mem3c1a0a08) - allocs3c1a0a08 := new(cgoAllocMap) - allocs3c1a0a08.Add(mem3c1a0a08) + memaca6860c := allocFilVerifyWinningPoStResponseMemory(1) + refaca6860c := (*C.fil_VerifyWinningPoStResponse)(memaca6860c) + allocsaca6860c := new(cgoAllocMap) + allocsaca6860c.Add(memaca6860c) var cstatus_code_allocs *cgoAllocMap - ref3c1a0a08.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs3c1a0a08.Borrow(cstatus_code_allocs) + refaca6860c.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsaca6860c.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - ref3c1a0a08.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs3c1a0a08.Borrow(cerror_msg_allocs) + refaca6860c.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsaca6860c.Borrow(cerror_msg_allocs) - x.ref3c1a0a08 = ref3c1a0a08 - x.allocs3c1a0a08 = allocs3c1a0a08 - return ref3c1a0a08, allocs3c1a0a08 + var cis_valid_allocs *cgoAllocMap + refaca6860c.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocsaca6860c.Borrow(cis_valid_allocs) + + x.refaca6860c = refaca6860c + x.allocsaca6860c = allocsaca6860c + return refaca6860c, allocsaca6860c } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilInitLogFdResponse) PassValue() (C.fil_InitLogFdResponse, *cgoAllocMap) { - if x.ref3c1a0a08 != nil { - return *x.ref3c1a0a08, nil +func (x FilVerifyWinningPoStResponse) PassValue() (C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { + if x.refaca6860c != nil { + return *x.refaca6860c, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3417,89 +3528,90 @@ func (x FilInitLogFdResponse) PassValue() (C.fil_InitLogFdResponse, *cgoAllocMap // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilInitLogFdResponse) Deref() { - if x.ref3c1a0a08 == nil { +func (x *FilVerifyWinningPoStResponse) Deref() { + if x.refaca6860c == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref3c1a0a08.status_code) - x.ErrorMsg = packPCharString(x.ref3c1a0a08.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refaca6860c.status_code) + x.ErrorMsg = packPCharString(x.refaca6860c.error_msg) + x.IsValid = (bool)(x.refaca6860c.is_valid) } -// allocFilMergeWindowPoStPartitionProofsResponseMemory allocates memory for type C.fil_MergeWindowPoStPartitionProofsResponse in C. +// allocFilPublicReplicaInfoMemory allocates memory for type C.fil_PublicReplicaInfo in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilMergeWindowPoStPartitionProofsResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilMergeWindowPoStPartitionProofsResponseValue)) +func allocFilPublicReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicReplicaInfoValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilMergeWindowPoStPartitionProofsResponseValue = unsafe.Sizeof([1]C.fil_MergeWindowPoStPartitionProofsResponse{}) +const sizeOfFilPublicReplicaInfoValue = unsafe.Sizeof([1]C.fil_PublicReplicaInfo{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilMergeWindowPoStPartitionProofsResponse) Ref() *C.fil_MergeWindowPoStPartitionProofsResponse { +func (x *FilPublicReplicaInfo) Ref() *C.fil_PublicReplicaInfo { if x == nil { return nil } - return x.ref3369154e + return x.ref81b617c2 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilMergeWindowPoStPartitionProofsResponse) Free() { - if x != nil && x.allocs3369154e != nil { - x.allocs3369154e.(*cgoAllocMap).Free() - x.ref3369154e = nil +func (x *FilPublicReplicaInfo) Free() { + if x != nil && x.allocs81b617c2 != nil { + x.allocs81b617c2.(*cgoAllocMap).Free() + x.ref81b617c2 = nil } } -// NewFilMergeWindowPoStPartitionProofsResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPublicReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilMergeWindowPoStPartitionProofsResponseRef(ref unsafe.Pointer) *FilMergeWindowPoStPartitionProofsResponse { +func NewFilPublicReplicaInfoRef(ref unsafe.Pointer) *FilPublicReplicaInfo { if ref == nil { return nil } - obj := new(FilMergeWindowPoStPartitionProofsResponse) - obj.ref3369154e = (*C.fil_MergeWindowPoStPartitionProofsResponse)(unsafe.Pointer(ref)) + obj := new(FilPublicReplicaInfo) + obj.ref81b617c2 = (*C.fil_PublicReplicaInfo)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilMergeWindowPoStPartitionProofsResponse) PassRef() (*C.fil_MergeWindowPoStPartitionProofsResponse, *cgoAllocMap) { +func (x *FilPublicReplicaInfo) PassRef() (*C.fil_PublicReplicaInfo, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref3369154e != nil { - return x.ref3369154e, nil + } else if x.ref81b617c2 != nil { + return x.ref81b617c2, nil } - mem3369154e := allocFilMergeWindowPoStPartitionProofsResponseMemory(1) - ref3369154e := (*C.fil_MergeWindowPoStPartitionProofsResponse)(mem3369154e) - allocs3369154e := new(cgoAllocMap) - allocs3369154e.Add(mem3369154e) + mem81b617c2 := allocFilPublicReplicaInfoMemory(1) + ref81b617c2 := (*C.fil_PublicReplicaInfo)(mem81b617c2) + allocs81b617c2 := new(cgoAllocMap) + allocs81b617c2.Add(mem81b617c2) - var cerror_msg_allocs *cgoAllocMap - ref3369154e.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs3369154e.Borrow(cerror_msg_allocs) + var cregistered_proof_allocs *cgoAllocMap + ref81b617c2.registered_proof, cregistered_proof_allocs = (C.enum_fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs81b617c2.Borrow(cregistered_proof_allocs) - var cproof_allocs *cgoAllocMap - ref3369154e.proof, cproof_allocs = x.Proof.PassValue() - allocs3369154e.Borrow(cproof_allocs) + var ccomm_r_allocs *cgoAllocMap + ref81b617c2.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs81b617c2.Borrow(ccomm_r_allocs) - var cstatus_code_allocs *cgoAllocMap - ref3369154e.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs3369154e.Borrow(cstatus_code_allocs) + var csector_id_allocs *cgoAllocMap + ref81b617c2.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown + allocs81b617c2.Borrow(csector_id_allocs) - x.ref3369154e = ref3369154e - x.allocs3369154e = allocs3369154e - return ref3369154e, allocs3369154e + x.ref81b617c2 = ref81b617c2 + x.allocs81b617c2 = allocs81b617c2 + return ref81b617c2, allocs81b617c2 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilMergeWindowPoStPartitionProofsResponse) PassValue() (C.fil_MergeWindowPoStPartitionProofsResponse, *cgoAllocMap) { - if x.ref3369154e != nil { - return *x.ref3369154e, nil +func (x FilPublicReplicaInfo) PassValue() (C.fil_PublicReplicaInfo, *cgoAllocMap) { + if x.ref81b617c2 != nil { + return *x.ref81b617c2, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3507,82 +3619,102 @@ func (x FilMergeWindowPoStPartitionProofsResponse) PassValue() (C.fil_MergeWindo // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilMergeWindowPoStPartitionProofsResponse) Deref() { - if x.ref3369154e == nil { +func (x *FilPublicReplicaInfo) Deref() { + if x.ref81b617c2 == nil { return } - x.ErrorMsg = packPCharString(x.ref3369154e.error_msg) - x.Proof = *NewFilPoStProofRef(unsafe.Pointer(&x.ref3369154e.proof)) - x.StatusCode = (FCPResponseStatus)(x.ref3369154e.status_code) + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81b617c2.registered_proof) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81b617c2.comm_r)) + x.SectorId = (uint64)(x.ref81b617c2.sector_id) } -// allocFilBLSPrivateKeyMemory allocates memory for type C.fil_BLSPrivateKey in C. +// allocFilGenerateWindowPoStResponseMemory allocates memory for type C.fil_GenerateWindowPoStResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilBLSPrivateKeyMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPrivateKeyValue)) +func allocFilGenerateWindowPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWindowPoStResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilBLSPrivateKeyValue = unsafe.Sizeof([1]C.fil_BLSPrivateKey{}) +const sizeOfFilGenerateWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWindowPoStResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSPrivateKey) Ref() *C.fil_BLSPrivateKey { +func (x *FilGenerateWindowPoStResponse) Ref() *C.fil_GenerateWindowPoStResponse { if x == nil { return nil } - return x.ref2f77fe3a + return x.ref2a5f3ba8 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilBLSPrivateKey) Free() { - if x != nil && x.allocs2f77fe3a != nil { - x.allocs2f77fe3a.(*cgoAllocMap).Free() - x.ref2f77fe3a = nil +func (x *FilGenerateWindowPoStResponse) Free() { + if x != nil && x.allocs2a5f3ba8 != nil { + x.allocs2a5f3ba8.(*cgoAllocMap).Free() + x.ref2a5f3ba8 = nil } } -// NewFilBLSPrivateKeyRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilBLSPrivateKeyRef(ref unsafe.Pointer) *FilBLSPrivateKey { +func NewFilGenerateWindowPoStResponseRef(ref unsafe.Pointer) *FilGenerateWindowPoStResponse { if ref == nil { return nil } - obj := new(FilBLSPrivateKey) - obj.ref2f77fe3a = (*C.fil_BLSPrivateKey)(unsafe.Pointer(ref)) + obj := new(FilGenerateWindowPoStResponse) + obj.ref2a5f3ba8 = (*C.fil_GenerateWindowPoStResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSPrivateKey) PassRef() (*C.fil_BLSPrivateKey, *cgoAllocMap) { +func (x *FilGenerateWindowPoStResponse) PassRef() (*C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref2f77fe3a != nil { - return x.ref2f77fe3a, nil + } else if x.ref2a5f3ba8 != nil { + return x.ref2a5f3ba8, nil } - mem2f77fe3a := allocFilBLSPrivateKeyMemory(1) - ref2f77fe3a := (*C.fil_BLSPrivateKey)(mem2f77fe3a) - allocs2f77fe3a := new(cgoAllocMap) - allocs2f77fe3a.Add(mem2f77fe3a) + mem2a5f3ba8 := allocFilGenerateWindowPoStResponseMemory(1) + ref2a5f3ba8 := (*C.fil_GenerateWindowPoStResponse)(mem2a5f3ba8) + allocs2a5f3ba8 := new(cgoAllocMap) + allocs2a5f3ba8.Add(mem2a5f3ba8) - var cinner_allocs *cgoAllocMap - ref2f77fe3a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs2f77fe3a.Borrow(cinner_allocs) + var cerror_msg_allocs *cgoAllocMap + ref2a5f3ba8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs2a5f3ba8.Borrow(cerror_msg_allocs) - x.ref2f77fe3a = ref2f77fe3a - x.allocs2f77fe3a = allocs2f77fe3a - return ref2f77fe3a, allocs2f77fe3a + var cproofs_len_allocs *cgoAllocMap + ref2a5f3ba8.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown + allocs2a5f3ba8.Borrow(cproofs_len_allocs) + + var cproofs_ptr_allocs *cgoAllocMap + ref2a5f3ba8.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) + allocs2a5f3ba8.Borrow(cproofs_ptr_allocs) + + var cfaulty_sectors_len_allocs *cgoAllocMap + ref2a5f3ba8.faulty_sectors_len, cfaulty_sectors_len_allocs = (C.size_t)(x.FaultySectorsLen), cgoAllocsUnknown + allocs2a5f3ba8.Borrow(cfaulty_sectors_len_allocs) + + var cfaulty_sectors_ptr_allocs *cgoAllocMap + ref2a5f3ba8.faulty_sectors_ptr, cfaulty_sectors_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr))) + allocs2a5f3ba8.Borrow(cfaulty_sectors_ptr_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref2a5f3ba8.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs2a5f3ba8.Borrow(cstatus_code_allocs) + + x.ref2a5f3ba8 = ref2a5f3ba8 + x.allocs2a5f3ba8 = allocs2a5f3ba8 + return ref2a5f3ba8, allocs2a5f3ba8 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSPrivateKey) PassValue() (C.fil_BLSPrivateKey, *cgoAllocMap) { - if x.ref2f77fe3a != nil { - return *x.ref2f77fe3a, nil +func (x FilGenerateWindowPoStResponse) PassValue() (C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { + if x.ref2a5f3ba8 != nil { + return *x.ref2a5f3ba8, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3590,80 +3722,97 @@ func (x FilBLSPrivateKey) PassValue() (C.fil_BLSPrivateKey, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSPrivateKey) Deref() { - if x.ref2f77fe3a == nil { +func (x *FilGenerateWindowPoStResponse) Deref() { + if x.ref2a5f3ba8 == nil { return } - x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref2f77fe3a.inner)) + x.ErrorMsg = packPCharString(x.ref2a5f3ba8.error_msg) + x.ProofsLen = (uint)(x.ref2a5f3ba8.proofs_len) + packSFilPoStProof(x.ProofsPtr, x.ref2a5f3ba8.proofs_ptr) + x.FaultySectorsLen = (uint)(x.ref2a5f3ba8.faulty_sectors_len) + hxf7a6dff := (*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr)) + hxf7a6dff.Data = unsafe.Pointer(x.ref2a5f3ba8.faulty_sectors_ptr) + hxf7a6dff.Cap = 0x7fffffff + // hxf7a6dff.Len = ? + + x.StatusCode = (FCPResponseStatus)(x.ref2a5f3ba8.status_code) } -// allocFilPrivateKeyGenerateResponseMemory allocates memory for type C.fil_PrivateKeyGenerateResponse in C. +// allocFilVerifyWindowPoStResponseMemory allocates memory for type C.fil_VerifyWindowPoStResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeyGenerateResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyGenerateResponseValue)) +func allocFilVerifyWindowPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWindowPoStResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPrivateKeyGenerateResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyGenerateResponse{}) +const sizeOfFilVerifyWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWindowPoStResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeyGenerateResponse) Ref() *C.fil_PrivateKeyGenerateResponse { +func (x *FilVerifyWindowPoStResponse) Ref() *C.fil_VerifyWindowPoStResponse { if x == nil { return nil } - return x.ref2dba09f + return x.ref34c4d49f } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeyGenerateResponse) Free() { - if x != nil && x.allocs2dba09f != nil { - x.allocs2dba09f.(*cgoAllocMap).Free() - x.ref2dba09f = nil +func (x *FilVerifyWindowPoStResponse) Free() { + if x != nil && x.allocs34c4d49f != nil { + x.allocs34c4d49f.(*cgoAllocMap).Free() + x.ref34c4d49f = nil } } -// NewFilPrivateKeyGenerateResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilVerifyWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeyGenerateResponseRef(ref unsafe.Pointer) *FilPrivateKeyGenerateResponse { +func NewFilVerifyWindowPoStResponseRef(ref unsafe.Pointer) *FilVerifyWindowPoStResponse { if ref == nil { return nil } - obj := new(FilPrivateKeyGenerateResponse) - obj.ref2dba09f = (*C.fil_PrivateKeyGenerateResponse)(unsafe.Pointer(ref)) + obj := new(FilVerifyWindowPoStResponse) + obj.ref34c4d49f = (*C.fil_VerifyWindowPoStResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeyGenerateResponse) PassRef() (*C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { +func (x *FilVerifyWindowPoStResponse) PassRef() (*C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref2dba09f != nil { - return x.ref2dba09f, nil + } else if x.ref34c4d49f != nil { + return x.ref34c4d49f, nil } - mem2dba09f := allocFilPrivateKeyGenerateResponseMemory(1) - ref2dba09f := (*C.fil_PrivateKeyGenerateResponse)(mem2dba09f) - allocs2dba09f := new(cgoAllocMap) - allocs2dba09f.Add(mem2dba09f) + mem34c4d49f := allocFilVerifyWindowPoStResponseMemory(1) + ref34c4d49f := (*C.fil_VerifyWindowPoStResponse)(mem34c4d49f) + allocs34c4d49f := new(cgoAllocMap) + allocs34c4d49f.Add(mem34c4d49f) - var cprivate_key_allocs *cgoAllocMap - ref2dba09f.private_key, cprivate_key_allocs = x.PrivateKey.PassValue() - allocs2dba09f.Borrow(cprivate_key_allocs) + var cstatus_code_allocs *cgoAllocMap + ref34c4d49f.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs34c4d49f.Borrow(cstatus_code_allocs) - x.ref2dba09f = ref2dba09f - x.allocs2dba09f = allocs2dba09f - return ref2dba09f, allocs2dba09f + var cerror_msg_allocs *cgoAllocMap + ref34c4d49f.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs34c4d49f.Borrow(cerror_msg_allocs) + + var cis_valid_allocs *cgoAllocMap + ref34c4d49f.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocs34c4d49f.Borrow(cis_valid_allocs) + + x.ref34c4d49f = ref34c4d49f + x.allocs34c4d49f = allocs34c4d49f + return ref34c4d49f, allocs34c4d49f } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeyGenerateResponse) PassValue() (C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { - if x.ref2dba09f != nil { - return *x.ref2dba09f, nil +func (x FilVerifyWindowPoStResponse) PassValue() (C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { + if x.ref34c4d49f != nil { + return *x.ref34c4d49f, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3671,80 +3820,90 @@ func (x FilPrivateKeyGenerateResponse) PassValue() (C.fil_PrivateKeyGenerateResp // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeyGenerateResponse) Deref() { - if x.ref2dba09f == nil { +func (x *FilVerifyWindowPoStResponse) Deref() { + if x.ref34c4d49f == nil { return } - x.PrivateKey = *NewFilBLSPrivateKeyRef(unsafe.Pointer(&x.ref2dba09f.private_key)) + x.StatusCode = (FCPResponseStatus)(x.ref34c4d49f.status_code) + x.ErrorMsg = packPCharString(x.ref34c4d49f.error_msg) + x.IsValid = (bool)(x.ref34c4d49f.is_valid) } -// allocFilBLSPublicKeyMemory allocates memory for type C.fil_BLSPublicKey in C. +// allocFilMergeWindowPoStPartitionProofsResponseMemory allocates memory for type C.fil_MergeWindowPoStPartitionProofsResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilBLSPublicKeyMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPublicKeyValue)) +func allocFilMergeWindowPoStPartitionProofsResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilMergeWindowPoStPartitionProofsResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilBLSPublicKeyValue = unsafe.Sizeof([1]C.fil_BLSPublicKey{}) +const sizeOfFilMergeWindowPoStPartitionProofsResponseValue = unsafe.Sizeof([1]C.fil_MergeWindowPoStPartitionProofsResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSPublicKey) Ref() *C.fil_BLSPublicKey { +func (x *FilMergeWindowPoStPartitionProofsResponse) Ref() *C.fil_MergeWindowPoStPartitionProofsResponse { if x == nil { return nil } - return x.ref6d0cab13 + return x.ref3369154e } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilBLSPublicKey) Free() { - if x != nil && x.allocs6d0cab13 != nil { - x.allocs6d0cab13.(*cgoAllocMap).Free() - x.ref6d0cab13 = nil +func (x *FilMergeWindowPoStPartitionProofsResponse) Free() { + if x != nil && x.allocs3369154e != nil { + x.allocs3369154e.(*cgoAllocMap).Free() + x.ref3369154e = nil } } -// NewFilBLSPublicKeyRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilMergeWindowPoStPartitionProofsResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilBLSPublicKeyRef(ref unsafe.Pointer) *FilBLSPublicKey { +func NewFilMergeWindowPoStPartitionProofsResponseRef(ref unsafe.Pointer) *FilMergeWindowPoStPartitionProofsResponse { if ref == nil { return nil } - obj := new(FilBLSPublicKey) - obj.ref6d0cab13 = (*C.fil_BLSPublicKey)(unsafe.Pointer(ref)) + obj := new(FilMergeWindowPoStPartitionProofsResponse) + obj.ref3369154e = (*C.fil_MergeWindowPoStPartitionProofsResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSPublicKey) PassRef() (*C.fil_BLSPublicKey, *cgoAllocMap) { +func (x *FilMergeWindowPoStPartitionProofsResponse) PassRef() (*C.fil_MergeWindowPoStPartitionProofsResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref6d0cab13 != nil { - return x.ref6d0cab13, nil + } else if x.ref3369154e != nil { + return x.ref3369154e, nil } - mem6d0cab13 := allocFilBLSPublicKeyMemory(1) - ref6d0cab13 := (*C.fil_BLSPublicKey)(mem6d0cab13) - allocs6d0cab13 := new(cgoAllocMap) - allocs6d0cab13.Add(mem6d0cab13) + mem3369154e := allocFilMergeWindowPoStPartitionProofsResponseMemory(1) + ref3369154e := (*C.fil_MergeWindowPoStPartitionProofsResponse)(mem3369154e) + allocs3369154e := new(cgoAllocMap) + allocs3369154e.Add(mem3369154e) - var cinner_allocs *cgoAllocMap - ref6d0cab13.inner, cinner_allocs = *(*[48]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs6d0cab13.Borrow(cinner_allocs) + var cerror_msg_allocs *cgoAllocMap + ref3369154e.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs3369154e.Borrow(cerror_msg_allocs) - x.ref6d0cab13 = ref6d0cab13 - x.allocs6d0cab13 = allocs6d0cab13 - return ref6d0cab13, allocs6d0cab13 + var cproof_allocs *cgoAllocMap + ref3369154e.proof, cproof_allocs = x.Proof.PassValue() + allocs3369154e.Borrow(cproof_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref3369154e.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs3369154e.Borrow(cstatus_code_allocs) + + x.ref3369154e = ref3369154e + x.allocs3369154e = allocs3369154e + return ref3369154e, allocs3369154e } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSPublicKey) PassValue() (C.fil_BLSPublicKey, *cgoAllocMap) { - if x.ref6d0cab13 != nil { - return *x.ref6d0cab13, nil +func (x FilMergeWindowPoStPartitionProofsResponse) PassValue() (C.fil_MergeWindowPoStPartitionProofsResponse, *cgoAllocMap) { + if x.ref3369154e != nil { + return *x.ref3369154e, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3752,80 +3911,90 @@ func (x FilBLSPublicKey) PassValue() (C.fil_BLSPublicKey, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSPublicKey) Deref() { - if x.ref6d0cab13 == nil { +func (x *FilMergeWindowPoStPartitionProofsResponse) Deref() { + if x.ref3369154e == nil { return } - x.Inner = *(*[48]byte)(unsafe.Pointer(&x.ref6d0cab13.inner)) + x.ErrorMsg = packPCharString(x.ref3369154e.error_msg) + x.Proof = *NewFilPoStProofRef(unsafe.Pointer(&x.ref3369154e.proof)) + x.StatusCode = (FCPResponseStatus)(x.ref3369154e.status_code) } -// allocFilPrivateKeyPublicKeyResponseMemory allocates memory for type C.fil_PrivateKeyPublicKeyResponse in C. +// allocFilPartitionSnarkProofMemory allocates memory for type C.fil_PartitionSnarkProof in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeyPublicKeyResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyPublicKeyResponseValue)) +func allocFilPartitionSnarkProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionSnarkProofValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPrivateKeyPublicKeyResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyPublicKeyResponse{}) +const sizeOfFilPartitionSnarkProofValue = unsafe.Sizeof([1]C.fil_PartitionSnarkProof{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeyPublicKeyResponse) Ref() *C.fil_PrivateKeyPublicKeyResponse { +func (x *FilPartitionSnarkProof) Ref() *C.fil_PartitionSnarkProof { if x == nil { return nil } - return x.refee14e59d + return x.ref4de03739 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeyPublicKeyResponse) Free() { - if x != nil && x.allocsee14e59d != nil { - x.allocsee14e59d.(*cgoAllocMap).Free() - x.refee14e59d = nil +func (x *FilPartitionSnarkProof) Free() { + if x != nil && x.allocs4de03739 != nil { + x.allocs4de03739.(*cgoAllocMap).Free() + x.ref4de03739 = nil } } -// NewFilPrivateKeyPublicKeyResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPartitionSnarkProofRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeyPublicKeyResponseRef(ref unsafe.Pointer) *FilPrivateKeyPublicKeyResponse { +func NewFilPartitionSnarkProofRef(ref unsafe.Pointer) *FilPartitionSnarkProof { if ref == nil { return nil } - obj := new(FilPrivateKeyPublicKeyResponse) - obj.refee14e59d = (*C.fil_PrivateKeyPublicKeyResponse)(unsafe.Pointer(ref)) + obj := new(FilPartitionSnarkProof) + obj.ref4de03739 = (*C.fil_PartitionSnarkProof)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeyPublicKeyResponse) PassRef() (*C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { +func (x *FilPartitionSnarkProof) PassRef() (*C.fil_PartitionSnarkProof, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refee14e59d != nil { - return x.refee14e59d, nil + } else if x.ref4de03739 != nil { + return x.ref4de03739, nil } - memee14e59d := allocFilPrivateKeyPublicKeyResponseMemory(1) - refee14e59d := (*C.fil_PrivateKeyPublicKeyResponse)(memee14e59d) - allocsee14e59d := new(cgoAllocMap) - allocsee14e59d.Add(memee14e59d) + mem4de03739 := allocFilPartitionSnarkProofMemory(1) + ref4de03739 := (*C.fil_PartitionSnarkProof)(mem4de03739) + allocs4de03739 := new(cgoAllocMap) + allocs4de03739.Add(mem4de03739) - var cpublic_key_allocs *cgoAllocMap - refee14e59d.public_key, cpublic_key_allocs = x.PublicKey.PassValue() - allocsee14e59d.Borrow(cpublic_key_allocs) + var cregistered_proof_allocs *cgoAllocMap + ref4de03739.registered_proof, cregistered_proof_allocs = (C.enum_fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs4de03739.Borrow(cregistered_proof_allocs) - x.refee14e59d = refee14e59d - x.allocsee14e59d = allocsee14e59d - return refee14e59d, allocsee14e59d + var cproof_len_allocs *cgoAllocMap + ref4de03739.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs4de03739.Borrow(cproof_len_allocs) + + var cproof_ptr_allocs *cgoAllocMap + ref4de03739.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs4de03739.Borrow(cproof_ptr_allocs) + + x.ref4de03739 = ref4de03739 + x.allocs4de03739 = allocs4de03739 + return ref4de03739, allocs4de03739 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeyPublicKeyResponse) PassValue() (C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { - if x.refee14e59d != nil { - return *x.refee14e59d, nil +func (x FilPartitionSnarkProof) PassValue() (C.fil_PartitionSnarkProof, *cgoAllocMap) { + if x.ref4de03739 != nil { + return *x.ref4de03739, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3833,80 +4002,94 @@ func (x FilPrivateKeyPublicKeyResponse) PassValue() (C.fil_PrivateKeyPublicKeyRe // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeyPublicKeyResponse) Deref() { - if x.refee14e59d == nil { +func (x *FilPartitionSnarkProof) Deref() { + if x.ref4de03739 == nil { return } - x.PublicKey = *NewFilBLSPublicKeyRef(unsafe.Pointer(&x.refee14e59d.public_key)) + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref4de03739.registered_proof) + x.ProofLen = (uint)(x.ref4de03739.proof_len) + hxfe48d67 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxfe48d67.Data = unsafe.Pointer(x.ref4de03739.proof_ptr) + hxfe48d67.Cap = 0x7fffffff + // hxfe48d67.Len = ? + } -// allocFilPrivateKeySignResponseMemory allocates memory for type C.fil_PrivateKeySignResponse in C. +// allocFilGetNumPartitionForFallbackPoStResponseMemory allocates memory for type C.fil_GetNumPartitionForFallbackPoStResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeySignResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeySignResponseValue)) +func allocFilGetNumPartitionForFallbackPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGetNumPartitionForFallbackPoStResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPrivateKeySignResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeySignResponse{}) +const sizeOfFilGetNumPartitionForFallbackPoStResponseValue = unsafe.Sizeof([1]C.fil_GetNumPartitionForFallbackPoStResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeySignResponse) Ref() *C.fil_PrivateKeySignResponse { +func (x *FilGetNumPartitionForFallbackPoStResponse) Ref() *C.fil_GetNumPartitionForFallbackPoStResponse { if x == nil { return nil } - return x.refcdf97b28 + return x.refc0084478 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeySignResponse) Free() { - if x != nil && x.allocscdf97b28 != nil { - x.allocscdf97b28.(*cgoAllocMap).Free() - x.refcdf97b28 = nil +func (x *FilGetNumPartitionForFallbackPoStResponse) Free() { + if x != nil && x.allocsc0084478 != nil { + x.allocsc0084478.(*cgoAllocMap).Free() + x.refc0084478 = nil } } -// NewFilPrivateKeySignResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGetNumPartitionForFallbackPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeySignResponseRef(ref unsafe.Pointer) *FilPrivateKeySignResponse { +func NewFilGetNumPartitionForFallbackPoStResponseRef(ref unsafe.Pointer) *FilGetNumPartitionForFallbackPoStResponse { if ref == nil { return nil } - obj := new(FilPrivateKeySignResponse) - obj.refcdf97b28 = (*C.fil_PrivateKeySignResponse)(unsafe.Pointer(ref)) + obj := new(FilGetNumPartitionForFallbackPoStResponse) + obj.refc0084478 = (*C.fil_GetNumPartitionForFallbackPoStResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeySignResponse) PassRef() (*C.fil_PrivateKeySignResponse, *cgoAllocMap) { +func (x *FilGetNumPartitionForFallbackPoStResponse) PassRef() (*C.fil_GetNumPartitionForFallbackPoStResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refcdf97b28 != nil { - return x.refcdf97b28, nil + } else if x.refc0084478 != nil { + return x.refc0084478, nil } - memcdf97b28 := allocFilPrivateKeySignResponseMemory(1) - refcdf97b28 := (*C.fil_PrivateKeySignResponse)(memcdf97b28) - allocscdf97b28 := new(cgoAllocMap) - allocscdf97b28.Add(memcdf97b28) + memc0084478 := allocFilGetNumPartitionForFallbackPoStResponseMemory(1) + refc0084478 := (*C.fil_GetNumPartitionForFallbackPoStResponse)(memc0084478) + allocsc0084478 := new(cgoAllocMap) + allocsc0084478.Add(memc0084478) - var csignature_allocs *cgoAllocMap - refcdf97b28.signature, csignature_allocs = x.Signature.PassValue() - allocscdf97b28.Borrow(csignature_allocs) + var cerror_msg_allocs *cgoAllocMap + refc0084478.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsc0084478.Borrow(cerror_msg_allocs) - x.refcdf97b28 = refcdf97b28 - x.allocscdf97b28 = allocscdf97b28 - return refcdf97b28, allocscdf97b28 + var cstatus_code_allocs *cgoAllocMap + refc0084478.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsc0084478.Borrow(cstatus_code_allocs) + + var cnum_partition_allocs *cgoAllocMap + refc0084478.num_partition, cnum_partition_allocs = (C.size_t)(x.NumPartition), cgoAllocsUnknown + allocsc0084478.Borrow(cnum_partition_allocs) + + x.refc0084478 = refc0084478 + x.allocsc0084478 = allocsc0084478 + return refc0084478, allocsc0084478 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeySignResponse) PassValue() (C.fil_PrivateKeySignResponse, *cgoAllocMap) { - if x.refcdf97b28 != nil { - return *x.refcdf97b28, nil +func (x FilGetNumPartitionForFallbackPoStResponse) PassValue() (C.fil_GetNumPartitionForFallbackPoStResponse, *cgoAllocMap) { + if x.refc0084478 != nil { + return *x.refc0084478, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -3914,92 +4097,98 @@ func (x FilPrivateKeySignResponse) PassValue() (C.fil_PrivateKeySignResponse, *c // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeySignResponse) Deref() { - if x.refcdf97b28 == nil { +func (x *FilGetNumPartitionForFallbackPoStResponse) Deref() { + if x.refc0084478 == nil { return } - x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refcdf97b28.signature)) + x.ErrorMsg = packPCharString(x.refc0084478.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refc0084478.status_code) + x.NumPartition = (uint)(x.refc0084478.num_partition) } -// allocFilSealCommitPhase1ResponseMemory allocates memory for type C.fil_SealCommitPhase1Response in C. +// allocFilGenerateSingleWindowPoStWithVanillaResponseMemory allocates memory for type C.fil_GenerateSingleWindowPoStWithVanillaResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilSealCommitPhase1ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase1ResponseValue)) +func allocFilGenerateSingleWindowPoStWithVanillaResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateSingleWindowPoStWithVanillaResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilSealCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase1Response{}) +const sizeOfFilGenerateSingleWindowPoStWithVanillaResponseValue = unsafe.Sizeof([1]C.fil_GenerateSingleWindowPoStWithVanillaResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealCommitPhase1Response) Ref() *C.fil_SealCommitPhase1Response { +func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Ref() *C.fil_GenerateSingleWindowPoStWithVanillaResponse { if x == nil { return nil } - return x.ref61ed8561 + return x.ref96c012c3 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilSealCommitPhase1Response) Free() { - if x != nil && x.allocs61ed8561 != nil { - x.allocs61ed8561.(*cgoAllocMap).Free() - x.ref61ed8561 = nil +func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Free() { + if x != nil && x.allocs96c012c3 != nil { + x.allocs96c012c3.(*cgoAllocMap).Free() + x.ref96c012c3 = nil } } -// NewFilSealCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateSingleWindowPoStWithVanillaResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilSealCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase1Response { +func NewFilGenerateSingleWindowPoStWithVanillaResponseRef(ref unsafe.Pointer) *FilGenerateSingleWindowPoStWithVanillaResponse { if ref == nil { return nil } - obj := new(FilSealCommitPhase1Response) - obj.ref61ed8561 = (*C.fil_SealCommitPhase1Response)(unsafe.Pointer(ref)) + obj := new(FilGenerateSingleWindowPoStWithVanillaResponse) + obj.ref96c012c3 = (*C.fil_GenerateSingleWindowPoStWithVanillaResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealCommitPhase1Response) PassRef() (*C.fil_SealCommitPhase1Response, *cgoAllocMap) { +func (x *FilGenerateSingleWindowPoStWithVanillaResponse) PassRef() (*C.fil_GenerateSingleWindowPoStWithVanillaResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref61ed8561 != nil { - return x.ref61ed8561, nil + } else if x.ref96c012c3 != nil { + return x.ref96c012c3, nil } - mem61ed8561 := allocFilSealCommitPhase1ResponseMemory(1) - ref61ed8561 := (*C.fil_SealCommitPhase1Response)(mem61ed8561) - allocs61ed8561 := new(cgoAllocMap) - allocs61ed8561.Add(mem61ed8561) - - var cstatus_code_allocs *cgoAllocMap - ref61ed8561.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs61ed8561.Borrow(cstatus_code_allocs) + mem96c012c3 := allocFilGenerateSingleWindowPoStWithVanillaResponseMemory(1) + ref96c012c3 := (*C.fil_GenerateSingleWindowPoStWithVanillaResponse)(mem96c012c3) + allocs96c012c3 := new(cgoAllocMap) + allocs96c012c3.Add(mem96c012c3) var cerror_msg_allocs *cgoAllocMap - ref61ed8561.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs61ed8561.Borrow(cerror_msg_allocs) + ref96c012c3.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs96c012c3.Borrow(cerror_msg_allocs) - var cseal_commit_phase1_output_ptr_allocs *cgoAllocMap - ref61ed8561.seal_commit_phase1_output_ptr, cseal_commit_phase1_output_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.SealCommitPhase1OutputPtr))) - allocs61ed8561.Borrow(cseal_commit_phase1_output_ptr_allocs) + var cpartition_proof_allocs *cgoAllocMap + ref96c012c3.partition_proof, cpartition_proof_allocs = x.PartitionProof.PassValue() + allocs96c012c3.Borrow(cpartition_proof_allocs) - var cseal_commit_phase1_output_len_allocs *cgoAllocMap - ref61ed8561.seal_commit_phase1_output_len, cseal_commit_phase1_output_len_allocs = (C.size_t)(x.SealCommitPhase1OutputLen), cgoAllocsUnknown - allocs61ed8561.Borrow(cseal_commit_phase1_output_len_allocs) + var cfaulty_sectors_len_allocs *cgoAllocMap + ref96c012c3.faulty_sectors_len, cfaulty_sectors_len_allocs = (C.size_t)(x.FaultySectorsLen), cgoAllocsUnknown + allocs96c012c3.Borrow(cfaulty_sectors_len_allocs) - x.ref61ed8561 = ref61ed8561 - x.allocs61ed8561 = allocs61ed8561 - return ref61ed8561, allocs61ed8561 + var cfaulty_sectors_ptr_allocs *cgoAllocMap + ref96c012c3.faulty_sectors_ptr, cfaulty_sectors_ptr_allocs = copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr))) + allocs96c012c3.Borrow(cfaulty_sectors_ptr_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref96c012c3.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs96c012c3.Borrow(cstatus_code_allocs) + + x.ref96c012c3 = ref96c012c3 + x.allocs96c012c3 = allocs96c012c3 + return ref96c012c3, allocs96c012c3 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealCommitPhase1Response) PassValue() (C.fil_SealCommitPhase1Response, *cgoAllocMap) { - if x.ref61ed8561 != nil { - return *x.ref61ed8561, nil +func (x FilGenerateSingleWindowPoStWithVanillaResponse) PassValue() (C.fil_GenerateSingleWindowPoStWithVanillaResponse, *cgoAllocMap) { + if x.ref96c012c3 != nil { + return *x.ref96c012c3, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4007,99 +4196,104 @@ func (x FilSealCommitPhase1Response) PassValue() (C.fil_SealCommitPhase1Response // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealCommitPhase1Response) Deref() { - if x.ref61ed8561 == nil { +func (x *FilGenerateSingleWindowPoStWithVanillaResponse) Deref() { + if x.ref96c012c3 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref61ed8561.status_code) - x.ErrorMsg = packPCharString(x.ref61ed8561.error_msg) - hxfe48d67 := (*sliceHeader)(unsafe.Pointer(&x.SealCommitPhase1OutputPtr)) - hxfe48d67.Data = unsafe.Pointer(x.ref61ed8561.seal_commit_phase1_output_ptr) - hxfe48d67.Cap = 0x7fffffff - // hxfe48d67.Len = ? + x.ErrorMsg = packPCharString(x.ref96c012c3.error_msg) + x.PartitionProof = *NewFilPartitionSnarkProofRef(unsafe.Pointer(&x.ref96c012c3.partition_proof)) + x.FaultySectorsLen = (uint)(x.ref96c012c3.faulty_sectors_len) + hxf4171bf := (*sliceHeader)(unsafe.Pointer(&x.FaultySectorsPtr)) + hxf4171bf.Data = unsafe.Pointer(x.ref96c012c3.faulty_sectors_ptr) + hxf4171bf.Cap = 0x7fffffff + // hxf4171bf.Len = ? - x.SealCommitPhase1OutputLen = (uint)(x.ref61ed8561.seal_commit_phase1_output_len) + x.StatusCode = (FCPResponseStatus)(x.ref96c012c3.status_code) } -// allocFilSealPreCommitPhase1ResponseMemory allocates memory for type C.fil_SealPreCommitPhase1Response in C. +// allocFilEmptySectorUpdateEncodeIntoResponseMemory allocates memory for type C.fil_EmptySectorUpdateEncodeIntoResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilSealPreCommitPhase1ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase1ResponseValue)) +func allocFilEmptySectorUpdateEncodeIntoResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateEncodeIntoResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilSealPreCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase1Response{}) +const sizeOfFilEmptySectorUpdateEncodeIntoResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateEncodeIntoResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealPreCommitPhase1Response) Ref() *C.fil_SealPreCommitPhase1Response { +func (x *FilEmptySectorUpdateEncodeIntoResponse) Ref() *C.fil_EmptySectorUpdateEncodeIntoResponse { if x == nil { return nil } - return x.ref132bbfd8 + return x.ref8d3238a7 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilSealPreCommitPhase1Response) Free() { - if x != nil && x.allocs132bbfd8 != nil { - x.allocs132bbfd8.(*cgoAllocMap).Free() - x.ref132bbfd8 = nil +func (x *FilEmptySectorUpdateEncodeIntoResponse) Free() { + if x != nil && x.allocs8d3238a7 != nil { + x.allocs8d3238a7.(*cgoAllocMap).Free() + x.ref8d3238a7 = nil } } -// NewFilSealPreCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilEmptySectorUpdateEncodeIntoResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilSealPreCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase1Response { +func NewFilEmptySectorUpdateEncodeIntoResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateEncodeIntoResponse { if ref == nil { return nil } - obj := new(FilSealPreCommitPhase1Response) - obj.ref132bbfd8 = (*C.fil_SealPreCommitPhase1Response)(unsafe.Pointer(ref)) + obj := new(FilEmptySectorUpdateEncodeIntoResponse) + obj.ref8d3238a7 = (*C.fil_EmptySectorUpdateEncodeIntoResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealPreCommitPhase1Response) PassRef() (*C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { +func (x *FilEmptySectorUpdateEncodeIntoResponse) PassRef() (*C.fil_EmptySectorUpdateEncodeIntoResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref132bbfd8 != nil { - return x.ref132bbfd8, nil + } else if x.ref8d3238a7 != nil { + return x.ref8d3238a7, nil } - mem132bbfd8 := allocFilSealPreCommitPhase1ResponseMemory(1) - ref132bbfd8 := (*C.fil_SealPreCommitPhase1Response)(mem132bbfd8) - allocs132bbfd8 := new(cgoAllocMap) - allocs132bbfd8.Add(mem132bbfd8) + mem8d3238a7 := allocFilEmptySectorUpdateEncodeIntoResponseMemory(1) + ref8d3238a7 := (*C.fil_EmptySectorUpdateEncodeIntoResponse)(mem8d3238a7) + allocs8d3238a7 := new(cgoAllocMap) + allocs8d3238a7.Add(mem8d3238a7) var cerror_msg_allocs *cgoAllocMap - ref132bbfd8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs132bbfd8.Borrow(cerror_msg_allocs) + ref8d3238a7.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs8d3238a7.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - ref132bbfd8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs132bbfd8.Borrow(cstatus_code_allocs) + ref8d3238a7.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs8d3238a7.Borrow(cstatus_code_allocs) - var cseal_pre_commit_phase1_output_ptr_allocs *cgoAllocMap - ref132bbfd8.seal_pre_commit_phase1_output_ptr, cseal_pre_commit_phase1_output_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.SealPreCommitPhase1OutputPtr))) - allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_ptr_allocs) + var ccomm_r_new_allocs *cgoAllocMap + ref8d3238a7.comm_r_new, ccomm_r_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommRNew)), cgoAllocsUnknown + allocs8d3238a7.Borrow(ccomm_r_new_allocs) - var cseal_pre_commit_phase1_output_len_allocs *cgoAllocMap - ref132bbfd8.seal_pre_commit_phase1_output_len, cseal_pre_commit_phase1_output_len_allocs = (C.size_t)(x.SealPreCommitPhase1OutputLen), cgoAllocsUnknown - allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_len_allocs) + var ccomm_r_last_new_allocs *cgoAllocMap + ref8d3238a7.comm_r_last_new, ccomm_r_last_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommRLastNew)), cgoAllocsUnknown + allocs8d3238a7.Borrow(ccomm_r_last_new_allocs) - x.ref132bbfd8 = ref132bbfd8 - x.allocs132bbfd8 = allocs132bbfd8 - return ref132bbfd8, allocs132bbfd8 + var ccomm_d_new_allocs *cgoAllocMap + ref8d3238a7.comm_d_new, ccomm_d_new_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommDNew)), cgoAllocsUnknown + allocs8d3238a7.Borrow(ccomm_d_new_allocs) + + x.ref8d3238a7 = ref8d3238a7 + x.allocs8d3238a7 = allocs8d3238a7 + return ref8d3238a7, allocs8d3238a7 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealPreCommitPhase1Response) PassValue() (C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { - if x.ref132bbfd8 != nil { - return *x.ref132bbfd8, nil +func (x FilEmptySectorUpdateEncodeIntoResponse) PassValue() (C.fil_EmptySectorUpdateEncodeIntoResponse, *cgoAllocMap) { + if x.ref8d3238a7 != nil { + return *x.ref8d3238a7, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4107,103 +4301,88 @@ func (x FilSealPreCommitPhase1Response) PassValue() (C.fil_SealPreCommitPhase1Re // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealPreCommitPhase1Response) Deref() { - if x.ref132bbfd8 == nil { +func (x *FilEmptySectorUpdateEncodeIntoResponse) Deref() { + if x.ref8d3238a7 == nil { return } - x.ErrorMsg = packPCharString(x.ref132bbfd8.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref132bbfd8.status_code) - hxf4171bf := (*sliceHeader)(unsafe.Pointer(&x.SealPreCommitPhase1OutputPtr)) - hxf4171bf.Data = unsafe.Pointer(x.ref132bbfd8.seal_pre_commit_phase1_output_ptr) - hxf4171bf.Cap = 0x7fffffff - // hxf4171bf.Len = ? - - x.SealPreCommitPhase1OutputLen = (uint)(x.ref132bbfd8.seal_pre_commit_phase1_output_len) + x.ErrorMsg = packPCharString(x.ref8d3238a7.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref8d3238a7.status_code) + x.CommRNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_r_new)) + x.CommRLastNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_r_last_new)) + x.CommDNew = *(*[32]byte)(unsafe.Pointer(&x.ref8d3238a7.comm_d_new)) } -// allocFilSealPreCommitPhase2ResponseMemory allocates memory for type C.fil_SealPreCommitPhase2Response in C. +// allocFilEmptySectorUpdateDecodeFromResponseMemory allocates memory for type C.fil_EmptySectorUpdateDecodeFromResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilSealPreCommitPhase2ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase2ResponseValue)) +func allocFilEmptySectorUpdateDecodeFromResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateDecodeFromResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilSealPreCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase2Response{}) +const sizeOfFilEmptySectorUpdateDecodeFromResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateDecodeFromResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealPreCommitPhase2Response) Ref() *C.fil_SealPreCommitPhase2Response { +func (x *FilEmptySectorUpdateDecodeFromResponse) Ref() *C.fil_EmptySectorUpdateDecodeFromResponse { if x == nil { return nil } - return x.ref2aa6831d + return x.reff02a01b8 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilSealPreCommitPhase2Response) Free() { - if x != nil && x.allocs2aa6831d != nil { - x.allocs2aa6831d.(*cgoAllocMap).Free() - x.ref2aa6831d = nil +func (x *FilEmptySectorUpdateDecodeFromResponse) Free() { + if x != nil && x.allocsf02a01b8 != nil { + x.allocsf02a01b8.(*cgoAllocMap).Free() + x.reff02a01b8 = nil } } -// NewFilSealPreCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilEmptySectorUpdateDecodeFromResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilSealPreCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase2Response { +func NewFilEmptySectorUpdateDecodeFromResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateDecodeFromResponse { if ref == nil { return nil } - obj := new(FilSealPreCommitPhase2Response) - obj.ref2aa6831d = (*C.fil_SealPreCommitPhase2Response)(unsafe.Pointer(ref)) + obj := new(FilEmptySectorUpdateDecodeFromResponse) + obj.reff02a01b8 = (*C.fil_EmptySectorUpdateDecodeFromResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealPreCommitPhase2Response) PassRef() (*C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { +func (x *FilEmptySectorUpdateDecodeFromResponse) PassRef() (*C.fil_EmptySectorUpdateDecodeFromResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref2aa6831d != nil { - return x.ref2aa6831d, nil + } else if x.reff02a01b8 != nil { + return x.reff02a01b8, nil } - mem2aa6831d := allocFilSealPreCommitPhase2ResponseMemory(1) - ref2aa6831d := (*C.fil_SealPreCommitPhase2Response)(mem2aa6831d) - allocs2aa6831d := new(cgoAllocMap) - allocs2aa6831d.Add(mem2aa6831d) - - var cerror_msg_allocs *cgoAllocMap - ref2aa6831d.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs2aa6831d.Borrow(cerror_msg_allocs) + memf02a01b8 := allocFilEmptySectorUpdateDecodeFromResponseMemory(1) + reff02a01b8 := (*C.fil_EmptySectorUpdateDecodeFromResponse)(memf02a01b8) + allocsf02a01b8 := new(cgoAllocMap) + allocsf02a01b8.Add(memf02a01b8) var cstatus_code_allocs *cgoAllocMap - ref2aa6831d.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs2aa6831d.Borrow(cstatus_code_allocs) - - var cregistered_proof_allocs *cgoAllocMap - ref2aa6831d.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredSealProof)(x.RegisteredProof), cgoAllocsUnknown - allocs2aa6831d.Borrow(cregistered_proof_allocs) - - var ccomm_d_allocs *cgoAllocMap - ref2aa6831d.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown - allocs2aa6831d.Borrow(ccomm_d_allocs) + reff02a01b8.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsf02a01b8.Borrow(cstatus_code_allocs) - var ccomm_r_allocs *cgoAllocMap - ref2aa6831d.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs2aa6831d.Borrow(ccomm_r_allocs) + var cerror_msg_allocs *cgoAllocMap + reff02a01b8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsf02a01b8.Borrow(cerror_msg_allocs) - x.ref2aa6831d = ref2aa6831d - x.allocs2aa6831d = allocs2aa6831d - return ref2aa6831d, allocs2aa6831d + x.reff02a01b8 = reff02a01b8 + x.allocsf02a01b8 = allocsf02a01b8 + return reff02a01b8, allocsf02a01b8 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealPreCommitPhase2Response) PassValue() (C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { - if x.ref2aa6831d != nil { - return *x.ref2aa6831d, nil +func (x FilEmptySectorUpdateDecodeFromResponse) PassValue() (C.fil_EmptySectorUpdateDecodeFromResponse, *cgoAllocMap) { + if x.reff02a01b8 != nil { + return *x.reff02a01b8, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4211,92 +4390,85 @@ func (x FilSealPreCommitPhase2Response) PassValue() (C.fil_SealPreCommitPhase2Re // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealPreCommitPhase2Response) Deref() { - if x.ref2aa6831d == nil { +func (x *FilEmptySectorUpdateDecodeFromResponse) Deref() { + if x.reff02a01b8 == nil { return } - x.ErrorMsg = packPCharString(x.ref2aa6831d.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref2aa6831d.status_code) - x.RegisteredProof = (FilRegisteredSealProof)(x.ref2aa6831d.registered_proof) - x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_d)) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_r)) + x.StatusCode = (FCPResponseStatus)(x.reff02a01b8.status_code) + x.ErrorMsg = packPCharString(x.reff02a01b8.error_msg) } -// allocFilStringResponseMemory allocates memory for type C.fil_StringResponse in C. +// allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory allocates memory for type C.fil_EmptySectorUpdateRemoveEncodedDataResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilStringResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilStringResponseValue)) +func allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateRemoveEncodedDataResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilStringResponseValue = unsafe.Sizeof([1]C.fil_StringResponse{}) +const sizeOfFilEmptySectorUpdateRemoveEncodedDataResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateRemoveEncodedDataResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilStringResponse) Ref() *C.fil_StringResponse { +func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Ref() *C.fil_EmptySectorUpdateRemoveEncodedDataResponse { if x == nil { return nil } - return x.ref4f413043 + return x.ref50783b83 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilStringResponse) Free() { - if x != nil && x.allocs4f413043 != nil { - x.allocs4f413043.(*cgoAllocMap).Free() - x.ref4f413043 = nil +func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Free() { + if x != nil && x.allocs50783b83 != nil { + x.allocs50783b83.(*cgoAllocMap).Free() + x.ref50783b83 = nil } } -// NewFilStringResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilEmptySectorUpdateRemoveEncodedDataResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilStringResponseRef(ref unsafe.Pointer) *FilStringResponse { +func NewFilEmptySectorUpdateRemoveEncodedDataResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateRemoveEncodedDataResponse { if ref == nil { return nil } - obj := new(FilStringResponse) - obj.ref4f413043 = (*C.fil_StringResponse)(unsafe.Pointer(ref)) + obj := new(FilEmptySectorUpdateRemoveEncodedDataResponse) + obj.ref50783b83 = (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilStringResponse) PassRef() (*C.fil_StringResponse, *cgoAllocMap) { +func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) PassRef() (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref4f413043 != nil { - return x.ref4f413043, nil + } else if x.ref50783b83 != nil { + return x.ref50783b83, nil } - mem4f413043 := allocFilStringResponseMemory(1) - ref4f413043 := (*C.fil_StringResponse)(mem4f413043) - allocs4f413043 := new(cgoAllocMap) - allocs4f413043.Add(mem4f413043) + mem50783b83 := allocFilEmptySectorUpdateRemoveEncodedDataResponseMemory(1) + ref50783b83 := (*C.fil_EmptySectorUpdateRemoveEncodedDataResponse)(mem50783b83) + allocs50783b83 := new(cgoAllocMap) + allocs50783b83.Add(mem50783b83) var cstatus_code_allocs *cgoAllocMap - ref4f413043.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs4f413043.Borrow(cstatus_code_allocs) + ref50783b83.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs50783b83.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - ref4f413043.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs4f413043.Borrow(cerror_msg_allocs) - - var cstring_val_allocs *cgoAllocMap - ref4f413043.string_val, cstring_val_allocs = unpackPCharString(x.StringVal) - allocs4f413043.Borrow(cstring_val_allocs) + ref50783b83.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs50783b83.Borrow(cerror_msg_allocs) - x.ref4f413043 = ref4f413043 - x.allocs4f413043 = allocs4f413043 - return ref4f413043, allocs4f413043 + x.ref50783b83 = ref50783b83 + x.allocs50783b83 = allocs50783b83 + return ref50783b83, allocs50783b83 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilStringResponse) PassValue() (C.fil_StringResponse, *cgoAllocMap) { - if x.ref4f413043 != nil { - return *x.ref4f413043, nil +func (x FilEmptySectorUpdateRemoveEncodedDataResponse) PassValue() (C.fil_EmptySectorUpdateRemoveEncodedDataResponse, *cgoAllocMap) { + if x.ref50783b83 != nil { + return *x.ref50783b83, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4304,86 +4476,85 @@ func (x FilStringResponse) PassValue() (C.fil_StringResponse, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilStringResponse) Deref() { - if x.ref4f413043 == nil { +func (x *FilEmptySectorUpdateRemoveEncodedDataResponse) Deref() { + if x.ref50783b83 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref4f413043.status_code) - x.ErrorMsg = packPCharString(x.ref4f413043.error_msg) - x.StringVal = packPCharString(x.ref4f413043.string_val) + x.StatusCode = (FCPResponseStatus)(x.ref50783b83.status_code) + x.ErrorMsg = packPCharString(x.ref50783b83.error_msg) } -// allocFilUnsealRangeResponseMemory allocates memory for type C.fil_UnsealRangeResponse in C. +// allocFilPartitionProofMemory allocates memory for type C.fil_PartitionProof in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilUnsealRangeResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilUnsealRangeResponseValue)) +func allocFilPartitionProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionProofValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilUnsealRangeResponseValue = unsafe.Sizeof([1]C.fil_UnsealRangeResponse{}) +const sizeOfFilPartitionProofValue = unsafe.Sizeof([1]C.fil_PartitionProof{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilUnsealRangeResponse) Ref() *C.fil_UnsealRangeResponse { +func (x *FilPartitionProof) Ref() *C.fil_PartitionProof { if x == nil { return nil } - return x.ref61e219c9 + return x.ref566a2be6 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilUnsealRangeResponse) Free() { - if x != nil && x.allocs61e219c9 != nil { - x.allocs61e219c9.(*cgoAllocMap).Free() - x.ref61e219c9 = nil +func (x *FilPartitionProof) Free() { + if x != nil && x.allocs566a2be6 != nil { + x.allocs566a2be6.(*cgoAllocMap).Free() + x.ref566a2be6 = nil } } -// NewFilUnsealRangeResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPartitionProofRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilUnsealRangeResponseRef(ref unsafe.Pointer) *FilUnsealRangeResponse { +func NewFilPartitionProofRef(ref unsafe.Pointer) *FilPartitionProof { if ref == nil { return nil } - obj := new(FilUnsealRangeResponse) - obj.ref61e219c9 = (*C.fil_UnsealRangeResponse)(unsafe.Pointer(ref)) + obj := new(FilPartitionProof) + obj.ref566a2be6 = (*C.fil_PartitionProof)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilUnsealRangeResponse) PassRef() (*C.fil_UnsealRangeResponse, *cgoAllocMap) { +func (x *FilPartitionProof) PassRef() (*C.fil_PartitionProof, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref61e219c9 != nil { - return x.ref61e219c9, nil + } else if x.ref566a2be6 != nil { + return x.ref566a2be6, nil } - mem61e219c9 := allocFilUnsealRangeResponseMemory(1) - ref61e219c9 := (*C.fil_UnsealRangeResponse)(mem61e219c9) - allocs61e219c9 := new(cgoAllocMap) - allocs61e219c9.Add(mem61e219c9) + mem566a2be6 := allocFilPartitionProofMemory(1) + ref566a2be6 := (*C.fil_PartitionProof)(mem566a2be6) + allocs566a2be6 := new(cgoAllocMap) + allocs566a2be6.Add(mem566a2be6) - var cstatus_code_allocs *cgoAllocMap - ref61e219c9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs61e219c9.Borrow(cstatus_code_allocs) + var cproof_len_allocs *cgoAllocMap + ref566a2be6.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs566a2be6.Borrow(cproof_len_allocs) - var cerror_msg_allocs *cgoAllocMap - ref61e219c9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs61e219c9.Borrow(cerror_msg_allocs) + var cproof_ptr_allocs *cgoAllocMap + ref566a2be6.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs566a2be6.Borrow(cproof_ptr_allocs) - x.ref61e219c9 = ref61e219c9 - x.allocs61e219c9 = allocs61e219c9 - return ref61e219c9, allocs61e219c9 + x.ref566a2be6 = ref566a2be6 + x.allocs566a2be6 = allocs566a2be6 + return ref566a2be6, allocs566a2be6 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilUnsealRangeResponse) PassValue() (C.fil_UnsealRangeResponse, *cgoAllocMap) { - if x.ref61e219c9 != nil { - return *x.ref61e219c9, nil +func (x FilPartitionProof) PassValue() (C.fil_PartitionProof, *cgoAllocMap) { + if x.ref566a2be6 != nil { + return *x.ref566a2be6, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4391,89 +4562,147 @@ func (x FilUnsealRangeResponse) PassValue() (C.fil_UnsealRangeResponse, *cgoAllo // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilUnsealRangeResponse) Deref() { - if x.ref61e219c9 == nil { +func (x *FilPartitionProof) Deref() { + if x.ref566a2be6 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref61e219c9.status_code) - x.ErrorMsg = packPCharString(x.ref61e219c9.error_msg) + x.ProofLen = (uint)(x.ref566a2be6.proof_len) + hxf058b18 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxf058b18.Data = unsafe.Pointer(x.ref566a2be6.proof_ptr) + hxf058b18.Cap = 0x7fffffff + // hxf058b18.Len = ? + +} + +// allocFilPartitionProofResponseMemory allocates memory for type C.fil_PartitionProofResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPartitionProofResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPartitionProofResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPartitionProofResponseValue = unsafe.Sizeof([1]C.fil_PartitionProofResponse{}) + +// allocStructFilPartitionProofMemory allocates memory for type C.struct_fil_PartitionProof in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilPartitionProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPartitionProofValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilPartitionProofValue = unsafe.Sizeof([1]C.struct_fil_PartitionProof{}) + +// unpackSFilPartitionProof transforms a sliced Go data structure into plain C format. +func unpackSFilPartitionProof(x []FilPartitionProof) (unpacked *C.struct_fil_PartitionProof, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocStructFilPartitionProofMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.struct_fil_PartitionProof)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.struct_fil_PartitionProof)(h.Data) + return } -// allocFilVerifyAggregateSealProofResponseMemory allocates memory for type C.fil_VerifyAggregateSealProofResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyAggregateSealProofResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyAggregateSealProofResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) +// packSFilPartitionProof reads sliced Go data structure out from plain C format. +func packSFilPartitionProof(v []FilPartitionProof, ptr0 *C.struct_fil_PartitionProof) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfStructFilPartitionProofValue]C.struct_fil_PartitionProof)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPartitionProofRef(unsafe.Pointer(&ptr1)) } - return mem } -const sizeOfFilVerifyAggregateSealProofResponseValue = unsafe.Sizeof([1]C.fil_VerifyAggregateSealProofResponse{}) - // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyAggregateSealProofResponse) Ref() *C.fil_VerifyAggregateSealProofResponse { +func (x *FilPartitionProofResponse) Ref() *C.fil_PartitionProofResponse { if x == nil { return nil } - return x.ref66180e0 + return x.ref51343e7a } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyAggregateSealProofResponse) Free() { - if x != nil && x.allocs66180e0 != nil { - x.allocs66180e0.(*cgoAllocMap).Free() - x.ref66180e0 = nil +func (x *FilPartitionProofResponse) Free() { + if x != nil && x.allocs51343e7a != nil { + x.allocs51343e7a.(*cgoAllocMap).Free() + x.ref51343e7a = nil } } -// NewFilVerifyAggregateSealProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilPartitionProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyAggregateSealProofResponseRef(ref unsafe.Pointer) *FilVerifyAggregateSealProofResponse { +func NewFilPartitionProofResponseRef(ref unsafe.Pointer) *FilPartitionProofResponse { if ref == nil { return nil } - obj := new(FilVerifyAggregateSealProofResponse) - obj.ref66180e0 = (*C.fil_VerifyAggregateSealProofResponse)(unsafe.Pointer(ref)) + obj := new(FilPartitionProofResponse) + obj.ref51343e7a = (*C.fil_PartitionProofResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyAggregateSealProofResponse) PassRef() (*C.fil_VerifyAggregateSealProofResponse, *cgoAllocMap) { +func (x *FilPartitionProofResponse) PassRef() (*C.fil_PartitionProofResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref66180e0 != nil { - return x.ref66180e0, nil + } else if x.ref51343e7a != nil { + return x.ref51343e7a, nil } - mem66180e0 := allocFilVerifyAggregateSealProofResponseMemory(1) - ref66180e0 := (*C.fil_VerifyAggregateSealProofResponse)(mem66180e0) - allocs66180e0 := new(cgoAllocMap) - allocs66180e0.Add(mem66180e0) + mem51343e7a := allocFilPartitionProofResponseMemory(1) + ref51343e7a := (*C.fil_PartitionProofResponse)(mem51343e7a) + allocs51343e7a := new(cgoAllocMap) + allocs51343e7a.Add(mem51343e7a) var cstatus_code_allocs *cgoAllocMap - ref66180e0.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs66180e0.Borrow(cstatus_code_allocs) + ref51343e7a.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs51343e7a.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - ref66180e0.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs66180e0.Borrow(cerror_msg_allocs) + ref51343e7a.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs51343e7a.Borrow(cerror_msg_allocs) - var cis_valid_allocs *cgoAllocMap - ref66180e0.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocs66180e0.Borrow(cis_valid_allocs) + var cproofs_len_allocs *cgoAllocMap + ref51343e7a.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown + allocs51343e7a.Borrow(cproofs_len_allocs) - x.ref66180e0 = ref66180e0 - x.allocs66180e0 = allocs66180e0 - return ref66180e0, allocs66180e0 + var cproofs_ptr_allocs *cgoAllocMap + ref51343e7a.proofs_ptr, cproofs_ptr_allocs = unpackSFilPartitionProof(x.ProofsPtr) + allocs51343e7a.Borrow(cproofs_ptr_allocs) + + x.ref51343e7a = ref51343e7a + x.allocs51343e7a = allocs51343e7a + return ref51343e7a, allocs51343e7a } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyAggregateSealProofResponse) PassValue() (C.fil_VerifyAggregateSealProofResponse, *cgoAllocMap) { - if x.ref66180e0 != nil { - return *x.ref66180e0, nil +func (x FilPartitionProofResponse) PassValue() (C.fil_PartitionProofResponse, *cgoAllocMap) { + if x.ref51343e7a != nil { + return *x.ref51343e7a, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4481,13 +4710,14 @@ func (x FilVerifyAggregateSealProofResponse) PassValue() (C.fil_VerifyAggregateS // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyAggregateSealProofResponse) Deref() { - if x.ref66180e0 == nil { +func (x *FilPartitionProofResponse) Deref() { + if x.ref51343e7a == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref66180e0.status_code) - x.ErrorMsg = packPCharString(x.ref66180e0.error_msg) - x.IsValid = (bool)(x.ref66180e0.is_valid) + x.StatusCode = (FCPResponseStatus)(x.ref51343e7a.status_code) + x.ErrorMsg = packPCharString(x.ref51343e7a.error_msg) + x.ProofsLen = (uint)(x.ref51343e7a.proofs_len) + packSFilPartitionProof(x.ProofsPtr, x.ref51343e7a.proofs_ptr) } // allocFilVerifyPartitionProofResponseMemory allocates memory for type C.fil_VerifyPartitionProofResponse in C. @@ -4544,7 +4774,7 @@ func (x *FilVerifyPartitionProofResponse) PassRef() (*C.fil_VerifyPartitionProof allocsaed1b67.Add(memaed1b67) var cstatus_code_allocs *cgoAllocMap - refaed1b67.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + refaed1b67.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown allocsaed1b67.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap @@ -4581,81 +4811,181 @@ func (x *FilVerifyPartitionProofResponse) Deref() { x.IsValid = (bool)(x.refaed1b67.is_valid) } -// allocFilVerifySealResponseMemory allocates memory for type C.fil_VerifySealResponse in C. +// allocFilEmptySectorUpdateProofResponseMemory allocates memory for type C.fil_EmptySectorUpdateProofResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilVerifySealResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifySealResponseValue)) +func allocFilEmptySectorUpdateProofResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilEmptySectorUpdateProofResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilVerifySealResponseValue = unsafe.Sizeof([1]C.fil_VerifySealResponse{}) +const sizeOfFilEmptySectorUpdateProofResponseValue = unsafe.Sizeof([1]C.fil_EmptySectorUpdateProofResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifySealResponse) Ref() *C.fil_VerifySealResponse { +func (x *FilEmptySectorUpdateProofResponse) Ref() *C.fil_EmptySectorUpdateProofResponse { if x == nil { return nil } - return x.refd4397079 + return x.ref5c2faef } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVerifySealResponse) Free() { - if x != nil && x.allocsd4397079 != nil { - x.allocsd4397079.(*cgoAllocMap).Free() - x.refd4397079 = nil +func (x *FilEmptySectorUpdateProofResponse) Free() { + if x != nil && x.allocs5c2faef != nil { + x.allocs5c2faef.(*cgoAllocMap).Free() + x.ref5c2faef = nil } } -// NewFilVerifySealResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilEmptySectorUpdateProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVerifySealResponseRef(ref unsafe.Pointer) *FilVerifySealResponse { +func NewFilEmptySectorUpdateProofResponseRef(ref unsafe.Pointer) *FilEmptySectorUpdateProofResponse { if ref == nil { return nil } - obj := new(FilVerifySealResponse) - obj.refd4397079 = (*C.fil_VerifySealResponse)(unsafe.Pointer(ref)) + obj := new(FilEmptySectorUpdateProofResponse) + obj.ref5c2faef = (*C.fil_EmptySectorUpdateProofResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifySealResponse) PassRef() (*C.fil_VerifySealResponse, *cgoAllocMap) { +func (x *FilEmptySectorUpdateProofResponse) PassRef() (*C.fil_EmptySectorUpdateProofResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refd4397079 != nil { - return x.refd4397079, nil + } else if x.ref5c2faef != nil { + return x.ref5c2faef, nil } - memd4397079 := allocFilVerifySealResponseMemory(1) - refd4397079 := (*C.fil_VerifySealResponse)(memd4397079) - allocsd4397079 := new(cgoAllocMap) - allocsd4397079.Add(memd4397079) + mem5c2faef := allocFilEmptySectorUpdateProofResponseMemory(1) + ref5c2faef := (*C.fil_EmptySectorUpdateProofResponse)(mem5c2faef) + allocs5c2faef := new(cgoAllocMap) + allocs5c2faef.Add(mem5c2faef) var cstatus_code_allocs *cgoAllocMap - refd4397079.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsd4397079.Borrow(cstatus_code_allocs) + ref5c2faef.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs5c2faef.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - refd4397079.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsd4397079.Borrow(cerror_msg_allocs) + ref5c2faef.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs5c2faef.Borrow(cerror_msg_allocs) - var cis_valid_allocs *cgoAllocMap - refd4397079.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocsd4397079.Borrow(cis_valid_allocs) + var cproof_len_allocs *cgoAllocMap + ref5c2faef.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs5c2faef.Borrow(cproof_len_allocs) - x.refd4397079 = refd4397079 - x.allocsd4397079 = allocsd4397079 - return refd4397079, allocsd4397079 + var cproof_ptr_allocs *cgoAllocMap + ref5c2faef.proof_ptr, cproof_ptr_allocs = copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&x.ProofPtr))) + allocs5c2faef.Borrow(cproof_ptr_allocs) + + x.ref5c2faef = ref5c2faef + x.allocs5c2faef = allocs5c2faef + return ref5c2faef, allocs5c2faef } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifySealResponse) PassValue() (C.fil_VerifySealResponse, *cgoAllocMap) { - if x.refd4397079 != nil { - return *x.refd4397079, nil +func (x FilEmptySectorUpdateProofResponse) PassValue() (C.fil_EmptySectorUpdateProofResponse, *cgoAllocMap) { + if x.ref5c2faef != nil { + return *x.ref5c2faef, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilEmptySectorUpdateProofResponse) Deref() { + if x.ref5c2faef == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref5c2faef.status_code) + x.ErrorMsg = packPCharString(x.ref5c2faef.error_msg) + x.ProofLen = (uint)(x.ref5c2faef.proof_len) + hxff6bc57 := (*sliceHeader)(unsafe.Pointer(&x.ProofPtr)) + hxff6bc57.Data = unsafe.Pointer(x.ref5c2faef.proof_ptr) + hxff6bc57.Cap = 0x7fffffff + // hxff6bc57.Len = ? + +} + +// allocFilVerifyEmptySectorUpdateProofResponseMemory allocates memory for type C.fil_VerifyEmptySectorUpdateProofResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilVerifyEmptySectorUpdateProofResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyEmptySectorUpdateProofResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilVerifyEmptySectorUpdateProofResponseValue = unsafe.Sizeof([1]C.fil_VerifyEmptySectorUpdateProofResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilVerifyEmptySectorUpdateProofResponse) Ref() *C.fil_VerifyEmptySectorUpdateProofResponse { + if x == nil { + return nil + } + return x.ref50b7b13 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilVerifyEmptySectorUpdateProofResponse) Free() { + if x != nil && x.allocs50b7b13 != nil { + x.allocs50b7b13.(*cgoAllocMap).Free() + x.ref50b7b13 = nil + } +} + +// NewFilVerifyEmptySectorUpdateProofResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilVerifyEmptySectorUpdateProofResponseRef(ref unsafe.Pointer) *FilVerifyEmptySectorUpdateProofResponse { + if ref == nil { + return nil + } + obj := new(FilVerifyEmptySectorUpdateProofResponse) + obj.ref50b7b13 = (*C.fil_VerifyEmptySectorUpdateProofResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilVerifyEmptySectorUpdateProofResponse) PassRef() (*C.fil_VerifyEmptySectorUpdateProofResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref50b7b13 != nil { + return x.ref50b7b13, nil + } + mem50b7b13 := allocFilVerifyEmptySectorUpdateProofResponseMemory(1) + ref50b7b13 := (*C.fil_VerifyEmptySectorUpdateProofResponse)(mem50b7b13) + allocs50b7b13 := new(cgoAllocMap) + allocs50b7b13.Add(mem50b7b13) + + var cstatus_code_allocs *cgoAllocMap + ref50b7b13.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs50b7b13.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref50b7b13.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs50b7b13.Borrow(cerror_msg_allocs) + + var cis_valid_allocs *cgoAllocMap + ref50b7b13.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocs50b7b13.Borrow(cis_valid_allocs) + + x.ref50b7b13 = ref50b7b13 + x.allocs50b7b13 = allocs50b7b13 + return ref50b7b13, allocs50b7b13 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilVerifyEmptySectorUpdateProofResponse) PassValue() (C.fil_VerifyEmptySectorUpdateProofResponse, *cgoAllocMap) { + if x.ref50b7b13 != nil { + return *x.ref50b7b13, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4663,90 +4993,94 @@ func (x FilVerifySealResponse) PassValue() (C.fil_VerifySealResponse, *cgoAllocM // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifySealResponse) Deref() { - if x.refd4397079 == nil { +func (x *FilVerifyEmptySectorUpdateProofResponse) Deref() { + if x.ref50b7b13 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.refd4397079.status_code) - x.ErrorMsg = packPCharString(x.refd4397079.error_msg) - x.IsValid = (bool)(x.refd4397079.is_valid) + x.StatusCode = (FCPResponseStatus)(x.ref50b7b13.status_code) + x.ErrorMsg = packPCharString(x.ref50b7b13.error_msg) + x.IsValid = (bool)(x.ref50b7b13.is_valid) } -// allocFilVerifyWindowPoStResponseMemory allocates memory for type C.fil_VerifyWindowPoStResponse in C. +// allocFilGeneratePieceCommitmentResponseMemory allocates memory for type C.fil_GeneratePieceCommitmentResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyWindowPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWindowPoStResponseValue)) +func allocFilGeneratePieceCommitmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGeneratePieceCommitmentResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilVerifyWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWindowPoStResponse{}) +const sizeOfFilGeneratePieceCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GeneratePieceCommitmentResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyWindowPoStResponse) Ref() *C.fil_VerifyWindowPoStResponse { +func (x *FilGeneratePieceCommitmentResponse) Ref() *C.fil_GeneratePieceCommitmentResponse { if x == nil { return nil } - return x.ref34c4d49f + return x.ref4b00fda4 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyWindowPoStResponse) Free() { - if x != nil && x.allocs34c4d49f != nil { - x.allocs34c4d49f.(*cgoAllocMap).Free() - x.ref34c4d49f = nil +func (x *FilGeneratePieceCommitmentResponse) Free() { + if x != nil && x.allocs4b00fda4 != nil { + x.allocs4b00fda4.(*cgoAllocMap).Free() + x.ref4b00fda4 = nil } } -// NewFilVerifyWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGeneratePieceCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyWindowPoStResponseRef(ref unsafe.Pointer) *FilVerifyWindowPoStResponse { +func NewFilGeneratePieceCommitmentResponseRef(ref unsafe.Pointer) *FilGeneratePieceCommitmentResponse { if ref == nil { return nil } - obj := new(FilVerifyWindowPoStResponse) - obj.ref34c4d49f = (*C.fil_VerifyWindowPoStResponse)(unsafe.Pointer(ref)) + obj := new(FilGeneratePieceCommitmentResponse) + obj.ref4b00fda4 = (*C.fil_GeneratePieceCommitmentResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyWindowPoStResponse) PassRef() (*C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { +func (x *FilGeneratePieceCommitmentResponse) PassRef() (*C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref34c4d49f != nil { - return x.ref34c4d49f, nil + } else if x.ref4b00fda4 != nil { + return x.ref4b00fda4, nil } - mem34c4d49f := allocFilVerifyWindowPoStResponseMemory(1) - ref34c4d49f := (*C.fil_VerifyWindowPoStResponse)(mem34c4d49f) - allocs34c4d49f := new(cgoAllocMap) - allocs34c4d49f.Add(mem34c4d49f) + mem4b00fda4 := allocFilGeneratePieceCommitmentResponseMemory(1) + ref4b00fda4 := (*C.fil_GeneratePieceCommitmentResponse)(mem4b00fda4) + allocs4b00fda4 := new(cgoAllocMap) + allocs4b00fda4.Add(mem4b00fda4) var cstatus_code_allocs *cgoAllocMap - ref34c4d49f.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs34c4d49f.Borrow(cstatus_code_allocs) + ref4b00fda4.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs4b00fda4.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - ref34c4d49f.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs34c4d49f.Borrow(cerror_msg_allocs) + ref4b00fda4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs4b00fda4.Borrow(cerror_msg_allocs) - var cis_valid_allocs *cgoAllocMap - ref34c4d49f.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocs34c4d49f.Borrow(cis_valid_allocs) + var ccomm_p_allocs *cgoAllocMap + ref4b00fda4.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocs4b00fda4.Borrow(ccomm_p_allocs) - x.ref34c4d49f = ref34c4d49f - x.allocs34c4d49f = allocs34c4d49f - return ref34c4d49f, allocs34c4d49f + var cnum_bytes_aligned_allocs *cgoAllocMap + ref4b00fda4.num_bytes_aligned, cnum_bytes_aligned_allocs = (C.uint64_t)(x.NumBytesAligned), cgoAllocsUnknown + allocs4b00fda4.Borrow(cnum_bytes_aligned_allocs) + + x.ref4b00fda4 = ref4b00fda4 + x.allocs4b00fda4 = allocs4b00fda4 + return ref4b00fda4, allocs4b00fda4 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyWindowPoStResponse) PassValue() (C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { - if x.ref34c4d49f != nil { - return *x.ref34c4d49f, nil +func (x FilGeneratePieceCommitmentResponse) PassValue() (C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { + if x.ref4b00fda4 != nil { + return *x.ref4b00fda4, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4754,90 +5088,91 @@ func (x FilVerifyWindowPoStResponse) PassValue() (C.fil_VerifyWindowPoStResponse // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyWindowPoStResponse) Deref() { - if x.ref34c4d49f == nil { +func (x *FilGeneratePieceCommitmentResponse) Deref() { + if x.ref4b00fda4 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.ref34c4d49f.status_code) - x.ErrorMsg = packPCharString(x.ref34c4d49f.error_msg) - x.IsValid = (bool)(x.ref34c4d49f.is_valid) + x.StatusCode = (FCPResponseStatus)(x.ref4b00fda4.status_code) + x.ErrorMsg = packPCharString(x.ref4b00fda4.error_msg) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.ref4b00fda4.comm_p)) + x.NumBytesAligned = (uint64)(x.ref4b00fda4.num_bytes_aligned) } -// allocFilVerifyWinningPoStResponseMemory allocates memory for type C.fil_VerifyWinningPoStResponse in C. +// allocFilGenerateDataCommitmentResponseMemory allocates memory for type C.fil_GenerateDataCommitmentResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyWinningPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWinningPoStResponseValue)) +func allocFilGenerateDataCommitmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateDataCommitmentResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilVerifyWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWinningPoStResponse{}) +const sizeOfFilGenerateDataCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GenerateDataCommitmentResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyWinningPoStResponse) Ref() *C.fil_VerifyWinningPoStResponse { +func (x *FilGenerateDataCommitmentResponse) Ref() *C.fil_GenerateDataCommitmentResponse { if x == nil { return nil } - return x.refaca6860c + return x.ref87da7dd9 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyWinningPoStResponse) Free() { - if x != nil && x.allocsaca6860c != nil { - x.allocsaca6860c.(*cgoAllocMap).Free() - x.refaca6860c = nil +func (x *FilGenerateDataCommitmentResponse) Free() { + if x != nil && x.allocs87da7dd9 != nil { + x.allocs87da7dd9.(*cgoAllocMap).Free() + x.ref87da7dd9 = nil } } -// NewFilVerifyWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGenerateDataCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyWinningPoStResponseRef(ref unsafe.Pointer) *FilVerifyWinningPoStResponse { +func NewFilGenerateDataCommitmentResponseRef(ref unsafe.Pointer) *FilGenerateDataCommitmentResponse { if ref == nil { return nil } - obj := new(FilVerifyWinningPoStResponse) - obj.refaca6860c = (*C.fil_VerifyWinningPoStResponse)(unsafe.Pointer(ref)) + obj := new(FilGenerateDataCommitmentResponse) + obj.ref87da7dd9 = (*C.fil_GenerateDataCommitmentResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyWinningPoStResponse) PassRef() (*C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { +func (x *FilGenerateDataCommitmentResponse) PassRef() (*C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refaca6860c != nil { - return x.refaca6860c, nil + } else if x.ref87da7dd9 != nil { + return x.ref87da7dd9, nil } - memaca6860c := allocFilVerifyWinningPoStResponseMemory(1) - refaca6860c := (*C.fil_VerifyWinningPoStResponse)(memaca6860c) - allocsaca6860c := new(cgoAllocMap) - allocsaca6860c.Add(memaca6860c) + mem87da7dd9 := allocFilGenerateDataCommitmentResponseMemory(1) + ref87da7dd9 := (*C.fil_GenerateDataCommitmentResponse)(mem87da7dd9) + allocs87da7dd9 := new(cgoAllocMap) + allocs87da7dd9.Add(mem87da7dd9) var cstatus_code_allocs *cgoAllocMap - refaca6860c.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsaca6860c.Borrow(cstatus_code_allocs) + ref87da7dd9.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs87da7dd9.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - refaca6860c.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsaca6860c.Borrow(cerror_msg_allocs) + ref87da7dd9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs87da7dd9.Borrow(cerror_msg_allocs) - var cis_valid_allocs *cgoAllocMap - refaca6860c.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocsaca6860c.Borrow(cis_valid_allocs) + var ccomm_d_allocs *cgoAllocMap + ref87da7dd9.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown + allocs87da7dd9.Borrow(ccomm_d_allocs) - x.refaca6860c = refaca6860c - x.allocsaca6860c = allocsaca6860c - return refaca6860c, allocsaca6860c + x.ref87da7dd9 = ref87da7dd9 + x.allocs87da7dd9 = allocs87da7dd9 + return ref87da7dd9, allocs87da7dd9 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyWinningPoStResponse) PassValue() (C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { - if x.refaca6860c != nil { - return *x.refaca6860c, nil +func (x FilGenerateDataCommitmentResponse) PassValue() (C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { + if x.ref87da7dd9 != nil { + return *x.ref87da7dd9, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4845,98 +5180,86 @@ func (x FilVerifyWinningPoStResponse) PassValue() (C.fil_VerifyWinningPoStRespon // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyWinningPoStResponse) Deref() { - if x.refaca6860c == nil { +func (x *FilGenerateDataCommitmentResponse) Deref() { + if x.ref87da7dd9 == nil { return } - x.StatusCode = (FCPResponseStatus)(x.refaca6860c.status_code) - x.ErrorMsg = packPCharString(x.refaca6860c.error_msg) - x.IsValid = (bool)(x.refaca6860c.is_valid) + x.StatusCode = (FCPResponseStatus)(x.ref87da7dd9.status_code) + x.ErrorMsg = packPCharString(x.ref87da7dd9.error_msg) + x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref87da7dd9.comm_d)) } -// allocFilWriteWithAlignmentResponseMemory allocates memory for type C.fil_WriteWithAlignmentResponse in C. +// allocFilClearCacheResponseMemory allocates memory for type C.fil_ClearCacheResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilWriteWithAlignmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithAlignmentResponseValue)) +func allocFilClearCacheResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilClearCacheResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilWriteWithAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithAlignmentResponse{}) +const sizeOfFilClearCacheResponseValue = unsafe.Sizeof([1]C.fil_ClearCacheResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilWriteWithAlignmentResponse) Ref() *C.fil_WriteWithAlignmentResponse { +func (x *FilClearCacheResponse) Ref() *C.fil_ClearCacheResponse { if x == nil { return nil } - return x.refa330e79 + return x.refa9a80400 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilWriteWithAlignmentResponse) Free() { - if x != nil && x.allocsa330e79 != nil { - x.allocsa330e79.(*cgoAllocMap).Free() - x.refa330e79 = nil +func (x *FilClearCacheResponse) Free() { + if x != nil && x.allocsa9a80400 != nil { + x.allocsa9a80400.(*cgoAllocMap).Free() + x.refa9a80400 = nil } } -// NewFilWriteWithAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilClearCacheResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilWriteWithAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithAlignmentResponse { +func NewFilClearCacheResponseRef(ref unsafe.Pointer) *FilClearCacheResponse { if ref == nil { return nil } - obj := new(FilWriteWithAlignmentResponse) - obj.refa330e79 = (*C.fil_WriteWithAlignmentResponse)(unsafe.Pointer(ref)) + obj := new(FilClearCacheResponse) + obj.refa9a80400 = (*C.fil_ClearCacheResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilWriteWithAlignmentResponse) PassRef() (*C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { +func (x *FilClearCacheResponse) PassRef() (*C.fil_ClearCacheResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refa330e79 != nil { - return x.refa330e79, nil + } else if x.refa9a80400 != nil { + return x.refa9a80400, nil } - mema330e79 := allocFilWriteWithAlignmentResponseMemory(1) - refa330e79 := (*C.fil_WriteWithAlignmentResponse)(mema330e79) - allocsa330e79 := new(cgoAllocMap) - allocsa330e79.Add(mema330e79) - - var ccomm_p_allocs *cgoAllocMap - refa330e79.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsa330e79.Borrow(ccomm_p_allocs) + mema9a80400 := allocFilClearCacheResponseMemory(1) + refa9a80400 := (*C.fil_ClearCacheResponse)(mema9a80400) + allocsa9a80400 := new(cgoAllocMap) + allocsa9a80400.Add(mema9a80400) var cerror_msg_allocs *cgoAllocMap - refa330e79.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsa330e79.Borrow(cerror_msg_allocs) - - var cleft_alignment_unpadded_allocs *cgoAllocMap - refa330e79.left_alignment_unpadded, cleft_alignment_unpadded_allocs = (C.uint64_t)(x.LeftAlignmentUnpadded), cgoAllocsUnknown - allocsa330e79.Borrow(cleft_alignment_unpadded_allocs) + refa9a80400.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsa9a80400.Borrow(cerror_msg_allocs) var cstatus_code_allocs *cgoAllocMap - refa330e79.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsa330e79.Borrow(cstatus_code_allocs) - - var ctotal_write_unpadded_allocs *cgoAllocMap - refa330e79.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown - allocsa330e79.Borrow(ctotal_write_unpadded_allocs) + refa9a80400.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsa9a80400.Borrow(cstatus_code_allocs) - x.refa330e79 = refa330e79 - x.allocsa330e79 = allocsa330e79 - return refa330e79, allocsa330e79 + x.refa9a80400 = refa9a80400 + x.allocsa9a80400 = allocsa9a80400 + return refa9a80400, allocsa9a80400 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilWriteWithAlignmentResponse) PassValue() (C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { - if x.refa330e79 != nil { - return *x.refa330e79, nil +func (x FilClearCacheResponse) PassValue() (C.fil_ClearCacheResponse, *cgoAllocMap) { + if x.refa9a80400 != nil { + return *x.refa9a80400, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -4944,96 +5267,89 @@ func (x FilWriteWithAlignmentResponse) PassValue() (C.fil_WriteWithAlignmentResp // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilWriteWithAlignmentResponse) Deref() { - if x.refa330e79 == nil { +func (x *FilClearCacheResponse) Deref() { + if x.refa9a80400 == nil { return } - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refa330e79.comm_p)) - x.ErrorMsg = packPCharString(x.refa330e79.error_msg) - x.LeftAlignmentUnpadded = (uint64)(x.refa330e79.left_alignment_unpadded) - x.StatusCode = (FCPResponseStatus)(x.refa330e79.status_code) - x.TotalWriteUnpadded = (uint64)(x.refa330e79.total_write_unpadded) + x.ErrorMsg = packPCharString(x.refa9a80400.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refa9a80400.status_code) } -// allocFilWriteWithoutAlignmentResponseMemory allocates memory for type C.fil_WriteWithoutAlignmentResponse in C. +// allocFilStringResponseMemory allocates memory for type C.fil_StringResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilWriteWithoutAlignmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithoutAlignmentResponseValue)) +func allocFilStringResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilStringResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilWriteWithoutAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithoutAlignmentResponse{}) +const sizeOfFilStringResponseValue = unsafe.Sizeof([1]C.fil_StringResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilWriteWithoutAlignmentResponse) Ref() *C.fil_WriteWithoutAlignmentResponse { +func (x *FilStringResponse) Ref() *C.fil_StringResponse { if x == nil { return nil } - return x.refc8e1ed8 + return x.ref4f413043 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilWriteWithoutAlignmentResponse) Free() { - if x != nil && x.allocsc8e1ed8 != nil { - x.allocsc8e1ed8.(*cgoAllocMap).Free() - x.refc8e1ed8 = nil +func (x *FilStringResponse) Free() { + if x != nil && x.allocs4f413043 != nil { + x.allocs4f413043.(*cgoAllocMap).Free() + x.ref4f413043 = nil } } -// NewFilWriteWithoutAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilStringResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilWriteWithoutAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithoutAlignmentResponse { +func NewFilStringResponseRef(ref unsafe.Pointer) *FilStringResponse { if ref == nil { return nil } - obj := new(FilWriteWithoutAlignmentResponse) - obj.refc8e1ed8 = (*C.fil_WriteWithoutAlignmentResponse)(unsafe.Pointer(ref)) + obj := new(FilStringResponse) + obj.ref4f413043 = (*C.fil_StringResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilWriteWithoutAlignmentResponse) PassRef() (*C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { +func (x *FilStringResponse) PassRef() (*C.fil_StringResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refc8e1ed8 != nil { - return x.refc8e1ed8, nil + } else if x.ref4f413043 != nil { + return x.ref4f413043, nil } - memc8e1ed8 := allocFilWriteWithoutAlignmentResponseMemory(1) - refc8e1ed8 := (*C.fil_WriteWithoutAlignmentResponse)(memc8e1ed8) - allocsc8e1ed8 := new(cgoAllocMap) - allocsc8e1ed8.Add(memc8e1ed8) + mem4f413043 := allocFilStringResponseMemory(1) + ref4f413043 := (*C.fil_StringResponse)(mem4f413043) + allocs4f413043 := new(cgoAllocMap) + allocs4f413043.Add(mem4f413043) - var ccomm_p_allocs *cgoAllocMap - refc8e1ed8.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsc8e1ed8.Borrow(ccomm_p_allocs) + var cstatus_code_allocs *cgoAllocMap + ref4f413043.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs4f413043.Borrow(cstatus_code_allocs) var cerror_msg_allocs *cgoAllocMap - refc8e1ed8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsc8e1ed8.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - refc8e1ed8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsc8e1ed8.Borrow(cstatus_code_allocs) + ref4f413043.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs4f413043.Borrow(cerror_msg_allocs) - var ctotal_write_unpadded_allocs *cgoAllocMap - refc8e1ed8.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown - allocsc8e1ed8.Borrow(ctotal_write_unpadded_allocs) + var cstring_val_allocs *cgoAllocMap + ref4f413043.string_val, cstring_val_allocs = unpackPCharString(x.StringVal) + allocs4f413043.Borrow(cstring_val_allocs) - x.refc8e1ed8 = refc8e1ed8 - x.allocsc8e1ed8 = allocsc8e1ed8 - return refc8e1ed8, allocsc8e1ed8 + x.ref4f413043 = ref4f413043 + x.allocs4f413043 = allocs4f413043 + return ref4f413043, allocs4f413043 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilWriteWithoutAlignmentResponse) PassValue() (C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { - if x.refc8e1ed8 != nil { - return *x.refc8e1ed8, nil +func (x FilStringResponse) PassValue() (C.fil_StringResponse, *cgoAllocMap) { + if x.ref4f413043 != nil { + return *x.ref4f413043, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -5041,87 +5357,90 @@ func (x FilWriteWithoutAlignmentResponse) PassValue() (C.fil_WriteWithoutAlignme // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilWriteWithoutAlignmentResponse) Deref() { - if x.refc8e1ed8 == nil { +func (x *FilStringResponse) Deref() { + if x.ref4f413043 == nil { return } - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refc8e1ed8.comm_p)) - x.ErrorMsg = packPCharString(x.refc8e1ed8.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refc8e1ed8.status_code) - x.TotalWriteUnpadded = (uint64)(x.refc8e1ed8.total_write_unpadded) + x.StatusCode = (FCPResponseStatus)(x.ref4f413043.status_code) + x.ErrorMsg = packPCharString(x.ref4f413043.error_msg) + x.StringVal = packPCharString(x.ref4f413043.string_val) } -// allocFilPublicPieceInfoMemory allocates memory for type C.fil_PublicPieceInfo in C. +// allocFilFinalizeTicketResponseMemory allocates memory for type C.fil_FinalizeTicketResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPublicPieceInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicPieceInfoValue)) +func allocFilFinalizeTicketResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFinalizeTicketResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPublicPieceInfoValue = unsafe.Sizeof([1]C.fil_PublicPieceInfo{}) +const sizeOfFilFinalizeTicketResponseValue = unsafe.Sizeof([1]C.fil_FinalizeTicketResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPublicPieceInfo) Ref() *C.fil_PublicPieceInfo { +func (x *FilFinalizeTicketResponse) Ref() *C.fil_FinalizeTicketResponse { if x == nil { return nil } - return x.refd00025ac + return x.refb370fa86 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPublicPieceInfo) Free() { - if x != nil && x.allocsd00025ac != nil { - x.allocsd00025ac.(*cgoAllocMap).Free() - x.refd00025ac = nil +func (x *FilFinalizeTicketResponse) Free() { + if x != nil && x.allocsb370fa86 != nil { + x.allocsb370fa86.(*cgoAllocMap).Free() + x.refb370fa86 = nil } } -// NewFilPublicPieceInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilFinalizeTicketResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPublicPieceInfoRef(ref unsafe.Pointer) *FilPublicPieceInfo { +func NewFilFinalizeTicketResponseRef(ref unsafe.Pointer) *FilFinalizeTicketResponse { if ref == nil { return nil } - obj := new(FilPublicPieceInfo) - obj.refd00025ac = (*C.fil_PublicPieceInfo)(unsafe.Pointer(ref)) + obj := new(FilFinalizeTicketResponse) + obj.refb370fa86 = (*C.fil_FinalizeTicketResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPublicPieceInfo) PassRef() (*C.fil_PublicPieceInfo, *cgoAllocMap) { +func (x *FilFinalizeTicketResponse) PassRef() (*C.fil_FinalizeTicketResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.refd00025ac != nil { - return x.refd00025ac, nil + } else if x.refb370fa86 != nil { + return x.refb370fa86, nil } - memd00025ac := allocFilPublicPieceInfoMemory(1) - refd00025ac := (*C.fil_PublicPieceInfo)(memd00025ac) - allocsd00025ac := new(cgoAllocMap) - allocsd00025ac.Add(memd00025ac) + memb370fa86 := allocFilFinalizeTicketResponseMemory(1) + refb370fa86 := (*C.fil_FinalizeTicketResponse)(memb370fa86) + allocsb370fa86 := new(cgoAllocMap) + allocsb370fa86.Add(memb370fa86) - var cnum_bytes_allocs *cgoAllocMap - refd00025ac.num_bytes, cnum_bytes_allocs = (C.uint64_t)(x.NumBytes), cgoAllocsUnknown - allocsd00025ac.Borrow(cnum_bytes_allocs) + var cstatus_code_allocs *cgoAllocMap + refb370fa86.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsb370fa86.Borrow(cstatus_code_allocs) - var ccomm_p_allocs *cgoAllocMap - refd00025ac.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsd00025ac.Borrow(ccomm_p_allocs) + var cerror_msg_allocs *cgoAllocMap + refb370fa86.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsb370fa86.Borrow(cerror_msg_allocs) - x.refd00025ac = refd00025ac - x.allocsd00025ac = allocsd00025ac - return refd00025ac, allocsd00025ac + var cticket_allocs *cgoAllocMap + refb370fa86.ticket, cticket_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Ticket)), cgoAllocsUnknown + allocsb370fa86.Borrow(cticket_allocs) + + x.refb370fa86 = refb370fa86 + x.allocsb370fa86 = allocsb370fa86 + return refb370fa86, allocsb370fa86 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPublicPieceInfo) PassValue() (C.fil_PublicPieceInfo, *cgoAllocMap) { - if x.refd00025ac != nil { - return *x.refd00025ac, nil +func (x FilFinalizeTicketResponse) PassValue() (C.fil_FinalizeTicketResponse, *cgoAllocMap) { + if x.refb370fa86 != nil { + return *x.refb370fa86, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -5129,97 +5448,142 @@ func (x FilPublicPieceInfo) PassValue() (C.fil_PublicPieceInfo, *cgoAllocMap) { // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPublicPieceInfo) Deref() { - if x.refd00025ac == nil { +func (x *FilFinalizeTicketResponse) Deref() { + if x.refb370fa86 == nil { return } - x.NumBytes = (uint64)(x.refd00025ac.num_bytes) - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refd00025ac.comm_p)) + x.StatusCode = (FCPResponseStatus)(x.refb370fa86.status_code) + x.ErrorMsg = packPCharString(x.refb370fa86.error_msg) + x.Ticket = *(*[32]byte)(unsafe.Pointer(&x.refb370fa86.ticket)) } -// allocFilPrivateReplicaInfoMemory allocates memory for type C.fil_PrivateReplicaInfo in C. +// allocFilGpuDeviceResponseMemory allocates memory for type C.fil_GpuDeviceResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateReplicaInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateReplicaInfoValue)) +func allocFilGpuDeviceResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGpuDeviceResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPrivateReplicaInfoValue = unsafe.Sizeof([1]C.fil_PrivateReplicaInfo{}) +const sizeOfFilGpuDeviceResponseValue = unsafe.Sizeof([1]C.fil_GpuDeviceResponse{}) + +// allocPCharMemory allocates memory for type *C.char in C. +// The caller is responsible for freeing the this memory via C.free. +func allocPCharMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfPCharValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfPCharValue = unsafe.Sizeof([1]*C.char{}) + +// unpackSString transforms a sliced Go data structure into plain C format. +func unpackSString(x []string) (unpacked **C.char, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocPCharMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]*C.char)(unsafe.Pointer(h0)) + for i0 := range x { + v0[i0], _ = unpackPCharString(x[i0]) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (**C.char)(h.Data) + return +} + +// packSString reads sliced Go data structure out from plain C format. +func packSString(v []string, ptr0 **C.char) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfPtr]*C.char)(unsafe.Pointer(ptr0)))[i0] + v[i0] = packPCharString(ptr1) + } +} // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateReplicaInfo) Ref() *C.fil_PrivateReplicaInfo { +func (x *FilGpuDeviceResponse) Ref() *C.fil_GpuDeviceResponse { if x == nil { return nil } - return x.ref81a31e9b + return x.ref58f92915 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateReplicaInfo) Free() { - if x != nil && x.allocs81a31e9b != nil { - x.allocs81a31e9b.(*cgoAllocMap).Free() - x.ref81a31e9b = nil +func (x *FilGpuDeviceResponse) Free() { + if x != nil && x.allocs58f92915 != nil { + x.allocs58f92915.(*cgoAllocMap).Free() + x.ref58f92915 = nil } } -// NewFilPrivateReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilGpuDeviceResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateReplicaInfoRef(ref unsafe.Pointer) *FilPrivateReplicaInfo { +func NewFilGpuDeviceResponseRef(ref unsafe.Pointer) *FilGpuDeviceResponse { if ref == nil { return nil } - obj := new(FilPrivateReplicaInfo) - obj.ref81a31e9b = (*C.fil_PrivateReplicaInfo)(unsafe.Pointer(ref)) + obj := new(FilGpuDeviceResponse) + obj.ref58f92915 = (*C.fil_GpuDeviceResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateReplicaInfo) PassRef() (*C.fil_PrivateReplicaInfo, *cgoAllocMap) { +func (x *FilGpuDeviceResponse) PassRef() (*C.fil_GpuDeviceResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref81a31e9b != nil { - return x.ref81a31e9b, nil + } else if x.ref58f92915 != nil { + return x.ref58f92915, nil } - mem81a31e9b := allocFilPrivateReplicaInfoMemory(1) - ref81a31e9b := (*C.fil_PrivateReplicaInfo)(mem81a31e9b) - allocs81a31e9b := new(cgoAllocMap) - allocs81a31e9b.Add(mem81a31e9b) - - var cregistered_proof_allocs *cgoAllocMap - ref81a31e9b.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs81a31e9b.Borrow(cregistered_proof_allocs) + mem58f92915 := allocFilGpuDeviceResponseMemory(1) + ref58f92915 := (*C.fil_GpuDeviceResponse)(mem58f92915) + allocs58f92915 := new(cgoAllocMap) + allocs58f92915.Add(mem58f92915) - var ccache_dir_path_allocs *cgoAllocMap - ref81a31e9b.cache_dir_path, ccache_dir_path_allocs = unpackPCharString(x.CacheDirPath) - allocs81a31e9b.Borrow(ccache_dir_path_allocs) + var cstatus_code_allocs *cgoAllocMap + ref58f92915.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs58f92915.Borrow(cstatus_code_allocs) - var ccomm_r_allocs *cgoAllocMap - ref81a31e9b.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs81a31e9b.Borrow(ccomm_r_allocs) + var cerror_msg_allocs *cgoAllocMap + ref58f92915.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs58f92915.Borrow(cerror_msg_allocs) - var creplica_path_allocs *cgoAllocMap - ref81a31e9b.replica_path, creplica_path_allocs = unpackPCharString(x.ReplicaPath) - allocs81a31e9b.Borrow(creplica_path_allocs) + var cdevices_len_allocs *cgoAllocMap + ref58f92915.devices_len, cdevices_len_allocs = (C.size_t)(x.DevicesLen), cgoAllocsUnknown + allocs58f92915.Borrow(cdevices_len_allocs) - var csector_id_allocs *cgoAllocMap - ref81a31e9b.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown - allocs81a31e9b.Borrow(csector_id_allocs) + var cdevices_ptr_allocs *cgoAllocMap + ref58f92915.devices_ptr, cdevices_ptr_allocs = unpackSString(x.DevicesPtr) + allocs58f92915.Borrow(cdevices_ptr_allocs) - x.ref81a31e9b = ref81a31e9b - x.allocs81a31e9b = allocs81a31e9b - return ref81a31e9b, allocs81a31e9b + x.ref58f92915 = ref58f92915 + x.allocs58f92915 = allocs58f92915 + return ref58f92915, allocs58f92915 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateReplicaInfo) PassValue() (C.fil_PrivateReplicaInfo, *cgoAllocMap) { - if x.ref81a31e9b != nil { - return *x.ref81a31e9b, nil +func (x FilGpuDeviceResponse) PassValue() (C.fil_GpuDeviceResponse, *cgoAllocMap) { + if x.ref58f92915 != nil { + return *x.ref58f92915, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -5227,92 +5591,87 @@ func (x FilPrivateReplicaInfo) PassValue() (C.fil_PrivateReplicaInfo, *cgoAllocM // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateReplicaInfo) Deref() { - if x.ref81a31e9b == nil { +func (x *FilGpuDeviceResponse) Deref() { + if x.ref58f92915 == nil { return } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81a31e9b.registered_proof) - x.CacheDirPath = packPCharString(x.ref81a31e9b.cache_dir_path) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81a31e9b.comm_r)) - x.ReplicaPath = packPCharString(x.ref81a31e9b.replica_path) - x.SectorId = (uint64)(x.ref81a31e9b.sector_id) + x.StatusCode = (FCPResponseStatus)(x.ref58f92915.status_code) + x.ErrorMsg = packPCharString(x.ref58f92915.error_msg) + x.DevicesLen = (uint)(x.ref58f92915.devices_len) + packSString(x.DevicesPtr, x.ref58f92915.devices_ptr) } -// allocFilPublicReplicaInfoMemory allocates memory for type C.fil_PublicReplicaInfo in C. +// allocFilInitLogFdResponseMemory allocates memory for type C.fil_InitLogFdResponse in C. // The caller is responsible for freeing the this memory via C.free. -func allocFilPublicReplicaInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicReplicaInfoValue)) +func allocFilInitLogFdResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilInitLogFdResponseValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfFilPublicReplicaInfoValue = unsafe.Sizeof([1]C.fil_PublicReplicaInfo{}) +const sizeOfFilInitLogFdResponseValue = unsafe.Sizeof([1]C.fil_InitLogFdResponse{}) // Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPublicReplicaInfo) Ref() *C.fil_PublicReplicaInfo { +func (x *FilInitLogFdResponse) Ref() *C.fil_InitLogFdResponse { if x == nil { return nil } - return x.ref81b617c2 + return x.ref3c1a0a08 } // Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. // Does nothing if struct is nil or has no allocation map. -func (x *FilPublicReplicaInfo) Free() { - if x != nil && x.allocs81b617c2 != nil { - x.allocs81b617c2.(*cgoAllocMap).Free() - x.ref81b617c2 = nil +func (x *FilInitLogFdResponse) Free() { + if x != nil && x.allocs3c1a0a08 != nil { + x.allocs3c1a0a08.(*cgoAllocMap).Free() + x.ref3c1a0a08 = nil } } -// NewFilPublicReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// NewFilInitLogFdResponseRef creates a new wrapper struct with underlying reference set to the original C object. // Returns nil if the provided pointer to C object is nil too. -func NewFilPublicReplicaInfoRef(ref unsafe.Pointer) *FilPublicReplicaInfo { +func NewFilInitLogFdResponseRef(ref unsafe.Pointer) *FilInitLogFdResponse { if ref == nil { return nil } - obj := new(FilPublicReplicaInfo) - obj.ref81b617c2 = (*C.fil_PublicReplicaInfo)(unsafe.Pointer(ref)) + obj := new(FilInitLogFdResponse) + obj.ref3c1a0a08 = (*C.fil_InitLogFdResponse)(unsafe.Pointer(ref)) return obj } // PassRef returns the underlying C object, otherwise it will allocate one and set its values // from this wrapping struct, counting allocations into an allocation map. -func (x *FilPublicReplicaInfo) PassRef() (*C.fil_PublicReplicaInfo, *cgoAllocMap) { +func (x *FilInitLogFdResponse) PassRef() (*C.fil_InitLogFdResponse, *cgoAllocMap) { if x == nil { return nil, nil - } else if x.ref81b617c2 != nil { - return x.ref81b617c2, nil + } else if x.ref3c1a0a08 != nil { + return x.ref3c1a0a08, nil } - mem81b617c2 := allocFilPublicReplicaInfoMemory(1) - ref81b617c2 := (*C.fil_PublicReplicaInfo)(mem81b617c2) - allocs81b617c2 := new(cgoAllocMap) - allocs81b617c2.Add(mem81b617c2) - - var cregistered_proof_allocs *cgoAllocMap - ref81b617c2.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs81b617c2.Borrow(cregistered_proof_allocs) + mem3c1a0a08 := allocFilInitLogFdResponseMemory(1) + ref3c1a0a08 := (*C.fil_InitLogFdResponse)(mem3c1a0a08) + allocs3c1a0a08 := new(cgoAllocMap) + allocs3c1a0a08.Add(mem3c1a0a08) - var ccomm_r_allocs *cgoAllocMap - ref81b617c2.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs81b617c2.Borrow(ccomm_r_allocs) + var cstatus_code_allocs *cgoAllocMap + ref3c1a0a08.status_code, cstatus_code_allocs = (C.enum_FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs3c1a0a08.Borrow(cstatus_code_allocs) - var csector_id_allocs *cgoAllocMap - ref81b617c2.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown - allocs81b617c2.Borrow(csector_id_allocs) + var cerror_msg_allocs *cgoAllocMap + ref3c1a0a08.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs3c1a0a08.Borrow(cerror_msg_allocs) - x.ref81b617c2 = ref81b617c2 - x.allocs81b617c2 = allocs81b617c2 - return ref81b617c2, allocs81b617c2 + x.ref3c1a0a08 = ref3c1a0a08 + x.allocs3c1a0a08 = allocs3c1a0a08 + return ref3c1a0a08, allocs3c1a0a08 } // PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPublicReplicaInfo) PassValue() (C.fil_PublicReplicaInfo, *cgoAllocMap) { - if x.ref81b617c2 != nil { - return *x.ref81b617c2, nil +func (x FilInitLogFdResponse) PassValue() (C.fil_InitLogFdResponse, *cgoAllocMap) { + if x.ref3c1a0a08 != nil { + return *x.ref3c1a0a08, nil } ref, allocs := x.PassRef() return *ref, allocs @@ -5320,17 +5679,57 @@ func (x FilPublicReplicaInfo) PassValue() (C.fil_PublicReplicaInfo, *cgoAllocMap // Deref uses the underlying reference to C object and fills the wrapping struct with values. // Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPublicReplicaInfo) Deref() { - if x.ref81b617c2 == nil { +func (x *FilInitLogFdResponse) Deref() { + if x.ref3c1a0a08 == nil { return } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81b617c2.registered_proof) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81b617c2.comm_r)) - x.SectorId = (uint64)(x.ref81b617c2.sector_id) + x.StatusCode = (FCPResponseStatus)(x.ref3c1a0a08.status_code) + x.ErrorMsg = packPCharString(x.ref3c1a0a08.error_msg) } -// unpackArgSFil32ByteArray transforms a sliced Go data structure into plain C format. -func unpackArgSFil32ByteArray(x []Fil32ByteArray) (unpacked *C.fil_32ByteArray, allocs *cgoAllocMap) { +// copyPSizeTBytes copies the data from Go slice as *C.size_t. +func copyPSizeTBytes(slice *sliceHeader) (*C.size_t, *cgoAllocMap) { + allocs := new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ + Data: slice.Data, + Len: int(sizeOfSizeTValue) * slice.Len, + Cap: int(sizeOfSizeTValue) * slice.Len, + })))) + allocs.Add(mem0) + + return (*C.size_t)(mem0), allocs +} + +// allocSizeTMemory allocates memory for type C.size_t in C. +// The caller is responsible for freeing the this memory via C.free. +func allocSizeTMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfSizeTValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfSizeTValue = unsafe.Sizeof([1]C.size_t{}) + +// allocStructFilPublicPieceInfoMemory allocates memory for type C.struct_fil_PublicPieceInfo in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilPublicPieceInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPublicPieceInfoValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilPublicPieceInfoValue = unsafe.Sizeof([1]C.struct_fil_PublicPieceInfo{}) + +// unpackArgSFilPublicPieceInfo transforms a sliced Go data structure into plain C format. +func unpackArgSFilPublicPieceInfo(x []FilPublicPieceInfo) (unpacked *C.struct_fil_PublicPieceInfo, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5340,35 +5739,47 @@ func unpackArgSFil32ByteArray(x []Fil32ByteArray) (unpacked *C.fil_32ByteArray, }) len0 := len(x) - mem0 := allocFil32ByteArrayMemory(len0) + mem0 := allocStructFilPublicPieceInfoMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_32ByteArray)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PublicPieceInfo)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_32ByteArray)(h.Data) + unpacked = (*C.struct_fil_PublicPieceInfo)(h.Data) return } -// packSFil32ByteArray reads sliced Go data structure out from plain C format. -func packSFil32ByteArray(v []Fil32ByteArray, ptr0 *C.fil_32ByteArray) { +// packSFilPublicPieceInfo reads sliced Go data structure out from plain C format. +func packSFilPublicPieceInfo(v []FilPublicPieceInfo, ptr0 *C.struct_fil_PublicPieceInfo) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFil32ByteArrayValue]C.fil_32ByteArray)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFil32ByteArrayRef(unsafe.Pointer(&ptr1)) + ptr1 := (*(*[m / sizeOfStructFilPublicPieceInfoValue]C.struct_fil_PublicPieceInfo)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPublicPieceInfoRef(unsafe.Pointer(&ptr1)) } } -// unpackArgSFilSealCommitPhase2Response transforms a sliced Go data structure into plain C format. -func unpackArgSFilSealCommitPhase2Response(x []FilSealCommitPhase2Response) (unpacked *C.fil_SealCommitPhase2Response, allocs *cgoAllocMap) { +// allocStructFil32ByteArrayMemory allocates memory for type C.struct_fil_32ByteArray in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFil32ByteArrayMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFil32ByteArrayValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFil32ByteArrayValue = unsafe.Sizeof([1]C.struct_fil_32ByteArray{}) + +// unpackArgSFil32ByteArray transforms a sliced Go data structure into plain C format. +func unpackArgSFil32ByteArray(x []Fil32ByteArray) (unpacked *C.struct_fil_32ByteArray, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5378,35 +5789,47 @@ func unpackArgSFilSealCommitPhase2Response(x []FilSealCommitPhase2Response) (unp }) len0 := len(x) - mem0 := allocFilSealCommitPhase2ResponseMemory(len0) + mem0 := allocStructFil32ByteArrayMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_SealCommitPhase2Response)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_32ByteArray)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_SealCommitPhase2Response)(h.Data) + unpacked = (*C.struct_fil_32ByteArray)(h.Data) return } -// packSFilSealCommitPhase2Response reads sliced Go data structure out from plain C format. -func packSFilSealCommitPhase2Response(v []FilSealCommitPhase2Response, ptr0 *C.fil_SealCommitPhase2Response) { +// packSFil32ByteArray reads sliced Go data structure out from plain C format. +func packSFil32ByteArray(v []Fil32ByteArray, ptr0 *C.struct_fil_32ByteArray) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilSealCommitPhase2ResponseValue]C.fil_SealCommitPhase2Response)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(&ptr1)) + ptr1 := (*(*[m / sizeOfStructFil32ByteArrayValue]C.struct_fil_32ByteArray)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFil32ByteArrayRef(unsafe.Pointer(&ptr1)) } } -// unpackArgSFilPublicPieceInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPublicPieceInfo(x []FilPublicPieceInfo) (unpacked *C.fil_PublicPieceInfo, allocs *cgoAllocMap) { +// allocStructFilSealCommitPhase2ResponseMemory allocates memory for type C.struct_fil_SealCommitPhase2Response in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilSealCommitPhase2ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilSealCommitPhase2ResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilSealCommitPhase2ResponseValue = unsafe.Sizeof([1]C.struct_fil_SealCommitPhase2Response{}) + +// unpackArgSFilSealCommitPhase2Response transforms a sliced Go data structure into plain C format. +func unpackArgSFilSealCommitPhase2Response(x []FilSealCommitPhase2Response) (unpacked *C.struct_fil_SealCommitPhase2Response, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5416,35 +5839,35 @@ func unpackArgSFilPublicPieceInfo(x []FilPublicPieceInfo) (unpacked *C.fil_Publi }) len0 := len(x) - mem0 := allocFilPublicPieceInfoMemory(len0) + mem0 := allocStructFilSealCommitPhase2ResponseMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PublicPieceInfo)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_SealCommitPhase2Response)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PublicPieceInfo)(h.Data) + unpacked = (*C.struct_fil_SealCommitPhase2Response)(h.Data) return } -// packSFilPublicPieceInfo reads sliced Go data structure out from plain C format. -func packSFilPublicPieceInfo(v []FilPublicPieceInfo, ptr0 *C.fil_PublicPieceInfo) { +// packSFilSealCommitPhase2Response reads sliced Go data structure out from plain C format. +func packSFilSealCommitPhase2Response(v []FilSealCommitPhase2Response, ptr0 *C.struct_fil_SealCommitPhase2Response) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPublicPieceInfoValue]C.fil_PublicPieceInfo)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPublicPieceInfoRef(unsafe.Pointer(&ptr1)) + ptr1 := (*(*[m / sizeOfStructFilSealCommitPhase2ResponseValue]C.struct_fil_SealCommitPhase2Response)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(&ptr1)) } } -// unpackArgSFilPartitionProof transforms a sliced Go data structure into plain C format. -func unpackArgSFilPartitionProof(x []FilPartitionProof) (unpacked *C.fil_PartitionProof, allocs *cgoAllocMap) { +// unpackArgSFilAggregationInputs transforms a sliced Go data structure into plain C format. +func unpackArgSFilAggregationInputs(x []FilAggregationInputs) (unpacked *C.struct_fil_AggregationInputs, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5454,26 +5877,38 @@ func unpackArgSFilPartitionProof(x []FilPartitionProof) (unpacked *C.fil_Partiti }) len0 := len(x) - mem0 := allocFilPartitionProofMemory(len0) + mem0 := allocStructFilAggregationInputsMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PartitionProof)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_AggregationInputs)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PartitionProof)(h.Data) + unpacked = (*C.struct_fil_AggregationInputs)(h.Data) return } +// allocStructFilVanillaProofMemory allocates memory for type C.struct_fil_VanillaProof in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilVanillaProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilVanillaProofValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilVanillaProofValue = unsafe.Sizeof([1]C.struct_fil_VanillaProof{}) + // unpackArgSFilVanillaProof transforms a sliced Go data structure into plain C format. -func unpackArgSFilVanillaProof(x []FilVanillaProof) (unpacked *C.fil_VanillaProof, allocs *cgoAllocMap) { +func unpackArgSFilVanillaProof(x []FilVanillaProof) (unpacked *C.struct_fil_VanillaProof, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5483,35 +5918,47 @@ func unpackArgSFilVanillaProof(x []FilVanillaProof) (unpacked *C.fil_VanillaProo }) len0 := len(x) - mem0 := allocFilVanillaProofMemory(len0) + mem0 := allocStructFilVanillaProofMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_VanillaProof)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_VanillaProof)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_VanillaProof)(h.Data) + unpacked = (*C.struct_fil_VanillaProof)(h.Data) return } // packSFilVanillaProof reads sliced Go data structure out from plain C format. -func packSFilVanillaProof(v []FilVanillaProof, ptr0 *C.fil_VanillaProof) { +func packSFilVanillaProof(v []FilVanillaProof, ptr0 *C.struct_fil_VanillaProof) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilVanillaProofValue]C.fil_VanillaProof)(unsafe.Pointer(ptr0)))[i0] + ptr1 := (*(*[m / sizeOfStructFilVanillaProofValue]C.struct_fil_VanillaProof)(unsafe.Pointer(ptr0)))[i0] v[i0] = *NewFilVanillaProofRef(unsafe.Pointer(&ptr1)) } } +// allocStructFilPrivateReplicaInfoMemory allocates memory for type C.struct_fil_PrivateReplicaInfo in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilPrivateReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPrivateReplicaInfoValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilPrivateReplicaInfoValue = unsafe.Sizeof([1]C.struct_fil_PrivateReplicaInfo{}) + // unpackArgSFilPrivateReplicaInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPrivateReplicaInfo(x []FilPrivateReplicaInfo) (unpacked *C.fil_PrivateReplicaInfo, allocs *cgoAllocMap) { +func unpackArgSFilPrivateReplicaInfo(x []FilPrivateReplicaInfo) (unpacked *C.struct_fil_PrivateReplicaInfo, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5521,64 +5968,47 @@ func unpackArgSFilPrivateReplicaInfo(x []FilPrivateReplicaInfo) (unpacked *C.fil }) len0 := len(x) - mem0 := allocFilPrivateReplicaInfoMemory(len0) + mem0 := allocStructFilPrivateReplicaInfoMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PrivateReplicaInfo)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PrivateReplicaInfo)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PrivateReplicaInfo)(h.Data) + unpacked = (*C.struct_fil_PrivateReplicaInfo)(h.Data) return } // packSFilPrivateReplicaInfo reads sliced Go data structure out from plain C format. -func packSFilPrivateReplicaInfo(v []FilPrivateReplicaInfo, ptr0 *C.fil_PrivateReplicaInfo) { +func packSFilPrivateReplicaInfo(v []FilPrivateReplicaInfo, ptr0 *C.struct_fil_PrivateReplicaInfo) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPrivateReplicaInfoValue]C.fil_PrivateReplicaInfo)(unsafe.Pointer(ptr0)))[i0] + ptr1 := (*(*[m / sizeOfStructFilPrivateReplicaInfoValue]C.struct_fil_PrivateReplicaInfo)(unsafe.Pointer(ptr0)))[i0] v[i0] = *NewFilPrivateReplicaInfoRef(unsafe.Pointer(&ptr1)) } } -// copyPSizeTBytes copies the data from Go slice as *C.size_t. -func copyPSizeTBytes(slice *sliceHeader) (*C.size_t, *cgoAllocMap) { - allocs := new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - mem0 := unsafe.Pointer(C.CBytes(*(*[]byte)(unsafe.Pointer(&sliceHeader{ - Data: slice.Data, - Len: int(sizeOfSizeTValue) * slice.Len, - Cap: int(sizeOfSizeTValue) * slice.Len, - })))) - allocs.Add(mem0) - - return (*C.size_t)(mem0), allocs -} - -// allocSizeTMemory allocates memory for type C.size_t in C. +// allocStructFilPublicReplicaInfoMemory allocates memory for type C.struct_fil_PublicReplicaInfo in C. // The caller is responsible for freeing the this memory via C.free. -func allocSizeTMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfSizeTValue)) +func allocStructFilPublicReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPublicReplicaInfoValue)) if mem == nil { panic(fmt.Sprintln("memory alloc error: ", err)) } return mem } -const sizeOfSizeTValue = unsafe.Sizeof([1]C.size_t{}) +const sizeOfStructFilPublicReplicaInfoValue = unsafe.Sizeof([1]C.struct_fil_PublicReplicaInfo{}) -// unpackArgSFilPartitionSnarkProof transforms a sliced Go data structure into plain C format. -func unpackArgSFilPartitionSnarkProof(x []FilPartitionSnarkProof) (unpacked *C.fil_PartitionSnarkProof, allocs *cgoAllocMap) { +// unpackArgSFilPublicReplicaInfo transforms a sliced Go data structure into plain C format. +func unpackArgSFilPublicReplicaInfo(x []FilPublicReplicaInfo) (unpacked *C.struct_fil_PublicReplicaInfo, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5588,35 +6018,35 @@ func unpackArgSFilPartitionSnarkProof(x []FilPartitionSnarkProof) (unpacked *C.f }) len0 := len(x) - mem0 := allocFilPartitionSnarkProofMemory(len0) + mem0 := allocStructFilPublicReplicaInfoMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PartitionSnarkProof)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PublicReplicaInfo)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PartitionSnarkProof)(h.Data) + unpacked = (*C.struct_fil_PublicReplicaInfo)(h.Data) return } -// packSFilPartitionSnarkProof reads sliced Go data structure out from plain C format. -func packSFilPartitionSnarkProof(v []FilPartitionSnarkProof, ptr0 *C.fil_PartitionSnarkProof) { +// packSFilPublicReplicaInfo reads sliced Go data structure out from plain C format. +func packSFilPublicReplicaInfo(v []FilPublicReplicaInfo, ptr0 *C.struct_fil_PublicReplicaInfo) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPartitionSnarkProofValue]C.fil_PartitionSnarkProof)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPartitionSnarkProofRef(unsafe.Pointer(&ptr1)) + ptr1 := (*(*[m / sizeOfStructFilPublicReplicaInfoValue]C.struct_fil_PublicReplicaInfo)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPublicReplicaInfoRef(unsafe.Pointer(&ptr1)) } } -// unpackArgSFilAggregationInputs transforms a sliced Go data structure into plain C format. -func unpackArgSFilAggregationInputs(x []FilAggregationInputs) (unpacked *C.fil_AggregationInputs, allocs *cgoAllocMap) { +// unpackArgSFilPoStProof transforms a sliced Go data structure into plain C format. +func unpackArgSFilPoStProof(x []FilPoStProof) (unpacked *C.struct_fil_PoStProof, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5626,26 +6056,38 @@ func unpackArgSFilAggregationInputs(x []FilAggregationInputs) (unpacked *C.fil_A }) len0 := len(x) - mem0 := allocFilAggregationInputsMemory(len0) + mem0 := allocStructFilPoStProofMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_AggregationInputs)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PoStProof)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_AggregationInputs)(h.Data) + unpacked = (*C.struct_fil_PoStProof)(h.Data) return } -// unpackArgSFilPublicReplicaInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPublicReplicaInfo(x []FilPublicReplicaInfo) (unpacked *C.fil_PublicReplicaInfo, allocs *cgoAllocMap) { +// allocStructFilPartitionSnarkProofMemory allocates memory for type C.struct_fil_PartitionSnarkProof in C. +// The caller is responsible for freeing the this memory via C.free. +func allocStructFilPartitionSnarkProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfStructFilPartitionSnarkProofValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfStructFilPartitionSnarkProofValue = unsafe.Sizeof([1]C.struct_fil_PartitionSnarkProof{}) + +// unpackArgSFilPartitionSnarkProof transforms a sliced Go data structure into plain C format. +func unpackArgSFilPartitionSnarkProof(x []FilPartitionSnarkProof) (unpacked *C.struct_fil_PartitionSnarkProof, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5655,35 +6097,35 @@ func unpackArgSFilPublicReplicaInfo(x []FilPublicReplicaInfo) (unpacked *C.fil_P }) len0 := len(x) - mem0 := allocFilPublicReplicaInfoMemory(len0) + mem0 := allocStructFilPartitionSnarkProofMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PublicReplicaInfo)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PartitionSnarkProof)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PublicReplicaInfo)(h.Data) + unpacked = (*C.struct_fil_PartitionSnarkProof)(h.Data) return } -// packSFilPublicReplicaInfo reads sliced Go data structure out from plain C format. -func packSFilPublicReplicaInfo(v []FilPublicReplicaInfo, ptr0 *C.fil_PublicReplicaInfo) { +// packSFilPartitionSnarkProof reads sliced Go data structure out from plain C format. +func packSFilPartitionSnarkProof(v []FilPartitionSnarkProof, ptr0 *C.struct_fil_PartitionSnarkProof) { const m = 0x7fffffff for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPublicReplicaInfoValue]C.fil_PublicReplicaInfo)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPublicReplicaInfoRef(unsafe.Pointer(&ptr1)) + ptr1 := (*(*[m / sizeOfStructFilPartitionSnarkProofValue]C.struct_fil_PartitionSnarkProof)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPartitionSnarkProofRef(unsafe.Pointer(&ptr1)) } } -// unpackArgSFilPoStProof transforms a sliced Go data structure into plain C format. -func unpackArgSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { +// unpackArgSFilPartitionProof transforms a sliced Go data structure into plain C format. +func unpackArgSFilPartitionProof(x []FilPartitionProof) (unpacked *C.struct_fil_PartitionProof, allocs *cgoAllocMap) { if x == nil { return nil, nil } @@ -5693,20 +6135,20 @@ func unpackArgSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs }) len0 := len(x) - mem0 := allocFilPoStProofMemory(len0) + mem0 := allocStructFilPartitionProofMemory(len0) allocs.Add(mem0) h0 := &sliceHeader{ Data: mem0, Cap: len0, Len: len0, } - v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) + v0 := *(*[]C.struct_fil_PartitionProof)(unsafe.Pointer(h0)) for i0 := range x { allocs0 := new(cgoAllocMap) v0[i0], allocs0 = x[i0].PassValue() allocs.Borrow(allocs0) } h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PoStProof)(h.Data) + unpacked = (*C.struct_fil_PartitionProof)(h.Data) return } diff --git a/generated/const.go b/generated/const.go index 6c212e6a..11c0dbc0 100644 --- a/generated/const.go +++ b/generated/const.go @@ -4,7 +4,8 @@ package generated /* -#cgo LDFLAGS: -L${SRCDIR}/.. +#cgo linux LDFLAGS: -L${SRCDIR}/.. -Wl,-unresolved-symbols=ignore-all +#cgo darwin LDFLAGS: -L${SRCDIR}/.. -Wl,-undefined,dynamic_lookup #cgo pkg-config: ${SRCDIR}/../filcrypto.pc #include "../filcrypto.h" #include @@ -12,10 +13,10 @@ package generated */ import "C" -// FCPResponseStatus as declared in filecoin-ffi/filcrypto.h:31 +// FCPResponseStatus as declared in filecoin-ffi/filcrypto.h:51 type FCPResponseStatus int32 -// FCPResponseStatus enumeration from filecoin-ffi/filcrypto.h:31 +// FCPResponseStatus enumeration from filecoin-ffi/filcrypto.h:51 const ( FCPResponseStatusFCPNoError FCPResponseStatus = C.FCPResponseStatus_FCPNoError FCPResponseStatusFCPUnclassifiedError FCPResponseStatus = C.FCPResponseStatus_FCPUnclassifiedError @@ -23,18 +24,26 @@ const ( FCPResponseStatusFCPReceiverError FCPResponseStatus = C.FCPResponseStatus_FCPReceiverError ) -// FilRegisteredAggregationProof as declared in filecoin-ffi/filcrypto.h:35 +// FilFvmRegisteredVersion as declared in filecoin-ffi/filcrypto.h:55 +type FilFvmRegisteredVersion int32 + +// FilFvmRegisteredVersion enumeration from filecoin-ffi/filcrypto.h:55 +const ( + FilFvmRegisteredVersionV1 FilFvmRegisteredVersion = C.fil_FvmRegisteredVersion_V1 +) + +// FilRegisteredAggregationProof as declared in filecoin-ffi/filcrypto.h:59 type FilRegisteredAggregationProof int32 -// FilRegisteredAggregationProof enumeration from filecoin-ffi/filcrypto.h:35 +// FilRegisteredAggregationProof enumeration from filecoin-ffi/filcrypto.h:59 const ( FilRegisteredAggregationProofSnarkPackV1 FilRegisteredAggregationProof = C.fil_RegisteredAggregationProof_SnarkPackV1 ) -// FilRegisteredPoStProof as declared in filecoin-ffi/filcrypto.h:48 +// FilRegisteredPoStProof as declared in filecoin-ffi/filcrypto.h:72 type FilRegisteredPoStProof int32 -// FilRegisteredPoStProof enumeration from filecoin-ffi/filcrypto.h:48 +// FilRegisteredPoStProof enumeration from filecoin-ffi/filcrypto.h:72 const ( FilRegisteredPoStProofStackedDrgWinning2KiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning2KiBV1 FilRegisteredPoStProofStackedDrgWinning8MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning8MiBV1 @@ -48,10 +57,10 @@ const ( FilRegisteredPoStProofStackedDrgWindow64GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow64GiBV1 ) -// FilRegisteredSealProof as declared in filecoin-ffi/filcrypto.h:61 +// FilRegisteredSealProof as declared in filecoin-ffi/filcrypto.h:85 type FilRegisteredSealProof int32 -// FilRegisteredSealProof enumeration from filecoin-ffi/filcrypto.h:61 +// FilRegisteredSealProof enumeration from filecoin-ffi/filcrypto.h:85 const ( FilRegisteredSealProofStackedDrg2KiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg2KiBV1 FilRegisteredSealProofStackedDrg8MiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg8MiBV1 @@ -65,10 +74,10 @@ const ( FilRegisteredSealProofStackedDrg64GiBV11 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg64GiBV1_1 ) -// FilRegisteredUpdateProof as declared in filecoin-ffi/filcrypto.h:69 +// FilRegisteredUpdateProof as declared in filecoin-ffi/filcrypto.h:93 type FilRegisteredUpdateProof int32 -// FilRegisteredUpdateProof enumeration from filecoin-ffi/filcrypto.h:69 +// FilRegisteredUpdateProof enumeration from filecoin-ffi/filcrypto.h:93 const ( FilRegisteredUpdateProofStackedDrg2KiBV1 FilRegisteredUpdateProof = C.fil_RegisteredUpdateProof_StackedDrg2KiBV1 FilRegisteredUpdateProofStackedDrg8MiBV1 FilRegisteredUpdateProof = C.fil_RegisteredUpdateProof_StackedDrg8MiBV1 diff --git a/generated/generated.go b/generated/generated.go index 593659ed..9fdf251e 100644 --- a/generated/generated.go +++ b/generated/generated.go @@ -4,7 +4,8 @@ package generated /* -#cgo LDFLAGS: -L${SRCDIR}/.. +#cgo linux LDFLAGS: -L${SRCDIR}/.. -Wl,-unresolved-symbols=ignore-all +#cgo darwin LDFLAGS: -L${SRCDIR}/.. -Wl,-undefined,dynamic_lookup #cgo pkg-config: ${SRCDIR}/../filcrypto.pc #include "../filcrypto.h" #include @@ -16,7 +17,18 @@ import ( "unsafe" ) -// FilAggregate function as declared in filecoin-ffi/filcrypto.h:432 +// FilHash function as declared in filecoin-ffi/filcrypto.h:480 +func FilHash(messagePtr []byte, messageLen uint) *FilHashResponse { + cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr))) + cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown + __ret := C.fil_hash(cmessagePtr, cmessageLen) + runtime.KeepAlive(cmessageLenAllocMap) + runtime.KeepAlive(cmessagePtrAllocMap) + __v := NewFilHashResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilAggregate function as declared in filecoin-ffi/filcrypto.h:492 func FilAggregate(flattenedSignaturesPtr []byte, flattenedSignaturesLen uint) *FilAggregateResponse { cflattenedSignaturesPtr, cflattenedSignaturesPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedSignaturesPtr))) cflattenedSignaturesLen, cflattenedSignaturesLenAllocMap := (C.size_t)(flattenedSignaturesLen), cgoAllocsUnknown @@ -27,571 +39,509 @@ func FilAggregate(flattenedSignaturesPtr []byte, flattenedSignaturesLen uint) *F return __v } -// FilAggregateSealProofs function as declared in filecoin-ffi/filcrypto.h:435 -func FilAggregateSealProofs(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, commRsPtr []Fil32ByteArray, commRsLen uint, seedsPtr []Fil32ByteArray, seedsLen uint, sealCommitResponsesPtr []FilSealCommitPhase2Response, sealCommitResponsesLen uint) *FilAggregateProof { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown - ccommRsPtr, ccommRsPtrAllocMap := unpackArgSFil32ByteArray(commRsPtr) - ccommRsLen, ccommRsLenAllocMap := (C.size_t)(commRsLen), cgoAllocsUnknown - cseedsPtr, cseedsPtrAllocMap := unpackArgSFil32ByteArray(seedsPtr) - cseedsLen, cseedsLenAllocMap := (C.size_t)(seedsLen), cgoAllocsUnknown - csealCommitResponsesPtr, csealCommitResponsesPtrAllocMap := unpackArgSFilSealCommitPhase2Response(sealCommitResponsesPtr) - csealCommitResponsesLen, csealCommitResponsesLenAllocMap := (C.size_t)(sealCommitResponsesLen), cgoAllocsUnknown - __ret := C.fil_aggregate_seal_proofs(cregisteredProof, cregisteredAggregation, ccommRsPtr, ccommRsLen, cseedsPtr, cseedsLen, csealCommitResponsesPtr, csealCommitResponsesLen) - runtime.KeepAlive(csealCommitResponsesLenAllocMap) - packSFilSealCommitPhase2Response(sealCommitResponsesPtr, csealCommitResponsesPtr) - runtime.KeepAlive(csealCommitResponsesPtrAllocMap) - runtime.KeepAlive(cseedsLenAllocMap) - packSFil32ByteArray(seedsPtr, cseedsPtr) - runtime.KeepAlive(cseedsPtrAllocMap) - runtime.KeepAlive(ccommRsLenAllocMap) - packSFil32ByteArray(commRsPtr, ccommRsPtr) - runtime.KeepAlive(ccommRsPtrAllocMap) - runtime.KeepAlive(cregisteredAggregationAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilAggregateProofRef(unsafe.Pointer(__ret)) +// FilVerify function as declared in filecoin-ffi/filcrypto.h:506 +func FilVerify(signaturePtr []byte, flattenedDigestsPtr []byte, flattenedDigestsLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 { + csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr))) + cflattenedDigestsPtr, cflattenedDigestsPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedDigestsPtr))) + cflattenedDigestsLen, cflattenedDigestsLenAllocMap := (C.size_t)(flattenedDigestsLen), cgoAllocsUnknown + cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr))) + cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown + __ret := C.fil_verify(csignaturePtr, cflattenedDigestsPtr, cflattenedDigestsLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) + runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) + runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) + runtime.KeepAlive(cflattenedDigestsLenAllocMap) + runtime.KeepAlive(cflattenedDigestsPtrAllocMap) + runtime.KeepAlive(csignaturePtrAllocMap) + __v := (int32)(__ret) return __v } -// FilClearCache function as declared in filecoin-ffi/filcrypto.h:444 -func FilClearCache(sectorSize uint64, cacheDirPath string) *FilClearCacheResponse { - csectorSize, csectorSizeAllocMap := (C.uint64_t)(sectorSize), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - __ret := C.fil_clear_cache(csectorSize, ccacheDirPath) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(csectorSizeAllocMap) - __v := NewFilClearCacheResponseRef(unsafe.Pointer(__ret)) +// FilHashVerify function as declared in filecoin-ffi/filcrypto.h:524 +func FilHashVerify(signaturePtr []byte, flattenedMessagesPtr []byte, flattenedMessagesLen uint, messageSizesPtr []uint, messageSizesLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 { + csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr))) + cflattenedMessagesPtr, cflattenedMessagesPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedMessagesPtr))) + cflattenedMessagesLen, cflattenedMessagesLenAllocMap := (C.size_t)(flattenedMessagesLen), cgoAllocsUnknown + cmessageSizesPtr, cmessageSizesPtrAllocMap := copyPSizeTBytes((*sliceHeader)(unsafe.Pointer(&messageSizesPtr))) + cmessageSizesLen, cmessageSizesLenAllocMap := (C.size_t)(messageSizesLen), cgoAllocsUnknown + cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr))) + cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown + __ret := C.fil_hash_verify(csignaturePtr, cflattenedMessagesPtr, cflattenedMessagesLen, cmessageSizesPtr, cmessageSizesLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) + runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) + runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) + runtime.KeepAlive(cmessageSizesLenAllocMap) + runtime.KeepAlive(cmessageSizesPtrAllocMap) + runtime.KeepAlive(cflattenedMessagesLenAllocMap) + runtime.KeepAlive(cflattenedMessagesPtrAllocMap) + runtime.KeepAlive(csignaturePtrAllocMap) + __v := (int32)(__ret) return __v } -// FilCreateZeroSignature function as declared in filecoin-ffi/filcrypto.h:451 -func FilCreateZeroSignature() *FilZeroSignatureResponse { - __ret := C.fil_create_zero_signature() - __v := NewFilZeroSignatureResponseRef(unsafe.Pointer(__ret)) +// FilPrivateKeyGenerate function as declared in filecoin-ffi/filcrypto.h:535 +func FilPrivateKeyGenerate() *FilPrivateKeyGenerateResponse { + __ret := C.fil_private_key_generate() + __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) return __v } -// FilDestroyAggregateProof function as declared in filecoin-ffi/filcrypto.h:457 -func FilDestroyAggregateProof(ptr *FilAggregateProof) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_aggregate_proof(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyAggregateResponse function as declared in filecoin-ffi/filcrypto.h:459 -func FilDestroyAggregateResponse(ptr *FilAggregateResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_aggregate_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilPrivateKeyGenerateWithSeed function as declared in filecoin-ffi/filcrypto.h:548 +func FilPrivateKeyGenerateWithSeed(rawSeed Fil32ByteArray) *FilPrivateKeyGenerateResponse { + crawSeed, crawSeedAllocMap := rawSeed.PassValue() + __ret := C.fil_private_key_generate_with_seed(crawSeed) + runtime.KeepAlive(crawSeedAllocMap) + __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyClearCacheResponse function as declared in filecoin-ffi/filcrypto.h:461 -func FilDestroyClearCacheResponse(ptr *FilClearCacheResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_clear_cache_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilPrivateKeySign function as declared in filecoin-ffi/filcrypto.h:561 +func FilPrivateKeySign(rawPrivateKeyPtr []byte, messagePtr []byte, messageLen uint) *FilPrivateKeySignResponse { + crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr))) + cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr))) + cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown + __ret := C.fil_private_key_sign(crawPrivateKeyPtr, cmessagePtr, cmessageLen) + runtime.KeepAlive(cmessageLenAllocMap) + runtime.KeepAlive(cmessagePtrAllocMap) + runtime.KeepAlive(crawPrivateKeyPtrAllocMap) + __v := NewFilPrivateKeySignResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyEmptySectorUpdateDecodeFromResponse function as declared in filecoin-ffi/filcrypto.h:467 -func FilDestroyEmptySectorUpdateDecodeFromResponse(ptr *FilEmptySectorUpdateDecodeFromResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_empty_sector_update_decode_from_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilPrivateKeyPublicKey function as declared in filecoin-ffi/filcrypto.h:574 +func FilPrivateKeyPublicKey(rawPrivateKeyPtr []byte) *FilPrivateKeyPublicKeyResponse { + crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr))) + __ret := C.fil_private_key_public_key(crawPrivateKeyPtr) + runtime.KeepAlive(crawPrivateKeyPtrAllocMap) + __v := NewFilPrivateKeyPublicKeyResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyEmptySectorUpdateEncodeIntoResponse function as declared in filecoin-ffi/filcrypto.h:473 -func FilDestroyEmptySectorUpdateEncodeIntoResponse(ptr *FilEmptySectorUpdateEncodeIntoResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_empty_sector_update_encode_into_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilCreateZeroSignature function as declared in filecoin-ffi/filcrypto.h:581 +func FilCreateZeroSignature() *FilZeroSignatureResponse { + __ret := C.fil_create_zero_signature() + __v := NewFilZeroSignatureResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyEmptySectorUpdateGenerateProofResponse function as declared in filecoin-ffi/filcrypto.h:479 -func FilDestroyEmptySectorUpdateGenerateProofResponse(ptr *FilEmptySectorUpdateProofResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_empty_sector_update_generate_proof_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilDropSignature function as declared in filecoin-ffi/filcrypto.h:586 +func FilDropSignature(sig []byte) { + csig, csigAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sig))) + C.fil_drop_signature(csig) + runtime.KeepAlive(csigAllocMap) } -// FilDestroyEmptySectorUpdateRemoveEncodedDataResponse function as declared in filecoin-ffi/filcrypto.h:485 -func FilDestroyEmptySectorUpdateRemoveEncodedDataResponse(ptr *FilEmptySectorUpdateRemoveEncodedDataResponse) { +// FilDestroyHashResponse function as declared in filecoin-ffi/filcrypto.h:588 +func FilDestroyHashResponse(ptr *FilHashResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_empty_sector_update_remove_encoded_data_response(cptr) + C.fil_destroy_hash_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyEmptySectorUpdateVerifyProofResponse function as declared in filecoin-ffi/filcrypto.h:491 -func FilDestroyEmptySectorUpdateVerifyProofResponse(ptr *FilVerifyEmptySectorUpdateProofResponse) { +// FilDestroyAggregateResponse function as declared in filecoin-ffi/filcrypto.h:590 +func FilDestroyAggregateResponse(ptr *FilAggregateResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_empty_sector_update_verify_proof_response(cptr) + C.fil_destroy_aggregate_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyFauxrepResponse function as declared in filecoin-ffi/filcrypto.h:493 -func FilDestroyFauxrepResponse(ptr *FilFauxRepResponse) { +// FilDestroyPrivateKeyGenerateResponse function as declared in filecoin-ffi/filcrypto.h:592 +func FilDestroyPrivateKeyGenerateResponse(ptr *FilPrivateKeyGenerateResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_fauxrep_response(cptr) + C.fil_destroy_private_key_generate_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyFinalizeTicketResponse function as declared in filecoin-ffi/filcrypto.h:495 -func FilDestroyFinalizeTicketResponse(ptr *FilFinalizeTicketResponse) { +// FilDestroyPrivateKeySignResponse function as declared in filecoin-ffi/filcrypto.h:594 +func FilDestroyPrivateKeySignResponse(ptr *FilPrivateKeySignResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_finalize_ticket_response(cptr) + C.fil_destroy_private_key_sign_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGenerateDataCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:497 -func FilDestroyGenerateDataCommitmentResponse(ptr *FilGenerateDataCommitmentResponse) { +// FilDestroyPrivateKeyPublicKeyResponse function as declared in filecoin-ffi/filcrypto.h:596 +func FilDestroyPrivateKeyPublicKeyResponse(ptr *FilPrivateKeyPublicKeyResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_data_commitment_response(cptr) + C.fil_destroy_private_key_public_key_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGenerateEmptySectorUpdatePartitionProofResponse function as declared in filecoin-ffi/filcrypto.h:503 -func FilDestroyGenerateEmptySectorUpdatePartitionProofResponse(ptr *FilPartitionProofResponse) { +// FilDestroyZeroSignatureResponse function as declared in filecoin-ffi/filcrypto.h:598 +func FilDestroyZeroSignatureResponse(ptr *FilZeroSignatureResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_empty_sector_update_partition_proof_response(cptr) + C.fil_destroy_zero_signature_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGenerateFallbackSectorChallengesResponse function as declared in filecoin-ffi/filcrypto.h:505 -func FilDestroyGenerateFallbackSectorChallengesResponse(ptr *FilGenerateFallbackSectorChallengesResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_fallback_sector_challenges_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilCreateFvmMachine function as declared in filecoin-ffi/filcrypto.h:606 +func FilCreateFvmMachine(fvmVersion FilFvmRegisteredVersion, chainEpoch uint64, baseFeeHi uint64, baseFeeLo uint64, baseCircSupplyHi uint64, baseCircSupplyLo uint64, networkVersion uint64, stateRootPtr []byte, stateRootLen uint, blockstoreId uint64, externsId uint64) *FilCreateFvmMachineResponse { + cfvmVersion, cfvmVersionAllocMap := (C.enum_fil_FvmRegisteredVersion)(fvmVersion), cgoAllocsUnknown + cchainEpoch, cchainEpochAllocMap := (C.uint64_t)(chainEpoch), cgoAllocsUnknown + cbaseFeeHi, cbaseFeeHiAllocMap := (C.uint64_t)(baseFeeHi), cgoAllocsUnknown + cbaseFeeLo, cbaseFeeLoAllocMap := (C.uint64_t)(baseFeeLo), cgoAllocsUnknown + cbaseCircSupplyHi, cbaseCircSupplyHiAllocMap := (C.uint64_t)(baseCircSupplyHi), cgoAllocsUnknown + cbaseCircSupplyLo, cbaseCircSupplyLoAllocMap := (C.uint64_t)(baseCircSupplyLo), cgoAllocsUnknown + cnetworkVersion, cnetworkVersionAllocMap := (C.uint64_t)(networkVersion), cgoAllocsUnknown + cstateRootPtr, cstateRootPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&stateRootPtr))) + cstateRootLen, cstateRootLenAllocMap := (C.size_t)(stateRootLen), cgoAllocsUnknown + cblockstoreId, cblockstoreIdAllocMap := (C.uint64_t)(blockstoreId), cgoAllocsUnknown + cexternsId, cexternsIdAllocMap := (C.uint64_t)(externsId), cgoAllocsUnknown + __ret := C.fil_create_fvm_machine(cfvmVersion, cchainEpoch, cbaseFeeHi, cbaseFeeLo, cbaseCircSupplyHi, cbaseCircSupplyLo, cnetworkVersion, cstateRootPtr, cstateRootLen, cblockstoreId, cexternsId) + runtime.KeepAlive(cexternsIdAllocMap) + runtime.KeepAlive(cblockstoreIdAllocMap) + runtime.KeepAlive(cstateRootLenAllocMap) + runtime.KeepAlive(cstateRootPtrAllocMap) + runtime.KeepAlive(cnetworkVersionAllocMap) + runtime.KeepAlive(cbaseCircSupplyLoAllocMap) + runtime.KeepAlive(cbaseCircSupplyHiAllocMap) + runtime.KeepAlive(cbaseFeeLoAllocMap) + runtime.KeepAlive(cbaseFeeHiAllocMap) + runtime.KeepAlive(cchainEpochAllocMap) + runtime.KeepAlive(cfvmVersionAllocMap) + __v := NewFilCreateFvmMachineResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyGeneratePieceCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:507 -func FilDestroyGeneratePieceCommitmentResponse(ptr *FilGeneratePieceCommitmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_piece_commitment_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilDropFvmMachine function as declared in filecoin-ffi/filcrypto.h:618 +func FilDropFvmMachine(executor unsafe.Pointer) { + cexecutor, cexecutorAllocMap := executor, cgoAllocsUnknown + C.fil_drop_fvm_machine(cexecutor) + runtime.KeepAlive(cexecutorAllocMap) } -// FilDestroyGenerateSingleVanillaProofResponse function as declared in filecoin-ffi/filcrypto.h:509 -func FilDestroyGenerateSingleVanillaProofResponse(ptr *FilGenerateSingleVanillaProofResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_single_vanilla_proof_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilFvmMachineExecuteMessage function as declared in filecoin-ffi/filcrypto.h:620 +func FilFvmMachineExecuteMessage(executor unsafe.Pointer, messagePtr []byte, messageLen uint, chainLen uint64, applyKind uint64) *FilFvmMachineExecuteResponse { + cexecutor, cexecutorAllocMap := executor, cgoAllocsUnknown + cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr))) + cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown + cchainLen, cchainLenAllocMap := (C.uint64_t)(chainLen), cgoAllocsUnknown + capplyKind, capplyKindAllocMap := (C.uint64_t)(applyKind), cgoAllocsUnknown + __ret := C.fil_fvm_machine_execute_message(cexecutor, cmessagePtr, cmessageLen, cchainLen, capplyKind) + runtime.KeepAlive(capplyKindAllocMap) + runtime.KeepAlive(cchainLenAllocMap) + runtime.KeepAlive(cmessageLenAllocMap) + runtime.KeepAlive(cmessagePtrAllocMap) + runtime.KeepAlive(cexecutorAllocMap) + __v := NewFilFvmMachineExecuteResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyGenerateSingleWindowPostWithVanillaResponse function as declared in filecoin-ffi/filcrypto.h:511 -func FilDestroyGenerateSingleWindowPostWithVanillaResponse(ptr *FilGenerateSingleWindowPoStWithVanillaResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_single_window_post_with_vanilla_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilFvmMachineFlush function as declared in filecoin-ffi/filcrypto.h:626 +func FilFvmMachineFlush(executor unsafe.Pointer) *FilFvmMachineFlushResponse { + cexecutor, cexecutorAllocMap := executor, cgoAllocsUnknown + __ret := C.fil_fvm_machine_flush(cexecutor) + runtime.KeepAlive(cexecutorAllocMap) + __v := NewFilFvmMachineFlushResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyGenerateWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:513 -func FilDestroyGenerateWindowPostResponse(ptr *FilGenerateWindowPoStResponse) { +// FilDestroyCreateFvmMachineResponse function as declared in filecoin-ffi/filcrypto.h:628 +func FilDestroyCreateFvmMachineResponse(ptr *FilCreateFvmMachineResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_window_post_response(cptr) + C.fil_destroy_create_fvm_machine_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGenerateWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:515 -func FilDestroyGenerateWinningPostResponse(ptr *FilGenerateWinningPoStResponse) { +// FilDestroyFvmMachineExecuteResponse function as declared in filecoin-ffi/filcrypto.h:630 +func FilDestroyFvmMachineExecuteResponse(ptr *FilFvmMachineExecuteResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_winning_post_response(cptr) + C.fil_destroy_fvm_machine_execute_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:517 -func FilDestroyGenerateWinningPostSectorChallenge(ptr *FilGenerateWinningPoStSectorChallenge) { +// FilDestroyFvmMachineFlushResponse function as declared in filecoin-ffi/filcrypto.h:632 +func FilDestroyFvmMachineFlushResponse(ptr *FilFvmMachineFlushResponse) { cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_winning_post_sector_challenge(cptr) + C.fil_destroy_fvm_machine_flush_response(cptr) runtime.KeepAlive(cptrAllocMap) } -// FilDestroyGetNumPartitionForFallbackPostResponse function as declared in filecoin-ffi/filcrypto.h:519 -func FilDestroyGetNumPartitionForFallbackPostResponse(ptr *FilGetNumPartitionForFallbackPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_get_num_partition_for_fallback_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilWriteWithAlignment function as declared in filecoin-ffi/filcrypto.h:638 +func FilWriteWithAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32, existingPieceSizesPtr []uint64, existingPieceSizesLen uint) *FilWriteWithAlignmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown + csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown + cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown + cexistingPieceSizesPtr, cexistingPieceSizesPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&existingPieceSizesPtr))) + cexistingPieceSizesLen, cexistingPieceSizesLenAllocMap := (C.size_t)(existingPieceSizesLen), cgoAllocsUnknown + __ret := C.fil_write_with_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd, cexistingPieceSizesPtr, cexistingPieceSizesLen) + runtime.KeepAlive(cexistingPieceSizesLenAllocMap) + runtime.KeepAlive(cexistingPieceSizesPtrAllocMap) + runtime.KeepAlive(cdstFdAllocMap) + runtime.KeepAlive(csrcSizeAllocMap) + runtime.KeepAlive(csrcFdAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilWriteWithAlignmentResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyGpuDeviceResponse function as declared in filecoin-ffi/filcrypto.h:521 -func FilDestroyGpuDeviceResponse(ptr *FilGpuDeviceResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_gpu_device_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilWriteWithoutAlignment function as declared in filecoin-ffi/filcrypto.h:649 +func FilWriteWithoutAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32) *FilWriteWithoutAlignmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown + csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown + cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown + __ret := C.fil_write_without_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd) + runtime.KeepAlive(cdstFdAllocMap) + runtime.KeepAlive(csrcSizeAllocMap) + runtime.KeepAlive(csrcFdAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilWriteWithoutAlignmentResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyHashResponse function as declared in filecoin-ffi/filcrypto.h:523 -func FilDestroyHashResponse(ptr *FilHashResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_hash_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilFauxrep function as declared in filecoin-ffi/filcrypto.h:654 +func FilFauxrep(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorPath string) *FilFauxRepResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + sealedSectorPath = safeString(sealedSectorPath) + csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) + __ret := C.fil_fauxrep(cregisteredProof, ccacheDirPath, csealedSectorPath) + runtime.KeepAlive(sealedSectorPath) + runtime.KeepAlive(csealedSectorPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyInitLogFdResponse function as declared in filecoin-ffi/filcrypto.h:525 -func FilDestroyInitLogFdResponse(ptr *FilInitLogFdResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_init_log_fd_response(cptr) - runtime.KeepAlive(cptrAllocMap) +// FilFauxrep2 function as declared in filecoin-ffi/filcrypto.h:658 +func FilFauxrep2(registeredProof FilRegisteredSealProof, cacheDirPath string, existingPAuxPath string) *FilFauxRepResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + existingPAuxPath = safeString(existingPAuxPath) + cexistingPAuxPath, cexistingPAuxPathAllocMap := unpackPCharString(existingPAuxPath) + __ret := C.fil_fauxrep2(cregisteredProof, ccacheDirPath, cexistingPAuxPath) + runtime.KeepAlive(existingPAuxPath) + runtime.KeepAlive(cexistingPAuxPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilDestroyMergeWindowPostPartitionProofsResponse function as declared in filecoin-ffi/filcrypto.h:527 -func FilDestroyMergeWindowPostPartitionProofsResponse(ptr *FilMergeWindowPoStPartitionProofsResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_merge_window_post_partition_proofs_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeyGenerateResponse function as declared in filecoin-ffi/filcrypto.h:529 -func FilDestroyPrivateKeyGenerateResponse(ptr *FilPrivateKeyGenerateResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_generate_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeyPublicKeyResponse function as declared in filecoin-ffi/filcrypto.h:531 -func FilDestroyPrivateKeyPublicKeyResponse(ptr *FilPrivateKeyPublicKeyResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_public_key_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeySignResponse function as declared in filecoin-ffi/filcrypto.h:533 -func FilDestroyPrivateKeySignResponse(ptr *FilPrivateKeySignResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_sign_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:535 -func FilDestroySealCommitPhase1Response(ptr *FilSealCommitPhase1Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_commit_phase1_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:537 -func FilDestroySealCommitPhase2Response(ptr *FilSealCommitPhase2Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_commit_phase2_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealPreCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:539 -func FilDestroySealPreCommitPhase1Response(ptr *FilSealPreCommitPhase1Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_pre_commit_phase1_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealPreCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:541 -func FilDestroySealPreCommitPhase2Response(ptr *FilSealPreCommitPhase2Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_pre_commit_phase2_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyStringResponse function as declared in filecoin-ffi/filcrypto.h:543 -func FilDestroyStringResponse(ptr *FilStringResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_string_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyUnsealRangeResponse function as declared in filecoin-ffi/filcrypto.h:545 -func FilDestroyUnsealRangeResponse(ptr *FilUnsealRangeResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_unseal_range_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyAggregateSealResponse function as declared in filecoin-ffi/filcrypto.h:551 -func FilDestroyVerifyAggregateSealResponse(ptr *FilVerifyAggregateSealProofResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_aggregate_seal_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyEmptySectorUpdatePartitionProofResponse function as declared in filecoin-ffi/filcrypto.h:557 -func FilDestroyVerifyEmptySectorUpdatePartitionProofResponse(ptr *FilVerifyPartitionProofResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_empty_sector_update_partition_proof_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifySealResponse function as declared in filecoin-ffi/filcrypto.h:563 -func FilDestroyVerifySealResponse(ptr *FilVerifySealResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_seal_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:565 -func FilDestroyVerifyWindowPostResponse(ptr *FilVerifyWindowPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_window_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:571 -func FilDestroyVerifyWinningPostResponse(ptr *FilVerifyWinningPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_winning_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyWriteWithAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:573 -func FilDestroyWriteWithAlignmentResponse(ptr *FilWriteWithAlignmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_write_with_alignment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyWriteWithoutAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:575 -func FilDestroyWriteWithoutAlignmentResponse(ptr *FilWriteWithoutAlignmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_write_without_alignment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyZeroSignatureResponse function as declared in filecoin-ffi/filcrypto.h:577 -func FilDestroyZeroSignatureResponse(ptr *FilZeroSignatureResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_zero_signature_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDropSignature function as declared in filecoin-ffi/filcrypto.h:582 -func FilDropSignature(sig []byte) { - csig, csigAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sig))) - C.fil_drop_signature(csig) - runtime.KeepAlive(csigAllocMap) -} - -// FilEmptySectorUpdateDecodeFrom function as declared in filecoin-ffi/filcrypto.h:588 -func FilEmptySectorUpdateDecodeFrom(registeredProof FilRegisteredUpdateProof, outDataPath string, replicaPath string, sectorKeyPath string, sectorKeyCacheDirPath string, commDNew Fil32ByteArray) *FilEmptySectorUpdateDecodeFromResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - outDataPath = safeString(outDataPath) - coutDataPath, coutDataPathAllocMap := unpackPCharString(outDataPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - sectorKeyPath = safeString(sectorKeyPath) - csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) - sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) - csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - __ret := C.fil_empty_sector_update_decode_from(cregisteredProof, coutDataPath, creplicaPath, csectorKeyPath, csectorKeyCacheDirPath, ccommDNew) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(sectorKeyCacheDirPath) - runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) - runtime.KeepAlive(sectorKeyPath) - runtime.KeepAlive(csectorKeyPathAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(outDataPath) - runtime.KeepAlive(coutDataPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilEmptySectorUpdateDecodeFromResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilEmptySectorUpdateEncodeInto function as declared in filecoin-ffi/filcrypto.h:599 -func FilEmptySectorUpdateEncodeInto(registeredProof FilRegisteredUpdateProof, newReplicaPath string, newCacheDirPath string, sectorKeyPath string, sectorKeyCacheDirPath string, stagedDataPath string, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilEmptySectorUpdateEncodeIntoResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - newReplicaPath = safeString(newReplicaPath) - cnewReplicaPath, cnewReplicaPathAllocMap := unpackPCharString(newReplicaPath) - newCacheDirPath = safeString(newCacheDirPath) - cnewCacheDirPath, cnewCacheDirPathAllocMap := unpackPCharString(newCacheDirPath) - sectorKeyPath = safeString(sectorKeyPath) - csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) - sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) - csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) - stagedDataPath = safeString(stagedDataPath) - cstagedDataPath, cstagedDataPathAllocMap := unpackPCharString(stagedDataPath) +// FilSealPreCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:666 +func FilSealPreCommitPhase1(registeredProof FilRegisteredSealProof, cacheDirPath string, stagedSectorPath string, sealedSectorPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealPreCommitPhase1Response { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + stagedSectorPath = safeString(stagedSectorPath) + cstagedSectorPath, cstagedSectorPathAllocMap := unpackPCharString(stagedSectorPath) + sealedSectorPath = safeString(sealedSectorPath) + csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_empty_sector_update_encode_into(cregisteredProof, cnewReplicaPath, cnewCacheDirPath, csectorKeyPath, csectorKeyCacheDirPath, cstagedDataPath, cpiecesPtr, cpiecesLen) + __ret := C.fil_seal_pre_commit_phase1(cregisteredProof, ccacheDirPath, cstagedSectorPath, csealedSectorPath, csectorId, cproverId, cticket, cpiecesPtr, cpiecesLen) runtime.KeepAlive(cpiecesLenAllocMap) packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(stagedDataPath) - runtime.KeepAlive(cstagedDataPathAllocMap) - runtime.KeepAlive(sectorKeyCacheDirPath) - runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) - runtime.KeepAlive(sectorKeyPath) - runtime.KeepAlive(csectorKeyPathAllocMap) - runtime.KeepAlive(newCacheDirPath) - runtime.KeepAlive(cnewCacheDirPathAllocMap) - runtime.KeepAlive(newReplicaPath) - runtime.KeepAlive(cnewReplicaPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilEmptySectorUpdateEncodeIntoResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilEmptySectorUpdateRemoveEncodedData function as declared in filecoin-ffi/filcrypto.h:612 -func FilEmptySectorUpdateRemoveEncodedData(registeredProof FilRegisteredUpdateProof, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string, dataPath string, commDNew Fil32ByteArray) *FilEmptySectorUpdateRemoveEncodedDataResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - sectorKeyPath = safeString(sectorKeyPath) - csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) - sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) - csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - replicaCachePath = safeString(replicaCachePath) - creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) - dataPath = safeString(dataPath) - cdataPath, cdataPathAllocMap := unpackPCharString(dataPath) - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - __ret := C.fil_empty_sector_update_remove_encoded_data(cregisteredProof, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath, cdataPath, ccommDNew) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(dataPath) - runtime.KeepAlive(cdataPathAllocMap) - runtime.KeepAlive(replicaCachePath) - runtime.KeepAlive(creplicaCachePathAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(sectorKeyCacheDirPath) - runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) - runtime.KeepAlive(sectorKeyPath) - runtime.KeepAlive(csectorKeyPathAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(sealedSectorPath) + runtime.KeepAlive(csealedSectorPathAllocMap) + runtime.KeepAlive(stagedSectorPath) + runtime.KeepAlive(cstagedSectorPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilEmptySectorUpdateRemoveEncodedDataResponseRef(unsafe.Pointer(__ret)) + __v := NewFilSealPreCommitPhase1ResponseRef(unsafe.Pointer(__ret)) return __v } -// FilFauxrep function as declared in filecoin-ffi/filcrypto.h:620 -func FilFauxrep(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorPath string) *FilFauxRepResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown +// FilSealPreCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:680 +func FilSealPreCommitPhase2(sealPreCommitPhase1OutputPtr []byte, sealPreCommitPhase1OutputLen uint, cacheDirPath string, sealedSectorPath string) *FilSealPreCommitPhase2Response { + csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealPreCommitPhase1OutputPtr))) + csealPreCommitPhase1OutputLen, csealPreCommitPhase1OutputLenAllocMap := (C.size_t)(sealPreCommitPhase1OutputLen), cgoAllocsUnknown cacheDirPath = safeString(cacheDirPath) ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) sealedSectorPath = safeString(sealedSectorPath) csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - __ret := C.fil_fauxrep(cregisteredProof, ccacheDirPath, csealedSectorPath) + __ret := C.fil_seal_pre_commit_phase2(csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputLen, ccacheDirPath, csealedSectorPath) runtime.KeepAlive(sealedSectorPath) runtime.KeepAlive(csealedSectorPathAllocMap) runtime.KeepAlive(cacheDirPath) runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) + runtime.KeepAlive(csealPreCommitPhase1OutputLenAllocMap) + runtime.KeepAlive(csealPreCommitPhase1OutputPtrAllocMap) + __v := NewFilSealPreCommitPhase2ResponseRef(unsafe.Pointer(__ret)) return __v } -// FilFauxrep2 function as declared in filecoin-ffi/filcrypto.h:624 -func FilFauxrep2(registeredProof FilRegisteredSealProof, cacheDirPath string, existingPAuxPath string) *FilFauxRepResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown +// FilSealCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:689 +func FilSealCommitPhase1(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, cacheDirPath string, replicaPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealCommitPhase1Response { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + ccommR, ccommRAllocMap := commR.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() cacheDirPath = safeString(cacheDirPath) ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - existingPAuxPath = safeString(existingPAuxPath) - cexistingPAuxPath, cexistingPAuxPathAllocMap := unpackPCharString(existingPAuxPath) - __ret := C.fil_fauxrep2(cregisteredProof, ccacheDirPath, cexistingPAuxPath) - runtime.KeepAlive(existingPAuxPath) - runtime.KeepAlive(cexistingPAuxPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateDataCommitment function as declared in filecoin-ffi/filcrypto.h:631 -func FilGenerateDataCommitment(registeredProof FilRegisteredSealProof, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilGenerateDataCommitmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + cseed, cseedAllocMap := seed.PassValue() cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_generate_data_commitment(cregisteredProof, cpiecesPtr, cpiecesLen) + __ret := C.fil_seal_commit_phase1(cregisteredProof, ccommR, ccommD, ccacheDirPath, creplicaPath, csectorId, cproverId, cticket, cseed, cpiecesPtr, cpiecesLen) runtime.KeepAlive(cpiecesLenAllocMap) packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) runtime.KeepAlive(cpiecesPtrAllocMap) + runtime.KeepAlive(cseedAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(ccommRAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateDataCommitmentResponseRef(unsafe.Pointer(__ret)) + __v := NewFilSealCommitPhase1ResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateEmptySectorUpdatePartitionProofs function as declared in filecoin-ffi/filcrypto.h:639 -func FilGenerateEmptySectorUpdatePartitionProofs(registeredProof FilRegisteredUpdateProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string) *FilPartitionProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - ccommROld, ccommROldAllocMap := commROld.PassValue() - ccommRNew, ccommRNewAllocMap := commRNew.PassValue() - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - sectorKeyPath = safeString(sectorKeyPath) - csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) - sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) - csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - replicaCachePath = safeString(replicaCachePath) - creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) - __ret := C.fil_generate_empty_sector_update_partition_proofs(cregisteredProof, ccommROld, ccommRNew, ccommDNew, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath) - runtime.KeepAlive(replicaCachePath) - runtime.KeepAlive(creplicaCachePathAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(sectorKeyCacheDirPath) - runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) - runtime.KeepAlive(sectorKeyPath) - runtime.KeepAlive(csectorKeyPathAllocMap) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(ccommRNewAllocMap) - runtime.KeepAlive(ccommROldAllocMap) +// FilSealCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:701 +func FilSealCommitPhase2(sealCommitPhase1OutputPtr []byte, sealCommitPhase1OutputLen uint, sectorId uint64, proverId Fil32ByteArray) *FilSealCommitPhase2Response { + csealCommitPhase1OutputPtr, csealCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealCommitPhase1OutputPtr))) + csealCommitPhase1OutputLen, csealCommitPhase1OutputLenAllocMap := (C.size_t)(sealCommitPhase1OutputLen), cgoAllocsUnknown + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_seal_commit_phase2(csealCommitPhase1OutputPtr, csealCommitPhase1OutputLen, csectorId, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(csealCommitPhase1OutputLenAllocMap) + runtime.KeepAlive(csealCommitPhase1OutputPtrAllocMap) + __v := NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilAggregateSealProofs function as declared in filecoin-ffi/filcrypto.h:706 +func FilAggregateSealProofs(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, commRsPtr []Fil32ByteArray, commRsLen uint, seedsPtr []Fil32ByteArray, seedsLen uint, sealCommitResponsesPtr []FilSealCommitPhase2Response, sealCommitResponsesLen uint) *FilAggregateProof { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cregisteredAggregation, cregisteredAggregationAllocMap := (C.enum_fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown + ccommRsPtr, ccommRsPtrAllocMap := unpackArgSFil32ByteArray(commRsPtr) + ccommRsLen, ccommRsLenAllocMap := (C.size_t)(commRsLen), cgoAllocsUnknown + cseedsPtr, cseedsPtrAllocMap := unpackArgSFil32ByteArray(seedsPtr) + cseedsLen, cseedsLenAllocMap := (C.size_t)(seedsLen), cgoAllocsUnknown + csealCommitResponsesPtr, csealCommitResponsesPtrAllocMap := unpackArgSFilSealCommitPhase2Response(sealCommitResponsesPtr) + csealCommitResponsesLen, csealCommitResponsesLenAllocMap := (C.size_t)(sealCommitResponsesLen), cgoAllocsUnknown + __ret := C.fil_aggregate_seal_proofs(cregisteredProof, cregisteredAggregation, ccommRsPtr, ccommRsLen, cseedsPtr, cseedsLen, csealCommitResponsesPtr, csealCommitResponsesLen) + runtime.KeepAlive(csealCommitResponsesLenAllocMap) + packSFilSealCommitPhase2Response(sealCommitResponsesPtr, csealCommitResponsesPtr) + runtime.KeepAlive(csealCommitResponsesPtrAllocMap) + runtime.KeepAlive(cseedsLenAllocMap) + packSFil32ByteArray(seedsPtr, cseedsPtr) + runtime.KeepAlive(cseedsPtrAllocMap) + runtime.KeepAlive(ccommRsLenAllocMap) + packSFil32ByteArray(commRsPtr, ccommRsPtr) + runtime.KeepAlive(ccommRsPtrAllocMap) + runtime.KeepAlive(cregisteredAggregationAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilPartitionProofResponseRef(unsafe.Pointer(__ret)) + __v := NewFilAggregateProofRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateEmptySectorUpdateProof function as declared in filecoin-ffi/filcrypto.h:652 -func FilGenerateEmptySectorUpdateProof(registeredProof FilRegisteredUpdateProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string) *FilEmptySectorUpdateProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - ccommROld, ccommROldAllocMap := commROld.PassValue() - ccommRNew, ccommRNewAllocMap := commRNew.PassValue() - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - sectorKeyPath = safeString(sectorKeyPath) - csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) - sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) - csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - replicaCachePath = safeString(replicaCachePath) - creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) - __ret := C.fil_generate_empty_sector_update_proof(cregisteredProof, ccommROld, ccommRNew, ccommDNew, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath) - runtime.KeepAlive(replicaCachePath) - runtime.KeepAlive(creplicaCachePathAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(sectorKeyCacheDirPath) - runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) - runtime.KeepAlive(sectorKeyPath) - runtime.KeepAlive(csectorKeyPathAllocMap) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(ccommRNewAllocMap) - runtime.KeepAlive(ccommROldAllocMap) +// FilVerifyAggregateSealProof function as declared in filecoin-ffi/filcrypto.h:719 +func FilVerifyAggregateSealProof(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, proverId Fil32ByteArray, proofPtr []byte, proofLen uint, commitInputsPtr []FilAggregationInputs, commitInputsLen uint) *FilVerifyAggregateSealProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cregisteredAggregation, cregisteredAggregationAllocMap := (C.enum_fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) + cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown + ccommitInputsPtr, ccommitInputsPtrAllocMap := unpackArgSFilAggregationInputs(commitInputsPtr) + ccommitInputsLen, ccommitInputsLenAllocMap := (C.size_t)(commitInputsLen), cgoAllocsUnknown + __ret := C.fil_verify_aggregate_seal_proof(cregisteredProof, cregisteredAggregation, cproverId, cproofPtr, cproofLen, ccommitInputsPtr, ccommitInputsLen) + runtime.KeepAlive(ccommitInputsLenAllocMap) + packSFilAggregationInputs(commitInputsPtr, ccommitInputsPtr) + runtime.KeepAlive(ccommitInputsPtrAllocMap) + runtime.KeepAlive(cproofLenAllocMap) + runtime.KeepAlive(cproofPtrAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(cregisteredAggregationAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) + __v := NewFilVerifyAggregateSealProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateEmptySectorUpdateProofWithVanilla function as declared in filecoin-ffi/filcrypto.h:665 -func FilGenerateEmptySectorUpdateProofWithVanilla(registeredProof FilRegisteredUpdateProof, vanillaProofsPtr []FilPartitionProof, vanillaProofsLen uint, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilEmptySectorUpdateProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilPartitionProof(vanillaProofsPtr) - cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown - ccommROld, ccommROldAllocMap := commROld.PassValue() - ccommRNew, ccommRNewAllocMap := commRNew.PassValue() - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - __ret := C.fil_generate_empty_sector_update_proof_with_vanilla(cregisteredProof, cvanillaProofsPtr, cvanillaProofsLen, ccommROld, ccommRNew, ccommDNew) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(ccommRNewAllocMap) - runtime.KeepAlive(ccommROldAllocMap) - runtime.KeepAlive(cvanillaProofsLenAllocMap) - packSFilPartitionProof(vanillaProofsPtr, cvanillaProofsPtr) - runtime.KeepAlive(cvanillaProofsPtrAllocMap) +// FilUnsealRange function as declared in filecoin-ffi/filcrypto.h:730 +func FilUnsealRange(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorFdRaw int32, unsealOutputFdRaw int32, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, commD Fil32ByteArray, unpaddedByteIndex uint64, unpaddedBytesAmount uint64) *FilUnsealRangeResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + csealedSectorFdRaw, csealedSectorFdRawAllocMap := (C.int)(sealedSectorFdRaw), cgoAllocsUnknown + cunsealOutputFdRaw, cunsealOutputFdRawAllocMap := (C.int)(unsealOutputFdRaw), cgoAllocsUnknown + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() + cunpaddedByteIndex, cunpaddedByteIndexAllocMap := (C.uint64_t)(unpaddedByteIndex), cgoAllocsUnknown + cunpaddedBytesAmount, cunpaddedBytesAmountAllocMap := (C.uint64_t)(unpaddedBytesAmount), cgoAllocsUnknown + __ret := C.fil_unseal_range(cregisteredProof, ccacheDirPath, csealedSectorFdRaw, cunsealOutputFdRaw, csectorId, cproverId, cticket, ccommD, cunpaddedByteIndex, cunpaddedBytesAmount) + runtime.KeepAlive(cunpaddedBytesAmountAllocMap) + runtime.KeepAlive(cunpaddedByteIndexAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(cunsealOutputFdRawAllocMap) + runtime.KeepAlive(csealedSectorFdRawAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) + __v := NewFilUnsealRangeResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilVerifySeal function as declared in filecoin-ffi/filcrypto.h:745 +func FilVerifySeal(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, sectorId uint64, proofPtr []byte, proofLen uint) *FilVerifySealResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + ccommR, ccommRAllocMap := commR.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + cseed, cseedAllocMap := seed.PassValue() + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) + cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown + __ret := C.fil_verify_seal(cregisteredProof, ccommR, ccommD, cproverId, cticket, cseed, csectorId, cproofPtr, cproofLen) + runtime.KeepAlive(cproofLenAllocMap) + runtime.KeepAlive(cproofPtrAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(cseedAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(ccommRAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilVerifySealResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:759 +func FilGenerateWinningPostSectorChallenge(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorSetLen uint64, proverId Fil32ByteArray) *FilGenerateWinningPoStSectorChallenge { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + crandomness, crandomnessAllocMap := randomness.PassValue() + csectorSetLen, csectorSetLenAllocMap := (C.uint64_t)(sectorSetLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_generate_winning_post_sector_challenge(cregisteredProof, crandomness, csectorSetLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorSetLenAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilGenerateWinningPoStSectorChallengeRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateFallbackSectorChallenges function as declared in filecoin-ffi/filcrypto.h:676 +// FilGenerateFallbackSectorChallenges function as declared in filecoin-ffi/filcrypto.h:768 func FilGenerateFallbackSectorChallenges(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorIdsPtr []uint64, sectorIdsLen uint, proverId Fil32ByteArray) *FilGenerateFallbackSectorChallengesResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown crandomness, crandomnessAllocMap := randomness.PassValue() csectorIdsPtr, csectorIdsPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(§orIdsPtr))) csectorIdsLen, csectorIdsLenAllocMap := (C.size_t)(sectorIdsLen), cgoAllocsUnknown @@ -606,20 +556,7 @@ func FilGenerateFallbackSectorChallenges(registeredProof FilRegisteredPoStProof, return __v } -// FilGeneratePieceCommitment function as declared in filecoin-ffi/filcrypto.h:686 -func FilGeneratePieceCommitment(registeredProof FilRegisteredSealProof, pieceFdRaw int32, unpaddedPieceSize uint64) *FilGeneratePieceCommitmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cpieceFdRaw, cpieceFdRawAllocMap := (C.int)(pieceFdRaw), cgoAllocsUnknown - cunpaddedPieceSize, cunpaddedPieceSizeAllocMap := (C.uint64_t)(unpaddedPieceSize), cgoAllocsUnknown - __ret := C.fil_generate_piece_commitment(cregisteredProof, cpieceFdRaw, cunpaddedPieceSize) - runtime.KeepAlive(cunpaddedPieceSizeAllocMap) - runtime.KeepAlive(cpieceFdRawAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGeneratePieceCommitmentResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateSingleVanillaProof function as declared in filecoin-ffi/filcrypto.h:694 +// FilGenerateSingleVanillaProof function as declared in filecoin-ffi/filcrypto.h:778 func FilGenerateSingleVanillaProof(replica FilPrivateReplicaInfo, challengesPtr []uint64, challengesLen uint) *FilGenerateSingleVanillaProofResponse { creplica, creplicaAllocMap := replica.PassValue() cchallengesPtr, cchallengesPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&challengesPtr))) @@ -632,45 +569,64 @@ func FilGenerateSingleVanillaProof(replica FilPrivateReplicaInfo, challengesPtr return __v } -// FilGenerateSingleWindowPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:702 -func FilGenerateSingleWindowPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint, partitionIndex uint) *FilGenerateSingleWindowPoStWithVanillaResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown +// FilGenerateWinningPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:786 +func FilGenerateWinningPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint) *FilGenerateWinningPoStResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown crandomness, crandomnessAllocMap := randomness.PassValue() cproverId, cproverIdAllocMap := proverId.PassValue() cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr) cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown - cpartitionIndex, cpartitionIndexAllocMap := (C.size_t)(partitionIndex), cgoAllocsUnknown - __ret := C.fil_generate_single_window_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen, cpartitionIndex) - runtime.KeepAlive(cpartitionIndexAllocMap) + __ret := C.fil_generate_winning_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen) runtime.KeepAlive(cvanillaProofsLenAllocMap) packSFilVanillaProof(vanillaProofsPtr, cvanillaProofsPtr) runtime.KeepAlive(cvanillaProofsPtrAllocMap) runtime.KeepAlive(cproverIdAllocMap) runtime.KeepAlive(crandomnessAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateSingleWindowPoStWithVanillaResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:713 -func FilGenerateWindowPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWindowPoStResponse { +// FilGenerateWinningPost function as declared in filecoin-ffi/filcrypto.h:796 +func FilGenerateWinningPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWinningPoStResponse { crandomness, crandomnessAllocMap := randomness.PassValue() creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_window_post(crandomness, creplicasPtr, creplicasLen, cproverId) + __ret := C.fil_generate_winning_post(crandomness, creplicasPtr, creplicasLen, cproverId) runtime.KeepAlive(cproverIdAllocMap) runtime.KeepAlive(creplicasLenAllocMap) packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) runtime.KeepAlive(creplicasPtrAllocMap) runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilVerifyWinningPost function as declared in filecoin-ffi/filcrypto.h:804 +func FilVerifyWinningPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWinningPoStResponse { + crandomness, crandomnessAllocMap := randomness.PassValue() + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) + cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_verify_winning_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(cproofsLenAllocMap) + packSFilPoStProof(proofsPtr, cproofsPtr) + runtime.KeepAlive(cproofsPtrAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilVerifyWinningPoStResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateWindowPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:722 +// FilGenerateWindowPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:815 func FilGenerateWindowPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint) *FilGenerateWindowPoStResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown crandomness, crandomnessAllocMap := randomness.PassValue() cproverId, cproverIdAllocMap := proverId.PassValue() cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr) @@ -686,74 +642,60 @@ func FilGenerateWindowPostWithVanilla(registeredProof FilRegisteredPoStProof, ra return __v } -// FilGenerateWinningPost function as declared in filecoin-ffi/filcrypto.h:732 -func FilGenerateWinningPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWinningPoStResponse { +// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:825 +func FilGenerateWindowPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWindowPoStResponse { crandomness, crandomnessAllocMap := randomness.PassValue() creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_winning_post(crandomness, creplicasPtr, creplicasLen, cproverId) + __ret := C.fil_generate_window_post(crandomness, creplicasPtr, creplicasLen, cproverId) runtime.KeepAlive(cproverIdAllocMap) runtime.KeepAlive(creplicasLenAllocMap) packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) runtime.KeepAlive(creplicasPtrAllocMap) runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:741 -func FilGenerateWinningPostSectorChallenge(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorSetLen uint64, proverId Fil32ByteArray) *FilGenerateWinningPoStSectorChallenge { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown +// FilVerifyWindowPost function as declared in filecoin-ffi/filcrypto.h:833 +func FilVerifyWindowPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWindowPoStResponse { crandomness, crandomnessAllocMap := randomness.PassValue() - csectorSetLen, csectorSetLenAllocMap := (C.uint64_t)(sectorSetLen), cgoAllocsUnknown + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) + cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_winning_post_sector_challenge(cregisteredProof, crandomness, csectorSetLen, cproverId) + __ret := C.fil_verify_window_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorSetLenAllocMap) + runtime.KeepAlive(cproofsLenAllocMap) + packSFilPoStProof(proofsPtr, cproofsPtr) + runtime.KeepAlive(cproofsPtrAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilVerifyWindowPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilMergeWindowPostPartitionProofs function as declared in filecoin-ffi/filcrypto.h:844 +func FilMergeWindowPostPartitionProofs(registeredProof FilRegisteredPoStProof, partitionProofsPtr []FilPartitionSnarkProof, partitionProofsLen uint) *FilMergeWindowPoStPartitionProofsResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + cpartitionProofsPtr, cpartitionProofsPtrAllocMap := unpackArgSFilPartitionSnarkProof(partitionProofsPtr) + cpartitionProofsLen, cpartitionProofsLenAllocMap := (C.size_t)(partitionProofsLen), cgoAllocsUnknown + __ret := C.fil_merge_window_post_partition_proofs(cregisteredProof, cpartitionProofsPtr, cpartitionProofsLen) + runtime.KeepAlive(cpartitionProofsLenAllocMap) + packSFilPartitionSnarkProof(partitionProofsPtr, cpartitionProofsPtr) + runtime.KeepAlive(cpartitionProofsPtrAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateWinningPoStSectorChallengeRef(unsafe.Pointer(__ret)) + __v := NewFilMergeWindowPoStPartitionProofsResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGenerateWinningPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:750 -func FilGenerateWinningPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint) *FilGenerateWinningPoStResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - crandomness, crandomnessAllocMap := randomness.PassValue() - cproverId, cproverIdAllocMap := proverId.PassValue() - cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr) - cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown - __ret := C.fil_generate_winning_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen) - runtime.KeepAlive(cvanillaProofsLenAllocMap) - packSFilVanillaProof(vanillaProofsPtr, cvanillaProofsPtr) - runtime.KeepAlive(cvanillaProofsPtrAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetGpuDevices function as declared in filecoin-ffi/filcrypto.h:759 -func FilGetGpuDevices() *FilGpuDeviceResponse { - __ret := C.fil_get_gpu_devices() - __v := NewFilGpuDeviceResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetMaxUserBytesPerStagedSector function as declared in filecoin-ffi/filcrypto.h:765 -func FilGetMaxUserBytesPerStagedSector(registeredProof FilRegisteredSealProof) uint64 { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_max_user_bytes_per_staged_sector(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := (uint64)(__ret) - return __v -} - -// FilGetNumPartitionForFallbackPost function as declared in filecoin-ffi/filcrypto.h:771 +// FilGetNumPartitionForFallbackPost function as declared in filecoin-ffi/filcrypto.h:852 func FilGetNumPartitionForFallbackPost(registeredProof FilRegisteredPoStProof, numSectors uint) *FilGetNumPartitionForFallbackPoStResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown cnumSectors, cnumSectorsAllocMap := (C.size_t)(numSectors), cgoAllocsUnknown __ret := C.fil_get_num_partition_for_fallback_post(cregisteredProof, cnumSectors) runtime.KeepAlive(cnumSectorsAllocMap) @@ -762,511 +704,653 @@ func FilGetNumPartitionForFallbackPost(registeredProof FilRegisteredPoStProof, n return __v } -// FilGetPostCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:778 -func FilGetPostCircuitIdentifier(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_circuit_identifier(cregisteredProof) +// FilGenerateSingleWindowPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:859 +func FilGenerateSingleWindowPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint, partitionIndex uint) *FilGenerateSingleWindowPoStWithVanillaResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + crandomness, crandomnessAllocMap := randomness.PassValue() + cproverId, cproverIdAllocMap := proverId.PassValue() + cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr) + cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown + cpartitionIndex, cpartitionIndexAllocMap := (C.size_t)(partitionIndex), cgoAllocsUnknown + __ret := C.fil_generate_single_window_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen, cpartitionIndex) + runtime.KeepAlive(cpartitionIndexAllocMap) + runtime.KeepAlive(cvanillaProofsLenAllocMap) + packSFilVanillaProof(vanillaProofsPtr, cvanillaProofsPtr) + runtime.KeepAlive(cvanillaProofsPtrAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(crandomnessAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGenerateSingleWindowPoStWithVanillaResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetPostParamsCid function as declared in filecoin-ffi/filcrypto.h:784 -func FilGetPostParamsCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_params_cid(cregisteredProof) +// FilEmptySectorUpdateEncodeInto function as declared in filecoin-ffi/filcrypto.h:870 +func FilEmptySectorUpdateEncodeInto(registeredProof FilRegisteredUpdateProof, newReplicaPath string, newCacheDirPath string, sectorKeyPath string, sectorKeyCacheDirPath string, stagedDataPath string, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilEmptySectorUpdateEncodeIntoResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + newReplicaPath = safeString(newReplicaPath) + cnewReplicaPath, cnewReplicaPathAllocMap := unpackPCharString(newReplicaPath) + newCacheDirPath = safeString(newCacheDirPath) + cnewCacheDirPath, cnewCacheDirPathAllocMap := unpackPCharString(newCacheDirPath) + sectorKeyPath = safeString(sectorKeyPath) + csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) + sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) + csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) + stagedDataPath = safeString(stagedDataPath) + cstagedDataPath, cstagedDataPathAllocMap := unpackPCharString(stagedDataPath) + cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) + cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown + __ret := C.fil_empty_sector_update_encode_into(cregisteredProof, cnewReplicaPath, cnewCacheDirPath, csectorKeyPath, csectorKeyCacheDirPath, cstagedDataPath, cpiecesPtr, cpiecesLen) + runtime.KeepAlive(cpiecesLenAllocMap) + packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) + runtime.KeepAlive(cpiecesPtrAllocMap) + runtime.KeepAlive(stagedDataPath) + runtime.KeepAlive(cstagedDataPathAllocMap) + runtime.KeepAlive(sectorKeyCacheDirPath) + runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) + runtime.KeepAlive(sectorKeyPath) + runtime.KeepAlive(csectorKeyPathAllocMap) + runtime.KeepAlive(newCacheDirPath) + runtime.KeepAlive(cnewCacheDirPathAllocMap) + runtime.KeepAlive(newReplicaPath) + runtime.KeepAlive(cnewReplicaPathAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilEmptySectorUpdateEncodeIntoResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetPostParamsPath function as declared in filecoin-ffi/filcrypto.h:791 -func FilGetPostParamsPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_params_path(cregisteredProof) +// FilEmptySectorUpdateDecodeFrom function as declared in filecoin-ffi/filcrypto.h:883 +func FilEmptySectorUpdateDecodeFrom(registeredProof FilRegisteredUpdateProof, outDataPath string, replicaPath string, sectorKeyPath string, sectorKeyCacheDirPath string, commDNew Fil32ByteArray) *FilEmptySectorUpdateDecodeFromResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + outDataPath = safeString(outDataPath) + coutDataPath, coutDataPathAllocMap := unpackPCharString(outDataPath) + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + sectorKeyPath = safeString(sectorKeyPath) + csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) + sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) + csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + __ret := C.fil_empty_sector_update_decode_from(cregisteredProof, coutDataPath, creplicaPath, csectorKeyPath, csectorKeyCacheDirPath, ccommDNew) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(sectorKeyCacheDirPath) + runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) + runtime.KeepAlive(sectorKeyPath) + runtime.KeepAlive(csectorKeyPathAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(outDataPath) + runtime.KeepAlive(coutDataPathAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilEmptySectorUpdateDecodeFromResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetPostVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:797 -func FilGetPostVerifyingKeyCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_verifying_key_cid(cregisteredProof) +// FilEmptySectorUpdateRemoveEncodedData function as declared in filecoin-ffi/filcrypto.h:894 +func FilEmptySectorUpdateRemoveEncodedData(registeredProof FilRegisteredUpdateProof, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string, dataPath string, commDNew Fil32ByteArray) *FilEmptySectorUpdateRemoveEncodedDataResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + sectorKeyPath = safeString(sectorKeyPath) + csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) + sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) + csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + replicaCachePath = safeString(replicaCachePath) + creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) + dataPath = safeString(dataPath) + cdataPath, cdataPathAllocMap := unpackPCharString(dataPath) + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + __ret := C.fil_empty_sector_update_remove_encoded_data(cregisteredProof, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath, cdataPath, ccommDNew) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(dataPath) + runtime.KeepAlive(cdataPathAllocMap) + runtime.KeepAlive(replicaCachePath) + runtime.KeepAlive(creplicaCachePathAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(sectorKeyCacheDirPath) + runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) + runtime.KeepAlive(sectorKeyPath) + runtime.KeepAlive(csectorKeyPathAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilEmptySectorUpdateRemoveEncodedDataResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetPostVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:804 -func FilGetPostVerifyingKeyPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_verifying_key_path(cregisteredProof) +// FilGenerateEmptySectorUpdatePartitionProofs function as declared in filecoin-ffi/filcrypto.h:906 +func FilGenerateEmptySectorUpdatePartitionProofs(registeredProof FilRegisteredUpdateProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string) *FilPartitionProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + ccommROld, ccommROldAllocMap := commROld.PassValue() + ccommRNew, ccommRNewAllocMap := commRNew.PassValue() + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + sectorKeyPath = safeString(sectorKeyPath) + csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) + sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) + csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + replicaCachePath = safeString(replicaCachePath) + creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) + __ret := C.fil_generate_empty_sector_update_partition_proofs(cregisteredProof, ccommROld, ccommRNew, ccommDNew, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath) + runtime.KeepAlive(replicaCachePath) + runtime.KeepAlive(creplicaCachePathAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(sectorKeyCacheDirPath) + runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) + runtime.KeepAlive(sectorKeyPath) + runtime.KeepAlive(csectorKeyPathAllocMap) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(ccommRNewAllocMap) + runtime.KeepAlive(ccommROldAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilPartitionProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetPostVersion function as declared in filecoin-ffi/filcrypto.h:810 -func FilGetPostVersion(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_version(cregisteredProof) +// FilVerifyEmptySectorUpdatePartitionProofs function as declared in filecoin-ffi/filcrypto.h:919 +func FilVerifyEmptySectorUpdatePartitionProofs(registeredProof FilRegisteredUpdateProof, proofsLen uint, proofsPtr []FilPartitionProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilVerifyPartitionProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown + cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPartitionProof(proofsPtr) + ccommROld, ccommROldAllocMap := commROld.PassValue() + ccommRNew, ccommRNewAllocMap := commRNew.PassValue() + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + __ret := C.fil_verify_empty_sector_update_partition_proofs(cregisteredProof, cproofsLen, cproofsPtr, ccommROld, ccommRNew, ccommDNew) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(ccommRNewAllocMap) + runtime.KeepAlive(ccommROldAllocMap) + packSFilPartitionProof(proofsPtr, cproofsPtr) + runtime.KeepAlive(cproofsPtrAllocMap) + runtime.KeepAlive(cproofsLenAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilVerifyPartitionProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:816 -func FilGetSealCircuitIdentifier(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_circuit_identifier(cregisteredProof) +// FilGenerateEmptySectorUpdateProofWithVanilla function as declared in filecoin-ffi/filcrypto.h:930 +func FilGenerateEmptySectorUpdateProofWithVanilla(registeredProof FilRegisteredUpdateProof, vanillaProofsPtr []FilPartitionProof, vanillaProofsLen uint, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilEmptySectorUpdateProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilPartitionProof(vanillaProofsPtr) + cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown + ccommROld, ccommROldAllocMap := commROld.PassValue() + ccommRNew, ccommRNewAllocMap := commRNew.PassValue() + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + __ret := C.fil_generate_empty_sector_update_proof_with_vanilla(cregisteredProof, cvanillaProofsPtr, cvanillaProofsLen, ccommROld, ccommRNew, ccommDNew) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(ccommRNewAllocMap) + runtime.KeepAlive(ccommROldAllocMap) + runtime.KeepAlive(cvanillaProofsLenAllocMap) + packSFilPartitionProof(vanillaProofsPtr, cvanillaProofsPtr) + runtime.KeepAlive(cvanillaProofsPtrAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealParamsCid function as declared in filecoin-ffi/filcrypto.h:822 -func FilGetSealParamsCid(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_params_cid(cregisteredProof) +// FilGenerateEmptySectorUpdateProof function as declared in filecoin-ffi/filcrypto.h:941 +func FilGenerateEmptySectorUpdateProof(registeredProof FilRegisteredUpdateProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray, sectorKeyPath string, sectorKeyCacheDirPath string, replicaPath string, replicaCachePath string) *FilEmptySectorUpdateProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + ccommROld, ccommROldAllocMap := commROld.PassValue() + ccommRNew, ccommRNewAllocMap := commRNew.PassValue() + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + sectorKeyPath = safeString(sectorKeyPath) + csectorKeyPath, csectorKeyPathAllocMap := unpackPCharString(sectorKeyPath) + sectorKeyCacheDirPath = safeString(sectorKeyCacheDirPath) + csectorKeyCacheDirPath, csectorKeyCacheDirPathAllocMap := unpackPCharString(sectorKeyCacheDirPath) + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + replicaCachePath = safeString(replicaCachePath) + creplicaCachePath, creplicaCachePathAllocMap := unpackPCharString(replicaCachePath) + __ret := C.fil_generate_empty_sector_update_proof(cregisteredProof, ccommROld, ccommRNew, ccommDNew, csectorKeyPath, csectorKeyCacheDirPath, creplicaPath, creplicaCachePath) + runtime.KeepAlive(replicaCachePath) + runtime.KeepAlive(creplicaCachePathAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(sectorKeyCacheDirPath) + runtime.KeepAlive(csectorKeyCacheDirPathAllocMap) + runtime.KeepAlive(sectorKeyPath) + runtime.KeepAlive(csectorKeyPathAllocMap) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(ccommRNewAllocMap) + runtime.KeepAlive(ccommROldAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealParamsPath function as declared in filecoin-ffi/filcrypto.h:829 -func FilGetSealParamsPath(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_params_path(cregisteredProof) +// FilVerifyEmptySectorUpdateProof function as declared in filecoin-ffi/filcrypto.h:954 +func FilVerifyEmptySectorUpdateProof(registeredProof FilRegisteredUpdateProof, proofPtr []byte, proofLen uint, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilVerifyEmptySectorUpdateProofResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown + cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) + cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown + ccommROld, ccommROldAllocMap := commROld.PassValue() + ccommRNew, ccommRNewAllocMap := commRNew.PassValue() + ccommDNew, ccommDNewAllocMap := commDNew.PassValue() + __ret := C.fil_verify_empty_sector_update_proof(cregisteredProof, cproofPtr, cproofLen, ccommROld, ccommRNew, ccommDNew) + runtime.KeepAlive(ccommDNewAllocMap) + runtime.KeepAlive(ccommRNewAllocMap) + runtime.KeepAlive(ccommROldAllocMap) + runtime.KeepAlive(cproofLenAllocMap) + runtime.KeepAlive(cproofPtrAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilVerifyEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:835 -func FilGetSealVerifyingKeyCid(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_verifying_key_cid(cregisteredProof) +// FilGeneratePieceCommitment function as declared in filecoin-ffi/filcrypto.h:965 +func FilGeneratePieceCommitment(registeredProof FilRegisteredSealProof, pieceFdRaw int32, unpaddedPieceSize uint64) *FilGeneratePieceCommitmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cpieceFdRaw, cpieceFdRawAllocMap := (C.int)(pieceFdRaw), cgoAllocsUnknown + cunpaddedPieceSize, cunpaddedPieceSizeAllocMap := (C.uint64_t)(unpaddedPieceSize), cgoAllocsUnknown + __ret := C.fil_generate_piece_commitment(cregisteredProof, cpieceFdRaw, cunpaddedPieceSize) + runtime.KeepAlive(cunpaddedPieceSizeAllocMap) + runtime.KeepAlive(cpieceFdRawAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGeneratePieceCommitmentResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:842 -func FilGetSealVerifyingKeyPath(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_verifying_key_path(cregisteredProof) +// FilGenerateDataCommitment function as declared in filecoin-ffi/filcrypto.h:972 +func FilGenerateDataCommitment(registeredProof FilRegisteredSealProof, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilGenerateDataCommitmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) + cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown + __ret := C.fil_generate_data_commitment(cregisteredProof, cpiecesPtr, cpiecesLen) + runtime.KeepAlive(cpiecesLenAllocMap) + packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) + runtime.KeepAlive(cpiecesPtrAllocMap) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + __v := NewFilGenerateDataCommitmentResponseRef(unsafe.Pointer(__ret)) return __v } -// FilGetSealVersion function as declared in filecoin-ffi/filcrypto.h:848 -func FilGetSealVersion(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_version(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v +// FilClearCache function as declared in filecoin-ffi/filcrypto.h:976 +func FilClearCache(sectorSize uint64, cacheDirPath string) *FilClearCacheResponse { + csectorSize, csectorSizeAllocMap := (C.uint64_t)(sectorSize), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + __ret := C.fil_clear_cache(csectorSize, ccacheDirPath) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(csectorSizeAllocMap) + __v := NewFilClearCacheResponseRef(unsafe.Pointer(__ret)) + return __v } -// FilHash function as declared in filecoin-ffi/filcrypto.h:858 -func FilHash(messagePtr []byte, messageLen uint) *FilHashResponse { - cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr))) - cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown - __ret := C.fil_hash(cmessagePtr, cmessageLen) - runtime.KeepAlive(cmessageLenAllocMap) - runtime.KeepAlive(cmessagePtrAllocMap) - __v := NewFilHashResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyWriteWithAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:978 +func FilDestroyWriteWithAlignmentResponse(ptr *FilWriteWithAlignmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_write_with_alignment_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilHashVerify function as declared in filecoin-ffi/filcrypto.h:872 -func FilHashVerify(signaturePtr []byte, flattenedMessagesPtr []byte, flattenedMessagesLen uint, messageSizesPtr []uint, messageSizesLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 { - csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr))) - cflattenedMessagesPtr, cflattenedMessagesPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedMessagesPtr))) - cflattenedMessagesLen, cflattenedMessagesLenAllocMap := (C.size_t)(flattenedMessagesLen), cgoAllocsUnknown - cmessageSizesPtr, cmessageSizesPtrAllocMap := copyPSizeTBytes((*sliceHeader)(unsafe.Pointer(&messageSizesPtr))) - cmessageSizesLen, cmessageSizesLenAllocMap := (C.size_t)(messageSizesLen), cgoAllocsUnknown - cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr))) - cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown - __ret := C.fil_hash_verify(csignaturePtr, cflattenedMessagesPtr, cflattenedMessagesLen, cmessageSizesPtr, cmessageSizesLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) - runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) - runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) - runtime.KeepAlive(cmessageSizesLenAllocMap) - runtime.KeepAlive(cmessageSizesPtrAllocMap) - runtime.KeepAlive(cflattenedMessagesLenAllocMap) - runtime.KeepAlive(cflattenedMessagesPtrAllocMap) - runtime.KeepAlive(csignaturePtrAllocMap) - __v := (int32)(__ret) +// FilDestroyWriteWithoutAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:980 +func FilDestroyWriteWithoutAlignmentResponse(ptr *FilWriteWithoutAlignmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_write_without_alignment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyFauxrepResponse function as declared in filecoin-ffi/filcrypto.h:982 +func FilDestroyFauxrepResponse(ptr *FilFauxRepResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_fauxrep_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealPreCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:984 +func FilDestroySealPreCommitPhase1Response(ptr *FilSealPreCommitPhase1Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_pre_commit_phase1_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealPreCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:986 +func FilDestroySealPreCommitPhase2Response(ptr *FilSealPreCommitPhase2Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_pre_commit_phase2_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:988 +func FilDestroySealCommitPhase1Response(ptr *FilSealCommitPhase1Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_commit_phase1_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:990 +func FilDestroySealCommitPhase2Response(ptr *FilSealCommitPhase2Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_commit_phase2_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyUnsealRangeResponse function as declared in filecoin-ffi/filcrypto.h:992 +func FilDestroyUnsealRangeResponse(ptr *FilUnsealRangeResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_unseal_range_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGeneratePieceCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:994 +func FilDestroyGeneratePieceCommitmentResponse(ptr *FilGeneratePieceCommitmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_piece_commitment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateDataCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:996 +func FilDestroyGenerateDataCommitmentResponse(ptr *FilGenerateDataCommitmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_data_commitment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyStringResponse function as declared in filecoin-ffi/filcrypto.h:998 +func FilDestroyStringResponse(ptr *FilStringResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_string_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilGetMaxUserBytesPerStagedSector function as declared in filecoin-ffi/filcrypto.h:1004 +func FilGetMaxUserBytesPerStagedSector(registeredProof FilRegisteredSealProof) uint64 { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_max_user_bytes_per_staged_sector(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := (uint64)(__ret) return __v } -// FilInitLogFd function as declared in filecoin-ffi/filcrypto.h:889 -func FilInitLogFd(logFd int32) *FilInitLogFdResponse { - clogFd, clogFdAllocMap := (C.int)(logFd), cgoAllocsUnknown - __ret := C.fil_init_log_fd(clogFd) - runtime.KeepAlive(clogFdAllocMap) - __v := NewFilInitLogFdResponseRef(unsafe.Pointer(__ret)) +// FilGetSealParamsCid function as declared in filecoin-ffi/filcrypto.h:1010 +func FilGetSealParamsCid(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_params_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilMergeWindowPostPartitionProofs function as declared in filecoin-ffi/filcrypto.h:895 -func FilMergeWindowPostPartitionProofs(registeredProof FilRegisteredPoStProof, partitionProofsPtr []FilPartitionSnarkProof, partitionProofsLen uint) *FilMergeWindowPoStPartitionProofsResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - cpartitionProofsPtr, cpartitionProofsPtrAllocMap := unpackArgSFilPartitionSnarkProof(partitionProofsPtr) - cpartitionProofsLen, cpartitionProofsLenAllocMap := (C.size_t)(partitionProofsLen), cgoAllocsUnknown - __ret := C.fil_merge_window_post_partition_proofs(cregisteredProof, cpartitionProofsPtr, cpartitionProofsLen) - runtime.KeepAlive(cpartitionProofsLenAllocMap) - packSFilPartitionSnarkProof(partitionProofsPtr, cpartitionProofsPtr) - runtime.KeepAlive(cpartitionProofsPtrAllocMap) +// FilGetSealVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:1016 +func FilGetSealVerifyingKeyCid(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_verifying_key_cid(cregisteredProof) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilMergeWindowPoStPartitionProofsResponseRef(unsafe.Pointer(__ret)) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilPrivateKeyGenerate function as declared in filecoin-ffi/filcrypto.h:902 -func FilPrivateKeyGenerate() *FilPrivateKeyGenerateResponse { - __ret := C.fil_private_key_generate() - __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) +// FilGetSealParamsPath function as declared in filecoin-ffi/filcrypto.h:1023 +func FilGetSealParamsPath(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_params_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilPrivateKeyGenerateWithSeed function as declared in filecoin-ffi/filcrypto.h:915 -func FilPrivateKeyGenerateWithSeed(rawSeed Fil32ByteArray) *FilPrivateKeyGenerateResponse { - crawSeed, crawSeedAllocMap := rawSeed.PassValue() - __ret := C.fil_private_key_generate_with_seed(crawSeed) - runtime.KeepAlive(crawSeedAllocMap) - __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) +// FilGetSealVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:1030 +func FilGetSealVerifyingKeyPath(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_verifying_key_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilPrivateKeyPublicKey function as declared in filecoin-ffi/filcrypto.h:926 -func FilPrivateKeyPublicKey(rawPrivateKeyPtr []byte) *FilPrivateKeyPublicKeyResponse { - crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr))) - __ret := C.fil_private_key_public_key(crawPrivateKeyPtr) - runtime.KeepAlive(crawPrivateKeyPtrAllocMap) - __v := NewFilPrivateKeyPublicKeyResponseRef(unsafe.Pointer(__ret)) +// FilGetSealCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:1036 +func FilGetSealCircuitIdentifier(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_circuit_identifier(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilPrivateKeySign function as declared in filecoin-ffi/filcrypto.h:939 -func FilPrivateKeySign(rawPrivateKeyPtr []byte, messagePtr []byte, messageLen uint) *FilPrivateKeySignResponse { - crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr))) - cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr))) - cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown - __ret := C.fil_private_key_sign(crawPrivateKeyPtr, cmessagePtr, cmessageLen) - runtime.KeepAlive(cmessageLenAllocMap) - runtime.KeepAlive(cmessagePtrAllocMap) - runtime.KeepAlive(crawPrivateKeyPtrAllocMap) - __v := NewFilPrivateKeySignResponseRef(unsafe.Pointer(__ret)) +// FilGetSealVersion function as declared in filecoin-ffi/filcrypto.h:1042 +func FilGetSealVersion(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_version(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilSealCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:947 -func FilSealCommitPhase1(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, cacheDirPath string, replicaPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealCommitPhase1Response { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - ccommR, ccommRAllocMap := commR.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cseed, cseedAllocMap := seed.PassValue() - cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) - cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_seal_commit_phase1(cregisteredProof, ccommR, ccommD, ccacheDirPath, creplicaPath, csectorId, cproverId, cticket, cseed, cpiecesPtr, cpiecesLen) - runtime.KeepAlive(cpiecesLenAllocMap) - packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) - runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(cseedAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(ccommRAllocMap) +// FilGetPostParamsCid function as declared in filecoin-ffi/filcrypto.h:1048 +func FilGetPostParamsCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_params_cid(cregisteredProof) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilSealCommitPhase1ResponseRef(unsafe.Pointer(__ret)) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilSealCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:959 -func FilSealCommitPhase2(sealCommitPhase1OutputPtr []byte, sealCommitPhase1OutputLen uint, sectorId uint64, proverId Fil32ByteArray) *FilSealCommitPhase2Response { - csealCommitPhase1OutputPtr, csealCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealCommitPhase1OutputPtr))) - csealCommitPhase1OutputLen, csealCommitPhase1OutputLenAllocMap := (C.size_t)(sealCommitPhase1OutputLen), cgoAllocsUnknown - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_seal_commit_phase2(csealCommitPhase1OutputPtr, csealCommitPhase1OutputLen, csectorId, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(csealCommitPhase1OutputLenAllocMap) - runtime.KeepAlive(csealCommitPhase1OutputPtrAllocMap) - __v := NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(__ret)) +// FilGetPostVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:1054 +func FilGetPostVerifyingKeyCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_verifying_key_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilSealPreCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:968 -func FilSealPreCommitPhase1(registeredProof FilRegisteredSealProof, cacheDirPath string, stagedSectorPath string, sealedSectorPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealPreCommitPhase1Response { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - stagedSectorPath = safeString(stagedSectorPath) - cstagedSectorPath, cstagedSectorPathAllocMap := unpackPCharString(stagedSectorPath) - sealedSectorPath = safeString(sealedSectorPath) - csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) - cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_seal_pre_commit_phase1(cregisteredProof, ccacheDirPath, cstagedSectorPath, csealedSectorPath, csectorId, cproverId, cticket, cpiecesPtr, cpiecesLen) - runtime.KeepAlive(cpiecesLenAllocMap) - packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) - runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(sealedSectorPath) - runtime.KeepAlive(csealedSectorPathAllocMap) - runtime.KeepAlive(stagedSectorPath) - runtime.KeepAlive(cstagedSectorPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) +// FilGetPostParamsPath function as declared in filecoin-ffi/filcrypto.h:1061 +func FilGetPostParamsPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_params_path(cregisteredProof) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilSealPreCommitPhase1ResponseRef(unsafe.Pointer(__ret)) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilSealPreCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:982 -func FilSealPreCommitPhase2(sealPreCommitPhase1OutputPtr []byte, sealPreCommitPhase1OutputLen uint, cacheDirPath string, sealedSectorPath string) *FilSealPreCommitPhase2Response { - csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealPreCommitPhase1OutputPtr))) - csealPreCommitPhase1OutputLen, csealPreCommitPhase1OutputLenAllocMap := (C.size_t)(sealPreCommitPhase1OutputLen), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - sealedSectorPath = safeString(sealedSectorPath) - csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - __ret := C.fil_seal_pre_commit_phase2(csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputLen, ccacheDirPath, csealedSectorPath) - runtime.KeepAlive(sealedSectorPath) - runtime.KeepAlive(csealedSectorPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(csealPreCommitPhase1OutputLenAllocMap) - runtime.KeepAlive(csealPreCommitPhase1OutputPtrAllocMap) - __v := NewFilSealPreCommitPhase2ResponseRef(unsafe.Pointer(__ret)) +// FilGetPostVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:1068 +func FilGetPostVerifyingKeyPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_verifying_key_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilUnsealRange function as declared in filecoin-ffi/filcrypto.h:990 -func FilUnsealRange(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorFdRaw int32, unsealOutputFdRaw int32, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, commD Fil32ByteArray, unpaddedByteIndex uint64, unpaddedBytesAmount uint64) *FilUnsealRangeResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - csealedSectorFdRaw, csealedSectorFdRawAllocMap := (C.int)(sealedSectorFdRaw), cgoAllocsUnknown - cunsealOutputFdRaw, cunsealOutputFdRawAllocMap := (C.int)(unsealOutputFdRaw), cgoAllocsUnknown - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cunpaddedByteIndex, cunpaddedByteIndexAllocMap := (C.uint64_t)(unpaddedByteIndex), cgoAllocsUnknown - cunpaddedBytesAmount, cunpaddedBytesAmountAllocMap := (C.uint64_t)(unpaddedBytesAmount), cgoAllocsUnknown - __ret := C.fil_unseal_range(cregisteredProof, ccacheDirPath, csealedSectorFdRaw, cunsealOutputFdRaw, csectorId, cproverId, cticket, ccommD, cunpaddedByteIndex, cunpaddedBytesAmount) - runtime.KeepAlive(cunpaddedBytesAmountAllocMap) - runtime.KeepAlive(cunpaddedByteIndexAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(cunsealOutputFdRawAllocMap) - runtime.KeepAlive(csealedSectorFdRawAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) +// FilGetPostCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:1074 +func FilGetPostCircuitIdentifier(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_circuit_identifier(cregisteredProof) runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilUnsealRangeResponseRef(unsafe.Pointer(__ret)) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilVerify function as declared in filecoin-ffi/filcrypto.h:1012 -func FilVerify(signaturePtr []byte, flattenedDigestsPtr []byte, flattenedDigestsLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 { - csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr))) - cflattenedDigestsPtr, cflattenedDigestsPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedDigestsPtr))) - cflattenedDigestsLen, cflattenedDigestsLenAllocMap := (C.size_t)(flattenedDigestsLen), cgoAllocsUnknown - cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr))) - cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown - __ret := C.fil_verify(csignaturePtr, cflattenedDigestsPtr, cflattenedDigestsLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) - runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) - runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) - runtime.KeepAlive(cflattenedDigestsLenAllocMap) - runtime.KeepAlive(cflattenedDigestsPtrAllocMap) - runtime.KeepAlive(csignaturePtrAllocMap) - __v := (int32)(__ret) +// FilGetPostVersion function as declared in filecoin-ffi/filcrypto.h:1080 +func FilGetPostVersion(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.enum_fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_version(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) return __v } -// FilVerifyAggregateSealProof function as declared in filecoin-ffi/filcrypto.h:1022 -func FilVerifyAggregateSealProof(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, proverId Fil32ByteArray, proofPtr []byte, proofLen uint, commitInputsPtr []FilAggregationInputs, commitInputsLen uint) *FilVerifyAggregateSealProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) - cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown - ccommitInputsPtr, ccommitInputsPtrAllocMap := unpackArgSFilAggregationInputs(commitInputsPtr) - ccommitInputsLen, ccommitInputsLenAllocMap := (C.size_t)(commitInputsLen), cgoAllocsUnknown - __ret := C.fil_verify_aggregate_seal_proof(cregisteredProof, cregisteredAggregation, cproverId, cproofPtr, cproofLen, ccommitInputsPtr, ccommitInputsLen) - runtime.KeepAlive(ccommitInputsLenAllocMap) - packSFilAggregationInputs(commitInputsPtr, ccommitInputsPtr) - runtime.KeepAlive(ccommitInputsPtrAllocMap) - runtime.KeepAlive(cproofLenAllocMap) - runtime.KeepAlive(cproofPtrAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(cregisteredAggregationAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilVerifyAggregateSealProofResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyVerifySealResponse function as declared in filecoin-ffi/filcrypto.h:1086 +func FilDestroyVerifySealResponse(ptr *FilVerifySealResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_seal_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilVerifyEmptySectorUpdatePartitionProofs function as declared in filecoin-ffi/filcrypto.h:1034 -func FilVerifyEmptySectorUpdatePartitionProofs(registeredProof FilRegisteredUpdateProof, proofsLen uint, proofsPtr []FilPartitionProof, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilVerifyPartitionProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown - cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPartitionProof(proofsPtr) - ccommROld, ccommROldAllocMap := commROld.PassValue() - ccommRNew, ccommRNewAllocMap := commRNew.PassValue() - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - __ret := C.fil_verify_empty_sector_update_partition_proofs(cregisteredProof, cproofsLen, cproofsPtr, ccommROld, ccommRNew, ccommDNew) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(ccommRNewAllocMap) - runtime.KeepAlive(ccommROldAllocMap) - packSFilPartitionProof(proofsPtr, cproofsPtr) - runtime.KeepAlive(cproofsPtrAllocMap) - runtime.KeepAlive(cproofsLenAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilVerifyPartitionProofResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyVerifyAggregateSealResponse function as declared in filecoin-ffi/filcrypto.h:1092 +func FilDestroyVerifyAggregateSealResponse(ptr *FilVerifyAggregateSealProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_aggregate_seal_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilVerifyEmptySectorUpdateProof function as declared in filecoin-ffi/filcrypto.h:1045 -func FilVerifyEmptySectorUpdateProof(registeredProof FilRegisteredUpdateProof, proofPtr []byte, proofLen uint, commROld Fil32ByteArray, commRNew Fil32ByteArray, commDNew Fil32ByteArray) *FilVerifyEmptySectorUpdateProofResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredUpdateProof)(registeredProof), cgoAllocsUnknown - cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) - cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown - ccommROld, ccommROldAllocMap := commROld.PassValue() - ccommRNew, ccommRNewAllocMap := commRNew.PassValue() - ccommDNew, ccommDNewAllocMap := commDNew.PassValue() - __ret := C.fil_verify_empty_sector_update_proof(cregisteredProof, cproofPtr, cproofLen, ccommROld, ccommRNew, ccommDNew) - runtime.KeepAlive(ccommDNewAllocMap) - runtime.KeepAlive(ccommRNewAllocMap) - runtime.KeepAlive(ccommROldAllocMap) - runtime.KeepAlive(cproofLenAllocMap) - runtime.KeepAlive(cproofPtrAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilVerifyEmptySectorUpdateProofResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyFinalizeTicketResponse function as declared in filecoin-ffi/filcrypto.h:1094 +func FilDestroyFinalizeTicketResponse(ptr *FilFinalizeTicketResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_finalize_ticket_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilVerifySeal function as declared in filecoin-ffi/filcrypto.h:1056 -func FilVerifySeal(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, sectorId uint64, proofPtr []byte, proofLen uint) *FilVerifySealResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - ccommR, ccommRAllocMap := commR.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cseed, cseedAllocMap := seed.PassValue() - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr))) - cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown - __ret := C.fil_verify_seal(cregisteredProof, ccommR, ccommD, cproverId, cticket, cseed, csectorId, cproofPtr, cproofLen) - runtime.KeepAlive(cproofLenAllocMap) - runtime.KeepAlive(cproofPtrAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(cseedAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(ccommRAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilVerifySealResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyVerifyWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:1100 +func FilDestroyVerifyWinningPostResponse(ptr *FilVerifyWinningPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_winning_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilVerifyWindowPost function as declared in filecoin-ffi/filcrypto.h:1069 -func FilVerifyWindowPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWindowPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) - cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_verify_window_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(cproofsLenAllocMap) - packSFilPoStProof(proofsPtr, cproofsPtr) - runtime.KeepAlive(cproofsPtrAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilVerifyWindowPoStResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyVerifyWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:1102 +func FilDestroyVerifyWindowPostResponse(ptr *FilVerifyWindowPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_window_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilVerifyWinningPost function as declared in filecoin-ffi/filcrypto.h:1079 -func FilVerifyWinningPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWinningPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) - cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_verify_winning_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(cproofsLenAllocMap) - packSFilPoStProof(proofsPtr, cproofsPtr) - runtime.KeepAlive(cproofsPtrAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilVerifyWinningPoStResponseRef(unsafe.Pointer(__ret)) - return __v +// FilDestroyGenerateFallbackSectorChallengesResponse function as declared in filecoin-ffi/filcrypto.h:1104 +func FilDestroyGenerateFallbackSectorChallengesResponse(ptr *FilGenerateFallbackSectorChallengesResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_fallback_sector_challenges_response(cptr) + runtime.KeepAlive(cptrAllocMap) } -// FilWriteWithAlignment function as declared in filecoin-ffi/filcrypto.h:1090 -func FilWriteWithAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32, existingPieceSizesPtr []uint64, existingPieceSizesLen uint) *FilWriteWithAlignmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown - csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown - cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown - cexistingPieceSizesPtr, cexistingPieceSizesPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&existingPieceSizesPtr))) - cexistingPieceSizesLen, cexistingPieceSizesLenAllocMap := (C.size_t)(existingPieceSizesLen), cgoAllocsUnknown - __ret := C.fil_write_with_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd, cexistingPieceSizesPtr, cexistingPieceSizesLen) - runtime.KeepAlive(cexistingPieceSizesLenAllocMap) - runtime.KeepAlive(cexistingPieceSizesPtrAllocMap) - runtime.KeepAlive(cdstFdAllocMap) - runtime.KeepAlive(csrcSizeAllocMap) - runtime.KeepAlive(csrcFdAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilWriteWithAlignmentResponseRef(unsafe.Pointer(__ret)) +// FilDestroyGenerateSingleVanillaProofResponse function as declared in filecoin-ffi/filcrypto.h:1106 +func FilDestroyGenerateSingleVanillaProofResponse(ptr *FilGenerateSingleVanillaProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_single_vanilla_proof_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateSingleWindowPostWithVanillaResponse function as declared in filecoin-ffi/filcrypto.h:1108 +func FilDestroyGenerateSingleWindowPostWithVanillaResponse(ptr *FilGenerateSingleWindowPoStWithVanillaResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_single_window_post_with_vanilla_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGetNumPartitionForFallbackPostResponse function as declared in filecoin-ffi/filcrypto.h:1110 +func FilDestroyGetNumPartitionForFallbackPostResponse(ptr *FilGetNumPartitionForFallbackPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_get_num_partition_for_fallback_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyMergeWindowPostPartitionProofsResponse function as declared in filecoin-ffi/filcrypto.h:1112 +func FilDestroyMergeWindowPostPartitionProofsResponse(ptr *FilMergeWindowPoStPartitionProofsResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_merge_window_post_partition_proofs_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:1114 +func FilDestroyGenerateWinningPostResponse(ptr *FilGenerateWinningPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_winning_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:1116 +func FilDestroyGenerateWindowPostResponse(ptr *FilGenerateWindowPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_window_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:1118 +func FilDestroyGenerateWinningPostSectorChallenge(ptr *FilGenerateWinningPoStSectorChallenge) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_winning_post_sector_challenge(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyClearCacheResponse function as declared in filecoin-ffi/filcrypto.h:1120 +func FilDestroyClearCacheResponse(ptr *FilClearCacheResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_clear_cache_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyAggregateProof function as declared in filecoin-ffi/filcrypto.h:1126 +func FilDestroyAggregateProof(ptr *FilAggregateProof) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_aggregate_proof(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyEmptySectorUpdateGenerateProofResponse function as declared in filecoin-ffi/filcrypto.h:1132 +func FilDestroyEmptySectorUpdateGenerateProofResponse(ptr *FilEmptySectorUpdateProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_empty_sector_update_generate_proof_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyEmptySectorUpdateVerifyProofResponse function as declared in filecoin-ffi/filcrypto.h:1138 +func FilDestroyEmptySectorUpdateVerifyProofResponse(ptr *FilVerifyEmptySectorUpdateProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_empty_sector_update_verify_proof_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateEmptySectorUpdatePartitionProofResponse function as declared in filecoin-ffi/filcrypto.h:1144 +func FilDestroyGenerateEmptySectorUpdatePartitionProofResponse(ptr *FilPartitionProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_empty_sector_update_partition_proof_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyVerifyEmptySectorUpdatePartitionProofResponse function as declared in filecoin-ffi/filcrypto.h:1150 +func FilDestroyVerifyEmptySectorUpdatePartitionProofResponse(ptr *FilVerifyPartitionProofResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_empty_sector_update_partition_proof_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyEmptySectorUpdateEncodeIntoResponse function as declared in filecoin-ffi/filcrypto.h:1156 +func FilDestroyEmptySectorUpdateEncodeIntoResponse(ptr *FilEmptySectorUpdateEncodeIntoResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_empty_sector_update_encode_into_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyEmptySectorUpdateDecodeFromResponse function as declared in filecoin-ffi/filcrypto.h:1162 +func FilDestroyEmptySectorUpdateDecodeFromResponse(ptr *FilEmptySectorUpdateDecodeFromResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_empty_sector_update_decode_from_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyEmptySectorUpdateRemoveEncodedDataResponse function as declared in filecoin-ffi/filcrypto.h:1168 +func FilDestroyEmptySectorUpdateRemoveEncodedDataResponse(ptr *FilEmptySectorUpdateRemoveEncodedDataResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_empty_sector_update_remove_encoded_data_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilGetGpuDevices function as declared in filecoin-ffi/filcrypto.h:1173 +func FilGetGpuDevices() *FilGpuDeviceResponse { + __ret := C.fil_get_gpu_devices() + __v := NewFilGpuDeviceResponseRef(unsafe.Pointer(__ret)) return __v } -// FilWriteWithoutAlignment function as declared in filecoin-ffi/filcrypto.h:1101 -func FilWriteWithoutAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32) *FilWriteWithoutAlignmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown - csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown - cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown - __ret := C.fil_write_without_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd) - runtime.KeepAlive(cdstFdAllocMap) - runtime.KeepAlive(csrcSizeAllocMap) - runtime.KeepAlive(csrcFdAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilWriteWithoutAlignmentResponseRef(unsafe.Pointer(__ret)) +// FilInitLogFd function as declared in filecoin-ffi/filcrypto.h:1184 +func FilInitLogFd(logFd int32) *FilInitLogFdResponse { + clogFd, clogFdAllocMap := (C.int)(logFd), cgoAllocsUnknown + __ret := C.fil_init_log_fd(clogFd) + runtime.KeepAlive(clogFdAllocMap) + __v := NewFilInitLogFdResponseRef(unsafe.Pointer(__ret)) return __v } + +// FilDestroyGpuDeviceResponse function as declared in filecoin-ffi/filcrypto.h:1186 +func FilDestroyGpuDeviceResponse(ptr *FilGpuDeviceResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_gpu_device_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyInitLogFdResponse function as declared in filecoin-ffi/filcrypto.h:1188 +func FilDestroyInitLogFdResponse(ptr *FilInitLogFdResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_init_log_fd_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} diff --git a/generated/types.go b/generated/types.go index 1345ed12..da0319c6 100644 --- a/generated/types.go +++ b/generated/types.go @@ -4,130 +4,150 @@ package generated /* -#cgo LDFLAGS: -L${SRCDIR}/.. +#cgo linux LDFLAGS: -L${SRCDIR}/.. -Wl,-unresolved-symbols=ignore-all +#cgo darwin LDFLAGS: -L${SRCDIR}/.. -Wl,-undefined,dynamic_lookup #cgo pkg-config: ${SRCDIR}/../filcrypto.pc #include "../filcrypto.h" #include #include "cgo_helpers.h" */ import "C" +import "unsafe" -// FilBLSSignature as declared in filecoin-ffi/filcrypto.h:73 +// FilBLSDigest as declared in filecoin-ffi/filcrypto.h:97 +type FilBLSDigest struct { + Inner [96]byte + ref215fc78c *C.fil_BLSDigest + allocs215fc78c interface{} +} + +// FilHashResponse as declared in filecoin-ffi/filcrypto.h:104 +type FilHashResponse struct { + Digest FilBLSDigest + refc52a22ef *C.fil_HashResponse + allocsc52a22ef interface{} +} + +// FilBLSSignature as declared in filecoin-ffi/filcrypto.h:108 type FilBLSSignature struct { Inner [96]byte refa2ac09ba *C.fil_BLSSignature allocsa2ac09ba interface{} } -// FilAggregateResponse as declared in filecoin-ffi/filcrypto.h:80 +// FilAggregateResponse as declared in filecoin-ffi/filcrypto.h:115 type FilAggregateResponse struct { Signature FilBLSSignature refb3efa36d *C.fil_AggregateResponse allocsb3efa36d interface{} } -// FilAggregateProof as declared in filecoin-ffi/filcrypto.h:87 -type FilAggregateProof struct { - StatusCode FCPResponseStatus - ErrorMsg string - ProofLen uint - ProofPtr []byte - ref22b6c4f6 *C.fil_AggregateProof - allocs22b6c4f6 interface{} +// FilBLSPrivateKey as declared in filecoin-ffi/filcrypto.h:119 +type FilBLSPrivateKey struct { + Inner [32]byte + ref2f77fe3a *C.fil_BLSPrivateKey + allocs2f77fe3a interface{} +} + +// FilPrivateKeyGenerateResponse as declared in filecoin-ffi/filcrypto.h:126 +type FilPrivateKeyGenerateResponse struct { + PrivateKey FilBLSPrivateKey + ref2dba09f *C.fil_PrivateKeyGenerateResponse + allocs2dba09f interface{} } -// Fil32ByteArray as declared in filecoin-ffi/filcrypto.h:91 +// Fil32ByteArray as declared in filecoin-ffi/filcrypto.h:130 type Fil32ByteArray struct { Inner [32]byte ref373ec61a *C.fil_32ByteArray allocs373ec61a interface{} } -// FilAggregationInputs as declared in filecoin-ffi/filcrypto.h:99 -type FilAggregationInputs struct { - CommR Fil32ByteArray - CommD Fil32ByteArray - SectorId uint64 - Ticket Fil32ByteArray - Seed Fil32ByteArray - ref90b967c9 *C.fil_AggregationInputs - allocs90b967c9 interface{} +// FilPrivateKeySignResponse as declared in filecoin-ffi/filcrypto.h:137 +type FilPrivateKeySignResponse struct { + Signature FilBLSSignature + refcdf97b28 *C.fil_PrivateKeySignResponse + allocscdf97b28 interface{} } -// FilSealCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:108 -type FilSealCommitPhase2Response struct { - StatusCode FCPResponseStatus - ErrorMsg string - ProofPtr []byte - ProofLen uint - CommitInputsPtr []FilAggregationInputs - CommitInputsLen uint - ref5860b9a4 *C.fil_SealCommitPhase2Response - allocs5860b9a4 interface{} +// FilBLSPublicKey as declared in filecoin-ffi/filcrypto.h:141 +type FilBLSPublicKey struct { + Inner [48]byte + ref6d0cab13 *C.fil_BLSPublicKey + allocs6d0cab13 interface{} } -// FilClearCacheResponse as declared in filecoin-ffi/filcrypto.h:113 -type FilClearCacheResponse struct { - ErrorMsg string - StatusCode FCPResponseStatus - refa9a80400 *C.fil_ClearCacheResponse - allocsa9a80400 interface{} +// FilPrivateKeyPublicKeyResponse as declared in filecoin-ffi/filcrypto.h:148 +type FilPrivateKeyPublicKeyResponse struct { + PublicKey FilBLSPublicKey + refee14e59d *C.fil_PrivateKeyPublicKeyResponse + allocsee14e59d interface{} } -// FilZeroSignatureResponse as declared in filecoin-ffi/filcrypto.h:120 +// FilZeroSignatureResponse as declared in filecoin-ffi/filcrypto.h:155 type FilZeroSignatureResponse struct { Signature FilBLSSignature ref835a0405 *C.fil_ZeroSignatureResponse allocs835a0405 interface{} } -// FilEmptySectorUpdateDecodeFromResponse as declared in filecoin-ffi/filcrypto.h:125 -type FilEmptySectorUpdateDecodeFromResponse struct { - StatusCode FCPResponseStatus +// FilCreateFvmMachineResponse as declared in filecoin-ffi/filcrypto.h:161 +type FilCreateFvmMachineResponse struct { ErrorMsg string - reff02a01b8 *C.fil_EmptySectorUpdateDecodeFromResponse - allocsf02a01b8 interface{} + StatusCode FCPResponseStatus + Executor unsafe.Pointer + ref40465416 *C.fil_CreateFvmMachineResponse + allocs40465416 interface{} } -// FilEmptySectorUpdateEncodeIntoResponse as declared in filecoin-ffi/filcrypto.h:133 -type FilEmptySectorUpdateEncodeIntoResponse struct { +// FilFvmMachineExecuteResponse as declared in filecoin-ffi/filcrypto.h:174 +type FilFvmMachineExecuteResponse struct { ErrorMsg string StatusCode FCPResponseStatus - CommRNew [32]byte - CommRLastNew [32]byte - CommDNew [32]byte - ref8d3238a7 *C.fil_EmptySectorUpdateEncodeIntoResponse - allocs8d3238a7 interface{} -} - -// FilEmptySectorUpdateProofResponse as declared in filecoin-ffi/filcrypto.h:140 -type FilEmptySectorUpdateProofResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - ProofLen uint - ProofPtr []byte - ref5c2faef *C.fil_EmptySectorUpdateProofResponse - allocs5c2faef interface{} + ExitCode uint64 + ReturnPtr []byte + ReturnLen uint + GasUsed uint64 + PenaltyHi uint64 + PenaltyLo uint64 + MinerTipHi uint64 + MinerTipLo uint64 + ref88f63595 *C.fil_FvmMachineExecuteResponse + allocs88f63595 interface{} +} + +// FilFvmMachineFlushResponse as declared in filecoin-ffi/filcrypto.h:181 +type FilFvmMachineFlushResponse struct { + ErrorMsg string + StatusCode FCPResponseStatus + StateRootPtr []byte + StateRootLen uint + ref9eb3b4f4 *C.fil_FvmMachineFlushResponse + allocs9eb3b4f4 interface{} } -// FilEmptySectorUpdateRemoveEncodedDataResponse as declared in filecoin-ffi/filcrypto.h:145 -type FilEmptySectorUpdateRemoveEncodedDataResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - ref50783b83 *C.fil_EmptySectorUpdateRemoveEncodedDataResponse - allocs50783b83 interface{} +// FilWriteWithAlignmentResponse as declared in filecoin-ffi/filcrypto.h:189 +type FilWriteWithAlignmentResponse struct { + CommP [32]byte + ErrorMsg string + LeftAlignmentUnpadded uint64 + StatusCode FCPResponseStatus + TotalWriteUnpadded uint64 + refa330e79 *C.fil_WriteWithAlignmentResponse + allocsa330e79 interface{} } -// FilVerifyEmptySectorUpdateProofResponse as declared in filecoin-ffi/filcrypto.h:151 -type FilVerifyEmptySectorUpdateProofResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - IsValid bool - ref50b7b13 *C.fil_VerifyEmptySectorUpdateProofResponse - allocs50b7b13 interface{} +// FilWriteWithoutAlignmentResponse as declared in filecoin-ffi/filcrypto.h:196 +type FilWriteWithoutAlignmentResponse struct { + CommP [32]byte + ErrorMsg string + StatusCode FCPResponseStatus + TotalWriteUnpadded uint64 + refc8e1ed8 *C.fil_WriteWithoutAlignmentResponse + allocsc8e1ed8 interface{} } -// FilFauxRepResponse as declared in filecoin-ffi/filcrypto.h:157 +// FilFauxRepResponse as declared in filecoin-ffi/filcrypto.h:202 type FilFauxRepResponse struct { ErrorMsg string StatusCode FCPResponseStatus @@ -136,43 +156,115 @@ type FilFauxRepResponse struct { allocsaa003f71 interface{} } -// FilFinalizeTicketResponse as declared in filecoin-ffi/filcrypto.h:163 -type FilFinalizeTicketResponse struct { +// FilSealPreCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:209 +type FilSealPreCommitPhase1Response struct { + ErrorMsg string + StatusCode FCPResponseStatus + SealPreCommitPhase1OutputPtr []byte + SealPreCommitPhase1OutputLen uint + ref132bbfd8 *C.fil_SealPreCommitPhase1Response + allocs132bbfd8 interface{} +} + +// FilPublicPieceInfo as declared in filecoin-ffi/filcrypto.h:214 +type FilPublicPieceInfo struct { + NumBytes uint64 + CommP [32]byte + refd00025ac *C.fil_PublicPieceInfo + allocsd00025ac interface{} +} + +// FilSealPreCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:222 +type FilSealPreCommitPhase2Response struct { + ErrorMsg string + StatusCode FCPResponseStatus + RegisteredProof FilRegisteredSealProof + CommD [32]byte + CommR [32]byte + ref2aa6831d *C.fil_SealPreCommitPhase2Response + allocs2aa6831d interface{} +} + +// FilSealCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:229 +type FilSealCommitPhase1Response struct { + StatusCode FCPResponseStatus + ErrorMsg string + SealCommitPhase1OutputPtr []byte + SealCommitPhase1OutputLen uint + ref61ed8561 *C.fil_SealCommitPhase1Response + allocs61ed8561 interface{} +} + +// FilAggregationInputs as declared in filecoin-ffi/filcrypto.h:237 +type FilAggregationInputs struct { + CommR Fil32ByteArray + CommD Fil32ByteArray + SectorId uint64 + Ticket Fil32ByteArray + Seed Fil32ByteArray + ref90b967c9 *C.fil_AggregationInputs + allocs90b967c9 interface{} +} + +// FilSealCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:246 +type FilSealCommitPhase2Response struct { + StatusCode FCPResponseStatus + ErrorMsg string + ProofPtr []byte + ProofLen uint + CommitInputsPtr []FilAggregationInputs + CommitInputsLen uint + ref5860b9a4 *C.fil_SealCommitPhase2Response + allocs5860b9a4 interface{} +} + +// FilAggregateProof as declared in filecoin-ffi/filcrypto.h:253 +type FilAggregateProof struct { StatusCode FCPResponseStatus ErrorMsg string - Ticket [32]byte - refb370fa86 *C.fil_FinalizeTicketResponse - allocsb370fa86 interface{} + ProofLen uint + ProofPtr []byte + ref22b6c4f6 *C.fil_AggregateProof + allocs22b6c4f6 interface{} } -// FilGenerateDataCommitmentResponse as declared in filecoin-ffi/filcrypto.h:169 -type FilGenerateDataCommitmentResponse struct { +// FilVerifyAggregateSealProofResponse as declared in filecoin-ffi/filcrypto.h:259 +type FilVerifyAggregateSealProofResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + ref66180e0 *C.fil_VerifyAggregateSealProofResponse + allocs66180e0 interface{} +} + +// FilUnsealRangeResponse as declared in filecoin-ffi/filcrypto.h:264 +type FilUnsealRangeResponse struct { StatusCode FCPResponseStatus ErrorMsg string - CommD [32]byte - ref87da7dd9 *C.fil_GenerateDataCommitmentResponse - allocs87da7dd9 interface{} + ref61e219c9 *C.fil_UnsealRangeResponse + allocs61e219c9 interface{} } -// FilPartitionProof as declared in filecoin-ffi/filcrypto.h:174 -type FilPartitionProof struct { - ProofLen uint - ProofPtr []byte - ref566a2be6 *C.fil_PartitionProof - allocs566a2be6 interface{} +// FilVerifySealResponse as declared in filecoin-ffi/filcrypto.h:270 +type FilVerifySealResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + refd4397079 *C.fil_VerifySealResponse + allocsd4397079 interface{} } -// FilPartitionProofResponse as declared in filecoin-ffi/filcrypto.h:181 -type FilPartitionProofResponse struct { - StatusCode FCPResponseStatus +// FilGenerateWinningPoStSectorChallenge as declared in filecoin-ffi/filcrypto.h:277 +type FilGenerateWinningPoStSectorChallenge struct { ErrorMsg string - ProofsLen uint - ProofsPtr []FilPartitionProof - ref51343e7a *C.fil_PartitionProofResponse - allocs51343e7a interface{} + StatusCode FCPResponseStatus + IdsPtr []uint64 + IdsLen uint + ref69d2a405 *C.fil_GenerateWinningPoStSectorChallenge + allocs69d2a405 interface{} } -// FilGenerateFallbackSectorChallengesResponse as declared in filecoin-ffi/filcrypto.h:191 +// FilGenerateFallbackSectorChallengesResponse as declared in filecoin-ffi/filcrypto.h:287 type FilGenerateFallbackSectorChallengesResponse struct { ErrorMsg string StatusCode FCPResponseStatus @@ -185,17 +277,7 @@ type FilGenerateFallbackSectorChallengesResponse struct { allocs7047a3fa interface{} } -// FilGeneratePieceCommitmentResponse as declared in filecoin-ffi/filcrypto.h:202 -type FilGeneratePieceCommitmentResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - CommP [32]byte - NumBytesAligned uint64 - ref4b00fda4 *C.fil_GeneratePieceCommitmentResponse - allocs4b00fda4 interface{} -} - -// FilVanillaProof as declared in filecoin-ffi/filcrypto.h:207 +// FilVanillaProof as declared in filecoin-ffi/filcrypto.h:292 type FilVanillaProof struct { ProofLen uint ProofPtr []byte @@ -203,7 +285,7 @@ type FilVanillaProof struct { allocsb3e7638c interface{} } -// FilGenerateSingleVanillaProofResponse as declared in filecoin-ffi/filcrypto.h:213 +// FilGenerateSingleVanillaProofResponse as declared in filecoin-ffi/filcrypto.h:298 type FilGenerateSingleVanillaProofResponse struct { ErrorMsg string VanillaProof FilVanillaProof @@ -212,27 +294,18 @@ type FilGenerateSingleVanillaProofResponse struct { allocsf9d21b04 interface{} } -// FilPartitionSnarkProof as declared in filecoin-ffi/filcrypto.h:219 -type FilPartitionSnarkProof struct { +// FilPrivateReplicaInfo as declared in filecoin-ffi/filcrypto.h:306 +type FilPrivateReplicaInfo struct { RegisteredProof FilRegisteredPoStProof - ProofLen uint - ProofPtr []byte - ref4de03739 *C.fil_PartitionSnarkProof - allocs4de03739 interface{} -} - -// FilGenerateSingleWindowPoStWithVanillaResponse as declared in filecoin-ffi/filcrypto.h:227 -type FilGenerateSingleWindowPoStWithVanillaResponse struct { - ErrorMsg string - PartitionProof FilPartitionSnarkProof - FaultySectorsLen uint - FaultySectorsPtr []uint64 - StatusCode FCPResponseStatus - ref96c012c3 *C.fil_GenerateSingleWindowPoStWithVanillaResponse - allocs96c012c3 interface{} + CacheDirPath string + CommR [32]byte + ReplicaPath string + SectorId uint64 + ref81a31e9b *C.fil_PrivateReplicaInfo + allocs81a31e9b interface{} } -// FilPoStProof as declared in filecoin-ffi/filcrypto.h:233 +// FilPoStProof as declared in filecoin-ffi/filcrypto.h:312 type FilPoStProof struct { RegisteredProof FilRegisteredPoStProof ProofLen uint @@ -241,19 +314,7 @@ type FilPoStProof struct { allocs3451bfa interface{} } -// FilGenerateWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:242 -type FilGenerateWindowPoStResponse struct { - ErrorMsg string - ProofsLen uint - ProofsPtr []FilPoStProof - FaultySectorsLen uint - FaultySectorsPtr []uint64 - StatusCode FCPResponseStatus - ref2a5f3ba8 *C.fil_GenerateWindowPoStResponse - allocs2a5f3ba8 interface{} -} - -// FilGenerateWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:249 +// FilGenerateWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:319 type FilGenerateWinningPoStResponse struct { ErrorMsg string ProofsLen uint @@ -263,58 +324,46 @@ type FilGenerateWinningPoStResponse struct { allocs1405b8ec interface{} } -// FilGenerateWinningPoStSectorChallenge as declared in filecoin-ffi/filcrypto.h:256 -type FilGenerateWinningPoStSectorChallenge struct { - ErrorMsg string - StatusCode FCPResponseStatus - IdsPtr []uint64 - IdsLen uint - ref69d2a405 *C.fil_GenerateWinningPoStSectorChallenge - allocs69d2a405 interface{} -} - -// FilGetNumPartitionForFallbackPoStResponse as declared in filecoin-ffi/filcrypto.h:262 -type FilGetNumPartitionForFallbackPoStResponse struct { - ErrorMsg string - StatusCode FCPResponseStatus - NumPartition uint - refc0084478 *C.fil_GetNumPartitionForFallbackPoStResponse - allocsc0084478 interface{} -} - -// FilGpuDeviceResponse as declared in filecoin-ffi/filcrypto.h:269 -type FilGpuDeviceResponse struct { +// FilVerifyWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:325 +type FilVerifyWinningPoStResponse struct { StatusCode FCPResponseStatus ErrorMsg string - DevicesLen uint - DevicesPtr []string - ref58f92915 *C.fil_GpuDeviceResponse - allocs58f92915 interface{} + IsValid bool + refaca6860c *C.fil_VerifyWinningPoStResponse + allocsaca6860c interface{} } -// FilBLSDigest as declared in filecoin-ffi/filcrypto.h:273 -type FilBLSDigest struct { - Inner [96]byte - ref215fc78c *C.fil_BLSDigest - allocs215fc78c interface{} +// FilPublicReplicaInfo as declared in filecoin-ffi/filcrypto.h:331 +type FilPublicReplicaInfo struct { + RegisteredProof FilRegisteredPoStProof + CommR [32]byte + SectorId uint64 + ref81b617c2 *C.fil_PublicReplicaInfo + allocs81b617c2 interface{} } -// FilHashResponse as declared in filecoin-ffi/filcrypto.h:280 -type FilHashResponse struct { - Digest FilBLSDigest - refc52a22ef *C.fil_HashResponse - allocsc52a22ef interface{} +// FilGenerateWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:340 +type FilGenerateWindowPoStResponse struct { + ErrorMsg string + ProofsLen uint + ProofsPtr []FilPoStProof + FaultySectorsLen uint + FaultySectorsPtr []uint64 + StatusCode FCPResponseStatus + ref2a5f3ba8 *C.fil_GenerateWindowPoStResponse + allocs2a5f3ba8 interface{} } -// FilInitLogFdResponse as declared in filecoin-ffi/filcrypto.h:285 -type FilInitLogFdResponse struct { +// FilVerifyWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:346 +type FilVerifyWindowPoStResponse struct { StatusCode FCPResponseStatus ErrorMsg string - ref3c1a0a08 *C.fil_InitLogFdResponse - allocs3c1a0a08 interface{} + IsValid bool + ref34c4d49f *C.fil_VerifyWindowPoStResponse + allocs34c4d49f interface{} } -// FilMergeWindowPoStPartitionProofsResponse as declared in filecoin-ffi/filcrypto.h:291 +// FilMergeWindowPoStPartitionProofsResponse as declared in filecoin-ffi/filcrypto.h:352 type FilMergeWindowPoStPartitionProofsResponse struct { ErrorMsg string Proof FilPoStProof @@ -323,179 +372,167 @@ type FilMergeWindowPoStPartitionProofsResponse struct { allocs3369154e interface{} } -// FilBLSPrivateKey as declared in filecoin-ffi/filcrypto.h:295 -type FilBLSPrivateKey struct { - Inner [32]byte - ref2f77fe3a *C.fil_BLSPrivateKey - allocs2f77fe3a interface{} -} - -// FilPrivateKeyGenerateResponse as declared in filecoin-ffi/filcrypto.h:302 -type FilPrivateKeyGenerateResponse struct { - PrivateKey FilBLSPrivateKey - ref2dba09f *C.fil_PrivateKeyGenerateResponse - allocs2dba09f interface{} +// FilPartitionSnarkProof as declared in filecoin-ffi/filcrypto.h:358 +type FilPartitionSnarkProof struct { + RegisteredProof FilRegisteredPoStProof + ProofLen uint + ProofPtr []byte + ref4de03739 *C.fil_PartitionSnarkProof + allocs4de03739 interface{} } -// FilBLSPublicKey as declared in filecoin-ffi/filcrypto.h:306 -type FilBLSPublicKey struct { - Inner [48]byte - ref6d0cab13 *C.fil_BLSPublicKey - allocs6d0cab13 interface{} +// FilGetNumPartitionForFallbackPoStResponse as declared in filecoin-ffi/filcrypto.h:364 +type FilGetNumPartitionForFallbackPoStResponse struct { + ErrorMsg string + StatusCode FCPResponseStatus + NumPartition uint + refc0084478 *C.fil_GetNumPartitionForFallbackPoStResponse + allocsc0084478 interface{} } -// FilPrivateKeyPublicKeyResponse as declared in filecoin-ffi/filcrypto.h:313 -type FilPrivateKeyPublicKeyResponse struct { - PublicKey FilBLSPublicKey - refee14e59d *C.fil_PrivateKeyPublicKeyResponse - allocsee14e59d interface{} +// FilGenerateSingleWindowPoStWithVanillaResponse as declared in filecoin-ffi/filcrypto.h:372 +type FilGenerateSingleWindowPoStWithVanillaResponse struct { + ErrorMsg string + PartitionProof FilPartitionSnarkProof + FaultySectorsLen uint + FaultySectorsPtr []uint64 + StatusCode FCPResponseStatus + ref96c012c3 *C.fil_GenerateSingleWindowPoStWithVanillaResponse + allocs96c012c3 interface{} } -// FilPrivateKeySignResponse as declared in filecoin-ffi/filcrypto.h:320 -type FilPrivateKeySignResponse struct { - Signature FilBLSSignature - refcdf97b28 *C.fil_PrivateKeySignResponse - allocscdf97b28 interface{} +// FilEmptySectorUpdateEncodeIntoResponse as declared in filecoin-ffi/filcrypto.h:380 +type FilEmptySectorUpdateEncodeIntoResponse struct { + ErrorMsg string + StatusCode FCPResponseStatus + CommRNew [32]byte + CommRLastNew [32]byte + CommDNew [32]byte + ref8d3238a7 *C.fil_EmptySectorUpdateEncodeIntoResponse + allocs8d3238a7 interface{} } -// FilSealCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:327 -type FilSealCommitPhase1Response struct { - StatusCode FCPResponseStatus - ErrorMsg string - SealCommitPhase1OutputPtr []byte - SealCommitPhase1OutputLen uint - ref61ed8561 *C.fil_SealCommitPhase1Response - allocs61ed8561 interface{} +// FilEmptySectorUpdateDecodeFromResponse as declared in filecoin-ffi/filcrypto.h:385 +type FilEmptySectorUpdateDecodeFromResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + reff02a01b8 *C.fil_EmptySectorUpdateDecodeFromResponse + allocsf02a01b8 interface{} } -// FilSealPreCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:334 -type FilSealPreCommitPhase1Response struct { - ErrorMsg string - StatusCode FCPResponseStatus - SealPreCommitPhase1OutputPtr []byte - SealPreCommitPhase1OutputLen uint - ref132bbfd8 *C.fil_SealPreCommitPhase1Response - allocs132bbfd8 interface{} +// FilEmptySectorUpdateRemoveEncodedDataResponse as declared in filecoin-ffi/filcrypto.h:390 +type FilEmptySectorUpdateRemoveEncodedDataResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + ref50783b83 *C.fil_EmptySectorUpdateRemoveEncodedDataResponse + allocs50783b83 interface{} } -// FilSealPreCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:342 -type FilSealPreCommitPhase2Response struct { - ErrorMsg string - StatusCode FCPResponseStatus - RegisteredProof FilRegisteredSealProof - CommD [32]byte - CommR [32]byte - ref2aa6831d *C.fil_SealPreCommitPhase2Response - allocs2aa6831d interface{} +// FilPartitionProof as declared in filecoin-ffi/filcrypto.h:395 +type FilPartitionProof struct { + ProofLen uint + ProofPtr []byte + ref566a2be6 *C.fil_PartitionProof + allocs566a2be6 interface{} } -// FilStringResponse as declared in filecoin-ffi/filcrypto.h:351 -type FilStringResponse struct { +// FilPartitionProofResponse as declared in filecoin-ffi/filcrypto.h:402 +type FilPartitionProofResponse struct { StatusCode FCPResponseStatus ErrorMsg string - StringVal string - ref4f413043 *C.fil_StringResponse - allocs4f413043 interface{} + ProofsLen uint + ProofsPtr []FilPartitionProof + ref51343e7a *C.fil_PartitionProofResponse + allocs51343e7a interface{} } -// FilUnsealRangeResponse as declared in filecoin-ffi/filcrypto.h:356 -type FilUnsealRangeResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - ref61e219c9 *C.fil_UnsealRangeResponse - allocs61e219c9 interface{} +// FilVerifyPartitionProofResponse as declared in filecoin-ffi/filcrypto.h:408 +type FilVerifyPartitionProofResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + refaed1b67 *C.fil_VerifyPartitionProofResponse + allocsaed1b67 interface{} } -// FilVerifyAggregateSealProofResponse as declared in filecoin-ffi/filcrypto.h:362 -type FilVerifyAggregateSealProofResponse struct { +// FilEmptySectorUpdateProofResponse as declared in filecoin-ffi/filcrypto.h:415 +type FilEmptySectorUpdateProofResponse struct { StatusCode FCPResponseStatus ErrorMsg string - IsValid bool - ref66180e0 *C.fil_VerifyAggregateSealProofResponse - allocs66180e0 interface{} + ProofLen uint + ProofPtr []byte + ref5c2faef *C.fil_EmptySectorUpdateProofResponse + allocs5c2faef interface{} } -// FilVerifyPartitionProofResponse as declared in filecoin-ffi/filcrypto.h:368 -type FilVerifyPartitionProofResponse struct { +// FilVerifyEmptySectorUpdateProofResponse as declared in filecoin-ffi/filcrypto.h:421 +type FilVerifyEmptySectorUpdateProofResponse struct { StatusCode FCPResponseStatus ErrorMsg string IsValid bool - refaed1b67 *C.fil_VerifyPartitionProofResponse - allocsaed1b67 interface{} + ref50b7b13 *C.fil_VerifyEmptySectorUpdateProofResponse + allocs50b7b13 interface{} } -// FilVerifySealResponse as declared in filecoin-ffi/filcrypto.h:374 -type FilVerifySealResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - IsValid bool - refd4397079 *C.fil_VerifySealResponse - allocsd4397079 interface{} +// FilGeneratePieceCommitmentResponse as declared in filecoin-ffi/filcrypto.h:432 +type FilGeneratePieceCommitmentResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + CommP [32]byte + NumBytesAligned uint64 + ref4b00fda4 *C.fil_GeneratePieceCommitmentResponse + allocs4b00fda4 interface{} } -// FilVerifyWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:380 -type FilVerifyWindowPoStResponse struct { +// FilGenerateDataCommitmentResponse as declared in filecoin-ffi/filcrypto.h:438 +type FilGenerateDataCommitmentResponse struct { StatusCode FCPResponseStatus ErrorMsg string - IsValid bool - ref34c4d49f *C.fil_VerifyWindowPoStResponse - allocs34c4d49f interface{} + CommD [32]byte + ref87da7dd9 *C.fil_GenerateDataCommitmentResponse + allocs87da7dd9 interface{} } -// FilVerifyWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:386 -type FilVerifyWinningPoStResponse struct { - StatusCode FCPResponseStatus +// FilClearCacheResponse as declared in filecoin-ffi/filcrypto.h:443 +type FilClearCacheResponse struct { ErrorMsg string - IsValid bool - refaca6860c *C.fil_VerifyWinningPoStResponse - allocsaca6860c interface{} -} - -// FilWriteWithAlignmentResponse as declared in filecoin-ffi/filcrypto.h:394 -type FilWriteWithAlignmentResponse struct { - CommP [32]byte - ErrorMsg string - LeftAlignmentUnpadded uint64 - StatusCode FCPResponseStatus - TotalWriteUnpadded uint64 - refa330e79 *C.fil_WriteWithAlignmentResponse - allocsa330e79 interface{} + StatusCode FCPResponseStatus + refa9a80400 *C.fil_ClearCacheResponse + allocsa9a80400 interface{} } -// FilWriteWithoutAlignmentResponse as declared in filecoin-ffi/filcrypto.h:401 -type FilWriteWithoutAlignmentResponse struct { - CommP [32]byte - ErrorMsg string - StatusCode FCPResponseStatus - TotalWriteUnpadded uint64 - refc8e1ed8 *C.fil_WriteWithoutAlignmentResponse - allocsc8e1ed8 interface{} +// FilStringResponse as declared in filecoin-ffi/filcrypto.h:452 +type FilStringResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + StringVal string + ref4f413043 *C.fil_StringResponse + allocs4f413043 interface{} } -// FilPublicPieceInfo as declared in filecoin-ffi/filcrypto.h:406 -type FilPublicPieceInfo struct { - NumBytes uint64 - CommP [32]byte - refd00025ac *C.fil_PublicPieceInfo - allocsd00025ac interface{} +// FilFinalizeTicketResponse as declared in filecoin-ffi/filcrypto.h:458 +type FilFinalizeTicketResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + Ticket [32]byte + refb370fa86 *C.fil_FinalizeTicketResponse + allocsb370fa86 interface{} } -// FilPrivateReplicaInfo as declared in filecoin-ffi/filcrypto.h:414 -type FilPrivateReplicaInfo struct { - RegisteredProof FilRegisteredPoStProof - CacheDirPath string - CommR [32]byte - ReplicaPath string - SectorId uint64 - ref81a31e9b *C.fil_PrivateReplicaInfo - allocs81a31e9b interface{} +// FilGpuDeviceResponse as declared in filecoin-ffi/filcrypto.h:465 +type FilGpuDeviceResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + DevicesLen uint + DevicesPtr []string + ref58f92915 *C.fil_GpuDeviceResponse + allocs58f92915 interface{} } -// FilPublicReplicaInfo as declared in filecoin-ffi/filcrypto.h:420 -type FilPublicReplicaInfo struct { - RegisteredProof FilRegisteredPoStProof - CommR [32]byte - SectorId uint64 - ref81b617c2 *C.fil_PublicReplicaInfo - allocs81b617c2 interface{} +// FilInitLogFdResponse as declared in filecoin-ffi/filcrypto.h:470 +type FilInitLogFdResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + ref3c1a0a08 *C.fil_InitLogFdResponse + allocs3c1a0a08 interface{} } diff --git a/go.mod b/go.mod index 3a826cc0..93345a5a 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,34 @@ module github.com/filecoin-project/filecoin-ffi go 1.13 require ( - github.com/filecoin-project/go-address v0.0.5 - github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f - github.com/filecoin-project/go-state-types v0.1.1 - github.com/filecoin-project/specs-actors v0.9.13 + github.com/filecoin-project/go-address v0.0.6 + github.com/filecoin-project/go-crypto v0.0.1 // indirect + github.com/filecoin-project/go-fil-commcid v0.1.0 + github.com/filecoin-project/go-state-types v0.1.3 + github.com/filecoin-project/specs-actors v0.9.14 github.com/filecoin-project/specs-actors/v5 v5.0.4 - github.com/filecoin-project/specs-actors/v7 v7.0.0-20211117170924-fd07a4c7dff9 - github.com/ipfs/go-cid v0.0.7 + github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1.0.20220118005651-2470cb39827e + github.com/ipfs/go-block-format v0.0.3 + github.com/ipfs/go-cid v0.1.0 + github.com/ipfs/go-ipfs-blockstore v1.1.2 + github.com/ipfs/go-ipld-format v0.2.0 // indirect + github.com/kr/pretty v0.3.0 // indirect + github.com/multiformats/go-base32 v0.0.4 // indirect + github.com/multiformats/go-multihash v0.1.0 // indirect github.com/pkg/errors v0.9.1 + github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e // indirect + github.com/smartystreets/goconvey v1.6.4 // indirect github.com/stretchr/testify v1.7.0 + github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a // indirect + github.com/whyrusleeping/cbor-gen v0.0.0-20210713220151-be142a5ae1a8 // indirect github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb - golang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696 // indirect + golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b // indirect + golang.org/x/sys v0.0.0-20211209171907-798191bca915 // indirect + golang.org/x/tools v0.1.5 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + lukechampine.com/blake3 v1.1.7 // indirect modernc.org/golex v1.0.1 // indirect ) diff --git a/go.sum b/go.sum index 91d48383..735fc989 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= @@ -15,6 +16,7 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -24,17 +26,20 @@ github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzA github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-address v0.0.5 h1:SSaFT/5aLfPXycUlFyemoHYhRgdyXClXCyDdNJKPlDM= github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-address v0.0.6 h1:DWQtj38ax+ogHwyH3VULRIoT8E6loyXqsk/p81xoY7M= +github.com/filecoin-project/go-address v0.0.6/go.mod h1:7B0/5DA13n6nHkB8bbGx1gWzG/dbTsZ0fgOJVGsM3TE= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v3 v3.0.0/go.mod h1:Qa95YNAbtoVCTSVtX38aAC1ptBnJfPma1R/zZsKmx4o= github.com/filecoin-project/go-amt-ipld/v3 v3.1.0/go.mod h1:UjM2QhDFrrjD5s1CdnkJkat4ga+LqZBZgTMniypABRo= +github.com/filecoin-project/go-amt-ipld/v4 v4.0.0/go.mod h1:gF053YQ4BIpzTNDoEwHZas7U3oAwncDVGvOHyY8oDpE= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2JJGLl6gCq6o= +github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= +github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= +github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI= github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGyDjJjYSRX7hp/FGOStdqrWyDI= @@ -43,21 +48,23 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-state-types v0.1.1 h1:LR260vya4p++atgf256W6yV3Lxl5mKrBFcEZePWQrdg= -github.com/filecoin-project/go-state-types v0.1.1/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= +github.com/filecoin-project/go-state-types v0.1.3 h1:rzIJyQo5HO2ptc8Jcu8P0qTutnI7NWwTle54eAHoNO0= +github.com/filecoin-project/go-state-types v0.1.3/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= +github.com/filecoin-project/specs-actors v0.9.14 h1:68PVstg2UB3ZsMLF+DKFTAs/YKsqhKWynkr0IqmVRQY= +github.com/filecoin-project/specs-actors v0.9.14/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb/go.mod h1:LljnY2Mn2homxZsmokJZCpRuhOPxfXhvcek5gWkmqAc= github.com/filecoin-project/specs-actors/v3 v3.1.0/go.mod h1:mpynccOLlIRy0QnR008BwYBwT9fen+sPR13MA1VmMww= github.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng= github.com/filecoin-project/specs-actors/v5 v5.0.4 h1:OY7BdxJWlUfUFXWV/kpNBYGXNPasDIedf42T3sGx08s= github.com/filecoin-project/specs-actors/v5 v5.0.4/go.mod h1:5BAKRAMsOOlD8+qCw4UvT/lTLInCJ3JwOWZbX8Ipwq4= github.com/filecoin-project/specs-actors/v6 v6.0.0/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk= -github.com/filecoin-project/specs-actors/v7 v7.0.0-20211117170924-fd07a4c7dff9 h1:H10WnEAJQH3JwHyaHwMEgaaj00z+/QMCb9Sjd/SUW1w= -github.com/filecoin-project/specs-actors/v7 v7.0.0-20211117170924-fd07a4c7dff9/go.mod h1:p6LIOFezA1rgRLMewbvdi3Pp6SAu+q9FtJ9CAleSjrE= +github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1.0.20220118005651-2470cb39827e h1:3P14MvJ5MA0jwEB4WDeROrci4o8KwVVAv2mJ70grbf0= +github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1.0.20220118005651-2470cb39827e/go.mod h1:TA5FwCna+Yi36POaT7SLKXsgEDvJwc0V/L6ZsO19B9M= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -65,6 +72,7 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -74,10 +82,14 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= +github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= @@ -91,19 +103,27 @@ github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUP github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.1.0 h1:YN33LQulcRHjfom/i25yoOZR4Telp1Hr/2RU3d0PnC0= +github.com/ipfs/go-cid v0.1.0/go.mod h1:rH5/Xv83Rfy8Rw6xG+id3DYAMUVmem1MowoKwdXmN2o= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= +github.com/ipfs/go-datastore v0.5.0 h1:rQicVCEacWyk4JZ6G5bD9TKR7lZEG1MWcG7UdWYrFAU= +github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= +github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= +github.com/ipfs/go-ipfs-blockstore v1.1.2 h1:WCXoZcMYnvOTmlpX+RSSnhVN0uCmbWTeepTGX5lgiXw= +github.com/ipfs/go-ipfs-blockstore v1.1.2/go.mod h1:w51tNR9y5+QXB0wkNcHt4O2aSZjTdqaEWaQdSxEyUOY= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= +github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= +github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= @@ -119,13 +139,17 @@ github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9 github.com/ipfs/go-ipld-cbor v0.0.5 h1:ovz4CHKogtG2KB/h1zUp5U0c/IzZrL435rCh5+K/5G8= github.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2 h1:OVAGlyYT6JPZ0pEfGntFPS40lfrDmaDbQwNHEY2G9Zs= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= +github.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA= +github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= +github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.2.4/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= @@ -143,6 +167,8 @@ github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= +github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -152,14 +178,19 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= @@ -217,15 +248,18 @@ github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+ github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base32 v0.0.4 h1:+qMh4a2f37b4xTNs6mqitDinryCI+tfO2dRVMN9mjSE= +github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -242,17 +276,21 @@ github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKT github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= +github.com/multiformats/go-multihash v0.1.0 h1:CgAgwqk3//SVEw3T+6DqI4mWMyRuDwZtOWcJT0q9+EA= +github.com/multiformats/go-multihash v0.1.0/go.mod h1:RJlXsxt6vHGaia+S8We0ErjhojtKzPP2AH4+kYM7k84= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -262,19 +300,23 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e h1:ZOcivgkkFRnjfoTcGsDq3UQYiBmekwLA+qg0OjyB/ls= +github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= @@ -289,8 +331,9 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= +github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= @@ -299,8 +342,10 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200806213330-63aa96ca5488/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2 h1:7HzUKl5d/dELS9lLeT4W6YvliZx+s9k/eOOIdHKrA/w= github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20210713220151-be142a5ae1a8 h1:TEv7MId88TyIqIUL4hbf9otOookIolMxlEbN0ro671Y= +github.com/whyrusleeping/cbor-gen v0.0.0-20210713220151-be142a5ae1a8/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= @@ -314,10 +359,14 @@ github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JL github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -329,13 +378,18 @@ golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b h1:QAqMVf3pSa6eeTsuklijukjXBlj7Es2QQplab+/RbQ4= +golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -345,11 +399,13 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -360,12 +416,22 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211209171907-798191bca915 h1:P+8mCzuEpyszAT6T42q0sxU+eveBAF/cJ2Kp0x6/8+0= +golang.org/x/sys v0.0.0-20211209171907-798191bca915/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -376,8 +442,8 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696 h1:Bfazo+enXJET5SbHeh95NtxabJF6fJ9r/jpfRJgd3j4= -golang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -386,19 +452,26 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= +lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= diff --git a/proofs.go b/proofs.go index 4febf907..393e3552 100644 --- a/proofs.go +++ b/proofs.go @@ -1,8 +1,10 @@ -//+build cgo +//go:build cgo +// +build cgo package ffi -// #cgo LDFLAGS: ${SRCDIR}/libfilcrypto.a +// #cgo linux LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-unresolved-symbols=ignore-all +// #cgo darwin LDFLAGS: ${SRCDIR}/libfilcrypto.a -Wl,-undefined,dynamic_lookup // #cgo pkg-config: ${SRCDIR}/filcrypto.pc // #include "./filcrypto.h" import "C" diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 31b98311..8934265a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "aes" version = "0.6.0" @@ -33,6 +48,17 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.6", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.18" @@ -62,9 +88,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" +checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" + +[[package]] +name = "anymap" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344" [[package]] name = "arrayref" @@ -78,6 +110,140 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "async-channel" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "once_cell", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a" +dependencies = [ + "async-channel", + "async-executor", + "async-io", + "async-mutex", + "blocking", + "futures-lite", + "num_cpus", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +dependencies = [ + "concurrent-queue", + "futures-lite", + "libc", + "log", + "once_cell", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "winapi 0.3.9", +] + +[[package]] +name = "async-lock" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-std" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" +dependencies = [ + "async-channel", + "async-global-executor", + "async-io", + "async-lock", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "num_cpus", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-task" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" + +[[package]] +name = "async-trait" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "atomic-waker" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" + [[package]] name = "atty" version = "0.2.14" @@ -95,6 +261,33 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base-x" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + [[package]] name = "bellperson" version = "0.18.2" @@ -103,7 +296,7 @@ checksum = "121a6b5dd501e84f0529d2d25cecc4f5f38439f1f4db9f869db7780d4e082b52" dependencies = [ "bincode", "bitvec 0.22.3", - "blake2s_simd", + "blake2s_simd 0.5.11", "blstrs", "byteorder 1.4.3", "crossbeam-channel", @@ -121,7 +314,7 @@ dependencies = [ "memmap", "num_cpus", "pairing", - "rand 0.8.4", + "rand 0.8.5", "rand_core 0.6.3", "rayon", "rust-gpu-tools", @@ -131,6 +324,15 @@ dependencies = [ "yastl", ] +[[package]] +name = "bimap" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" +dependencies = [ + "serde", +] + [[package]] name = "bincode" version = "1.3.3" @@ -181,7 +383,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", + "constant_time_eq", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", "constant_time_eq", ] @@ -192,7 +405,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", + "constant_time_eq", +] + +[[package]] +name = "blake2s_simd" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "cc", + "cfg-if 1.0.0", "constant_time_eq", ] @@ -217,6 +454,15 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array 0.14.5", +] + [[package]] name = "block-modes" version = "0.7.0" @@ -242,6 +488,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "blocking" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" +dependencies = [ + "async-channel", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", + "once_cell", +] + [[package]] name = "bls-signatures" version = "0.11.3" @@ -288,11 +548,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "bumpalo" +version = "3.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" + [[package]] name = "byte-slice-cast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" [[package]] name = "byte-tools" @@ -312,28 +578,36 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "cache-padded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" + [[package]] name = "cbindgen" -version = "0.14.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13121dbb597b915a0e1d7e6ad0a8a8ab4100e0ae6dbe799980b5dbf2f2723886" +checksum = "51e3973b165dc0f435831a9e426de67e894de532754ff7a3f307c03ee5dec7dc" dependencies = [ - "clap", + "clap 2.34.0", + "heck 0.3.3", + "indexmap", "log", "proc-macro2 1.0.36", - "quote 1.0.15", + "quote 1.0.17", "serde", "serde_json", - "syn 1.0.86", + "syn 1.0.90", "tempfile", "toml", ] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -360,6 +634,20 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "cid" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5d90881dc52bb7867dd4341dfe6836077370f879df51cee353daa74e035a13" +dependencies = [ + "core2", + "multibase", + "multihash", + "serde", + "serde_bytes", + "unsigned-varint", +] + [[package]] name = "cipher" version = "0.2.5" @@ -397,12 +685,51 @@ dependencies = [ "ansi_term 0.12.1", "atty", "bitflags 1.3.2", - "strsim", - "textwrap", + "strsim 0.8.0", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap 0.15.0", +] + +[[package]] +name = "clap_derive" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "concurrent-queue" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +dependencies = [ + "cache-padded", +] + [[package]] name = "config" version = "0.10.1" @@ -421,11 +748,35 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpp_demangle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] @@ -437,99 +788,349 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] -name = "crossbeam" -version = "0.8.1" +name = "cranelift-bforest" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" +checksum = "62fc68cdb867b7d27b5f33cd65eb11376dfb41a2d09568a1a2c2bc1dc204f4ef" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", + "cranelift-entity", ] [[package]] -name = "crossbeam-channel" -version = "0.5.2" +name = "cranelift-codegen" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "31253a44ab62588f8235a996cc9b0636d98a299190069ced9628b8547329b47a" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "gimli", + "log", + "regalloc", + "smallvec", + "target-lexicon", ] [[package]] -name = "crossbeam-deque" -version = "0.8.1" +name = "cranelift-codegen-meta" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "7a20ab4627d30b702fb1b8a399882726d216b8164d3b3fa6189e3bf901506afe" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", + "cranelift-codegen-shared", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.7" +name = "cranelift-codegen-shared" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] +checksum = "6687d9668dacfed4468361f7578d86bded8ca4db978f734d9b631494bebbb5b8" [[package]] -name = "crossbeam-queue" -version = "0.3.4" +name = "cranelift-entity" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" +checksum = "c77c5d72db97ba2cb36f69037a709edbae0d29cb25503775891e7151c5c874bf" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", + "serde", ] [[package]] -name = "crossbeam-utils" -version = "0.8.7" +name = "cranelift-frontend" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "426dca83f63c7c64ea459eb569aadc5e0c66536c0042ed5d693f91830e8750d0" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", ] [[package]] -name = "ctor" -version = "0.1.21" +name = "cranelift-native" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "8007864b5d0c49b026c861a15761785a2871124e401630c03ef1426e6d0d559e" dependencies = [ - "quote 1.0.15", - "syn 1.0.86", + "cranelift-codegen", + "libc", + "target-lexicon", ] [[package]] -name = "cuda-config" -version = "0.1.0" +name = "cranelift-wasm" +version = "0.80.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee74643f7430213a1a78320f88649de309b20b80818325575e393f848f79f5d" +checksum = "94cf12c071415ba261d897387ae5350c4d83c238376c8c5a96514ecfa2ea66a3" dependencies = [ - "glob", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "itertools 0.10.3", + "log", + "smallvec", + "wasmparser", + "wasmtime-types", ] [[package]] -name = "cuda-driver-sys" -version = "0.3.0" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4c552cc0de854877d80bcd1f11db75d42be32962d72a6799b88dcca88fffbd" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cuda-config", + "cfg-if 1.0.0", +] + +[[package]] +name = "crossbeam" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" +dependencies = [ + "autocfg", + "cfg-if 1.0.0", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +dependencies = [ + "cfg-if 1.0.0", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array 0.14.5", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.5", + "subtle", +] + +[[package]] +name = "cs_serde_bytes" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebca5e1e931005a5d90cc90831a22619c94fdeb645435c22eae52956dee29675" +dependencies = [ + "serde", +] + +[[package]] +name = "ctor" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" +dependencies = [ + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "cuda-config" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee74643f7430213a1a78320f88649de309b20b80818325575e393f848f79f5d" +dependencies = [ + "glob", +] + +[[package]] +name = "cuda-driver-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d4c552cc0de854877d80bcd1f11db75d42be32962d72a6799b88dcca88fffbd" +dependencies = [ + "cuda-config", +] + +[[package]] +name = "darling" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.36", + "quote 1.0.17", + "strsim 0.10.0", + "syn 1.0.90", +] + +[[package]] +name = "darling_macro" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" +dependencies = [ + "darling_core", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "data-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" + +[[package]] +name = "data-encoding-macro" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" +dependencies = [ + "data-encoding", + "syn 1.0.90", +] + +[[package]] +name = "derive-getters" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c5905670fd9c320154f3a4a01c9e609733cd7b753f3c58777ab7d5ce26686b3" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "derive_builder" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5" +dependencies = [ + "darling", + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "derive_builder_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73" +dependencies = [ + "derive_builder_core", + "syn 1.0.90", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2 1.0.36", + "quote 1.0.17", + "rustc_version", + "syn 1.0.90", ] [[package]] @@ -556,6 +1157,16 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", +] + [[package]] name = "dirs" version = "2.0.2" @@ -568,9 +1179,9 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", @@ -620,11 +1231,38 @@ dependencies = [ "winapi 0.2.8", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "event-listener" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" + [[package]] name = "execute" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7099ac27f7ca234fa6daac042ffc9ede4e3527fd43cfdcdb2abc3befb6192a8a" +checksum = "23672a3a5872c06b1e8bc3a8803825a1dbe498c6636ee44c8c5abdba9e308fb6" dependencies = [ "execute-command-macro", "execute-command-tokens", @@ -633,98 +1271,581 @@ dependencies = [ [[package]] name = "execute-command-macro" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5371880151fac48751fccc4c785ab8d0ad4f589c55f76b7b0377f1c64fcf69aa" +checksum = "6b53ed35ebdfe6022dde913360b081d814d0b3267fb773abf05d89da48fe5eeb" dependencies = [ "execute-command-macro-impl", ] [[package]] name = "execute-command-macro-impl" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8bee3904e0525eff0d4b168208c92ddc14a24e9eb619745b69fdac87ea4142" +checksum = "af4a304bcd894a5d41f8b379d01e09bff28fd8df257216a33699658ea37bccb8" dependencies = [ "execute-command-tokens", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", ] [[package]] name = "execute-command-tokens" -version = "0.1.4" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e1442395a2d9a27af91ff8f348dfbc99b012f450e4962bdfc2da2fff4dd335" + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + +[[package]] +name = "fdlimit" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +dependencies = [ + "libc", +] + +[[package]] +name = "ff" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +dependencies = [ + "bitvec 0.22.3", + "rand_core 0.6.3", + "subtle", +] + +[[package]] +name = "fff" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edbba9b259baf4dea8d2167240013ca63a75f7719fc75145a906e9f2c6b3f7b" +dependencies = [ + "byteorder 1.4.3", + "cc", + "lazy_static", + "rand_core 0.5.1", + "serde", +] + +[[package]] +name = "ffi-toolkit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b92ec22ace9da5ca0ad6ab61fa6cab1eb46faad7aaaaf9bcf24394c22b7e605a" +dependencies = [ + "drop_struct_macro_derive", + "libc", +] + +[[package]] +name = "fil-rustacuda" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6313e2871ba9705f4151bb60d96b6f43e7444ed82918ba5fb99fbd448e82c34d" +dependencies = [ + "bitflags 1.3.2", + "cuda-driver-sys", + "rustacuda_core", + "rustacuda_derive", +] + +[[package]] +name = "fil_actor_account" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63dbe7d8e11bd9edd6d78fea3f1cba729c09c227ee7d73544a223960ecc4ebfd" +dependencies = [ + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_account" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f603b78eee63577682ada6f50951e5bc0f7828b4c331434f16b4c97c50b42655" +dependencies = [ + "fil_actors_runtime 7.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_bundler" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdb9c600e969dec295da976f2f649babefe6f216cb6db9a26ecc35b2cd5a2c1" +dependencies = [ + "anyhow", + "async-std", + "cid", + "clap 3.1.6", + "futures", + "fvm_ipld_car 0.2.0", + "fvm_shared 0.2.2", + "serde", + "serde_ipld_dagcbor", + "serde_json", +] + +[[package]] +name = "fil_actor_cron" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d21e5c1f0e367ffa67189fd75da81e4ba53b6ed59844ee9755e3138bd7d42" +dependencies = [ + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_cron" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4405e9d59a6427f5b061f7effadc5f2fc8db10646475ae4d9bbb2f28b32bd897" +dependencies = [ + "fil_actors_runtime 7.1.1", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_init" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e127ac25c3263d65957c6206e56d716b18c20df32201a793c346693e6051d9" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_init" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd31fb70336776388b330d695088086b4b8fefe73bb0dca4c79e5a58048c58f" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_market" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31582eb1260be08aa265f004aca0a74e1b69ce432d8e53ebd85c5c145617ece" +checksum = "e1597d947a9718690235d6941ed43a7cd27c60fa1952c5af5221d9601216d812" +dependencies = [ + "ahash", + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_ipld_bitfield", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_market" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d933da0ea2ac22b7114d6e96ea0a3a67638091c4309e2384d7aba151919ef44" +dependencies = [ + "ahash", + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_bitfield", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_miner" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c918890e1dc529c53ab3e1cd049dcd869d7f35282c3b6100f6955f6bdfea2063" +dependencies = [ + "anyhow", + "byteorder 1.4.3", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_ipld_amt 0.2.0", + "fvm_ipld_bitfield", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "itertools 0.10.3", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_miner" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e550b1dacbec0a350b75f4ef93f03be5d27d41fdfa2e03f2e5eb0f17cf6c8641" +dependencies = [ + "anyhow", + "byteorder 1.4.3", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_amt 0.2.0", + "fvm_ipld_bitfield", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "itertools 0.10.3", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_multisig" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d528cd8fcaad887c08a2a09039d67d84a8fcf526acf7308e9fd7e769ed3a1f47" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "indexmap", + "integer-encoding", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_multisig" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde6a801f9439cdb18232bfb6e0a575c80e537d4c4299e4ca8a3d8c51e51f364" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "indexmap", + "integer-encoding", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_paych" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4921eda0a5e580948c9cd362cf194ba08ec511e4c0e04baeda04e8a79fbdab7e" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_paych" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31fe5cea0956ef3abc7ab713b17b031b7c26178433de49fe720b2b48682c58e8" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_power" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a0af455c80ba5e612fe2ef8a02b28c82ce6927b5bd835978c98177dd8d19dae" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "indexmap", + "integer-encoding", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_power" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dec674a6962d7657a994a39944237869206aa55ba4c0432026133bc14c8ad73" +dependencies = [ + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "indexmap", + "integer-encoding", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_reward" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e7c28eb5e35c46b081813f91c3ca22cb078d36094d13a70c74c5b355b530ee" +dependencies = [ + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_reward" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027041f8c8715ca35091e8d838c7844c635ab194468aecd128dd2310e3c9f7a4" +dependencies = [ + "fil_actors_runtime 7.1.1", + "fvm_shared 0.2.2", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", +] + +[[package]] +name = "fil_actor_system" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34938a56917f7504a7a42752f4d960cc57410554784cc2789752ea9e936d042" +dependencies = [ + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "fil_actor_system" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "f2570e4c73dd5bd12f85cbeb9132e69b02c26e43d3339e13d233a9da5a7db8a7" +dependencies = [ + "fil_actors_runtime 7.1.1", + "fvm_shared 0.2.2", + "num-derive", + "num-traits", + "serde", +] [[package]] -name = "fastrand" -version = "1.7.0" +name = "fil_actor_verifreg" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "97adc9028d4c30a4f30387a3239cddecd98dd5d800c09a66c5a139fba0526c5d" dependencies = [ - "instant", + "anyhow", + "cid", + "fil_actors_runtime 6.1.1", + "fvm_shared 0.2.2", + "lazy_static", + "num-derive", + "num-traits", + "serde", ] [[package]] -name = "fdlimit" -version = "0.2.1" +name = "fil_actor_verifreg" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "967cf3d43d3e51ddcd9116cdd0a8bb6ace505e3177a152a1112d94088783e198" dependencies = [ - "libc", + "anyhow", + "cid", + "fil_actors_runtime 7.1.1", + "fvm_ipld_hamt 0.2.0", + "fvm_shared 0.2.2", + "lazy_static", + "num-derive", + "num-traits", + "serde", ] [[package]] -name = "ff" -version = "0.11.0" +name = "fil_actors_runtime" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "33930dc0ec8bf9a031cb21fb42eaabb9e635081cffdd0920cbbb5c78764f7113" dependencies = [ - "bitvec 0.22.3", - "rand_core 0.6.3", - "subtle", + "anyhow", + "base64", + "byteorder 1.4.3", + "cid", + "fvm_ipld_amt 0.2.0", + "fvm_ipld_hamt 0.2.0", + "fvm_sdk", + "fvm_shared 0.2.2", + "getrandom 0.2.6", + "indexmap", + "integer-encoding", + "lazy_static", + "log", + "num-derive", + "num-traits", + "serde", + "thiserror", + "unsigned-varint", ] [[package]] -name = "fff" -version = "0.3.1" +name = "fil_actors_runtime" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edbba9b259baf4dea8d2167240013ca63a75f7719fc75145a906e9f2c6b3f7b" +checksum = "55edd95ab33981cf853eb28b41eb3a57a3b510edd5cfdd821e1a63014cc048f8" dependencies = [ + "anyhow", + "base64", "byteorder 1.4.3", - "cc", + "cid", + "fvm_ipld_amt 0.2.0", + "fvm_ipld_hamt 0.2.0", + "fvm_sdk", + "fvm_shared 0.2.2", + "getrandom 0.2.6", + "indexmap", + "integer-encoding", "lazy_static", - "rand_core 0.5.1", + "log", + "num-derive", + "num-traits", "serde", + "thiserror", + "unsigned-varint", ] [[package]] -name = "ffi-toolkit" -version = "0.5.0" +name = "fil_builtin_actors_bundle" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92ec22ace9da5ca0ad6ab61fa6cab1eb46faad7aaaaf9bcf24394c22b7e605a" +checksum = "1e69d3cdc48067f6410de8c9f1da84c64f3d7a33177de52237fa8fe92b81b9fa" dependencies = [ - "drop_struct_macro_derive", - "libc", + "cid", + "fil_actor_account 6.1.1", + "fil_actor_bundler", + "fil_actor_cron 6.1.1", + "fil_actor_init 6.1.1", + "fil_actor_market 6.1.1", + "fil_actor_miner 6.1.1", + "fil_actor_multisig 6.1.1", + "fil_actor_paych 6.1.1", + "fil_actor_power 6.1.1", + "fil_actor_reward 6.1.1", + "fil_actor_system 6.1.1", + "fil_actor_verifreg 6.1.1", ] [[package]] -name = "fil-rustacuda" -version = "0.1.3" +name = "fil_builtin_actors_bundle" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6313e2871ba9705f4151bb60d96b6f43e7444ed82918ba5fb99fbd448e82c34d" +checksum = "133679f7ee23c89b1cdfe6a061d0729046c7f2d060d207463b4517e53ea9b3eb" dependencies = [ - "bitflags 1.3.2", - "cuda-driver-sys", - "rustacuda_core", - "rustacuda_derive", + "cid", + "fil_actor_account 7.1.1", + "fil_actor_bundler", + "fil_actor_cron 7.1.1", + "fil_actor_init 7.1.1", + "fil_actor_market 7.1.1", + "fil_actor_miner 7.1.1", + "fil_actor_multisig 7.1.1", + "fil_actor_paych 7.1.1", + "fil_actor_power 7.1.1", + "fil_actor_reward 7.1.1", + "fil_actor_system 7.1.1", + "fil_actor_verifreg 7.1.1", + "fil_actors_runtime 7.1.1", ] [[package]] @@ -748,22 +1869,36 @@ dependencies = [ "blstrs", "byteorder 1.4.3", "cbindgen", + "cid", "drop_struct_macro_derive", "fff", "ffi-toolkit", + "fil_builtin_actors_bundle 6.1.1", + "fil_builtin_actors_bundle 7.1.1", "fil_logger", "filecoin-proofs-api", "filepath", "fr32", + "futures", + "fvm", + "fvm_ipld_car 0.3.0", + "fvm_shared 0.3.1", "group", + "lazy_static", "libc", "log", "memmap", - "rand 0.8.4", + "num-bigint 0.4.3", + "num-traits", + "once_cell", + "rand 0.8.5", "rand_chacha 0.3.1", "rayon", "rust-gpu-tools", + "serde", + "serde_bytes", "serde_json", + "serde_tuple", "storage-proofs-porep", "tempfile", ] @@ -783,7 +1918,7 @@ dependencies = [ "lazy_static", "merkletree", "neptune", - "rand 0.8.4", + "rand 0.8.5", "serde", "sha2 0.9.9", ] @@ -798,8 +1933,8 @@ dependencies = [ "bellperson", "bincode", "bitvec 0.17.4", - "blake2b_simd", - "blake2s_simd", + "blake2b_simd 0.5.11", + "blake2s_simd 0.5.11", "blstrs", "byte-slice-cast", "byteorder 1.4.3", @@ -816,7 +1951,7 @@ dependencies = [ "memmap", "merkletree", "once_cell", - "rand 0.8.4", + "rand 0.8.5", "rand_xorshift", "rayon", "serde", @@ -832,7 +1967,8 @@ dependencies = [ [[package]] name = "filecoin-proofs-api" version = "11.0.0" -source = "git+https://github.com/filecoin-project/rust-filecoin-proofs-api#250963c69f13bef8ab91f709e9e33c9e1d760fbd" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5280b3e09bdad4352756c78a9f71ab06442fedcc3f93cda681851c4bc7c25325" dependencies = [ "anyhow", "bellperson", @@ -871,13 +2007,29 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.10" +version = "0.10.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d04dafd11240188e146b6f6476a898004cace3be31d4ec5e08e216bf4947ac0" +checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" dependencies = [ "spin", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "forest_hash_utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb061ad769411763a5d6ae39d596696657472b25a66387fbb0ba8c133bb6575" +dependencies = [ + "cs_serde_bytes", + "serde", +] + [[package]] name = "fr32" version = "4.0.2" @@ -915,6 +2067,329 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1847abb9cb65d566acd5942e94aea9c8f547ad02c98e1649326fc0e8910b8b1e" +[[package]] +name = "futures" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" + +[[package]] +name = "futures-executor" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" + +[[package]] +name = "futures-lite" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-macro" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "futures-sink" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" + +[[package]] +name = "futures-task" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" + +[[package]] +name = "futures-util" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fvm" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9d388d120e063fdb54cbf96b4d11f6e16f3b81bbeef16dd19a639917aee33f" +dependencies = [ + "ahash", + "anyhow", + "anymap", + "byteorder 1.4.3", + "cid", + "derive-getters", + "derive_builder", + "derive_more", + "filecoin-proofs-api", + "fvm_ipld_amt 0.3.0", + "fvm_ipld_hamt 0.3.0", + "fvm_shared 0.3.1", + "lazy_static", + "log", + "multihash", + "num-derive", + "num-traits", + "num_cpus", + "rayon", + "replace_with", + "serde", + "serde_repr", + "serde_tuple", + "thiserror", + "wasmtime", +] + +[[package]] +name = "fvm_ipld_amt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2390a9be38948b76ee749da692a342e70000bce9cfc988e90c64729a915962e" +dependencies = [ + "ahash", + "anyhow", + "cid", + "fvm_shared 0.2.2", + "itertools 0.10.3", + "once_cell", + "serde", + "thiserror", +] + +[[package]] +name = "fvm_ipld_amt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a81859c063e5b746cfeb333a4d9bf2c5bb324e4c29494c771a424af259852116" +dependencies = [ + "anyhow", + "cid", + "fvm_shared 0.3.1", + "itertools 0.10.3", + "once_cell", + "serde", + "thiserror", +] + +[[package]] +name = "fvm_ipld_bitfield" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "075a50062801672269626dabfe211a9f01487c08d6fbd1677a4e550a2b864fad" +dependencies = [ + "cs_serde_bytes", + "fvm_shared 0.2.2", + "serde", + "unsigned-varint", +] + +[[package]] +name = "fvm_ipld_car" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce7ed46e948d0e83894d77dcb9b351615ef7ee15dc2a09b35fe9878d8cca5e5c" +dependencies = [ + "cid", + "futures", + "fvm_shared 0.2.2", + "integer-encoding", + "serde", + "thiserror", +] + +[[package]] +name = "fvm_ipld_car" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e186eb65b2889047137b3c34fb47d2599ab1c82ea46adf3b48c0340c5d1f86f2" +dependencies = [ + "cid", + "futures", + "fvm_shared 0.3.1", + "integer-encoding", + "serde", + "thiserror", +] + +[[package]] +name = "fvm_ipld_hamt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4f07857e1978ce116716012ea6a675803fea00fb36504c307656f935f32578" +dependencies = [ + "anyhow", + "byteorder 1.4.3", + "cid", + "cs_serde_bytes", + "forest_hash_utils", + "fvm_shared 0.2.2", + "libipld-core", + "once_cell", + "serde", + "sha2 0.10.2", + "thiserror", +] + +[[package]] +name = "fvm_ipld_hamt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ef3da1590125b4d46a48fc7ebe6121c46eea36ec5bc497642d9d551f2529bf3" +dependencies = [ + "anyhow", + "byteorder 1.4.3", + "cid", + "cs_serde_bytes", + "forest_hash_utils", + "fvm_shared 0.3.1", + "libipld-core", + "once_cell", + "serde", + "sha2 0.10.2", + "thiserror", +] + +[[package]] +name = "fvm_sdk" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903fa0cda6338b8f1371a95ca698969376084effd7a7ee29eb18758c2565d356" +dependencies = [ + "cid", + "fvm_shared 0.2.2", + "lazy_static", + "log", + "num-traits", + "thiserror", +] + +[[package]] +name = "fvm_shared" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee9d14e8700cc796800d89b4e9bd1c886e1735e6a07c760b54cd8730c680b3e" +dependencies = [ + "anyhow", + "bimap", + "blake2b_simd 1.0.0", + "byteorder 1.4.3", + "chrono", + "cid", + "cs_serde_bytes", + "data-encoding", + "data-encoding-macro", + "lazy_static", + "log", + "multihash", + "num-bigint 0.4.3", + "num-derive", + "num-integer", + "num-traits", + "serde", + "serde_ipld_dagcbor", + "serde_repr", + "serde_tuple", + "thiserror", + "unsigned-varint", +] + +[[package]] +name = "fvm_shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d264f7227e65f5469e0d28461b3d86f958ff89d0f4788d7b35c7c4d42c3fcf8" +dependencies = [ + "anyhow", + "bimap", + "blake2b_simd 1.0.0", + "bls-signatures", + "byteorder 1.4.3", + "chrono", + "cid", + "cs_serde_bytes", + "data-encoding", + "data-encoding-macro", + "filecoin-proofs-api", + "lazy_static", + "libsecp256k1", + "log", + "multihash", + "num-bigint 0.4.3", + "num-derive", + "num-integer", + "num-traits", + "serde", + "serde_ipld_dagcbor", + "serde_repr", + "serde_tuple", + "thiserror", + "unsigned-varint", +] + [[package]] name = "generic-array" version = "0.12.4" @@ -947,13 +2422,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.10.2+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", ] [[package]] @@ -962,6 +2450,18 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +[[package]] +name = "gloo-timers" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d12a7f4e95cfe710f1d624fb1210b7d961a5fb05c4fd942f4feab06e61f590e" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "group" version = "0.11.0" @@ -970,12 +2470,39 @@ checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" dependencies = [ "byteorder 1.4.3", "ff", - "rand 0.8.4", + "rand 0.8.5", "rand_core 0.6.3", "rand_xorshift", "subtle", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -991,6 +2518,27 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.5", + "hmac", +] + [[package]] name = "hwloc" version = "0.3.0" @@ -998,12 +2546,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "657dd2f25a0ff8c4f19c4f7ab42d3ffad0a7f282b6e73adafa4b4448d95f60cf" dependencies = [ "bitflags 0.4.0", - "errno", + "errno 0.1.8", "libc", "num", "pkg-config", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +dependencies = [ + "autocfg", + "hashbrown", + "serde", +] + [[package]] name = "instant" version = "0.1.12" @@ -1013,6 +2578,25 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "integer-encoding" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e85a1509a128c855368e135cffcde7eac17d8e1083f41e2b98c58bc1a5074be" +dependencies = [ + "async-trait", + "futures-util", +] + +[[package]] +name = "io-lifetimes" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ef6787e7f0faedc040f95716bdd0e62bcfcf4ba93da053b62dea2691c13864" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "itertools" version = "0.8.2" @@ -1046,6 +2630,21 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "js-sys" +version = "0.3.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1056,6 +2655,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.4.0" @@ -1068,7 +2676,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ - "arrayvec", + "arrayvec 0.5.2", "bitflags 1.3.2", "cfg-if 1.0.0", "ryu", @@ -1077,9 +2685,78 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.117" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" + +[[package]] +name = "libipld-core" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdd758764f9680a818af33c31db733eb7c45224715d8816b9dcf0548c75f7c5" +dependencies = [ + "anyhow", + "cid", + "core2", + "multibase", + "multihash", + "serde", + "thiserror", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linux-raw-sys" +version = "0.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" +checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca" [[package]] name = "lock_api" @@ -1092,11 +2769,21 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" dependencies = [ "cfg-if 1.0.0", + "value-bag", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", ] [[package]] @@ -1153,6 +2840,66 @@ dependencies = [ "typenum", ] +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "more-asserts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7392bffd88bc0c4f8297e36a777ab9f80b7127409c4a1acb8fee99c9f27addcd" +dependencies = [ + "blake2b_simd 1.0.0", + "blake2s_simd 1.0.0", + "blake3", + "core2", + "digest 0.10.3", + "multihash-derive", + "serde", + "serde-big-array", + "sha2 0.10.2", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "multihash-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" +dependencies = [ + "proc-macro-crate", + "proc-macro-error", + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", + "synstructure", +] + [[package]] name = "neptune" version = "5.1.0" @@ -1160,7 +2907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d4dfea4e31f0c2efdde6428997a395eec130fd42554b68f5c9844301db4911a" dependencies = [ "bellperson", - "blake2s_simd", + "blake2s_simd 0.5.11", "blstrs", "byteorder 1.4.3", "ec-gpu", @@ -1224,6 +2971,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" version = "0.1.43" @@ -1234,6 +2992,17 @@ dependencies = [ "rustc-serialize", ] +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1286,11 +3055,22 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +dependencies = [ + "crc32fast", + "indexmap", + "memchr", +] + [[package]] name = "once_cell" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] name = "opaque-debug" @@ -1314,11 +3094,20 @@ dependencies = [ "libc", ] +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +dependencies = [ + "memchr", +] + [[package]] name = "output_vt100" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ "winapi 0.3.9", ] @@ -1332,6 +3121,18 @@ dependencies = [ "group", ] +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + +[[package]] +name = "paste" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" + [[package]] name = "pest" version = "2.1.3" @@ -1341,12 +3142,37 @@ dependencies = [ "ucd-trie", ] +[[package]] +name = "pin-project-lite" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +[[package]] +name = "polling" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "log", + "wepoll-ffi", + "winapi 0.3.9", +] + [[package]] name = "positioned-io" version = "0.2.2" @@ -1377,6 +3203,40 @@ dependencies = [ "output_vt100", ] +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "version_check", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -1395,6 +3255,15 @@ dependencies = [ "unicode-xid 0.2.2", ] +[[package]] +name = "psm" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eca0fa5dd7c4c96e184cec588f0b1db1ee3165e678db21c09793105acb17e6f" +dependencies = [ + "cc", +] + [[package]] name = "quote" version = "0.6.13" @@ -1406,9 +3275,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" dependencies = [ "proc-macro2 1.0.36", ] @@ -1448,19 +3317,18 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", + "rand_hc", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.3", - "rand_hc 0.3.1", ] [[package]] @@ -1513,7 +3381,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.6", ] [[package]] @@ -1525,15 +3393,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rand_xorshift" version = "0.3.0" @@ -1579,28 +3438,40 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "8ae183fc1b06c149f0c1793e1eb447c8b04bfe46d48e9e48bfb8d2d7ed64ecf0" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.6", "redox_syscall", + "thiserror", +] + +[[package]] +name = "regalloc" +version = "0.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d808cff91dfca7b239d40b972ba628add94892b1d9e19a842aedc5cfae8ab1a" +dependencies = [ + "log", + "rustc-hash", + "smallvec", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -1613,6 +3484,18 @@ version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +[[package]] +name = "region" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" +dependencies = [ + "bitflags 1.3.2", + "libc", + "mach", + "winapi 0.3.9", +] + [[package]] name = "remove_dir_all" version = "0.5.3" @@ -1622,6 +3505,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "replace_with" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" + [[package]] name = "rust-gpu-tools" version = "0.5.0" @@ -1651,16 +3540,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43ce8670a1a1d0fc2514a3b846dacdb65646f9bd494b6674cfacbb4ce430bd7e" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", ] +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.7", +] + +[[package]] +name = "rustix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2dcfc2778a90e38f56a708bfc90572422e11d6c7ee233d053d1f782cf9df6d2" +dependencies = [ + "bitflags 1.3.2", + "errno 0.2.8", + "io-lifetimes", + "libc", + "linux-raw-sys", + "winapi 0.3.9", +] + [[package]] name = "ryu" version = "1.0.9" @@ -1682,6 +3606,12 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" + [[package]] name = "semver-parser" version = "0.10.2" @@ -1700,6 +3630,24 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.136" @@ -1707,21 +3655,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "serde_ipld_dagcbor" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "950f35fcae42dd9268d9253eb8f846dcef4d66e4e7d56494f38c8eb13e16d87b" +dependencies = [ + "cid", + "half", + "serde", ] [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + +[[package]] +name = "serde_tuple" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f025b91216f15a2a32aa39669329a475733590a015835d1783549a56d09427" +dependencies = [ + "serde", + "serde_tuple_macros", +] + +[[package]] +name = "serde_tuple_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4076151d1a2b688e25aaf236997933c66e18b870d0369f8b248b8ab2be630d7e" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", +] + [[package]] name = "sha2" version = "0.8.2" @@ -1748,6 +3739,17 @@ dependencies = [ "sha2-asm", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.3", +] + [[package]] name = "sha2-asm" version = "0.6.2" @@ -1773,6 +3775,38 @@ dependencies = [ "sha2-asm", ] +[[package]] +name = "sha3" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +dependencies = [ + "digest 0.10.3", + "keccak", +] + +[[package]] +name = "slab" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" + +[[package]] +name = "smallvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" + +[[package]] +name = "socket2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "spin" version = "0.9.2" @@ -1782,6 +3816,12 @@ dependencies = [ "lock_api", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1797,8 +3837,8 @@ dependencies = [ "aes", "anyhow", "bellperson", - "blake2b_simd", - "blake2s_simd", + "blake2b_simd 0.5.11", + "blake2s_simd 0.5.11", "block-modes", "blstrs", "byteorder 1.4.3", @@ -1817,10 +3857,10 @@ dependencies = [ "neptune", "num_cpus", "pairing", - "rand 0.8.4", + "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "semver", + "semver 0.11.0", "serde", "serde_json", "sha2 0.9.9", @@ -1862,7 +3902,7 @@ dependencies = [ "num_cpus", "pairing", "pretty_assertions", - "rand 0.8.4", + "rand 0.8.5", "rayon", "serde", "serde_json", @@ -1880,8 +3920,8 @@ checksum = "50c9905470cac8b05b513a4be1944f5e3b1dc9f4e9c0f25d0cb717b77f536f86" dependencies = [ "anyhow", "bellperson", - "blake2b_simd", - "blake2s_simd", + "blake2b_simd 0.5.11", + "blake2s_simd 0.5.11", "blstrs", "byteorder 1.4.3", "crossbeam", @@ -1894,7 +3934,7 @@ dependencies = [ "merkletree", "neptune", "num_cpus", - "rand 0.8.4", + "rand 0.8.5", "rayon", "serde", "sha2 0.9.9", @@ -1933,7 +3973,7 @@ dependencies = [ "num-traits", "num_cpus", "pretty_assertions", - "rand 0.8.4", + "rand 0.8.5", "rayon", "serde", "serde_json", @@ -1950,6 +3990,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "subtle" version = "2.4.1" @@ -1969,12 +4015,12 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.86" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "704df27628939572cd88d33f171cd6f896f4eaca85252c6e0a72d8d8287ee86f" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", + "quote 1.0.17", "unicode-xid 0.2.2", ] @@ -1985,8 +4031,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", "unicode-xid 0.2.2", ] @@ -1996,6 +4042,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "target-lexicon" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" + [[package]] name = "tempdir" version = "0.3.7" @@ -2020,6 +4072,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -2029,6 +4090,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thiserror" version = "1.0.30" @@ -2045,8 +4112,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", ] [[package]] @@ -2089,6 +4156,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +[[package]] +name = "unicode-segmentation" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" + [[package]] name = "unicode-width" version = "0.1.9" @@ -2107,6 +4180,22 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +[[package]] +name = "unsigned-varint" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" + +[[package]] +name = "value-bag" +version = "1.0.0-alpha.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" +dependencies = [ + "ctor", + "version_check", +] + [[package]] name = "vec_map" version = "0.8.2" @@ -2119,6 +4208,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -2131,6 +4226,228 @@ version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +[[package]] +name = "wasm-bindgen" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" +dependencies = [ + "quote 1.0.17", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" +dependencies = [ + "proc-macro2 1.0.36", + "quote 1.0.17", + "syn 1.0.90", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" + +[[package]] +name = "wasmparser" +version = "0.81.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc" + +[[package]] +name = "wasmtime" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c9c724da92e39a85d2231d4c2a942c8be295211441dbca581c6c3f3f45a9f00" +dependencies = [ + "anyhow", + "backtrace", + "bincode", + "cfg-if 1.0.0", + "cpp_demangle", + "indexmap", + "lazy_static", + "libc", + "log", + "object", + "paste", + "psm", + "rayon", + "region", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmparser", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "winapi 0.3.9", +] + +[[package]] +name = "wasmtime-cranelift" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1762765dd69245f00e5d9783b695039e449a7be0f9c5383e4c78465dd6131aeb" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "gimli", + "log", + "more-asserts", + "object", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4468301d95ec71710bb6261382efe27d1296447711645e3dbabaea6e4de3504" +dependencies = [ + "anyhow", + "cranelift-entity", + "gimli", + "indexmap", + "log", + "more-asserts", + "object", + "serde", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-types", +] + +[[package]] +name = "wasmtime-jit" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab0ae6e581ff014b470ec35847ea3c0b4c3ace89a55df5a04c802a11f4574e7d" +dependencies = [ + "addr2line", + "anyhow", + "bincode", + "cfg-if 1.0.0", + "gimli", + "object", + "region", + "serde", + "target-lexicon", + "thiserror", + "wasmtime-environ", + "wasmtime-runtime", + "winapi 0.3.9", +] + +[[package]] +name = "wasmtime-runtime" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9c28877ae37a367cda7b52b8887589816152e95dde9b7c80cc686f52761961" +dependencies = [ + "anyhow", + "backtrace", + "cc", + "cfg-if 1.0.0", + "indexmap", + "lazy_static", + "libc", + "log", + "mach", + "memoffset", + "more-asserts", + "rand 0.8.5", + "region", + "rustix", + "thiserror", + "wasmtime-environ", + "winapi 0.3.9", +] + +[[package]] +name = "wasmtime-types" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395726e8f5dd8c57cb0db445627b842343f7e29ed7489467fdf7953ed9d3cd4f" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + +[[package]] +name = "web-sys" +version = "0.3.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + [[package]] name = "winapi" version = "0.2.8" @@ -2159,6 +4476,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2176,9 +4502,9 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "yastl" @@ -2206,7 +4532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb56561c1f8f5441784ea91f52ae8b44268d920f2a59121968fec9297fa7157" dependencies = [ "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", + "quote 1.0.17", + "syn 1.0.90", "synstructure", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 0146f106..5d45f3bb 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -10,7 +10,8 @@ authors = [ license = "MIT OR Apache-2.0" repository = "https://github.com/filecoin-project/filecoin-ffi" readme = "README.md" -edition = "2018" +edition = "2021" +resolver = "2" publish = false [lib] @@ -38,15 +39,28 @@ memmap = "0.7" rust-gpu-tools = { version = "0.5", default-features = false } storage-proofs-porep = { version = "~11.0", default-features = false } fr32 = { version = "~4.0", default-features = false } +fvm = { version = "0.4.0", default-features = false } +fvm_ipld_car = "0.3.0" +fvm_shared = "0.3.1" +actors-v6 = { package = "fil_builtin_actors_bundle", version = "6.1.1" } +actors-v7 = { package = "fil_builtin_actors_bundle", version = "7.1.1" } +num-traits = "0.2.14" +num-bigint = "0.4" +cid = { version = "0.8.3", features = ["serde-codec"] } +lazy_static = "1.4.0" +once_cell = "1.9.0" +serde = "1.0.117" +serde_bytes = "0.11.5" +serde_tuple = "0.5" +futures = "0.3.5" [dependencies.filecoin-proofs-api] package = "filecoin-proofs-api" version = "11.0" -git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" default-features = false [build-dependencies] -cbindgen = "= 0.14.0" +cbindgen = "= 0.20.0" [dev-dependencies] tempfile = "3.0.8" @@ -54,6 +68,10 @@ tempfile = "3.0.8" [features] default = ["opencl", "multicore-sdr" ] blst-portable = ["bls-signatures/blst-portable", "blstrs/portable"] -opencl = ["filecoin-proofs-api/opencl", "bellperson/opencl", "storage-proofs-porep/opencl", "rust-gpu-tools/opencl"] -cuda = ["filecoin-proofs-api/cuda", "bellperson/cuda", "storage-proofs-porep/cuda", "rust-gpu-tools/cuda"] +opencl = ["filecoin-proofs-api/opencl", "bellperson/opencl", "storage-proofs-porep/opencl", "rust-gpu-tools/opencl", "fvm/opencl"] +cuda = ["filecoin-proofs-api/cuda", "bellperson/cuda", "storage-proofs-porep/cuda", "rust-gpu-tools/cuda", "fvm/cuda"] multicore-sdr = ["storage-proofs-porep/multicore-sdr"] + +# Only enabled by cbindgen. When enabled, the cgo_* externs are disabled so as not to confuse +# cbindgen. +bindgen=[] diff --git a/rust/cbindgen.toml b/rust/cbindgen.toml index b5e0fadd..baf8f66b 100644 --- a/rust/cbindgen.toml +++ b/rust/cbindgen.toml @@ -19,5 +19,8 @@ language = "C" parse_deps = true include = ["ffi-toolkit"] +[parse.expand] +features = ["bindgen"] + [enum] prefix_with_name = true diff --git a/rust/rust-toolchain b/rust/rust-toolchain index 1fbf4a40..5167d0cb 100644 --- a/rust/rust-toolchain +++ b/rust/rust-toolchain @@ -1 +1 @@ -nightly-2021-07-29 +nightly-2021-12-14 \ No newline at end of file diff --git a/rust/scripts/build-release.sh b/rust/scripts/build-release.sh index b5dc9dfa..b96e3bbd 100755 --- a/rust/scripts/build-release.sh +++ b/rust/scripts/build-release.sh @@ -30,6 +30,10 @@ main() { # trap '{ rm -f $__build_output_log_tmp; }' EXIT + # add the wasm target for building actors + # + rustup target add --toolchain "$2" wasm32-unknown-unknown + # build with RUSTFLAGS configured to output linker flags for native libs # local __rust_flags="--print native-static-libs ${RUSTFLAGS}" diff --git a/rust/src/fvm/blockstore/cgo.rs b/rust/src/fvm/blockstore/cgo.rs new file mode 100644 index 00000000..bae7eb49 --- /dev/null +++ b/rust/src/fvm/blockstore/cgo.rs @@ -0,0 +1,145 @@ +use std::ptr; + +use anyhow::{anyhow, Result}; +use cid::Cid; +use fvm_shared::blockstore::Blockstore; + +use super::super::cgo::*; + +/// The maximum amount of data to buffer in a batch before writing it to the underlying blockstore. +const MAX_BUF_SIZE: usize = 4 << 20; // 4MiB +/// The maximum number of blocks to buffer in a batch before before writing it to the underlying +/// blockstore. +const MAX_BLOCK_BATCH: usize = 1024; + +/// A rough estimate of the CID size, used to estimate the maximum amount of space much space we'll +/// need in the batch buffer to store a CID. +const EST_MAX_CID_LEN: usize = 100; + +pub struct CgoBlockstore { + handle: u64, +} + +impl CgoBlockstore { + /// Construct a new blockstore from a handle. + pub fn new(handle: u64) -> CgoBlockstore { + CgoBlockstore { handle } + } +} + +impl Blockstore for CgoBlockstore { + fn has(&self, k: &Cid) -> Result { + let k_bytes = k.to_bytes(); + unsafe { + match cgo_blockstore_has(self.handle, k_bytes.as_ptr(), k_bytes.len() as i32) { + // We shouldn't get an "error not found" here, but there's no reason to be strict + // about it. + 0 | ERR_NOT_FOUND => Ok(false), + 1 => Ok(true), + // Panic on unknown values. There's a bug in the program. + r @ 2.. => panic!("invalid return value from has: {}", r), + // Panic if the store isn't registered. This means something _very_ unsafe is going + // on and there is a bug in the program. + ERR_INVALID_HANDLE => panic!("blockstore {} not registered", self.handle), + // Otherwise, return "other". We should add error codes in the future. + e => Err(anyhow!("cgo blockstore 'has' failed with error code {}", e)), + } + } + } + + fn get(&self, k: &Cid) -> Result>> { + let k_bytes = k.to_bytes(); + unsafe { + let mut buf: *mut u8 = ptr::null_mut(); + let mut size: i32 = 0; + match cgo_blockstore_get( + self.handle, + k_bytes.as_ptr(), + k_bytes.len() as i32, + &mut buf, + &mut size, + ) { + 0 => Ok(Some(Vec::from_raw_parts(buf, size as usize, size as usize))), + r @ 1.. => panic!("invalid return value from get: {}", r), + ERR_INVALID_HANDLE => panic!("blockstore {} not registered", self.handle), + ERR_NOT_FOUND => Ok(None), + e => Err(anyhow!("cgo blockstore 'get' failed with error code {}", e)), + } + } + } + + fn put_many_keyed(&self, blocks: I) -> Result<()> + where + Self: Sized, + D: AsRef<[u8]>, + I: IntoIterator, + { + fn flush_buffered(handle: u64, lengths: &mut Vec, buf: &mut Vec) -> Result<()> { + if buf.is_empty() { + return Ok(()); + } + + unsafe { + let result = cgo_blockstore_put_many( + handle, + lengths.as_ptr(), + lengths.len() as i32, + buf.as_ptr(), + ); + buf.clear(); + lengths.clear(); + + match result { + 0 => Ok(()), + r @ 1.. => panic!("invalid return value from put_many: {}", r), + ERR_INVALID_HANDLE => panic!("blockstore {} not registered", handle), + // This error makes no sense. + ERR_NOT_FOUND => panic!("not found error on put"), + e => Err(anyhow!("cgo blockstore 'put' failed with error code {}", e)), + } + } + } + + let mut lengths = Vec::with_capacity(MAX_BLOCK_BATCH); + let mut buf = Vec::with_capacity(MAX_BUF_SIZE); + for (k, block) in blocks { + let block = block.as_ref(); + // We limit both the max number of blocks and the max buffer size. Technically, we could + // _just_ limit the buffer size as that should bound the number of blocks. However, + // bounding the maximum number of blocks means we can allocate the vector up-front and + // avoids any re-allocation, copying, etc. + if lengths.len() >= MAX_BLOCK_BATCH + || EST_MAX_CID_LEN + block.len() + buf.len() > MAX_BUF_SIZE + { + flush_buffered(self.handle, &mut lengths, &mut buf)?; + } + + let start = buf.len(); + k.write_bytes(&mut buf)?; + buf.extend_from_slice(block); + let size = buf.len() - start; + lengths.push(size as i32); + } + flush_buffered(self.handle, &mut lengths, &mut buf) + } + + fn put_keyed(&self, k: &Cid, block: &[u8]) -> Result<()> { + let k_bytes = k.to_bytes(); + unsafe { + match cgo_blockstore_put( + self.handle, + k_bytes.as_ptr(), + k_bytes.len() as i32, + block.as_ptr(), + block.len() as i32, + ) { + 0 => Ok(()), + r @ 1.. => panic!("invalid return value from put: {}", r), + ERR_INVALID_HANDLE => panic!("blockstore {} not registered", self.handle), + // This error makes no sense. + ERR_NOT_FOUND => panic!("not found error on put"), + e => Err(anyhow!("cgo blockstore 'put' failed with error code {}", e)), + } + } + } +} diff --git a/rust/src/fvm/blockstore/fake.rs b/rust/src/fvm/blockstore/fake.rs new file mode 100644 index 00000000..a5fe9456 --- /dev/null +++ b/rust/src/fvm/blockstore/fake.rs @@ -0,0 +1,100 @@ +use std::{cell::RefCell, collections::HashMap, convert::TryFrom}; + +use anyhow::Result; +use cid::{ + multihash::{Code, MultihashDigest}, + Cid, +}; +use fvm_shared::blockstore::Blockstore; + +use super::OverlayBlockstore; + +/// A blockstore that allows putting blocks with "fake" (incorrect) CIDs. These "bad blocks" get +/// stored in a separate in-memory map and will not be written to the underlying blockstore. +/// +/// This blockstore can be converted to an [`OverlayBlockstore`] by calling +/// `FakeBlockstore::finish()`, where the "fake" block map will become the `OverlayBlockstore`'s +/// "overlay". +pub struct FakeBlockstore { + fake_blocks: RefCell>>, + base: BS, +} + +impl FakeBlockstore { + pub fn new(bs: BS) -> Self { + FakeBlockstore { + fake_blocks: RefCell::new(HashMap::new()), + base: bs, + } + } +} + +impl Blockstore for FakeBlockstore +where + BS: Blockstore, +{ + fn get(&self, k: &Cid) -> Result>> { + match self.fake_blocks.borrow().get(k) { + Some(blk) => Ok(Some(blk.clone())), + None => self.base.get(k), + } + } + + fn put_keyed(&self, k: &Cid, block: &[u8]) -> Result<()> { + if Code::try_from(k.hash().code()) + .ok() + .map(|code| &code.digest(block) == k.hash()) + .unwrap_or_default() + { + self.base.put_keyed(k, block) + } else { + self.fake_blocks.borrow_mut().insert(*k, block.to_owned()); + Ok(()) + } + } + + fn has(&self, k: &Cid) -> Result { + Ok(self.fake_blocks.borrow().contains_key(k) || self.base.has(k)?) + } + + fn put( + &self, + mh_code: cid::multihash::Code, + block: &fvm_shared::blockstore::Block, + ) -> Result + where + Self: Sized, + D: AsRef<[u8]>, + { + self.base.put(mh_code, block) + } + + fn put_many(&self, blocks: I) -> Result<()> + where + Self: Sized, + D: AsRef<[u8]>, + I: IntoIterator)>, + { + self.base.put_many(blocks) + } + + fn put_many_keyed(&self, blocks: I) -> Result<()> + where + Self: Sized, + D: AsRef<[u8]>, + I: IntoIterator, + { + for (c, b) in blocks { + self.put_keyed(&c, b.as_ref())? + } + Ok(()) + } +} + +impl FakeBlockstore { + /// Convert this "fake" blockstore into an overlay blockstore. The overlay blockstore will yield + /// the "fake" blocks from this blockstore, but won't accept new fake blocks. + pub fn finish(self) -> OverlayBlockstore { + OverlayBlockstore::new(self.fake_blocks.into_inner(), self.base) + } +} diff --git a/rust/src/fvm/blockstore/mod.rs b/rust/src/fvm/blockstore/mod.rs new file mode 100644 index 00000000..1a031e4d --- /dev/null +++ b/rust/src/fvm/blockstore/mod.rs @@ -0,0 +1,7 @@ +mod cgo; +mod fake; +mod overlay; + +pub use cgo::*; +pub use fake::*; +pub use overlay::*; diff --git a/rust/src/fvm/blockstore/overlay.rs b/rust/src/fvm/blockstore/overlay.rs new file mode 100644 index 00000000..1729da5c --- /dev/null +++ b/rust/src/fvm/blockstore/overlay.rs @@ -0,0 +1,76 @@ +use std::collections::HashMap; + +use anyhow::Result; +use cid::Cid; +use fvm_shared::blockstore::Blockstore; + +/// A blockstore with a read-only, in-memory "overlay". +/// +/// 1. On get, the overlay will be checked first. +/// 2. All puts will go directly to the base blockstore. +/// +/// Use this blockstore to "overlay" some pre-determined set of blocks over a real blockstore. +pub struct OverlayBlockstore { + over: HashMap>, + base: BS, +} + +impl OverlayBlockstore { + /// Construct a new overlay blockstore with the specified "overlay". + pub fn new(overlay: HashMap>, base: BS) -> Self { + OverlayBlockstore { + over: overlay, + base, + } + } +} + +impl Blockstore for OverlayBlockstore +where + BS: Blockstore, +{ + fn get(&self, k: &Cid) -> Result>> { + match self.over.get(k) { + Some(blk) => Ok(Some(blk.clone())), + None => self.base.get(k), + } + } + + fn put_keyed(&self, k: &Cid, block: &[u8]) -> Result<()> { + self.base.put_keyed(k, block) + } + + fn has(&self, k: &Cid) -> Result { + Ok(self.over.contains_key(k) || self.base.has(k)?) + } + + fn put( + &self, + mh_code: cid::multihash::Code, + block: &fvm_shared::blockstore::Block, + ) -> Result + where + Self: Sized, + D: AsRef<[u8]>, + { + self.base.put(mh_code, block) + } + + fn put_many(&self, blocks: I) -> Result<()> + where + Self: Sized, + D: AsRef<[u8]>, + I: IntoIterator)>, + { + self.base.put_many(blocks) + } + + fn put_many_keyed(&self, blocks: I) -> Result<()> + where + Self: Sized, + D: AsRef<[u8]>, + I: IntoIterator, + { + self.base.put_many_keyed(blocks) + } +} diff --git a/rust/src/fvm/cgo/error.rs b/rust/src/fvm/cgo/error.rs new file mode 100644 index 00000000..3f36eb84 --- /dev/null +++ b/rust/src/fvm/cgo/error.rs @@ -0,0 +1,16 @@ +//! Error codes used by the cgo bridge (blockstore/externs). These are used by both rust and go, so +//! don't remove them even if they seem dead. + +#![allow(dead_code)] + +/// The error code returned by cgo if the blockstore handle isn't valid. +pub const ERR_INVALID_HANDLE: i32 = -1; + +/// The error code returned by cgo when the block isn't found. +pub const ERR_NOT_FOUND: i32 = -2; + +/// The error code returned by cgo when there's some underlying system error. +pub const ERR_IO: i32 = -3; + +/// The error code returned by cgo when an argument is invalid. +pub const ERR_INVALID_ARGUMENT: i32 = -4; diff --git a/rust/src/fvm/cgo/externs.rs b/rust/src/fvm/cgo/externs.rs new file mode 100644 index 00000000..72b0984e --- /dev/null +++ b/rust/src/fvm/cgo/externs.rs @@ -0,0 +1,60 @@ +//! The externs/blockstore implemented by the go side of the cgo bridge. + +extern "C" { + pub fn cgo_blockstore_get( + store: u64, + k: *const u8, + k_len: i32, + block: *mut *mut u8, + size: *mut i32, + ) -> i32; + + pub fn cgo_blockstore_put( + store: u64, + k: *const u8, + k_len: i32, + block: *const u8, + block_len: i32, + ) -> i32; + + pub fn cgo_blockstore_put_many( + store: u64, + lengths: *const i32, + lengths_len: i32, + blocks: *const u8, + ) -> i32; + + pub fn cgo_blockstore_has(store: u64, k: *const u8, k_len: i32) -> i32; + + pub fn cgo_extern_get_chain_randomness( + handle: u64, + pers: i64, + round: i64, + entropy: *const u8, + entropy_len: i32, + randomness: *mut [u8; 32], + ) -> i32; + + pub fn cgo_extern_get_beacon_randomness( + handle: u64, + pers: i64, + round: i64, + entropy: *const u8, + entropy_len: i32, + randomness: *mut [u8; 32], + ) -> i32; + + pub fn cgo_extern_verify_consensus_fault( + handle: u64, + h1: *const u8, + h1_len: i32, + h2: *const u8, + h2_len: i32, + extra: *const u8, + extra_len: i32, + miner_id: *mut u64, + epoch: *mut i64, + fault: *mut i64, + gas_used: *mut i64, + ) -> i32; +} diff --git a/rust/src/fvm/cgo/mock.rs b/rust/src/fvm/cgo/mock.rs new file mode 100644 index 00000000..29250a81 --- /dev/null +++ b/rust/src/fvm/cgo/mock.rs @@ -0,0 +1,73 @@ +//! This module contains the "mock" version of the cgo externs. We need these so that cbindgen +//! doesn't try to put them in the C header. Otherwise, c-for-go can't parse the header. + +pub fn cgo_blockstore_get( + store: u64, + k: *const u8, + k_len: i32, + block: *mut *mut u8, + size: *mut i32, +) -> i32 { + unimplemented!() +} + +pub fn cgo_blockstore_put( + store: u64, + k: *const u8, + k_len: i32, + block: *const u8, + block_len: i32, +) -> i32 { + unimplemented!() +} + +pub fn cgo_blockstore_put_many( + store: u64, + lengths: *const i32, + lengths_len: i32, + blocks: *const u8, +) -> i32 { + unimplemented!() +} + +pub fn cgo_blockstore_has(store: u64, k: *const u8, k_len: i32) -> i32 { + unimplemented!() +} + +pub fn cgo_extern_get_chain_randomness( + handle: u64, + pers: i64, + round: i64, + entropy: *const u8, + entropy_len: i32, + randomness: *mut [u8; 32], +) -> i32 { + unimplemented!() +} + +pub fn cgo_extern_get_beacon_randomness( + handle: u64, + pers: i64, + round: i64, + entropy: *const u8, + entropy_len: i32, + randomness: *mut [u8; 32], +) -> i32 { + unimplemented!() +} + +pub fn cgo_extern_verify_consensus_fault( + handle: u64, + h1: *const u8, + h1_len: i32, + h2: *const u8, + h2_len: i32, + extra: *const u8, + extra_len: i32, + miner_id: *mut u64, + epoch: *mut i64, + fault: *mut i64, + gas_used: *mut i64, +) -> i32 { + unimplemented!() +} diff --git a/rust/src/fvm/cgo/mod.rs b/rust/src/fvm/cgo/mod.rs new file mode 100644 index 00000000..12330abe --- /dev/null +++ b/rust/src/fvm/cgo/mod.rs @@ -0,0 +1,13 @@ +/// cbindgen:ignore +#[cfg(not(feature = "bindgen"))] +mod externs; +#[cfg(not(feature = "bindgen"))] +pub use externs::*; + +#[cfg(feature = "bindgen")] +mod mock; +#[cfg(feature = "bindgen")] +pub use mock::*; + +mod error; +pub use error::*; diff --git a/rust/src/fvm/externs.rs b/rust/src/fvm/externs.rs new file mode 100644 index 00000000..865b674d --- /dev/null +++ b/rust/src/fvm/externs.rs @@ -0,0 +1,131 @@ +use anyhow::{anyhow, Context}; +use fvm::externs::{Consensus, Externs, Rand}; +use fvm_shared::address::Address; +use fvm_shared::clock::ChainEpoch; +use fvm_shared::consensus::ConsensusFault; +use fvm_shared::crypto::randomness::DomainSeparationTag; +use num_traits::FromPrimitive; + +use super::cgo::*; + +/// An implementation of [`fvm::externs::Externs`] that can call out to go. See the `cgo` directory +/// in this repo for the go side. +/// +/// Importantly, this allows Filecoin client written in go to expose chain randomness and consensus +/// fault verification to the FVM. +pub struct CgoExterns { + handle: u64, +} + +impl CgoExterns { + /// Construct a new externs from a handle. + pub fn new(handle: u64) -> CgoExterns { + CgoExterns { handle } + } +} + +impl Rand for CgoExterns { + fn get_chain_randomness( + &self, + pers: DomainSeparationTag, + round: ChainEpoch, + entropy: &[u8], + ) -> anyhow::Result<[u8; 32]> { + unsafe { + let mut buf = [0u8; 32]; + match cgo_extern_get_chain_randomness( + self.handle, + pers as i64, + round, + entropy.as_ptr(), + entropy.len() as i32, + &mut buf, + ) { + 0 => Ok(buf), + r @ 1.. => panic!("invalid return value from has: {}", r), + ERR_INVALID_HANDLE => panic!("extern {} not registered", self.handle), + e => Err(anyhow!( + "cgo extern 'get_chain_randomness' failed with error code {}", + e + )), + } + } + } + + fn get_beacon_randomness( + &self, + pers: DomainSeparationTag, + round: ChainEpoch, + entropy: &[u8], + ) -> anyhow::Result<[u8; 32]> { + unsafe { + let mut buf = [0u8; 32]; + match cgo_extern_get_beacon_randomness( + self.handle, + pers as i64, + round, + entropy.as_ptr(), + entropy.len() as i32, + &mut buf, + ) { + 0 => Ok(buf), + r @ 1.. => panic!("invalid return value from has: {}", r), + ERR_INVALID_HANDLE => panic!("extern {} not registered", self.handle), + e => Err(anyhow!( + "cgo extern 'get_beacon_randomness' failed with error code {}", + e + )), + } + } + } +} + +impl Consensus for CgoExterns { + fn verify_consensus_fault( + &self, + h1: &[u8], + h2: &[u8], + extra: &[u8], + ) -> anyhow::Result<(Option, i64)> { + unsafe { + let mut miner_id: u64 = 0; + let mut epoch: i64 = 0; + let mut fault_type: i64 = 0; + let mut gas_used: i64 = 0; + match cgo_extern_verify_consensus_fault( + self.handle, + h1.as_ptr(), + h1.len() as i32, + h2.as_ptr(), + h2.len() as i32, + extra.as_ptr(), + extra.len() as i32, + &mut miner_id, + &mut epoch, + &mut fault_type, + &mut gas_used, + ) { + 0 => Ok(( + match fault_type { + 0 => None, + _ => Some(ConsensusFault { + target: Address::new_id(miner_id), + epoch, + fault_type: FromPrimitive::from_i64(fault_type) + .context("invalid fault type")?, + }), + }, + gas_used, + )), + r @ 1.. => panic!("invalid return value from has: {}", r), + ERR_INVALID_HANDLE => panic!("extern {} not registered", self.handle), + e => Err(anyhow!( + "cgo extern 'verify_consensus_fault' failed with error code {}", + e + )), + } + } + } +} + +impl Externs for CgoExterns {} diff --git a/rust/src/fvm/machine.rs b/rust/src/fvm/machine.rs new file mode 100644 index 00000000..8ed8202c --- /dev/null +++ b/rust/src/fvm/machine.rs @@ -0,0 +1,276 @@ +use std::convert::{TryFrom, TryInto}; +use std::sync::Mutex; + +use cid::Cid; +use ffi_toolkit::{catch_panic_response, raw_ptr, rust_str_to_c_str, FCPResponseStatus}; +use futures::executor::block_on; +use fvm::call_manager::DefaultCallManager; +use fvm::executor::{ApplyKind, DefaultExecutor, Executor}; +use fvm::machine::DefaultMachine; +use fvm::{Config, DefaultKernel}; +use fvm_ipld_car::load_car; +use fvm_shared::blockstore::Blockstore; +use fvm_shared::{clock::ChainEpoch, econ::TokenAmount, message::Message, version::NetworkVersion}; +use lazy_static::lazy_static; +use log::info; + +use super::blockstore::{CgoBlockstore, FakeBlockstore, OverlayBlockstore}; +use super::externs::CgoExterns; +use super::types::*; +use crate::util::api::init_log; + +pub type CgoExecutor = DefaultExecutor< + DefaultKernel, CgoExterns>>>, +>; + +lazy_static! { + static ref ENGINE: fvm::machine::Engine = fvm::machine::Engine::default(); +} + +/// Note: the incoming args as u64 and odd conversions to i32/i64 +/// for some types is due to the generated bindings not liking the +/// 32bit types as incoming args +/// +#[no_mangle] +#[cfg(not(target_os = "windows"))] +pub unsafe extern "C" fn fil_create_fvm_machine( + fvm_version: fil_FvmRegisteredVersion, + chain_epoch: u64, + base_fee_hi: u64, + base_fee_lo: u64, + base_circ_supply_hi: u64, + base_circ_supply_lo: u64, + network_version: u64, + state_root_ptr: *const u8, + state_root_len: libc::size_t, + blockstore_id: u64, + externs_id: u64, +) -> *mut fil_CreateFvmMachineResponse { + catch_panic_response(|| { + init_log(); + + info!("fil_create_fvm_machine: start"); + + let mut response = fil_CreateFvmMachineResponse::default(); + match fvm_version { + fil_FvmRegisteredVersion::V1 => info!("using FVM V1"), + //_ => panic!("unsupported FVM Registered Version") + } + + let config = Config::default(); + let chain_epoch = chain_epoch as ChainEpoch; + + let base_circ_supply = TokenAmount::from( + ((base_circ_supply_hi as u128) << u64::BITS) | base_circ_supply_lo as u128, + ); + let base_fee = + TokenAmount::from(((base_fee_hi as u128) << u64::BITS) | base_fee_lo as u128); + + let network_version = match NetworkVersion::try_from(network_version as u32) { + Ok(x) => x, + Err(_) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = + rust_str_to_c_str(format!("unsupported network version: {}", network_version)); + return raw_ptr(response); + } + }; + let state_root_bytes: Vec = + std::slice::from_raw_parts(state_root_ptr, state_root_len).to_vec(); + let state_root = match Cid::try_from(state_root_bytes) { + Ok(x) => x, + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("invalid state root: {}", err)); + return raw_ptr(response); + } + }; + + let blockstore = FakeBlockstore::new(CgoBlockstore::new(blockstore_id)); + + let builtin_actors = match import_actors(&blockstore, network_version) { + Ok(x) => x, + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = + rust_str_to_c_str(format!("couldn't load builtin actors: {}", err)); + return raw_ptr(response); + } + }; + + let blockstore = blockstore.finish(); + + let externs = CgoExterns::new(externs_id); + let machine = fvm::machine::DefaultMachine::new( + config, + ENGINE.clone(), + chain_epoch, + base_fee, + base_circ_supply, + network_version, + state_root, + Some(builtin_actors), + blockstore, + externs, + ); + match machine { + Ok(machine) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.executor = Box::into_raw(Box::new(Mutex::new(CgoExecutor::new(machine)))) + as *mut libc::c_void; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = + rust_str_to_c_str(format!("failed to create machine: {}", err)); + return raw_ptr(response); + } + } + + info!("fil_create_fvm_machine: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_drop_fvm_machine(executor: *mut libc::c_void) { + let _ = Box::from_raw(executor as *mut Mutex); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_fvm_machine_execute_message( + executor: *mut libc::c_void, + message_ptr: *const u8, + message_len: libc::size_t, + chain_len: u64, + apply_kind: u64, /* 0: Explicit, _: Implicit */ +) -> *mut fil_FvmMachineExecuteResponse { + catch_panic_response(|| { + init_log(); + + info!("fil_fvm_machine_execute_message: start"); + + let mut response = fil_FvmMachineExecuteResponse::default(); + + let apply_kind = if apply_kind == 0 { + ApplyKind::Explicit + } else { + ApplyKind::Implicit + }; + + let message_bytes = std::slice::from_raw_parts(message_ptr, message_len); + let message: Message = match fvm_shared::encoding::from_slice(message_bytes) { + Ok(x) => x, + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + return raw_ptr(response); + } + }; + + let mut executor = unsafe { &*(executor as *mut Mutex) } + .lock() + .unwrap(); + let apply_ret = match executor.execute_message(message, apply_kind, chain_len as usize) { + Ok(x) => x, + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + return raw_ptr(response); + } + }; + + // TODO: use the non-bigint token amount everywhere in the FVM + let penalty: u128 = apply_ret.penalty.try_into().unwrap(); + let miner_tip: u128 = apply_ret.miner_tip.try_into().unwrap(); + + // Only do this if the return data is non-empty. The empty vec pointer is non-null and not + // valid in go. + if !apply_ret.msg_receipt.return_data.is_empty() { + let return_bytes = Vec::from(apply_ret.msg_receipt.return_data).into_boxed_slice(); + response.return_ptr = return_bytes.as_ptr(); + response.return_len = return_bytes.len(); + Box::leak(return_bytes); + } + + // TODO: Do something with the backtrace. + response.status_code = FCPResponseStatus::FCPNoError; + response.exit_code = apply_ret.msg_receipt.exit_code as u64; + response.gas_used = apply_ret.msg_receipt.gas_used as u64; + response.penalty_hi = (penalty >> u64::BITS) as u64; + response.penalty_lo = penalty as u64; + response.miner_tip_hi = (miner_tip >> u64::BITS) as u64; + response.miner_tip_lo = miner_tip as u64; + + info!("fil_fvm_machine_execute_message: end"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_fvm_machine_flush( + executor: *mut libc::c_void, +) -> *mut fil_FvmMachineFlushResponse { + catch_panic_response(|| { + init_log(); + + info!("fil_fvm_machine_flush: start"); + + let mut executor = unsafe { &*(executor as *mut Mutex) } + .lock() + .unwrap(); + let mut response = fil_FvmMachineFlushResponse::default(); + match executor.flush() { + Ok(cid) => { + let bytes = cid.to_bytes().into_boxed_slice(); + response.state_root_ptr = bytes.as_ptr(); + response.state_root_len = bytes.len(); + Box::leak(bytes); + } + Err(e) => { + response.status_code = FCPResponseStatus::FCPReceiverError; + response.error_msg = rust_str_to_c_str(e.to_string()); + } + } + info!("fil_fvm_machine_flush: end"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_create_fvm_machine_response( + ptr: *mut fil_CreateFvmMachineResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_fvm_machine_execute_response( + ptr: *mut fil_FvmMachineExecuteResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_fvm_machine_flush_response( + ptr: *mut fil_FvmMachineFlushResponse, +) { + let _ = Box::from_raw(ptr); +} + +fn import_actors( + blockstore: &impl Blockstore, + network_version: NetworkVersion, +) -> Result { + let car = match network_version { + NetworkVersion::V14 => Ok(actors_v6::BUNDLE_CAR), + NetworkVersion::V15 => Ok(actors_v7::BUNDLE_CAR), + _ => Err("unsupported network version"), + }?; + let roots = block_on(async { load_car(blockstore, car).await.unwrap() }); + assert_eq!(roots.len(), 1); + Ok(roots[0]) +} diff --git a/rust/src/fvm/mod.rs b/rust/src/fvm/mod.rs new file mode 100644 index 00000000..d511f996 --- /dev/null +++ b/rust/src/fvm/mod.rs @@ -0,0 +1,8 @@ +/// cbindgen:ignore +mod blockstore; +mod cgo; +/// cbindgen:ignore +mod externs; + +pub mod machine; +pub mod types; diff --git a/rust/src/fvm/types.rs b/rust/src/fvm/types.rs new file mode 100644 index 00000000..7f0d8a77 --- /dev/null +++ b/rust/src/fvm/types.rs @@ -0,0 +1,96 @@ +use std::ptr; + +use drop_struct_macro_derive::DropStructMacro; +use ffi_toolkit::{code_and_message_impl, free_c_str, CodeAndMessage, FCPResponseStatus}; + +use fvm_shared::error::ExitCode; + +#[repr(C)] +#[derive(Debug, Clone, Copy, PartialEq)] +pub enum fil_FvmRegisteredVersion { + V1, +} + +#[repr(C)] +pub struct fil_CreateFvmMachineResponse { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub executor: *mut libc::c_void, +} + +impl Drop for fil_CreateFvmMachineResponse { + fn drop(&mut self) { + // We implement this manually because we don't want to drop the executor here. + unsafe { + free_c_str(self.error_msg as *mut libc::c_char); + } + } +} + +impl Default for fil_CreateFvmMachineResponse { + fn default() -> fil_CreateFvmMachineResponse { + fil_CreateFvmMachineResponse { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + executor: ptr::null_mut(), + } + } +} + +code_and_message_impl!(fil_CreateFvmMachineResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_FvmMachineExecuteResponse { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub exit_code: u64, + pub return_ptr: *const u8, + pub return_len: libc::size_t, + pub gas_used: u64, + pub penalty_hi: u64, + pub penalty_lo: u64, + pub miner_tip_hi: u64, + pub miner_tip_lo: u64, +} + +impl Default for fil_FvmMachineExecuteResponse { + fn default() -> fil_FvmMachineExecuteResponse { + fil_FvmMachineExecuteResponse { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + exit_code: ExitCode::Ok as u64, + return_ptr: ptr::null(), + return_len: 0, + gas_used: 0, + penalty_hi: 0, + penalty_lo: 0, + miner_tip_hi: 0, + miner_tip_lo: 0, + } + } +} + +code_and_message_impl!(fil_FvmMachineExecuteResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_FvmMachineFlushResponse { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub state_root_ptr: *const u8, + pub state_root_len: libc::size_t, +} + +impl Default for fil_FvmMachineFlushResponse { + fn default() -> fil_FvmMachineFlushResponse { + fil_FvmMachineFlushResponse { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + state_root_ptr: ptr::null(), + state_root_len: 0, + } + } +} + +code_and_message_impl!(fil_FvmMachineFlushResponse); diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 31f41d4b..b4e189ce 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -3,5 +3,6 @@ #![allow(clippy::upper_case_acronyms)] pub mod bls; +pub mod fvm; pub mod proofs; pub mod util; diff --git a/rust/src/proofs/api.rs b/rust/src/proofs/api.rs index 1e4383bd..7771fdaa 100644 --- a/rust/src/proofs/api.rs +++ b/rust/src/proofs/api.rs @@ -823,11 +823,8 @@ pub unsafe extern "C" fn fil_generate_single_vanilla_proof( info!("generate_single_vanilla_proof: start"); - let challenges: Vec = std::slice::from_raw_parts(challenges_ptr, challenges_len) - .to_vec() - .iter() - .copied() - .collect(); + let challenges: Vec = + std::slice::from_raw_parts(challenges_ptr, challenges_len).to_vec(); let sector_id = SectorId::from(replica.sector_id); let cache_dir_path = c_str_to_pbuf(replica.cache_dir_path); diff --git a/rust/src/proofs/types.rs b/rust/src/proofs/types.rs index 839e36b0..6324c4e9 100644 --- a/rust/src/proofs/types.rs +++ b/rust/src/proofs/types.rs @@ -862,7 +862,7 @@ impl Clone for fil_SealCommitPhase2Response { code_and_message_impl!(fil_SealCommitPhase2Response); #[repr(C)] -#[derive(Clone, DropStructMacro)] +#[derive(Clone, Default, DropStructMacro)] pub struct fil_AggregationInputs { pub comm_r: fil_32ByteArray, pub comm_d: fil_32ByteArray, @@ -871,18 +871,6 @@ pub struct fil_AggregationInputs { pub seed: fil_32ByteArray, } -impl Default for fil_AggregationInputs { - fn default() -> fil_AggregationInputs { - fil_AggregationInputs { - comm_r: fil_32ByteArray::default(), - comm_d: fil_32ByteArray::default(), - sector_id: 0, - ticket: fil_32ByteArray::default(), - seed: fil_32ByteArray::default(), - } - } -} - #[repr(C)] #[derive(DropStructMacro)] pub struct fil_UnsealRangeResponse {