Commit graph

1730 commits

Author SHA1 Message Date
Luke Parker
f0957c8d52
Add a builder API to the Monero library
Enables more composable construction flows.
2022-12-01 11:35:05 -05:00
Luke Parker
3f503d92fb
Remove dbg! from previous commit 2022-11-24 04:57:25 -05:00
Luke Parker
409d1151b2
Add dbg to help resolve https://github.com/serai-dex/serai/issues/166 2022-11-23 22:15:50 -05:00
Luke Parker
00c1f21224
cargo update
Resolves yanking of crossbeam (see https://github.com/crossbeam-rs/crossbeam/issues/931).
2022-11-23 07:44:30 -05:00
Luke Parker
138bb46e19
cargo update
Mandated by https://github.com/dylni/os_str_bytes/issues/14.
2022-11-21 02:23:38 -05:00
Luke Parker
56574f2f5b
Add a cargo deny workflow (#89)
* Add a cargo deny workflow

Also trims out a pointless submodule checkout (we have none).

* Remove no longer relevant advisories/allowances

* Patch for array-bytes

* Remove unused properties

* Restore chrono advisory

* Allow MPL-2.0, correct GPL-3.0 allowance specification

* Properly ban copyleft, run on all crates

* Exceptions for Serai crates (AGPL-3.0)

* Remove top comments

* Clarify reasoning for not checking advisories in CI

* Run all checks in CI

While this may bring down an unrelated commit, we can manually review, before creating a followup commit allowing it. If it's critical, then this did its job.
2022-11-16 20:53:35 -06:00
Luke Parker
4a3178ed8f
Support handling addresses from other networks
A type alias of MoneroAddress is provided to abstract away the generic. 
To keep the rest of the library sane, MoneroAddress is used everywhere.

If someone wants to use this library with another coin, they *should* be 
able to parse a custom address and then recreate it as a Monero address. 
While that's annoying to them, better them than any person using this 
lib for Monero.

Closes #152.
2022-11-15 00:06:15 -05:00
Luke Parker
83060a914a
Have the RPC return the unsupported version when Unsupported 2022-11-14 23:56:28 -05:00
Luke Parker
6acbfdcc45
Support custom Monero protocol definitions 2022-11-14 23:28:39 -05:00
Luke Parker
6f9cf510da
Support an authenticated Monero RPC
Closes https://github.com/serai-dex/serai/issues/143.
2022-11-14 23:24:35 -05:00
Luke Parker
b05a223b69
Monero json_rpc_call 2022-11-14 21:49:49 -05:00
Luke Parker
138f7cdfa4
Correct dev-dependencies for modular-frost 2022-11-14 19:20:56 -05:00
Luke Parker
fe1f28c77a
cargo update 2022-11-14 04:55:00 -05:00
Luke Parker
b85801b524
Correct the MerlinTranscript Debug impl 2022-11-11 07:07:42 -05:00
Luke Parker
c7121d96ac
Add common to Dockerfile 2022-11-11 02:20:10 -05:00
Luke Parker
35ca220bcc
Comment the allocator feature
Prevents it from turning on with --all-features, forcing nightly.
2022-11-11 01:23:35 -05:00
Luke Parker
3d9b9b178c
Zeroizing allocator (#154)
* Add a zeroizing allocator

* Also implement the allocator API

* Add misisng license file to zalloc

* Slight change to zalloc description
2022-11-10 23:34:40 -06:00
Luke Parker
7334ed1f43
cargo update
Updates Substrate to polkadot-v0.9.33
2022-11-10 23:59:20 -05:00
Luke Parker
84de427d72
Fix https://github.com/serai-dex/serai/issues/150 2022-11-10 22:35:09 -05:00
Luke Parker
d714f2202d
Document multiexp
Bumps the crate version to enable publishing.
2022-11-07 18:31:20 -05:00
Luke Parker
be61bff074
cargo fmt 2022-11-05 18:47:57 -04:00
Luke Parker
8de465af87
Have Transcript::append_message take in AsRef<[u8]>, not &[u8]
Simplifies calling it.
2022-11-05 18:43:36 -04:00
Luke Parker
65df18d285
cargo update 2022-11-04 08:07:37 -04:00
Luke Parker
953bece2ea
Bump Substrate dependency
Fixes #147.
2022-11-04 08:07:12 -04:00
Luke Parker
5977aeb489
Implement Schnorr half-aggregation from https://eprint.iacr.org/2021/350.pdf
Relevant to https://github.com/serai-dex/serai/issues/99.
2022-11-04 08:04:49 -04:00
github-actions[bot]
8e53522780
November 2022 - Rust Nightly Update (#144)
* Update nightly

* Have the latest nightly clippy pass

Co-authored-by: GitHub Actions <>
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2022-11-01 00:03:36 -05:00
TheArchitect108
5df74ac9e2
Temporarily strip auth from monerod rpc for tests. 2022-10-31 17:03:23 -05:00
TheArchitect108
16c51ce374
Add svm-rs dependency to getting started. 2022-10-31 15:50:28 -05:00
TheArchitect108
659ff280ac
expose monero rpc port from docker 2022-10-31 12:52:29 -05:00
TheArchitect108
0fc336941c
Add getting started link to main readme. 2022-10-31 11:35:21 -05:00
TheArchitect108
1a4f2d5621
Add getting started link to main readme. 2022-10-31 11:34:53 -05:00
TheArchitect108
8a20d90868
Add links to other options for running Serai. 2022-10-31 11:32:27 -05:00
TheArchitect108
4101239e0d
add deps to make setup easier 2022-10-31 11:10:13 -05:00
Luke Parker
aa4b5e2ca3
Update Cargo.lock 2022-10-29 06:01:32 -04:00
Luke Parker
6ef624ab7e
Correct monero's dev dependencies 2022-10-29 05:52:56 -04:00
Luke Parker
e67e406d95
Correct ed448 versioning 2022-10-29 05:25:58 -04:00
Luke Parker
43e38e463f
Update FROST version 2022-10-29 05:14:29 -04:00
Luke Parker
1464eefbe3
Correct dleq's zeroize dependency 2022-10-29 05:13:20 -04:00
Luke Parker
6eaed17952
Inline FROST processing functions into the machines' impls
This was done for the DKG and this similarly cleans up here.
2022-10-29 05:10:07 -04:00
Luke Parker
2379855b31
Create a dedicated crate for the DKG (#141)
* Add dkg crate

* Remove F_len and G_len

They're generally no longer used.

* Replace hash_to_vec with a provided method around associated type H: Digest

Part of trying to minimize this trait so it can be moved elsewhere. Vec, 
which isn't std, may have been a blocker.

* Encrypt secret shares within the FROST library

Reduces requirements on callers in order to be correct.

* Update usage of Zeroize within FROST

* Inline functions in key_gen

There was no reason to have them separated as they were. sign probably 
has the same statement available, yet that isn't the focus right now.

* Add a ciphersuite package which provides hash_to_F

* Set the Ciphersuite version to something valid

* Have ed448 export Scalar/FieldElement/Point at the top level

* Move FROST over to Ciphersuite

* Correct usage of ff in ciphersuite

* Correct documentation handling

* Move Schnorr signatures to their own crate

* Remove unused feature from schnorr

* Fix Schnorr tests

* Split DKG into a separate crate

* Add serialize to Commitments and SecretShare

Helper for buf = vec![]; .write(buf).unwrap(); buf

* Move FROST over to the new dkg crate

* Update Monero lib to latest FROST

* Correct ethereum's usage of features

* Add serialize to GeneratorProof

* Add serialize helper function to FROST

* Rename AddendumSerialize to WriteAddendum

* Update processor

* Slight fix to processor
2022-10-29 03:54:42 -05:00
Luke Parker
cbceaff678
Create dedicated message structures for FROST messages (#140)
* Create message types for FROST key gen

Taking in reader borrows absolutely wasn't feasible. Now, proper types
which can be read (and then passed directly, without a mutable borrow)
exist for key_gen. sign coming next.

* Move FROST signing to messages, not Readers/Writers/Vec<u8>

Also takes the nonce handling code and makes a dedicated file for it, 
aiming to resolve complex types and make the code more legible by 
replacing its previously inlined state.

* clippy

* Update FROST tests

* read_signature_share

* Update the Monero library to the new FROST packages

* Update processor to latest FROST

* Tweaks to terminology and documentation
2022-10-25 23:17:25 -05:00
TheArchitect108
ccdb834e6e
fixes caching issues (#139)
* fixes caching issues

* update comment
2022-10-24 23:48:11 -05:00
Luke Parker
42a711ee51
Replace the Serai scripts volume for directly copying the files
This should probably be done for the other images as well.
2022-10-23 21:01:11 -04:00
Luke Parker
7ecf8b22cf
Mark all sh files as executable 2022-10-23 20:39:37 -04:00
GitHub Actions
595b2da433 Update nightly 2022-10-21 21:26:27 -05:00
Luke Parker
a03a04bcc6
Simplify monthly nightly update workflow 2022-10-21 22:25:32 -04:00
Luke Parker
22713493d8
Move from set-output to $GITHUB_OUTPUT
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-10-21 22:19:01 -04:00
Luke Parker
b72af5e185
cargo update
The new ink release should enable using the latest Rust nightly, without 
issue.
2022-10-21 21:40:50 -04:00
Luke Parker
c7f8258e0c
Cherry-pick 28308dfe85387fe54c14076089a40c5af1f1b8f7 2022-10-21 05:32:38 -04:00
Luke Parker
21fd56d4d3
Remove extraneous clone 2022-10-21 01:08:15 -05:00