Skip to content

Commit 70e2e32

Browse files
authored
Feature/remove double spending bloomfilter (#5417)
* removed all uses of the bloomfilter inside nym-api * changed http status code on bf queries
1 parent d1fb926 commit 70e2e32

File tree

23 files changed

+226
-869
lines changed

23 files changed

+226
-869
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ members = [
4848
"common/credentials-interface",
4949
"common/crypto",
5050
"common/dkg",
51-
"common/ecash-double-spending",
5251
"common/ecash-time",
5352
"common/execute",
5453
"common/exit-policy",

common/client-libs/validator-client/src/client.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use crate::{
1111
use nym_api_requests::ecash::models::{
1212
AggregatedCoinIndicesSignatureResponse, AggregatedExpirationDateSignatureResponse,
1313
BatchRedeemTicketsBody, EcashBatchTicketRedemptionResponse, EcashTicketVerificationResponse,
14-
IssuedTicketbooksChallengeResponse, IssuedTicketbooksForResponse, SpentCredentialsResponse,
15-
VerifyEcashTicketBody,
14+
IssuedTicketbooksChallengeResponse, IssuedTicketbooksForResponse, VerifyEcashTicketBody,
1615
};
1716
use nym_api_requests::ecash::{
1817
BlindSignRequestBody, BlindedSignatureResponse, PartialCoinIndicesSignatureResponse,
@@ -647,13 +646,6 @@ impl NymApiClient {
647646
.await?)
648647
}
649648

650-
#[deprecated]
651-
pub async fn spent_credentials_filter(
652-
&self,
653-
) -> Result<SpentCredentialsResponse, ValidatorClientError> {
654-
Ok(self.nym_api.double_spending_filter_v1().await?)
655-
}
656-
657649
pub async fn partial_expiration_date_signatures(
658650
&self,
659651
expiration_date: Option<Date>,

common/client-libs/validator-client/src/nym_api/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -849,20 +849,6 @@ pub trait NymApiClientExt: ApiClient {
849849
.await
850850
}
851851

852-
#[deprecated]
853-
#[instrument(level = "debug", skip(self))]
854-
async fn double_spending_filter_v1(&self) -> Result<SpentCredentialsResponse, NymAPIError> {
855-
self.get_json(
856-
&[
857-
routes::API_VERSION,
858-
routes::ECASH_ROUTES,
859-
routes::DOUBLE_SPENDING_FILTER_V1,
860-
],
861-
NO_PARAMS,
862-
)
863-
.await
864-
}
865-
866852
#[instrument(level = "debug", skip(self))]
867853
async fn partial_expiration_date_signatures(
868854
&self,

common/client-libs/validator-client/src/nym_api/routes.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ pub const DETAILED: &str = "detailed";
1313
pub const DETAILED_UNFILTERED: &str = "detailed-unfiltered";
1414
pub const ACTIVE: &str = "active";
1515
pub const REWARDED: &str = "rewarded";
16-
pub const DOUBLE_SPENDING_FILTER_V1: &str = "double-spending-filter-v1";
17-
1816
pub const ECASH_ROUTES: &str = "ecash";
1917

2018
pub use ecash::*;

common/credential-verification/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ nym-api-requests = { path = "../../nym-api/nym-api-requests" }
2626
nym-credentials = { path = "../credentials" }
2727
nym-credentials-interface = { path = "../credentials-interface" }
2828
nym-ecash-contract-common = { path = "../cosmwasm-smart-contracts/ecash-contract" }
29-
nym-ecash-double-spending = { path = "../ecash-double-spending" }
3029
nym-gateway-requests = { path = "../gateway-requests" }
3130
nym-gateway-storage = { path = "../gateway-storage" }
3231
nym-task = { path = "../task" }

common/ecash-double-spending/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

common/ecash-double-spending/src/lib.rs

Lines changed: 0 additions & 136 deletions
This file was deleted.

nym-api/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ async-trait = { workspace = true }
1616
bs58 = { workspace = true }
1717
bip39 = { workspace = true }
1818
bincode.workspace = true
19-
bloomfilter = { workspace = true }
2019
cfg-if = { workspace = true }
2120
clap = { workspace = true, features = ["cargo", "derive", "env"] }
2221
console-subscriber = { workspace = true, optional = true } # validator-api needs to be built with RUSTFLAGS="--cfg tokio_unstable"
@@ -84,7 +83,6 @@ tracing = { workspace = true }
8483
#ephemera = { path = "../ephemera" }
8584
nym-bandwidth-controller = { path = "../common/bandwidth-controller" }
8685
nym-ecash-contract-common = { path = "../common/cosmwasm-smart-contracts/ecash-contract" }
87-
nym-ecash-double-spending = { path = "../common/ecash-double-spending" }
8886
nym-ecash-time = { path = "../common/ecash-time", features = ["expiration"] }
8987
nym-coconut-dkg-common = { path = "../common/cosmwasm-smart-contracts/coconut-dkg" }
9088
nym-compact-ecash = { path = "../common/nym_offline_compact_ecash" }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright 2025 - Nym Technologies SA <[email protected]>
3+
* SPDX-License-Identifier: GPL-3.0-only
4+
*/
5+
6+
DROP TABLE partial_bloomfilter;
7+
DROP TABLE bloomfilter_parameters;

0 commit comments

Comments
 (0)