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

Missing paraInherent data from block #621

Closed
NachoPal opened this issue Jan 5, 2024 · 16 comments · Fixed by #624
Closed

Missing paraInherent data from block #621

NachoPal opened this issue Jan 5, 2024 · 16 comments · Fixed by #624

Comments

@NachoPal
Copy link

NachoPal commented Jan 5, 2024

I am trying to run a network providing chain_spec genesis files with the local (kusama-local, asset-hub-kusama-local) implementation.

The config files look something like this:

mock-signature-host: true
block: ${env.KUSAMA_BLOCK_NUMBER}
db: ./db.sqlite
port: 8000
runtime-log-level: 5
genesis: ./config/chopsticks/kusama/chain-spec-v1.0.0.json
mock-signature-host: true
block: ${env.STATEMINE_BLOCK_NUMBER}
db: ./db.sqlite
port: 8001
runtime-log-level: 5
genesis: ./config/chopsticks/asset-hub-kusama/chain-spec-v1.0.0.json

And running the command:

chopsticks xcm -r config/chopsticks/kusama/config.yml -p config/chopsticks/asset-hub-kusama/config.yml

However I am getting the following error:

.../@acala-network/chopsticks-core/dist/cjs/blockchain/inherent/para-enter.js:24
            throw new Error('Missing paraInherent data from block');
                  ^

Error: Missing paraInherent data from block
    at ParaInherentEnter.createInherents (.../@acala-network/chopsticks-core/dist/cjs/blockchain/inherent/para-enter.js:24:19)
    at async Promise.all (index 1)
    at async InherentProviders.createInherents (/Users/nacho/Desktop/PARITY/Repos/parachains-integration-tests/node_modules/@acala-network/chopsticks-core/dist/cjs/blockchain/inherent/index.js:91:23)
    at async TxPool.buildBlock (/Users/nacho/Desktop/PARITY/Repos/parachains-integration-tests/node_modules/@acala-network/chopsticks-core/dist/cjs/blockchain/txpool.js:312:23)
    at async TxPool.buildBlockIfNeeded (/Users/nacho/Desktop/PARITY/Repos/parachains-integration-tests/node_modules/@acala-network/chopsticks-core/dist/cjs/blockchain/txpool.js:295:9)
@NachoPal
Copy link
Author

NachoPal commented Jan 5, 2024

#616 (comment)

@NachoPal
Copy link
Author

NachoPal commented Jan 5, 2024

Tried to fix it but getting different error now:

runtime                      ERROR: panicked at /Users/nacho/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pallet-aura-22.0.0/src/lib.rs:411:9:
Timestamp slot must match `CurrentSlot`
[18:33:06.395] INFO (block-builder/15625): Try building block #1
    app: "chopsticks"
    number: 1
    extrinsicsCount: 0
    umpCount: 0
[18:33:06.548] WARN (block-builder/15625): Failed to apply inherents {} Error: wasm `unreachable` instruction executed
    app: "chopsticks"
file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/blockchain/block-builder.ts:135
            throw new Error('Failed to apply inherents');
                  ^

Error: Failed to apply inherents
    at initNewBlock (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/blockchain/block-builder.ts:135:19)
    at async buildBlock (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/blockchain/block-builder.ts:240:33)
    at async #buildBlock (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/blockchain/txpool.ts:188:47)
    at async #buildBlockIfNeeded (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/blockchain/txpool.ts:170:13)

@ermalkaleci
Copy link
Collaborator

@NachoPal can you upload genesis file so I don't have to go through building process?

@NachoPal
Copy link
Author

NachoPal commented Jan 8, 2024

chain-spec-v1.0.0.json
chain-spec-v1.0.0.json

@ermalkaleci ermalkaleci linked a pull request Jan 8, 2024 that will close this issue
@NachoPal
Copy link
Author

NachoPal commented Jan 10, 2024

@ermalkaleci I tried the fix but I am getting this error:

