-
Notifications
You must be signed in to change notification settings - Fork 15
Transaction Generator
Generating a transaction is selecting inputs (UTxO), outputs, and amounts to transfer. (+ digitally signed)
The input selection is only valid on the set of unspent transaction outputs (UTxO). The transaction will create new UTxO that can be reused in future transactions. Some amount will be spent for the transaction costs and will reduce the available coins in the UTxO. (can we control tx costs? or set to zero?)
We receive (at least) 3 signing keys from CLI argument --sig-key
. These keys will be used to create 3 addresses:
-
genesisAddress
- an address we send an initial (genesis) funds to. This is the very first transaction. -
sourceAddress
- an address we use as a source for all further transactions. -
recepientAddress
- an address we use as a recipient for all further transactions.
Genesis UTxO is generated from genesis signing key, in extractGenesisFunds
function. Currently it's 1.4 billion ADA. Then we prepare initial funds using prepareInitialFunds
function: we perform the very first transaction to move all initial funds from genesisAddress
to sourceAddress
.
Since sourceAddress
(after initial transaction) contains all genesis funds, we have one single UTxO entry with 1.4 billion ADA. Now we have to split this amount to required number of UTxO entries, i.e.:
1 UTxO entry (
sourceAddress
and amountX
) ->N
UTxO entries (sourceAddress
and amountX/N
).
So we perform N
splitting transactions in createMoreFundCoins
function.
describe input selection
describe transaction logic to create new UTxO
describe how the TPS is controlled to a set level
describe configuration parameters