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

feat(poc): e2e test with extension system #28

Merged
merged 7 commits into from
Jun 18, 2024
Merged

Conversation

indirection42
Copy link
Contributor

@indirection42 indirection42 commented Jun 17, 2024

  • Modify core extension and fungibles extension
  • Modify poc runtime to use extension system

@indirection42 indirection42 changed the title wip feat: e2e test with extension system Jun 17, 2024
@indirection42 indirection42 marked this pull request as ready for review June 17, 2024 09:27
@indirection42 indirection42 requested a review from xlc June 17, 2024 09:34
@indirection42 indirection42 changed the title feat: e2e test with extension system feat(poc): e2e test with extension system Jun 18, 2024
let call_bytes = caller
.read_memory_into_vec(call_ptr, call_len)
.map_err(|_| ExtensionError::PolkavmError)?;
if P::is_allowed(extension_id, &call_bytes, invoke_source) {
#[cfg(feature = "std")]
println!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use log crate for logging. e.g. log::info!("...")

pallet-timestamp = { version = "30.0.0", default-features = false }
pallet-transaction-payment = { version = "31.0.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { version = "31.0.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0", default-features = false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change to git?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first, I added the pallet_assets, but I didn't find the proper version to make it compatible with other pallets. The compiler told me some deps have two versions. So, I think it would be easy to use same git version tag to conform compatibility.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's annoying. use this to set the versions https://github.com/paritytech/psvm

@indirection42 indirection42 merged commit 94b1c13 into master Jun 18, 2024
2 checks passed
@indirection42 indirection42 deleted the extension-spec-core branch June 18, 2024 06:30
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 this pull request may close these issues.

2 participants