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

Repro 1 - DONT MERGE #1

Closed
wants to merge 6 commits into from
Closed
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
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/todo.md

This file was deleted.

54 changes: 19 additions & 35 deletions .github/workflows/ci-containers-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,69 +29,53 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
- name: Extract metadata (tags, labels) for default image
id: meta_default
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci/default

- name: Build and push Virtual container
id: push_virtual
uses: docker/build-push-action@v5
- name: Extract metadata (tags, labels) for SGX image
id: meta_sgx
uses: docker/metadata-action@v5
with:
context: .
file: ./docker/ccf_ci
build-args: |
platform=virtual
clang_version=15
push: true
tags: ${{ steps.meta.outputs.tags }}-virtual-clang15
labels: ${{ steps.meta.outputs.labels }}
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci/sgx

- name: Build and push SNP container
id: push_snp
uses: docker/build-push-action@v5
- name: Build and push default container
id: push_default
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/ccf_ci
build-args: |
platform=snp
clang_version=15
push: true
tags: ${{ steps.meta.outputs.tags }}-snp-clang15
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta_default.outputs.tags }}
labels: ${{ steps.meta_default.outputs.labels }}

- name: Build and push SGX container
id: push_sgx
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/ccf_ci
build-args: |
platform=sgx
push: true
tags: ${{ steps.meta.outputs.tags }}-sgx
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta_sgx.outputs.tags }}
labels: ${{ steps.meta_sgx.outputs.labels }}

- name: Attest Virtual container
- name: Attest default container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-digest: ${{ steps.push_virtual.outputs.digest }}
push-to-registry: true

- name: Attest SNP container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-digest: ${{ steps.push_sgx.outputs.digest }}
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci/default
subject-digest: ${{ steps.push_default.outputs.digest }}
push-to-registry: true

- name: Attest SGX container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci/sgx
subject-digest: ${{ steps.push_sgx.outputs.digest }}
push-to-registry: true
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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-rc0]

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

### Added

- More public namespaces have been moved under `::ccf`
- `::ds` is now `ccf::ds`
- `::siphash` is now `ccf::siphash`
- `::threading` is now `ccf::threading`, and `ccf/ds/thread_ids.h` has moved to `ccf/threading/thread_ids.h`
- `::consensus` is now `ccf::consensus`
- `::tls` is now `ccf::tls`

## [5.0.0-dev18]

[5.0.0-dev18]: https://github.com/microsoft/CCF/releases/tag/ccf-5.0.0-dev18
Expand Down
2 changes: 1 addition & 1 deletion doc/build_apps/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Historical Queries

.. doxygenclass:: ccf::historical::AbstractStateCache
:project: CCF
:members: set_default_expiry_duration, get_state_at, get_store_at, get_store_range, drop_cached_states
:members: set_default_expiry_duration, set_soft_cache_limit, get_state_at, get_store_at, get_store_range, drop_cached_states

.. doxygenstruct:: ccf::historical::State
:project: CCF
Expand Down
4 changes: 2 additions & 2 deletions include/ccf/byte_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ namespace std
{
size_t operator()(const llvm_vecsmall::SmallVector<T, N>& v) const
{
static constexpr siphash::SipKey k{
static constexpr ccf::siphash::SipKey k{
0x7720796f726c694b, 0x2165726568207361};
return siphash::siphash<2, 4>(v.data(), v.size(), k);
return ccf::siphash::siphash<2, 4>(v.data(), v.size(), k);
}
};
}
Expand Down
6 changes: 3 additions & 3 deletions include/ccf/ds/contiguous_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <numeric>
#include <vector>

namespace ds
namespace ccf::ds
{
// Dense representation of an ordered set of values, assuming it contains
// some contiguous ranges of adjacent values. Stores a sequence of ranges,
Expand Down Expand Up @@ -500,7 +500,7 @@ namespace ds

FMT_BEGIN_NAMESPACE
template <typename T>
struct formatter<ds::ContiguousSet<T>>
struct formatter<ccf::ds::ContiguousSet<T>>
{
template <typename ParseContext>
constexpr auto parse(ParseContext& ctx)
Expand All @@ -509,7 +509,7 @@ struct formatter<ds::ContiguousSet<T>>
}

template <typename FormatContext>
auto format(const ds::ContiguousSet<T>& v, FormatContext& ctx) const
auto format(const ccf::ds::ContiguousSet<T>& v, FormatContext& ctx) const
{
std::vector<std::string> ranges;
for (const auto& [from, additional] : v.get_ranges())
Expand Down
16 changes: 8 additions & 8 deletions include/ccf/ds/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <string_view>
#include <vector>

namespace ds::hashutils
namespace ccf::ds::hashutils
{
template <typename T>
inline void hash_combine(size_t& n, const T& v, std::hash<T>& h)
Expand Down Expand Up @@ -42,9 +42,9 @@ namespace std
{
// For cryptographically secure hashing, use SipHash directly with a
// secret key. For std::hash, we use this fixed key
static constexpr siphash::SipKey k{
static constexpr ccf::siphash::SipKey k{
0x7720796f726c694b, 0x2165726568207361};
return siphash::siphash<2, 4>(v, k);
return ccf::siphash::siphash<2, 4>(v, k);
}
};

Expand All @@ -53,7 +53,7 @@ namespace std
{
size_t operator()(const std::vector<T>& v) const
{
return ds::hashutils::hash_container(v);
return ccf::ds::hashutils::hash_container(v);
}
};

Expand All @@ -62,7 +62,7 @@ namespace std
{
size_t operator()(const std::array<T, N>& v) const
{
return ds::hashutils::hash_container(v);
return ccf::ds::hashutils::hash_container(v);
}
};

Expand All @@ -74,18 +74,18 @@ namespace std
size_t n = 0x444e414c544f4353;

std::hash<A> h_a{};
ds::hashutils::hash_combine(n, v.first, h_a);
ccf::ds::hashutils::hash_combine(n, v.first, h_a);

std::hash<B> h_b{};
ds::hashutils::hash_combine(n, v.second, h_b);
ccf::ds::hashutils::hash_combine(n, v.second, h_b);

return n;
}
};

}

namespace ds
namespace ccf::ds
{
/// Simple, fast constexpr hash function (NOT cryptographically sound)
namespace
Expand Down
2 changes: 1 addition & 1 deletion include/ccf/ds/hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>
#include <vector>

namespace ds
namespace ccf::ds
{
static uint8_t hex_char_to_int(char c)
{
Expand Down
Loading
Loading