mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
Remove experimental feature from monero-serai
This commit is contained in:
@@ -101,6 +101,5 @@ std = [
|
|||||||
http-rpc = ["digest_auth", "simple-request", "tokio"]
|
http-rpc = ["digest_auth", "simple-request", "tokio"]
|
||||||
multisig = ["transcript", "frost", "std"]
|
multisig = ["transcript", "frost", "std"]
|
||||||
binaries = ["tokio/rt-multi-thread", "tokio/macros", "http-rpc"]
|
binaries = ["tokio/rt-multi-thread", "tokio/macros", "http-rpc"]
|
||||||
experimental = []
|
|
||||||
|
|
||||||
default = ["std", "http-rpc"]
|
default = ["std", "http-rpc"]
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ pub(crate) fn amount_encryption(amount: u64, key: Scalar) -> [u8; 8] {
|
|||||||
fn amount_decryption(amount: &EncryptedAmount, key: Scalar) -> (Scalar, u64) {
|
fn amount_decryption(amount: &EncryptedAmount, key: Scalar) -> (Scalar, u64) {
|
||||||
match amount {
|
match amount {
|
||||||
EncryptedAmount::Original { mask, amount } => {
|
EncryptedAmount::Original { mask, amount } => {
|
||||||
#[cfg(feature = "experimental")]
|
|
||||||
{
|
|
||||||
let mask_shared_sec = hash(key.as_bytes());
|
let mask_shared_sec = hash(key.as_bytes());
|
||||||
let mask =
|
let mask =
|
||||||
Scalar::from_bytes_mod_order(*mask) - Scalar::from_bytes_mod_order(mask_shared_sec);
|
Scalar::from_bytes_mod_order(*mask) - Scalar::from_bytes_mod_order(mask_shared_sec);
|
||||||
@@ -118,14 +116,6 @@ fn amount_decryption(amount: &EncryptedAmount, key: Scalar) -> (Scalar, u64) {
|
|||||||
|
|
||||||
(mask, amount)
|
(mask, amount)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "experimental"))]
|
|
||||||
{
|
|
||||||
let _ = mask;
|
|
||||||
let _ = amount;
|
|
||||||
todo!("decrypting a legacy monero transaction's amount")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EncryptedAmount::Compact { amount } => (
|
EncryptedAmount::Compact { amount } => (
|
||||||
commitment_mask(key),
|
commitment_mask(key),
|
||||||
u64::from_le_bytes(amount_encryption(u64::from_le_bytes(*amount), key)),
|
u64::from_le_bytes(amount_encryption(u64::from_le_bytes(*amount), key)),
|
||||||
|
|||||||
Reference in New Issue
Block a user