2022-04-21 21:36:18 -04:00
|
|
|
[package]
|
2022-04-27 22:48:58 -04:00
|
|
|
name = "monero-serai"
|
2023-03-20 20:28:41 -04:00
|
|
|
version = "0.1.4-alpha"
|
2022-08-25 04:02:30 -04:00
|
|
|
description = "A modern Monero transaction library"
|
2022-04-21 21:36:18 -04:00
|
|
|
license = "MIT"
|
2022-10-15 23:46:22 -04:00
|
|
|
repository = "https://github.com/serai-dex/serai/tree/develop/coins/monero"
|
2022-04-21 21:36:18 -04:00
|
|
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
|
|
|
|
edition = "2021"
|
2024-06-13 15:57:08 -04:00
|
|
|
rust-version = "1.79"
|
2022-04-21 21:36:18 -04:00
|
|
|
|
2022-09-28 07:44:49 -05:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
|
all-features = true
|
2022-09-29 04:47:55 -04:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2022-09-28 07:44:49 -05:00
|
|
|
|
2023-12-16 20:54:24 -05:00
|
|
|
[lints]
|
|
|
|
|
workspace = true
|
|
|
|
|
|
2022-04-21 21:36:18 -04:00
|
|
|
[dependencies]
|
2023-08-08 18:18:59 -04:00
|
|
|
std-shims = { path = "../../common/std-shims", version = "^0.1.1", default-features = false }
|
2023-06-28 21:16:33 -04:00
|
|
|
|
2023-06-29 04:14:29 -04:00
|
|
|
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
|
|
|
|
|
rand_core = { version = "0.6", default-features = false }
|
2022-07-09 21:51:39 -04:00
|
|
|
|
2024-06-15 17:00:11 -04:00
|
|
|
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize"] }
|
2022-04-21 21:36:18 -04:00
|
|
|
|
2024-06-13 18:54:18 -04:00
|
|
|
monero-io = { path = "io", version = "0.1", default-features = false }
|
2023-08-08 18:18:59 -04:00
|
|
|
monero-generators = { path = "generators", version = "0.4", default-features = false }
|
2024-06-13 18:54:18 -04:00
|
|
|
monero-primitives = { path = "primitives", version = "0.1", default-features = false }
|
2024-06-16 11:29:34 -04:00
|
|
|
monero-mlsag = { path = "ringct/mlsag", version = "0.1", default-features = false }
|
2024-06-13 18:54:18 -04:00
|
|
|
monero-clsag = { path = "ringct/clsag", version = "0.1", default-features = false }
|
2024-06-16 11:55:41 -04:00
|
|
|
monero-borromean = { path = "ringct/borromean", version = "0.1", default-features = false }
|
2024-06-15 17:00:11 -04:00
|
|
|
monero-bulletproofs = { path = "ringct/bulletproofs", version = "0.1", default-features = false }
|
2022-04-21 21:36:18 -04:00
|
|
|
|
Monero: support for legacy transactions (#308)
* add mlsag
* fix last commit
* fix miner v1 txs
* fix non-miner v1 txs
* add borromean + fix mlsag
* add block hash calculations
* fix for the jokester that added unreduced scalars
to the borromean signature of
2368d846e671bf79a1f84c6d3af9f0bfe296f043f50cf17ae5e485384a53707b
* Add Borromean range proof verifying functionality
* Add MLSAG verifying functionality
* fmt & clippy :)
* update MLSAG, ss2_elements will always be 2
* Add MgSig proving
* Tidy block.rs
* Tidy Borromean, fix bugs in last commit, replace todo! with unreachable!
* Mark legacy EcdhInfo amount decryption as experimental
* Correct comments
* Write a new impl of the merkle algorithm
This one tries to be understandable.
* Only pull in things only needed for experimental when experimental
* Stop caching the Monero block hash now in processor that we have Block::hash
* Corrections for recent processor commit
* Use a clearer algorithm for the merkle
Should also be more efficient due to not shifting as often.
* Tidy Mlsag
* Remove verify_rct_* from Mlsag
Both methods were ports from Monero, overtly specific without clear
documentation. They need to be added back in, with documentation, or included
in a node which provides the necessary further context for them to be naturally
understandable.
* Move mlsag/mod.rs to mlsag.rs
This should only be a folder if it has multiple files.
* Replace EcdhInfo terminology
The ECDH encrypted the amount, yet this struct contained the encrypted amount,
not some ECDH.
Also corrects the types on the original EcdhInfo struct.
* Correct handling of commitment masks when scanning
* Route read_array through read_raw_vec
* Misc lint
* Make a proper RctType enum
No longer caches RctType in the RctSignatures as well.
* Replace Vec<Bulletproofs> with Bulletproofs
Monero uses aggregated range proofs, so there's only ever one Bulletproof. This
is enforced with a consensus rule as well, making this safe.
As for why Monero uses a vec, it's probably due to the lack of variadic typing
used. Its effectively an Option for them, yet we don't need an Option since we
do have variadic typing (enums).
* Add necessary checks to Eventuality re: supported protocols
* Fix for block 202612 and fix merkel root calculations
* MLSAG (de)serialisation fix
ss_2_elements will not always be 2 as rct type 1 transactions are not enforced to have one input
* Revert "MLSAG (de)serialisation fix"
This reverts commit 5e710e0c96658092c6ecfe5e4ea5a9c3dbee3ab3.
here it checks number of MGs == number of inputs:
https://github.com/monero-project/monero/blob/0a1eaf26f9dd6b762c2582ee12603b2a4671c735/src/cryptonote_core/tx_verification_utils.cpp#L60-59
and here it checks for RctTypeFull number of MGs == 1:
https://github.com/monero-project/monero/blob/0a1eaf26f9dd6b762c2582ee12603b2a4671c735/src/ringct/rctSigs.cpp#L1325
so number of inputs == 1
so ss_2_elements == 2
* update `MlsagAggregate` comment
* cargo update
Resolves a yanked crate
* Move location of serai-client in Cargo.toml
---------
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2023-07-04 21:18:05 +00:00
|
|
|
hex-literal = "0.4"
|
2022-07-09 21:51:39 -04:00
|
|
|
|
2022-10-15 23:46:22 -04:00
|
|
|
[features]
|
2023-06-29 04:14:29 -04:00
|
|
|
std = [
|
|
|
|
|
"std-shims/std",
|
|
|
|
|
|
|
|
|
|
"zeroize/std",
|
|
|
|
|
|
|
|
|
|
"rand_core/std",
|
2023-10-31 07:41:23 -04:00
|
|
|
|
2024-06-13 18:54:18 -04:00
|
|
|
"monero-io/std",
|
2023-06-29 04:14:29 -04:00
|
|
|
"monero-generators/std",
|
2024-06-13 18:54:18 -04:00
|
|
|
"monero-primitives/std",
|
2024-06-16 11:29:34 -04:00
|
|
|
"monero-mlsag/std",
|
2024-06-13 18:54:18 -04:00
|
|
|
"monero-clsag/std",
|
2024-06-15 17:00:11 -04:00
|
|
|
"monero-bulletproofs/std",
|
2023-06-29 04:14:29 -04:00
|
|
|
]
|
Monero: support for legacy transactions (#308)
* add mlsag
* fix last commit
* fix miner v1 txs
* fix non-miner v1 txs
* add borromean + fix mlsag
* add block hash calculations
* fix for the jokester that added unreduced scalars
to the borromean signature of
2368d846e671bf79a1f84c6d3af9f0bfe296f043f50cf17ae5e485384a53707b
* Add Borromean range proof verifying functionality
* Add MLSAG verifying functionality
* fmt & clippy :)
* update MLSAG, ss2_elements will always be 2
* Add MgSig proving
* Tidy block.rs
* Tidy Borromean, fix bugs in last commit, replace todo! with unreachable!
* Mark legacy EcdhInfo amount decryption as experimental
* Correct comments
* Write a new impl of the merkle algorithm
This one tries to be understandable.
* Only pull in things only needed for experimental when experimental
* Stop caching the Monero block hash now in processor that we have Block::hash
* Corrections for recent processor commit
* Use a clearer algorithm for the merkle
Should also be more efficient due to not shifting as often.
* Tidy Mlsag
* Remove verify_rct_* from Mlsag
Both methods were ports from Monero, overtly specific without clear
documentation. They need to be added back in, with documentation, or included
in a node which provides the necessary further context for them to be naturally
understandable.
* Move mlsag/mod.rs to mlsag.rs
This should only be a folder if it has multiple files.
* Replace EcdhInfo terminology
The ECDH encrypted the amount, yet this struct contained the encrypted amount,
not some ECDH.
Also corrects the types on the original EcdhInfo struct.
* Correct handling of commitment masks when scanning
* Route read_array through read_raw_vec
* Misc lint
* Make a proper RctType enum
No longer caches RctType in the RctSignatures as well.
* Replace Vec<Bulletproofs> with Bulletproofs
Monero uses aggregated range proofs, so there's only ever one Bulletproof. This
is enforced with a consensus rule as well, making this safe.
As for why Monero uses a vec, it's probably due to the lack of variadic typing
used. Its effectively an Option for them, yet we don't need an Option since we
do have variadic typing (enums).
* Add necessary checks to Eventuality re: supported protocols
* Fix for block 202612 and fix merkel root calculations
* MLSAG (de)serialisation fix
ss_2_elements will not always be 2 as rct type 1 transactions are not enforced to have one input
* Revert "MLSAG (de)serialisation fix"
This reverts commit 5e710e0c96658092c6ecfe5e4ea5a9c3dbee3ab3.
here it checks number of MGs == number of inputs:
https://github.com/monero-project/monero/blob/0a1eaf26f9dd6b762c2582ee12603b2a4671c735/src/cryptonote_core/tx_verification_utils.cpp#L60-59
and here it checks for RctTypeFull number of MGs == 1:
https://github.com/monero-project/monero/blob/0a1eaf26f9dd6b762c2582ee12603b2a4671c735/src/ringct/rctSigs.cpp#L1325
so number of inputs == 1
so ss_2_elements == 2
* update `MlsagAggregate` comment
* cargo update
Resolves a yanked crate
* Move location of serai-client in Cargo.toml
---------
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2023-07-04 21:18:05 +00:00
|
|
|
|
2024-06-15 17:00:11 -04:00
|
|
|
compile-time-generators = ["curve25519-dalek/precomputed-tables", "monero-bulletproofs/compile-time-generators"]
|
2024-06-16 18:40:15 -04:00
|
|
|
multisig = ["monero-clsag/multisig", "std"]
|
|
|
|
|
#binaries = ["tokio/rt-multi-thread", "tokio/macros", "http-rpc"]
|
2024-06-19 08:36:26 -04:00
|
|
|
default = ["std", "compile-time-generators"]
|