Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make batch sealing retry correct #367

Merged
merged 15 commits into from
Jan 24, 2025
Prev Previous commit
Next Next commit
supra library version check
magik6k committed Jan 14, 2025
commit e4b9bfd8acdf7673797349acc5e70583bae8dfa1
5 changes: 5 additions & 0 deletions extern/supraseal/sealing/supra_seal.cpp
Original file line number Diff line number Diff line change
@@ -129,6 +129,11 @@ static void init_ctx(size_t sector_size) {
}
}

extern "C"
int supra_version() {
return 0x100001;
}

extern "C"
void supra_seal_init(size_t sector_size, const char* config_file) {
printf("INIT called %s\n", config_file);
1 change: 1 addition & 0 deletions extern/supraseal/sealing/supra_seal.h
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
extern "C" {
#endif

int supra_version();

// Optional init function.
// config_file - topology config file. Defaults to supra_config.cfg
3 changes: 2 additions & 1 deletion lib/proof/porep_vproof_bin_decode.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,9 @@ package proof
import (
"encoding/binary"
"fmt"
"golang.org/x/xerrors"
"io"

"golang.org/x/xerrors"
)

// This file contains a bincode decoder for Commit1OutRaw.
10 changes: 10 additions & 0 deletions lib/supraffi/seal.go
Original file line number Diff line number Diff line change
@@ -166,6 +166,16 @@ ${SRCDIR}/../../extern/supraseal/deps/spdk-v24.05/dpdk/build/lib/librte_vhost.a

*/

const libsupra_version = 0x10_00_01

func init() {
libVer := int(C.supra_version())

if libVer != libsupra_version {
panic(fmt.Sprintf("libsupra version mismatch: %x != %x", libVer, libsupra_version))
}
}

// SupraSealInit initializes the supra seal with a sector size and optional config file.
func SupraSealInit(sectorSize uint64, configFile string) {
cConfigFile := C.CString(configFile)