Commit Graph

129 Commits

Author SHA1 Message Date
Luke Parker
131355b10f Correct Dave, Eve, and Ferdie to not run as validators 2022-11-02 23:31:19 -04:00
Luke Parker
cf8bdf2126 Stop returning errors on already existing blocks entirely 2022-11-02 22:52:20 -04:00
Luke Parker
de0e6724bf Remove error case which shouldn't be an error 2022-11-02 22:39:49 -04:00
Luke Parker
f4d622a34c Restore cache 2022-11-02 22:39:39 -04:00
Luke Parker
2b503b6f42 Update sc_tendermint per previous commit 2022-11-02 21:37:06 -04:00
Luke Parker
f3e177109d Reduce Arcs in TendermintMachine, split Signer from SignatureScheme 2022-11-02 21:04:26 -04:00
Luke Parker
083198ecf2 Make the dev profile a local testnet profile
Restores a dev profile which only has one validator, locally running.
2022-11-02 19:58:37 -04:00
Luke Parker
83caa8b413 Add a _ to the validator arg in slash 2022-11-02 05:03:00 -04:00
Luke Parker
40b6cb7106 Add an already in chain check to block import
While the inner should do this for us, we call verify_order on our end 
*before* inner to ensure sequential import. Accordingly, we need to 
provide our own check.

Removes errors of "non-sequential import" when trying to re-import an 
existing block.
2022-11-02 03:35:46 -04:00
Luke Parker
16065ccd4e Remove an attempt at caching I don't believe would ever hit 2022-11-02 03:29:04 -04:00
Luke Parker
ca043f55ad Use a rounded genesis to obtain sufficient synchrony within the Docker env 2022-11-02 03:05:04 -04:00
Luke Parker
38cee041d6 Fix handling of the GossipEngine 2022-11-02 02:43:08 -04:00
Luke Parker
e3fc3f28fb Configure node for a multi-node testnet 2022-11-01 23:10:36 -04:00
Luke Parker
86aaadaea0 Update node to latest sc_tendermint 2022-11-01 21:32:18 -04:00
Luke Parker
9a26ac6899 Remove unnecessary PhantomDatas 2022-11-01 20:58:59 -04:00
Luke Parker
5832007a45 Take in a Keystore and validator ID 2022-11-01 20:06:42 -04:00
Luke Parker
aa0a4cf106 Implement proper checking of inherents 2022-11-01 16:37:50 -04:00
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
45a5d3eb1d Add another missing comment 2022-10-31 23:56:13 -04: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
a0c892dfc3 Use the validators list from the session pallet 2022-10-29 06:00:58 -04: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
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
Luke Parker
9b8f2f4487 More misc bug fixes 2022-10-24 06:18:16 -04:00
Luke Parker
05be5c14c3 Misc bug fixes 2022-10-24 05:52:40 -04:00
Luke Parker
b5cb8a9be2 Add a TODO on Tendermint 2022-10-24 05:37:43 -04:00
Luke Parker
a7f4804749 Move Commit from including the round to including the round's end_time
The round was usable to build the current clock in an accumulated 
fashion, relative to the previous round. The end time is the absolute 
metric of it, which can be used to calculate the round number (with all 
previous end times).

Substrate now builds off the best block, not genesis, using the end time 
included in the justification to start its machine in a synchronized 
state.

Knowing the end time of a round, or the round in which block was 
committed to, is necessary for nodes to sync up with Tendermint. 
Encoding it in the commit ensures it's long lasting and makes it readily 
available, without the load of an entire transaction.
2022-10-24 05:28:21 -04:00