I have been able to run successfully stateless logic checks in a transaction group using goal, as follows:
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK064" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify0.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK164" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify1.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK264" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify2.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK364" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify3.txn
cat verify0.txn verify1.txn verify2.txn verify3.txn > verifycc.txn
goal clerk group -i verifycc.txn -o group.txn
goal clerk split -i group.txn -o verify-signed
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES064" --infile verify-signed-0 --outfile verify-signed-0
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES164" --infile verify-signed-1 --outfile verify-signed-1
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES264" --infile verify-signed-2 --outfile verify-signed-2
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES364" --infile verify-signed-3 --outfile verify-signed-3
cat verify-signed-0 verify-signed-1 verify-signed-2 verify-signed-3 > verifygroup.stxn
goal clerk dryrun -t verifygroup.stxn --dryrun-dump --outfile verifygroup.dump
goal clerk dryrun-remote -D verifygroup.dump --verbose
Now I have a signed transaction group that is failing on the stateless check during test automation. I want to trigger a dryrun of the group in the same manner, so I store the signed group in a file:
algosdk.assignGroupID(this.groupTx)
for (const tx of this.groupTx) {
console.log('signing: ' + tx.txID())
const lsig = new algosdk.LogicSigAccount(programBytes, [Buffer.from(sigSubsets[i++], 'hex')])
const stxn = algosdk.signLogicSigTransaction(tx, lsig)
signedGroup.push(stxn.blob)
}
fs.unlinkSync('signedgroup.stxn')
for (let i = 0; i < signedGroup.length; ++i) {
fs.appendFileSync('signedgroup.stxn', signedGroup[i])
}
and trigger the dryrun in the same manner from the CLI, but it does not evaluate the stateless code, just passes through stateful successfully:
root@47d99e4cfffc:~/testnetwork/Node# goal clerk dryrun -t signedgroup.stxn --dryrun-dump --outfile verifygroup.dump
root@47d99e4cfffc:~/testnetwork/Node# goal clerk dryrun-remote -D verifygroup.dump
tx[0] cost: 270
tx[0] messages:
ApprovalProgram
PASS
tx[1] cost: 270
tx[1] messages:
ApprovalProgram
PASS
tx[2] cost: 270
tx[2] messages:
ApprovalProgram
PASS
tx[3] cost: 263
tx[3] messages:
ApprovalProgram
PASS
What could I be missing?
thanks.