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

Fix pending runtime api #1608

Merged
merged 5 commits into from
Oct 12, 2024
Merged

Fix pending runtime api #1608

merged 5 commits into from
Oct 12, 2024

Conversation

boundless-forest
Copy link
Member

@boundless-forest boundless-forest commented Oct 9, 2024

Close #1605

The current pending RPC is problematic because it lacks the setValidateData inherent data provider, which is required by the parachain-system pallet. The pending RPC attempts to create extrinsics based on the inherent data and apply them before pool extrinsics, but it fails due to missing inherent data. This PR adds mock data to fulfill the validation requirements.

2024-10-08 16:01:11.807 DEBUG tokio-runtime-worker eth-pending: Pending runtime API: header digest = Digest { logs: [DigestItem::PreRuntime([97, 117, 114, 97], [204, 123, 43, 17, 0, 0, 0, 0])] }    
2024-10-08 16:01:11.808 ERROR tokio-runtime-worker runtime: panicked at /home/bear/.cargo/git/checkouts/polkadot-sdk-38f315c8db144fd3/5811785/cumulus/pallets/parachain-system/src/lib.rs:933:74:
validation function params are always injected into inherent data; qed  
2024-10-09 16:17:42.006  INFO tokio-runtime-worker aura: 🔖 Pre-sealed block for proposal at 2. Hash now 0x06585aa79fb309bb1d14664f86116a3a879d887089c3f247cb7eb55c5ceac859, previously 0xbc9a01d309b3a9d85b73e000482338b16a792f2470547e80f44fa5a734deb3fc.    
2024-10-09 16:17:42.006  INFO tokio-runtime-worker substrate: ✨ Imported #2 (0x0658…c859)    
2024-10-09 16:17:42.013 DEBUG tokio-runtime-worker bear: Detect the call, number_or_hash: Some(Latest)    
2024-10-09 16:17:42.013 DEBUG tokio-runtime-worker bear: native block is ok, id: BlockId::Hash(0x06585aa79fb309bb1d14664f86116a3a879d887089c3f247cb7eb55c5ceac859)    
2024-10-09 16:17:42.015 DEBUG tokio-runtime-worker bear: Detect the call, number_or_hash: Some(Pending)    
2024-10-09 16:17:42.015 DEBUG tokio-runtime-worker bear: native block is none, ready to create pending runtime api    
2024-10-09 16:17:42.015 DEBUG tokio-runtime-worker eth-pending: Pending runtime API: header digest = Digest { logs: [DigestItem::PreRuntime([97, 117, 114, 97], [177, 180, 43, 17, 0, 0, 0, 0])] }    
2024-10-09 16:17:42.016 DEBUG tokio-runtime-worker eth-pending: Pending runtime API: inherent len = 2    
2024-10-09 16:17:42.016 ERROR tokio-runtime-worker runtime: panicked at /home/bear/.cargo/git/checkouts/polkadot-sdk-38f315c8db144fd3/5811785/cumulus/pallets/parachain-system/src/lib.rs:1297:30:
included head not present in relay storage proof    
2024-10-09 16:17:42.016  WARN tokio-runtime-worker sp_state_machine::overlayed_changes::changeset: 1 storage transactions are left open by the runtime. Those will be rolled back.    
2024-10-09 16:17:42.016  WARN tokio-runtime-worker sp_state_machine::overlayed_changes::changeset: 1 storage transactions are left open by the runtime. Those will be rolled back.    
2024-10-09 16:17:42.016 DEBUG tokio-runtime-worker eth-pending: Pending runtime API: extrinsic len = 0    
2024-10-09 16:17:43.454  INFO tokio-runtime-worker substrate: 💤 Idle (0 peers), best: #2 (0x0658…c859), finalized #2 (0x0658…c859), ⬇ 0 ⬆ 0 

image

@boundless-forest boundless-forest marked this pull request as draft October 9, 2024 03:19
node/src/service/mod.rs Outdated Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@boundless-forest boundless-forest marked this pull request as ready for review October 9, 2024 09:25

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@aurexav
Copy link
Member

aurexav commented Oct 10, 2024

Has it been resolved in the dev node?

@boundless-forest
Copy link
Member Author

Has it been resolved in the dev node?

Yes, it has worked well in my local testing.

Copy link

Check 23009ec crab-dev

Check runtime version

Check runtime storage

Copy link

Check 23009ec darwinia-dev

Check runtime version

Check runtime storage

Copy link

Check 23009ec koi-dev

Check runtime version

RuntimeVersion {
    spec_name: "Darwinia Koi",
    impl_name: "DarwiniaOfficialRust",
    authoring_version: 0,
-   spec_version: 6662,
+   spec_version: 6710,
    impl_version: 0,
    transaction_version: 0,
    state_version: 0,
}

Check runtime storage

@aurexav aurexav merged commit 0da4f43 into main Oct 12, 2024
10 checks passed
@aurexav aurexav deleted the bear-pending-issue branch October 12, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Error deploying contract with Hardhat
3 participants