TypeError: Cannot read properties of undefined (reading 'downwardMessageQueues')
    at connectDownward (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/xcm/downward.ts:8:64)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async connectVertical (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/xcm/index.ts:10:5)
    at async Object.handler (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/chopsticks/src/cli.ts:43:13)

It seems the RelayChain's wasm is replaced by the Parachain's one somewhere, that is why it doesn't find the dmp pallet.
I can not find where it happens and I almost sure I am not using genesis files with the same (parachain) runtime.

For genesis I tried what I had in my local and also:
Kusama config

genesis: https://raw.githubusercontent.com/AcalaNetwork/chopsticks/d7b476eb44f14e8e88e39b2f263d9ccffe330c4f/packages/e2e/blobs/kusama.json

and
Asset Hub Kusama config

genesis: https://raw.githubusercontent.com/AcalaNetwork/chopsticks/d7b476eb44f14e8e88e39b2f263d9ccffe330c4f/packages/e2e/blobs/asset-hub-kusama.json

Did it work for you?

I am running:

yarn start xcm -r <path_to_kusama_config> -p <path_to_asset_hub_kusama_config>

@ermalkaleci
Copy link
Collaborator

@NachoPal Hmmm, remove db. Because they're both genesis with same block hash it will mess caching. Something to be addressed.

@ermalkaleci
Copy link
Collaborator

just tried pjs and it seems I can't transfer unless I built the first block empty, need to investigate.
Also keep in minding that starting from genesis you won't have any parachain setup, so you'll need to modify storage

@NachoPal
Copy link
Author

you won't have any parachain setup

What setup you are referring to?

@ermalkaleci
Copy link
Collaborator

you will have only genesis state, no asset registered, etc

@NachoPal
Copy link
Author

you will have only genesis state, no asset registered, etc

Yeah, that's totally fine

@NachoPal
Copy link
Author

Hmmm, remove db. Because they're both genesis with same block hash it will mess caching. Something to be addressed.

This did not work, still getting the same error

@ermalkaleci
Copy link
Collaborator

I did try and it works. what's the error?

@NachoPal
Copy link
Author

I did try and it works. what's the error?

The error is the same:

TypeError: Cannot read properties of undefined (reading 'downwardMessageQueues')
    at connectDownward (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/xcm/downward.ts:8:64)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async connectVertical (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/core/src/xcm/index.ts:10:5)
    at async Object.handler (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/packages/chopsticks/src/cli.ts:43:13)

Steps:

  1. I remove db.sqlite, db.sqlite-shm, db.sqlite-wal
  2. yarn start xcm -r <path_to_kusama_config> -p <path_to_asset_hub_kusama_config>

Config files:

  • Kusama:
mock-signature-host: true
block: ${env.KUSAMA_BLOCK_NUMBER}
db: ./db.sqlite
port: 8000
runtime-log-level: 5
genesis: https://raw.githubusercontent.com/AcalaNetwork/chopsticks/d7b476eb44f14e8e88e39b2f263d9ccffe330c4f/packages/e2e/blobs/kusama.json
  • AssetHubKusama
mock-signature-host: true
block: ${env.STATEMINE_BLOCK_NUMBER}
db: ./db.sqlite
port: 8001
runtime-log-level: 4
genesis: https://raw.githubusercontent.com/AcalaNetwork/chopsticks/d7b476eb44f14e8e88e39b2f263d9ccffe330c4f/packages/e2e/blobs/asset-hub-kusama.json

I am up to date with master

@ermalkaleci
Copy link
Collaborator

either remove db completely or use different location for each one. currently your using db.sqlite for both and both genesis will have same block hash

@NachoPal
Copy link
Author

NachoPal commented Jan 11, 2024

I thought removing the DB was enough. After using different locations for each DB, it worked, thanks.

I will appreciate if you can release a new npm package version with the recent fixes.

@ermalkaleci
Copy link
Collaborator

I will appreciate if you can release a new npm package version with the recent fixes

It's already been published as beta https://www.npmjs.com/package/@acala-network/chopsticks/v/0.9.6-3

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

Successfully merging a pull request may close this issue.

2 participants