Skip to content

Commit

Permalink
repo-sync-2024-03-04T15:06:30+0800 (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
6fj authored Mar 4, 2024
1 parent d0e277a commit dff0ccc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
> - `[API]` prefix for API changes.
> - `[Improvement]` prefix for implementation improvement.
## v0.3.0.dev240304
- [API] expose ic_mode in RunLegacyPsi api

## v0.3.0.dev240222
- [API] expose PIR API.

Expand Down
12 changes: 9 additions & 3 deletions psi/ecdh/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#include <filesystem>

#include "boost/uuid/uuid.hpp"
#include "boost/uuid/uuid_generators.hpp"
#include "boost/uuid/uuid_io.hpp"

#include "psi/legacy/bucket_psi.h"
#include "psi/utils/arrow_csv_batch_provider.h"
#include "psi/utils/sync.h"
Expand Down Expand Up @@ -82,9 +86,11 @@ void EcdhUbPsiClient::Online() {
std::make_shared<ArrowCsvBatchProvider>(config_.input_config().path(),
selected_keys);

std::string ec_point_store_path1 = fmt::format(
"{}/tmp-self-cipher-store-{}.csv",
std::filesystem::temp_directory_path().string(), lctx_->Rank());
boost::uuids::random_generator uuid_generator;
std::string ec_point_store_path1 =
fmt::format("{}/{}/tmp-self-cipher-store-{}.csv",
std::filesystem::temp_directory_path().string(),
boost::uuids::to_string(uuid_generator()), lctx_->Rank());

auto self_ec_point_store = std::make_shared<CachedCsvEcPointStore>(
ec_point_store_path1, true, "self", false);
Expand Down
4 changes: 2 additions & 2 deletions psi/launch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ PsiResultReport RunUbPsi(const v2::UbPsiConfig& ub_psi_config,
PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config,
const std::shared_ptr<yacl::link::Context>& lctx,
ProgressCallbacks progress_callbacks,
int64_t callbacks_interval_ms) {
int64_t callbacks_interval_ms, bool ic_mode) {
google::protobuf::util::JsonPrintOptions json_print_options;
json_print_options.preserve_proto_field_names = true;

Expand All @@ -163,7 +163,7 @@ PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config,
.ok());
SPDLOG_INFO("LEGACY PSI config: {}", config_json);

BucketPsi bucket_psi(bucket_psi_config, lctx);
BucketPsi bucket_psi(bucket_psi_config, lctx, ic_mode);
return bucket_psi.Run(progress_callbacks, callbacks_interval_ms);
}

Expand Down
3 changes: 2 additions & 1 deletion psi/launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ namespace psi {
PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config,
const std::shared_ptr<yacl::link::Context>& lctx,
ProgressCallbacks progress_callbacks = nullptr,
int64_t callbacks_interval_ms = 5 * 1000);
int64_t callbacks_interval_ms = 5 * 1000,
bool ic_mode = false);

PsiResultReport RunPsi(const v2::PsiConfig& psi_config,
const std::shared_ptr<yacl::link::Context>& lctx);
Expand Down
2 changes: 1 addition & 1 deletion psi/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
#define PSI_VERSION_MAJOR 0
#define PSI_VERSION_MINOR 3
#define PSI_VERSION_PATCH 0
#define PSI_DEV_IDENTIFIER ".dev240222"
#define PSI_DEV_IDENTIFIER ".dev240304"

0 comments on commit dff0ccc

Please sign in to comment.