Skip to content

Commit

Permalink
Merge branch 'main' into merklecpp_use_faster_hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jumaffre authored Sep 8, 2023
2 parents cc98ab9 + 98206da commit 2a40dd1
Show file tree
Hide file tree
Showing 26 changed files with 261 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
variables:
Codeql.SkipTaskAutoInjection: true
skipComponentGovernanceDetection: true
container: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
container: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15
pool:
vmImage: ubuntu-20.04

Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines-templates/deploy_aci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- script: |
set -ex
docker login -u $ACR_TOKEN_NAME -p $ACR_CI_PUSH_TOKEN_PASSWORD $ACR_REGISTRY
docker pull $ACR_REGISTRY/ccf/ci:16-08-2023-1-snp-clang15
docker pull $ACR_REGISTRY/ccf/ci:05-09-2023-snp-clang15
docker build -f docker/ccf_ci_built . --build-arg="base=$BASE_IMAGE" --build-arg="platform=snp" -t $ACR_REGISTRY/ccf/ci:pr-`git rev-parse HEAD`
docker push $ACR_REGISTRY/ccf/ci:pr-`git rev-parse HEAD`
name: build_ci_image
Expand All @@ -59,7 +59,7 @@ jobs:
ACR_TOKEN_NAME: ci-push-token
ACR_CI_PUSH_TOKEN_PASSWORD: $(ACR_CI_PUSH_TOKEN_PASSWORD)
ACR_REGISTRY: ccfmsrc.azurecr.io
BASE_IMAGE: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-snp-clang15
BASE_IMAGE: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-snp-clang15
- script: |
set -ex
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ schedules:
resources:
containers:
- container: virtual
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro

- container: snp
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-snp-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-snp-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro

- container: sgx
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-sgx
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-sgx
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision -v /dev/sgx:/dev/sgx -v /lib/modules:/lib/modules:ro

variables:
Expand Down
2 changes: 1 addition & 1 deletion .azure_pipelines_snp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ schedules:
resources:
containers:
- container: virtual
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ schedules:
resources:
containers:
- container: virtual
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE

- container: snp
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-snp-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-snp-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro

