Commit graph

506 commits

Author SHA1 Message Date
Luke Parker
19154cf8e1
Move sc_tendermint to async sign 2022-11-01 16:28:08 -04:00
Luke Parker
2947ef08e3
Make sign asynchronous
Some relation to https://github.com/serai-dex/serai/issues/95.
2022-11-01 15:10:50 -04:00
Luke Parker
e38a7e0f3c
Merge branch 'develop' into tendermint 2022-11-01 01:13:25 -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
Luke Parker
45a5d3eb1d
Add another missing comment 2022-10-31 23:56:13 -04: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
8f065533dc
Add documentation to public structs/functions in sc_tendermint 2022-10-30 12:27:16 -04:00
Luke Parker
c4976ff97d
Consolidate references to sr25519 in sc_tendermint 2022-10-30 11:24:52 -04:00
Luke Parker
503adfee2f
Replace best_* with finalized_*
We test their equivalency yet still better to use finalized_* in 
general.
2022-10-30 11:13:47 -04:00
Luke Parker
c0056643c8
Consolidate file structure in sc_tendermint 2022-10-30 11:08:12 -04:00
Luke Parker
91ae2b7112
Move serai_runtime specific code from tendermint/client to node
Renames serai-consensus to sc_tendermint
2022-10-30 10:54:17 -04:00
Luke Parker
a0e0545c49
Deleted comment code related to PoW 2022-10-30 10:10:17 -04:00
Luke Parker
3d7c12adcd
Create a dedicated file for being a Tendermint authority 2022-10-30 10:08:35 -04:00
Luke Parker
066bc40a88
Merge Verifier into block_import.rs
These two files were largely the same, just hooking into sync structs 
with almost identical imports. As this project shapes up, removing dead 
weight is appreciated.
2022-10-30 06:30:44 -04:00
Luke Parker
f37adf4feb
Remove machine from TendermintImport
It's not used there at all.
2022-10-30 06:29:37 -04:00
Luke Parker
aee0bde45d
Connect broadcast 2022-10-30 05:37:23 -04:00
Luke Parker
6c54289fb4
Connect the Tendermint machine to a GossipEngine 2022-10-30 05:16:25 -04:00
Luke Parker
1af6117155
Move TendermintMachine from start_num, time to last_num, time
Provides an explicitly clear API clearer to program around.

Also adds additional time code to handle an edge case.
2022-10-30 04:27:15 -04:00
Luke Parker
edb2e00db7
Remove the Future triggering the machine for an async fn
Enables passing data in, such as the network.
2022-10-30 04:08:33 -04:00
Luke Parker
6838d5c922
Clean generics in Tendermint with a monolith with associated types 2022-10-30 03:26:31 -04:00
Luke Parker
8d3efd6259
Correct Substrate Tendermint start block
The Tendermint machine uses the passed in number as the block's being 
worked on number. Substrate passed in the already finalized block's 
number.

Also updates misc comments.
2022-10-30 01:22:11 -04:00
Luke Parker
9a54317743
Basic Gossip Validator 2022-10-30 01:21:10 -04:00
Luke Parker
f31c457c2c
Merge branch 'develop' into tendermint 2022-10-29 06:02:00 -04:00
Luke Parker
aa4b5e2ca3
Update Cargo.lock 2022-10-29 06:01:32 -04:00
Luke Parker
a0c892dfc3
Use the validators list from the session pallet 2022-10-29 06:00:58 -04:00
Luke Parker
c4c3dcd8f2
Merge branch 'develop' into tendermint 2022-10-29 05:53:40 -04:00
Luke Parker
6ef624ab7e
Correct monero's dev dependencies 2022-10-29 05:52:56 -04:00
Luke Parker
b17aac46ed
Merge branch 'develop' into tendermint 2022-10-29 05:29:52 -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
aec36377c0
Merge branch 'develop' into tendermint 2022-10-29 05:10:21 -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
f91c081f30
Fix the stub round robin
At some point, the modulus was removed causing it to exceed the 
validators list and stop proposing.
2022-10-27 08:49:36 -04:00
Luke Parker
5c08fa9701
TendermintApi, compilation fixes 2022-10-27 08:44:53 -04:00
Luke Parker
66f7663cb2
Redo Tendermint folder structure 2022-10-27 06:33:58 -04:00
Luke Parker
4c2dd9b306
Partial work on correcting pallet calls 2022-10-27 06:29:56 -04:00
Luke Parker
eb418448eb
Update support URL 2022-10-27 05:45:55 -04:00
Luke Parker
fa7a03bf60
Update node to use pallet sessions 2022-10-27 05:23:53 -04:00
Luke Parker
49ab26209d
Add pallet sessions to runtime, create pallet-tendermint 2022-10-27 05:05:41 -04: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
Luke Parker
285152b6e2
Merge weights and signing scheme into validators, documenting needed changes 2022-10-25 02:51:33 -04:00
Luke Parker
5839f44290
Clean up lock acquisition 2022-10-25 02:45:20 -04:00