Luke Parker
977dcad86d
Test the Router rejects invalid signatures
2025-01-24 07:22:43 -05:00
Luke Parker
cefc542744
Test SeraiKeyWasNone
2025-01-24 06:58:54 -05:00
Luke Parker
164fe9a14f
Test Router's InvalidSeraiKey error
2025-01-24 06:41:24 -05:00
Luke Parker
f948881eba
Simplify async code in in_instructions_unordered
...
Outsources fetching the ERC20 events to top_level_transfers_unordered.
2025-01-24 05:43:04 -05:00
Luke Parker
201b675031
Test ERC20 InInstructions
2025-01-24 03:45:04 -05:00
Luke Parker
3d44766eff
Add ERC20 InInstruction test
2025-01-24 03:23:58 -05:00
Luke Parker
a63a86ba79
Test Ether InInstructions
2025-01-23 09:30:54 -05:00
Luke Parker
e922264ebf
Add selector collisions to the IERC20 lib
2025-01-23 08:25:59 -05:00
Luke Parker
7e53eff642
Fix the async flow with the Router
...
It had sequential async calls with complexity O(n), with a variety of redundant
calls. There was also a constant of... 4? 5? for each item. Now, the total
sequence depth is just 3-4.
2025-01-23 06:16:58 -05:00
Luke Parker
669b8b776b
Work on testing the Router
...
Completes the `Executed` enum in the router. Adds an `Escape` struct. Both are
needed for testing purposes.
Documents the gas constants in intent and reasoning.
Adds modernized tests around key rotation and the escape hatch.
Also updates the rest of the codebase which had accumulated errors.
2025-01-23 02:06:06 -05:00
Luke Parker
6508957cbc
Make a proper nonReentrant modifier
...
A transaction couldn't call execute twice within a single TX prior. Now, it
can.
Also adds a bit more context to the escape hatch events/errors.
2025-01-23 00:04:44 -05:00
Luke Parker
373e794d2c
Check the escaped to address has code set
...
Document choice not to use a confirmation flow there as well.
2025-01-22 22:45:51 -05:00
Luke Parker
c8f3a32fdf
Replace custom read/write impls in router with borsh
2025-01-21 03:49:29 -05:00
Luke Parker
f690bf831f
Remove old code still marked TODO
2025-01-19 02:36:34 -05:00
Luke Parker
0b30ac175e
Restore workspace-wide clippy
...
Fixes accumulated errors in the Substrate code. Modifies the runtime build to
work with a modern clippy. Removes e2e tests from the workspace.
2025-01-19 02:27:35 -05:00
Luke Parker
47560fa9a9
Test manually implemented serializations in the Router lib
2025-01-19 00:45:26 -05:00
Luke Parker
9d57c4eb4d
Downscope dependencies in serai-processor-ethereum-primitives, const-hex decode bytecode in ethereum-schnorr-contract
2025-01-19 00:16:50 -05:00
Luke Parker
642ba00952
Update Deployer README, 80-character line length
2025-01-19 00:03:56 -05:00
Luke Parker
3c9c12d320
Test the Deployer contract
2025-01-18 23:58:38 -05:00
Luke Parker
f6b52b3fd3
Maximum line length of 80 in Deployer.sol
2025-01-18 15:22:58 -05:00
Luke Parker
0d906363a0
Simplify and test deterministically_sign
2025-01-18 15:13:39 -05:00
Luke Parker
8222ce78d8
Correct accumulated errors in the processor
2025-01-18 12:41:57 -05:00
Luke Parker
cb906242e7
2025 nightly
...
Supersedes #640 .
2025-01-18 12:41:25 -05:00
Luke Parker
2a19e9da93
Update to libp2p 0.54
...
This is the same libp2p Substrate uses as of
https://github.com/paritytech/polkadot-sdk/pull/6248 .
2025-01-17 04:50:15 -05:00
Luke Parker
2226dd59cc
Comment all dependencies in substrate/node
...
Causes the Cargo.lock to no longer include the substrate dependencies
(including its copy of libp2p).
2025-01-17 04:09:27 -05:00
Luke Parker
be2098d2e1
Remove Serai from the ConfirmDkgTask
2025-01-15 21:00:50 -05:00
Luke Parker
6b41f32371
Correct handling of InvalidNonce within the coordinator
2025-01-15 20:48:54 -05:00
Luke Parker
19b87c7f5a
Add the DKG confirmation flow
...
Finishes the coordinator redo
2025-01-15 20:29:57 -05:00
Luke Parker
505f1b20a4
Correct re-attempts for the DKG Confirmation protocol
...
Also spawns the SetKeys task.
2025-01-15 17:49:41 -05:00
Luke Parker
8b52b921f3
Have the Tributary scanner yield DKG confirmation signing protocol data
2025-01-15 15:16:30 -05:00
Luke Parker
f36bbcba25
Flatten the map of preprocesses/shares, send Participant index with DkgParticipation
2025-01-15 14:24:51 -05:00
Luke Parker
167826aa88
Implement SeraiAddress <-> Participant mapping and add RemoveParticipant transactions
2025-01-15 12:51:35 -05:00
Luke Parker
bea4f92b7a
Fix parity-db builds for the Coordinator
2025-01-15 12:10:11 -05:00
Luke Parker
7312fa8d3c
Spawn PublishSlashReportTask
...
Updates it so that it'll try for every network instead of returning after any
network fails.
Uses the SlashReport type throughout the codebase.
2025-01-15 12:08:28 -05:00
Luke Parker
92a4cceeeb
Spawn PublishBatchTask
...
Also removes the expectation Batches published via it are sent in an ordered
fashion. That won't be true if the signing protocols complete out-of-order (as
possible when we are signing them in parallel).
2025-01-15 11:21:55 -05:00
Luke Parker
3357181fe2
Handle sign::ProcessorMessage::[Preprocesses, Shares]
2025-01-15 10:47:47 -05:00
Luke Parker
7ce5bdad44
Don't add transactions for topics which have yet to be recognized
2025-01-15 07:01:24 -05:00
Luke Parker
0de3fda921
Further space out requests for cosigns from the network
2025-01-15 05:59:56 -05:00
Luke Parker
cb410cc4e0
Correct how we handle rounding errors within the penalty fn
...
We explicitly no longer slash stakes but we still set the maximum slash to the
allocated stake + the rewards. Now, the reward slash is bound to the rewards
and the stake slash is bound to the stake. This prevents an improperly rounded
reward slash from effecting a stake slash.
2025-01-15 02:46:31 -05:00
Luke Parker
6c145a5ec3
Disable offline, disruptive slashes
...
Reasoning commented in codebase
2025-01-14 11:44:13 -05:00
Luke Parker
a7fef2ba7a
Redesign Slash/SlashReport types with a function to calculate the penalty
2025-01-14 07:51:39 -05:00
Luke Parker
291ebf5e24
Have serai-task warnings print with the name of the task
2025-01-14 02:52:26 -05:00
Luke Parker
5e0e91c85d
Add tasks to publish data onto Serai
2025-01-14 01:58:26 -05:00
Luke Parker
b5a6b0693e
Add a proper error type to ContinuallyRan
...
This isn't necessary. Because we just log the error, we never match off of it,
we don't need any structure beyond String (or now Debug, which still gives us
a way to print the error). This is for the ergonomics of not having to
constantly write `.map_err(|e| format!("{e:?}"))`.
2025-01-12 18:29:08 -05:00
Luke Parker
3cc2abfedc
Add a task to publish slash reports
2025-01-12 17:47:48 -05:00
Luke Parker
0ce9aad9b2
Add flow to add transactions onto Tributaries
2025-01-12 07:32:45 -05:00
Luke Parker
e35aa04afb
Start handling messages from the processor
...
Does route ProcessorMessage::CosignedBlock. Rest are stubbed with TODO.
2025-01-12 06:07:55 -05:00
Luke Parker
e7de5125a2
Have processor-messages use CosignIntent/SignedCosign, not the historic cosign format
...
Has yet to update the processor accordingly.
2025-01-12 05:52:33 -05:00
Luke Parker
158140c3a7
Add a proper error for intake_cosign
2025-01-12 05:49:17 -05:00
Luke Parker
df9a9adaa8
Remove direct dependencies of void, async-trait
2025-01-12 03:48:43 -05:00