- container: sgx
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-sgx
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-sgx
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision -v /dev/sgx:/dev/sgx

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .daily_canary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-^- ___ ___
(- -) (= =) | Y & +--?
(- -) (= =) | Y & +--???
( V ) / . \ O +---=---'
/--x-m- /--n-n---xXx--/--yY--------
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CCF Development Environment",
"image": "ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15",
"image": "ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15",
"runArgs": [],
"extensions": [
"eamodio.gitlens",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
checks:
runs-on: ubuntu-latest
container: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
container: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15

steps:
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
2 changes: 1 addition & 1 deletion .multi-thread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pr:
resources:
containers:
- container: virtual
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-virtual-clang15
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schedules:
resources:
containers:
- container: sgx
image: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-sgx
image: ccfmsrc.azurecr.io/ccf/ci:05-09-2023-sgx
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision -v /dev/sgx:/dev/sgx

jobs:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [5.0.0-dev3]

[5.0.0-dev3]: https://github.com/microsoft/CCF/releases/tag/ccf-5.0.0-dev3

- Updated Intel SGX PSW from 2.17 to 2.20 (#5616)

## [5.0.0-dev2]

[5.0.0-dev2]: https://github.com/microsoft/CCF/releases/tag/ccf-5.0.0-dev2
Expand Down
18 changes: 16 additions & 2 deletions doc/schemas/node_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@
"info": {
"description": "This API provides public, uncredentialed access to service and node state.",
"title": "CCF Public Node API",
"version": "4.3.0"
"version": "4.6.0"
},
"openapi": "3.0.0",
"paths": {
Expand Down Expand Up @@ -1250,21 +1250,35 @@
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetNode__NodeInfo"
}
}
},
"description": "Default response description"
},
"default": {
"$ref": "#/components/responses/default"
}
},
"x-ccf-forwarding": {
"$ref": "#/components/x-ccf-forwarding/never"
"$ref": "#/components/x-ccf-forwarding/sometimes"
}
}
},
"/node/network/nodes/self": {
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetNode__NodeInfo"
}
}
},
"description": "Default response description"
},
"default": {
Expand Down
2 changes: 1 addition & 1 deletion docker/ccf_ci_built
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Latest image as of this change
ARG platform=sgx
ARG base=ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-snp-clang-15
ARG base=ccfmsrc.azurecr.io/ccf/ci:05-09-2023-snp-clang-15
FROM ${base}

# SSH. Note that this could (should) be done in the base ccf_ci image instead
Expand Down
4 changes: 2 additions & 2 deletions docker/sgx_deps_pin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir -p /etc/init
echo "APT::Acquire::Retries \"5\";" | tee /etc/apt/apt.conf.d/80-retries

UBUNTU=focal
PSW_VERSION=2.17.100
PSW_VERSION=2.20.100

if [ -z "$PSW_VERSION" ]; then
echo "Please set PSW_VERSION (e.g. 2.11)." >&2;
Expand All @@ -23,5 +23,5 @@ apt-get update && apt-get install -y wget gnupg
# Reference https://manpages.debian.org/buster/apt/apt_preferences.5.en.html
# Download the pref file from https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/
# Assuming file name to follow *sgx_<PSW_VERSION>_${UBUNTU}_custom_version.cfg convention
wget -r -l1 --no-parent -nd -A "*sgx_${PSW_VERSION//./_}_${UBUNTU}_custom_version.cfg" "https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files"
wget -r -l1 --no-parent -nd -A "*sgx_${PSW_VERSION//./_}_${UBUNTU}_custom_version.cfg" "https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/"
mv ./*"sgx_${PSW_VERSION//./_}_${UBUNTU}_custom_version.cfg" "/etc/apt/preferences.d/intel-sgx.pref"
6 changes: 6 additions & 0 deletions python/utils/verify_quote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -e
quote_file_name="quote.bin"
endorsements_file_name="endorsements.bin"
open_enclave_path=${OPEN_ENCLAVE_PATH:-"/opt/openenclave"}
default_port=443

function usage()
{
Expand All @@ -30,6 +31,11 @@ fi
node_address=$1
shift

# Add default port number if not included (required by openssl s_client)
if ! [[ $node_address =~ .*:[0-9]+$ ]]; then
node_address="${node_address}:${default_port}"
fi

while [ "$1" != "" ]; do
case $1 in
-h|-\?|--help)
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure_deployment/arm_aci.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def parse_aci_args(parser: ArgumentParser) -> Namespace:
"--aci-image",
help="The name of the image to deploy in the ACI",
type=str,
default="ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-snp",
default="ccfmsrc.azurecr.io/ccf/ci:05-09-2023-snp",
)
parser.add_argument(
"--aci-type",
Expand Down
3 changes: 2 additions & 1 deletion src/consensus/aft/raft.h
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ namespace aft
from);
const auto this_match =
find_highest_possible_match({r.term, r.last_log_idx});
node->second.sent_idx = std::min(this_match, node->second.sent_idx);
node->second.sent_idx = std::max(
std::min(this_match, node->second.sent_idx), node->second.match_idx);
return;
}
else
Expand Down
3 changes: 3 additions & 0 deletions src/host/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ int main(int argc, char** argv)
{
startup_config.network.acme = config.network.acme;
}
// Used by GET /node/network/nodes/self to return rpc interfaces
// prior to the KV being updated
startup_config.network.rpc_interfaces = config.network.rpc_interfaces;

LOG_INFO_FMT("Initialising enclave: enclave_create_node");
std::atomic<bool> ecall_completed = false;
Expand Down
Loading

0 comments on commit 2a40dd1

Please sign in to comment.