-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
src/alloc.rs
Outdated
|
||
#[no_mangle] | ||
pub fn deploy() { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why these are needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasm-build
would complain if no deploy
symbol is found: https://github.com/paritytech/wasm-utils/blob/master/src/build.rs#L110
In the binary, we always set constructor to true and build the deploy wrapped version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only merge after openethereum/pwasm-ethereum#12 -- we would need to change the |
gen/main.rs
Outdated
pwasm-std = "0.9.0" | ||
pwasm-ethereum = "0.5.0" | ||
bigint = { version = "4", default-features = false } | ||
pwasm-std = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just be updated to 0.10 for all?
gen/main.rs
Outdated
pwasm-ethereum = "0.5.0" | ||
bigint = { version = "4", default-features = false } | ||
pwasm-std = {} | ||
pwasm-ethereum = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be just 0.6 ?
src/creator.rs
Outdated
} else { | ||
logger::debug("Error creating contract"); | ||
} | ||
|
||
if let Ok(addr) = create2(value() / U256::from(2), H256::default(), &input()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe let's use some non-zero salt to actually test the argument reaches the runtime after?
src/dispersion.rs
Outdated
|
||
#[no_mangle] | ||
pub fn deploy() { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should not be deploy
in any of those tests
with deploy, they will get packed as constructors, while they need to get packed as raw wasm module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NikVolf With no deploy wasm-build
would refuse to pack those modules: https://github.com/paritytech/wasm-utils/blob/master/src/build.rs#L110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reinstall pwasm-utils-cli)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all deploy
symbols!
You might want to avoid including all recompiled wasm binaries in the diff and include only Otherwise you will have to update gas costs for all tests in but it's up to you! |
And in case you'll decide to do so, please update the |
Some of the gas costs are already changed due to update to |
rel openethereum/parity-ethereum#9277
/usr/bin/env
, otherwise it breaks on non-FHS Linux.build-all.sh
to build for newest version ofwasm-build
.kip4
) to be enabled for specific tests, ingen
.creator.rs
.