-
Notifications
You must be signed in to change notification settings - Fork 224
The life of a Transaction
elsirion edited this page Jul 11, 2022
·
2 revisions
- A
Transaction
Consists of inputs and outputs- Each input and output belongs to a certain module (e.g. Mint, Wallet, …)
- All inputs have to add up to the same sum as all outputs
- Also contains a signature
- Each input has an associated secret/public key pair
- The signature is a MuSig2 multi signature with all these input keys signing the entire transaction
pub struct Transaction {
pub inputs: Vec<Input>,
pub outputs: Vec<Output>,
pub signature: Option<schnorr::Signature>,
}
…
pub enum Input {
Mint(<minimint_mint::Mint as FederationModule>::TxInput),
Wallet(<minimint_wallet::Wallet as FederationModule>::TxInput),
LN(<minimint_ln::LightningModule as FederationModule>::TxInput),
}
- One client module for each federation module
- There are specialized user and gateway clients that use these to construct transactions
- E.g. deposit
- Submit transaction, first validation
- Save to DB
- Generate consensus proposal with all transactions submitted in the meantime
- Propose to HBBFT
- Process all transactions that were agreed on
- Each input and output are processed by its respective module, e.g. for the Mint module
- Some operations need a second round to submit signature shares, they are submitted via per-module consensus items (see also Generate consensus proposal)
- These are also processed by their respective module