Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

Commit 321836b

Browse files
bors[bot]tomtau
andauthored
Merge #678
678: Problem: outdated Intel SGX SDK (CRO-626) r=tomtau a=tomtau Solution: as the Rust SGX SDK isn't yet officially released (and may take some time), the code was ported to use the 1.1.0-beta that is based on the latest Intel SGX SDK. (crate dependencies were temporarily put into a sgx-vendor repository with the updated Rust SGX SDK deps.) TODO: port to the 1.1.0 release when it happens (note some changes may be needed for secrets handling) Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
2 parents c9dcc7b + ba3fd5c commit 321836b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+894
-970
lines changed

.drone.yml

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -123,39 +123,42 @@ trigger:
123123
- push
124124

125125

126-
---
127-
kind: pipeline
128-
type: exec
129-
name: integration-tests-jail-unjail
130-
131-
platform:
132-
os: linux
133-
arch: amd64
134-
135-
steps:
136-
- name: integration-tests
137-
commands:
138-
- cd integration-tests/jail
139-
- ./run.sh
140-
- name: teardown
141-
commands:
142-
- cd integration-tests/jail
143-
- ./shutdown.sh
144-
when:
145-
status:
146-
- success
147-
- failure
148-
149-
trigger:
150-
branch:
151-
- master
152-
- staging
153-
- trying
154-
event:
155-
- push
126+
# FIMXE: 1) no need for this to be exec pipeline (can run in docker -- unjailtx doesn't ever touch enclave)
127+
# FIXME: 2) proper cleanup -- this thing took over 100gb of 1 day of running
128+
# FIXME: 3) it runs `cargo build` inside docker compose service and happily continue even if the compilation fails, wtf
129+
# ---
130+
# kind: pipeline
131+
# type: exec
132+
# name: integration-tests-jail-unjail
133+
134+
# platform:
135+
# os: linux
136+
# arch: amd64
137+
138+
# steps:
139+
# - name: integration-tests
140+
# commands:
141+
# - cd integration-tests/jail
142+
# - ./run.sh
143+
# - name: teardown
144+
# commands:
145+
# - cd integration-tests/jail
146+
# - ./shutdown.sh
147+
# when:
148+
# status:
149+
# - success
150+
# - failure
151+
152+
# trigger:
153+
# branch:
154+
# - master
155+
# - staging
156+
# - trying
157+
# event:
158+
# - push
156159

157160
---
158161
kind: signature
159-
hmac: b0227856638a61f1a221c4bae23276462a9200632ebeb3ad60aae3c27f61af02
162+
hmac: e0c075115c89bf62208031eb72f28eda5f9b045d201e7e4449a486455aad5f96
160163

161164
...

Cargo.lock

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

chain-abci/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ hex = "0.4"
3232
protobuf = "2.7.0"
3333
integer-encoding = "1.0.7"
3434
structopt = "0.3"
35-
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] }
35+
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] }
3636
blake2 = "0.8"
3737
parity-scale-codec = { features = ["derive"], version = "1.1" }
3838
zmq = "0.9"

chain-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ digest = { version = "0.8", default-features = false}
1616
tiny-keccak = { version = "2.0", features = ["keccak"] }
1717
sha2 = { version = "0.8", default-features = false }
1818
hex = { version = "0.4", optional = true }
19-
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] }
19+
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] }
2020
serde = { version = "1.0", features = ["derive"], optional = true }
2121
blake2 = { version = "0.8", default-features = false }
2222
parity-scale-codec = { features = ["derive"], default-features = false, version = "1.1" }
2323
base64 = { version = "0.11", optional = true }
24-
sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true }
24+
sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true }
2525
static_assertions = { version = "1.1.0", default-features = false}
2626
bech32 = { version = "0.7.1", optional = true }
2727
aead = "0.2"

chain-tx-enclave/enclave-t-common/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ readme = "../../README.md"
77
edition = "2018"
88

99
[dependencies]
10-
sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" }
10+
sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" }
1111
chain-core = { path = "../../chain-core", default-features = false, features = ["mesalock_sgx"] }
12-
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism", "sgx"] }
12+
secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism", "sgx"] }
1313
zeroize = { version = "1.0", default-features = false }
14-
sgx_tseal = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" }
14+
sgx_tseal = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" }
1515
parity-scale-codec = { default-features = false, version = "1.0" }
16-
sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" }
16+
sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" }

chain-tx-enclave/enclave-u-common/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ edition = "2018"
1010
hex = "0.3"
1111
log = "0.4.0"
1212
env_logger = "0.7.0"
13-
sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" }
14-
sgx_urts = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" }
13+
sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" }
14+
sgx_urts = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" }

chain-tx-enclave/rust-sgx-sdk/buildenv.mk

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
18
#
2-
# Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved.
9+
# http://www.apache.org/licenses/LICENSE-2.0
310
#
4-
# Redistribution and use in source and binary forms, with or without
5-
# modification, are permitted provided that the following conditions
6-
# are met:
7-
#
8-
# * Redistributions of source code must retain the above copyright
9-
# notice, this list of conditions and the following disclaimer.
10-
# * Redistributions in binary form must reproduce the above copyright
11-
# notice, this list of conditions and the following disclaimer in
12-
# the documentation and/or other materials provided with the
13-
# distribution.
14-
# * Neither the name of Baidu, Inc., nor the names of its
15-
# contributors may be used to endorse or promote products derived
16-
# from this software without specific prior written permission.
17-
#
18-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20-
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21-
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22-
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23-
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24-
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26-
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License..
2917
#
3018
#
3119

@@ -127,3 +115,4 @@ ENCLAVE_LDFLAGS = -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \
127115
-Wl,-pie,-eenclave_entry -Wl,--export-dynamic \
128116
-Wl,--gc-sections \
129117
-Wl,--defsym,__ImageBase=0
118+

chain-tx-enclave/rust-sgx-sdk/common/inc/assert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */
2-
/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */
1+
/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */
2+
/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */
33

44
/*-
55
* Copyright (c) 1992, 1993

chain-tx-enclave/rust-sgx-sdk/common/inc/complex.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */
1+
/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */
22
/*
33
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
44
*
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#ifndef _COMPLEX_H_
19-
#define _COMPLEX_H_
19+
#define _COMPLEX_H_
2020

2121
#include <sys/cdefs.h>
2222

@@ -25,18 +25,18 @@
2525
*/
2626
#ifdef __GNUC__
2727
#if __STDC_VERSION__ < 199901
28-
#define _Complex __complex__
28+
#define _Complex __complex__
2929
#endif
30-
#define _Complex_I 1.0fi
30+
#define _Complex_I 1.0fi
3131
#elif defined(lint)
32-
#define _Complex_I 1.0fi
32+
#define _Complex_I 1.0fi
3333
#endif
3434

35-
#define complex _Complex
35+
#define complex _Complex
3636

3737
/* XXX switch to _Imaginary_I */
3838
#undef I
39-
#define I _Complex_I
39+
#define I _Complex_I
4040

4141
__BEGIN_DECLS
4242
/*

chain-tx-enclave/rust-sgx-sdk/common/inc/ctype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3535
* SUCH DAMAGE.
3636
*
37-
* @(#)ctype.h 5.3 (Berkeley) 4/3/91
37+
* @(#)ctype.h 5.3 (Berkeley) 4/3/91
3838
*/
3939

4040
#ifndef _CTYPE_H_

0 commit comments

Comments
 (0)