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

Revert casper ffi change #4842

Conversation

darthsiroftardis
Copy link
Contributor

CHANGELOG:

  • Reverts a name change in the external FFI allowing stored byte code to be callable

@darthsiroftardis darthsiroftardis self-assigned this Sep 3, 2024
@darthsiroftardis darthsiroftardis changed the base branch from dev to feat-2.0 September 3, 2024 19:10
@@ -160,9 +160,9 @@ impl ModuleImportResolver for RuntimeModuleImportResolver {
Signature::new(&[ValueType::I32; 8][..], Some(ValueType::I32)),
FunctionIndex::CreateContractUserGroup.into(),
),
"casper_add_package_version" => FuncInstance::alloc_host(
"casper_add_contract_version" => FuncInstance::alloc_host(
Signature::new(&[ValueType::I32; 11][..], Some(ValueType::I32)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this will still not solve the issue -> the import statement embedded in already stored contracts have 10 args, but this one has 11 args. We'd perhaps need two host functions?

"casper_add_contract_version" => FuncInstance::alloc_host(
Signature::new(&[ValueType::I32; 10][..], Some(ValueType::I32)),
FunctionIndex::AddContractVersion.into(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah makes sense, let me just bring back the old FFI

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, you need both the old (for retrograde support) and the new (for go forward)

@darthsiroftardis
Copy link
Contributor Author

Closing in favor of #4843

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.

3 participants