Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Contracts: Enabled signed extension#14565

Merged
paritytech-processbot[bot] merged 6 commits into
masterfrom
pg/signed_extension
Jul 21, 2023
Merged

Contracts: Enabled signed extension#14565
paritytech-processbot[bot] merged 6 commits into
masterfrom
pg/signed_extension

Conversation

@pgherveou

@pgherveou pgherveou commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

Ideally we fix my other PR #14563 so we can have a test that verify that an Ink contract compiled with 1.70 works properly

@pgherveou pgherveou requested a review from athei as a code owner July 12, 2023 14:11
@pgherveou pgherveou requested a review from a team July 12, 2023 14:11
@pgherveou pgherveou changed the base branch from master to pg/ink_in_test July 12, 2023 14:11
@athei

athei commented Jul 14, 2023

Copy link
Copy Markdown
Member

have a test that verify that an Ink contract compiled with 1.70 works properly

Ideally, pallet-contracts should not depend on ink! at all or even know about its existence. Therefore tests should not use ink!. It is enough to write a wat fixture that uses the new instructions. There is no reason to assume that ink! does anything different than emitting those instructions.

@pgherveou

Copy link
Copy Markdown
Contributor Author

fair I will close the other PR and rebase this one on master

@pgherveou pgherveou force-pushed the pg/signed_extension branch from 4b3c5c4 to 164b885 Compare July 14, 2023 08:15
@pgherveou pgherveou changed the base branch from pg/ink_in_test to master July 14, 2023 08:15
@pgherveou pgherveou added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 14, 2023

@xermicus xermicus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How's this tested or do we have a wat fixture for this in master already?

@pgherveou

Copy link
Copy Markdown
Contributor Author

How's this tested or do we have a wat fixture for this in master already?

@xermicus what kind of .wat do we write to proof that we support signed_extension?

@xermicus

xermicus commented Jul 14, 2023

Copy link
Copy Markdown
Member

Probably something very similar to what wasmi uses to test it should work

(module
	(import "env" "memory" (memory 1 1))
	(func (export "deploy"))
	(func (export "call"))
	(func (param i32) (result i32)
		local.get 0
		i32.extend8_s
	)
)

Comment thread frame/contracts/src/tests.rs Outdated
Comment thread frame/contracts/fixtures/sign_extension.wat Outdated
Comment thread frame/contracts/src/tests.rs Outdated
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

@juangirini juangirini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM I don't give it the green check mark cause of @agryaznov's comment

@pgherveou pgherveou requested a review from agryaznov July 21, 2023 09:09
@pgherveou

Copy link
Copy Markdown
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot Bot merged commit aacf416 into master Jul 21, 2023
@paritytech-processbot paritytech-processbot Bot deleted the pg/signed_extension branch July 21, 2023 11:39
Ank4n pushed a commit that referenced this pull request Jul 22, 2023
* Contracts enable signed extension

* Add test

* fix

* xx

* Update frame/contracts/fixtures/sign_extension.wat

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* move tests

---------

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
ascjones pushed a commit that referenced this pull request Jul 24, 2023
* Contracts enable signed extension

* Add test

* fix

* xx

* Update frame/contracts/fixtures/sign_extension.wat

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* move tests

---------

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
SkymanOne pushed a commit that referenced this pull request Jul 24, 2023
* Contracts enable signed extension

* Add test

* fix

* xx

* Update frame/contracts/fixtures/sign_extension.wat



* move tests

---------

Co-authored-by: PG Herveou <pgherveou@gmail.com>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants