Skip to content

Commit a600691

Browse files
authored
Merge pull request #141 from datachainlab/develop
develop -> main Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
2 parents f37415b + 59f9ae7 commit a600691

File tree

32 files changed

+1243
-341
lines changed

32 files changed

+1243
-341
lines changed

Cargo.lock

Lines changed: 1144 additions & 281 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
######## LCP Build Settings ########
2-
ZK_PROVER_CUDA ?= 0
2+
ZK_PROVER_CUDA ?= 0
33
APP_CARGO_FLAGS ?=
44

55
######## SGX SDK Settings ########
6-
SGX_SDK ?= /opt/sgxsdk
7-
SGX_MODE ?= HW
8-
SGX_DEBUG ?= 0
6+
SGX_SDK ?= /opt/sgxsdk
7+
SGX_MODE ?= HW
8+
SGX_DEBUG ?= 0
99
SGX_ENCLAVE_CONFIG ?= "enclave/Enclave.config.xml"
10-
SGX_SIGN_KEY ?= "enclave/Enclave_private.pem"
10+
SGX_SIGN_KEY ?= "enclave/Enclave_private.pem"
1111

12-
SGX_COMMON_CFLAGS := -m64
13-
SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
12+
SGX_COMMON_CFLAGS := -m64
13+
SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
1414
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign
15-
SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r
15+
SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r
1616

1717
include buildenv.mk
1818

1919
ifeq ($(SGX_DEBUG), 1)
20-
# we build with cargo --release, even in SGX DEBUG mode
2120
SGX_COMMON_CFLAGS += -O0 -g -ggdb
22-
# cargo sets this automatically, cannot use 'debug'
23-
OUTPUT_PATH := release
24-
CARGO_TARGET := --release
21+
# debug build
22+
CARGO_TARGET :=
23+
OUTPUT_PATH := debug
2524
else
2625
SGX_COMMON_CFLAGS += -O2
27-
OUTPUT_PATH := release
28-
CARGO_TARGET := --release
26+
CARGO_TARGET := --release
27+
OUTPUT_PATH := release
2928
endif
3029

3130
SGX_COMMON_CFLAGS += -fstack-protector

app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ crypto = { path = "../modules/crypto" }
2727
keymanager = { path = "../modules/keymanager" }
2828
remote-attestation = { path = "../modules/remote-attestation" }
2929
attestation-report = { path = "../modules/attestation-report", features = ["dcap-quote-parser"] }
30-
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }
30+
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.4" }
3131

3232
[build-dependencies]
3333
git2 = { version = "0.20", default-features = false }

app/src/commands/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl ServiceCmd {
6161
let srv = AppService::new(opts.get_home(), enclave);
6262

6363
info!("start service: addr={addr} mrenclave={mrenclave}");
64-
run_service(srv, rt, addr)
64+
rt.block_on(async { run_service(srv, addr).await })
6565
}
6666
}
6767
}

enclave-modules/ecall-handler/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::result_large_err)]
12
#![no_std]
23
extern crate alloc;
34

enclave-modules/runtime/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
4646

4747
#[cfg(not(test))]
4848
#[lang = "eh_personality"]
49-
#[no_mangle]
5049
unsafe extern "C" fn rust_eh_personality() {}
5150

5251
static HOOK: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut());

enclave/Enclave.lds

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ enclave.so
44
g_global_data_sim;
55
g_global_data;
66
enclave_entry;
7+
g_peak_heap_used;
8+
g_peak_rsrv_mem_committed;
79
local:
810
*;
911
};

modules/attestation-report/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pem = { version = "2.0", default-features = false }
1818
webpki = { version = "0.22", features = ["alloc"] }
1919
anyhow = { version = "1", default-features = false }
2020

21-
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3", optional = true }
21+
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.4", optional = true }
2222

2323
[dev-dependencies]
2424
tokio = { version = "1.0", default-features = false, features = ["macros"] }

modules/attestation-report/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::result_large_err)]
12
#![cfg_attr(not(feature = "std"), no_std)]
23
extern crate alloc;
34

modules/commitments/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::result_large_err)]
12
#![cfg_attr(not(test), no_std)]
23
extern crate alloc;
34

0 commit comments

Comments
 (0)