-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement transaction balancing (prototype) #19
base: main
Are you sure you want to change the base?
Conversation
The purpose of last commit is to clarify/exemplify the requirements of task Implement transaction balancing algorithm. Also, we want clarify whether cardano-cli's command With modifications in last commit, automatic balancing depending on inputs is already achieved in the context of the plonk verifier example. Besides the transaction to be balanced, the inputs are as follows:
I guess that, for tokenname, we would want to use a generic example so as to avoid computation of input. |
Shell script |
Relevant directory is |
Note that mempty {acOutput = V.empty} :: ArithmeticCircuit Fr (Vector 1) (Vector 0) |
To test cabal run bench-emptycircuit (Active directory is irrelevant.) |
Follow instructions in README. Terminal output: antonio:e2e-test$ ./symbolic-balancing/02-balancing-parse-input.sh
Input UTxO from Alice:
Right [TxInInfo {txInInfoOutRef = TxOutRef {txOutRefId = 3070244ef4b70034b0813b0b2f07efe1b67f50c2dc0be21d5051ff23e24c47e1, txOutRefIdx = 1}, txInInfoResolved = TxOut {txOutAddress = Address {addressCredential = PubKeyCredential 1f82ba7c394aeb23bf09ad26d85c2c4d3f808e98f4bcfffa198f7e68, addressStakingCredential = Nothing}, txOutValue = Value {getValue = Map {unMap = [(,Map {unMap = [("",975033708)]})]}}, txOutDatum = NoOutputDatum, txOutReferenceScript = Nothing}}]
Input UTxO from SymbolicVerifier:
Right [TxInInfo {txInInfoOutRef = TxOutRef {txOutRefId = 3070244ef4b70034b0813b0b2f07efe1b67f50c2dc0be21d5051ff23e24c47e1, txOutRefIdx = 0}, txInInfoResolved = TxOut {txOutAddress = Address {addressCredential = ScriptCredential bd14d681443a1edf890c296c488c35c8ef25de5cd85e3f3add385e82, addressStakingCredential = Nothing}, txOutValue = Value {getValue = Map {unMap = [(,Map {unMap = [("",10000000)]})]}}, txOutDatum = OutputDatum (Datum {getDatum = Constr 0 []}), txOutReferenceScript = Nothing}}]
Data:
List [Constr 0 [Constr 0 [B "0p$N\244\183\NUL4\176\129;\v/\a\239\225\182\DELP\194\220\v\226\GSPQ\255#\226LG\225",I 1],Constr 0 [Constr 0 [Constr 0 [B "\US\130\186|9J\235#\191\t\173&\216\\,M?\128\142\152\244\188\255\250\EM\143~h"],Constr 1 []],Map [(B "",Map [(B "",I 975033708)])],Constr 0 [],Constr 1 []]],Constr 0 [Constr 0 [B "0p$N\244\183\NUL4\176\129;\v/\a\239\225\182\DELP\194\220\v\226\GSPQ\255#\226LG\225",I 0],Constr 0 [Constr 0 [Constr 1 [B "\189\DC4\214\129D:\RS\223\137\f)lH\140\&5\200\239%\222\\\216^?:\221\&8^\130"],Constr 1 []],Map [(B "",Map [(B "",I 10000000)])],Constr 2 [Constr 0 []],Constr 1 []]]]
Serialised data:
"\159\216y\159\216y\159X 0p$N\244\183\NUL4\176\129;\v/\a\239\225\182\DELP\194\220\v\226\GSPQ\255#\226LG\225\SOH\255\216y\159\216y\159\216y\159X\FS\US\130\186|9J\235#\191\t\173&\216\\,M?\128\142\152\244\188\255\250\EM\143~h\255\216z\128\255\161@\161@\SUB:\GS\213l\216y\128\216z\128\255\255\216y\159\216y\159X 0p$N\244\183\NUL4\176\129;\v/\a\239\225\182\DELP\194\220\v\226\GSPQ\255#\226LG\225\NUL\255\216y\159\216y\159\216z\159X\FS\189\DC4\214\129D:\RS\223\137\f)lH\140\&5\200\239%\222\\\216^?:\221\&8^\130\255\216z\128\255\161@\161@\SUB\NUL\152\150\128\216{\159\216y\128\255\216z\128\255\255\255"
Verifier's input: F 21353937139332672587613110998586736437186355074714830484134924746314
Generating proof...
Retrieving funds from Symbolic [exec units]...
Estimated transaction fee: Coin 653377 |
Balancing prototype, with validator |
Objective: implement transaction balancing algorithm.