DryrunRequest: msgpack decode error

Hello guys. I’m trying to run a DryrunRequest using the AlgoSDK and goal clerk. My objective is to debug a transaction group, so I collect the txns and logicsigs as follows:

 algosdk.assignGroupID(this.groupTx)
      const signedGroup = []

      const drtxns = []
      let i = 0
      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)
        drtxns.push({ txn: stxn.blob, lsig: lsig.lsig })
        signedGroup.push(stxn.blob)
      }

      const dr = new algosdk.modelsv2.DryrunRequest(({
        txns: drtxns,
        sources: undefined
      }))

      fs.writeFileSync('dump.dr', algosdk.encodeObj(dr.get_obj_for_encoding(true)))

The msgpack dump of the result file is :

{
  "txns": [
    {
      "lsig": {
        "arg": [
          "ACz6sN4/x/j8H907foM+UK1UO9zg7Rqo50mS2SngPLwTPm0P+Uexa4w/fayUQs4QivmuqUvw1toUOYLzwQzYs30AAVRQPSJxWPncwCQEkM9HHLltinVmE1hoyeDVst3z8b/qFHLGfQsPZh9otDhUJS3xFvBL+ZsIv1QJNS+a5ro6a6UBAmtC6m+KJsYJQ3xSP5LXKdKHOOYg7B9BYjaHOb+MKjUpLnX6Cqfuoxt/h7ZPKdblI4K0Z2LAlUQteTzeRmS86OkAA3gfbDojPgQdFJIdVPpGiU+HoanJVXnj9cUlDvpkJyxTFGsBlAwEa5aUunVH1rPn6BzdWBsUG7uox35ak3Ia0jsBBNY/jqWIOgN5dJjG2pfQTEUViit261lYsLsLTDi8IePcLeTB6JBDYsUPt0QaO6zly5H744tpK9Ge/kJc0RdmhbEABcxEKXME8xaVKuZZzlWObtEe6sKxYH/DjsKfjjphXibgWr9yk5XpqXPJ30zwNc9/TciLC33PUN8DmER0XSTsc/AA"
        ],
        "l:b64": "BSAGAQYAIEIUJgEAMQGB6AcORDEbgQMSRC0VMRY2GgIXiABWIQQLEkQxIDIDEkQxGIH+8emMAhJEMRA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/E+zY1ZxYymRUUVJcgK464vxr2oKO5/mUPA2fUp++YFaWT6hXTZZPwZDqq8BSbsEvmerhR3s0BAAAALxclQ4j////3AAAALu1z2QAAAAAAcNO0PwAAAAA3+qA9AAAAAA6eVVEAAAAAiUrxHAAAAAA3+qA9AAAAAA3abrgBAAAAAABhpf+ao3NuZMQgJlvzvxes4ourw0ERxV4y+WLyy5CTFSExiR3n4qb74fOkdHlwZaRhcHBs"
    },
    {
      "lsig": {
        "arg": [
          "DMFjNIXyBbOeJ7f4oAne8CyHG2YT3GhPXcjt1kLWsYjBFSFQ4lWZUfW7GshTqNtvs47ibBHROH3Bk5WIfiiV2EQADQXt2wcObnMWuooMip+3oqCXximRreBc7RwJLMsZZMFNKjHCmoJXAsfvY9EzDa6a1rQbEbSrx4jECq4zHQD08P0ADgpNpk1ppRfbTczrHFQeU6EkaCPweAhBYWPfrV6I3/EOcxVO8t6Azt5N5YSHla/Syyx+QfdH0QxJAqim5GGUexsAD+lfQXfPkB2BqRauBtcZaL/dqxqxdHCXwlG5t+U2TiG8CskePkZIjfeUmO6zyArGs6ALZJeR8Nj073Mzx722m+QAELYR8/waQYObYIxwRHHZulFJNFzlVGL5vzJ9lqU16F/9DvEKVlEno/QBaQJocQ6TO6JV14mhtF0Q8uz89m9/CjsBEdKznC3in5tXqjBKaNFrLiTkcA0Bcs4zteNyirMYWXydb8yMt/LiFNQnSww82ied5bbpqDFUOde//3jr1N9wF/cA"
        ],
        "l:b64": "BSAGAQYAIEIUJgEAMQGB6AcORDEbgQMSRC0VMRY2GgIXiABWIQQLEkQxIDIDEkQxGIH+8emMAhJEMRAjEkQyBDYaAheIACoSRC0xBTYaAYgAS0QiQzUCNQE0ATQCGCQTQAAGNAE0AgqJNAE0AgoiCIk1ADQAI4j/3Ik1BDUDNAQjGCQSQAAUNAM0BIj/4yIJDEAABTQEIxiJI4kjiTUHNQY1BSg18Cg18SQ1CiQ1CCQ1CTQINAUVDEEAXjQFNAgiWBc0CjEWIwsIEk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qgPQAAAAAOnlVRAAAAAIlK8RwAAAAAN/qgPQAAAAAN2m64AQAAAAAAYaX/mqNzbmTEICZb878XrOKLq8NBEcVeMvli8suQkxUhMYkd5+Km++HzpHR5cGWkYXBwbA=="
    }
  ]
}

But goal clerk will yell at me with:

root@47d99e4cfffc:~/testnetwork/Node# goal clerk dryrun-remote -D dump.dr
dryrun-remote: HTTP 400 Bad Request: {"message":"failed to decode object: msgpack decode error [pos 711]: only encoded map or array can be decoded into a struct"}

I’m missing something?

Also I must provide sources to be able to track execution in the dump, this is correct?

Thanks!

I think the transaction should be encoded differently

something like this:

    const signed = algosdk.signLogicSigTransaction(txn, acct)

    const decoded = algosdk.decodeSignedTransaction(signed['blob'])
    const encoded = {...decoded, txn: txn.get_obj_for_encoding()}

Ben

Now I got the TX dumped with msgpacktool as :

"txn": {
        "lsig": {
          "arg": [
            "EvOjfIUXBb3ni6j3GRVwqnd4hluRY2J7a0MPZDopMe/qUTj4Y1UmujvckGpuodArcliXQTB2DSlP2y3dSKtlflAB"
          ],
          "l:b64": "BSAGAQYAIEIUJgEAMQGB6AcORDEbgQMSRC0VMRY2GgIXiABWIQQLEkQxIDIDEkQxGIHKzYGNAhJEMRAjEkQyBDYaAheIACoSRC0xBTYaAYgAS0QiQzUCNQE0ATQCGCQTQAAGNAE0AgqJNAE0AgoiCIk1ADQAI4j/3Ik1BDUDNAQjGCQSQAAUNAM0BIj/4yIJDEAABTQEIxiJI4kjiTUHNQY1BSg18Cg18SQ1CiQ1CCQ1CTQINAUVDEEAXjQFNAgiWBc0CjEWIwsIEkQ0BgI0BTQIgUEIIlgXNAU0CCIIJVg0BTQIgSEIJVgHADXxNfA0BzQJIQVYNPA08VACgQwlUhJENAghBAg1CDQJIQUINQk0CiIINQpC/5kiiQ=="
        },
        "txn": {
          "apaa": [
            "dmVyaWZ5",
            "K8KxIEWZ1MoNTd5KZYpCxN0TEDo=",
            "AAAAAAAAABM="
          ],
          "apid": 564160202,
          "fee": 1000,
          "fv": 14873665,
          "gen": "betanet-v1.0",
          "gh:b64": "mFgazF+2uRS1tMiL9dsj01hJGySEmPN28B/TjjvpVW0=",
          "grp:b64": "+hvy/BQx6zqtnvN9f01o2Q9CrDw/Z1Twsb5QW8cAeZo=",
          "lv": 14874665,
          "note:b64": "AAAAAQAAAAEAATr9qEHB9D3X1UbIpYG6H5KhOfQTP59qsJVVj2o1nfXUAAAAAAAAAAAAMldIAAEBIwq/4Ow7RgvVX8T7NjVnFjKZFRRUlyArjri/Gvago7n+ZQ8DZ9Sn75gVpZPqFdNlk/BkOqrwFJuwS+Z6uFHezQEAAAAvFyVDiP////cAAAAu7XPZAAAAAABw07Q/AAAAADf6oD0AAAAADp5VUQAAAACJSvEcAAAAADf6oD0AAAAADdpuuAEAAAAAAGGl/5o=",
          "snd:b64": "O3ppnNWuQyMAg7qGOMV6dZL1HtMKHohuDVxQze5XhdE=",
          "type": "appl"
        }
      }

But still no luck.

I didnt found the required encoding type in the documentation section Smart contract debugging - Algorand Developer Portal

Thanks.

When I create a dryrun I get an element in the dump object named "txns":[...]" but I also have the other fields set

    const dr = await algosdk.createDryrun({
        client: client,
        txns: [
            algosdk.decodeSignedTransaction(othersigned['blob']),
            algosdk.decodeSignedTransaction(signed['blob'])
        ]
    })

    fs.writeFileSync('dump.dr', algosdk.encodeObj(dr.get_obj_for_encoding(true)))

requires this pr:

but you can recreate without it

1 Like

Thanks @Ben, using your dev branch createDryrun function gives a much more detailed dump, that’s great.

But goal clerk still cries :cry:

Result dump:

Fixed with your code, using array of sources as:

      const dr = await algosdk.createDryrun({
        client: algodClient,
        txns: drtxns,
        sources: [new algosdk.modelsv2.DryrunSource('lsig', fs.readFileSync(vaaVerifyStatelessProgramFilename).toString('utf8'))]
      })

This needs to be in SDK 1.13, as it allows to do dryruns in a straightforward manner.

It should be noted also that current documentation does not seem to give valid indications on how to do this on current (<=1.12) SDKs.

As a follow up, my on-chain SendRawTransaction triggers the execution of the stateless code that signs the group transactions, but the dryrun dump does not seem to care (only executes stateful code, ignoring stateless check).

I’m checking this now.

Looking at go-algorand/clerk.go at 116c06e00ad4f0dfa0c22577b733d8b0d933be0a · algorand/go-algorand · GitHub, seems that goal clerk dryrun command evaluates logic if it’s present.