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

Bump lcp to v0.2.10 #8

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions e2e/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cargo-machete v0.7.0 detects unused dependencies in lcp.
# Thus ignore linting for submodules until resolved the issue.
# ---
# Analyzing dependencies of crates in this directory...
# cargo-machete found the following unused dependencies in this directory:
# light-client -- ./e2e/lcp/modules/light-client/Cargo.toml:
# serde
lcp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this. In cases where the ibc feature is not enabled, serde may not be necessary.

18 changes: 4 additions & 14 deletions e2e/Enclave.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
######## Import SGX SDK ########
include ImportRustSGXSDK.mk

######## SGX SDK Settings ########
SGX_SDK ?= /opt/sgxsdk
SGX_MODE ?= HW
Expand All @@ -9,7 +6,7 @@ SGX_DEBUG ?= 0
SGX_PRERELEASE ?= 0
SGX_PRODUCTION ?= 0

include rust-sgx-sdk/buildenv.mk
include buildenv.mk

ifeq ($(shell getconf LONG_BIT), 32)
SGX_ARCH := x86
Expand Down Expand Up @@ -52,27 +49,20 @@ endif

SGX_COMMON_CFLAGS += -fstack-protector

CARGO_FEATURES = --features=default
ifeq ($(SGX_PRODUCTION), 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junichi-tanaka Can you also remove CARGO_FEATURES reference in enclave target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bluele removed in 70106c3

SGX_ENCLAVE_MODE = "Production Mode"
SGX_ENCLAVE_CONFIG = $(SGX_ENCLAVE_CONFIG)
SGX_SIGN_KEY = $(SGX_COMMERCIAL_KEY)
CARGO_FEATURES = --features=production
else
SGX_ENCLAVE_MODE = "Development Mode"
SGX_ENCLAVE_CONFIG = "enclave/Enclave.config.xml"
SGX_SIGN_KEY = "enclave/Enclave_private.pem"
ifneq ($(SGX_MODE), HW)
CARGO_FEATURES = --features=default,sgx-sw
endif
endif

######## CUSTOM Settings ########

CUSTOM_LIBRARY_PATH := ./lib
CUSTOM_BIN_PATH := ./bin
CUSTOM_EDL_PATH := ./rust-sgx-sdk/edl
CUSTOM_COMMON_PATH := ./rust-sgx-sdk/common

######## EDL Settings ########

Expand All @@ -93,7 +83,7 @@ ProtectedFs_Library_Name := sgx_tprotected_fs

RustEnclave_C_Files := $(wildcard ./enclave/*.c)
RustEnclave_C_Objects := $(RustEnclave_C_Files:.c=.o)
RustEnclave_Include_Paths := -I$(CUSTOM_COMMON_PATH)/inc -I$(CUSTOM_EDL_PATH) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include
RustEnclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include

RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lenclave
RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) $(ENCLAVE_CFLAGS) $(RustEnclave_Include_Paths)
Expand All @@ -110,7 +100,7 @@ Signed_RustEnclave_Name := bin/enclave.signed.so
######## EDL Objects ########

$(Enclave_EDL_Files): $(SGX_EDGER8R) enclave/Enclave.edl
$(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --trusted-dir enclave
$(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --trusted-dir enclave
@echo "GEN => $(Enclave_EDL_Files)"

######## Enclave Objects ########
Expand All @@ -130,6 +120,6 @@ $(Signed_RustEnclave_Name): $(RustEnclave_Name)

.PHONY: enclave
enclave:
@cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES)
@cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET)
@mkdir -p ./lib
@cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a
23 changes: 0 additions & 23 deletions e2e/ImportRustSGXSDK.mk

This file was deleted.

4 changes: 0 additions & 4 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ all: $(Signed_RustEnclave_Name)
fmt:
@cargo fmt --all && cd ./enclave && cargo fmt --all

.PHONY: docker
docker:
@cd rust-sgx-sdk/dockerfile && docker build --no-cache -t datachainlab/sgx-rust:2004-1.1.5 -f Dockerfile.2004.nightly .

.PHONY: yrly
yrly:
cd ./relayer && go build -o ../bin/yrly -tags customcert .
Expand Down
File renamed without changes.
Loading
Loading