Skip to content
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

Cannot see runtime logs for Moobeam #859

Open
alistair-singh opened this issue Nov 26, 2024 · 1 comment
Open

Cannot see runtime logs for Moobeam #859

alistair-singh opened this issue Nov 26, 2024 · 1 comment

Comments

@alistair-singh
Copy link

When using chopsticks on Moonbeam runtime to debug XCM, runtime logs are not output. This could because the chain is an EVM style chain which accepts EVM style accounts with ECDSA.

Possibly related issues:
#845

Example txs:
https://moonbeam.subscan.io/extrinsic/8434476-4
https://moonbeam.subscan.io/extrinsic/8492691-4

Steps to reproduce:

  1. Clone the moonbeam repo: https://github.com/moonbeam-foundation/moonbeam
  2. Build the moonbeam runtime.
cd moonbeam
git checkout runtime-3300
cargo build -p moonbeam-runtime
  1. Create config moonbeam.yml with path to the build debug wasm.
endpoint: wss://moonbeam-rpc.dwellir.com
mock-signature-host: true
block: ${env.MOONBEAM_BLOCK_NUMBER}
db: ./moonbeam.db.sqlite
runtime-log-level: 5
wasm-override: ../moonbeam/target/debug/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
  1. Run the command to re-run the block:
RUST_LOG=trace npx @acala-network/chopsticks@latest run-block -c moonbeam.yml -b 0x0d19ddccba84b83e01d79b47ac74fafa7a6ce0f0db00770de0ea89c627f3a211 --runtime-log-level 5

Expected output is a log line like:

xcm::execute  TRACE: !!! ERROR

Actual output:
out4.txt

Version:

$ npx @acala-network/chopsticks@latest --version
1.0.1
@xlc
Copy link
Member

xlc commented Nov 26, 2024

It is not related to #845 as you are replaying a real tx with valid signature.

I can see logs from EVM pallet so runtime logs is working.

To debug this why the tx failed, I will suggest:

  • Launch a fork network with block height that is the parent of the failed tx (e.g. 8434475)
  • Submit the failed tx from pjs apps (using RPC author_submitExtrinsic).
  • Check the logs

this will allow you replay only the failed tx and if needed, you can do additional storage override before replay it. e.g. if you found out the issue is the source account does not have enough funds, you can top it up and replay to see if it is going to success this time

You can also use dev_setHead with -1 as parameter to revert last block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants