From 7df4d59d2fb97c34ddd06d40ef06d232f93a65ee Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Tue, 17 Sep 2024 16:48:29 -0400 Subject: [PATCH] more tracing and leave json files --- ocaml.json | 126 ++++++ src/bindings | 2 +- src/mina-signer/src/sign-zkapp-command.ts | 2 +- ts.json | 446 ++++++++++++++++++++++ 4 files changed, 574 insertions(+), 2 deletions(-) create mode 100644 ocaml.json create mode 100644 ts.json diff --git a/ocaml.json b/ocaml.json new file mode 100644 index 000000000..36fa6d6e9 --- /dev/null +++ b/ocaml.json @@ -0,0 +1,126 @@ +{ + "body": { + "publicKey": "B62qpEtMBf5ZRFoLej1DUkBuMNGtoEBwBiUiy6xHXSuX2mHwryxi7ro", + "tokenId": "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf", + "update": { + "appState": [ + null, + null, + null, + null, + null, + null, + null, + null + ], + "delegate": null, + "verificationKey": null, + "permissions": null, + "zkappUri": null, + "tokenSymbol": null, + "timing": null, + "votingFor": null + }, + "balanceChange": { + "magnitude": "44584", + "sgn": "Negative" + }, + "incrementNonce": true, + "events": [], + "actions": [], + "callData": "0", + "callDepth": 0, + "preconditions": { + "network": { + "snarkedLedgerHash": null, + "blockchainLength": null, + "minWindowDensity": null, + "totalCurrency": null, + "globalSlotSinceGenesis": { + "lower": "0", + "upper": "3" + }, + "stakingEpochData": { + "ledger": { + "hash": null, + "totalCurrency": null + }, + "seed": null, + "startCheckpoint": null, + "lockCheckpoint": null, + "epochLength": null + }, + "nextEpochData": { + "ledger": { + "hash": null, + "totalCurrency": null + }, + "seed": null, + "startCheckpoint": null, + "lockCheckpoint": null, + "epochLength": null + } + }, + "account": { + "balance": null, + "nonce": { + "lower": "33961154", + "upper": "33961154" + }, + "receiptChainHash": null, + "delegate": null, + "state": [ + null, + null, + null, + null, + null, + null, + null, + null + ], + "actionState": null, + "provedState": null, + "isNew": null + }, + "test": { + "balance": null, + "nonce": { + "lower": "33961154", + "upper": "33961154" + }, + "receiptChainHash": null, + "delegate": null, + "state": [ + null, + null, + null, + null, + null, + null, + null, + null + ], + "actionState": null, + "provedState": null, + "isNew": null + }, + "validWhile": null + }, + "useFullCommitment": true, + "implicitAccountCreationFee": true, + "mayUseToken": { + "parentsOwnToken": false, + "inheritFromParent": false + }, + "authorizationKind": { + "isSigned": true, + "isProved": false, + "verificationKeyHash": "3392518251768960475377392625298437850623664973002200885669375116181514017494" + } + }, + "authorization": { + "proof": null, + "signature": "7mWxjLYgbJUkZNcGouvhVj5tJ8yu9hoexb9ntvPK8t5LHqzmrL6QJjjKtf5SgmxB4QWkDw7qoMMbbNGtHVpsbJHPyTy2EzRQ" + } +} diff --git a/src/bindings b/src/bindings index 492c76a3f..f373142fe 160000 --- a/src/bindings +++ b/src/bindings @@ -1 +1 @@ -Subproject commit 492c76a3f132f0f53ac864c0381a8411c0d5f3d1 +Subproject commit f373142feaf2e2682237e09a5ff1dec3d0fad7d5 diff --git a/src/mina-signer/src/sign-zkapp-command.ts b/src/mina-signer/src/sign-zkapp-command.ts index 873dd295c..8f93030cf 100644 --- a/src/mina-signer/src/sign-zkapp-command.ts +++ b/src/mina-signer/src/sign-zkapp-command.ts @@ -229,7 +229,7 @@ function feePayerHash(feePayer: FeePayer, networkId: NetworkId) { console.log("FEE PAYER HASH RUNS") let accountUpdate = accountUpdateFromFeePayer(feePayer); console.log("update") - console.log(accountUpdate) + console.log(JSON.stringify(accountUpdate)) let ah = accountUpdateHash(accountUpdate, networkId); console.log(ah) return ah diff --git a/ts.json b/ts.json new file mode 100644 index 000000000..54afa2297 --- /dev/null +++ b/ts.json @@ -0,0 +1,446 @@ +{ + "body": { + "publicKey": { + "x": "12548421949525892419826266076306153498868522463075209071075324596655970361516", + "isOdd": true + }, + "tokenId": "1", + "update": { + "appState": [ + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + } + ], + "delegate": { + "isSome": false, + "value": { + "x": "0", + "isOdd": false + } + }, + "verificationKey": { + "isSome": false, + "value": { + "data": "", + "hash": "0" + } + }, + "permissions": { + "isSome": false, + "value": { + "editState": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "access": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "send": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "receive": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setDelegate": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setPermissions": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setVerificationKey": { + "auth": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "txnVersion": "3" + }, + "setZkappUri": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "editActionState": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setTokenSymbol": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "incrementNonce": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setVotingFor": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + }, + "setTiming": { + "constant": true, + "signatureNecessary": false, + "signatureSufficient": true + } + } + }, + "zkappUri": { + "isSome": false, + "value": { + "data": "", + "hash": "22930868938364086394602058221028773520482901241511717002947639863679740444066" + } + }, + "tokenSymbol": { + "isSome": false, + "value": { + "field": "0", + "symbol": "" + } + }, + "timing": { + "isSome": false, + "value": { + "initialMinimumBalance": "0", + "cliffTime": "0", + "cliffAmount": "0", + "vestingPeriod": "0", + "vestingIncrement": "0" + } + }, + "votingFor": { + "isSome": false, + "value": "0" + } + }, + "balanceChange": { + "magnitude": "44584", + "sgn": "28948022309329048855892746252171976963363056481941560715954676764349967630336" + }, + "incrementNonce": true, + "events": { + "hash": "11558119263070965853863267079253872832625419457395008685779236645292569607921", + "data": [] + }, + "actions": { + "hash": "2965377540200775924504968637505084669999360240500907972788072774778139588064", + "data": [] + }, + "callData": "0", + "callDepth": 0, + "preconditions": { + "network": { + "snarkedLedgerHash": { + "isSome": false, + "value": "0" + }, + "blockchainLength": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + }, + "minWindowDensity": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + }, + "totalCurrency": { + "isSome": false, + "value": { + "lower": "0", + "upper": "18446744073709551615" + } + }, + "globalSlotSinceGenesis": { + "isSome": true, + "value": { + "lower": "0", + "upper": "3" + } + }, + "stakingEpochData": { + "ledger": { + "hash": { + "isSome": false, + "value": "0" + }, + "totalCurrency": { + "isSome": false, + "value": { + "lower": "0", + "upper": "18446744073709551615" + } + } + }, + "seed": { + "isSome": false, + "value": "0" + }, + "startCheckpoint": { + "isSome": false, + "value": "0" + }, + "lockCheckpoint": { + "isSome": false, + "value": "0" + }, + "epochLength": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + } + }, + "nextEpochData": { + "ledger": { + "hash": { + "isSome": false, + "value": "0" + }, + "totalCurrency": { + "isSome": false, + "value": { + "lower": "0", + "upper": "18446744073709551615" + } + } + }, + "seed": { + "isSome": false, + "value": "0" + }, + "startCheckpoint": { + "isSome": false, + "value": "0" + }, + "lockCheckpoint": { + "isSome": false, + "value": "0" + }, + "epochLength": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + } + } + }, + "account": { + "balance": { + "isSome": false, + "value": { + "lower": "0", + "upper": "18446744073709551615" + } + }, + "nonce": { + "isSome": true, + "value": { + "lower": "33961154", + "upper": "33961154" + } + }, + "receiptChainHash": { + "isSome": false, + "value": "0" + }, + "delegate": { + "isSome": false, + "value": { + "x": "0", + "isOdd": false + } + }, + "state": [ + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + } + ], + "actionState": { + "isSome": false, + "value": "25079927036070901246064867767436987657692091363973573142121686150614948079097" + }, + "provedState": { + "isSome": false, + "value": false + }, + "isNew": { + "isSome": false, + "value": false + } + }, + "test": { + "balance": { + "isSome": false, + "value": { + "lower": "0", + "upper": "18446744073709551615" + } + }, + "nonce": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + }, + "receiptChainHash": { + "isSome": false, + "value": "0" + }, + "delegate": { + "isSome": false, + "value": { + "x": "0", + "isOdd": false + } + }, + "state": [ + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + }, + { + "isSome": false, + "value": "0" + } + ], + "actionState": { + "isSome": false, + "value": "25079927036070901246064867767436987657692091363973573142121686150614948079097" + }, + "provedState": { + "isSome": false, + "value": false + }, + "isNew": { + "isSome": false, + "value": false + } + }, + "validWhile": { + "isSome": false, + "value": { + "lower": "0", + "upper": "4294967295" + } + } + }, + "useFullCommitment": true, + "implicitAccountCreationFee": true, + "mayUseToken": { + "parentsOwnToken": false, + "inheritFromParent": false + }, + "authorizationKind": { + "isProved": false, + "isSigned": true, + "verificationKeyHash": "3392518251768960475377392625298437850623664973002200885669375116181514017494" + } + }, + "authorization": { + "signature": "7mWxjLYgbJUkZNcGouvhVj5tJ8yu9hoexb9ntvPK8t5LHqzmrL6QJjjKtf5SgmxB4QWkDw7qoMMbbNGtHVpsbJHPyTy2EzRQ" + } +}