Luke Parker
8c51bc011d
Manually step the Tendermint machine when we synced a block over the network
2022-11-13 20:26:01 -05:00
Luke Parker
138866f64d
Update to the latest tendermint-machine
2022-11-13 20:19:19 -05:00
Luke Parker
2408fd8500
Correct weird formatting
2022-11-13 20:18:47 -05:00
Luke Parker
33e52ae79a
Always produce notifications for finalized blocks via origin overrides
2022-11-13 19:45:16 -05:00
Luke Parker
48b4b685ca
Slight doc changes
...
Also flattens the message handling function by replacing an if
containing all following code in the function with an early return for
the else case.
2022-11-13 18:33:26 -05:00
Luke Parker
0b8181b912
Remove the precommit signature hash
...
It cached signatures per-block. Precommit signatures are bound to each
round. This would lead to forming invalid commits when a commit should
be formed. Under debug, the machine would catch that and panic. On
release, it'd have everyone who wasn't a validator fail to continue
syncing.
2022-11-13 18:15:19 -05:00
Luke Parker
b7502a7f67
Have verify_precommit_signature return if it verified the signature
...
Also fixes a bug where invalid precommit signatures were left standing
and therefore contributing to commits.
2022-11-13 18:11:58 -05:00
Luke Parker
c13e0c75ae
Move more code into block.rs
...
Introduces type-aliases to obtain Data/Message/SignedMessage solely from
a Network object.
Fixes a bug regarding stepping when you're not an active validator.
2022-11-13 18:11:09 -05:00
Luke Parker
4ba469e653
BlockData::new
2022-11-12 11:52:55 -05:00
Luke Parker
2de4ab8c9d
Clear the Queue instead of draining and filtering
...
There shouldn't ever be a message which passes the filter under the
current design.
2022-11-12 11:46:32 -05:00
Luke Parker
850878330e
Move Round to an Option due to the pseudo-uninitialized state we create
...
Before the addition of RoundData, we always created the round, and on
.round(0), simply created it again. With RoundData, and the changes to
the time code, we used round 0, time 0, the latter being incorrect yet
not an issue due to lack of misuse.
Now, if we do misuse it, it'll panic.
2022-11-12 11:45:09 -05:00
Luke Parker
b7b57ee6dc
Move BlockData to a new file
2022-11-12 11:42:40 -05:00
Luke Parker
2f3bb88744
Rename Round to RoundNumber
2022-11-12 10:52:39 -05:00
Luke Parker
9e72f8737e
BlockData and RoundData structs
2022-11-12 10:41:09 -05:00
Luke Parker
e2e7a70f1e
Clean up time code in tendermint-machine
2022-11-12 07:12:05 -05:00
Luke Parker
b53759c6ec
Have the machine respond to advances made by an external sync loop
2022-11-12 05:35:41 -05:00
Luke Parker
ca3a29f616
Correct time-adjustment code on round skip
2022-11-12 05:12:20 -05:00
Luke Parker
ecde185bbf
Correct the Duration timing
...
The proposer will build it, send it, then process it (on the first
round). Accordingly, it's / 3, not / 2, as / 2 only accounted for the
latter events.
2022-11-12 05:03:45 -05:00
Luke Parker
32ad6de00c
Properly define and pass around the block size
2022-11-11 06:38:06 -05:00
Luke Parker
43b43bdbd9
Support running TendermintMachine when not a validator
...
This supports validators who leave the current set, without crashing
their nodes, along with nodes trying to become validators (who will now
seamlessly transition in).
2022-11-11 06:04:37 -05:00
Luke Parker
dbcddb2fb0
Don't spam slash
...
Also adds a slash condition of failing to propose.
2022-11-11 05:53:20 -05:00
Luke Parker
354bcefeb0
Add notes to the runtime
2022-11-11 05:43:36 -05:00
Luke Parker
fffb7a6914
Separate the block processing time from the latency
2022-11-11 05:42:13 -05:00
Luke Parker
2411660bd8
Update to the latest substrate
2022-11-11 03:49:02 -05:00
Luke Parker
0fb9d4397f
Merge branch 'develop' into tendermint
2022-11-11 02:20:18 -05:00
Luke Parker
c7121d96ac
Add common to Dockerfile
2022-11-11 02:20:10 -05:00
Luke Parker
c9334ee694
Merge branch 'develop' into tendermint
2022-11-11 02:18:05 -05:00
Luke Parker
6f74bade8b
Only recheck blocks with non-fatal inherent transaction errors
2022-11-11 02:17: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
7d46daa36e
Use futures pin instead of tokio
2022-11-08 22:56:46 -05:00
Luke Parker
f7b1ff9f3b
Update Substrate to the new TendermintHandle
2022-11-08 22:51:31 -05:00
Luke Parker
1c8192218a
Move from a yielding loop to select in tendermint-machine
2022-11-08 22:37:06 -05:00
Luke Parker
2cb1d35d89
Timeout futures
2022-11-08 21:14:57 -05:00
Luke Parker
56a21ca6a6
Use futures mpsc instead of tokio
2022-11-08 21:14:03 -05:00
Luke Parker
16a2c9a2dc
Correct protocol name handling
2022-11-08 02:14:49 -05:00
Luke Parker
5dab3352f2
Move from polling loops to a pure IO model for sc_tendermint's gossip
2022-11-08 02:14:39 -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
c31a55cce0
cargo update (tendermint)
2022-11-04 08:08:16 -04:00
Luke Parker
55e32e24d1
Merge branch 'develop' into tendermint
2022-11-04 08:08:00 -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
Luke Parker
1a3b6dc409
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:03:29 -04:00
Luke Parker
af63c3e5d2
Bump Substrate dependency
...
Fixes #147 .
2022-11-04 07:54:18 -04:00
Luke Parker
ea646c8984
Add missing trait
2022-11-03 00:58:45 -04:00