Luke Parker
ada94e8c5d
Get all processors to compile again
...
Requires splitting `serai-cosign` into `serai-cosign` and `serai-cosign-types`
so the processor don't require `serai-client/serai` (not correct yet).
2025-09-02 02:17:10 -04: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
673cf8fd47
Pass the latest active key to the Block's scan function
...
Effectively necessary for networks on which we utilize account abstraction in
order to know what key to associate the received coins with.
2024-09-19 23:36:32 -07:00
Luke Parker
e1ad897f7e
Allow scheduler's creation of transactions to be async and error
...
I don't love this, but it's the only way to select decoys without using a local
database. While the prior commit added such a databse, the performance of it
presumably wasn't viable, and while TODOs marked the needed improvements, it
was still messy with an immense scope re: any auditing.
The relevant scheduler functions now take `&self` (intentional, as all
mutations should be via the `&mut impl DbTxn` passed). The calls to `&self` are
expected to be completely deterministic (as usual).
2024-09-19 23:36:32 -07:00
Luke Parker
e78236276a
Remove async-trait from processor/
...
Part of https://github.com/serai-dex/issues/607 .
2024-09-19 23:36:32 -07:00
Luke Parker
e36b671f37
Remove bound that WINDOW_LENGTH < CONFIRMATIONS
...
It's unnecessary and not valuable.
2024-09-19 23:36:32 -07:00
Luke Parker
f07ec7bee0
Route the coordinator, fix race conditions in the signers library
2024-09-19 23:36:32 -07:00
Luke Parker
a353f9e2da
Further work on transaction signing
2024-09-19 23:36:32 -07:00
Luke Parker
0c1aec29bb
Finish routing output flushing
...
Completes the transaction-chaining scheduler.
2024-09-19 23:36:32 -07:00
Luke Parker
653ead1e8c
Finish the tree logic in the transaction-chaining scheduler
...
Also completes the DB functions, makes Scheduler never instantiated, and
ensures tree roots have change outputs.
2024-09-19 23:36:32 -07:00
Luke Parker
3c787e005f
Fix bug in the scanner regarding forwarded output amounts
...
We'd report the amount originally received, minus 2x the cost to aggregate,
regardless the amount successfully forwarded. We should've reduced to the
amount successfully forwarded, if it was smaller, in case the cost to
forward exceeded the aggregation cost.
2024-09-19 23:36:32 -07:00
Luke Parker
f11a6b4ff1
Better document the forwarded output flow
2024-09-19 23:36:32 -07:00
Luke Parker
c88ebe985e
Outline of the transaction-chaining scheduler
2024-09-19 23:36:32 -07:00
Luke Parker
6deb60513c
Expand primitives/scanner with niceties needed for the scheduler
2024-09-19 23:36:32 -07:00
Luke Parker
5999f5d65a
Route the DB w.r.t. forwarded outputs' information
2024-09-19 23:36:32 -07:00
Luke Parker
e26da1ec34
Have the Eventuality task drop outputs which aren't ours and aren't worth it to aggregate
...
We could drop these entirely, yet there's some degree of utility to be able to
add coins to Serai in this manner.
2024-09-19 23:36:32 -07:00
Luke Parker
7266e7f7ea
Add note on why LifetimeStage is monotonic
2024-09-19 23:36:32 -07:00
Luke Parker
a8b9b7bad3
Add sanity checks we haven't prior reported an InInstruction for/accumulated an output
2024-09-19 23:36:32 -07:00
Luke Parker
2ca7fccb08
Pass the lifetime information to the scheduler
...
Enables it to decide which keys to use for fulfillment/change.
2024-09-19 23:36:32 -07:00
Luke Parker
4f6d91037e
Call flush_key
2024-09-19 23:36:32 -07:00
Luke Parker
8db76ed67c
Add key management to the scheduler
2024-09-19 23:36:32 -07:00
Luke Parker
920303e1b4
Add helper to intake Eventualities
2024-09-19 23:36:32 -07:00
Luke Parker
f9d02d43c2
Route burns through the scanner
2024-09-19 23:36:32 -07:00
Luke Parker
04a971a024
Fill in various DB functions
2024-09-19 23:36:32 -07:00
Luke Parker
65f3f48517
Add ReportDb
2024-09-19 23:36:32 -07:00
Luke Parker
fdfe520f9d
Add ScanDb
2024-09-19 23:36:32 -07:00
Luke Parker
7c1025dbcb
Implement key retiry
2024-09-19 23:36:32 -07:00
Luke Parker
a771fbe1c6
Logs, documentation, misc
2024-09-19 23:36:32 -07:00
Luke Parker
9cebdf7c68
Add sorts for safety even upon non-determinism
2024-09-19 23:36:32 -07:00
Luke Parker
6196642beb
Add a DbChannel between scan and eventuality task
2024-09-19 23:36:32 -07:00
Luke Parker
9ab8ba0215
Add dedicated Eventuality DB and stub missing fns
2024-09-19 23:36:32 -07:00
Luke Parker
33e0c85f34
Make Eventuality a folder, not a file
2024-09-19 23:36:32 -07:00