Skip to content

WASM/Debugger: allow serialized messages

Valentin Chaboche requested to merge vch9@wasm-debugger-allow-serialized into master

Context

This merge request allows the wasm debugger to read serialized messages as inputs, instead of only external messages and internal transfers. This makes easier to replay an inbox level in the debugger.

Manually testing the MR

I personally test with:

$ curl -X GET http://localhost:4545/global/block/3370128/ | jq .messages
[
"012c5c14b63b4dfaee081f37751b6269d831d87ce500beeec67ec25681fecb1309f6ec5d0c3b6b953af9f050aacb647b6413d32dedcbf8a902825208826bd1944a0225335fbbe8dc67f4487992df5d966a93257580b844a9059cbb0000000000000000000000008fbe5950fa476a58342f070a63081c7217d15e1000000000000000000000000000000000000000000000003635c9adc5dea000008303e919a0592f2f4e7001c83914bbd4df6a0ccea7cd01d4a0c56677e31a79400111ab95bea0333a352e4df46846590580b6b58c94561f8e5bc43795443e4f73cecce9290337",  "012c5c14b63b4dfaee081f37751b6269d831d87ce500bb3ed291ea6eff2e8c46ce1b90b812c04b70409cdbccff816e97662a9f6198f0f8a902825a3c826bd1944a0225335fbbe8dc67f4487992df5d966a93257580b844a9059cbb0000000000000000000000008fbe5950fa476a58342f070a63081c7217d15e1000000000000000000000000000000000000000000000003635c9adc5dea000008303e919a002dcc03500937c89448f2cf958ce1824a7e2be19b5bdaa5edf499493db7c6f97a04094aa1136b3c5babd723bd663f79625dc6ab15ab092555d830a11030415c05c",
...
]

Which I moved to a inputs.json:

[
    [
        { "serialized": "012c5c14b63b4dfaee081f37751b6269d831d87ce500beeec67ec25681fecb1309f6ec5d0c3b6b953af9f050aacb647b6413d32dedcbf8a902825208826bd1944a0225335fbbe8dc67f4487992df5d966a93257580b844a9059cbb0000000000000000000000008fbe5950fa476a58342f070a63081c7217d15e1000000000000000000000000000000000000000000000003635c9adc5dea000008303e919a0592f2f4e7001c83914bbd4df6a0ccea7cd01d4a0c56677e31a79400111ab95bea0333a352e4df46846590580b6b58c94561f8e5bc43795443e4f73cecce9290337" },
        { "serialized": "012c5c14b63b4dfaee081f37751b6269d831d87ce500bb3ed291ea6eff2e8c46ce1b90b812c04b70409cdbccff816e97662a9f6198f0f8a902825a3c826bd1944a0225335fbbe8dc67f4487992df5d966a93257580b844a9059cbb0000000000000000000000008fbe5950fa476a58342f070a63081c7217d15e1000000000000000000000000000000000000000000000003635c9adc5dea000008303e919a002dcc03500937c89448f2cf958ce1824a7e2be19b5bdaa5edf499493db7c6f97a04094aa1136b3c5babd723bd663f79625dc6ab15ab092555d830a11030415c05c" }
    ]
]

And replayed with the EVM rollup:

$ rlwrap ./octez-smart-rollup-wasm-debugger --kernel evm_installer.wasm --inputs inputs.json --rollup sr1A5txMPrpjY9d4qCUq1Ke4PGBQ2WNiB7LJ --preimage-dir _evm_installer_preimages
> step inbox

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports