This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pepyakin
force-pushed
the
ser-contract-polish-runtime
branch
2 times, most recently
from
August 30, 2018 14:53
35a06d2
to
374dc2f
Compare
There are several tests where gas was changed. This is due to shrinking the name and consequently a size of contracts.
Specifically, make fixes that allows to use a function without arguments (apart from ctx). For example: ```rust ext_return_42(ctx) -> u32 => { Ok(42) } ``` Also, add impl ConvertibleToWasm for u64.
This allows the transaction initiator to pass some input data that can be accessed from the executed contract. However, this only works for the top-level contract. The contract still cannot pass input data to the callee contract. The reason for that is that API doesn't support this presently. This will be addressed in the following commits.
`ext_call` now takes a buffer (or more specifically, pointer to the start of and size of a buffer). This allows contracts to pass input data while calling into other contracts.
Same as previous commit but for `ext_create`.
Instead, if callee doesn't complete successfuly, return a non-zero status code. This will prevent cascading traps up to the top-level. Due to this some tests were altered so that they now expect successful transfer instead of a failure.
Same as previous commit but for ext_create.
pepyakin
force-pushed
the
ser-contract-polish-runtime
branch
from
August 30, 2018 15:04
374dc2f
to
758f59b
Compare
pepyakin
added
A0-please_review
Pull request needs code review.
M4-core
and removed
A1-onice
labels
Aug 30, 2018
gavofyork
approved these changes
Sep 1, 2018
gavofyork
added
A8-looksgood
and removed
A0-please_review
Pull request needs code review.
labels
Sep 1, 2018
gguoss
pushed a commit
to chainx-org/substrate
that referenced
this pull request
Sep 3, 2018
* Rename ext_transfer → ext_call There are several tests where gas was changed. This is due to shrinking the name and consequently a size of contracts. * Fix macros Specifically, make fixes that allows to use a function without arguments (apart from ctx). For example: ```rust ext_return_42(ctx) -> u32 => { Ok(42) } ``` Also, add impl ConvertibleToWasm for u64. * Implement passing input data buffer from top-level This allows the transaction initiator to pass some input data that can be accessed from the executed contract. However, this only works for the top-level contract. The contract still cannot pass input data to the callee contract. The reason for that is that API doesn't support this presently. This will be addressed in the following commits. * Input data passing thru `ext_call` `ext_call` now takes a buffer (or more specifically, pointer to the start of and size of a buffer). This allows contracts to pass input data while calling into other contracts. * Input data passing thru `ext_create` Same as previous commit but for `ext_create`. * Trap on decoding error instead of panicking * Don't cascade failure in ext_call Instead, if callee doesn't complete successfuly, return a non-zero status code. This will prevent cascading traps up to the top-level. Due to this some tests were altered so that they now expect successful transfer instead of a failure. * Don't cascade failure in ext_create Same as previous commit but for ext_create. * Specify how much gas to allot for a call * Specify how much gas to allot for a create * Update tests.rs
dvdplm
added a commit
that referenced
this pull request
Sep 3, 2018
…rs-generic-over-hasher-and-rlpcodec * origin/master: (26 commits) Contract runtime polishing (#601) WIP on chain heap (#639) Events to track extrinsic success (#640) Install llvm-tools-preview component (#643) fix wasm executor compile error (#631) random fixes (#638) Empty becomes (), reflecting convention (#637) Allow to build_upon skipped entries, but don't walk back (#635) Separate out staking module into balances and payment (#629) Update .gitlab-ci.yml (#633) Do not attempt to rustup if in CI. This is taken care of by the base (#621) Avoid need for ident strings in storage (#624) rename to panic_handler as panic_implementation is deprecated in nightly (#626) 5 random fixes (#2) (#623) fix one typo in README (#627) Misspelled words (#625) Contracts: Per block gas limit (#506) Make sure to ban invalid transactions. (#615) (#620) Forward-port BFT fixes from v0.2 and restructure agreement cancelling (#619) Allow specifying listening multiaddresses (#577) ...
dvdplm
added a commit
that referenced
this pull request
Sep 4, 2018
* master: (22 commits) Introduce treasury and document (#646) Off-the-table staking preference (#656) Implement function `json_metadata` in `decl_module!` (#654) Fix warnings in networking (#652) Add a reputation system (#645) Check for pruned block state (#648) Contract runtime polishing (#601) WIP on chain heap (#639) Events to track extrinsic success (#640) Install llvm-tools-preview component (#643) fix wasm executor compile error (#631) random fixes (#638) Empty becomes (), reflecting convention (#637) Allow to build_upon skipped entries, but don't walk back (#635) Separate out staking module into balances and payment (#629) Update .gitlab-ci.yml (#633) Do not attempt to rustup if in CI. This is taken care of by the base (#621) Avoid need for ident strings in storage (#624) rename to panic_handler as panic_implementation is deprecated in nightly (#626) 5 random fixes (#2) (#623) ...
liuchengxu
pushed a commit
to chainx-org/substrate
that referenced
this pull request
Aug 23, 2021
revert substrate to 598b74e
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains various fixes for the contract runtime, all of which isn't big enough to warrant a PR. So here they are as individual commits: I recommend reviewing them one by one.