Commit Graph

484 Commits

Author SHA1 Message Date
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
e8df74e295 Merge branch 'develop' into tendermint 2022-10-21 22:02:45 -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
4bfc8d7954 Reduce chain_spec and use more accurate naming 2022-10-21 21:14:33 -04:00
Luke Parker
422f7e3e2f Replace panicking todos with stubs and // TODO
Enables progress.
2022-10-21 21:14:05 -04:00
Luke Parker
5019f4cb65 Remove unused macro_use 2022-10-21 06:00:18 -04:00
Luke Parker
802f87385c Remove substrate/node lib.rs
This shouldn't be used as a library AFAIK. While runtime should be, and 
arguably should even be published, I have yet to see node in the same 
way. Helps tighten API boundaries.
2022-10-21 05:56:53 -04:00
Luke Parker
0218db0084 Update SelectChain documentation 2022-10-21 05:53:15 -04:00
Luke Parker
0a58d66958 Minor tweaks 2022-10-21 05:35:37 -04:00
Luke Parker
f1532356a0 Merge branch 'develop' into tendermint 2022-10-21 05:33:42 -04:00
Luke Parker
c7f8258e0c Cherry-pick 28308dfe85387fe54c14076089a40c5af1f1b8f7 2022-10-21 05:32:38 -04:00
Luke Parker
b8bff6501e Move the node over to the new SelectChain 2022-10-21 05:29:01 -04:00
Luke Parker
123b8ad11b Tendermint SelectChain
This is incompatible with Substrate's expectations, yet should be valid 
for ours
2022-10-21 05:28:26 -04:00
Luke Parker
fcb9148fc9 Merge branch 'develop' into tendermint 2022-10-21 03:17:21 -04:00
Luke Parker
976948e9d9 Update Cargo.tomls for substrate packages 2022-10-21 03:17:02 -04:00
Luke Parker
c0432e122c Update consensus/lib.rs from PoW to Tendermint
Not possible to be used as the previous consensus could. It will not
produce blocks nor does it currenly even instantiate a machine. This is
just he next step.
2022-10-21 02:38:06 -04:00
Luke Parker
3b08633445 BlockImport, JustificationImport, Verifier, and import_queue function 2022-10-21 02:18:51 -04:00
Luke Parker
bdd0b42419 Move logic into TendermintImport itself
Multiple traits exist to verify/handle blocks. I'm unsure exactly when 
each will be called in the pipeline, so the easiest solution is to have 
every step run every check.

That would be extremely computationally expensive if we ran EVERY check, 
yet we rely on Substrate for execution (and according checks), which are 
limited to just the actual import function.

Since we're calling this code from many places, it makes sense for it to 
be consolidated under TendermintImport.
2022-10-21 02:17:40 -04:00
Luke Parker
56afb13ed5 Move documentation to the top of the file 2022-10-21 02:14:48 -04:00
Luke Parker
2cf1573c52 Dummy Weights 2022-10-21 02:13:44 -04:00
Luke Parker
21fd56d4d3 Remove extraneous clone 2022-10-21 01:08:15 -05:00
Luke Parker
5c46edbe98 Implement tendermint_machine::Block for Substrate Blocks
Unfortunately, this immediately makes Tendermint machine capable of 
deployment as  crate since it uses a git reference. In the future, a 
Cargo.toml patch section for serai/substrate should be investigated. 
This is being done regardless as it's the quickest way forward and this 
is for Serai.
2022-10-21 02:06:48 -04:00
Luke Parker
280683142a Rename import to import_queue 2022-10-20 04:28:26 -04:00
Luke Parker
49a26e5841 Properly use check_block 2022-10-20 04:27:53 -04:00
Luke Parker
eb59dd5a55 Initial work on an import queue 2022-10-20 03:50:06 -04:00
Luke Parker
975c9d7456 Map TM SignatureScheme to Substrate's sr25519 2022-10-20 03:46:09 -04:00
Luke Parker
9db42f7d83 Minor SignatureScheme API changes 2022-10-20 03:40:46 -04:00
Luke Parker
3c6ea6e55d Replace MultiSignature with sr25519::Signature 2022-10-20 03:40:16 -04:00
Luke Parker
cc8284ad40 Merge branch 'develop' into tendermint 2022-10-20 01:34:59 -04:00
Luke Parker
f6bbc6c89e Correct weight code 2022-10-20 01:27:35 -04:00
Luke Parker
6c996fb3cd Update substrate
Also removes the patch for zip since a new release was issued.

Closes https://github.com/serai-dex/serai/issues/81.

Contracts RPC purged as according to 
https://github.com/paritytech/substrate/pull/12358.
2022-10-20 01:05:36 -04:00
Luke Parker
ff41e9f031 Correct timing issues
1) Commit didn't include the round, leaving the clock in question.

2) Machines started with a local time, instead of a proper start time.

3) Machines immediately started the next block instead of waiting for 
the block time.
2022-10-20 00:21:14 -04:00
Luke Parker
6b56510da9 Remove async recursion
Greatly increases safety as well by ensuring only one message is 
processed at once.
2022-10-17 12:04:59 -04:00
Luke Parker
8b6eb1172f Litany of bug fixes
Also attempts to make the code more readable while updating/correcting 
documentation.
2022-10-17 10:37:30 -04:00
Luke Parker
5724f52816 Sign the ID directly instead of its SCALE encoding
For a hash, which is fixed-size, these should be the same yet this helps 
move past the dependency on SCALE. It also, for any type where the two 
values are different, smooths integration.
2022-10-17 08:16:01 -04:00
Luke Parker
f28d412f78 Document tendermint 2022-10-17 08:07:23 -04:00
Luke Parker
0501ff259e Tidy README 2022-10-17 03:15:22 -04:00
Luke Parker
6155d12160 Dedicated Commit object
Restores sig aggregation API.
2022-10-17 03:15:13 -04:00
Luke Parker
b993ff1cc8 Provide a dedicated signature in Precommit of just the block hash
Greatly simplifies verifying when syncing.
2022-10-17 02:32:45 -04:00
Luke Parker
ec7d8ac67b Remove coin crate
Effective reversion of past few commits by request.
2022-10-16 13:11:32 -04:00
Luke Parker
1c71e25234 Make the infinite test non-infinite 2022-10-16 10:25:36 -04:00
Luke Parker
329a48c19d Implement usage of the signature scheme 2022-10-16 10:20:29 -04:00
Luke Parker
987aa5189a Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde 
doesn't natively support borsh, nor SCALE, and while there is a serde 
SCALE crate, it's old. While it may be complete, it's not worth working 
with.

While we could still grab bincode, and a variety of other formats, it 
wasn't worth it to go custom and for Serai, we'll be using SCALE almost 
everywhere anyways.
2022-10-16 10:06:27 -04:00
Luke Parker
85962c00a9 Define a signature scheme trait 2022-10-16 09:42:33 -04:00
Luke Parker
a0bc9dc3e5 Misc cleanup 2022-10-16 09:16:44 -04:00
Luke Parker
c53c15fd95 Finish timeouts 2022-10-16 09:09:14 -04:00
Luke Parker
3b2352baed Fix test 2022-10-16 09:09:05 -04:00
Luke Parker
5ce06cf1b7 Update lib.rs 2022-10-16 07:47:08 -05:00